import { a as a13, c as c11, e as e7, e2 as e10, g as g3, i as i8 } from "./chunk-RATJTB73.js"; import { Gt, H, St, Y, Z, _ as _2, e as e8, ft, gt, ht, jt, lt, ot, pt, tt, u as u5, ut, wt, xt, yt } from "./chunk-NXMKH642.js"; import { e as e9 } from "./chunk-ZHRMTKME.js"; import "./chunk-YHA24SWX.js"; import "./chunk-Z6GWVH7Z.js"; import "./chunk-ZVHTCCQC.js"; import "./chunk-PCGDLSZ4.js"; import "./chunk-CAYFEZCR.js"; import { t as t10 } from "./chunk-MFFE4I2S.js"; import { n as n8 } from "./chunk-XBH7TGC2.js"; import { e as e6, f as f4, i as i4, r as r9 } from "./chunk-K3NA3LQS.js"; import { l as l10 } from "./chunk-TYZ4SNOQ.js"; import "./chunk-LMCIAW5S.js"; import { h as h5 } from "./chunk-OTS3UE5B.js"; import "./chunk-6RAL4JPQ.js"; import "./chunk-VAY3LZG7.js"; import { l as l9 } from "./chunk-4E6K4P67.js"; import { r as r11, t as t11 } from "./chunk-EZZVK4K6.js"; import { M as M4, N, j2 as j5, x2 as x } from "./chunk-S3AKUCX7.js"; import "./chunk-TRK7CKWP.js"; import "./chunk-EGVIPYN2.js"; import { a as a9, c as c8, m as m9 } from "./chunk-P75K44PT.js"; import { o as o8 } from "./chunk-LGW7TID4.js"; import { l as l8 } from "./chunk-FXKC6XZV.js"; import { l as l6, s as s6 } from "./chunk-ICMZOYI5.js"; import "./chunk-YASLQAXE.js"; import { Ke } from "./chunk-UBE36KEX.js"; import { v as v5 } from "./chunk-524XACB7.js"; import "./chunk-XKHC7KKF.js"; import "./chunk-6XTLDPQ5.js"; import "./chunk-GD5TMIPM.js"; import "./chunk-EC47EYSJ.js"; import { c as c9 } from "./chunk-37ASLV6R.js"; import "./chunk-HGJGOAK6.js"; import "./chunk-3OHML7FO.js"; import "./chunk-JGOAMEPM.js"; import { c as c4, d as d3 } from "./chunk-Z64YKYHD.js"; import "./chunk-5WMG6O4B.js"; import { n as n9 } from "./chunk-G5AI6ZNE.js"; import { l as l7, r as r10, s as s7, w as w3 } from "./chunk-5JK4DCPE.js"; import "./chunk-F37AVPUF.js"; import "./chunk-H6ETEALK.js"; import "./chunk-FIYKFRB2.js"; import { L as L3, Q } from "./chunk-ROWZMUVJ.js"; import "./chunk-7IKYLNB5.js"; import "./chunk-FYNVVMWY.js"; import { M as M3, h as h4, i as i3, r as r8, s as s5 } from "./chunk-CRGVDJI6.js"; import "./chunk-QOV6ITMI.js"; import { An, en, rn, tn } from "./chunk-DH2OBAUC.js"; import { a as a5, m as m5, o as o6, r as r7, z } from "./chunk-6P6NA7JB.js"; import "./chunk-GS2NUWMB.js"; import "./chunk-FUEX356Y.js"; import "./chunk-54AOZV5X.js"; import "./chunk-PK35UGFJ.js"; import "./chunk-P4UZNLD5.js"; import "./chunk-Q52DVFYK.js"; import "./chunk-HBMVUVZX.js"; import "./chunk-TNLRDNTC.js"; import { O as O2, e as e3, e2 as e4, e3 as e5, n as n7, o as o3, r as r5, r2 as r6, t as t6, t2 as t7, t3 as t8, t4 as t9 } from "./chunk-E6CBEY54.js"; import "./chunk-P6MX663D.js"; import { f as f3, h as h3, i as i2, n2 as n6, p as p2, v as v4, w as w2 } from "./chunk-7256PFPA.js"; import "./chunk-QY775BFA.js"; import { s as s4 } from "./chunk-2SJEIKRW.js"; import { Me } from "./chunk-25BNEBXZ.js"; import "./chunk-3ZFH4KQV.js"; import { L as L4 } from "./chunk-GJIJLOAS.js"; import "./chunk-T5B2N2CV.js"; import "./chunk-CZG5S62M.js"; import "./chunk-4YMGIMYW.js"; import "./chunk-4FQG6M7Q.js"; import "./chunk-PHRSJJ3U.js"; import { o as o7 } from "./chunk-WR32EHFC.js"; import { S as S2, p as p3 } from "./chunk-RBZL6SRZ.js"; import "./chunk-OSNKP4CI.js"; import "./chunk-MS4AO5ZF.js"; import "./chunk-T3EUPDKL.js"; import "./chunk-5MVUZO4F.js"; import "./chunk-VVBOYBFX.js"; import "./chunk-S7R5EXHN.js"; import "./chunk-FMKGHOGD.js"; import "./chunk-6URTNEGN.js"; import "./chunk-KN7TOKVN.js"; import "./chunk-QHSP2IXH.js"; import "./chunk-FPWDEBK7.js"; import "./chunk-7O56JPWQ.js"; import "./chunk-6B2LQBKM.js"; import "./chunk-6MBZCUTA.js"; import { a as a8 } from "./chunk-GXVYXYQ6.js"; import { o as o9 } from "./chunk-V7YYFSRJ.js"; import "./chunk-O2BDAP4B.js"; import "./chunk-MFUAILAT.js"; import "./chunk-HZJYXMI6.js"; import "./chunk-W674J6QK.js"; import "./chunk-2EKIELVX.js"; import "./chunk-PU77IHUM.js"; import "./chunk-5NKYXKIA.js"; import "./chunk-RHPR46MQ.js"; import "./chunk-FTI5VP6T.js"; import { g as g2 } from "./chunk-ZGOTQNST.js"; import { I, a as a11, a2 as a12, c2 as c5, c3 as c6, c4 as c7, c5 as c10, i2 as i5, i3 as i6, i4 as i7, u as u4 } from "./chunk-2JD5MAFR.js"; import { S2 as S3 } from "./chunk-IN4AAEPU.js"; import "./chunk-3D3QEPRE.js"; import "./chunk-VBNMTM7L.js"; import "./chunk-JWB47MRZ.js"; import { b as b2, m as m6 } from "./chunk-UD63WBG3.js"; import { m as m7 } from "./chunk-X7DBH4KK.js"; import "./chunk-LY74KTXV.js"; import "./chunk-EWE6EXPY.js"; import "./chunk-KUXNUNAI.js"; import "./chunk-HKIEQAJZ.js"; import "./chunk-522WBHUO.js"; import "./chunk-WNCU6BFU.js"; import { L as L2, S, m as m2, u as u2 } from "./chunk-PIGRDDRG.js"; import "./chunk-BJHM4JNS.js"; import "./chunk-F6A2QQ26.js"; import "./chunk-XLV7RUSE.js"; import "./chunk-NTUXR253.js"; import "./chunk-EOSZHC5H.js"; import "./chunk-C43UE3Z5.js"; import { p as p4 } from "./chunk-V7H6CJ37.js"; import "./chunk-H2KDMZTR.js"; import { a as a6, c as c3, d as d2 } from "./chunk-RMX2AZ4P.js"; import { u as u3 } from "./chunk-NE3ESGA6.js"; import { U, a as a3, f as f2, h as h2, j as j4, l as l4, w } from "./chunk-YIS6BAC3.js"; import { l as l5 } from "./chunk-7XXXCK2A.js"; import "./chunk-7ZIDBK7B.js"; import "./chunk-K7BLHWGD.js"; import "./chunk-DNIUTMMR.js"; import "./chunk-77MD2JQC.js"; import "./chunk-I3OBGWNS.js"; import "./chunk-FONIFA5N.js"; import { y as y2 } from "./chunk-EG5OI4V4.js"; import "./chunk-65BYCSII.js"; import { B, de, ye } from "./chunk-2XEIO3HG.js"; import { a as a10 } from "./chunk-H6V2GHM5.js"; import "./chunk-6A4U74YA.js"; import "./chunk-CYI7KFYB.js"; import "./chunk-5LXROFTA.js"; import "./chunk-GJXW4HL5.js"; import "./chunk-WJW5DUN6.js"; import "./chunk-W72F6AS3.js"; import "./chunk-PJ7ZQ4VD.js"; import "./chunk-WDLTDV2L.js"; import "./chunk-TERAW6FT.js"; import "./chunk-N2663GRX.js"; import "./chunk-O4FY3ITT.js"; import { c as c2 } from "./chunk-WEMIK25H.js"; import { b as b3 } from "./chunk-SSYBG3FG.js"; import "./chunk-7N4X6GF3.js"; import "./chunk-JXW4QTJA.js"; import { m as m4, o2 as o5, q } from "./chunk-XNLG7T2T.js"; import { o as o4 } from "./chunk-IR4PV7VK.js"; import "./chunk-UXF37FQ4.js"; import "./chunk-ZOEK6QHJ.js"; import "./chunk-2Z6LERTI.js"; import { o as o2, v2 as v3 } from "./chunk-OWVBLVP3.js"; import "./chunk-AFZ7XSEW.js"; import "./chunk-ZT2KFSF4.js"; import "./chunk-5CF2NXNR.js"; import "./chunk-YPCUUKFE.js"; import "./chunk-ATPLLI5W.js"; import { a as a7 } from "./chunk-WJ3OEUD3.js"; import { a as a4 } from "./chunk-MXB2XLKV.js"; import { l as l3 } from "./chunk-XH7RUGVZ.js"; import { m as m8 } from "./chunk-TBBTRX4O.js"; import { _, m as m3 } from "./chunk-YBSUITLL.js"; import { j as j3 } from "./chunk-ALDCDSPV.js"; import { n as n5 } from "./chunk-DT6EAZQ5.js"; import "./chunk-HNOZUNJ4.js"; import { U as U2 } from "./chunk-VNFRAYHO.js"; import "./chunk-R5IG2D6H.js"; import "./chunk-VBRY5KJM.js"; import "./chunk-PDKDCAAD.js"; import { M, M2, R, c2 as c, j2, r as r4 } from "./chunk-ECW2QABR.js"; import { s as s3 } from "./chunk-GCDJLKH4.js"; import { E as E2, k2 } from "./chunk-MRJEICT6.js"; import { A, d, e, l3 as l2, n as n2, n2 as n3, n6 as n4, t as t2, t2 as t3, v2, y3 as y } from "./chunk-Y3WMVFTW.js"; import "./chunk-SAS7RONY.js"; import { t as t4 } from "./chunk-WSRBH7BF.js"; import { n, r as r3 } from "./chunk-IHXECKQQ.js"; import { C, E, L, O, T, b, f, g, i, j, k, p, t as t5, v } from "./chunk-ULGDPLM2.js"; import { s, s3 as s2 } from "./chunk-EMJ4ZSM2.js"; import { m, r as r2 } from "./chunk-IKP3YN53.js"; import { a, a2, e as e2, h, l, o, r, t, u } from "./chunk-GZT4BVFP.js"; import "./chunk-A5ICIBVI.js"; // node_modules/@arcgis/core/views/BreakpointsOwner.js var n10 = { widthBreakpoint: { getValue(e23) { const i32 = e23.viewSize[0], s30 = e23.breakpoints, a34 = this.values; return i32 <= s30.xsmall ? a34.xsmall : i32 <= s30.small ? a34.small : i32 <= s30.medium ? a34.medium : i32 <= s30.large ? a34.large : a34.xlarge; }, values: { xsmall: "xsmall", small: "small", medium: "medium", large: "large", xlarge: "xlarge" }, valueToClassName: { xsmall: "esri-view-width-xsmall esri-view-width-less-than-small esri-view-width-less-than-medium esri-view-width-less-than-large esri-view-width-less-than-xlarge", small: "esri-view-width-small esri-view-width-greater-than-xsmall esri-view-width-less-than-medium esri-view-width-less-than-large esri-view-width-less-than-xlarge", medium: "esri-view-width-medium esri-view-width-greater-than-xsmall esri-view-width-greater-than-small esri-view-width-less-than-large esri-view-width-less-than-xlarge", large: "esri-view-width-large esri-view-width-greater-than-xsmall esri-view-width-greater-than-small esri-view-width-greater-than-medium esri-view-width-less-than-xlarge", xlarge: "esri-view-width-xlarge esri-view-width-greater-than-xsmall esri-view-width-greater-than-small esri-view-width-greater-than-medium esri-view-width-greater-than-large" } }, heightBreakpoint: { getValue(e23) { const i32 = e23.viewSize[1], s30 = e23.breakpoints, a34 = this.values; return i32 <= s30.xsmall ? a34.xsmall : i32 <= s30.small ? a34.small : i32 <= s30.medium ? a34.medium : i32 <= s30.large ? a34.large : a34.xlarge; }, values: { xsmall: "xsmall", small: "small", medium: "medium", large: "large", xlarge: "xlarge" }, valueToClassName: { xsmall: "esri-view-height-xsmall esri-view-height-less-than-small esri-view-height-less-than-medium esri-view-height-less-than-large esri-view-height-less-than-xlarge", small: "esri-view-height-small esri-view-height-greater-than-xsmall esri-view-height-less-than-medium esri-view-height-less-than-large esri-view-height-less-than-xlarge", medium: "esri-view-height-medium esri-view-height-greater-than-xsmall esri-view-height-greater-than-small esri-view-height-less-than-large esri-view-height-less-than-xlarge", large: "esri-view-height-large esri-view-height-greater-than-xsmall esri-view-height-greater-than-small esri-view-height-greater-than-medium esri-view-height-less-than-xlarge", xlarge: "esri-view-height-xlarge esri-view-height-greater-than-xsmall esri-view-height-greater-than-small esri-view-height-greater-than-medium esri-view-height-greater-than-large" } }, orientation: { getValue(e23) { const i32 = e23.viewSize, s30 = i32[0], a34 = i32[1], t25 = this.values; return a34 >= s30 ? t25.portrait : t25.landscape; }, values: { portrait: "portrait", landscape: "landscape" }, valueToClassName: { portrait: "esri-view-orientation-portrait", landscape: "esri-view-orientation-landscape" } } }; var o10 = { xsmall: 544, small: 768, medium: 992, large: 1200 }; function m10(e23) { const i32 = e23; return i32 && i32.xsmall < i32.small && i32.small < i32.medium && i32.medium < i32.large; } function g4(e23, i32) { return i32 ? n10[e23].valueToClassName[i32].split(" ") : []; } var w4 = (w13) => { let d20 = class extends w13 { constructor(...e23) { super(...e23), this._breakpointsHandles = new u3(), this.orientation = null, this.widthBreakpoint = null, this.heightBreakpoint = null, this.breakpoints = o10; } initialize() { this._breakpointsHandles.add(l4(() => [this.breakpoints, this.size], () => this._updateClassNames(), h2)); } destroy() { this.destroyed || (this._removeActiveClassNames(), this._breakpointsHandles = l(this._breakpointsHandles)); } set breakpoints(e23) { if (e23 === this._get("breakpoints")) return; const i32 = m10(e23); if (!i32) { const e24 = JSON.stringify(o10, null, 2); console.warn("provided breakpoints are not valid, using defaults:" + e24); } e23 = i32 ? e23 : o10, this._set("breakpoints", { ...e23 }); } _updateClassNames() { if (!this.container) return; const e23 = t4.acquire(), s30 = t4.acquire(); let a34, t25 = false; for (a34 in n10) { const i32 = this[a34], r24 = n10[a34].getValue({ viewSize: this.size, breakpoints: this.breakpoints }); i32 !== r24 && (t25 = true, this[a34] = r24, g4(a34, i32).forEach((e24) => s30.push(e24)), g4(a34, r24).forEach((i33) => e23.push(i33))); } t25 && (this._applyClassNameChanges(e23, s30), t4.release(e23), t4.release(s30)); } _applyClassNameChanges(e23, i32) { const s30 = this.container; s30 && (i32.forEach((e24) => s30.classList.remove(e24)), e23.forEach((e24) => s30.classList.add(e24))); } _removeActiveClassNames() { const e23 = this.container; if (!e23) return; let i32; for (i32 in n10) g4(i32, this[i32]).forEach((i33) => e23.classList.remove(i33)); } }; return e([d()], d20.prototype, "breakpoints", null), e([d()], d20.prototype, "orientation", void 0), e([d()], d20.prototype, "widthBreakpoint", void 0), e([d()], d20.prototype, "heightBreakpoint", void 0), d20 = e([n3("esri.views.BreakpointsOwner")], d20), d20; }; // node_modules/@arcgis/core/views/overlay/ViewOverlay.js var c12 = class extends y { constructor() { super(...arguments), this.items = new j3(), this._watchUpdatingTracking = new c3(), this._callbacks = new Map(), this._projector = i2(), this._hiddenProjector = i2(); } get needsRender() { return this.items.length > 0; } initialize() { const t25 = document.createElement("div"); t25.className = "esri-overlay-surface", this._set("surface", t25), this._hiddenSurface = document.createElement("div"), this._hiddenSurface.setAttribute("style", "visibility: hidden;"), t25.appendChild(this._hiddenSurface), this._watchUpdatingTracking.addOnCollectionChange(() => this.items, (t26) => { for (const e23 of t26.added) { const t27 = () => e23.render(); this._callbacks.set(e23, t27), this._projector.append(this.surface, t27); } for (const e23 of t26.removed) { const t27 = this._projector.detach(this._callbacks.get(e23)); this.surface.removeChild(t27.domNode), this._callbacks.delete(e23); } }); } addItem(t25) { this.items.add(t25); } removeItem(t25) { this.items.remove(t25); } destroy() { this.items.removeAll(), this._callbacks.forEach((t25) => this._projector.detach(t25)), this._callbacks = null, this._projector = null, this._watchUpdatingTracking.destroy(); } render() { this._projector.renderNow(); } computeBoundingRect(t25) { const e23 = this._hiddenSurface, r24 = this._hiddenProjector; let o30 = null; const s30 = () => (o30 = t25.render(), o30); r24.append(e23, s30), r24.renderNow(); const i32 = { left: 0, top: 0, right: 0, bottom: 0 }; if (o30 && o30.domNode) { const t26 = o30.domNode.getBoundingClientRect(); i32.left = t26.left, i32.top = t26.top, i32.right = t26.right, i32.bottom = t26.bottom; } for (r24.detach(s30); e23.firstChild; ) e23.removeChild(e23.firstChild); return i32; } overlaps(t25, e23) { const r24 = this.computeBoundingRect(t25), o30 = this.computeBoundingRect(e23); return Math.max(r24.left, o30.left) <= Math.min(r24.right, o30.right) && Math.max(r24.top, o30.top) <= Math.min(r24.bottom, o30.bottom); } get hasVisibleItems() { return this.items.some((t25) => t25.visible); } renderCanvas(t25) { if (!this.items.some((t26) => t26.visible)) return; const e23 = t25.getContext("2d"); e23.save(), e23.font = `10px ${getComputedStyle(this.surface).fontFamily}`, this.items.forEach((t26) => { e23.save(), t26.renderCanvas(e23), e23.restore(); }), e23.restore(); } }; e([d({ readOnly: true })], c12.prototype, "surface", void 0), e([d({ readOnly: true })], c12.prototype, "items", void 0), e([d({ readOnly: true })], c12.prototype, "needsRender", null), e([d({ readOnly: true })], c12.prototype, "_watchUpdatingTracking", void 0), e([d({ readOnly: true, aliasOf: "_watchUpdatingTracking.updating" })], c12.prototype, "updating", void 0), c12 = e([n3("esri.views.overlay.ViewOverlay")], c12); var n11 = c12; // node_modules/@arcgis/core/core/unitFormatUtils.js var K2 = ["B", "kB", "MB", "GB", "TB"]; function L5(n34, r24) { let e23 = r24 === 0 ? 0 : Math.floor(Math.log(r24) / Math.log(o7.KILOBYTES)); e23 = o5(e23, 0, K2.length - 1); const u23 = m2(r24 / o7.KILOBYTES ** e23, { maximumFractionDigits: 2 }); return r2(n34.units.bytes[K2[e23]], { fileSize: u23 }); } // node_modules/@arcgis/core/widgets/Feature/support/featureUtils.js var d4 = "esri.widgets.Feature.support.featureUtils"; var p5 = s.getLogger(d4); var m11 = /href=(""|'')/gi; var y3 = /(\{([^\{\r\n]+)\})/g; var g5 = /\'/g; var h6 = /^\s*expression\//i; var I2 = /(\n)/gi; var b4 = /[\u00A0-\u9999<>\&]/gim; var F = /href\s*=\s*(?:\"([^\"]+)\"|\'([^\']+)\')/gi; var w5 = /^(?:mailto:|tel:)/; var N3 = "relationships/"; var E3 = S("short-date-short-time"); function j6(e23) { if (!t(e23)) return e23.get("sourceLayer") || e23.get("layer"); } async function x2(e23, t25) { return typeof e23 == "function" ? e23.call(null, t25) : e23; } function T3(e23 = "") { if (e23) return !w5.test(e23.trim().toLowerCase()); } function C2(e23) { return !!e23 && h6.test(e23); } function M5(e23, t25) { if (!C2(t25) || !e23) return null; const r24 = t25.replace(h6, "").toLowerCase(); let n34; return e23.some((e24) => e24.name.toLowerCase() === r24 && (n34 = e24, true)), n34; } function q2(e23, t25) { const r24 = M5(t25, e23?.fieldName); return r24 ? r24.title || null : e23 ? e23.label || e23.fieldName : null; } function R3(e23, t25) { const r24 = t25.get(e23.toLowerCase()); return `{${r24 && r24.fieldName || e23}}`; } function v6(e23) { return e23.replace(m11, ""); } function D(e23, t25) { const r24 = L6(t25, e23); return r24 ? r24.name : e23; } function A3(e23, t25) { return e23 && e23.map((e24) => D(e24, t25)); } function L6(e23, t25) { return e23 && typeof e23.getField == "function" ? e23.getField(t25) : null; } function U3(e23) { return `${e23}`.trim(); } function $({ attributes: e23, globalAttributes: t25, layer: r24, text: n34, expressionAttributes: i32, fieldInfoMap: o30 }) { return n34 ? S4({ formattedAttributes: t25, template: _3(n34, { ...t25, ...i32, ...e23 }, r24), fieldInfoMap: o30 }) : ""; } function S4({ formattedAttributes: e23, template: t25, fieldInfoMap: r24 }) { return U3(v6(r2(r2(t25, (e24) => R3(e24, r24)), e23))); } function G(e23, t25, r24 = false) { const n34 = t25[e23]; if (typeof n34 == "string") { const i32 = "%27", o30 = (r24 ? encodeURIComponent(n34) : n34).replace(g5, i32); t25[e23] = o30; } } function k3(e23, t25 = false) { const r24 = { ...e23 }; return Object.keys(r24).forEach((e24) => G(e24, r24, t25)), r24; } function O3(e23, t25, r24) { const i32 = (t25 = U3(t25)) && t25[0] !== "{"; return r2(e23, k3(r24, i32)); } function P(e23, t25) { return e23.replace(y3, (e24, r24, n34) => { const i32 = L6(t25, n34); return i32 ? `{${i32.name}}` : r24; }); } function _3(e23, t25, r24) { const n34 = P(e23, r24); return n34 ? n34.replace(F, (e24, r25, n35) => O3(e24, r25 || n35, t25)) : n34; } function z2(e23, t25) { if (typeof e23 == "string" && t25 && t25.dateFormat == null && (t25.places != null || t25.digitSeparator != null)) { const t26 = Number(e23); if (!isNaN(t26)) return t26; } return e23; } function H2(e23) { return e23?.type === "feature"; } function Q2(e23) { return !!e23?.layer; } function Z2(e23) { return e23?.type === "map-image"; } function V(e23, t25) { const r24 = t25.fieldInfos, n34 = t25.fieldName, i32 = B2(r24, n34)?.clone(), o30 = t25.preventPlacesFormatting, s30 = t25.layer, c42 = L6(s30, n34); if (i32 && c42?.type === "date") { const e24 = i32.format || new u4(); e24.dateFormat = e24.dateFormat || "short-date-short-time", e24.dateTimeFormatOptions = !Q2(s30) && H2(s30) && s30.datesInUnknownTimezone || Q2(s30) && Z2(s30.layer) && s30.layer.datesInUnknownTimezone ? { timeZone: "UTC" } : null, i32.format = e24; } const d20 = i32 && i32.format; return typeof e23 == "string" && ye(n34) && d20 ? d20.formatRasterPixelValue(e23) : typeof (e23 = z2(e23, d20)) == "string" || e23 == null || d20 == null ? te(e23) : o30 ? m2(e23, { ...u2(d20), minimumFractionDigits: 0, maximumFractionDigits: 20 }) : d20.format(e23); } function B2(e23, t25) { if (!e23 || !e23.length || !t25) return; const r24 = t25.toLowerCase(); let n34; return e23.some((e24) => !(!e24.fieldName || e24.fieldName.toLowerCase() !== r24) && (n34 = e24, true)), n34; } function J2({ fieldName: e23, graphic: t25, layer: r24 }) { if (ue(e23)) return null; if (!r24 || typeof r24.getFeatureType != "function") return null; const { typeIdField: n34 } = r24; if (!n34 || e23 !== n34) return null; const i32 = r24.getFeatureType(t25); return i32 ? i32.name : null; } function K3({ fieldName: e23, value: t25, graphic: r24, layer: n34 }) { if (ue(e23)) return null; if (!n34 || typeof n34.getFieldDomain != "function") return null; const i32 = n34.getFieldDomain(e23, { feature: r24 }); return i32 && i32.type === "coded-value" ? i32.getName(t25) : null; } function W(e23, t25) { const { creatorField: r24, creationDateField: n34, editorField: o30, editDateField: a34 } = e23; if (!t25) return; const u23 = t25[a34]; if (typeof u23 == "number") { const e24 = t25[o30]; return { type: "edit", date: L2(u23, E3), user: e24 }; } const l27 = t25[n34]; if (typeof l27 == "number") { const e24 = t25[r24]; return { type: "create", date: L2(l27, E3), user: e24 }; } return null; } function X(e23, t25) { const r24 = new Map(); return e23 && e23.forEach((e24) => { const n34 = D(e24.fieldName, t25); e24.fieldName = n34, r24.set(n34.toLowerCase(), e24); }), r24; } function Y3(e23) { const t25 = []; if (!e23) return t25; const { fieldInfos: r24, content: n34 } = e23; return r24 && t25.push(...r24), n34 && Array.isArray(n34) ? (n34.forEach((e24) => { if (e24.type === "fields") { const r25 = e24 && e24.fieldInfos; r25 && t25.push(...r25); } }), t25) : t25; } function ee(e23) { return e23.replace(b4, (e24) => `&#${e24.charCodeAt(0)};`); } function te(e23) { return typeof e23 == "string" ? e23.replace(I2, '
') : e23; } function re(e23) { const { value: t25, fieldName: r24, fieldInfos: n34, fieldInfoMap: o30, layer: a34, graphic: u23 } = e23; if (t25 == null) return ""; const l27 = K3({ fieldName: r24, value: t25, graphic: u23, layer: a34 }); if (l27) return l27; const s30 = J2({ fieldName: r24, graphic: u23, layer: a34 }); if (s30) return s30; if (o30.get(r24.toLowerCase())) return V(t25, { fieldInfos: n34 || Array.from(o30.values()), fieldName: r24, layer: a34 }); const f14 = a34 && a34.fieldsIndex; return f14 && f14.isDateField(r24) ? L2(t25, E3) : te(t25); } function ne({ fieldInfos: e23, attributes: t25, layer: r24, graphic: n34, fieldInfoMap: i32, relatedInfos: o30 }) { const a34 = {}; return o30?.forEach((t26) => fe({ attributes: a34, relatedInfo: t26, fieldInfoMap: i32, fieldInfos: e23, layer: r24 })), Object.keys(t25).forEach((o31) => { const u23 = t25[o31]; a34[o31] = re({ fieldName: o31, fieldInfos: e23, fieldInfoMap: i32, layer: r24, value: u23, graphic: n34 }); }), a34; } async function ie(e23, t25) { const { layer: r24, graphic: n34, outFields: i32, objectIds: o30, returnGeometry: a34, spatialReference: u23 } = e23, l27 = o30[0]; if (typeof l27 != "number" && typeof l27 != "string") { const e24 = "Could not query required fields for the specified feature. The feature's ID is invalid.", t26 = { layer: r24, graphic: n34, objectId: l27, requiredFields: i32 }; return p5.warn(e24, t26), null; } if (!r24.capabilities?.operations?.supportsQuery) { const e24 = "The specified layer cannot be queried. The following fields will not be available.", t26 = { layer: r24, graphic: n34, requiredFields: i32, returnGeometry: a34 }; return p5.warn(e24, t26), null; } const s30 = r24.createQuery(); s30.objectIds = o30, s30.outFields = i32?.length ? i32 : [r24.objectIdField], s30.returnGeometry = !!a34, s30.returnZ = !!a34, s30.returnM = !!a34, s30.outSpatialReference = u23; return (await r24.queryFeatures(s30, t25)).features[0]; } async function oe(e23) { if (!e23.expressionInfos?.length) return false; const t25 = await a10(), { arcadeUtils: { hasGeometryFunctions: r24 } } = t25; return r24(e23); } async function ae({ graphic: e23, popupTemplate: t25, layer: r24, spatialReference: n34 }, i32) { if (!r24 || !t25) return; if (typeof r24.load == "function" && await r24.load(i32), !e23.attributes) return; const o30 = e23.attributes[r24.objectIdField]; if (o30 == null) return; const a34 = [o30], u23 = await t25.getRequiredFields(r24.fieldsIndex), l27 = de(u23, e23), f14 = l27 ? [] : u23, c42 = t25.returnGeometry || await oe(t25); if (l27 && !c42) return; const d20 = await ie({ layer: r24, graphic: e23, outFields: f14, objectIds: a34, returnGeometry: c42, spatialReference: n34 }, i32); d20 && (d20.geometry && (e23.geometry = d20.geometry), d20.attributes && (e23.attributes = { ...e23.attributes, ...d20.attributes })); } function ue(e23 = "") { return !!e23 && e23.includes(N3); } function le(e23) { return e23 ? `${N3}${e23.layerId}/${e23.fieldName}` : ""; } function se({ attributes: e23, graphic: t25, relatedInfo: r24, fieldInfos: n34, fieldInfoMap: i32, layer: o30 }) { e23 && t25 && r24 && Object.keys(t25.attributes).forEach((a34) => { const u23 = le({ layerId: r24.relation.id.toString(), fieldName: a34 }), l27 = t25.attributes[a34]; e23[u23] = re({ fieldName: u23, fieldInfos: n34, fieldInfoMap: i32, layer: o30, value: l27, graphic: t25 }); }); } function fe({ attributes: e23, relatedInfo: t25, fieldInfoMap: r24, fieldInfos: n34, layer: i32 }) { e23 && t25 && (t25.relatedFeatures && t25.relatedFeatures && t25.relatedFeatures.forEach((o30) => se({ attributes: e23, graphic: o30, relatedInfo: t25, fieldInfoMap: r24, fieldInfos: n34, layer: i32 })), t25.relatedStatsFeatures && t25.relatedStatsFeatures && t25.relatedStatsFeatures.forEach((o30) => se({ attributes: e23, graphic: o30, relatedInfo: t25, fieldInfoMap: r24, fieldInfos: n34, layer: i32 }))); } var ce = (e23) => { if (!e23) return false; const t25 = e23.toUpperCase(); return t25.includes("CURRENT_TIMESTAMP") || t25.includes("CURRENT_DATE") || t25.includes("CURRENT_TIME"); }; var de2 = ({ layer: e23, method: t25, query: n34, definitionExpression: i32 }) => { if (!e23.capabilities?.query?.supportsCacheHint || t25 === "attachments") return; const o30 = r(n34.where) && n34.where, a34 = r(n34.geometry) && n34.geometry; ce(i32) || ce(o30) || a34?.type === "extent" || n34.resultType === "tile" || (n34.cacheHint = true); }; var pe = ({ query: e23, layer: t25, method: r24 }) => { de2({ layer: t25, method: r24, query: e23, definitionExpression: `${t25.definitionExpression} ${t25.serviceDefinitionExpression}` }); }; var me = ({ queryPayload: e23, layer: t25, method: r24 }) => { de2({ layer: t25, method: r24, query: e23, definitionExpression: `${t25.definitionExpression} ${t25.serviceDefinitionExpression}` }); }; // node_modules/@arcgis/core/widgets/Attachments/AttachmentsViewModel.js var u6 = { editing: false, operations: { add: true, update: true, delete: true } }; var y4 = j3.ofType(l6); var A4 = "graphic.layer.capabilities.operations.supportsResizeAttachments"; var f5 = class extends y { constructor(t25) { super(t25), this._getAttachmentsPromise = null, this._attachmentLayer = null, this.abilities = { ...u6 }, this.activeAttachmentInfo = null, this.attachmentInfos = new y4(), this.graphic = null, this.mode = "view", this.own(l4(() => this.graphic, () => this._graphicChanged(), h2)); } destroy() { this._attachmentLayer = null, this.graphic = null; } castAbilities(t25) { return { ...u6, ...t25 }; } get state() { return this._getAttachmentsPromise ? "loading" : this.graphic ? "ready" : "disabled"; } get supportsResizeAttachments() { return this.get(A4) || false; } async getAttachments() { const { _attachmentLayer: t25, attachmentInfos: e23 } = this; if (!t25 || typeof t25.queryAttachments != "function") throw new s2("invalid-layer", "getAttachments(): A valid layer is required."); const a34 = this._getFeatureId(), i32 = new c4({ objectIds: [a34], returnMetadata: true }), n34 = [], s30 = t25.queryAttachments(i32).then((t26) => t26[a34] || n34).catch(() => n34); this._getAttachmentsPromise = s30, this.notifyChange("state"); const o30 = await s30; return e23.removeAll(), o30.length && e23.addMany(o30), this._getAttachmentsPromise = null, this.notifyChange("state"), o30; } async addAttachment(t25) { const { _attachmentLayer: e23, attachmentInfos: a34, graphic: i32, abilities: n34 } = this; if (!t25) throw new s2("invalid-attachment", "addAttachment(): An attachment is required.", { attachment: t25 }); if (!n34.operations.add) throw new s2("invalid-abilities", "addAttachment(): add abilities are required."); if (!e23 || typeof e23.addAttachment != "function") throw new s2("invalid-layer", "addAttachment(): A valid layer is required."); const s30 = e23.addAttachment(i32, t25).then((t26) => this._queryAttachment(t26.objectId)), o30 = await s30; return a34.add(o30), o30; } async deleteAttachment(t25) { const { _attachmentLayer: e23, attachmentInfos: a34, graphic: i32, abilities: n34 } = this; if (!t25) throw new s2("invalid-attachment-info", "deleteAttachment(): An attachmentInfo is required.", { attachmentInfo: t25 }); if (!n34.operations.delete) throw new s2("invalid-abilities", "deleteAttachment(): delete abilities are required."); if (!e23 || typeof e23.deleteAttachments != "function") throw new s2("invalid-layer", "deleteAttachment(): A valid layer is required."); const s30 = e23.deleteAttachments(i32, [t25.id]).then(() => t25), o30 = await s30; return a34.remove(o30), o30; } async updateAttachment(t25, e23 = this.activeAttachmentInfo) { const { _attachmentLayer: a34, attachmentInfos: i32, graphic: n34, abilities: s30 } = this; if (!t25) throw new s2("invalid-attachment", "updateAttachment(): An attachment is required.", { attachment: t25 }); if (!e23) throw new s2("invalid-attachment-info", "updateAttachment(): An attachmentInfo is required.", { attachmentInfo: e23 }); if (!s30.operations.update) throw new s2("invalid-abilities", "updateAttachment(): Update abilities are required."); const o30 = i32.findIndex((t26) => t26 === e23); if (!a34 || typeof a34.updateAttachment != "function") throw new s2("invalid-layer", "updateAttachment(): A valid layer is required."); const c42 = a34.updateAttachment(n34, e23.id, t25).then((t26) => this._queryAttachment(t26.objectId)), h19 = await c42; return i32.splice(o30, 1, h19), h19; } async _queryAttachment(t25) { if (!t25) throw new s2("invalid-attachment-id", "Could not query attachment."); const { _attachmentLayer: e23 } = this, a34 = this._getFeatureId(), i32 = new c4({ objectIds: [a34], attachmentsWhere: `AttachmentId=${t25}`, returnMetadata: true }); return e23.queryAttachments(i32).then((t26) => t26[a34][0]); } _getFeatureId() { const { _attachmentLayer: t25, graphic: e23 } = this; if (!t25 || !e23) return null; const { objectIdField: a34 } = t25, { attributes: i32 } = e23; return i32 && i32[a34]; } _graphicChanged() { this.graphic && (this._setAttachmentLayer(), this.getAttachments().catch(() => { })); } _setAttachmentLayer() { const { graphic: t25 } = this, e23 = j6(t25); this._attachmentLayer = e23 ? e23.type === "scene" && r(e23.associatedLayer) ? e23.associatedLayer : e23 : null; } }; e([d()], f5.prototype, "abilities", void 0), e([s3("abilities")], f5.prototype, "castAbilities", null), e([d()], f5.prototype, "activeAttachmentInfo", void 0), e([d({ readOnly: true, type: y4 })], f5.prototype, "attachmentInfos", void 0), e([d({ type: g2 })], f5.prototype, "graphic", void 0), e([d()], f5.prototype, "mode", void 0), e([d({ readOnly: true })], f5.prototype, "state", null), e([d({ readOnly: true })], f5.prototype, "supportsResizeAttachments", null), f5 = e([n3("esri.widgets.Attachments.AttachmentsViewModel")], f5); var g6 = f5; // node_modules/@arcgis/core/widgets/Attachments/support/attachmentUtils.js function e11(i32) { const e23 = i32.toLowerCase(); return e23 === "image/bmp" || e23 === "image/emf" || e23 === "image/exif" || e23 === "image/gif" || e23 === "image/x-icon" || e23 === "image/jpeg" || e23 === "image/png" || e23 === "image/tiff" || e23 === "image/x-wmf"; } function p6(e23) { const p36 = a4("esri/themes/base/images/files/"); return e23 ? e23 === "text/plain" ? `${p36}text-32.svg` : e23 === "application/pdf" ? `${p36}pdf-32.svg` : e23 === "text/csv" ? `${p36}csv-32.svg` : e23 === "application/gpx+xml" ? `${p36}gpx-32.svg` : e23 === "application/x-dwf" ? `${p36}cad-32.svg` : e23 === "application/postscript" || e23 === "application/json" || e23 === "text/xml" || e23 === "model/vrml" ? `${p36}code-32.svg` : e23 === "application/x-zip-compressed" || e23 === "application/x-7z-compressed" || e23 === "application/x-gzip" || e23 === "application/x-tar" || e23 === "application/x-gtar" || e23 === "application/x-bzip2" || e23 === "application/gzip" || e23 === "application/x-compress" || e23 === "application/x-apple-diskimage" || e23 === "application/x-rar-compressed" || e23 === "application/zip" ? `${p36}zip-32.svg` : e23.includes("image/") ? `${p36}image-32.svg` : e23.includes("audio/") ? `${p36}sound-32.svg` : e23.includes("video/") ? `${p36}video-32.svg` : e23.includes("msexcel") || e23.includes("ms-excel") || e23.includes("spreadsheetml") ? `${p36}excel-32.svg` : e23.includes("msword") || e23.includes("ms-word") || e23.includes("wordprocessingml") ? `${p36}word-32.svg` : e23.includes("powerpoint") || e23.includes("presentationml") ? `${p36}report-32.svg` : `${p36}generic-32.svg` : `${p36}generic-32.svg`; } // node_modules/@arcgis/core/widgets/Attachments.js var v7 = { addButton: true, addSubmitButton: true, cancelAddButton: true, cancelUpdateButton: true, deleteButton: true, errorMessage: true, progressBar: true, updateButton: true }; var y5 = { base: "esri-attachments", loaderContainer: "esri-attachments__loader-container", loader: "esri-attachments__loader", fadeIn: "esri-attachments--fade-in", container: "esri-attachments__container", containerList: "esri-attachments__container--list", containerPreview: "esri-attachments__container--preview", actions: "esri-attachments__actions", deleteButton: "esri-attachments__delete-button", addAttachmentButton: "esri-attachments__add-attachment-button", errorMessage: "esri-attachments__error-message", items: "esri-attachments__items", item: "esri-attachments__item", itemButton: "esri-attachments__item-button", itemMask: "esri-attachments__item-mask", itemMaskIcon: "esri-attachments__item-mask--icon", itemImage: "esri-attachments__image", itemImageResizable: "esri-attachments__image--resizable", itemLabel: "esri-attachments__label", itemFilename: "esri-attachments__filename", itemChevronIcon: "esri-attachments__item-chevron-icon", itemLink: "esri-attachments__item-link", itemLinkOverlay: "esri-attachments__item-link-overlay", itemLinkOverlayIcon: "esri-attachments__item-link-overlay-icon", itemEditIcon: "esri-attachments__item-edit-icon", itemAddIcon: "esri-attachments__item-add-icon", itemAddButton: "esri-attachments__item-add-button", formNode: "esri-attachments__form-node", fileFieldset: "esri-attachments__file-fieldset", fileLabel: "esri-attachments__file-label", fileName: "esri-attachments__file-name", fileInput: "esri-attachments__file-input", metadata: "esri-attachments__metadata", metadataFieldset: "esri-attachments__metadata-fieldset", progressBar: "esri-attachments__progress-bar", esriWidget: "esri-widget", esriButton: "esri-button", buttonDisabled: "esri-button--disabled", esriButtonSecondary: "esri-button--secondary", esriButtonTertiary: "esri-button--tertiary", esriButtonThird: "esri-button--third", esriButtonSmall: "esri-button--small", esriButtonHalf: "esri-button--half", empty: "esri-widget__content--empty", iconExternalLink: "esri-icon-link-external", iconEdit: "esri-icon-edit", iconRight: "esri-icon-right", iconLeft: "esri-icon-left", iconPlus: "esri-icon-plus" }; var B3 = window.CSS; var A5 = class extends O2 { constructor(t25, e23) { super(t25, e23), this.abilities = null, this.displayType = "auto", this.graphic = null, this.label = void 0, this.messages = null, this.messagesUnits = null, this.selectedFile = null, this.submitting = false, this.viewModel = new g6(), this.visibleElements = { ...v7 }, this._supportsImageOrientation = B3 && B3.supports && B3.supports("image-orientation", "from-image"), this._addAttachmentForm = null, this._updateAttachmentForm = null; } initialize() { this.own([a3(() => this.viewModel?.attachmentInfos, "change", () => this.scheduleRender()), l4(() => this.viewModel?.mode, () => this._modeChanged(), h2)]); } get effectiveDisplayType() { const { displayType: t25 } = this; return t25 && t25 !== "auto" ? t25 : this.viewModel.supportsResizeAttachments ? "preview" : "list"; } castVisibleElements(t25) { return { ...v7, ...t25 }; } addAttachment() { const { _addAttachmentForm: t25, viewModel: s30 } = this; return this._set("submitting", true), this._set("error", null), s30.addAttachment(t25).then((t26) => (this._set("submitting", false), this._set("error", null), s30.mode = "view", t26)).catch((t26) => { throw this._set("submitting", false), this._set("error", new s2("attachments:add-attachment", this.messages.addErrorMessage, t26)), t26; }); } deleteAttachment(t25) { const { viewModel: s30 } = this; return this._set("submitting", true), this._set("error", null), s30.deleteAttachment(t25).then((t26) => (this._set("submitting", false), this._set("error", null), s30.mode = "view", t26)).catch((t26) => { throw this._set("submitting", false), this._set("error", new s2("attachments:delete-attachment", this.messages.deleteErrorMessage, t26)), t26; }); } updateAttachment() { const { viewModel: t25 } = this, { _updateAttachmentForm: s30 } = this; return this._set("submitting", true), this._set("error", null), t25.updateAttachment(s30).then((e23) => (this._set("submitting", false), this._set("error", null), t25.mode = "view", e23)).catch((t26) => { throw this._set("submitting", false), this._set("error", new s2("attachments:update-attachment", this.messages.updateErrorMessage, t26)), t26; }); } render() { const { submitting: t25, viewModel: e23 } = this, { state: s30 } = e23; return n6("div", { class: this.classes(y5.base, y5.esriWidget) }, t25 ? this.renderProgressBar() : null, s30 === "loading" ? this.renderLoading() : this.renderAttachments(), this.renderErrorMessage()); } renderErrorMessage() { const { error: t25, visibleElements: e23 } = this; return t25 && e23.errorMessage ? n6("div", { key: "error-message", class: y5.errorMessage }, t25.message) : null; } renderAttachments() { const { mode: t25, activeAttachmentInfo: e23 } = this.viewModel; return t25 === "add" ? this.renderAddForm() : t25 === "edit" ? this.renderDetailsForm(e23) : this.renderAttachmentContainer(); } renderLoading() { return n6("div", { class: y5.loaderContainer, key: "loader" }, n6("div", { class: y5.loader })); } renderProgressBar() { return this.visibleElements.progressBar ? n6("div", { class: y5.progressBar, key: "progress-bar" }) : null; } renderAddForm() { const { submitting: t25, selectedFile: e23 } = this, s30 = t25 || !e23, i32 = this.visibleElements.cancelAddButton ? n6("button", { type: "button", bind: this, disabled: t25, onclick: this._cancelForm, class: this.classes(y5.esriButton, y5.esriButtonTertiary, y5.esriButtonSmall, y5.esriButtonHalf, t25 && y5.buttonDisabled) }, this.messages.cancel) : null, a34 = this.visibleElements.addSubmitButton ? n6("button", { type: "submit", disabled: s30, class: this.classes(y5.esriButton, y5.esriButtonSecondary, y5.esriButtonSmall, y5.esriButtonHalf, { [y5.buttonDisabled]: s30 }) }, this.messages.add) : null, n34 = e23 ? n6("span", { key: "file-name", class: y5.fileName }, e23.name) : null, r24 = n6("form", { bind: this, afterCreate: v4, afterRemoved: h3, "data-node-ref": "_addAttachmentForm", onsubmit: this._submitAddAttachment }, n6("fieldset", { class: y5.fileFieldset }, n34, n6("label", { class: this.classes(y5.fileLabel, y5.esriButton, y5.esriButtonSecondary) }, e23 ? this.messages.changeFile : this.messages.selectFile, n6("input", { class: y5.fileInput, type: "file", name: "attachment", bind: this, onchange: this._handleFileInputChange }))), a34, i32); return n6("div", { key: "add-form-container", class: y5.formNode }, r24); } renderDetailsForm(t25) { const { visibleElements: e23, viewModel: s30, selectedFile: i32, submitting: a34 } = this, { contentType: r24, size: o30, url: l27 } = t25, { abilities: m29 } = s30, d20 = a34 || !i32, c42 = m29.editing && m29.operations.delete && e23.deleteButton ? n6("button", { key: "delete-button", type: "button", disabled: a34, bind: this, onclick: (e24) => this._submitDeleteAttachment(e24, t25), class: this.classes(y5.esriButton, y5.esriButtonSmall, y5.esriButtonTertiary, y5.deleteButton, { [y5.buttonDisabled]: a34 }) }, this.messages.delete) : null, h19 = m29.editing && m29.operations.update && e23.updateButton ? n6("button", { disabled: d20, key: "update-button", type: "submit", class: this.classes(y5.esriButton, y5.esriButtonSmall, y5.esriButtonThird, { [y5.buttonDisabled]: d20 }) }, this.messages.update) : null, u23 = this.visibleElements.cancelUpdateButton ? n6("button", { disabled: a34, key: "cancel-button", type: "button", bind: this, onclick: this._cancelForm, class: this.classes(y5.esriButton, y5.esriButtonSmall, y5.esriButtonTertiary, y5.esriButtonThird, { [y5.buttonDisabled]: a34 }) }, this.messages.cancel) : null, _9 = i32 ? n6("span", { key: "file-name", class: y5.fileName }, i32.name) : null, g20 = m29.editing && m29.operations.update ? n6("fieldset", { key: "file", class: y5.fileFieldset }, _9, n6("label", { class: this.classes(y5.fileLabel, y5.esriButton, y5.esriButtonSecondary) }, this.messages.changeFile, n6("input", { class: y5.fileInput, type: "file", name: "attachment", bind: this, onchange: this._handleFileInputChange }))) : null, v15 = n6("fieldset", { key: "size", class: y5.metadataFieldset }, n6("label", null, L5(this.messagesUnits, o30))), B7 = n6("fieldset", { key: "content-type", class: y5.metadataFieldset }, n6("label", null, r24)), A7 = n6("form", { bind: this, afterCreate: v4, afterRemoved: h3, "data-node-ref": "_updateAttachmentForm", onsubmit: this._submitUpdateAttachment }, n6("div", { class: y5.metadata }, v15, B7), g20, n6("div", { class: y5.actions }, c42, u23, h19)); return n6("div", { key: "edit-form-container", class: y5.formNode }, n6("a", { class: y5.itemLink, href: l27, rel: "noreferrer", target: "_blank" }, this.renderImageMask({ attachmentInfo: t25, size: 400 }), n6("div", { class: y5.itemLinkOverlay }, n6("span", { class: y5.itemLinkOverlayIcon }, n6("svg", { xmlns: "http://www.w3.org/2000/svg", width: "32", height: "32", viewBox: "0 0 32 32" }, n6("path", { d: "M28 13h1v16H3V3h16v1H4v24h24zm-5-9h4.293L15.646 15.638l.707.707L28 4.707V9h1V3h-6z" }), n6("path", { fill: "none", d: "M0 0h32v32H0z" }))))), A7); } renderImageMask({ attachmentInfo: t25, size: e23 }) { const { supportsResizeAttachments: s30 } = this.viewModel, { contentType: i32, name: a34, url: n34 } = t25, r24 = s30 && e11(i32), o30 = this._getCSSTransform(t25, r24), l27 = o30 ? { transform: o30, "image-orientation": "none" } : {}, m29 = n34.includes("?") ? "&" : "?", d20 = r24 ? `${n34}${m29}w=${e23}` : p6(i32), c42 = { [y5.itemMaskIcon]: !r24 }, p36 = { [y5.itemImageResizable]: s30 }; return n6("div", { class: this.classes(c42, y5.itemMask) }, n6("img", { styles: l27, alt: a34, src: d20, class: this.classes(p36, y5.itemImage) })); } renderAttachmentInfo({ attachmentInfo: t25, displayType: e23 }) { const { viewModel: s30 } = this, { abilities: i32 } = s30, { name: a34, url: n34 } = t25, r24 = this.renderImageMask({ attachmentInfo: t25, size: e23 === "list" ? 48 : 400 }), o30 = i32.editing ? n6("span", { "aria-hidden": "true", class: this.classes(y5.itemChevronIcon, f3(this.container) ? y5.iconLeft : y5.iconRight) }) : null, l27 = [r24, n6("label", { class: y5.itemLabel }, n6("span", { class: y5.itemFilename }, a34 || this.messages.noTitle), o30)], m29 = i32.editing ? n6("button", { key: "details-button", bind: this, class: y5.itemButton, title: this.messages.attachmentDetails, "aria-label": this.messages.attachmentDetails, "data-attachment-info-id": t25.id, onclick: () => this._startEditAttachment(t25), type: "button" }, l27) : n6("a", { key: "details-link", class: y5.itemButton, href: n34, target: "_blank" }, l27); return n6("li", { class: y5.item, key: t25 }, m29); } renderAttachmentContainer() { const { effectiveDisplayType: t25, viewModel: e23, visibleElements: s30 } = this, { attachmentInfos: i32, abilities: a34 } = e23, n34 = i32 && i32.length, r24 = { [y5.containerList]: t25 !== "preview", [y5.containerPreview]: t25 === "preview" }, o30 = a34.editing && a34.operations.add && s30.addButton ? n6("button", { bind: this, onclick: () => this._startAddAttachment(), class: this.classes(y5.esriButton, y5.esriButtonTertiary, y5.addAttachmentButton), type: "button" }, n6("span", { "aria-hidden": "true", class: this.classes(y5.itemAddIcon, y5.iconPlus) }), this.messages.add) : null, l27 = n34 ? n6("ul", { class: y5.items }, i32.toArray().map((e24) => this.renderAttachmentInfo({ attachmentInfo: e24, displayType: t25 }))) : n6("div", { class: y5.empty }, this.messages.noAttachments); return n6("div", { key: "attachments-container", class: this.classes(y5.container, r24) }, l27, o30); } _modeChanged() { this._set("error", null), this._set("selectedFile", null); } _handleFileInputChange(t25) { const e23 = t25.target, s30 = e23 && e23.files && e23.files.item(0); this._set("selectedFile", s30); } _submitDeleteAttachment(t25, e23) { t25.preventDefault(), this.deleteAttachment(e23); } _submitAddAttachment(t25) { t25.preventDefault(), this.addAttachment(); } _submitUpdateAttachment(t25) { t25.preventDefault(), this.updateAttachment(); } _startEditAttachment(t25) { const { viewModel: e23 } = this; e23.activeAttachmentInfo = t25, e23.mode = "edit"; } _startAddAttachment() { this.viewModel.mode = "add"; } _cancelForm(t25) { t25.preventDefault(), this.viewModel.mode = "view"; } _getCSSTransform(t25, e23) { const { orientationInfo: s30 } = t25; return !this._supportsImageOrientation && e23 && s30 ? [s30.rotation ? `rotate(${s30.rotation}deg)` : "", s30.mirrored ? "scaleX(-1)" : ""].join(" ") : ""; } }; e([o9("viewModel.abilities")], A5.prototype, "abilities", void 0), e([d()], A5.prototype, "displayType", void 0), e([d({ readOnly: true })], A5.prototype, "effectiveDisplayType", null), e([o9("viewModel.graphic")], A5.prototype, "graphic", void 0), e([d({ aliasOf: { source: "messages.widgetLabel", overridable: true } })], A5.prototype, "label", void 0), e([d(), e4("esri/widgets/Attachments/t9n/Attachments")], A5.prototype, "messages", void 0), e([d(), e4("esri/core/t9n/Units")], A5.prototype, "messagesUnits", void 0), e([d({ readOnly: true })], A5.prototype, "selectedFile", void 0), e([d({ readOnly: true })], A5.prototype, "submitting", void 0), e([d({ readOnly: true })], A5.prototype, "error", void 0), e([d({ type: g6 })], A5.prototype, "viewModel", void 0), e([d()], A5.prototype, "visibleElements", void 0), e([s3("visibleElements")], A5.prototype, "castVisibleElements", null), A5 = e([n3("esri.widgets.Attachments")], A5); var w6 = A5; // node_modules/@arcgis/core/widgets/Feature/FeatureAttachments/FeatureAttachmentsViewModel.js var o11 = class extends g6 { constructor(t25) { super(t25), this.description = null, this.title = null; } }; e([d()], o11.prototype, "description", void 0), e([d()], o11.prototype, "title", void 0), o11 = e([n3("esri.widgets.Feature.FeatureAttachments.FeatureAttachmentsViewModel")], o11); var c14 = o11; // node_modules/@arcgis/core/widgets/support/Heading.js var i9 = { heading: "esri-widget__heading" }; function n12(e23, n34) { const l27 = o12(e23.level), s30 = `h${l27}`; return delete e23.level, n6(s30, { ...e23, class: p2(i9.heading, e23.class), role: "heading", "aria-level": String(l27) }, n34); } function o12(t25) { return o5(Math.ceil(t25), 1, 6); } // node_modules/@arcgis/core/widgets/Feature/support/FeatureElementInfo.js var p7 = { base: "esri-feature-element-info", title: "esri-feature-element-info__title", description: "esri-feature-element-info__description" }; var n13 = class extends O2 { constructor(e23, t25) { super(e23, t25), this.description = null, this.headingLevel = 2, this.title = null; } render() { return n6("div", { class: p7.base }, this.renderTitle(), this.renderDescription()); } renderTitle() { const { title: e23 } = this; return e23 ? n6(n12, { level: this.headingLevel, class: p7.title }, e23) : null; } renderDescription() { const { description: e23 } = this; return e23 ? n6("div", { key: "description", class: p7.description }, e23) : null; } }; e([d()], n13.prototype, "description", void 0), e([d()], n13.prototype, "headingLevel", void 0), e([d()], n13.prototype, "title", void 0), n13 = e([n3("esri.widgets.Feature.support.FeatureElementInfo")], n13); var c15 = n13; // node_modules/@arcgis/core/widgets/Feature/FeatureAttachments.js var d5 = { base: "esri-feature-attachments" }; var h7 = class extends O2 { constructor(e23, t25) { super(e23, t25), this._featureElementInfo = null, this.attachmentsWidget = new w6(), this.description = null, this.displayType = null, this.graphic = null, this.headingLevel = 2, this.title = null, this.viewModel = new c14(); } initialize() { this._featureElementInfo = new c15(), this.own([l4(() => [this.viewModel?.description, this.viewModel?.title, this.headingLevel], () => this._setupFeatureElementInfo(), h2), l4(() => this.viewModel?.graphic, (e23) => this.attachmentsWidget.graphic = e23, h2)]); } destroy() { this.attachmentsWidget.destroy(), this._featureElementInfo.destroy(); } render() { const { attachmentsWidget: e23 } = this; return n6("div", { class: d5.base }, this._featureElementInfo?.render(), e23?.render()); } _setupFeatureElementInfo() { const { description: e23, title: t25, headingLevel: s30 } = this; this._featureElementInfo.set({ description: e23, title: t25, headingLevel: s30 }); } }; e([d({ readOnly: true })], h7.prototype, "attachmentsWidget", void 0), e([o9("viewModel.description")], h7.prototype, "description", void 0), e([o9("attachmentsWidget.displayType")], h7.prototype, "displayType", void 0), e([o9("viewModel.graphic")], h7.prototype, "graphic", void 0), e([d()], h7.prototype, "headingLevel", void 0), e([o9("viewModel.title")], h7.prototype, "title", void 0), e([d({ type: c14 })], h7.prototype, "viewModel", void 0), h7 = e([n3("esri.widgets.Feature.FeatureAttachments")], h7); var m12 = h7; // node_modules/@arcgis/core/widgets/Feature/FeatureContent/FeatureContentViewModel.js var p8 = class extends a6(y) { constructor(t25) { super(t25), this._loadingPromise = null, this.created = null, this.creator = null, this.destroyer = null, this.graphic = null, this.handles.add(l4(() => this.creator, (t26) => { this._destroyContent(), this._createContent(t26); }, h2)); } destroy() { this._destroyContent(); } get state() { return this._loadingPromise ? "loading" : "ready"; } _destroyContent() { const { created: t25, graphic: e23, destroyer: r24 } = this; t25 && (x2(r24, { graphic: e23 }).catch(() => null), this._set("created", null)); } async _createContent(t25) { const { graphic: e23 } = this, r24 = x2(t25, { graphic: e23 }).catch(() => null); this._loadingPromise = r24, this.notifyChange("state"); const o30 = await r24; r24 === this._loadingPromise && (this._loadingPromise = null, this.notifyChange("state"), this._set("created", o30)); } }; e([d({ readOnly: true })], p8.prototype, "created", void 0), e([d()], p8.prototype, "creator", void 0), e([d()], p8.prototype, "destroyer", void 0), e([d({ type: g2 })], p8.prototype, "graphic", void 0), e([d({ readOnly: true })], p8.prototype, "state", null), p8 = e([n3("esri.widgets.Feature.FeatureContent.FeatureContentViewModel")], p8); var l11 = p8; // node_modules/@arcgis/core/widgets/Feature/FeatureContent.js var c16 = { base: "esri-feature-content", loaderContainer: "esri-feature-content__loader-container", loader: "esri-feature-content__loader" }; var p9 = class extends O2 { constructor(e23, r24) { super(e23, r24), this.creator = null, this.graphic = null, this.viewModel = null, this._addTargetToAnchors = (e24) => { Array.from(e24.querySelectorAll("a")).forEach((e25) => { T3(e25.href) && !e25.hasAttribute("target") && e25.setAttribute("target", "_blank"); }); }; } renderLoading() { return n6("div", { class: c16.loaderContainer, key: "loader" }, n6("div", { class: c16.loader })); } renderCreated() { const e23 = this.viewModel?.created; return e23 ? e23 instanceof HTMLElement ? n6("div", { key: e23, bind: e23, afterCreate: this._attachToNode }) : e5(e23) ? n6("div", { key: e23 }, !e23.destroyed && e23.render()) : n6("div", { key: e23, innerHTML: e23, afterCreate: this._addTargetToAnchors }) : null; } render() { const e23 = this.viewModel?.state; return n6("div", { class: c16.base }, e23 === "loading" ? this.renderLoading() : this.renderCreated()); } _attachToNode(e23) { const r24 = this; e23.appendChild(r24); } }; e([o9("viewModel.creator")], p9.prototype, "creator", void 0), e([o9("viewModel.graphic")], p9.prototype, "graphic", void 0), e([d({ type: l11 })], p9.prototype, "viewModel", void 0), p9 = e([n3("esri.widgets.Feature.FeatureContent")], p9); var l12 = p9; // node_modules/@arcgis/core/widgets/Feature/FeatureFields/FeatureFieldsViewModel.js var l13 = class extends y { constructor(o30) { super(o30), this.attributes = null, this.expressionInfos = null, this.description = null, this.fieldInfos = null, this.title = null; } get formattedFieldInfos() { const { expressionInfos: o30, fieldInfos: e23 } = this, s30 = []; return e23?.forEach((e24) => { if (!(!e24.hasOwnProperty("visible") || e24.visible)) return; const t25 = e24.clone(); t25.label = q2(t25, o30), s30.push(t25); }), s30; } }; e([d()], l13.prototype, "attributes", void 0), e([d({ type: [i7] })], l13.prototype, "expressionInfos", void 0), e([d()], l13.prototype, "description", void 0), e([d({ type: [c5] })], l13.prototype, "fieldInfos", void 0), e([d({ readOnly: true })], l13.prototype, "formattedFieldInfos", null), e([d()], l13.prototype, "title", void 0), l13 = e([n3("esri.widgets.Feature.FeatureFields.FeatureFieldsViewModel")], l13); var n14 = l13; // node_modules/@arcgis/core/widgets/support/uriUtils.js var s9 = [{ pattern: /^\s*(https?:\/\/([^\s]+))\s*$/i, target: "_blank", label: "{messages.view}" }, { pattern: /^\s*(tel:([^\s]+))\s*$/i, label: "{hierPart}" }, { pattern: /^\s*(mailto:([^\s]+))\s*$/i, label: "{hierPart}" }, { pattern: /^\s*(arcgis-appstudio-player:\/\/([^\s]+))\s*$/i, label: "{messages.openInApp}", appName: "App Studio Player" }, { pattern: /^\s*(arcgis-collector:\/\/([^\s]+))\s*$/i, label: "{messages.openInApp}", appName: "Collector" }, { pattern: /^\s*(arcgis-explorer:\/\/([^\s]+))\s*$/i, label: "{messages.openInApp}", appName: "Explorer" }, { pattern: /^\s*(arcgis-navigator:\/\/([^\s]+))\s*$/i, label: "{messages.openInApp}", appName: "Navigator" }, { pattern: /^\s*(arcgis-survey123:\/\/([^\s]+))\s*$/i, label: "{messages.openInApp}", appName: "Survey123" }, { pattern: /^\s*(arcgis-trek2there:\/\/([^\s]+))\s*$/i, label: "{messages.openInApp}", appName: "Trek2There" }, { pattern: /^\s*(arcgis-workforce:\/\/([^\s]+))\s*$/i, label: "{messages.openInApp}", appName: "Workforce" }, { pattern: /^\s*(iform:\/\/([^\s]+))\s*$/i, label: "{messages.openInApp}", appName: "iForm" }, { pattern: /^\s*(flow:\/\/([^\s]+))\s*$/i, label: "{messages.openInApp}", appName: "FlowFinity" }, { pattern: /^\s*(lfmobile:\/\/([^\s]+))\s*$/i, label: "{messages.openInApp}", appName: "Laserfische" }, { pattern: /^\s*(mspbi:\/\/([^\s]+))\s*$/i, label: "{messages.openInApp}", appName: "Microsoft Power Bi" }]; function a14(e23) { let a34 = null; return s9.some((s30) => (s30.pattern.test(e23) && (a34 = s30), !!a34)), a34; } function p10(s30, p36) { if (typeof p36 != "string" || !p36) return p36; const r24 = a14(p36); if (!r24) return p36; const t25 = p36.match(r24.pattern), n34 = t25 && t25[2], l27 = r2(r2(r24.label, { messages: s30, hierPart: n34 }), { appName: r24.appName }), i32 = r24.target ? ` target="${r24.target}"` : "", o30 = r24.target === "_blank" ? ' rel="noreferrer"' : ""; return p36.replace(r24.pattern, `${l27}`); } // node_modules/@arcgis/core/widgets/Feature/FeatureFields.js var u7 = { base: "esri-feature-fields", fieldHeader: "esri-feature-fields__field-header", fieldData: "esri-feature-fields__field-data", fieldDataDate: "esri-feature-fields__field-data--date", esriTable: "esri-widget__table" }; var m13 = class extends O2 { constructor(e23, t25) { super(e23, t25), this._featureElementInfo = null, this.attributes = null, this.description = null, this.expressionInfos = null, this.fieldInfos = null, this.title = null, this.viewModel = new n14(), this.messages = null, this.messagesURIUtils = null; } initialize() { this._featureElementInfo = new c15(), this.own(l4(() => [this.viewModel?.description, this.viewModel?.title], () => this._setupFeatureElementInfo(), h2)); } destroy() { this._featureElementInfo.destroy(); } renderFieldInfo(e23, t25) { const { attributes: s30 } = this.viewModel, r24 = e23.fieldName, i32 = e23.label || r24, o30 = s30 ? s30[r24] == null ? "" : s30[r24] : "", l27 = !(!e23.format || !e23.format.dateFormat), a34 = typeof o30 == "number" && !l27 ? this._forceLTR(o30) : p10(this.messagesURIUtils, o30), d20 = { [u7.fieldDataDate]: l27 }; return n6("tr", { key: `fields-element-info-row-${r24}-${t25}` }, n6("th", { key: `fields-element-info-row-header-${r24}-${t25}`, class: u7.fieldHeader, innerHTML: i32 }), n6("td", { key: `fields-element-info-row-data-${r24}-${t25}`, class: this.classes(u7.fieldData, d20), innerHTML: a34 })); } renderFields() { const { formattedFieldInfos: e23 } = this.viewModel; return e23?.length ? n6("table", { class: u7.esriTable, summary: this.messages.fieldsSummary }, n6("tbody", null, e23.map((e24, t25) => this.renderFieldInfo(e24, t25)))) : null; } render() { return n6("div", { class: u7.base }, this._featureElementInfo?.render(), this.renderFields()); } _setupFeatureElementInfo() { const { description: e23, title: t25 } = this; this._featureElementInfo.set({ description: e23, title: t25 }); } _forceLTR(e23) { return `‎${e23}`; } }; e([o9("viewModel.attributes")], m13.prototype, "attributes", void 0), e([o9("viewModel.description")], m13.prototype, "description", void 0), e([o9("viewModel.expressionInfos")], m13.prototype, "expressionInfos", void 0), e([o9("viewModel.fieldInfos")], m13.prototype, "fieldInfos", void 0), e([o9("viewModel.title")], m13.prototype, "title", void 0), e([d({ type: n14 })], m13.prototype, "viewModel", void 0), e([d(), e4("esri/widgets/Feature/t9n/Feature")], m13.prototype, "messages", void 0), e([d(), e4("esri/widgets/support/t9n/uriUtils")], m13.prototype, "messagesURIUtils", void 0), m13 = e([n3("esri.widgets.Feature.FeatureFields")], m13); var c17 = m13; // node_modules/@arcgis/core/renderers/support/numberUtils.js var s10 = { maximumFractionDigits: 20 }; function c18(n34) { return m2(n34, s10); } // node_modules/@arcgis/core/widgets/Legend/support/utils.js var s11 = "<"; var i10 = ">"; var r12 = S("short-date"); function o13(t25, l27, o30, e23) { let n34 = ""; l27 === 0 ? n34 = `${s11} ` : l27 === o30 && (n34 = `${i10} `); let u23 = null; return u23 = e23 ? L2(t25, r12) : c18(t25), n34 + u23; } // node_modules/@arcgis/core/widgets/Legend/support/colorRampUtils.js var o14 = new l5([64, 64, 64]); function n15(l27, o30) { const n34 = [], r24 = l27.length - 1; return l27.length === 5 ? n34.push(0, 2, 4) : n34.push(0, r24), l27.map((l28, t25) => n34.includes(t25) ? o13(l28, t25, r24, o30) : null); } async function r13(l27, e23, o30) { let r24 = false, a34 = [], u23 = []; if (l27.stops) { const e24 = l27.stops; a34 = e24.map((l28) => l28.value), r24 = e24.some((l28) => !!l28.label), r24 && (u23 = e24.map((l28) => l28.label)); } const s30 = a34[0], i32 = a34[a34.length - 1]; if (s30 == null && i32 == null) return null; const c42 = r24 ? null : n15(a34, o30); return (await Promise.all(a34.map(async (o31, n34) => ({ value: o31, color: l27.type === "opacity" ? await t12(o31, l27, e23) : (await import("./visualVariableUtils-ABC432IV.js")).getColor(l27, o31), label: r24 ? u23[n34] : c42[n34] })))).reverse(); } async function t12(e23, n34, r24 = o14) { const t25 = new l5(r24), a34 = (await import("./visualVariableUtils-ABC432IV.js")).getOpacity(n34, e23); return a34 != null && (t25.a = a34), t25; } // node_modules/@arcgis/core/widgets/Legend/support/heatmapRampUtils.js function r14(r24) { if (!r24.colorStops) return []; const e23 = [...r24.colorStops].filter((o30) => o30.color?.a > 0); let t25 = e23.length - 1; if (e23 && e23[0]) { const r25 = e23[t25]; r25 && r25.ratio !== 1 && (e23.push(new a8({ ratio: 1, color: r25.color })), t25++); } return e23.map((o30, e24) => { let l27 = ""; return e24 === 0 ? l27 = r24.legendOptions?.minLabel || "low" : e24 === t25 && (l27 = r24.legendOptions?.maxLabel || "high"), { color: o30.color, label: l27, ratio: o30.ratio }; }).reverse(); } // node_modules/@arcgis/core/renderers/support/utils.js var d6 = s.getLogger("esri.renderers.support.utils"); var y6 = S("short-date"); function g7(e23, l27, t25) { r3(e23, l27, () => []).push(...t25); } async function h8(l27) { const n34 = new Map(); if ("visualVariables" in l27 && l27.visualVariables) { const e23 = l27.visualVariables.filter((e24) => e24.type === "color"); for (const l28 of e23) { const e24 = l28.field || l28.valueExpression, t25 = (await r13(l28)).map((e25) => e25.color); g7(n34, e24, t25); } } if (l27.type === "heatmap") { const e23 = r14(l27).map((e24) => e24.color); g7(n34, l27.field, e23); } else if (l27.type === "pie-chart") { for (const e23 of l27.attributes) g7(n34, e23.field, [e23.color]); g7(n34, null, [l27?.othersCategory?.color, j5(l27.backgroundFillSymbol, null)]); } else if (l27.type === "dot-density") { for (const e23 of l27.attributes) g7(n34, e23.field, [e23.color]); g7(n34, null, [l27.backgroundColor]); } else if (l27.type === "unique-value") if (l27.authoringInfo?.type === "predominance") for (const e23 of l27.uniqueValueInfos) g7(n34, e23.value.toString(), [j5(e23.symbol, null)]); else { const e23 = l27.uniqueValueInfos.map((e24) => j5(e24.symbol, null)), { field: t25, field2: o30, field3: i32, valueExpression: a34 } = l27; (t25 || a34) && g7(n34, t25 || a34, e23), o30 && g7(n34, o30, e23), i32 && g7(n34, i32, e23); } else if (l27.type === "class-breaks") { const e23 = l27.classBreakInfos.map((e24) => j5(e24.symbol, null)); g7(n34, l27.field || l27.valueExpression, e23); } else l27.type === "simple" && g7(n34, null, [j5(l27.symbol, null)]); return "defaultSymbol" in l27 && l27.defaultSymbol && g7(n34, null, [j5(l27.defaultSymbol, null)]), n34.forEach((l28, t25) => { const o30 = u(l28.filter(Boolean), (e23, l29) => JSON.stringify(e23) === JSON.stringify(l29)); n34.set(t25, o30); }), n34; } // node_modules/@arcgis/core/widgets/Feature/support/relatedFeatureUtils.js var p11 = "esri.widgets.Feature.support.relatedFeatureUtils"; var c19 = s.getLogger(p11); var f6 = new Map(); function d7(e23) { if (!ue(e23)) return null; const [t25, r24] = e23.split("/").slice(1); return { layerId: t25, fieldName: r24 }; } function m15(e23, t25) { if (!t25.relationships) return null; let r24 = null; const { relationships: s30 } = t25; return s30.some((t26) => t26.id === parseInt(e23, 10) && (r24 = t26, true)), r24; } function y7({ originRelationship: e23, relationships: t25, layerId: r24 }) { let s30; return t25 && t25.some((t26) => (`${t26.relatedTableId}` === r24 && t26.id === e23.id && (s30 = t26), !!s30)), s30; } function j7(e23, t25) { const r24 = t25.toLowerCase(); for (const s30 in e23) if (s30.toLowerCase() === r24) return e23[s30]; return null; } function h9(e23, t25) { const r24 = m15(e23, t25); if (!r24) return; return { url: `${t25.url}/${r24.relatedTableId}`, sourceSpatialReference: t25.spatialReference, relation: r24, relatedFields: [], outStatistics: [] }; } function F2(e23, t25) { if (!t25) return; if (!e23) return; const { features: r24, statsFeatures: s30 } = e23, o30 = r24 && r24.value; t25.relatedFeatures = o30 ? o30.features : []; const i32 = s30 && s30.value; t25.relatedStatsFeatures = i32 ? i32.features : []; } function g8(e23, t25, r24, s30) { const o30 = new d3(); return o30.outFields = ["*"], o30.relationshipId = typeof t25.id == "number" ? t25.id : parseInt(t25.id, 10), o30.objectIds = [e23.attributes[r24.objectIdField]], r24.queryRelatedFeatures(o30, s30); } function I3(e23, t25, r24) { let s30 = 0; const o30 = []; for (; s30 < t25.length; ) o30.push(`${e23} IN (${t25.slice(s30, r24 + s30)})`), s30 += r24; return o30.join(" OR "); } async function S5(e23, t25, r24, a34) { const l27 = r24.layerId.toString(), { layerInfo: u23, relation: p36, relatedFields: c42, outStatistics: f14, url: d20, sourceSpatialReference: m29 } = t25, h19 = y7({ originRelationship: p36, relationships: u23.relationships, layerId: l27 }); if (h19.relationshipTableId && h19.keyFieldInRelationshipTable) { const t26 = (await g8(e23, h19, r24, a34))[e23.attributes[r24.objectIdField]]; if (!t26) return null; const o30 = t26.features.map((e24) => e24.attributes[u23.objectIdField]); if (f14?.length > 0 && u23.supportsStatistics) { const e24 = new b2(); e24.where = I3(u23.objectIdField, o30, 1e3), e24.outFields = c42, e24.outStatistics = f14, e24.sourceSpatialReference = m29; const r25 = { features: Promise.resolve(t26), statsFeatures: s6(d20, e24) }; return E(r25); } } const F4 = h19?.keyField; if (F4) { const r25 = B(U4(u23.fields, F4)), l28 = j7(e23.attributes, p36.keyField), c43 = r25 ? `${F4}=${l28}` : `${F4}='${l28}'`, f15 = s6(d20, new b2({ where: c43, outFields: t25.relatedFields, sourceSpatialReference: m29 }), a34), y17 = t25.outStatistics && t25.outStatistics.length > 0 && u23.supportsStatistics ? s6(d20, new b2({ where: c43, outFields: t25.relatedFields, outStatistics: t25.outStatistics, sourceSpatialReference: m29 }), a34) : null, h20 = { features: f15 }; return y17 && (h20.statsFeatures = y17), E(h20); } return null; } function w7(t25, r24) { return U2(t25, { query: { f: "json" }, signal: r24 && r24.signal }); } function b5({ relatedInfos: e23, layer: r24 }, o30) { const i32 = {}; return e23.forEach((e24, s30) => { const { relation: n34 } = e24; if (!n34) { const e25 = new s2("relation-required", "A relation is required on a layer to retrieve related records."); throw c19.error(e25), e25; } const { relatedTableId: a34 } = n34; if (typeof a34 != "number") { const e25 = new s2("A related table ID is required on a layer to retrieve related records."); throw c19.error(e25), e25; } const l27 = `${r24.url}/${a34}`, u23 = f6.get(l27), p36 = u23 || w7(l27, o30); u23 || f6.set(l27, p36), i32[s30] = p36; }), E(i32); } function R4({ graphic: e23, relatedInfos: t25, layer: r24 }, o30) { const i32 = {}; return t25.forEach((t26, s30) => { t26.layerInfo && (i32[s30] = S5(e23, t26, r24, o30)); }), E(i32); } function $2({ relatedInfo: e23, fieldName: t25, fieldInfo: r24 }) { if (e23.relatedFields.push(t25), r24.statisticType) { const s30 = new m6({ statisticType: r24.statisticType, onStatisticField: t25, outStatisticFieldName: t25 }); e23.outStatistics.push(s30); } } function U4(e23, t25) { if (e23 != null) { t25 = t25.toLowerCase(); for (const r24 of e23) if (r24 && r24.name.toLowerCase() === t25) return r24; } return null; } // node_modules/@arcgis/core/widgets/Feature/FeatureMedia/FeatureMediaViewModel.js var y8 = { chartAnimation: true }; var I4 = class extends y { constructor(t25) { super(t25), this.abilities = { ...y8 }, this.activeMediaInfoIndex = 0, this.attributes = null, this.description = null, this.fieldInfoMap = null, this.formattedAttributes = null, this.expressionAttributes = null, this.layer = null, this.mediaInfos = null, this.popupTemplate = null, this.relatedInfos = null, this.title = null; } castAbilities(t25) { return { ...y8, ...t25 }; } get activeMediaInfo() { return this.formattedMediaInfos[this.activeMediaInfoIndex] || null; } get formattedMediaInfos() { return this._formatMediaInfos() || []; } get formattedMediaInfoCount() { return this.formattedMediaInfos.length; } setActiveMedia(t25) { this._setContentElementMedia(t25); } next() { this._pageContentElementMedia(1); } previous() { this._pageContentElementMedia(-1); } _setContentElementMedia(t25) { const { formattedMediaInfoCount: e23 } = this, o30 = (t25 + e23) % e23; this.activeMediaInfoIndex = o30; } _pageContentElementMedia(t25) { const { activeMediaInfoIndex: e23 } = this, o30 = e23 + t25; this._setContentElementMedia(o30); } _formatMediaInfos() { const { attributes: t25, mediaInfos: e23, formattedAttributes: o30, expressionAttributes: i32, fieldInfoMap: r24, layer: a34 } = this; return e23?.map((e24) => { const s30 = e24?.clone(); if (!s30) return null; if (s30.title = $({ attributes: t25, fieldInfoMap: r24, globalAttributes: o30, expressionAttributes: i32, layer: a34, text: s30.title }), s30.caption = $({ attributes: t25, fieldInfoMap: r24, globalAttributes: o30, expressionAttributes: i32, layer: a34, text: s30.caption }), s30.altText = $({ attributes: t25, fieldInfoMap: r24, globalAttributes: o30, expressionAttributes: i32, layer: a34, text: s30.altText }), s30.type === "image") { const { value: t26 } = s30; return this._setImageValue({ value: t26, formattedAttributes: o30, layer: a34 }), s30.value.sourceURL ? s30 : void 0; } if (s30.type === "pie-chart" || s30.type === "line-chart" || s30.type === "column-chart" || s30.type === "bar-chart") { const { value: e25 } = s30; return this._setChartValue({ value: e25, chartType: s30.type, attributes: t25, formattedAttributes: o30, layer: a34 }), s30; } return null; }).filter(Boolean); } _setImageValue(t25) { const { fieldInfoMap: e23 } = this, { value: o30, formattedAttributes: i32, layer: r24 } = t25, { linkURL: a34, sourceURL: s30 } = o30; if (s30) { const t26 = P(s30, r24); o30.sourceURL = S4({ formattedAttributes: i32, template: t26, fieldInfoMap: e23 }); } if (a34) { const t26 = P(a34, r24); o30.linkURL = S4({ formattedAttributes: i32, template: t26, fieldInfoMap: e23 }); } } _setChartValue(t25) { const { value: e23, attributes: o30, formattedAttributes: i32, chartType: r24, layer: a34 } = t25, { popupTemplate: s30, relatedInfos: l27 } = this, { fields: n34, normalizeField: p36 } = e23; e23.fields = A3(n34, a34), p36 && (e23.normalizeField = D(p36, a34)); if (!n34.some((t26) => !!(i32[t26] != null || ue(t26) && l27.size))) return; const c42 = s30?.fieldInfos; n34.forEach((t26) => { if (ue(t26)) return void (e23.series = [...e23.series, ...this._getRelatedChartInfos({ fieldInfos: c42, fieldName: t26, formattedAttributes: i32, chartType: r24, value: e23 })]); const a35 = this._getChartOption({ value: e23, attributes: o30, chartType: r24, formattedAttributes: i32, fieldName: t26, fieldInfos: c42 }); e23.series.push(a35); }); } _getRelatedChartInfos(t25) { const { fieldInfos: e23, fieldName: o30, formattedAttributes: i32, chartType: r24, value: a34 } = t25, s30 = [], l27 = d7(o30), { layerId: n34, fieldName: p36 } = l27, d20 = this.relatedInfos?.get(n34.toString()); if (!d20) return s30; const { relatedFeatures: u23, relation: f14 } = d20; if (!f14 || !u23) return s30; const { cardinality: c42 } = f14; u23.forEach((t26) => { const { attributes: l28 } = t26; l28 && Object.keys(l28).forEach((t27) => { t27 === p36 && s30.push(this._getChartOption({ value: a34, attributes: l28, formattedAttributes: i32, fieldName: o30, chartType: r24, relatedFieldName: t27, fieldInfos: e23 })); }); }); return c42 === "one-to-many" || c42 === "many-to-many" ? s30 : [s30[0]]; } _getTooltip({ label: t25, value: e23, chartType: o30 }) { return o30 === "pie-chart" ? `${t25}` : `${t25}: ${e23}`; } _getChartOption(t25) { const { value: e23, attributes: o30, formattedAttributes: i32, fieldName: r24, relatedFieldName: l27, fieldInfos: n34, chartType: p36 } = t25, { layer: d20, fieldInfoMap: y17 } = this, { normalizeField: I6, tooltipField: b10 } = e23, v15 = I6 ? ue(I6) ? o30[d7(I6).fieldName] : o30[I6] : null, M9 = l27 && o30[l27] !== void 0 ? o30[l27] : o30[r24] !== void 0 ? o30[r24] : i32[r24], A7 = new i6({ fieldName: r24, value: M9 === void 0 ? null : M9 && v15 ? M9 / v15 : M9 }); if (ue(r24)) { const t26 = y17.get(r24.toLowerCase()), e24 = y17.get(b10.toLowerCase()), o31 = t26?.fieldName ?? r24, a34 = i32[e24?.fieldName ?? b10] ?? t26?.label ?? t26?.fieldName ?? l27, s30 = i32[o31]; return A7.tooltip = this._getTooltip({ label: a34, value: s30, chartType: p36 }), A7; } const g20 = B2(n34, r24), _9 = D(r24, d20), x5 = b10 && i32[b10] !== void 0 ? i32[b10] : q2(g20 || new c5({ fieldName: _9 }), this.popupTemplate?.expressionInfos), C5 = i32[_9]; return A7.tooltip = this._getTooltip({ label: x5, value: C5, chartType: p36 }), A7; } }; e([d()], I4.prototype, "abilities", void 0), e([s3("abilities")], I4.prototype, "castAbilities", null), e([d()], I4.prototype, "activeMediaInfoIndex", void 0), e([d({ readOnly: true })], I4.prototype, "activeMediaInfo", null), e([d()], I4.prototype, "attributes", void 0), e([d()], I4.prototype, "description", void 0), e([d()], I4.prototype, "fieldInfoMap", void 0), e([d()], I4.prototype, "formattedAttributes", void 0), e([d()], I4.prototype, "expressionAttributes", void 0), e([d({ readOnly: true })], I4.prototype, "formattedMediaInfos", null), e([d()], I4.prototype, "layer", void 0), e([d({ readOnly: true })], I4.prototype, "formattedMediaInfoCount", null), e([d()], I4.prototype, "mediaInfos", void 0), e([d()], I4.prototype, "popupTemplate", void 0), e([d()], I4.prototype, "relatedInfos", void 0), e([d()], I4.prototype, "title", void 0), I4 = e([n3("esri.widgets.Feature.FeatureMedia.FeatureMediaViewModel")], I4); var b6 = I4; // node_modules/@esri/calcite-colors/dist/colors.module.js var f7 = ["#ffffff", "#858585", "#ffbebe", "#ffebbe", "#ffebaf", "#ffffbe", "#e9ffbe", "#d3ffbe", "#beffe8", "#bee8ff", "#bed2ff", "#e8beff", "#ffbee8", "#ebebeb", "#707070", "#ff7f7f", "#ffa77f", "#ffd37f", "#ffff73", "#d1ff73", "#a3ff73", "#73ffdf", "#73dfff", "#73b2ff", "#df73ff", "#ff73df", "#d6d6d6", "#5c5c5c", "#ff0000", "#ff5500", "#ffaa00", "#ffff00", "#aaff00", "#55ff00", "#00ffc5", "#00c5ff", "#0070ff", "#c500ff", "#ff00c5", "#c2c2c2", "#474747", "#e60000", "#e64c00", "#e69800", "#e6e600", "#98e600", "#4ce600", "#00e6a9", "#00a9e6", "#005ce6", "#a900e6", "#e600a9", "#adadad", "#242424", "#a80000", "#a83800", "#a87000", "#a8a800", "#70a800", "#38a800", "#00a884", "#0084a8", "#004da8", "#8400a8", "#a80084", "#999999", "#1a1a1a", "#730000", "#732600", "#734c00", "#737300", "#4c7300", "#267300", "#00734c", "#004c73", "#002673", "#4c0073", "#73004"]; var b7 = [].concat(f7.slice(30, 39), f7.slice(28, 30).reverse()); var e12 = [{ name: "default", colors: b7 }, { name: "cat-dark", colors: ["#ed5151", "#149ece", "#a7c636", "#9e559c", "#fc921f", "#ffde3e", "#f789d8", "#b7814a", "#3caf99", "#6b6bd6", "#b54779", "#7f7f7f"] }, { name: "tropical-bliss", colors: ["#fce138", "#ff9399", "#fcd27e", "#f1983c", "#a553b7", "#b1a9d0", "#6ecffc", "#4c81cd", "#fc6f84", "#fc3e5a", "#6af689", "#48885c"] }, { name: "desert-blooms", colors: ["#102432", "#144d59", "#ffc730", "#ed9310", "#a64f1b", "#661510", "#d9351a", "#b31515", "#4a0932", "#8c213f", "#18382e", "#2c6954"] }, { name: "under-the-sea", colors: ["#bf9727", "#607100", "#00734c", "#704489", "#01acca", "#024e76", "#f09100", "#ea311f", "#c6004b", "#7570b3", "#666666", "#333333"] }, { name: "vibrant-rainbow", colors: ["#fffb00", "#f5cb11", "#9fd40c", "#46e39c", "#32b8a6", "#7ff2fa", "#ac08cc", "#dd33ff", "#eb7200", "#e8a784", "#bf2e2e", "#6c7000"] }, { name: "ocean-bay", colors: ["#191921", "#11495c", "#78b1c2", "#454f4b", "#8f8f82", "#9be0c0", "#87b051", "#f7ec88", "#ebdcc1", "#dbb658", "#c43541", "#75351e"] }, { name: "prairie-summer", colors: ["#332424", "#751555", "#d47013", "#d68989", "#211173", "#82aad6", "#7bfaeb", "#6ec9a8", "#6b6408", "#eada40", "#ccc54a", "#1fc235"] }, { name: "pastel-chalk", colors: ["#fffd99", "#f5e6a4", "#c1d48c", "#b8e3d0", "#a0b8b5", "#cbf7fa", "#d791f2", "#dfc1eb", "#f2b983", "#e8c4b2", "#bf8e8e", "#94995c"] }, { name: "seq-yellow-orange-red-bright", colors: ["#910000", "#b1260b", "#c0370f", "#e05919", "#ef6a1d", "#ff7b22", "#ffa143", "#ffb454", "#ffda74", "#ffed85"] }, { name: "seq-reds-bright", colors: ["#57453b", "#7b4238", "#9f4036", "#c23d33", "#d7483c", "#ec5244", "#f3696c", "#f9816c", "#ffc4ae", "#fff0dc"] }, { name: "seq-purples-bright", colors: ["#4e465c", "#5a4a78", "#695291", "#775baa", "#8663c3", "#946bdc", "#aa89e8", "#c1a6f3", "#d7c4ff", "#e6e1ff"] }, { name: "seq-blues-bright", colors: ["#404d54", "#435c6c", "#48799d", "#4b88b6", "#4d96ce", "#50a5e7", "#74bbed", "#98d0f3", "#bce6f9", "#e6faff"] }, { name: "seq-greens-bright", colors: ["#39544c", "#386757", "#368165", "#359b73", "#33b581", "#4bc392", "#64d2a2", "#7ce0b3", "#cbf6d9", "#f4ffea"] }, { name: "seq-browns-bright", colors: ["#524834", "#715b38", "#8f6e3c", "#ae8140", "#cc9444", "#eba748", "#eeb664", "#f0c47f", "#f9e0b7", "#fff8eb"] }]; // node_modules/@arcgis/core/widgets/support/chartUtils.js var n16 = "en-us"; var h10 = new Map([["ar", () => import("./ar-TQHN4MOQ.js").then((t25) => t25.a)], ["bg-bg", () => import("./bg_BG-WYH7X6PJ.js").then((t25) => t25.b)], ["bs-ba", () => import("./bs_BA-MH3CELJQ.js").then((t25) => t25.b)], ["ca-es", () => import("./ca_ES-VIIOWGYP.js").then((t25) => t25.c)], ["cs-cz", () => import("./cs_CZ-PQJHXI2U.js").then((t25) => t25.c)], ["da-dk", () => import("./da_DK-LU4CXISV.js").then((t25) => t25.d)], ["de-de", () => import("./de_DE-3UFBKLTH.js").then((t25) => t25.d)], ["de-ch", () => import("./de_CH-ZGPNWPCT.js").then((t25) => t25.d)], ["el-gr", () => import("./el_GR-LAC2XCRL.js").then((t25) => t25.e)], ["en-us", () => import("./en_US-H4DEFW2S.js").then((t25) => t25.e)], ["en-ca", () => import("./en_CA-ZAIOOIDR.js").then((t25) => t25.e)], ["es-es", () => import("./es_ES-SWGL2U3X.js").then((t25) => t25.e)], ["et-ee", () => import("./et_EE-2MTCK7RO.js").then((t25) => t25.e)], ["fi-fi", () => import("./fi_FI-NLAF6TGN.js").then((t25) => t25.f)], ["fr-fr", () => import("./fr_FR-TMHVVCA5.js").then((t25) => t25.f)], ["he-il", () => import("./he_IL-PZLTATBT.js").then((t25) => t25.h)], ["hr-hr", () => import("./hr_HR-CZUNMVWX.js").then((t25) => t25.h)], ["hu-hu", () => import("./hu_HU-X42EPEWR.js").then((t25) => t25.h)], ["id-id", () => import("./id_ID-EOIVOSFK.js").then((t25) => t25.i)], ["it-it", () => import("./it_IT-RSNHF7HF.js").then((t25) => t25.i)], ["ja-jp", () => import("./ja_JP-DKLDGY3C.js").then((t25) => t25.j)], ["ko-kr", () => import("./ko_KR-4XWTGQHU.js").then((t25) => t25.k)], ["lt-lt", () => import("./lt_LT-TJ472TRQ.js").then((t25) => t25.l)], ["lv-lv", () => import("./lv_LV-ISYZ3547.js").then((t25) => t25.l)], ["nb-no", () => import("./nb_NO-NCOGLT26.js").then((t25) => t25.n)], ["nl-nl", () => import("./nl_NL-RYMYW4YH.js").then((t25) => t25.n)], ["pl-pl", () => import("./pl_PL-QVJBIAKG.js").then((t25) => t25.p)], ["pt-br", () => import("./pt_BR-57JVBOAG.js").then((t25) => t25.p)], ["pt-pt", () => import("./pt_PT-4EZ3DA3M.js").then((t25) => t25.p)], ["ro-ro", () => import("./ro_RO-VVI4JUHA.js").then((t25) => t25.r)], ["ru-ru", () => import("./ru_RU-2MHIWPEY.js").then((t25) => t25.r)], ["sk-sk", () => import("./sk_SK-DEQOCIQX.js").then((t25) => t25.s)], ["sl-sl", () => import("./sl_SL-DVTELK2A.js").then((t25) => t25.s)], ["sr-rs", () => import("./sr_RS-B3RB5B3Y.js").then((t25) => t25.s)], ["sv-se", () => import("./sv_SE-L5ZLNI46.js").then((t25) => t25.s)], ["th-th", () => import("./th_TH-HGNW4HTF.js").then((t25) => t25.t)], ["tr-tr", () => import("./tr_TR-AQ5OQWY5.js").then((t25) => t25.t)], ["uk-ua", () => import("./uk_UA-5LEB4DXP.js").then((t25) => t25.u)], ["vi-vn", () => import("./vi_VN-2E2J6SWD.js").then((t25) => t25.v)], ["zh-cn", () => import("./zh_Hans-RUNTGXF2.js").then((t25) => t25.z)], ["zh-hk", () => import("./zh_Hant-U6L3OFVY.js").then((t25) => t25.z)], ["zh-tw", () => import("./zh_Hant-U6L3OFVY.js").then((t25) => t25.z)]]); function e13(t25) { const s30 = t25.split("-")[0].toLowerCase(); let n34 = null; for (const e23 of h10.keys()) if (e23.startsWith(s30)) { n34 = e23; break; } return n34; } function r15(t25) { return t25 ? h10.has(t25.toLowerCase()) ? t25.toLowerCase() : e13(t25) || n16 : n16; } var o15; var i11; async function c20(t25 = l3()) { if (t25 = r15(t25), o15 && t25 === i11) return o15; o15 = import("./chunks-SZQ34Y5K.js").then((t26) => t26.i), i11 = t25; try { const [s30, n34] = await Promise.all([o15, h10.get(i11)()]); i11 === t25 && (s30.am4core.options.defaultLocale = n34.default), s30.am4core.options.suppressWarnings = true, s30.am4core.options.autoDispose = true; } catch { return o15 = null, i11 = null, null; } return o15; } function u9(s30, n34 = "default") { const h19 = e12.find((t25) => t25.name === n34); return h19 ? h19.colors.map((t25) => s30.color(t25)) : null; } // node_modules/@arcgis/core/widgets/Feature/FeatureMedia.js var M6 = { base: "esri-feature-media", mediaContainer: "esri-feature-media__container", mediaItemContainer: "esri-feature-media__item-container", mediaItem: "esri-feature-media__item", mediaItemTitle: "esri-feature-media__item-title", mediaItemCaption: "esri-feature-media__item-caption", mediaPrevious: "esri-feature-media__previous", mediaPreviousIconLTR: "esri-feature-media__previous-icon", mediaPreviousIconRTL: "esri-feature-media__previous-icon--rtl", mediaNext: "esri-feature-media__next", mediaNextIconLTR: "esri-feature-media__next-icon", mediaNextIconRTL: "esri-feature-media__next-icon--rtl", mediaChart: "esri-feature-media__chart", mediaButton: "esri-feature-media__button", mediaIcon: "esri-feature-media__icon", iconLeftTriangleArrow: "esri-icon-left-triangle-arrow", iconRightTriangleArrow: "esri-icon-right-triangle-arrow" }; var I5 = 0.05; var y9 = 0.95; var w8 = 15; var g9 = "color"; var b8 = "tooltip"; var C3 = "value"; var T4 = "default-line-value"; var x3 = class extends O2 { constructor(e23, t25) { super(e23, t25), this._refreshTimer = null, this._refreshIntervalInfo = null, this._featureElementInfo = null, this.attributes = null, this.activeMediaInfoIndex = null, this.description = null, this.fieldInfoMap = null, this.layer = null, this.mediaInfos = null, this.popupTemplate = null, this.relatedInfos = null, this.title = null, this.viewModel = new b6(), this.messages = null, this._getChartDependencies = async (e24) => { const t26 = await c20(), { destroyed: i32, viewModel: r24 } = this; if (i32 || !r24 || !e24) return; const { activeMediaInfo: a34 } = r24, o30 = await this._getRendererColors(t26); this._renderChart({ chartDiv: e24, mediaInfo: a34, chartsModule: t26, colorMap: o30 }); }; } initialize() { this._featureElementInfo = new c15(), this.own([l4(() => [this.viewModel?.activeMediaInfo, this.viewModel?.activeMediaInfoIndex], () => this._setupMediaRefreshTimer(), h2), l4(() => [this.viewModel?.description, this.viewModel?.title], () => this._setupFeatureElementInfo(), h2)]); } destroy() { this._clearMediaRefreshTimer(), this._featureElementInfo.destroy(); } render() { return n6("div", { bind: this, class: M6.base, onkeyup: this._handleMediaKeyup }, this._featureElementInfo?.render(), this.renderMedia()); } renderMedia() { const { formattedMediaInfoCount: e23 } = this.viewModel; return e23 ? n6("div", { key: "media-element-container", class: M6.mediaContainer }, this.renderMediaPageButton("previous"), this.renderMediaInfo(), this.renderMediaPageButton("next")) : null; } renderImageMediaInfo(e23) { const { _refreshIntervalInfo: t25 } = this, { activeMediaInfoIndex: i32, formattedMediaInfoCount: r24 } = this.viewModel, { value: a34, refreshInterval: o30, altText: s30, title: n34, type: l27 } = e23, { sourceURL: d20, linkURL: c42 } = a34, u23 = T3(c42) ? "_blank" : "_self", p36 = u23 === "_blank" ? "noreferrer" : "", h19 = o30 ? t25 : null, f14 = h19 ? h19.timestamp : 0, _9 = h19 ? h19.sourceURL : d20, M9 = n6("img", { alt: s30 || n34, key: `media-${l27}-${i32}-${r24}-${f14}`, src: _9 }), I6 = c42 ? n6("a", { title: n34, href: c42, rel: p36, target: u23 }, M9) : null; return I6 || M9; } renderChartMediaInfo(e23) { const { activeMediaInfoIndex: t25, formattedMediaInfoCount: i32 } = this.viewModel; return n6("div", { key: `media-${e23.type}-${t25}-${i32}`, bind: this, class: M6.mediaChart, afterCreate: this._getChartDependencies }); } renderMediaInfoType() { const { activeMediaInfo: e23 } = this.viewModel; return e23 ? e23.type === "image" ? this.renderImageMediaInfo(e23) : e23.type.includes("chart") ? this.renderChartMediaInfo(e23) : null : null; } renderMediaInfo() { const { activeMediaInfo: e23 } = this.viewModel; if (!e23) return null; const t25 = e23.title ? n6("div", { key: "media-title", class: M6.mediaItemTitle, innerHTML: e23.title }) : null, i32 = e23.caption ? n6("div", { key: "media-caption", class: M6.mediaItemCaption, innerHTML: e23.caption }) : null; return n6("div", { key: "media-container", class: M6.mediaItemContainer }, n6("div", { key: "media-item-container", class: M6.mediaItem }, this.renderMediaInfoType()), t25, i32); } renderMediaPageButton(e23) { if (this.viewModel.formattedMediaInfoCount < 2) return null; const t25 = e23 === "previous", i32 = t25 ? this.messages.previous : this.messages.next, r24 = t25 ? this.classes(M6.mediaButton, M6.mediaPrevious) : this.classes(M6.mediaButton, M6.mediaNext), a34 = t25 ? this.classes(M6.mediaIcon, M6.mediaPreviousIconLTR, M6.iconLeftTriangleArrow) : this.classes(M6.mediaIcon, M6.mediaNextIconLTR, M6.iconRightTriangleArrow), o30 = t25 ? this.classes(M6.mediaIcon, M6.mediaPreviousIconRTL, M6.iconRightTriangleArrow) : this.classes(M6.mediaIcon, M6.mediaNextIconRTL, M6.iconLeftTriangleArrow), s30 = t25 ? "media-previous" : "media-next", n34 = t25 ? this._previous : this._next; return n6("button", { type: "button", key: s30, title: i32, "aria-label": i32, tabIndex: 0, class: r24, bind: this, onclick: n34 }, n6("span", { "aria-hidden": "true", class: a34 }), n6("span", { "aria-hidden": "true", class: o30 })); } _setupFeatureElementInfo() { const { description: e23, title: t25 } = this; this._featureElementInfo.set({ description: e23, title: t25 }); } _next() { this.viewModel.next(); } _previous() { this.viewModel.previous(); } async _getRendererColors(e23) { const { am4core: t25 } = e23, i32 = this.viewModel?.layer, r24 = new Map(); if (!i32) return r24; const a34 = await h8(i32.renderer); a34.delete(null); return Array.from(a34.values()).every((e24) => e24?.length === 1) ? (r24.set(T4, t25.color({ r: 50, g: 50, b: 50, a: 1 })), Array.from(a34.keys()).forEach((e24) => { e24 && r24.set(e24, t25.color(a34.get(e24)[0].toCss(true))); }), r24) : r24; } _handleMediaKeyup(e23) { const i32 = i(e23); i32 === "ArrowLeft" && (e23.stopPropagation(), this.viewModel.previous()), i32 === "ArrowRight" && (e23.stopPropagation(), this.viewModel.next()); } _renderChart(e23) { const { abilities: t25 } = this.viewModel, { chartsModule: i32, chartDiv: r24, mediaInfo: a34, colorMap: o30 } = e23, { value: s30, type: n34 } = a34, { am4core: l27 } = i32, d20 = u9(l27); function c42(e24) { e24 instanceof l27.ColorSet && d20 && (e24.list = d20); } r6() && l27.useTheme(i32.am4themes_dark); const m29 = window.matchMedia("(prefers-reduced-motion: reduce)"); t25.chartAnimation && !m29.matches ? l27.useTheme(i32.am4themes_animated) : l27.unuseTheme(i32.am4themes_animated), l27.useTheme(c42); const u23 = n34 === "pie-chart" ? this._createPieChart(e23) : this._createXYChart(e23); r24.setAttribute("aria-label", a34.altText || a34.title), u23.data = s30.series.map((e24) => ({ [b8]: e24.tooltip, [C3]: e24.value, [g9]: o30.get(e24.fieldName) })).filter((e24) => n34 !== "pie-chart" || e24.value > 0); } _customizeChartTooltip(e23, t25) { e23.label.wrap = true, e23.label.maxWidth = 200, e23.autoTextColor = false, e23.getFillFromObject = false, e23.label.fill = t25.color("#ffffff"), e23.background.fill = t25.color({ r: 0, g: 0, b: 0, a: 0.7 }); } _createPieChart(e23) { const { chartDiv: t25, chartsModule: i32 } = e23, { am4core: r24, am4charts: a34 } = i32, o30 = r24.create(t25, a34.PieChart); o30.rtl = f3(this.container); const s30 = o30.series.push(new a34.PieSeries()); return s30.labels.template.disabled = true, s30.ticks.template.disabled = true, s30.dataFields.value = C3, s30.dataFields.category = b8, this._customizeChartTooltip(s30.tooltip, r24), s30.slices.template.tooltipText = o30.rtl ? "{category}: %{value.percent.formatNumber('#.0')}" : "{category}: {value.percent.formatNumber('#.0')}%", s30.slices.template.propertyFields.fill = g9, s30.slices.template.propertyFields.stroke = g9, o30; } _getMinSeriesValue(e23) { let t25 = 0; return e23.forEach((e24) => t25 = Math.min(e24.value, t25)), t25; } _createColumnChart(e23, t25) { const { chartsModule: i32, mediaInfo: r24 } = t25, { value: a34 } = r24, { am4core: o30, am4charts: s30 } = i32, n34 = e23.xAxes.push(new s30.CategoryAxis()); n34.dataFields.category = b8, n34.renderer.labels.template.disabled = true, this._customizeChartTooltip(n34.tooltip, o30), n34.tooltip.events.on("sizechanged", () => { n34.tooltip.dy = -n34.tooltip.contentHeight; }); const l27 = e23.yAxes.push(new s30.ValueAxis()), d20 = l27.renderer.labels.template; l27.renderer.minLabelPosition = I5, l27.renderer.maxLabelPosition = y9, l27.min = this._getMinSeriesValue(a34.series), this._customizeChartTooltip(l27.tooltip, o30), d20.wrap = true; const c42 = e23.series.push(new s30.ColumnSeries()); c42.dataFields.valueY = C3, c42.dataFields.categoryX = b8, c42.columns.template.propertyFields.fill = g9, c42.columns.template.propertyFields.stroke = g9, e23.cursor = new s30.XYCursor(), a34.series.length > w8 && (e23.scrollbarX = new o30.Scrollbar()); } _createBarChart(e23, t25) { const { chartsModule: i32, mediaInfo: r24 } = t25, { value: a34 } = r24, { am4core: o30, am4charts: s30 } = i32, n34 = e23.yAxes.push(new s30.CategoryAxis()); n34.dataFields.category = b8, n34.renderer.inversed = true, n34.renderer.labels.template.disabled = true, this._customizeChartTooltip(n34.tooltip, o30), n34.tooltip.events.on("sizechanged", () => { n34.tooltip.dx = n34.tooltip.contentWidth; }); const l27 = e23.xAxes.push(new s30.ValueAxis()), d20 = l27.renderer.labels.template; l27.renderer.minLabelPosition = I5, l27.renderer.maxLabelPosition = y9, l27.min = this._getMinSeriesValue(a34.series), this._customizeChartTooltip(l27.tooltip, o30), d20.wrap = true; const c42 = e23.series.push(new s30.ColumnSeries()); c42.dataFields.valueX = C3, c42.dataFields.categoryY = b8, c42.columns.template.propertyFields.fill = g9, c42.columns.template.propertyFields.stroke = g9, e23.cursor = new s30.XYCursor(), a34.series.length > w8 && (e23.scrollbarY = new o30.Scrollbar()); } _createLineChart(e23, t25) { const { chartsModule: i32, mediaInfo: r24, colorMap: a34 } = t25, { value: o30 } = r24, { am4core: s30, am4charts: n34 } = i32, l27 = e23.xAxes.push(new n34.CategoryAxis()); l27.dataFields.category = b8, l27.renderer.labels.template.disabled = true, this._customizeChartTooltip(l27.tooltip, s30), l27.tooltip.events.on("sizechanged", () => { l27.tooltip.dy = -l27.tooltip.contentHeight; }); const d20 = e23.yAxes.push(new n34.ValueAxis()), c42 = d20.renderer.labels.template; d20.renderer.minLabelPosition = I5, d20.renderer.maxLabelPosition = y9, d20.min = this._getMinSeriesValue(o30.series), this._customizeChartTooltip(d20.tooltip, s30), c42.wrap = true; const m29 = e23.series.push(new n34.LineSeries()); m29.dataFields.categoryX = b8, m29.dataFields.valueY = C3, m29.strokeWidth = 1; const u23 = a34.get(T4); u23 && (m29.stroke = u23); const p36 = m29.bullets.push(new n34.CircleBullet()); p36.propertyFields.fill = g9, p36.propertyFields.stroke = g9, e23.cursor = new n34.XYCursor(), o30.series.length > w8 && (e23.scrollbarX = new s30.Scrollbar()); } _createXYChart(e23) { const { chartDiv: t25, chartsModule: i32, mediaInfo: r24 } = e23, { type: a34 } = r24, { am4core: o30, am4charts: s30 } = i32, n34 = o30.create(t25, s30.XYChart); return n34.rtl = f3(this.container), a34 === "column-chart" && this._createColumnChart(n34, e23), a34 === "bar-chart" && this._createBarChart(n34, e23), a34 === "line-chart" && this._createLineChart(n34, e23), n34; } _clearMediaRefreshTimer() { const { _refreshTimer: e23 } = this; e23 && (clearTimeout(e23), this._refreshTimer = null); } _updateMediaInfoTimestamp(e23) { const t25 = Date.now(); this._refreshIntervalInfo = { timestamp: t25, sourceURL: this._getImageSource(e23, t25) }, this.scheduleRender(); } _setupMediaRefreshTimer() { this._clearMediaRefreshTimer(); const { activeMediaInfo: e23 } = this.viewModel; e23 && e23.type === "image" && e23.refreshInterval && this._setRefreshTimeout(e23); } _setRefreshTimeout(e23) { const { refreshInterval: t25, value: i32 } = e23; if (!t25) return; const r24 = 6e4 * t25; this._updateMediaInfoTimestamp(i32.sourceURL); const a34 = setInterval(() => { this._updateMediaInfoTimestamp(i32.sourceURL); }, r24); this._refreshTimer = a34; } _getImageSource(e23, t25) { const i32 = e23.includes("?") ? "&" : "?", [r24, a34 = ""] = e23.split("#"); return `${r24}${i32}timestamp=${t25}${a34 ? "#" : ""}${a34}`; } }; e([o9("viewModel.attributes")], x3.prototype, "attributes", void 0), e([o9("viewModel.activeMediaInfoIndex")], x3.prototype, "activeMediaInfoIndex", void 0), e([o9("viewModel.description")], x3.prototype, "description", void 0), e([o9("viewModel.fieldInfoMap")], x3.prototype, "fieldInfoMap", void 0), e([o9("viewModel.layer")], x3.prototype, "layer", void 0), e([o9("viewModel.mediaInfos")], x3.prototype, "mediaInfos", void 0), e([o9("viewModel.popupTemplate")], x3.prototype, "popupTemplate", void 0), e([o9("viewModel.relatedInfos")], x3.prototype, "relatedInfos", void 0), e([o9("viewModel.title")], x3.prototype, "title", void 0), e([d({ type: b6 })], x3.prototype, "viewModel", void 0), e([d(), e4("esri/widgets/Feature/t9n/Feature")], x3.prototype, "messages", void 0), x3 = e([n3("esri.widgets.Feature.FeatureMedia")], x3); var F3 = x3; // node_modules/@arcgis/core/widgets/Feature/support/arcadeFeatureUtils.js var s12 = ["$datastore", "$map", "$layer", "$aggregatedfeatures"]; var n17 = "esri.widgets.Feature.support.arcadeFeatureUtils"; var o16 = s.getLogger(n17); function c21(e23) { return typeof e23 == "string" ? te(ee(e23)) : Array.isArray(e23) ? p12(e23) : e23?.declaredClass === "esri.arcade.Dictionary" ? l14(e23) : e23; } function p12(e23) { return ``; } function l14(e23) { return `${e23.keys().map((r24) => { const t25 = e23.field(r24); return ``; }).join("")}
${r24}${typeof t25 == "string" ? te(ee(t25)) : t25}
`; } function u10({ aggregatedFeatures: e23, arcadeUtils: r24, featureSetVars: a34, context: i32, viewInfo: s30, map: n34, graphic: o30, interceptor: c42 }) { a34.forEach((a35) => { const p36 = a35.toLowerCase(), l27 = { map: n34, spatialReference: s30.sr, interceptor: c42 }; if (p36 === "$map" && (i32.vars[p36] = r24.convertMapToFeatureSetCollection(l27)), p36 === "$layer" && (i32.vars[p36] = r24.convertFeatureLayerToFeatureSet({ layer: o30.sourceLayer, spatialReference: s30.sr, interceptor: c42 })), p36 === "$datastore" && (i32.vars[p36] = r24.convertServiceUrlToWorkspace({ url: o30.sourceLayer.url, spatialReference: s30.sr, interceptor: c42 })), p36 === "$aggregatedfeatures") { const a36 = o30.layer, { fields: n35, objectIdField: l28, geometryType: u23, spatialReference: f14, displayField: g20 } = a36, y17 = new Ke({ fields: n35, objectIdField: l28, geometryType: u23, spatialReference: f14, displayField: g20, ...a36.type === "feature" ? { templates: a36.templates, typeIdField: a36.typeIdField, types: a36.types } : null, source: e23 }); i32.vars[p36] = r24.convertFeatureLayerToFeatureSet({ layer: y17, spatialReference: s30.sr, interceptor: c42 }); } }); } function f8() { return import("./arcadeUtils-B4URZJQW.js"); } async function g10({ graphic: e23, view: r24 }) { const { isAggregate: t25, layer: a34 } = e23; if (!t25 || !a34 || r24?.type !== "2d") return []; const i32 = await r24.whenLayerView(a34); if (!i32.createQuery || !i32.queryFeatures) return []; const s30 = i32.createQuery(); s30.aggregateIds = [e23.getObjectId()]; const { features: n34 } = await i32.queryFeatures(s30); return n34; } async function y10({ expressionInfo: e23, arcadeUtils: r24, interceptor: t25, spatialReference: a34, map: i32, graphic: n34, view: c42 }) { if (!e23 || !e23.expression) return null; const p36 = r24.createSyntaxTree(e23.expression), l27 = s12.filter((e24) => r24.hasVariable(p36, e24)), [f14] = await Promise.all([g10({ graphic: n34, view: c42 }), r24.loadScriptDependencies(p36, true, l27)]), y17 = r24.getViewInfo({ spatialReference: a34 }), d20 = r24.createExecContext(n34, y17); d20.interceptor = t25, d20.useAsync = true, u10({ aggregatedFeatures: f14, arcadeUtils: r24, featureSetVars: l27, context: d20, viewInfo: y17, map: i32, graphic: n34, interceptor: t25 }); const m29 = r24.createFunction(p36, d20); return r24.executeAsyncFunction(m29, d20).catch((r25) => o16.error("arcade-execution-error", { error: r25, graphic: n34, expressionInfo: e23 })); } async function d8({ expressionInfos: e23, spatialReference: t25, graphic: a34, interceptor: i32, map: s30, view: n34 }) { if (!e23 || !e23.length) return {}; const o30 = await f8(), p36 = {}; for (const r24 of e23) p36[`expression/${r24.name}`] = y10({ expressionInfo: r24, arcadeUtils: o30, interceptor: i32, spatialReference: t25, map: s30, graphic: a34, view: n34 }); const l27 = await E(p36), u23 = {}; for (const r24 in l27) u23[r24] = c21(l27[r24].value); return u23; } // node_modules/@arcgis/core/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js var j8 = 1; var v8 = class extends a6(y) { constructor(e23) { super(e23), this._abortController = null, this.expressionInfo = null, this.graphic = null, this.contentElement = null, this.contentElementViewModel = null, this.interceptor = null, this.view = null, this._cancelQuery = () => { const { _abortController: e24 } = this; e24 && e24.abort(), this._abortController = null; }, this._createVM = () => { const e24 = this.contentElement?.type; this.contentElementViewModel?.destroy(); const t25 = e24 === "fields" ? new n14() : e24 === "media" ? new b6() : e24 === "text" ? new l11() : null; this._set("contentElementViewModel", t25); }, this._compile = async () => { this._cancelQuery(); const e24 = new AbortController(); this._abortController = e24, await this._compileExpression(), this._abortController === e24 && (this._abortController = null); }, this._compileThrottled = e7(this._compile, j8, this), this._compileExpression = async () => { const { expressionInfo: e24, graphic: t25, interceptor: r24, spatialReference: n34, map: s30, view: i32, _abortController: l27 } = this; if (!(e24 && t25 && n34 && s30)) return void this._set("contentElement", null); const p36 = await f8(); if (l27 !== this._abortController) return; const a34 = await y10({ arcadeUtils: p36, expressionInfo: e24, graphic: t25, interceptor: r24, map: s30, spatialReference: n34, view: i32 }); if (!a34 || a34.declaredClass !== "esri.arcade.Dictionary") return void this._set("contentElement", null); const h19 = await Me(a34, l27.signal), u23 = h19?.type, f14 = u23 === "media" ? I.fromJSON(h19) : u23 === "text" ? c7.fromJSON(h19) : u23 === "fields" ? c6.fromJSON(h19) : null; this._set("contentElement", f14); }, this.handles.add([l4(() => [this.expressionInfo, this.graphic, this.map, this.spatialReference, this.view], () => this._compileThrottled(), h2), l4(() => [this.contentElement], () => this._createVM(), h2)]); } destroy() { this._cancelQuery(), this.contentElementViewModel?.destroy(), this._set("contentElementViewModel", null), this._set("contentElement", null); } get spatialReference() { return this.view?.spatialReference || null; } set spatialReference(e23) { e23 !== void 0 ? this._override("spatialReference", e23) : this._clearOverride("spatialReference"); } get state() { const { _abortController: e23, contentElement: t25, contentElementViewModel: o30 } = this; return e23 ? "loading" : t25 || o30 ? "ready" : "disabled"; } get map() { return this.view?.map || null; } set map(e23) { e23 !== void 0 ? this._override("map", e23) : this._clearOverride("map"); } }; e([d()], v8.prototype, "_abortController", void 0), e([d({ type: i5 })], v8.prototype, "expressionInfo", void 0), e([d({ type: g2 })], v8.prototype, "graphic", void 0), e([d({ readOnly: true })], v8.prototype, "contentElement", void 0), e([d({ readOnly: true })], v8.prototype, "contentElementViewModel", void 0), e([d()], v8.prototype, "interceptor", void 0), e([d()], v8.prototype, "spatialReference", null), e([d({ readOnly: true })], v8.prototype, "state", null), e([d()], v8.prototype, "map", null), e([d()], v8.prototype, "view", void 0), v8 = e([n3("esri.widgets.Feature.FeatureExpression.FeatureExpressionViewModel")], v8); var E4 = v8; // node_modules/@arcgis/core/widgets/Feature/FeatureExpression.js var c22 = { iconLoading: "esri-icon-loading-indicator esri-rotating", base: "esri-feature-expression", loadingSpinnerContainer: "esri-feature__loading-container", spinner: "esri-feature__loading-spinner" }; var u11 = class extends O2 { constructor(e23, t25) { super(e23, t25), this.viewModel = new E4(); } initialize() { this.own(l4(() => this.viewModel?.contentElementViewModel, () => this._setupExpressionWidget(), h2)); } destroy() { this._destroyContentWidget(); } renderLoading() { return n6("div", { key: "loading-container", class: c22.loadingSpinnerContainer }, n6("span", { class: this.classes(c22.iconLoading, c22.spinner) })); } render() { const { state: e23 } = this.viewModel; return n6("div", { class: c22.base }, e23 === "loading" ? this.renderLoading() : e23 === "disabled" ? null : this._contentWidget?.render()); } _destroyContentWidget() { const { _contentWidget: e23 } = this; e23 && (e23.viewModel = null, e23.destroy()), this._contentWidget = null; } _setupExpressionWidget() { const { contentElementViewModel: e23, contentElement: t25 } = this.viewModel, o30 = t25?.type; this._destroyContentWidget(); const s30 = e23 ? o30 === "fields" ? new c17({ viewModel: e23 }) : o30 === "media" ? new F3({ viewModel: e23 }) : o30 === "text" ? new l12({ viewModel: e23 }) : null : null; this._contentWidget = s30, this.scheduleRender(); } }; e([d({ type: E4 })], u11.prototype, "viewModel", void 0), u11 = e([n3("esri.widgets.Feature.FeatureExpression")], u11); var m16 = u11; // node_modules/@arcgis/core/arcade/featureset/support/FeatureSetQueryInterceptor.js var e14 = class { constructor(e23, a34) { this.preLayerQueryCallback = e23, this.preRequestCallback = a34, this.preLayerQueryCallback || (this.preLayerQueryCallback = (e24) => { }), this.preRequestCallback || (this.preLayerQueryCallback = (e24) => { }); } }; // node_modules/@arcgis/core/widgets/Feature/FeatureViewModel.js var q3; var D2 = 1; var Q3 = "content-view-models"; var B4 = "esri.widgets.FeatureViewModel"; var G2 = s.getLogger(B4); var H3 = { attachmentsContent: true, chartAnimation: true, customContent: true, expressionContent: true, fieldsContent: true, mediaContent: true, textContent: true }; var z3 = q3 = class extends y { constructor(e23) { super(e23), this._handles = new u3(), this._error = null, this._featureAbortController = null, this.graphicChangedThrottled = e7(this._graphicChanged, D2, this), this._expressionAttributes = null, this._graphicExpressionAttributes = null, this.abilities = { ...H3 }, this.content = null, this.contentViewModels = [], this.defaultPopupTemplateEnabled = false, this.formattedAttributes = null, this.lastEditInfo = null, this.relatedInfos = new Map(), this.title = "", this.view = null, this._isAllowedContentType = (e24) => { const { abilities: t25 } = this; return e24.type === "attachments" && t25.attachmentsContent || e24.type === "custom" && t25.customContent || e24.type === "fields" && t25.fieldsContent || e24.type === "media" && t25.mediaContent || e24.type === "text" && t25.textContent || e24.type === "expression" && t25.expressionContent; }, this._handles.add(l4(() => [this.graphic, this._effectivePopupTemplate, this.abilities], () => this.graphicChangedThrottled(), h2)); } destroy() { this._clear(), this._cancelFeatureQuery(), this._error = null, this._handles.destroy(), this._handles = null, this.graphic = null, this._destroyContentViewModels(), this.relatedInfos.clear(); } get _effectivePopupTemplate() { return r(this.graphic) ? this.graphic.getEffectivePopupTemplate(this.defaultPopupTemplateEnabled) : null; } get _fieldInfoMap() { return X(Y3(this._effectivePopupTemplate), this._sourceLayer); } get _sourceLayer() { return j6(this.graphic); } castAbilities(e23) { return { ...H3, ...e23 }; } get state() { return this.graphic ? this._error ? "error" : this.waitingForContent ? "loading" : "ready" : "disabled"; } set graphic(e23) { this._set("graphic", e23 ? e23.clone() : null); } get spatialReference() { return this.get("view.spatialReference") || null; } set spatialReference(e23) { e23 !== void 0 ? this._override("spatialReference", e23) : this._clearOverride("spatialReference"); } get map() { return this.get("view.map") || null; } set map(e23) { e23 !== void 0 ? this._override("map", e23) : this._clearOverride("map"); } get waitingForContent() { return !!this._featureAbortController; } setActiveMedia(e23, t25) { const r24 = this.contentViewModels[e23]; r24 instanceof b6 && r24.setActiveMedia(t25); } nextMedia(e23) { const t25 = this.contentViewModels[e23]; t25 instanceof b6 && t25.next(); } previousMedia(e23) { const t25 = this.contentViewModels[e23]; t25 instanceof b6 && t25.previous(); } _clear() { this._set("title", ""), this._set("content", null), this._set("formattedAttributes", null); } async _graphicChanged() { this._cancelFeatureQuery(), this._error = null, this._clear(); const { graphic: e23 } = this; if (!e23) return; const t25 = new AbortController(); this._featureAbortController = t25; try { await this._queryFeature({ signal: t25.signal }); } catch (r24) { g(r24) || (this._error = r24, G2.error("error", "The popupTemplate could not be displayed for this feature.", { error: r24, graphic: e23, popupTemplate: this._effectivePopupTemplate })); } this._featureAbortController === t25 && (this._featureAbortController = null); } _cancelFeatureQuery() { const { _featureAbortController: e23 } = this; e23 && e23.abort(), this._featureAbortController = null; } _compileContentElement(e23, t25) { return e23.type === "attachments" ? this._compileAttachments(e23, t25) : e23.type === "custom" ? this._compileCustom(e23, t25) : e23.type === "fields" ? this._compileFields(e23, t25) : e23.type === "media" ? this._compileMedia(e23, t25) : e23.type === "text" ? this._compileText(e23, t25) : e23.type === "expression" ? this._compileExpression(e23, t25) : void 0; } _compileContent(e23) { if (this._destroyContentViewModels(), this.graphic) return Array.isArray(e23) ? e23.filter(this._isAllowedContentType).map((e24, t25) => this._compileContentElement(e24, t25)) : typeof e23 == "string" ? this._compileText(new c7({ text: e23 }), 0).text : e23; } _destroyContentViewModels() { this._handles?.remove(Q3), this.contentViewModels.forEach((e23) => e23 && !e23.destroyed && e23.destroy()), this._set("contentViewModels", []); } _setExpressionContentVM(e23, t25) { const { formattedAttributes: r24 } = this, { contentElement: i32, contentElementViewModel: o30 } = e23, s30 = i32?.type; o30 && s30 && (s30 === "fields" && (this._createFieldsFormattedAttributes({ contentElement: i32, contentElementIndex: t25, formattedAttributes: r24 }), o30.set(this._createFieldsVMParams(i32, t25))), s30 === "media" && (this._createMediaFormattedAttributes({ contentElement: i32, contentElementIndex: t25, formattedAttributes: r24 }), o30.set(this._createMediaVMParams(i32, t25))), s30 === "text" && o30.set(this._createTextVMParams(i32))); } _compileExpression(e23, t25) { const { expressionInfo: r24 } = e23, { graphic: i32, map: o30, spatialReference: s30, view: n34 } = this, a34 = new E4({ expressionInfo: r24, graphic: i32, interceptor: q3.interceptor, map: o30, spatialReference: s30, view: n34 }); return this.contentViewModels[t25] = a34, this._handles.add(l4(() => a34.contentElementViewModel, () => this._setExpressionContentVM(a34, t25), h2), Q3), e23; } _compileAttachments(e23, t25) { const { graphic: r24 } = this, { description: i32, title: o30 } = e23; return this.contentViewModels[t25] = new c14({ graphic: r24, ...this._compileTitleAndDesc({ title: o30, description: i32 }) }), e23; } _compileCustom(e23, t25) { const { graphic: r24 } = this, { creator: i32, destroyer: o30 } = e23; return this.contentViewModels[t25] = new l11({ graphic: r24, creator: i32, destroyer: o30 }), e23; } _compileTitleAndDesc({ title: e23, description: t25 }) { const { _fieldInfoMap: r24, _sourceLayer: i32, graphic: o30, formattedAttributes: s30, _expressionAttributes: n34 } = this, { attributes: a34 } = o30, l27 = s30.global; return { title: $({ attributes: a34, fieldInfoMap: r24, globalAttributes: l27, expressionAttributes: n34, layer: i32, text: e23 }), description: $({ attributes: a34, fieldInfoMap: r24, globalAttributes: l27, expressionAttributes: n34, layer: i32, text: t25 }) }; } _createFieldsVMParams(e23, t25) { const { _effectivePopupTemplate: r24, formattedAttributes: i32 } = this, o30 = { ...i32.global, ...i32.content[t25] }, s30 = (e23?.fieldInfos || r24?.fieldInfos)?.filter(({ fieldName: e24 }) => C2(e24) || ue(e24) || o30.hasOwnProperty(e24)), n34 = r24?.expressionInfos, { description: a34, title: l27 } = e23; return { attributes: o30, expressionInfos: n34, fieldInfos: s30, ...this._compileTitleAndDesc({ title: l27, description: a34 }) }; } _compileFields(e23, t25) { const r24 = e23.clone(), i32 = new n14(this._createFieldsVMParams(e23, t25)); return this.contentViewModels[t25] = i32, r24.fieldInfos = i32.formattedFieldInfos.slice(0), r24; } _createMediaVMParams(e23, t25) { const { abilities: r24, graphic: i32, _fieldInfoMap: o30, formattedAttributes: s30, _effectivePopupTemplate: n34, relatedInfos: a34, _sourceLayer: l27, _expressionAttributes: p36 } = this, { attributes: c42 } = i32, { description: d20, mediaInfos: u23, title: f14 } = e23; return { abilities: { chartAnimation: r24.chartAnimation }, activeMediaInfoIndex: e23.activeMediaInfoIndex || 0, attributes: c42, layer: l27, fieldInfoMap: o30, formattedAttributes: { ...s30.global, ...s30.content[t25] }, expressionAttributes: p36, mediaInfos: u23, popupTemplate: n34, relatedInfos: a34, ...this._compileTitleAndDesc({ title: f14, description: d20 }) }; } _compileMedia(e23, t25) { const r24 = e23.clone(), i32 = new b6(this._createMediaVMParams(e23, t25)); return r24.mediaInfos = i32.formattedMediaInfos.slice(0), this.contentViewModels[t25] = i32, r24; } _createTextVMParams(e23) { const { graphic: t25, _fieldInfoMap: r24, _sourceLayer: i32, _expressionAttributes: o30 } = this; if (e23 && e23.text) { const { attributes: s30 } = t25, n34 = this.formattedAttributes.global; e23.text = $({ attributes: s30, fieldInfoMap: r24, globalAttributes: n34, expressionAttributes: o30, layer: i32, text: e23.text }); } return { graphic: t25, creator: e23.text }; } _compileText(e23, t25) { const r24 = e23.clone(); return this.contentViewModels[t25] = new l11(this._createTextVMParams(r24)), r24; } _compileLastEditInfo() { const { _effectivePopupTemplate: e23, _sourceLayer: t25, graphic: r24 } = this; if (!e23) return; const { lastEditInfoEnabled: i32 } = e23, o30 = t25?.editFieldsInfo; return i32 && o30 ? W(o30, r24.attributes) : void 0; } _compileTitle(e23) { const { _fieldInfoMap: t25, _sourceLayer: r24, graphic: i32, _expressionAttributes: o30 } = this, { attributes: s30 } = i32, n34 = this.formattedAttributes.global; return $({ attributes: s30, fieldInfoMap: t25, globalAttributes: n34, expressionAttributes: o30, layer: r24, text: e23 }); } async _getTitle() { const { _effectivePopupTemplate: e23, graphic: t25 } = this, r24 = e23?.title; return x2(r24, { graphic: t25 }); } async _getContent() { const { _effectivePopupTemplate: e23, graphic: t25 } = this, r24 = e23?.content; return x2(r24, { graphic: t25 }); } async _queryFeature(e23) { const { _featureAbortController: t25, _sourceLayer: r24, graphic: i32, _effectivePopupTemplate: o30, spatialReference: s30, map: n34, view: a34 } = this, { content: { value: p36 }, title: { value: c42 } } = await E({ content: this._getContent(), title: this._getTitle() }); if (t25 !== this._featureAbortController || !i32) return; await ae({ graphic: i32, popupTemplate: o30, layer: r24, spatialReference: s30 }, e23); const { expressionAttributes: { value: d20 } } = await E({ checkForRelatedFeatures: this._checkForRelatedFeatures(e23), expressionAttributes: d8({ expressionInfos: o30?.expressionInfos, spatialReference: s30, graphic: i32, map: n34, interceptor: q3.interceptor, view: a34 }) }); t25 === this._featureAbortController && i32 && (this._expressionAttributes = d20, this._graphicExpressionAttributes = { ...i32.attributes, ...d20 }, this._set("formattedAttributes", this._createFormattedAttributes(p36)), this._set("title", this._compileTitle(c42)), this._set("lastEditInfo", this._compileLastEditInfo() || null), this._set("content", this._compileContent(p36) || null)); } _createMediaFormattedAttributes({ contentElement: e23, contentElementIndex: t25, formattedAttributes: r24 }) { const { _effectivePopupTemplate: i32, graphic: o30, relatedInfos: s30, _sourceLayer: n34, _fieldInfoMap: a34, _graphicExpressionAttributes: l27 } = this; r24.content[t25] = ne({ fieldInfos: i32?.fieldInfos, graphic: o30, attributes: { ...l27, ...e23.attributes }, layer: n34, fieldInfoMap: a34, relatedInfos: s30 }); } _createFieldsFormattedAttributes({ contentElement: e23, contentElementIndex: t25, formattedAttributes: r24 }) { if (e23.fieldInfos) { const { graphic: i32, relatedInfos: o30, _sourceLayer: s30, _fieldInfoMap: n34, _graphicExpressionAttributes: a34 } = this; r24.content[t25] = ne({ fieldInfos: e23.fieldInfos, graphic: i32, attributes: { ...a34, ...e23.attributes }, layer: s30, fieldInfoMap: n34, relatedInfos: o30 }); } } _createFormattedAttributes(e23) { const { _effectivePopupTemplate: t25, graphic: r24, relatedInfos: i32, _sourceLayer: o30, _fieldInfoMap: s30, _graphicExpressionAttributes: n34 } = this, a34 = t25?.fieldInfos, l27 = { global: ne({ fieldInfos: a34, graphic: r24, attributes: n34, layer: o30, fieldInfoMap: s30, relatedInfos: i32 }), content: [] }; return Array.isArray(e23) && e23.forEach((e24, t26) => { e24.type === "fields" && this._createFieldsFormattedAttributes({ contentElement: e24, contentElementIndex: t26, formattedAttributes: l27 }), e24.type === "media" && this._createMediaFormattedAttributes({ contentElement: e24, contentElementIndex: t26, formattedAttributes: l27 }); }), l27; } _checkForRelatedFeatures(e23) { const { graphic: t25, _effectivePopupTemplate: r24 } = this; return this._queryRelatedInfos(t25, Y3(r24), e23); } async _queryRelatedInfos(e23, t25, r24) { const { relatedInfos: i32, _sourceLayer: o30 } = this; i32.clear(); const s30 = r(o30.associatedLayer) ? await o30.associatedLayer.load(r24) : o30; if (!s30) return; const a34 = t25.filter((e24) => e24 && ue(e24.fieldName)); if (!a34 || !a34.length) return; t25.forEach((e24) => this._configureRelatedInfo(e24, s30)); const l27 = await b5({ relatedInfos: i32, layer: s30 }, r24); Object.keys(l27).forEach((e24) => { const t26 = i32.get(e24.toString()), r25 = l27[e24]?.value; t26 && r25 && (t26.layerInfo = r25.data); }); const p36 = await R4({ graphic: e23, relatedInfos: i32, layer: s30 }, r24); Object.keys(p36).forEach((e24) => { F2(p36[e24]?.value, i32.get(e24.toString())); }); } _configureRelatedInfo(e23, t25) { const { relatedInfos: r24 } = this, i32 = d7(e23.fieldName); if (!i32) return; const { layerId: o30, fieldName: s30 } = i32; if (!o30) return; const n34 = r24.get(o30.toString()) || h9(o30, t25); n34 && ($2({ relatedInfo: n34, fieldName: s30, fieldInfo: e23 }), this.relatedInfos.set(o30, n34)); } }; z3.interceptor = new e14(pe, me), e([d()], z3.prototype, "_error", void 0), e([d()], z3.prototype, "_featureAbortController", void 0), e([d({ readOnly: true })], z3.prototype, "_effectivePopupTemplate", null), e([d({ readOnly: true })], z3.prototype, "_fieldInfoMap", null), e([d({ readOnly: true })], z3.prototype, "_sourceLayer", null), e([d()], z3.prototype, "abilities", void 0), e([s3("abilities")], z3.prototype, "castAbilities", null), e([d({ readOnly: true })], z3.prototype, "content", void 0), e([d({ readOnly: true })], z3.prototype, "contentViewModels", void 0), e([d({ type: Boolean })], z3.prototype, "defaultPopupTemplateEnabled", void 0), e([d({ readOnly: true })], z3.prototype, "state", null), e([d({ readOnly: true })], z3.prototype, "formattedAttributes", void 0), e([d({ type: g2, value: null })], z3.prototype, "graphic", null), e([d({ readOnly: true })], z3.prototype, "lastEditInfo", void 0), e([d({ readOnly: true })], z3.prototype, "relatedInfos", void 0), e([d()], z3.prototype, "spatialReference", null), e([d({ readOnly: true })], z3.prototype, "title", void 0), e([d()], z3.prototype, "map", null), e([d({ readOnly: true })], z3.prototype, "waitingForContent", null), e([d()], z3.prototype, "view", void 0), z3 = q3 = e([n3(B4)], z3); var J3 = z3; // node_modules/@arcgis/core/widgets/Feature/support/FeatureContentMixin.js var i12 = (i32) => { let c42 = class extends i32 { constructor() { super(...arguments), this.renderNodeContent = (e23) => e5(e23) && !e23.destroyed ? n6("div", { key: e23 }, e23.render()) : e23 instanceof HTMLElement ? n6("div", { key: e23, bind: e23, afterCreate: this._attachToNode }) : t9(e23) ? n6("div", { key: e23, bind: e23.domNode, afterCreate: this._attachToNode }) : null; } _attachToNode(e23) { const r24 = this; e23.appendChild(r24); } }; return c42 = e([n3("esri.widgets.Feature.ContentMixin")], c42), c42; }; // node_modules/@arcgis/core/widgets/Feature.js var _4 = { iconText: "esri-icon-font-fallback-text", iconLoading: "esri-icon-loading-indicator esri-rotating", esriTable: "esri-widget__table", esriWidget: "esri-widget", base: "esri-feature", container: "esri-feature__size-container", title: "esri-feature__title", main: "esri-feature__main-container", btn: "esri-feature__button", icon: "esri-feature__icon", content: "esri-feature__content", contentElement: "esri-feature__content-element", text: "esri-feature__text", lastEditedInfo: "esri-feature__last-edited-info", fields: "esri-feature__fields", fieldHeader: "esri-feature__field-header", fieldData: "esri-feature__field-data", fieldDataDate: "esri-feature__field-data--date", loadingSpinnerContainer: "esri-feature__loading-container", spinner: "esri-feature__loading-spinner" }; var w9 = { title: true, content: true, lastEditedInfo: true }; var M7 = class extends i12(O2) { constructor(e23, t25) { super(e23, t25), this._contentWidgets = [], this.graphic = null, this.defaultPopupTemplateEnabled = false, this.headingLevel = 2, this.label = void 0, this.messages = null, this.messagesCommon = null, this.messagesURIUtils = null, this.spatialReference = null, this.title = null, this.visibleElements = { ...w9 }, this.map = null, this.view = null, this.viewModel = new J3(); } initialize() { this.own(l4(() => this.viewModel?.contentViewModels, () => this._setupContentWidgets(), h2)); } loadDependencies() { return import("./calcite-notice-BQXO4DEI.js"); } destroy() { this._destroyContentWidgets(); } castVisibleElements(e23) { return { ...w9, ...e23 }; } render() { const { state: e23 } = this.viewModel, t25 = n6("div", { class: _4.container, key: "container" }, this.renderTitle(), e23 === "error" ? this.renderError() : e23 === "loading" ? this.renderLoading() : this.renderContentContainer()); return n6("div", { class: this.classes(_4.base, _4.esriWidget) }, t25); } setActiveMedia(e23, t25) { this.viewModel.setActiveMedia(e23, t25); } nextMedia(e23) { this.viewModel.nextMedia(e23); } previousMedia(e23) { this.viewModel.previousMedia(e23); } renderError() { const { messagesCommon: e23, messages: t25, visibleElements: s30 } = this; return n6("calcite-notice", { active: true, color: "red", icon: "exclamation-mark-circle", scale: "s" }, s30.title ? n6("div", { key: "error-title", slot: "title" }, e23.errorMessage) : null, n6("div", { key: "error-message", slot: "message" }, t25.loadingError)); } renderLoading() { return n6("div", { key: "loading-container", class: _4.loadingSpinnerContainer }, n6("span", { class: this.classes(_4.iconLoading, _4.spinner) })); } renderContentContainer() { const { visibleElements: e23 } = this; return e23.content ? n6("div", { class: _4.main }, [this.renderContent(), this.renderLastEditInfo()]) : null; } renderTitle() { const { visibleElements: e23, title: t25 } = this; return e23.title ? n6(n12, { level: this.headingLevel, class: _4.title, innerHTML: t25 }) : null; } renderContent() { const e23 = this.viewModel.content, t25 = "content"; if (!e23) return null; if (Array.isArray(e23)) return e23.length ? n6("div", { key: `${t25}-content-elements` }, e23.map(this.renderContentElement, this)) : null; if (typeof e23 == "string") { const e24 = this._contentWidgets[0]; return !e24 || e24.destroyed ? null : n6("div", { key: `${t25}-content` }, e24.render()); } return this.renderNodeContent(e23); } renderContentElement(e23, t25) { const { visibleElements: s30 } = this; if (typeof s30.content != "boolean" && !s30.content[e23.type]) return null; switch (e23.type) { case "attachments": return this.renderAttachments(t25); case "custom": return this.renderCustom(e23, t25); case "fields": return this.renderFields(t25); case "media": return this.renderMedia(t25); case "text": return this.renderText(e23, t25); case "expression": return this.renderExpression(t25); default: return null; } } renderAttachments(e23) { const t25 = this._contentWidgets[e23]; if (!t25 || t25.destroyed) return null; const { state: s30, attachmentInfos: i32 } = t25.viewModel; return s30 === "loading" || i32.length > 0 ? n6("div", { key: this._buildKey("attachments-element", e23), class: this.classes(_4.contentElement) }, t25.render()) : null; } renderExpression(e23) { const t25 = this._contentWidgets[e23]; return !t25 || t25.destroyed ? null : n6("div", { key: this._buildKey("expression-element", e23), class: _4.contentElement }, t25.render()); } renderCustom(e23, t25) { const { creator: s30 } = e23, i32 = this._contentWidgets[t25]; return !i32 || i32.destroyed ? null : s30 ? n6("div", { key: this._buildKey("custom-element", t25), class: _4.contentElement }, i32.render()) : null; } renderFields(e23) { const t25 = this._contentWidgets[e23]; return !t25 || t25.destroyed ? null : n6("div", { key: this._buildKey("fields-element", e23), class: _4.contentElement }, t25.render()); } renderMedia(e23) { const t25 = this._contentWidgets[e23]; return !t25 || t25.destroyed ? null : n6("div", { key: this._buildKey("media-element", e23), class: _4.contentElement }, t25.render()); } renderLastEditInfo() { const { visibleElements: e23, messages: t25 } = this, { lastEditInfo: s30 } = this.viewModel; if (!s30 || !e23.lastEditedInfo) return null; const { date: i32, user: n34 } = s30, r24 = s30.type === "edit" ? n34 ? t25.lastEditedByUser : t25.lastEdited : n34 ? t25.lastCreatedByUser : t25.lastCreated, o30 = s4(r24, { date: i32, user: n34 }); return n6("div", { key: "edit-info-element", class: this.classes(_4.lastEditedInfo, _4.contentElement) }, o30); } renderText(e23, t25) { const s30 = e23.text, i32 = this._contentWidgets[t25]; return !i32 || i32.destroyed ? null : s30 ? n6("div", { key: this._buildKey("text-element", t25), class: this.classes(_4.contentElement, _4.text) }, i32.render()) : null; } _buildKey(e23, ...t25) { return `${e23}__${this.get("viewModel.graphic.uid") || "0"}-${t25.join("-")}`; } _destroyContentWidget(e23) { e23 && (e23.viewModel = null, !e23.destroyed && e23.destroy()); } _destroyContentWidgets() { this._contentWidgets.forEach((e23) => this._destroyContentWidget(e23)), this._contentWidgets = []; } _setupContentWidgets() { this._destroyContentWidgets(); const { headingLevel: e23, visibleElements: t25 } = this, s30 = this.get("viewModel.content"), { contentViewModels: i32 } = this.viewModel; if (Array.isArray(s30)) s30.forEach((s31, n34) => { s31.type === "attachments" && (this._contentWidgets[n34] = new m12({ displayType: s31.displayType, headingLevel: t25.title ? e23 + 1 : e23, viewModel: i32[n34] })), s31.type === "fields" && (this._contentWidgets[n34] = new c17({ viewModel: i32[n34] })), s31.type === "media" && (this._contentWidgets[n34] = new F3({ viewModel: i32[n34] })), s31.type === "text" && (this._contentWidgets[n34] = new l12({ viewModel: i32[n34] })), s31.type === "custom" && (this._contentWidgets[n34] = new l12({ viewModel: i32[n34] })), s31.type === "expression" && (this._contentWidgets[n34] = new m16({ viewModel: i32[n34] })); }, this); else { const e24 = i32[0]; e24 && !e24.destroyed && (this._contentWidgets[0] = new l12({ viewModel: e24 })); } this.scheduleRender(); } }; e([o9("viewModel.graphic")], M7.prototype, "graphic", void 0), e([o9("viewModel.defaultPopupTemplateEnabled")], M7.prototype, "defaultPopupTemplateEnabled", void 0), e([d()], M7.prototype, "headingLevel", void 0), e([d({ aliasOf: { source: "messages.widgetLabel", overridable: true } })], M7.prototype, "label", void 0), e([d(), e4("esri/widgets/Feature/t9n/Feature")], M7.prototype, "messages", void 0), e([d(), e4("esri/t9n/common")], M7.prototype, "messagesCommon", void 0), e([d(), e4("esri/widgets/support/t9n/uriUtils")], M7.prototype, "messagesURIUtils", void 0), e([o9("viewModel.spatialReference")], M7.prototype, "spatialReference", void 0), e([o9("viewModel.title")], M7.prototype, "title", void 0), e([d()], M7.prototype, "visibleElements", void 0), e([s3("visibleElements")], M7.prototype, "castVisibleElements", null), e([o9("viewModel.map")], M7.prototype, "map", void 0), e([o9("viewModel.view")], M7.prototype, "view", void 0), e([d({ type: J3 })], M7.prototype, "viewModel", void 0), M7 = e([n3("esri.widgets.Feature")], M7); var E5 = M7; // node_modules/@arcgis/core/widgets/support/AnchorElementViewModel.js var l15; var d9 = Symbol("anchorHandles"); var m17 = class extends n5.EventedAccessor { constructor(o30) { super(o30), this[l15] = new u3(), this.location = null, this.screenLocationEnabled = false, this.view = null, this[d9].add([f2(() => o(this.screenLocationEnabled ? this.view : null, (o31) => [o31.size, o31.type === "3d" ? o31.camera : o31.viewpoint]), () => this.notifyChange("screenLocation")), l4(() => this.screenLocation, (o31, e23) => { r(o31) && r(e23) && this.emit("view-change"); })]); } destroy() { this.view = null, this[d9] = l(this[d9]); } get screenLocation() { const { location: o30, view: e23, screenLocationEnabled: t25 } = this; return t25 && r(o30) && r(e23) && e23.ready ? e23.toScreen(o30) : null; } }; l15 = d9, e([d()], m17.prototype, "location", void 0), e([d()], m17.prototype, "screenLocation", null), e([d()], m17.prototype, "screenLocationEnabled", void 0), e([d()], m17.prototype, "view", void 0), m17 = e([n3("esri.widgets.support.AnchorElementViewModel")], m17); var h11 = m17; // node_modules/@arcgis/core/widgets/Spinner/SpinnerViewModel.js var t13 = "esri.widgets.CompassViewModel"; var p13 = class extends h11 { constructor(s30) { super(s30), this.visible = false; } }; e([d()], p13.prototype, "visible", void 0), p13 = e([n3(t13)], p13); var c23 = p13; // node_modules/@arcgis/core/widgets/Spinner.js var c24 = { base: "esri-spinner", spinnerStart: "esri-spinner--start", spinnerFinish: "esri-spinner--finish" }; var h12 = class extends O2 { constructor(i32, s30) { super(i32, s30), this._animationDelay = 500, this._animationPromise = null, this.location = null, this.view = null, this.viewModel = new c23(), this.visible = false; } initialize() { this.own([l4(() => this.visible, (i32) => this._visibleChange(i32))]); } destroy() { this._animationPromise = null; } show(i32) { const { location: s30, promise: e23 } = i32; s30 && (this.viewModel.location = s30), this.visible = true; const o30 = () => this.hide(); e23 && e23.catch(() => { }).then(o30); } hide() { this.visible = false; } render() { const { visible: i32 } = this, { screenLocation: s30 } = this.viewModel, e23 = !!s30, o30 = i32 && e23, t25 = !i32 && e23, r24 = { [c24.spinnerStart]: o30, [c24.spinnerFinish]: t25 }, n34 = this._getPositionStyles(); return n6("div", { class: this.classes(c24.base, r24), styles: n34 }); } _visibleChange(i32) { if (i32) return void (this.viewModel.screenLocationEnabled = true); const s30 = L(this._animationDelay); this._animationPromise = s30, s30.catch(() => { }).then(() => { this._animationPromise === s30 && (this.viewModel.screenLocationEnabled = false, this._animationPromise = null); }); } _getPositionStyles() { const { screenLocation: i32, view: e23 } = this.viewModel; if (t(e23) || t(i32)) return {}; const { padding: o30 } = e23; return { left: i32.x - o30.left + "px", top: i32.y - o30.top + "px" }; } }; e([o9("viewModel.location")], h12.prototype, "location", void 0), e([o9("viewModel.view")], h12.prototype, "view", void 0), e([d({ type: c23 })], h12.prototype, "viewModel", void 0), e([o9("viewModel.visible")], h12.prototype, "visible", void 0), h12 = e([n3("esri.widgets.Spinner")], h12); var m18 = h12; // node_modules/@arcgis/core/symbols/support/symbolUtils.js function v9(e23) { return e23 && "opacity" in e23 ? e23.opacity * v9(e23.parent) : 1; } async function x4(i32, s30) { if (!i32) return; const o30 = i32.sourceLayer, a34 = (r(s30) && s30.useSourceLayer ? o30 : i32.layer) ?? o30, f14 = v9(a34); if (r(i32.symbol) && (!r(s30) || s30.ignoreGraphicSymbol !== true)) { const t25 = i32.symbol.type === "web-style" ? await i32.symbol.fetchSymbol({ ...s30, cache: r(s30) ? s30.webStyleCache : null }) : i32.symbol.clone(); return x(t25, null, f14), t25; } const h19 = r(s30) && s30.renderer || a34 && "renderer" in a34 && a34.renderer; let y17 = h19 && "getSymbolAsync" in h19 ? await h19.getSymbolAsync(i32, s30) : null; if (!y17) return; if (y17 = y17.type === "web-style" ? await y17.fetchSymbol({ ...s30, cache: r(s30) ? s30.webStyleCache : null }) : y17.clone(), !("visualVariables" in h19) || !h19.visualVariables || !h19.visualVariables.length) return x(y17, null, f14), y17; if ("arcadeRequiredForVisualVariables" in h19 && h19.arcadeRequiredForVisualVariables && (t(s30) || t(s30.arcade))) { const e23 = { ...e2(s30) }; e23.arcade = await a10(), s30 = e23; } const p36 = await import("./visualVariableUtils-ABC432IV.js"), d20 = [], m29 = [], b10 = [], g20 = []; for (const e23 of h19.visualVariables) switch (e23.type) { case "color": d20.push(e23); break; case "opacity": m29.push(e23); break; case "rotation": g20.push(e23); break; case "size": e23.target || b10.push(e23); } const w13 = !!d20.length && d20[d20.length - 1], S8 = w13 ? p36.getColor(w13, i32, s30) : null, x5 = !!m29.length && m29[m29.length - 1]; let V5 = x5 ? p36.getOpacity(x5, i32, s30) : null; if (f14 != null && (V5 = V5 != null ? V5 * f14 : f14), x(y17, S8, V5), b10.length) { const e23 = p36.getAllSizes(b10, i32, s30); await M4(y17, e23); } for (const e23 of g20) N(y17, p36.getRotationAngle(e23, i32, s30), e23.axis); return y17; } // node_modules/@arcgis/core/views/support/layerViewUtils.js function e15(n34) { return n34 && typeof n34.highlight == "function"; } // node_modules/@arcgis/core/widgets/Popup/actions.js var s13 = { iconZoom: "esri-icon-zoom-in-magnifying-glass", iconTrash: "esri-icon-trash", iconBrowseClusteredFeatures: "esri-icon-table" }; var o17 = new a11({ id: "zoom-to-feature", title: "{messages.zoom}", className: s13.iconZoom }); var t15 = new a11({ id: "remove-selected-feature", title: "{messages.remove}", className: s13.iconTrash }); var r16 = new a11({ id: "zoom-to-clustered-features", title: "{messages.zoom}", className: s13.iconZoom }); var i13 = new a11({ id: "browse-clustered-features", title: "{messages.browseClusteredFeatures}", className: s13.iconBrowseClusteredFeatures }); // node_modules/@arcgis/core/widgets/Popup/actionUtils.js var s14 = "esri.widgets.Popup.PopupViewModel"; var c25 = s.getLogger(s14); var u12 = (t25) => { const { event: s30, view: c42 } = t25, { action: u23 } = s30, d20 = c42 && c42.popup; if (!u23) return Promise.reject(new s2("trigger-action:missing-arguments", "Event has no action")); if (!d20) return Promise.reject(new s2("trigger-action:missing-arguments", "view.popup is missing")); const { disabled: l27, id: g20 } = u23; if (!g20) return Promise.reject(new s2("trigger-action:invalid-action", "action.id is missing")); if (l27) return Promise.reject(new s2("trigger-action:invalid-action", "Action is disabled")); if (g20 === o17.id) return w10(d20.viewModel).catch(b); if (g20 === r16.id) return p14(d20.viewModel); if (g20 === i13.id) return d20.featureMenuOpen = !d20.featureMenuOpen, d20.viewModel.browseClusterEnabled = !d20.viewModel.browseClusterEnabled, Promise.resolve(); if (d20.viewModel.browseClusterEnabled = false, g20 === t15.id) { d20.close(); const { selectedFeature: t26 } = d20; if (!t26) return Promise.reject(new s2(`trigger-action:${t15.id}`, "selectedFeature is required", { selectedFeature: t26 })); const { sourceLayer: r24 } = t26; return r24 ? r24.remove(t26) : c42.graphics.remove(t26), Promise.resolve(); } return Promise.resolve(); }; function d10(e23) { const { selectedFeature: t25, location: r24, view: o30 } = e23; if (!o30) return null; if (o30.type === "3d") return t25 || r24; return e23.get("selectedFeature.geometry") || r24; } function l17(e23) { return e23?.isAggregate && e23?.sourceLayer?.featureReduction?.type === "cluster"; } function g11(t25, r24) { if (r24?.type !== "3d" || !t25 || t25.declaredClass !== "esri.Graphic") return true; const o30 = r24.getViewForGraphic(t25); if (o30 && "whenGraphicBounds" in o30) { let r25 = false; return o30.whenGraphicBounds(t25, { useViewElevation: true }).then((e23) => { r25 = !e23 || !e23.boundingBox || e23.boundingBox[0] === e23.boundingBox[3] && e23.boundingBox[1] === e23.boundingBox[4] && e23.boundingBox[2] === e23.boundingBox[5]; }).catch(() => { const r26 = new s2("zoom-to:invalid-graphic", "Could not zoom to the location of the graphic.", { graphic: t25 }); c25.error(r26); }), r25; } return true; } async function w10(t25) { const { location: r24, selectedFeature: i32, view: n34, zoomFactor: a34 } = t25, s30 = d10(t25); if (!s30) { const t26 = new s2("zoom-to:invalid-target-or-view", "Cannot zoom to location without a target and view.", { target: s30, view: n34 }); throw c25.error(t26), t26; } const u23 = n34.scale / a34, l27 = t25.get("selectedFeature.geometry") || r24, w13 = l27 && l27.type === "point" && g11(i32, n34); o17.active = true, o17.disabled = true; try { await t25.view.goTo({ target: s30, scale: w13 ? u23 : void 0 }); } finally { o17.active = false, o17.disabled = false, t25.zoomToLocation = null, w13 && (t25.location = l27); } } async function p14(t25) { const { selectedFeature: r24, view: o30 } = t25; if (o30?.type !== "2d") { const t26 = new s2("zoomToCluster:invalid-view", "View must be 2d MapView.", { view: o30 }); throw c25.error(t26), t26; } if (!l17(r24)) { const t26 = new s2("zoomToCluster:invalid-selectedFeature", "Selected feature must represent an aggregate/cluster graphic.", { selectedFeature: r24 }); throw c25.error(t26), t26; } const n34 = r24.sourceLayer, a34 = await o30.whenLayerView(n34), s30 = a34.createQuery(); s30.aggregateIds = [r24.getObjectId()], r16.active = true, r16.disabled = true; const { extent: u23 } = await a34.queryExtent(s30); await o30.goTo({ target: u23 }), r16.active = false, r16.disabled = false; } async function f9(e23) { const { selectedFeature: t25, view: r24 } = e23, o30 = t25.sourceLayer, i32 = await r24.whenLayerView(o30), n34 = i32.createQuery(); n34.aggregateIds = [t25.getObjectId()]; const { extent: a34 } = await i32.queryExtent(n34); e23.selectedClusterBoundaryFeature.geometry = a34, r24.graphics.add(e23.selectedClusterBoundaryFeature); } async function v10(e23) { const { selectedFeature: t25, view: r24 } = e23, o30 = t25.sourceLayer, i32 = await r24.whenLayerView(o30), a34 = i32.createQuery(); a34.aggregateIds = [t25.getObjectId()], i13.active = true, i13.disabled = true; const { features: s30 } = await i32.queryFeatures(a34); i13.active = false, i13.disabled = false, r24.popup.open({ features: [t25].concat(s30), featureMenuOpen: true }); } function m19(e23) { const t25 = e23.features.filter((e24) => l17(e24)); t25.length && (e23.features = t25); } // node_modules/@arcgis/core/widgets/support/GoTo.js var e16 = (e23) => { let t25 = class extends e23 { constructor(...o30) { super(...o30), this.goToOverride = null, this.view = null; } callGoTo(o30) { const { view: r24 } = this; return this.goToOverride ? this.goToOverride(r24, o30) : r24.goTo(o30.target, o30.options); } }; return e([d()], t25.prototype, "goToOverride", void 0), e([d()], t25.prototype, "view", void 0), t25 = e([n3("esri.widgets.support.GoTo")], t25), t25; }; // node_modules/@arcgis/core/widgets/Popup/PopupViewModel.js var S6 = j3.ofType({ key: "type", defaultKeyValue: "button", base: c10, typeMap: { button: a11, toggle: a12 } }); var B5 = () => [o17.clone()]; var R5 = () => [r16.clone(), i13.clone()]; var G3 = "esri.widgets.Popup.PopupViewModel"; var z4 = s.getLogger(G3); var H4 = class extends e16(h11) { constructor(e23) { super(e23), this._handles = new u3(), this._pendingPromises = new Set(), this._fetchFeaturesController = null, this._selectedClusterFeature = null, this.featurePage = null, this.actions = new S6(), this.activeFeature = null, this.defaultPopupTemplateEnabled = false, this.autoCloseEnabled = false, this.autoOpenEnabled = true, this.browseClusterEnabled = false, this.content = null, this.featuresPerPage = 20, this.featureViewModelAbilities = null, this.featureViewModels = [], this.highlightEnabled = true, this.includeDefaultActions = true, this.selectedClusterBoundaryFeature = new g2({ symbol: new S3({ outline: { width: 1.5, color: "cyan" }, style: "none" }) }), this.title = null, this.updateLocationEnabled = false, this.view = null, this.visible = false, this.zoomFactor = 4, this.zoomToLocation = null; } get isLoadingFeature() { return this.featureViewModels.some((e23) => e23.waitingForContent); } initialize() { this._handles.add([l4(() => [this.autoOpenEnabled, this.view], () => this._autoOpenEnabledChange()), this.on("view-change", () => this._autoClose()), l4(() => [this.highlightEnabled, this.selectedFeature, this.visible, this.view], () => this._highlightSelectedFeature()), l4(() => [this.highlightEnabled, this.activeFeature, this.visible, this.view], () => this._highlightActiveFeature()), l4(() => this.view?.animation?.state, (e23) => this._animationStateChange(e23)), l4(() => this.location, (e23) => this._locationChange(e23)), l4(() => this.selectedFeature, (e23) => this._selectedFeatureChange(e23)), l4(() => [this.selectedFeatureIndex, this.featureCount, this.featuresPerPage], () => this._selectedFeatureIndexChange()), l4(() => [this.featurePage, this.selectedFeatureIndex, this.featureCount, this.featuresPerPage, this.featureViewModels], () => this._setGraphicOnFeatureViewModels()), l4(() => this.featureViewModels, () => this._featureViewModelsChange()), this.on("trigger-action", (e23) => u12({ event: e23, view: this.view })), f2(() => !this.waitingForResult, () => this._waitingForResultChange(), U), l4(() => [this.features, this.view?.map, this.view?.spatialReference], () => this._updateFeatureVMs()), l4(() => this.view?.scale, () => this._viewScaleChange()), f2(() => !this.visible, () => this.browseClusterEnabled = false), l4(() => this.browseClusterEnabled, (e23) => e23 ? this.enableClusterBrowsing() : this.disableClusterBrowsing())]); } destroy() { this._cancelFetchingFeatures(), this._handles.destroy(), this._handles = null, this._pendingPromises.clear(), this.browseClusterEnabled = false, this.view = null; } get active() { return !(!this.visible || this.waitingForResult); } get allActions() { const e23 = this._get("allActions") || new S6(); e23.removeAll(); const { actions: t25, defaultActions: i32, defaultPopupTemplateEnabled: s30, includeDefaultActions: r24, selectedFeature: o30 } = this, n34 = r24 ? i32.concat(t25) : t25, a34 = o30 && (typeof o30.getEffectivePopupTemplate == "function" && o30.getEffectivePopupTemplate(s30) || o30.popupTemplate), l27 = a34 && a34.actions, u23 = a34 && a34.overwriteActions ? l27 : l27 ? l27.concat(n34) : n34; return u23 && u23.filter(Boolean).forEach((t26) => e23.add(t26)), e23; } get defaultActions() { const e23 = this._get("defaultActions") || new S6(); return e23.removeAll(), e23.addMany(l17(this.selectedFeature) ? R5() : B5()), e23; } get featureCount() { return this.features.length; } get features() { return this._get("features") || []; } set features(e23) { const t25 = e23 || []; this._set("features", t25); const { pendingPromisesCount: i32, promiseCount: s30, selectedFeatureIndex: r24 } = this, o30 = s30 && t25.length; o30 && i32 && r24 === -1 ? this.selectedFeatureIndex = 0 : o30 && r24 !== -1 || (this.selectedFeatureIndex = t25.length ? 0 : -1); } get location() { return this._get("location") || null; } set location(e23) { const t25 = this.get("view.spatialReference.isWebMercator"); e23 && e23.get("spatialReference.isWGS84") && t25 && (e23 = R(e23)), this._set("location", e23); } get pendingPromisesCount() { return this._pendingPromises.size; } get waitingForResult() { return !(!(!!this._fetchFeaturesController || this.pendingPromisesCount > 0) || this.featureCount !== 0); } get promiseCount() { return this.promises.length; } get promises() { return this._get("promises") || []; } set promises(e23) { if (this._pendingPromises.clear(), this.features = [], !Array.isArray(e23) || !e23.length) return this._set("promises", []), void this.notifyChange("pendingPromisesCount"); this._set("promises", e23), (e23 = e23.slice(0)).forEach((e24) => { this._pendingPromises.add(e24); const t25 = (t26) => { this._pendingPromises.has(e24) && this._updateFeatures(t26), this._updatePendingPromises(e24); }, i32 = () => this._updatePendingPromises(e24); e24.then(t25, i32); }), this.notifyChange("pendingPromisesCount"); } get selectedFeature() { const { features: e23, selectedFeatureIndex: t25 } = this; if (t25 === -1) return null; return e23[t25] || null; } get selectedFeatureIndex() { const e23 = this._get("selectedFeatureIndex"); return typeof e23 == "number" ? e23 : -1; } set selectedFeatureIndex(e23) { const { featureCount: t25 } = this; e23 = isNaN(e23) || e23 < -1 || !t25 ? -1 : (e23 + t25) % t25, this.activeFeature = null, this._set("selectedFeatureIndex", e23); } get selectedFeatureViewModel() { return this.featureViewModels[this.selectedFeatureIndex] || null; } get state() { return this.get("view.ready") ? "ready" : "disabled"; } centerAtLocation() { const { view: e23 } = this, t25 = d10(this); if (!t25) { const i32 = new s2("center-at-location:invalid-target-or-view", "Cannot center at a location without a target and view.", { target: t25, view: e23 }); return z4.error(i32), Promise.reject(i32); } return this.callGoTo({ target: { target: t25, scale: e23.scale } }); } clear() { this.set({ promises: [], features: [], content: null, title: null, location: null, activeFeature: null }); } fetchFeatures(e23, t25) { const { view: i32 } = this; if (!i32 || !e23) { const t26 = new s2("fetch-features:invalid-screenpoint-or-view", "Cannot fetch features without a screenPoint and view.", { screenPoint: e23, view: i32 }); return z4.error(t26), Promise.reject(t26); } return i32.fetchPopupFeatures(e23, { event: t25 && t25.event, defaultPopupTemplateEnabled: this.defaultPopupTemplateEnabled, signal: t25 && t25.signal }); } open(e23) { const t25 = { updateLocationEnabled: false, promises: [], fetchFeatures: false, ...e23, visible: true }, { fetchFeatures: i32 } = t25; delete t25.fetchFeatures, i32 && this._setFetchFeaturesPromises(t25.location); const s30 = ["actionsMenuOpen", "collapsed", "featureMenuOpen"]; for (const r24 of s30) delete t25[r24]; this.set(t25); } triggerAction(e23) { const t25 = this.allActions.getItemAt(e23); t25 && !t25.disabled && this.emit("trigger-action", { action: t25 }); } next() { return this.selectedFeatureIndex = this.selectedFeatureIndex + 1, this; } previous() { return this.selectedFeatureIndex = this.selectedFeatureIndex - 1, this; } disableClusterBrowsing() { m19(this), this._clearBrowsedClusterGraphics(); } async enableClusterBrowsing() { const { view: e23, selectedFeature: t25 } = this; e23?.type === "2d" ? l17(t25) ? (await f9(this), await v10(this)) : z4.warn("enableClusterBrowsing:invalid-selectedFeature: Selected feature must represent an aggregate/cluster graphic.", t25) : z4.warn("enableClusterBrowsing:invalid-view: View must be 2d MapView.", t25); } _animationStateChange(e23) { this.zoomToLocation || (o17.disabled = e23 === "waiting-for-target"); } _clearBrowsedClusterGraphics() { const e23 = this.view?.graphics; e23 && (e23.remove(this.selectedClusterBoundaryFeature), e23.remove(this._selectedClusterFeature)), this._selectedClusterFeature = null, this.selectedClusterBoundaryFeature.geometry = null; } _viewScaleChange() { if (l17(this.selectedFeature)) return this.browseClusterEnabled = false, this.visible = false, void this.clear(); this.browseClusterEnabled && (this.features = [this.selectedFeature]); } _locationChange(e23) { const { selectedFeature: t25, updateLocationEnabled: i32 } = this; i32 && e23 && (!t25 || t25.geometry) && this.centerAtLocation(); } _selectedFeatureIndexChange() { this.featurePage = this.featureCount > 1 ? Math.floor(this.selectedFeatureIndex / this.featuresPerPage) + 1 : null; } _featureViewModelsChange() { this.featurePage = this.featureCount > 1 ? 1 : null; } _setGraphicOnFeatureViewModels() { const { features: e23, featureCount: t25, featurePage: i32, featuresPerPage: s30, featureViewModels: r24 } = this; if (i32 === null) return; const o30 = ((i32 - 1) * s30 + t25) % t25, n34 = o30 + s30; r24.slice(o30, n34).forEach((t26, i33) => { t26 && !t26.graphic && (t26.graphic = e23[o30 + i33]); }); } async _selectedFeatureChange(e23) { if (!e23) return; const { location: t25, updateLocationEnabled: i32, view: s30 } = this; if (this.browseClusterEnabled) { if (this._selectedClusterFeature && (s30.graphics.remove(this._selectedClusterFeature), this._selectedClusterFeature = null), l17(e23)) return; return e23.symbol = await x4(e23), this._selectedClusterFeature = e23, void s30.graphics.add(this._selectedClusterFeature); } !i32 && t25 || !e23.geometry ? i32 && !e23.geometry && this.centerAtLocation().then(() => { this.location = s30.center.clone(); }) : this.location = e2(this._getPointFromGeometry(e23.geometry)); } _waitingForResultChange() { !this.featureCount && this.promises && (this.visible = false); } _setFetchFeaturesPromises(e23) { return this._fetchFeaturesWithController(this._getScreenPoint(e23 || this.location)).then((e24) => { const { clientOnlyGraphics: t25, promisesPerLayerView: i32 } = e24, s30 = Promise.resolve(t25), r24 = i32.map((e25) => e25.promise); this.promises = [s30, ...r24]; }); } _destroyFeatureVMs() { this.featureViewModels.forEach((e23) => e23 && !e23.destroyed && e23.destroy()), this._set("featureViewModels", []); } _updateFeatureVMs() { const { selectedFeature: e23, features: t25, featureViewModels: i32 } = this; if (l17(e23) || (this.browseClusterEnabled = false), this._destroyFeatureVMs(), !t25 || !t25.length) return; const s30 = i32.slice(0), r24 = []; t25.forEach((t26, i33) => { if (!t26) return; let o30 = null; if (s30.some((e24, i34) => (e24 && e24.graphic === t26 && (o30 = e24, s30.splice(i34, 1)), !!o30)), o30) r24[i33] = o30; else { const s31 = new J3({ abilities: this.featureViewModelAbilities, defaultPopupTemplateEnabled: this.defaultPopupTemplateEnabled, spatialReference: this.view?.spatialReference, graphic: t26 === e23 ? t26 : null, map: this.view?.map, view: this.view }); r24[i33] = s31; } }), s30.forEach((e24) => e24 && !e24.destroyed && e24.destroy()), this._set("featureViewModels", r24); } _getScreenPoint(e23) { const { view: t25 } = this; return t25 && e23 && typeof t25.toScreen == "function" ? t25.toScreen(e23) : null; } _autoOpenEnabledChange() { const e23 = "auto-fetch-features", { _handles: t25, autoOpenEnabled: i32 } = this; if (t25.remove(e23), i32 && this.view) { const i33 = this.view.on("click", (e24) => { e24.pointerType === "mouse" && e24.button !== 0 || this._fetchFeaturesAndOpen(e24); }, g3.WIDGET); t25.add(i33, e23); } } _cancelFetchingFeatures() { const e23 = this._fetchFeaturesController; e23 && e23.abort(), this._fetchFeaturesController = null, this.notifyChange("waitingForResult"); } _fetchFeaturesWithController(e23, t25) { this._cancelFetchingFeatures(); const i32 = new AbortController(), { signal: s30 } = i32; this._fetchFeaturesController = i32, this.notifyChange("waitingForResult"); const r24 = this.fetchFeatures(e23, { signal: s30, event: t25 }); return r24.catch(() => { }).then(() => { this._fetchFeaturesController = null, this.notifyChange("waitingForResult"); }), r24; } _fetchFeaturesAndOpen(e23) { const { screenPoint: t25, mapPoint: i32 } = e23, { view: s30 } = this; this._fetchFeaturesWithController(t25, e23).then((e24) => { const { clientOnlyGraphics: t26, promisesPerLayerView: r24, location: o30 } = e24, n34 = [Promise.resolve(t26), ...r24.map((e25) => e25.promise)]; return s30.popup.open({ location: o30 || i32, promises: n34 }), e24; }); } _updatePendingPromises(e23) { e23 && this._pendingPromises.has(e23) && (this._pendingPromises.delete(e23), this.notifyChange("pendingPromisesCount")); } _autoClose() { this.autoCloseEnabled && (this.visible = false); } _getPointFromGeometry(e23) { return t(e23) ? null : e23.type === "point" ? e23 : e23.type === "extent" ? e23.center : e23.type === "polygon" ? e23.centroid : e23.type === "multipoint" || e23.type === "polyline" ? e23.extent.center : null; } async _getLayerView(e23, t25) { return await e23.when(), e23.whenLayerView(t25); } _getHighlightLayer(e23) { const { layer: t25, sourceLayer: i32 } = e23; return i32?.type === "map-notes" || i32?.type === "subtype-group" ? i32 : t25; } _getHighlightTarget(e23, t25) { const i32 = t25.type === "imagery" ? void 0 : "objectIdField" in t25 && t25.objectIdField, s30 = e23.attributes; return s30 && i32 && s30[i32] || e23; } async _highlightActiveFeature() { const e23 = "highlight-active-feature"; this._handles.remove(e23); const { highlightEnabled: t25, view: i32, activeFeature: s30, visible: r24 } = this; if (!(s30 && i32 && t25 && r24)) return; const o30 = this._getHighlightLayer(s30); if (!(o30 && o30 instanceof b3)) return; const n34 = this._getLayerView(i32, o30); this._highlightActiveFeaturePromise = n34; const a34 = await n34; if (!(a34 && e15(a34) && this._highlightActiveFeaturePromise === n34 && this.activeFeature && this.highlightEnabled)) return; const l27 = a34.highlight(this._getHighlightTarget(s30, o30)); this._handles.add(l27, e23); } async _highlightSelectedFeature() { const e23 = "highlight-selected-feature"; this._handles.remove(e23); const { selectedFeature: t25, highlightEnabled: i32, view: s30, visible: r24 } = this; if (!(t25 && s30 && i32 && r24)) return; const o30 = this._getHighlightLayer(t25); if (!(o30 && o30 instanceof b3)) return; const n34 = this._getLayerView(s30, o30); this._highlightSelectedFeaturePromise = n34; const a34 = await n34; if (!(a34 && e15(a34) && this._highlightSelectedFeaturePromise === n34 && this.selectedFeature && this.highlightEnabled && this.visible)) return; const l27 = a34.highlight(this._getHighlightTarget(t25, o30)); this._handles.add(l27, e23); } _updateFeatures(e23) { const { features: t25 } = this; if (!e23 || !e23.length) return; if (!t25.length) return void (this.features = e23); const i32 = e23.filter((e24) => !t25.includes(e24)); this.features = t25.concat(i32); } }; e([d()], H4.prototype, "featurePage", void 0), e([d()], H4.prototype, "isLoadingFeature", null), e([d({ type: S6 })], H4.prototype, "actions", void 0), e([d({ readOnly: true })], H4.prototype, "active", null), e([d()], H4.prototype, "activeFeature", void 0), e([d({ readOnly: true })], H4.prototype, "allActions", null), e([d({ type: Boolean })], H4.prototype, "defaultPopupTemplateEnabled", void 0), e([d()], H4.prototype, "autoCloseEnabled", void 0), e([d()], H4.prototype, "autoOpenEnabled", void 0), e([d()], H4.prototype, "browseClusterEnabled", void 0), e([d()], H4.prototype, "content", void 0), e([d({ type: S6, readOnly: true })], H4.prototype, "defaultActions", null), e([d({ readOnly: true })], H4.prototype, "featureCount", null), e([d()], H4.prototype, "features", null), e([d()], H4.prototype, "featuresPerPage", void 0), e([d()], H4.prototype, "featureViewModelAbilities", void 0), e([d({ readOnly: true })], H4.prototype, "featureViewModels", void 0), e([d()], H4.prototype, "highlightEnabled", void 0), e([d()], H4.prototype, "includeDefaultActions", void 0), e([d({ type: j2 })], H4.prototype, "location", null), e([d({ readOnly: true })], H4.prototype, "pendingPromisesCount", null), e([d({ readOnly: true })], H4.prototype, "selectedClusterBoundaryFeature", void 0), e([d({ readOnly: true })], H4.prototype, "waitingForResult", null), e([d({ readOnly: true })], H4.prototype, "promiseCount", null), e([d()], H4.prototype, "promises", null), e([d({ value: null, readOnly: true })], H4.prototype, "selectedFeature", null), e([d({ value: -1 })], H4.prototype, "selectedFeatureIndex", null), e([d({ readOnly: true })], H4.prototype, "selectedFeatureViewModel", null), e([d({ readOnly: true })], H4.prototype, "state", null), e([d()], H4.prototype, "title", void 0), e([d()], H4.prototype, "updateLocationEnabled", void 0), e([d()], H4.prototype, "view", void 0), e([d()], H4.prototype, "visible", void 0), e([d()], H4.prototype, "zoomFactor", void 0), e([d()], H4.prototype, "zoomToLocation", void 0), e([d()], H4.prototype, "centerAtLocation", null), H4 = e([n3(G3)], H4); var U5 = H4; // node_modules/@arcgis/core/widgets/Popup.js var N4 = "selected-index"; var T5 = 0; var B6 = "popup-spinner"; var D3 = { iconLeftTriangleArrow: "esri-icon-left-triangle-arrow", iconRightTriangleArrow: "esri-icon-right-triangle-arrow", iconDockToTop: "esri-icon-maximize", iconDockToBottom: "esri-icon-dock-bottom", iconDockToLeft: "esri-icon-dock-left", iconDockToRight: "esri-icon-dock-right", iconClose: "esri-icon-close", iconUndock: "esri-icon-minimize", iconCheckMark: "esri-icon-check-mark", iconLoading: "esri-icon-loading-indicator", iconDefaultAction: "esri-icon-default-action", iconActionsMenu: "esri-icon-handle-horizontal", rotating: "esri-rotating", base: "esri-popup", widget: "esri-widget", main: "esri-popup__main-container", loadingContainer: "esri-popup__loading-container", isCollapsible: "esri-popup--is-collapsible", isCollapsed: "esri-popup--is-collapsed", shadow: "esri-popup--shadow", isDocked: "esri-popup--is-docked", isDockedTopLeft: "esri-popup--is-docked-top-left", isDockedTopCenter: "esri-popup--is-docked-top-center", isDockedTopRight: "esri-popup--is-docked-top-right", isDockedBottomLeft: "esri-popup--is-docked-bottom-left", isDockedBottomCenter: "esri-popup--is-docked-bottom-center", isDockedBottomRight: "esri-popup--is-docked-bottom-right", alignTopCenter: "esri-popup--aligned-top-center", alignBottomCenter: "esri-popup--aligned-bottom-center", alignTopLeft: "esri-popup--aligned-top-left", alignBottomLeft: "esri-popup--aligned-bottom-left", alignTopRight: "esri-popup--aligned-top-right", alignBottomRight: "esri-popup--aligned-bottom-right", isFeatureMenuOpen: "esri-popup--feature-menu-open", isActionsMenuOpen: "esri-popup--actions-menu-open", hasFeatureUpdated: "esri-popup--feature-updated", header: "esri-popup__header", headerButtons: "esri-popup__header-buttons", headerContainer: "esri-popup__header-container", headerContainerButton: "esri-popup__header-container--button", headerTitle: "esri-popup__header-title", content: "esri-popup__content", footer: "esri-popup__footer", footerHasPagination: "esri-popup__footer--has-pagination", footerHasActions: "esri-popup__footer--has-actions", footerHasActionsMenu: "esri-popup__footer--has-actions-menu", button: "esri-popup__button", buttonDisabled: "esri-popup__button--disabled", buttonDock: "esri-popup__button--dock", icon: "esri-popup__icon", iconDock: "esri-popup__icon--dock-icon", inlineActionsContainer: "esri-popup__inline-actions-container", actionsMenuButton: "esri-popup__actions-menu-button", actions: "esri-popup__actions", action: "esri-popup__action", actionImage: "esri-popup__action-image", actionText: "esri-popup__action-text", actionToggle: "esri-popup__action-toggle", actionToggleOn: "esri-popup__action-toggle--on", pointer: "esri-popup__pointer", pointerDirection: "esri-popup__pointer-direction", navigation: "esri-popup__navigation", paginationPrevious: "esri-popup__pagination-previous", paginationNext: "esri-popup__pagination-next", paginationPreviousIconLTR: "esri-popup__pagination-previous-icon", paginationPreviousIconRTL: "esri-popup__pagination-previous-icon--rtl", paginationNextIconLTR: "esri-popup__pagination-next-icon", paginationNextIconRTL: "esri-popup__pagination-next-icon--rtl", featureMenu: "esri-popup__feature-menu", featureMenuList: "esri-popup__feature-menu-list", featureMenuItem: "esri-popup__feature-menu-item", featureMenuViewport: "esri-popup__feature-menu-viewport", featureMenuHeader: "esri-popup__feature-menu-header", featureMenuNote: "esri-popup__feature-menu-note", featureMenuSelected: "esri-popup__feature-menu-item--selected", featureMenuButton: "esri-popup__feature-menu-button", featureMenuTitle: "esri-popup__feature-menu-title", featureMenuObserver: "esri-popup__feature-menu-observer", featureMenuLoader: "esri-popup__feature-menu-loader", collapseButton: "esri-popup__collapse-button" }; var E6 = { buttonEnabled: true, position: "auto", breakpoint: { width: 544 } }; var P2 = "esri-popup"; function L8(e23, t25) { return t25 === void 0 ? `${P2}__${e23}` : `${P2}__${e23}-${t25}`; } var S7 = "esri.widgets.Popup"; var V2 = s.getLogger(S7); var U6 = { closeButton: true, featureNavigation: true }; var R6 = class extends i12(O2) { constructor(e23, t25) { super(e23, t25), this._blurClose = false, this._blurContainer = false, this._containerNode = null, this._mainContainerNode = null, this._featureMenuNode = null, this._actionsMenuNode = null, this._focusClose = false, this._focusContainer = false, this._focusDockButton = false, this._focusFeatureMenuButton = false, this._focusActionsMenuButton = false, this._focusFirstFeature = false, this._focusFirstAction = false, this._handles = new u3(), this._pointerOffsetInPx = 16, this._spinner = null, this._feature = null, this._featureMenuIntersectionObserverCallback = ([e24]) => { e24?.isIntersecting && this.viewModel.featurePage++; }, this._featureMenuIntersectionObserver = new IntersectionObserver(this._featureMenuIntersectionObserverCallback, { root: window.document }), this._displaySpinnerThrottled = e7(() => this._displaySpinner(), T5), this.actions = null, this.alignment = "auto", this.autoCloseEnabled = null, this.autoOpenEnabled = null, this.defaultPopupTemplateEnabled = null, this.content = null, this.collapsed = false, this.collapseEnabled = true, this.dockEnabled = false, this.featureCount = null, this.featureMenuOpen = false, this.features = null, this.goToOverride = null, this.headingLevel = 2, this.highlightEnabled = null, this.location = null, this.label = void 0, this.maxInlineActions = 3, this.messages = null, this.messagesCommon = null, this.promises = null, this.selectedFeature = null, this.selectedFeatureIndex = null, this.spinnerEnabled = true, this.title = null, this.updateLocationEnabled = null, this.view = null, this.viewModel = new U5(), this.visible = null, this.visibleElements = { ...U6 }, this._addSelectedFeatureIndexHandle(), this.own([l4(() => this.viewModel?.screenLocation, () => this._positionContainer()), l4(() => [this.viewModel?.active, this.dockEnabled], () => this._toggleScreenLocationEnabled()), l4(() => this.viewModel?.screenLocation, (e24, t26) => { !!e24 != !!t26 && this.reposition(); }), l4(() => [this.viewModel?.view?.padding, this.viewModel?.view?.size, this.viewModel?.active, this.viewModel?.location, this.alignment], () => this.reposition()), l4(() => this.spinnerEnabled, (e24) => this._spinnerEnabledChange(e24)), l4(() => this.viewModel?.view?.size, (e24, t26) => this._updateDockEnabledForViewSize(e24, t26)), l4(() => this.viewModel?.view, (e24, t26) => this._viewChange(e24, t26)), l4(() => this.viewModel?.view?.ready, (e24, t26) => this._viewReadyChange(e24, t26)), l4(() => [this.viewModel?.waitingForResult, this.viewModel?.location], () => { this._hideSpinner(), this._displaySpinnerThrottled(); }), l4(() => [this.selectedFeatureWidget?.viewModel?.title, this.selectedFeatureWidget?.viewModel?.state], () => this._setTitleFromFeatureWidget()), l4(() => [this.selectedFeatureWidget?.viewModel?.content, this.selectedFeatureWidget?.viewModel?.state], () => this._setContentFromFeatureWidget()), f2(() => !this.collapsed, () => { this.viewModel?.view?.widthBreakpoint === "xsmall" && this.viewModel.active && this.collapseEnabled && this.viewModel.centerAtLocation(); }), a3(() => this.viewModel?.allActions, "change", () => this._watchActions()), l4(() => this.viewModel?.allActions, () => this._watchActions(), h2), l4(() => this.viewModel?.featureViewModels, () => this._featureMenuViewportScrollTop())]); } destroy() { this._destroySelectedFeatureWidget(), this._destroySpinner(), this._handles?.destroy(), this._unobserveFeatureMenuObserver(), this._featureMenuIntersectionObserver?.disconnect(), this._handles = null; } get actionsMenuId() { return `${this.id}-actions-menu`; } get actionsMenuButtonId() { return `${this.id}-actions-menu-button`; } get featureMenuId() { return `${this.id}-feature-menu`; } get titleId() { return `${this.id}-popup-title`; } get contentId() { return `${this.id}-popup-content`; } get hasContent() { return !!(this.selectedFeatureWidget ? this.selectedFeatureWidget?.viewModel?.waitingForContent || this.selectedFeatureWidget?.viewModel?.state === "error" || this.selectedFeatureWidget?.viewModel?.content : this.viewModel?.content); } get featureNavigationVisible() { return this.viewModel.active && this.viewModel.featureCount > 1 && this.visibleElements.featureNavigation; } get collapsible() { return !!(this.collapseEnabled && this.viewModel.title && this.hasContent); } get featureMenuVisible() { return this.featureNavigationVisible && this.featureMenuOpen; } get contentCollapsed() { return this.collapsible && !this.featureMenuVisible && this.collapsed; } get dividedActions() { return this._divideActions(); } set actionsMenuOpen(e23) { this._set("actionsMenuOpen", !!e23); } get actionsMenuOpen() { return !!this.viewModel.active && this._get("actionsMenuOpen"); } get currentAlignment() { return this._getCurrentAlignment(); } get currentDockPosition() { return this._getCurrentDockPosition(); } get dockOptions() { return this._get("dockOptions") || E6; } set dockOptions(e23) { const t25 = { ...E6 }, i32 = this.get("viewModel.view.breakpoints"), o30 = {}; i32 && (o30.width = i32.xsmall, o30.height = i32.xsmall); const n34 = { ...t25, ...e23 }, s30 = { ...t25.breakpoint, ...o30 }, { breakpoint: r24 } = n34; r24 === true ? n34.breakpoint = s30 : typeof r24 == "object" && (n34.breakpoint = { ...s30, ...r24 }), this._set("dockOptions", n34), this._setCurrentDockPosition(), this.reposition(); } get selectedFeatureWidget() { const { _feature: e23, visibleElements: t25, headingLevel: i32 } = this, { selectedFeatureViewModel: o30 } = this.viewModel, n34 = { ...t25, title: false }; return o30 ? (e23 ? (e23.viewModel = o30, e23.visibleElements = n34) : this._feature = new E5({ headingLevel: i32 + 1, viewModel: o30, visibleElements: n34 }), this._feature) : null; } castVisibleElements(e23) { return { ...U6, ...e23 }; } blur() { const { active: e23 } = this.viewModel; e23 || V2.warn("Popup can only be blurred when currently active."), this.visibleElements.closeButton ? this._blurClose = true : this._blurContainer = true, this.scheduleRender(); } clear() { this.viewModel.clear(); } close() { this.visible = false; } fetchFeatures(e23, t25) { return this.viewModel.fetchFeatures(e23, t25); } focus() { const { active: e23 } = this.viewModel; e23 || V2.warn("Popup can only be focused when currently active."), this.visibleElements.closeButton ? this._focusClose = true : this._focusContainer = true, this.scheduleRender(); } next() { return this.viewModel.next(); } open(e23) { this._handles.remove(N4); const t25 = !!e23 && !!e23.featureMenuOpen, i32 = !!e23 && !!e23.actionsMenuOpen, o30 = { collapsed: !!e23 && !!e23.collapsed, actionsMenuOpen: i32, featureMenuOpen: t25 }; this.viewModel?.view?.widthBreakpoint === "xsmall" && (o30.collapsed = true), this.set(o30), this.viewModel.open(e23), this._shouldFocus(e23), this._addSelectedFeatureIndexHandle(); } previous() { return this.viewModel.previous(); } reposition() { this.renderNow(), this._positionContainer(), this._setCurrentAlignment(); } triggerAction(e23) { this.viewModel.triggerAction(e23); } render() { const { actionsMenuOpen: e23, dockEnabled: t25, featureMenuVisible: i32, dividedActions: o30, currentAlignment: n34, currentDockPosition: s30 } = this, { active: r24 } = this.viewModel, { menuActions: a34 } = o30, l27 = r24 && a34.length > 1 && e23, u23 = r24 && t25, c42 = r24 && !t25, d20 = this.selectedFeature?.layer?.title, p36 = this.selectedFeature?.layer?.id, h19 = { [D3.alignTopCenter]: n34 === "top-center", [D3.alignBottomCenter]: n34 === "bottom-center", [D3.alignTopLeft]: n34 === "top-left", [D3.alignBottomLeft]: n34 === "bottom-left", [D3.alignTopRight]: n34 === "top-right", [D3.alignBottomRight]: n34 === "bottom-right", [D3.isDocked]: u23, [D3.shadow]: c42, [D3.isDockedTopLeft]: s30 === "top-left", [D3.isDockedTopCenter]: s30 === "top-center", [D3.isDockedTopRight]: s30 === "top-right", [D3.isDockedBottomLeft]: s30 === "bottom-left", [D3.isDockedBottomCenter]: s30 === "bottom-center", [D3.isDockedBottomRight]: s30 === "bottom-right", [D3.isFeatureMenuOpen]: i32, [D3.isActionsMenuOpen]: l27 }; return n6("div", { class: this.classes(D3.base, h19), role: "presentation", "data-layer-title": d20, "data-layer-id": p36, bind: this, afterCreate: this._positionContainer, afterUpdate: this._positionContainer }, r24 ? [this.renderMainContainer(), this.renderPointer()] : null); } renderLoadingIcon() { return n6("span", { "aria-hidden": "true", class: this.classes(D3.icon, D3.iconLoading, D3.rotating) }); } renderNavigationLoading() { const { messagesCommon: e23 } = this; return this.viewModel.pendingPromisesCount ? n6("div", { key: L8("loading-container"), role: "presentation", class: D3.loadingContainer, "aria-label": e23.loading, title: e23.loading }, this.renderLoadingIcon()) : null; } renderPreviousIcon() { const e23 = f3(this.container), t25 = { [D3.iconRightTriangleArrow]: e23, [D3.paginationPreviousIconRTL]: e23, [D3.iconLeftTriangleArrow]: !e23, [D3.paginationPreviousIconLTR]: !e23 }; return n6("span", { "aria-hidden": "true", class: this.classes(D3.icon, t25) }); } renderPreviousButton() { const { messages: e23 } = this; return n6("div", { role: "button", tabIndex: 0, bind: this, onclick: this._previous, onkeydown: this._previous, class: this.classes(D3.button, D3.paginationPrevious), "aria-label": e23.previous, title: e23.previous }, this.renderPreviousIcon()); } renderNextIcon() { const e23 = f3(this.container), t25 = { [D3.iconLeftTriangleArrow]: e23, [D3.paginationNextIconRTL]: e23, [D3.iconRightTriangleArrow]: !e23, [D3.paginationNextIconLTR]: !e23 }; return n6("span", { "aria-hidden": "true", class: this.classes(D3.icon, t25) }); } renderNextButton() { const { messages: e23 } = this; return n6("div", { role: "button", tabIndex: 0, bind: this, onclick: this._next, onkeydown: this._next, class: this.classes(D3.button, D3.paginationNext), "aria-label": e23.next, title: e23.next }, this.renderNextIcon()); } renderFeatureMenuButton() { const { featureMenuOpen: e23, featureMenuId: t25, messagesCommon: i32 } = this, { featureCount: o30, selectedFeatureIndex: n34 } = this.viewModel; return n6("div", { role: "button", tabIndex: 0, bind: this, onclick: this._toggleFeatureMenu, onkeydown: this._toggleFeatureMenu, afterCreate: this._focusFeatureMenuButtonNode, afterUpdate: this._focusFeatureMenuButtonNode, class: this.classes(D3.button, D3.featureMenuButton), "aria-haspopup": "true", "aria-controls": t25, "aria-expanded": e23.toString(), "aria-label": i32.menu, title: i32.menu }, this._getPageText(o30, n34)); } renderNavigationButtons() { return this.featureNavigationVisible ? [this.renderPreviousButton(), this.renderNavigationLoading() || this.renderFeatureMenuButton(), this.renderNextButton()] : null; } renderDockIcon() { const { dockEnabled: e23 } = this, t25 = this._wouldDockTo(), i32 = { [D3.iconUndock]: e23, [D3.iconDock]: !e23, [D3.iconDockToRight]: !e23 && (t25 === "top-right" || t25 === "bottom-right"), [D3.iconDockToLeft]: !e23 && (t25 === "top-left" || t25 === "bottom-left"), [D3.iconDockToTop]: !e23 && t25 === "top-center", [D3.iconDockToBottom]: !e23 && t25 === "bottom-center" }; return n6("span", { "aria-hidden": "true", class: this.classes(i32, D3.icon) }); } renderDockButton() { const { dockEnabled: e23, messages: t25 } = this, i32 = this.viewModel?.view?.widthBreakpoint, o30 = e23 ? t25.undock : t25.dock; return i32 !== "xsmall" && this.dockOptions?.buttonEnabled ? n6("div", { role: "button", "aria-label": o30, title: o30, tabIndex: 0, bind: this, onclick: this._toggleDockEnabled, onkeydown: this._toggleDockEnabled, afterCreate: this._focusDockButtonNode, afterUpdate: this._focusDockButtonNode, class: this.classes(D3.button, D3.buttonDock) }, this.renderDockIcon()) : null; } renderTitle() { const { title: e23 } = this.viewModel, { titleId: t25, collapsible: i32, contentCollapsed: o30, messagesCommon: n34 } = this, s30 = { [D3.headerContainerButton]: i32 }, r24 = n6(n12, { level: this.headingLevel, class: D3.headerTitle, innerHTML: e23 }), a34 = i32 ? n6("button", { key: `${e23}--collapsible`, id: t25, title: o30 ? n34.expand : n34.collapse, bind: this, enterAnimation: this._createFeatureUpdatedAnimation(), class: this.classes(D3.headerContainer, s30), "aria-expanded": o30 ? "false" : "true", onclick: this._toggleCollapsed, type: "button" }, r24) : n6("div", { key: e23, id: t25, bind: this, enterAnimation: this._createFeatureUpdatedAnimation(), class: this.classes(D3.headerContainer, s30) }, r24); return e23 ? a34 : null; } renderCloseIcon() { return n6("span", { "aria-hidden": "true", class: this.classes(D3.icon, D3.iconClose) }); } renderCloseButton() { const { visibleElements: e23, messagesCommon: t25 } = this; return e23.closeButton ? n6("div", { role: "button", tabIndex: 0, bind: this, onclick: this._close, onkeydown: this._close, class: D3.button, "aria-label": t25.close, title: t25.close, afterCreate: this._closeButtonNodeUpdated, afterUpdate: this._closeButtonNodeUpdated }, this.renderCloseIcon()) : null; } renderHeader() { return n6("header", { class: D3.header }, this.renderTitle(), n6("div", { class: D3.headerButtons }, this.renderDockButton(), this.renderCloseButton())); } renderContentContainer() { const { contentId: e23, hasContent: t25, contentCollapsed: i32 } = this, { content: o30 } = this.viewModel; return t25 && !i32 ? n6("article", { key: o30, enterAnimation: this._createFeatureUpdatedAnimation(), id: e23, class: D3.content }, this.renderContent()) : null; } renderActionsMenuButton() { const { actionsMenuId: e23, actionsMenuButtonId: t25, actionsMenuOpen: i32, dividedActions: o30, messagesCommon: n34 } = this, s30 = i32 ? n34.close : n34.open, { menuActions: r24 } = o30; return r24.length ? n6("div", { key: L8("actions-menu-button"), class: this.classes(D3.button, D3.actionsMenuButton), role: "button", id: t25, "aria-haspopup": "true", "aria-controls": i32 ? e23 : null, tabIndex: 0, bind: this, onclick: this._toggleActionsMenu, onkeydown: this._toggleActionsMenu, afterCreate: this._focusActionsMenuButtonNode, afterUpdate: this._focusActionsMenuButtonNode, "aria-label": s30, title: s30 }, n6("span", { "aria-hidden": "true", class: D3.iconActionsMenu })) : null; } renderMenuActions() { const { actionsMenuId: e23, actionsMenuButtonId: t25, actionsMenuOpen: i32, dividedActions: o30 } = this, { menuActions: n34 } = o30; return n34.length && i32 ? n6("ul", { id: e23, role: "menu", "aria-labelledby": t25, key: L8("actions"), class: D3.actions, bind: this, onkeyup: this._handleActionMenuKeyup, afterCreate: this._actionsMenuNodeUpdated, afterUpdate: this._actionsMenuNodeUpdated }, n34.toArray().map((e24) => this.renderAction({ action: e24, type: "menu-item" }))) : null; } renderInlineActions() { const { inlineActions: e23 } = this.dividedActions; return !!e23.length && e23.toArray().map((e24) => this.renderAction({ action: e24, type: "inline" })); } renderInlineActionsContainer() { const { inlineActions: e23, menuActions: t25 } = this.dividedActions, i32 = !!e23.length, o30 = !!t25.length; return i32 || o30 ? n6("div", { key: "inline-actions-container", "data-inline-actions": i32.toString(), "data-menu-actions": o30.toString(), class: D3.inlineActionsContainer }, this.renderInlineActions(), this.renderActionsMenuButton(), this.renderMenuActions()) : null; } renderNavigation() { return this.featureNavigationVisible ? n6("section", { key: L8("navigation"), class: this.classes(D3.navigation) }, this.renderNavigationButtons()) : null; } renderFooter() { const { featureNavigationVisible: e23, dividedActions: t25 } = this, { inlineActions: i32, menuActions: o30 } = t25, n34 = !!i32.length, s30 = !!o30.length, r24 = { [D3.footerHasPagination]: e23, [D3.footerHasActions]: n34, [D3.footerHasActionsMenu]: s30 }; return e23 || n34 ? n6("div", { key: L8("feature-buttons"), class: this.classes(D3.footer, r24) }, this.renderInlineActionsContainer(), this.renderNavigation()) : null; } renderFeatureMenuContainer() { const { messages: e23 } = this, { featureViewModels: t25, isLoadingFeature: i32 } = this.viewModel, o30 = s4(e23.selectedFeatures, { total: t25.length }); return n6("section", { key: L8("menu"), class: D3.featureMenu }, n6("strong", { class: D3.featureMenuHeader }, o30), n6("nav", { bind: this, class: D3.featureMenuViewport, "data-node-ref": "_featureMenuViewportNode", afterCreate: v4 }, this.renderFeatureMenu(), n6("div", { class: D3.featureMenuObserver, bind: this, afterCreate: this._featureMenuIntersectionObserverCreated }), i32 ? n6("div", { class: D3.featureMenuLoader }, this.renderLoadingIcon()) : null)); } renderPointer() { return this.dockEnabled ? null : n6("div", { key: L8("pointer"), class: D3.pointer, role: "presentation" }, n6("div", { class: this.classes(D3.pointerDirection, D3.shadow) })); } renderMainContainer() { const { dockEnabled: e23, currentAlignment: t25, currentDockPosition: i32, titleId: o30, contentId: n34, collapsible: s30, hasContent: r24, contentCollapsed: a34, visibleElements: l27 } = this, { title: u23 } = this.viewModel, c42 = t25 === "bottom-left" || t25 === "bottom-center" || t25 === "bottom-right" || i32 === "top-left" || i32 === "top-center" || i32 === "top-right", d20 = t25 === "top-left" || t25 === "top-center" || t25 === "top-right" || i32 === "bottom-left" || i32 === "bottom-center" || i32 === "bottom-right", p36 = { [D3.shadow]: e23, [D3.isCollapsible]: s30, [D3.isCollapsed]: a34 }; return n6("div", { class: this.classes(D3.main, D3.widget, p36), tabIndex: l27.closeButton ? null : -1, role: "dialog", "aria-labelledby": u23 ? o30 : "", "aria-describedby": r24 && !a34 ? n34 : "", bind: this, onkeyup: this._handleMainKeyup, afterCreate: this._mainContainerNodeUpdated, afterUpdate: this._mainContainerNodeUpdated }, c42 ? this.renderFooter() : null, c42 ? this.renderFeatureMenuContainer() : null, this.renderHeader(), this.renderContentContainer(), d20 ? this.renderFooter() : null, d20 ? this.renderFeatureMenuContainer() : null); } renderContent() { const e23 = this.viewModel?.content; return e23 ? typeof e23 == "string" ? n6("div", { key: e23, innerHTML: e23 }) : this.renderNodeContent(e23) : null; } renderActionText(e23) { return n6("span", { key: "text", class: D3.actionText }, e23); } renderActionIcon(e23) { const t25 = this._getActionClass(e23), i32 = this._getActionImage(e23), o30 = { [D3.iconLoading]: e23.active, [D3.rotating]: e23.active, [D3.icon]: !!t25, [D3.actionImage]: !e23.active && !!i32 }; return t25 && (o30[t25] = !e23.active), n6("span", { key: "icon", "aria-hidden": "true", class: this.classes(D3.icon, o30), styles: this._getIconStyles(i32) }); } renderAction(e23) { const { action: t25, type: i32 } = e23, o30 = this._getActionTitle(t25), n34 = { [D3.action]: t25.type !== "toggle", [D3.actionToggle]: t25.type === "toggle", [D3.actionToggleOn]: t25.type === "toggle" && t25.value, [D3.buttonDisabled]: t25.disabled }, s30 = [this.renderActionIcon(t25), this.renderActionText(o30)], r24 = i32 === "menu-item" ? n6("li", { key: t25.uid, role: "menuitem", tabIndex: 0, title: o30, "aria-label": o30, class: this.classes(D3.button, n34), onkeyup: this._handleActionMenuItemKeyup, bind: this, "data-action-uid": t25.uid, onclick: this._triggerAction, onkeydown: this._triggerAction }, s30) : n6("div", { key: t25.uid, role: "button", tabIndex: 0, title: o30, "aria-label": o30, class: this.classes(D3.button, n34), onkeyup: this._handleActionMenuItemKeyup, bind: this, "data-action-uid": t25.uid, onclick: this._triggerAction, onkeydown: this._triggerAction }, s30); return t25.visible ? r24 : null; } renderFeatureMenuItem(e23, t25) { const { messages: i32, messagesCommon: o30 } = this, { selectedFeatureIndex: n34, selectedFeatureViewModel: s30 } = this.viewModel, r24 = e23 === s30, a34 = { [D3.featureMenuSelected]: r24 }, l27 = r24 ? n6("span", { key: L8(`feature-menu-selected-feature-${n34}`), title: i32.selectedFeature, "aria-label": i32.selectedFeature, class: D3.iconCheckMark }) : null, u23 = n6("span", { innerHTML: e23.title || o30.untitled }); return n6("li", { role: "menuitem", tabIndex: -1, key: L8(`feature-menu-feature-${n34}`), class: this.classes(a34, D3.featureMenuItem), bind: this, "data-feature-index": t25, onblur: this._removeActiveFeature, onfocus: this._setActiveFeature, onkeyup: this._handleFeatureMenuItemKeyup, onclick: this._selectFeature, onkeydown: this._selectFeature, onmouseover: this._setActiveFeature, onmouseleave: this._removeActiveFeature }, n6("span", { class: D3.featureMenuTitle }, u23, l27)); } renderFeatureMenu() { const { featureMenuId: e23 } = this, { featureViewModels: t25 } = this.viewModel; return t25.length > 1 ? n6("ol", { class: D3.featureMenuList, id: e23, bind: this, afterCreate: this._featureMenuNodeUpdated, afterUpdate: this._featureMenuNodeUpdated, onkeyup: this._handleFeatureMenuKeyup, role: "menu" }, t25.filter((e24) => !!e24.graphic).map((e24, t26) => this.renderFeatureMenuItem(e24, t26))) : null; } _getActionTitle(e23) { const { messages: t25, selectedFeature: i32, messagesCommon: o30 } = this, { id: n34 } = e23, s30 = i32?.attributes, r24 = n34 === "zoom-to-feature" ? s4(e23.title, { messages: t25 }) : n34 === "remove-selected-feature" ? s4(e23.title, { messages: o30 }) : n34 === "zoom-to-clustered-features" || n34 === "browse-clustered-features" ? s4(e23.title, { messages: t25 }) : e23.title; return r24 && s30 ? s4(r24, s30) : r24; } _getActionClass(e23) { const { selectedFeature: t25 } = this, i32 = t25?.attributes, { className: o30, image: n34 } = e23, s30 = n34 || o30 ? o30 : D3.iconDefaultAction; return s30 && i32 ? s4(s30, i32) : s30; } _getActionImage(e23) { const { selectedFeature: t25 } = this, i32 = t25?.attributes, { image: o30 } = e23; return o30 && i32 ? s4(o30, i32) : o30; } _createFeatureUpdatedAnimation() { return w2("enter", D3.hasFeatureUpdated); } _getInlineActionCount() { const { maxInlineActions: e23, featureNavigationVisible: t25 } = this; if (typeof e23 != "number") return null; const i32 = Math.round(e23); return Math.max(t25 ? i32 - 1 : i32, 0); } _watchActions() { const { allActions: e23 } = this.viewModel; this.notifyChange("dividedActions"); const t25 = "actions"; this._handles.remove(t25), e23 && e23.forEach((e24) => { this._handles.add(l4(() => [e24.uid, e24.active, e24.className, e24.disabled, e24.id, e24.title, e24.image, e24.visible], () => this.scheduleRender()), t25); }); } _divideActions() { const { allActions: e23 } = this.viewModel, i32 = e23.filter((e24) => e24.visible), o30 = this._getInlineActionCount(), n34 = o30 === null, s30 = o30 === 0; return { inlineActions: n34 ? i32.slice(0) : s30 ? new j3() : i32.slice(0, o30), menuActions: n34 ? new j3() : s30 ? i32.slice(0) : i32.slice(o30) }; } _featureMenuOpenChanged(e23) { e23 ? this._focusFirstFeature = true : this._focusFeatureMenuButton = true; } _actionsMenuOpenChanged(e23) { e23 ? this._focusFirstAction = true : this._focusActionsMenuButton = true; } _setTitleFromFeatureWidget() { const { selectedFeatureWidget: e23, messagesCommon: t25 } = this; e23 && (this.viewModel.title = e23.viewModel?.state === "error" ? t25.errorMessage : e23.viewModel?.title || ""); } _setContentFromFeatureWidget() { const { selectedFeatureWidget: e23 } = this; e23 && (this.viewModel.content = e23); } _unobserveFeatureMenuObserver() { this._featureMenuIntersectionObserverNode && this._featureMenuIntersectionObserver.unobserve(this._featureMenuIntersectionObserverNode); } _featureMenuIntersectionObserverCreated(e23) { this._unobserveFeatureMenuObserver(), this._featureMenuIntersectionObserver.observe(e23), this._featureMenuIntersectionObserverNode = e23; } _handleFeatureMenuKeyup(e23) { i(e23) === "Escape" && (e23.stopPropagation(), this._focusFeatureMenuButton = true, this.featureMenuOpen = false, this.scheduleRender()); } _handleActionMenuKeyup(e23) { i(e23) === "Escape" && (e23.stopPropagation(), this._focusActionsMenuButton = true, this.actionsMenuOpen = false, this.scheduleRender()); } _setActiveFeature(e23) { const { viewModel: t25 } = this, i32 = e23.currentTarget["data-feature-index"]; t25.activeFeature = t25.features[i32] || null; } _removeActiveFeature() { this.viewModel.activeFeature = null; } _handleFeatureMenuItemKeyup(e23) { const t25 = i(e23), { _featureMenuNode: o30 } = this, n34 = e23.currentTarget["data-feature-index"]; if (!o30) return; const s30 = o30.querySelectorAll("li"), r24 = s30.length; if (t25 !== "ArrowUp") if (t25 !== "ArrowDown") if (t25 !== "Home") if (t25 !== "End") ; else { e23.stopPropagation(); s30[s30.length - 1].focus(); } else { e23.stopPropagation(); s30[0].focus(); } else { e23.stopPropagation(); s30[(n34 + 1 + r24) % r24].focus(); } else { e23.stopPropagation(); s30[(n34 - 1 + r24) % r24].focus(); } } _handleActionMenuItemKeyup(e23) { const t25 = i(e23), { _actionsMenuNode: o30 } = this, n34 = e23.currentTarget.dataset.actionUid, { menuActions: s30 } = this.dividedActions, r24 = s30.findIndex((e24) => e24.uid === n34); if (!o30) return; const a34 = o30.querySelectorAll("li"), l27 = a34.length; if (t25 !== "ArrowUp") if (t25 !== "ArrowDown") if (t25 !== "Home") if (t25 !== "End") ; else { e23.stopPropagation(); a34[a34.length - 1].focus(); } else { e23.stopPropagation(); a34[0].focus(); } else { e23.stopPropagation(); a34[(r24 + 1 + l27) % l27].focus(); } else { e23.stopPropagation(); a34[(r24 - 1 + l27) % l27].focus(); } } _handleMainKeyup(e23) { const t25 = i(e23); t25 === "ArrowLeft" && (e23.stopPropagation(), this.previous()), t25 === "ArrowRight" && (e23.stopPropagation(), this.next()); } _spinnerEnabledChange(e23) { if (this._destroySpinner(), !e23) return; const t25 = this.get("viewModel.view"); this._createSpinner(t25); } _hideSpinner() { const { _spinner: e23 } = this; e23 && (e23.location = null, e23.hide()); } _displaySpinner() { const { _spinner: e23 } = this; if (!e23) return; const { location: t25, waitingForResult: i32 } = this.viewModel; i32 ? e23.show({ location: t25 }) : e23.hide(); } _getIconStyles(e23) { return { "background-image": e23 ? `url(${e23})` : "" }; } async _shouldFocus(e23) { e23.shouldFocus && (await j4(() => this.viewModel?.active === true), this.focus()); } _addSelectedFeatureIndexHandle() { const e23 = l4(() => this.viewModel?.selectedFeatureIndex, (e24, t25) => this._selectedFeatureIndexUpdated(e24, t25)); this._handles.add(e23, N4); } _selectedFeatureIndexUpdated(e23, t25) { const { featureCount: i32 } = this; i32 && e23 !== t25 && e23 !== -1 && (this.actionsMenuOpen = false, this.featureMenuOpen = false); } _destroySelectedFeatureWidget() { const { _feature: e23 } = this; e23 && (e23.viewModel = null, e23 && !e23.destroyed && e23.destroy()), this._feature = null; } _isScreenLocationWithinView(e23, t25) { return e23.x > -1 && e23.y > -1 && e23.x <= t25.width && e23.y <= t25.height; } _isOutsideView(e23) { const { popupHeight: t25, popupWidth: i32, screenLocation: o30, side: n34, view: s30 } = e23; if (isNaN(i32) || isNaN(t25) || !s30 || !o30) return false; const r24 = s30.padding; return n34 === "right" && o30.x + i32 / 2 > s30.width - r24.right || (n34 === "left" && o30.x - i32 / 2 < r24.left || (n34 === "top" && o30.y - t25 < r24.top || n34 === "bottom" && o30.y + t25 > s30.height - r24.bottom)); } _calculateAutoAlignment(e23) { if (e23 !== "auto") return e23; const { _pointerOffsetInPx: t25, _containerNode: i32, _mainContainerNode: o30, viewModel: n34 } = this, { screenLocation: r24, view: a34 } = n34; if (t(r24) || !a34 || !i32) return "top-center"; if (!this._isScreenLocationWithinView(r24, a34)) return this._get("currentAlignment") || "top-center"; function l27(e24) { return parseInt(e24.replace(/[^-\d\.]/g, ""), 10); } const u23 = o30 ? window.getComputedStyle(o30, null) : null, c42 = u23 ? l27(u23.getPropertyValue("max-height")) : 0, d20 = u23 ? l27(u23.getPropertyValue("height")) : 0, { height: p36, width: h19 } = i32.getBoundingClientRect(), g20 = h19 + t25, _9 = Math.max(p36, c42, d20) + t25, f14 = this._isOutsideView({ popupHeight: _9, popupWidth: g20, screenLocation: r24, side: "right", view: a34 }), v15 = this._isOutsideView({ popupHeight: _9, popupWidth: g20, screenLocation: r24, side: "left", view: a34 }), m29 = this._isOutsideView({ popupHeight: _9, popupWidth: g20, screenLocation: r24, side: "top", view: a34 }), b10 = this._isOutsideView({ popupHeight: _9, popupWidth: g20, screenLocation: r24, side: "bottom", view: a34 }); return v15 ? m29 ? "bottom-right" : "top-right" : f14 ? m29 ? "bottom-left" : "top-left" : m29 ? b10 ? "top-center" : "bottom-center" : "top-center"; } _callCurrentAlignment(e23) { return typeof e23 == "function" ? e23.call(this) : e23; } _getCurrentAlignment() { const { alignment: e23, dockEnabled: t25 } = this; return t25 || !this.viewModel.active ? null : this._calculatePositionResult(this._calculateAutoAlignment(this._callCurrentAlignment(e23))); } _setCurrentAlignment() { this._set("currentAlignment", this._getCurrentAlignment()); } _setCurrentDockPosition() { this._set("currentDockPosition", this._getCurrentDockPosition()); } _calculatePositionResult(e23) { const t25 = ["left", "right"]; return f3(this.container) && t25.reverse(), e23.replace(/leading/gi, t25[0]).replace(/trailing/gi, t25[1]); } _callDockPosition(e23) { return typeof e23 == "function" ? e23.call(this) : e23; } _getDockPosition() { return this._calculatePositionResult(this._calculateAutoDockPosition(this._callDockPosition(this.dockOptions?.position))); } _getCurrentDockPosition() { return this.dockEnabled && this.viewModel.active ? this._getDockPosition() : null; } _wouldDockTo() { return this.dockEnabled ? null : this._getDockPosition(); } _calculateAutoDockPosition(e23) { if (e23 !== "auto") return e23; const t25 = this.viewModel?.view, i32 = f3(this.container) ? "top-left" : "top-right"; if (!t25) return i32; const o30 = t25.padding || { left: 0, right: 0, top: 0, bottom: 0 }, n34 = t25.width - o30.left - o30.right, { breakpoints: s30 } = t25; return s30 && n34 <= s30.xsmall ? "bottom-center" : i32; } _positionContainer(e23 = this._containerNode) { if (e23 && (this._containerNode = e23), !e23) return; const { screenLocation: t25 } = this.viewModel, { width: i32 } = e23.getBoundingClientRect(), o30 = this._calculatePositionStyle(t25, i32); o30 && (e23.style.top = o30.top, e23.style.left = o30.left, e23.style.bottom = o30.bottom, e23.style.right = o30.right); } _calculateFullWidth(e23) { const { currentAlignment: t25, _pointerOffsetInPx: i32 } = this; return t25 === "top-left" || t25 === "bottom-left" || t25 === "top-right" || t25 === "bottom-right" ? e23 + i32 : e23; } _calculateAlignmentPosition(e23, t25, i32, o30) { const { currentAlignment: n34, _pointerOffsetInPx: s30 } = this, r24 = o30 / 2, a34 = i32.height - t25, l27 = i32.width - e23, { padding: u23 } = this.view; return n34 === "bottom-center" ? { top: t25 + s30 - u23.top, left: e23 - r24 - u23.left } : n34 === "top-left" ? { bottom: a34 + s30 - u23.bottom, right: l27 + s30 - u23.right } : n34 === "bottom-left" ? { top: t25 + s30 - u23.top, right: l27 + s30 - u23.right } : n34 === "top-right" ? { bottom: a34 + s30 - u23.bottom, left: e23 + s30 - u23.left } : n34 === "bottom-right" ? { top: t25 + s30 - u23.top, left: e23 + s30 - u23.left } : n34 === "top-center" ? { bottom: a34 + s30 - u23.bottom, left: e23 - r24 - u23.left } : void 0; } _calculatePositionStyle(e23, t25) { const { dockEnabled: i32, view: o30 } = this; if (!o30) return; if (i32) return { left: "", top: "", right: "", bottom: "" }; if (t(e23) || !t25) return; const n34 = this._calculateFullWidth(t25), r24 = this._calculateAlignmentPosition(e23.x, e23.y, o30, n34); return r24 ? { top: r24.top !== void 0 ? `${r24.top}px` : "auto", left: r24.left !== void 0 ? `${r24.left}px` : "auto", bottom: r24.bottom !== void 0 ? `${r24.bottom}px` : "auto", right: r24.right !== void 0 ? `${r24.right}px` : "auto" } : void 0; } _viewChange(e23, t25) { e23 && t25 && (this.close(), this.clear()); } _viewReadyChange(e23, t25) { if (e23) { const e24 = this.get("viewModel.view"); this._wireUpView(e24); } else t25 && (this.close(), this.clear()); } _wireUpView(e23) { if (this._destroySpinner(), !e23) return; const { spinnerEnabled: t25 } = this; t25 && this._createSpinner(e23), this._setDockEnabledForViewSize(this.dockOptions); } _dockingThresholdCrossed(e23, t25, i32) { const [o30, n34] = e23, [s30, r24] = t25, { width: a34, height: l27 } = i32; return o30 <= a34 && s30 > a34 || o30 > a34 && s30 <= a34 || n34 <= l27 && r24 > l27 || n34 > l27 && r24 <= l27; } _updateDockEnabledForViewSize(e23, t25) { if (!e23 || !t25) return; const i32 = this.get("viewModel.view.padding") || { left: 0, right: 0, top: 0, bottom: 0 }, o30 = i32.left + i32.right, n34 = i32.top + i32.bottom, s30 = [], r24 = []; s30[0] = e23[0] - o30, s30[1] = e23[1] - n34, r24[0] = t25[0] - o30, r24[1] = t25[1] - n34; const { dockOptions: a34 } = this, l27 = a34.breakpoint; this._dockingThresholdCrossed(s30, r24, l27) && this._setDockEnabledForViewSize(a34), this._setCurrentDockPosition(); } _focusDockButtonNode(e23) { this._focusDockButton && (this._focusDockButton = false, e23.focus()); } _closeButtonNodeUpdated(e23) { return this._focusClose ? (this._focusClose = false, void e23.focus()) : this._blurClose ? (this._blurClose = false, void e23.blur()) : void 0; } _mainContainerNodeUpdated(e23) { return this._mainContainerNode = e23, this._focusContainer ? (this._focusContainer = false, void e23.focus()) : this._blurContainer ? (this._blurContainer = false, void e23.blur()) : void 0; } _featureMenuNodeUpdated(e23) { if (this._featureMenuNode = e23, !e23 || !this._focusFirstFeature) return; this._focusFirstFeature = false; const t25 = e23.querySelectorAll("li"); if (t25.length) { t25[0].focus(); } } _actionsMenuNodeUpdated(e23) { if (this._actionsMenuNode = e23, !e23 || !this._focusFirstAction) return; this._focusFirstAction = false; const t25 = e23.querySelectorAll("li"); if (t25.length) { t25[0].focus(); } } _focusFeatureMenuButtonNode(e23) { this._focusFeatureMenuButton && (this._focusFeatureMenuButton = false, e23.focus()); } _focusActionsMenuButtonNode(e23) { this._focusActionsMenuButton && (this._focusActionsMenuButton = false, e23.focus()); } _featureMenuViewportScrollTop() { this._featureMenuViewportNode && (this._featureMenuViewportNode.scrollTop = 0); } _toggleScreenLocationEnabled() { const { dockEnabled: e23, viewModel: t25 } = this; if (!t25) return; const i32 = t25.active && !e23; t25.screenLocationEnabled = i32; } _shouldDockAtCurrentViewSize(e23) { const t25 = e23.breakpoint, i32 = this.viewModel?.view?.ui; if (!i32) return false; const { width: o30, height: n34 } = i32; if (isNaN(o30) || isNaN(n34)) return false; const s30 = t25.hasOwnProperty("width") && o30 <= t25.width, r24 = t25.hasOwnProperty("height") && n34 <= t25.height; return s30 || r24; } _setDockEnabledForViewSize(e23) { e23.breakpoint && (this.dockEnabled = this._shouldDockAtCurrentViewSize(e23)); } _getPageText(e23, t25) { return this.featureNavigationVisible ? s4(this.messages.pageText, { index: t25 + 1, total: e23 }) : null; } _destroySpinner() { const { _spinner: e23, view: t25 } = this; e23 && (t25 && t25.ui && t25.ui.remove(this._spinner, B6), e23.destroy(), this._spinner = null); } _createSpinner(e23) { e23 && (this._spinner = new m18({ view: e23 }), e23.ui.add(this._spinner, { key: B6, position: "manual" })); } _toggleCollapsed() { this.collapsed = !this.collapsed; } _close() { this.close(), this.view && this.view.focus(); } _toggleDockEnabled() { this.dockEnabled = !this.dockEnabled, this._focusDockButton = true, this.scheduleRender(); } _toggleFeatureMenu() { const e23 = !this.featureMenuOpen; this._featureMenuOpenChanged(e23), this.actionsMenuOpen = false, this.featureMenuOpen = e23; } _toggleActionsMenu() { const e23 = !this.actionsMenuOpen; this._actionsMenuOpenChanged(e23), this.featureMenuOpen = false, this.actionsMenuOpen = e23; } _triggerAction(e23) { const t25 = e23.currentTarget.dataset.actionUid, { allActions: i32 } = this.viewModel, o30 = i32.findIndex((e24) => e24.uid === t25), n34 = i32.getItemAt(o30); n34 && n34.type === "toggle" && (n34.value = !n34.value), this.actionsMenuOpen = false, this.viewModel.triggerAction(o30); } _selectFeature(e23) { const t25 = e23.currentTarget["data-feature-index"]; isNaN(t25) || (this.viewModel.selectedFeatureIndex = t25), this.featureMenuOpen = false, this._focusFeatureMenuButton = true, this.scheduleRender(); } _next() { this.next(); } _previous() { this.previous(); } }; e([d({ readOnly: true })], R6.prototype, "actionsMenuId", null), e([d({ readOnly: true })], R6.prototype, "actionsMenuButtonId", null), e([d({ readOnly: true })], R6.prototype, "featureMenuId", null), e([d({ readOnly: true })], R6.prototype, "titleId", null), e([d({ readOnly: true })], R6.prototype, "contentId", null), e([d({ readOnly: true })], R6.prototype, "hasContent", null), e([d({ readOnly: true })], R6.prototype, "featureNavigationVisible", null), e([d({ readOnly: true })], R6.prototype, "collapsible", null), e([d({ readOnly: true })], R6.prototype, "featureMenuVisible", null), e([d({ readOnly: true })], R6.prototype, "contentCollapsed", null), e([d({ readOnly: true })], R6.prototype, "dividedActions", null), e([o9("viewModel.actions")], R6.prototype, "actions", void 0), e([d()], R6.prototype, "actionsMenuOpen", null), e([d()], R6.prototype, "alignment", void 0), e([o9("viewModel.autoCloseEnabled")], R6.prototype, "autoCloseEnabled", void 0), e([o9("viewModel.autoOpenEnabled")], R6.prototype, "autoOpenEnabled", void 0), e([o9("viewModel.defaultPopupTemplateEnabled")], R6.prototype, "defaultPopupTemplateEnabled", void 0), e([o9("viewModel.content")], R6.prototype, "content", void 0), e([d()], R6.prototype, "collapsed", void 0), e([d()], R6.prototype, "collapseEnabled", void 0), e([d({ readOnly: true })], R6.prototype, "currentAlignment", null), e([d({ readOnly: true })], R6.prototype, "currentDockPosition", null), e([d()], R6.prototype, "dockOptions", null), e([d()], R6.prototype, "dockEnabled", void 0), e([o9("viewModel.featureCount")], R6.prototype, "featureCount", void 0), e([d()], R6.prototype, "featureMenuOpen", void 0), e([o9("viewModel.features")], R6.prototype, "features", void 0), e([o9("viewModel.goToOverride")], R6.prototype, "goToOverride", void 0), e([d()], R6.prototype, "headingLevel", void 0), e([o9("viewModel.highlightEnabled")], R6.prototype, "highlightEnabled", void 0), e([o9("viewModel.location")], R6.prototype, "location", void 0), e([d({ aliasOf: { source: "messages.widgetLabel", overridable: true } })], R6.prototype, "label", void 0), e([d()], R6.prototype, "maxInlineActions", void 0), e([d(), e4("esri/widgets/Popup/t9n/Popup")], R6.prototype, "messages", void 0), e([d(), e4("esri/t9n/common")], R6.prototype, "messagesCommon", void 0), e([o9("viewModel.promises")], R6.prototype, "promises", void 0), e([o9("viewModel.selectedFeature")], R6.prototype, "selectedFeature", void 0), e([o9("viewModel.selectedFeatureIndex")], R6.prototype, "selectedFeatureIndex", void 0), e([d({ readOnly: true })], R6.prototype, "selectedFeatureWidget", null), e([d()], R6.prototype, "spinnerEnabled", void 0), e([o9("viewModel.title")], R6.prototype, "title", void 0), e([o9("viewModel.updateLocationEnabled")], R6.prototype, "updateLocationEnabled", void 0), e([o9("viewModel.view")], R6.prototype, "view", void 0), e([d({ type: U5 }), t8(["triggerAction", "trigger-action"])], R6.prototype, "viewModel", void 0), e([o9("viewModel.visible")], R6.prototype, "visible", void 0), e([d()], R6.prototype, "visibleElements", void 0), e([s3("visibleElements")], R6.prototype, "castVisibleElements", null), e([t7()], R6.prototype, "_close", null), e([t7()], R6.prototype, "_toggleDockEnabled", null), e([t7()], R6.prototype, "_toggleFeatureMenu", null), e([t7()], R6.prototype, "_toggleActionsMenu", null), e([t7()], R6.prototype, "_triggerAction", null), e([t7()], R6.prototype, "_selectFeature", null), e([t7()], R6.prototype, "_next", null), e([t7()], R6.prototype, "_previous", null), R6 = e([n3(S7)], R6); var j10 = R6; // node_modules/@arcgis/core/views/DOMContainer.js var l18 = [0, 0]; function p15(e23) { const t25 = (e23.ownerDocument || window.document).defaultView, s30 = e23.getBoundingClientRect(); return l18[0] = s30.left + t25.pageXOffset, l18[1] = s30.top + t25.pageYOffset, l18; } function c26(e23) { e23 && (t6(e23), e23.parentNode && e23.parentNode.removeChild(e23)); } function m20(e23) { const t25 = document.createElement("div"); return e23.appendChild(t25), t25; } var f10 = 16; var y11 = 750; var v11 = 512; var _5 = 2; var g12 = (i32) => { let l27 = class extends i32 { constructor(...e23) { super(...e23), this._freqInfo = { freq: f10, time: y11 }, this._overlayRenderTaskHandle = null, this.height = 0, this.position = null, this.resizing = false, this.root = null, this.surface = null, this.suspended = true, this.ui = null, this.userContent = null, this.width = 0, this.widthBreakpoint = null, this.handles.add([l4(() => this.cursor, (e24) => { const { surface: t25 } = this; t25 && t25.setAttribute("data-cursor", e24); }), l4(() => this.interacting, (e24) => { const { surface: t25 } = this; t25 && t25.setAttribute("data-interacting", e24.toString()); })]); } initialize() { this.handles.add(l4(() => this.ui, (e23, t25) => this._handleUIChange(e23, t25))), this._wireUI(this.ui), this.handles.add([this.on("focus", () => this.notifyChange("focused")), this.on("blur", () => this.notifyChange("focused"))]); } destroy() { this.destroyed || (this.ui && (this.ui.destroy(), this.ui = null), this.popup && !this.popup.destroyed && this.popup.destroy(), this.container = null); } set container(e23) { const s30 = this._get("container"); if (s30 === e23) return; const i33 = "dom-size"; if (this.handles.remove(i33), this._stopMeasuring(), s30 && (s30.classList.remove("esri-view"), this._overlayRenderTaskHandle && (this._overlayRenderTaskHandle.remove(), this._overlayRenderTaskHandle = null), this.overlay.destroy(), this._set("overlay", null), c26(this.root), this._set("root", null), r5(this.userContent, s30), c26(this.userContent), this._set("userContent", null)), e23) { e23.classList.add("esri-view"); const s31 = document.createElement("div"); s31.className = "esri-view-user-storage", r5(e23, s31), e23.appendChild(s31), this._set("userContent", s31); const h19 = document.createElement("div"); h19.className = "esri-view-root", e23.insertBefore(h19, e23.firstChild), this._set("root", h19); const a34 = document.createElement("div"); a34.className = "esri-view-surface", a34.setAttribute("role", "application"), a34.tabIndex = 0, h19.appendChild(a34), this._set("surface", a34); const u23 = new n11(); h19.appendChild(u23.surface), this._set("overlay", u23), l4(() => u23.needsRender, (e24) => { e24 && !this._overlayRenderTaskHandle ? this._overlayRenderTaskHandle = A({ render: () => { this.overlay.render(); } }) : this._overlayRenderTaskHandle && (this._overlayRenderTaskHandle.remove(), this._overlayRenderTaskHandle = null); }), this.forceDOMReadyCycle(), this.handles.add(l4(() => this.size, (e24) => { const [t25, s32] = e24, i34 = "esri-view-surface--inset-outline"; t25 >= document.body.clientWidth || s32 >= document.body.clientHeight ? a34.classList.add(i34) : a34.classList.remove(i34); }, h2), i33), this._set("container", e23), this._startMeasuring(); } else this._set("width", 0), this._set("height", 0), this._set("position", null), this._set("suspended", true), this._set("surface", null), this._set("container", null); } get focused() { const e23 = document.activeElement === this.surface; return document.hasFocus() && e23; } get popup() { return this._get("popup") || new j10({ view: this }); } set popup(e23) { const t25 = this._get("popup"); t25 && t25 !== e23 && t25.destroy(), this._set("popup", e23); } get size() { return [this.width, this.height]; } blur() { this.surface && this.surface.blur(); } focus() { this.surface && this.surface.focus(); } pageToContainer(e23, t25, s30) { const i33 = this.position; return e23 -= i33[0], t25 -= i33[1], s30 ? (s30[0] = e23, s30[1] = t25) : s30 = [e23, t25], s30; } containerToPage(e23, t25, s30) { const i33 = this.position; return e23 += i33[0], t25 += i33[1], s30 ? (s30[0] = e23, s30[1] = t25) : s30 = [e23, t25], s30; } _handleUIChange(e23, t25) { t25 && (this.handles.remove("ui"), t25.destroy()), e23 && this._wireUI(e23), this._set("ui", e23); } _wireUI(e23) { this.handles.remove("ui"), e23 && (e23.view = this, this.handles.add([l4(() => this.root, (t25) => { e23.container = t25 ? m20(t25) : null; }, h2), l4(() => this.popup, (t25, s30) => { const i33 = "popup", o30 = "manual"; s30 && e23.remove(s30, i33), t25 && (t25.view = e23.view, e23.add(t25, { key: i33, position: o30 })); }, h2)], "ui")); } _stopMeasuring() { this.handles.remove("measuring"), this._get("resizing") && this._set("resizing", false); } _startMeasuring() { const e23 = this._freqInfo; e23.freq = f10, e23.time = y11, this.handles.add([(() => { const t25 = () => { e23.freq = f10, e23.time = y11; }; return window.addEventListener("resize", t25), { remove() { window.removeEventListener("resize", t25); } }; })(), A({ prepare: (e24) => { const t25 = this._measure(), s30 = this._freqInfo; if (s30.time += e24.deltaTime, t25 && (s30.freq = f10, this._get("resizing") || this._set("resizing", true)), s30.time < s30.freq) return; s30.time = 0; const i33 = this._position(); s30.freq = i33 || t25 ? f10 : Math.min(y11, s30.freq * _5), !t25 && s30.freq >= v11 && this._get("resizing") && this._set("resizing", false); } })], "measuring"), this._measure(), this._position(); } _measure() { const e23 = this.container, t25 = e23 ? e23.clientWidth : 0, s30 = e23 ? e23.clientHeight : 0; if (t25 === 0 || s30 === 0) return this.suspended || this._set("suspended", true), false; const i33 = this.width, o30 = this.height; return t25 === i33 && s30 === o30 ? (this.suspended && this._set("suspended", false), false) : (this._set("width", t25), this._set("height", s30), this.suspended && this._set("suspended", false), this.emit("resize", { oldWidth: i33, oldHeight: o30, width: t25, height: s30 }), true); } _position() { const e23 = this.container, t25 = this.position, s30 = p15(e23); return (!t25 || s30[0] !== t25[0] || s30[1] !== t25[1]) && (this._set("position", [s30[0], s30[1]]), true); } forceDOMReadyCycle() { } }; return e([d({ value: null, cast: (e23) => e3(e23) })], l27.prototype, "container", null), e([d({ readOnly: true })], l27.prototype, "focused", null), e([d({ readOnly: true })], l27.prototype, "height", void 0), e([d({ type: j10 })], l27.prototype, "popup", null), e([d({ type: n11 })], l27.prototype, "overlay", void 0), e([d({ readOnly: true })], l27.prototype, "position", void 0), e([d({ readOnly: true })], l27.prototype, "resizing", void 0), e([d({ readOnly: true })], l27.prototype, "root", void 0), e([d({ value: null, readOnly: true })], l27.prototype, "size", null), e([d({ readOnly: true })], l27.prototype, "surface", void 0), e([d({ readOnly: true })], l27.prototype, "suspended", void 0), e([d()], l27.prototype, "ui", void 0), e([d({ readOnly: true })], l27.prototype, "userContent", void 0), e([d({ readOnly: true })], l27.prototype, "width", void 0), e([d()], l27.prototype, "widthBreakpoint", void 0), l27 = e([n3("esri.views.DOMContainer")], l27), l27; }; // node_modules/@arcgis/core/views/PopupView.js var p16 = (p36) => { let a34 = class extends p36 { async fetchPopupFeatures(e23, r24) { await this.when(); const { location: i32, queryArea: p37, layerViewsAndGraphics: a35, clientOnlyGraphics: t25 } = await this._prepareFetchPopupFeatures(e23, r24), o30 = Promise.resolve(t25), c42 = this._queryLayerPopupFeatures(p37, a35, r24), n34 = c42.map((e24) => e24.promise); return { location: i32, clientOnlyGraphics: t25, allGraphicsPromise: C([o30, ...n34]).then((e24) => Array.from(new Set(e24.flat()))), promisesPerLayerView: c42 }; } _queryLayerPopupFeatures(e23, s30, i32) { return s30.map(({ layerView: s31, graphics: p37 }) => { const a35 = { clientGraphics: p37, event: r(i32) ? i32.event : null, signal: r(i32) ? i32.signal : null, defaultPopupTemplateEnabled: !!r(i32) && !!i32.defaultPopupTemplateEnabled }, t25 = s31.fetchPopupFeatures(e23, a35); return { layerView: s31, promise: t25 }; }); } _isValidPopupGraphic(e23, s30) { return e23 && !!e23.getEffectivePopupTemplate(r(s30) && s30.defaultPopupTemplateEnabled); } async _prepareFetchPopupFeatures(e23, r24) { const { clientGraphics: s30, queryArea: i32, location: p37 } = await this._popupHitTestGraphics(e23, r24), a35 = this._getFetchPopupLayerViews(), { layerViewsAndGraphics: t25, clientOnlyGraphics: o30 } = this._graphicsPerFetchPopupLayerView(s30, a35); return { clientOnlyGraphics: o30, layerViewsAndGraphics: t25, queryArea: i32, location: p37 }; } async _popupHitTestGraphics(e23, r24) { const { results: s30, mapPoint: i32 } = await this.popupHitTest(e23), p37 = s30.filter((e24) => e24.type === "graphic" && this._isValidPopupGraphic(e24.graphic, r24)), a35 = p37.length ? p37[0].mapPoint : null; return { clientGraphics: p37.map((e24) => e24.graphic), queryArea: i32, location: i32 || a35 }; } _getFetchPopupLayerViews() { const e23 = []; return this.allLayerViews.forEach((r24) => { this._isValidPopupLayerView(r24) && e23.push(r24); }), r(this.graphicsView) && this._isValidPopupLayerView(this.graphicsView) && e23.push(this.graphicsView), e23.reverse(); } _isValidPopupLayerView(e23) { return r(e23) && (!("layer" in e23) || !e23.suspended) && "fetchPopupFeatures" in e23; } _graphicsPerFetchPopupLayerView(e23, r24) { const s30 = [], i32 = new Map(), p37 = r24.map((e24) => { const r25 = []; return "layer" in e24 ? i32.set(e24.layer, r25) : i32.set(e24.graphics, r25), { layerView: e24, graphics: r25 }; }); for (const a35 of e23) { const e24 = i32.get(a35.layer) || i32.get(a35.sourceLayer) || null; e24 ? e24.push(a35) : s30.push(a35); } return { layerViewsAndGraphics: p37, clientOnlyGraphics: s30 }; } }; return a34 = e([n3("esri.views.PopupView")], a34), a34; }; // node_modules/@arcgis/core/support/AnalysesCollection.js var i14 = s.getLogger("esri.support.AnalysesCollection"); var n18 = class extends m9 { constructor(e23) { super(e23), this.handles.add(this.on("before-add", (e24) => { t(e24.item) || e24.item.parent === this.owner && (i14.warn("Analysis inside the collection must be unique. Not adding this element again."), e24.preventDefault()); })); } _own(e23) { e23.parent = this.owner; } _release(e23) { e23.parent = null; } }; n18 = e([n3("esri.support.AnalysesCollection")], n18); // node_modules/@arcgis/core/views/BasemapView.js var p17 = class extends y { constructor(e23) { super(e23), this.view = null, this.baseLayerViews = new j3(), this.referenceLayerViews = new j3(), this._loadingHandle = l4(() => this.view?.map?.basemap, (e24) => { e24 && e24.load().catch(() => { }); }, h2); } destroy() { this._set("view", null), this._loadingHandle && (this._loadingHandle.remove(), this._loadingHandle = null); } get suspended() { return !this.view || this.view.suspended; } get updating() { if (this.view && this.view.suspended) return false; const e23 = this.view?.map?.basemap; return !!e23 && (!!e23.loaded && (this.baseLayerViews.some((e24) => e24.updating) || this.referenceLayerViews.some((e24) => e24.updating))); } }; e([d({ constructOnly: true })], p17.prototype, "view", void 0), e([d({ readOnly: true })], p17.prototype, "baseLayerViews", void 0), e([d({ readOnly: true })], p17.prototype, "referenceLayerViews", void 0), e([d({ readOnly: true })], p17.prototype, "suspended", null), e([d({ type: Boolean, readOnly: true })], p17.prototype, "updating", null), p17 = e([n3("esri.views.BasemapView")], p17); // node_modules/@arcgis/core/views/LayerViewManager.js var v12 = s.getLogger("esri.views.LayerViewManager"); var V3 = class { constructor(e23, r24, i32) { this.layer = e23, this.view = r24, this.layerViewImporter = i32, this._controller = new AbortController(), this._deferred = T(), this._started = false, this.done = false, v(this._controller.signal, () => { const r25 = new s2("cancelled:layerview-create", "layerview creation cancelled", { layer: e23 }); this._deferred.reject(r25); }); } get promise() { return this._deferred.promise; } destroy() { this._controller.abort(); const { layerView: e23 } = this; if (!e23) return; const { layer: r24, view: t25 } = this; r24.emit("layerview-destroy", { view: t25, layerView: e23 }), t25.emit("layerview-destroy", { layer: r24, layerView: e23 }), this.done = true, this.layer = null, this.layerView = null, this.view = null, this.layerViewImporter = null; } async start() { if (this._started) return; this._started = true; const { _controller: { signal: e23 }, layer: r24, view: i32 } = this; this._map = i32.map; try { let s30, o30; if (await r24.load({ signal: e23 }), "prefetchResources" in r24 && await r24.prefetchResources({ signal: e23 }), r24.createLayerView) s30 = await r24.createLayerView(i32, { signal: e23 }); else { if (!this.layerViewImporter.hasLayerViewModule(r24)) throw new s2("layer:view-not-supported", "No layerview implementation was found"); const a34 = await this.layerViewImporter.importLayerView(r24); f(e23), s30 = "default" in a34 ? new a34.default({ layer: r24, view: i32 }) : new a34({ layer: r24, view: i32 }); } const l27 = () => { o30 = a2(o30), s30.destroyed || s30.destroy(), s30.layer = null, s30.parent = null, s30.view = null, this.done = true; }; o30 = v(e23, l27), f(e23); try { await s30.when(); } catch (a34) { throw l27(), a34; } const y17 = this._map?.allLayers?.includes(r24); if (!y17) return l27(), void this._deferred.reject(new s2("view:no-layerview-for-layer", "The layer has been removed from the map", { layer: r24 })); this.layerView = s30, r24.emit("layerview-create", { view: i32, layerView: s30 }), i32.emit("layerview-create", { layer: r24, layerView: s30 }), this.done = true, this._deferred.resolve(s30); } catch (a34) { r24.emit("layerview-create-error", { view: i32, error: a34 }), i32.emit("layerview-create-error", { layer: r24, error: a34 }), this.done = true, this._deferred.reject(new s2("layerview:create-error", "layerview creation failed", { layer: r24, error: a34 })); } } }; var L9 = class extends d2 { constructor(e23) { super(e23), this._layerLayerViewInfoMap = new Map(), this._watchUpdatingTracking = new c3(), this.supportsGround = true, this._preloadLayerViewModules = () => { const e24 = this.view.map?.allLayers; if (e24) for (const r24 of e24) this.layerViewImporter.hasLayerViewModule(r24) && this.layerViewImporter.importLayerView(r24); }, this._reschedule = () => (t(this._workPromise) && (this._workPromise = T()), this.handles.remove("reschedule"), this.handles.add(v2(this._doWork), "reschedule"), this._workPromise.promise), this._doWork = () => { const e24 = this.view.map; if (this._map !== e24 && (this.clear(), this._map = e24), t(this._workPromise)) return void this.notifyChange("updating"); this.handles.remove("reschedule"), this.handles.remove("collection-change"); const t25 = new p4({ getCollections: () => this._rootCollectionNames.map((e25) => this.get(e25)), getChildrenFunction: (e25) => e25 && "layers" in e25 ? e25.layers : null }); if (!t25) return this._workPromise.resolve(), void (this._workPromise = null); for (const r24 of t25) this._createLayerView(r24); this._refreshCollections(); for (const [r24, s30] of this._layerLayerViewInfoMap) t25.includes(r24) || (this._layerLayerViewInfoMap.delete(s30.layer), s30.destroy()); const i32 = t25.filter((e25) => e25.type === "group").map((e25) => e25.layers), a34 = [e24?.ground?.layers, e24?.basemap?.baseLayers, e24?.basemap?.referenceLayers, e24?.layers, ...i32].filter((e25) => !!e25); this.handles.add(a34.map((e25) => this._watchUpdatingTracking.addOnCollectionChange(() => e25, this._reschedule)), "collection-change"), this._workPromise.resolve(), this._workPromise = null; }; } initialize() { this.handles.add([a3(() => this.view?.map?.allLayers, "change", this._preloadLayerViewModules, { onListenerAdd: this._preloadLayerViewModules }), l4(() => { const e23 = this.view, r24 = e23?.map; return [r24?.basemap, r24?.ground, r24?.layers, e23?.ready]; }, () => this._reschedule(), w)]), this._preloadLayerViewModules(), this._reschedule(); } destroy() { this.clear(), this._watchUpdatingTracking.destroy(), this._map = null; } get _layersToLayerViews() { const e23 = [["view.map.basemap.baseLayers", "view.basemapView.baseLayerViews"], ["view.map.layers", "view.layerViews"], ["view.map.basemap.referenceLayers", "view.basemapView.referenceLayerViews"]]; return this.supportsGround && e23.push(["view.map.ground.layers", "view.groundView.layerViews"]), new Map(e23); } get _rootCollectionNames() { return Array.from(this._layersToLayerViews.keys()); } get updating() { return r(this._workPromise) || this._watchUpdatingTracking.updating || n(this._layerLayerViewInfoMap, (e23) => !e23.done); } get updatingRemaining() { let e23 = 0; for (const r24 of this._layerLayerViewInfoMap.values()) r24.done || ++e23; return e23; } clear() { if (!this.destroyed) { for (const e23 of this._layerLayerViewInfoMap.values()) e23.destroy(); this._layerLayerViewInfoMap.clear(), this._refreshCollections(); } } async whenLayerView(e23) { if (await this._reschedule(), !this._layerLayerViewInfoMap.has(e23)) throw new s2("view:no-layerview-for-layer", "No layerview has been found for the layer", { layer: e23 }); return this._layerLayerViewInfoMap.get(e23).promise; } _refreshCollections() { for (const [e23, r24] of this._layersToLayerViews) this._populateLayerViewsOwners(this.get(e23), this.get(r24), this.view); this.notifyChange("updating"), this.notifyChange("updatingRemaining"); } _populateLayerViewsOwners(e23, r24, t25) { if (!e23 || !r24) return void (r24 && r24.removeAll()); let i32 = 0; for (const a34 of e23) { const e24 = this._layerLayerViewInfoMap.get(a34); if (!e24 || !e24.layerView) continue; const s30 = e24.layerView; s30.layer = a34, s30.parent = t25, r24.getItemAt(i32) !== s30 && r24.splice(i32, 0, s30), a34.layers && this._populateLayerViewsOwners(a34.layers, s30.layerViews, s30), i32 += 1; } i32 < r24.length && r24.splice(i32, r24.length); } _createLayerView(e23) { if (this._layerLayerViewInfoMap.has(e23)) return this.view.ready && this._layerLayerViewInfoMap.get(e23).start(), this.notifyChange("updating"), void this.notifyChange("updatingRemaining"); e23.load().catch(() => { }), this.layerViewImporter.hasLayerViewModule(e23) && this.layerViewImporter.importLayerView(e23); const r24 = new V3(e23, this.view, this.layerViewImporter); r24.promise.then(() => this._refreshCollections(), (r25) => { r25 && (g(r25) || r25.name === "cancelled:layerview-create") || v12.error(`Failed to create layerview for layer title:'${e23.title ?? "no title"}', id:'${e23.id ?? "no id"}' of type '${e23.type}'.`, { layer: e23, error: r25 }), this._refreshCollections(); }), this._layerLayerViewInfoMap.set(e23, r24), this.view.ready && r24.start(), this.notifyChange("updating"), this.notifyChange("updatingRemaining"); } }; e([d()], L9.prototype, "_workPromise", void 0), e([d({ readOnly: true })], L9.prototype, "_watchUpdatingTracking", void 0), e([d({ readOnly: true })], L9.prototype, "_layersToLayerViews", null), e([d({ readOnly: true })], L9.prototype, "_rootCollectionNames", null), e([d()], L9.prototype, "layerViewImporter", void 0), e([d()], L9.prototype, "supportsGround", void 0), e([d({ readOnly: true })], L9.prototype, "updating", null), e([d({ readOnly: true })], L9.prototype, "updatingRemaining", null), e([d({ constructOnly: true })], L9.prototype, "view", void 0), L9 = e([n3("esri.views.LayerViewManager")], L9); var M8 = L9; // node_modules/@arcgis/core/views/Magnifier.js var i15 = class extends y { constructor(o30) { super(o30), this.factor = 1.5, this.offset = c2(0, 0), this.position = null, this.size = 120, this.maskUrl = null, this.maskEnabled = true, this.overlayUrl = null, this.overlayEnabled = true, this.visible = true; } get version() { return this.commitProperty("factor"), this.commitProperty("offset"), this.commitProperty("position"), this.commitProperty("visible"), this.commitProperty("size"), this.commitProperty("maskUrl"), this.commitProperty("maskEnabled"), this.commitProperty("overlayUrl"), this.commitProperty("overlayEnabled"), (this._get("version") || 0) + 1; } }; e([d({ type: Number })], i15.prototype, "factor", void 0), e([d({ nonNullable: true })], i15.prototype, "offset", void 0), e([d()], i15.prototype, "position", void 0), e([d({ type: Number, range: { min: 0 } })], i15.prototype, "size", void 0), e([d()], i15.prototype, "maskUrl", void 0), e([d()], i15.prototype, "maskEnabled", void 0), e([d()], i15.prototype, "overlayUrl", void 0), e([d()], i15.prototype, "overlayEnabled", void 0), e([d({ readOnly: true })], i15.prototype, "version", null), e([d({ type: Boolean })], i15.prototype, "visible", void 0), i15 = e([n3("esri.views.Magnifier")], i15); var p18 = i15; // node_modules/@arcgis/core/views/3d/support/TextureCollection.js var i16 = class extends y { constructor(e23, t25) { super({}), this._stage = e23, this._textureRequests = new Map(), this._frameTask = t25?.registerTask(L3.TEXTURE_UNLOAD) ?? Q; } normalizeCtorArgs() { return {}; } destroy() { super.destroy(), this._frameTask.remove(), this._textureRequests.forEach((e23) => this._releaseTextureRequest(e23)), this._textureRequests.clear(); } get updating() { return this._frameTask.updating; } fromData(e23, t25, r24) { const s30 = this.makeUid(e23); let o30 = this._textureRequests.get(s30); return o30 || (o30 = { referenceCount: 0, texture: t25(), textureAsync: null, abortController: null, onRemove: r24 }, this._stage && (this._stage.add(o30.texture), this._stage.loadImmediate(o30.texture)), this._textureRequests.set(s30, o30)), o30.referenceCount++, { uid: s30, texture: o30.texture, release: () => this._release(s30) }; } _release(e23) { const t25 = this._textureRequests.get(e23); t25 ? (t25.referenceCount < 1 && console.warn("TextureCollection: reference count is < 1 for " + e23), t25.referenceCount--, t25.referenceCount < 1 && this._frameTask.schedule(() => this._releaseNow(e23))) : console.warn(`TextureCollection: texture doesn't exist: '${e23}'`); } get test() { return { textureRequests: this._textureRequests }; } _releaseNow(e23) { if (!this._textureRequests) return; const t25 = this._textureRequests.get(e23); !t25 || t25.referenceCount > 0 || (this._releaseTextureRequest(t25), this._textureRequests.delete(e23)); } _releaseTextureRequest(e23) { e23.onRemove && e23.onRemove(), e23.texture ? this._stage?.remove(e23.texture) : e23.abortController && (e23.abortController.abort(), e23.abortController = null); } makeUid(e23, t25 = null) { return r(t25) ? `${e23}.${t25}px` : e23; } }; e([d()], i16.prototype, "_frameTask", void 0), e([d()], i16.prototype, "updating", null), i16 = e([n3("esri.views.3d.support.TextureCollection")], i16); // node_modules/@arcgis/core/views/input/IViewEvents.js var t16; !function(t25) { t25[t25.Left = 0] = "Left", t25[t25.Middle = 1] = "Middle", t25[t25.Right = 2] = "Right"; }(t16 || (t16 = {})); // node_modules/@arcgis/core/views/input/ViewEvents.js var r17 = ["click", "double-click", "immediate-click", "immediate-double-click", "hold", "drag", "key-down", "key-up", "pointer-down", "pointer-move", "pointer-up", "pointer-drag", "mouse-wheel", "pointer-enter", "pointer-leave", "gamepad", "focus", "blur"]; var i17 = {}; function o18(t25) { return !!i17[t25]; } function s15(t25) { for (const e23 of t25) if (!o18(e23)) return false; return true; } r17.forEach((t25) => { i17[t25] = true; }); var p19 = class { constructor(t25) { this.handlers = new Map(), this.counter = 0, this.handlerCounts = new Map(), this.view = t25, this.inputManager = null; } connect(t25) { t25 && this.disconnect(), this.inputManager = t25, this.handlers.forEach(({ handler: t26, priority: e23 }, a34) => this.inputManager.installHandlers(a34, [t26], e23)); } disconnect() { this.inputManager && this.handlers.forEach((t25, e23) => this.inputManager.uninstallHandlers(e23)), this.inputManager = null; } destroy() { this.disconnect(), this.handlers.clear(), this.view = null; } on(t25, e23, a34, r24) { const i32 = Array.isArray(t25) ? t25 : t25.split(","); if (!s15(i32)) return i32.some(o18) && console.error("Error: registering input events and other events on the view at the same time is not supported."), null; let p36, l27; Array.isArray(e23) ? l27 = e23 : (p36 = e23, l27 = []), typeof a34 == "function" ? p36 = a34 : r24 = a34, r24 = r24 != null ? r24 : g3.DEFAULT; const u23 = this._createUniqueGroupName(), m29 = new c27(this.view, i32, l27, p36); this.handlers.set(u23, { handler: m29, priority: r24 }); for (const n34 of i32) { const t26 = this.handlerCounts.get(n34) || 0; this.handlerCounts.set(n34, t26 + 1); } return this.inputManager && this.inputManager.installHandlers(u23, [m29], r24), { remove: () => this._removeHandler(u23, i32) }; } hasHandler(t25) { return !!this.handlerCounts.get(t25); } _removeHandler(t25, e23) { if (this.handlers.has(t25)) { this.handlers.delete(t25); for (const t26 of e23) { const e24 = this.handlerCounts.get(t26); e24 === void 0 ? console.error("Trying to remove handler for event that has no handlers registered: ", t26) : e24 === 1 ? this.handlerCounts.delete(t26) : this.handlerCounts.set(t26, e24 - 1); } } this.inputManager && this.inputManager.uninstallHandlers(t25); } _createUniqueGroupName() { return this.counter += 1, `viewEvents_${this.counter}`; } }; var c27 = class extends i8 { constructor(t25, e23, a34, n34) { super(true), this.view = t25; for (const r24 of e23) switch (r24) { case "click": this.registerIncoming("click", a34, (t26) => n34(this._wrapClick(t26))); break; case "double-click": this.registerIncoming("double-click", a34, (t26) => n34(this._wrapDoubleClick(t26))); break; case "immediate-click": this.registerIncoming("immediate-click", a34, (t26) => n34(this._wrapImmediateClick(t26))); break; case "immediate-double-click": this.registerIncoming("immediate-double-click", a34, (t26) => n34(this._wrapImmediateDoubleClick(t26))); break; case "hold": this.registerIncoming("hold", a34, (t26) => n34(this._wrapHold(t26))); break; case "drag": this.registerIncoming("drag", a34, (t26) => { const e24 = this._wrapDrag(t26); e24 && n34(e24); }); break; case "key-down": this.registerIncoming("key-down", a34, (t26) => n34(this._wrapKeyDown(t26))); break; case "key-up": this.registerIncoming("key-up", a34, (t26) => n34(this._wrapKeyUp(t26))); break; case "pointer-down": this.registerIncoming("pointer-down", a34, (t26) => n34(this._wrapPointer(t26, "pointer-down"))); break; case "pointer-move": this.registerIncoming("pointer-move", a34, (t26) => n34(this._wrapPointer(t26, "pointer-move"))); break; case "pointer-up": this.registerIncoming("pointer-up", a34, (t26) => n34(this._wrapPointer(t26, "pointer-up"))); break; case "pointer-drag": this.registerIncoming("pointer-drag", a34, (t26) => n34(this._wrapPointerDrag(t26))); break; case "mouse-wheel": this.registerIncoming("mouse-wheel", a34, (t26) => n34(this._wrapMouseWheel(t26))); break; case "pointer-enter": this.registerIncoming("pointer-enter", a34, (t26) => n34(this._wrapPointer(t26, "pointer-enter"))); break; case "pointer-leave": this.registerIncoming("pointer-leave", a34, (t26) => n34(this._wrapPointer(t26, "pointer-leave"))); break; case "gamepad": this.registerIncoming("gamepad", a34, (t26) => { n34(this._wrapGamepad(t26)); }); break; case "focus": this.registerIncoming("focus", a34, (t26) => { n34(this._wrapFocus(t26)); }); break; case "blur": this.registerIncoming("blur", a34, (t26) => { n34(this._wrapBlur(t26)); }); } } _wrapFocus(t25) { return { type: "focus", timestamp: t25.timestamp, native: t25.data.native, cancelable: t25.cancelable, stopPropagation: () => t25.stopPropagation(), async: (e23) => t25.async(e23), preventDefault: () => t25.preventDefault() }; } _wrapBlur(t25) { return { type: "blur", timestamp: t25.timestamp, native: t25.data.native, cancelable: t25.cancelable, stopPropagation: () => t25.stopPropagation(), async: (e23) => t25.async(e23), preventDefault: () => t25.preventDefault() }; } _wrapClick(t25) { const { pointerType: a34, button: n34, buttons: r24, x: i32, y: o30, native: s30, eventId: p36 } = t25.data, { cancelable: c42, timestamp: l27 } = t25; return { type: "click", pointerType: a34, button: n34, buttons: r24, x: i32, y: o30, native: s30, timestamp: l27, screenPoint: c2(i32, o30), mapPoint: this._getMapPoint(i32, o30), eventId: p36, cancelable: c42, stopPropagation: () => t25.stopPropagation(), async: (e23) => t25.async(e23), preventDefault: () => t25.preventDefault() }; } _wrapDoubleClick(t25) { const { pointerType: e23, button: a34, buttons: n34, x: r24, y: i32, native: o30, eventId: s30 } = t25.data, { cancelable: p36, timestamp: c42 } = t25; return { type: "double-click", pointerType: e23, button: a34, buttons: n34, x: r24, y: i32, native: o30, timestamp: c42, mapPoint: this._getMapPoint(r24, i32), eventId: s30, cancelable: p36, stopPropagation: () => t25.stopPropagation(), async: (e24) => t25.async(e24), preventDefault: () => t25.preventDefault() }; } _wrapImmediateClick(t25) { const { pointerType: e23, button: a34, buttons: n34, x: r24, y: i32, native: o30, eventId: s30 } = t25.data, p36 = o30.pointerId, { cancelable: c42, timestamp: l27 } = t25; return { type: "immediate-click", pointerId: p36, pointerType: e23, button: a34, buttons: n34, x: r24, y: i32, native: o30, timestamp: l27, mapPoint: this._getMapPoint(r24, i32), eventId: s30, cancelable: c42, stopPropagation: () => t25.stopPropagation(), async: (e24) => t25.async(e24), preventDefault: () => t25.preventDefault() }; } _wrapImmediateDoubleClick(t25) { const { pointerType: e23, button: a34, buttons: n34, x: r24, y: i32, native: o30, eventId: s30 } = t25.data, p36 = o30.pointerId, { cancelable: c42, timestamp: l27 } = t25; return { type: "immediate-double-click", pointerId: p36, pointerType: e23, button: a34, buttons: n34, x: r24, y: i32, native: o30, timestamp: l27, mapPoint: this._getMapPoint(r24, i32), eventId: s30, cancelable: c42, stopPropagation: () => t25.stopPropagation(), async: (e24) => t25.async(e24), preventDefault: () => t25.preventDefault() }; } _wrapHold(t25) { const { pointerType: e23, button: a34, buttons: n34, x: r24, y: i32, native: o30 } = t25.data, { cancelable: s30, timestamp: p36 } = t25; return { type: "hold", pointerType: e23, button: a34, buttons: n34, x: r24, y: i32, native: o30, timestamp: p36, mapPoint: this._getMapPoint(r24, i32), cancelable: s30, stopPropagation: () => t25.stopPropagation(), async: (e24) => t25.async(e24), preventDefault: () => t25.preventDefault() }; } _getMapPoint(t25, a34) { return this.view.toMap(c2(t25, a34), { exclude: [] }); } _wrapDrag(e23) { const a34 = e23.data, { x: n34, y: r24 } = a34.center, { action: i32, pointerType: o30, button: s30 } = a34; if (i32 === "start" && (this.latestDragStart = a34), !this.latestDragStart) return; const p36 = a34.pointer.native, c42 = a34.buttons, { cancelable: l27, timestamp: u23 } = e23, m29 = { x: this.latestDragStart.center.x, y: this.latestDragStart.center.y }; return i32 === "end" && (this.latestDragStart = void 0), { type: "drag", action: i32, x: n34, y: r24, origin: m29, pointerType: o30, button: s30, buttons: c42, radius: a34.radius, angle: m4(a34.angle), native: p36, timestamp: u23, cancelable: l27, stopPropagation: () => e23.stopPropagation(), async: (t25) => e23.async(t25), preventDefault: () => e23.preventDefault() }; } _wrapKeyDown(t25) { const { key: e23, repeat: a34, native: n34 } = t25.data, { cancelable: r24, timestamp: i32 } = t25; return { type: "key-down", key: e23, repeat: a34, native: n34, timestamp: i32, cancelable: r24, stopPropagation: () => t25.stopPropagation(), async: (e24) => t25.async(e24), preventDefault: () => t25.preventDefault() }; } _wrapKeyUp(t25) { const { key: e23, native: a34 } = t25.data, { cancelable: n34, timestamp: r24 } = t25; return { type: "key-up", key: e23, native: a34, timestamp: r24, cancelable: n34, stopPropagation: () => t25.stopPropagation(), async: (e24) => t25.async(e24), preventDefault: () => t25.preventDefault() }; } _wrapPointer(t25, e23) { const { x: a34, y: n34, button: r24, buttons: i32, native: o30, eventId: s30 } = t25.data, p36 = o30.pointerId, c42 = o30.pointerType, { cancelable: l27, timestamp: u23 } = t25; return { type: e23, x: a34, y: n34, pointerId: p36, pointerType: c42, button: r24, buttons: i32, native: o30, timestamp: u23, eventId: s30, cancelable: l27, stopPropagation: () => t25.stopPropagation(), async: (e24) => t25.async(e24), preventDefault: () => t25.preventDefault() }; } _wrapPointerDrag(t25) { const { x: e23, y: a34, buttons: n34, native: r24, eventId: i32 } = t25.data.currentEvent, { button: o30 } = t25.data.startEvent, s30 = t25.data.startEvent.native.pointerId, p36 = t25.data.startEvent.native.pointerType, c42 = t25.data.action, l27 = { x: t25.data.startEvent.x, y: t25.data.startEvent.y }, { cancelable: u23, timestamp: m29 } = t25; return { type: "pointer-drag", x: e23, y: a34, pointerId: s30, pointerType: p36, button: o30, buttons: n34, action: c42, origin: l27, native: r24, timestamp: m29, eventId: i32, cancelable: u23, stopPropagation: () => t25.stopPropagation(), async: (e24) => t25.async(e24), preventDefault: () => t25.preventDefault() }; } _wrapMouseWheel(t25) { const { cancelable: e23, data: a34, timestamp: n34 } = t25, { x: r24, y: i32, deltaY: o30, native: s30 } = a34; return { type: "mouse-wheel", x: r24, y: i32, deltaY: o30, native: s30, timestamp: n34, cancelable: e23, stopPropagation: () => t25.stopPropagation(), async: (e24) => t25.async(e24), preventDefault: () => t25.preventDefault() }; } _wrapGamepad(t25) { const { action: e23, state: a34, device: n34 } = t25.data, { cancelable: r24, timestamp: i32 } = t25, { buttons: o30, axes: s30 } = a34; return { type: "gamepad", device: n34, timestamp: i32, action: e23, buttons: o30, axes: s30, cancelable: r24, stopPropagation: () => t25.stopPropagation(), async: (e24) => t25.async(e24), preventDefault: () => t25.preventDefault() }; } }; // node_modules/@arcgis/core/views/interactive/interfaces.js var o19; var t17; var u13; !function(o30) { o30[o30.USER = 0] = "USER", o30[o30.MANAGER = 1] = "MANAGER"; }(o19 || (o19 = {})), function(o30) { o30[o30.None = 0] = "None", o30[o30.Unfocused = 1] = "Unfocused", o30[o30.Focused = 2] = "Focused", o30[o30.Unselected = 4] = "Unselected", o30[o30.Selected = 8] = "Selected", o30[o30.All = 15] = "All"; }(t17 || (t17 = {})), function(o30) { o30[o30.None = 0] = "None", o30[o30.Custom1 = 16] = "Custom1", o30[o30.Custom2 = 32] = "Custom2", o30[o30.Custom3 = 64] = "Custom3", o30[o30.Custom4 = 128] = "Custom4", o30[o30.Custom5 = 256] = "Custom5", o30[o30.Custom6 = 512] = "Custom6", o30[o30.Custom7 = 1024] = "Custom7", o30[o30.Custom8 = 2048] = "Custom8", o30[o30.Custom9 = 4096] = "Custom9", o30[o30.Custom10 = 8192] = "Custom10", o30[o30.Custom11 = 16384] = "Custom11", o30[o30.Custom12 = 32768] = "Custom12", o30[o30.All = 65520] = "All"; }(u13 || (u13 = {})); // node_modules/@arcgis/core/views/interactive/interactiveToolUtils.js var o20 = s.getLogger("esri.views.interactive.interactiveToolUtils"); function i18(e23) { return [e23.on("before-add", (t25) => { const i32 = t25.item; if (i32 == null || e23.includes(i32)) return o20.warn("Tool is either already in the list of tools or tool is `null`. Not adding tool."), void t25.preventDefault(); i32.onAdd(); }), e23.on("after-remove", (e24) => { const t25 = e24.item; t25.visible = false, t25.active && (t25.view.activeTool = null), t25.destroy(); })]; } function r18(e23) { return e23.visible && e23.getEditableFlag(o19.USER) && e23.getEditableFlag(o19.MANAGER); } // node_modules/@arcgis/core/views/support/screenUtils.js function n19(t25) { return c2(t25.x, t25.y); } function i20(t25, n34) { const c42 = (t25 instanceof HTMLElement ? t25 : t25.surface).getBoundingClientRect(); return c2(n34.clientX - c42.left, n34.clientY - c42.top); } function r19(e23, t25) { return t25 instanceof Event ? i20(e23, t25) : n19(t25); } function o21(e23) { if (e23 instanceof Event) return true; if (typeof e23 == "object" && "type" in e23) { switch (e23.type) { case "click": case "double-click": case "pointer-down": case "pointer-drag": case "pointer-enter": case "pointer-leave": case "pointer-up": case "pointer-move": case "immediate-click": case "immediate-double-click": case "hold": case "drag": case "mouse-wheel": return true; default: return false; } } return false; } // node_modules/@arcgis/core/views/interactive/ToolViewManagerManipulatorState.js var p20 = class { constructor() { this._pointerLocations = new Map(), this._hoveredManipulators = new Map(), this._grabbedManipulators = new Map(), this._draggedManipulators = new Map(), this._stopDrag = false, this._currentlyActiveTool = null, this._revertToActiveTool = false, this._cursor = null; } get cursor() { return this._cursor; } handleInputEvent(t25, a34) { const s30 = () => t25.stopPropagation(); switch (t25.type) { case "pointer-move": c28(t25.pointerType) && this._pointerLocations.set(t25.pointerId, { x: t25.x, y: t25.y, pointerType: t25.pointerType }); break; case "drag": this._grabbedManipulators.size > 0 && (this._stopDrag = true), this._stopDrag && (s30(), t25.action === "end" && (this._stopDrag = false)); break; case "pointer-down": { if (!u14(t25)) break; const e23 = n19(t25), n34 = this._intersect(e23, t25.pointerType, a34.forEachTool); if (t(n34)) break; const p36 = this._findToolAndManipulatorByKey(n34, a34.forEachTool, h13), c42 = o(p36, (t26) => t26.manipulator), d20 = o(p36, (t26) => t26.tool); !(r(c42) && r(d20) && c42.interactive) || c42.grabbable && c42.grabbableForEvent(t25) || !c42.grabbing || c42.dragging || this._ungrabManipulatorBeforeDragging(c42, d20, t25), r(c42) && c42.interactive && c42.grabbable && c42.grabbableForEvent(t25) && !c42.grabbing && (this._grabbedManipulators.set(t25.pointerId, { key: n34, start: e23, pointerType: t25.pointerType }), this._grabbedManipulators.size === 1 && a34.activeTool !== n34.tool && (this._currentlyActiveTool = a34.activeTool, this._revertToActiveTool = true, a34.setActiveTool(n34.tool)), c42.grabbing = true, c42.events.emit("grab-changed", { action: "start", pointerType: t25.pointerType, screenPoint: e23 }), s30()); break; } case "pointer-up": this._handlePointerEnd(t25, a34); break; case "pointer-drag": { if (!u14(t25)) break; const i32 = this._grabbedManipulators.get(t25.pointerId), p36 = this._draggedManipulators.get(t25.pointerId), c42 = o(i32 || p36, ({ key: t26 }) => t26), d20 = this._findManipulatorByKey(c42, a34.forEachTool); if (t(d20)) break; const h19 = n19(t25); h19.x = o5(h19.x, 0, a34.view.width), h19.y = o5(h19.y, 0, a34.view.height); const g20 = e2(i32 || p36).start; switch (t25.action) { case "start": case "update": t25.action !== "update" && this._grabbedManipulators.size !== 1 || (d20.dragging = true, p36 ? d20.events.emit("drag", { action: "update", start: g20, screenPoint: h19 }) : d20.events.emit("drag", { action: "start", start: g20, screenPoint: h19, pointerType: t25.pointerType }), this._draggedManipulators.set(t25.pointerId, { key: e2(c42), start: g20 })); break; case "end": d20.dragging = false, p36 && d20.events.emit("drag", { action: "end", start: g20, screenPoint: h19 }), this._draggedManipulators.delete(t25.pointerId), this._handlePointerEnd(t25, a34); } s30(); break; } case "immediate-click": { const e23 = n19(t25), r24 = this._intersect(e23, t25.pointerType, a34.forEachTool), n34 = this._findToolAndManipulatorByKey(r24, a34.forEachTool, h13); if (d11(t25) || a34.forEachTool((t26) => { if ((!r(n34) || n34.tool !== t26 || t26.automaticManipulatorSelection) && t26.manipulators) { let e24 = false; t26.manipulators.forEach(({ manipulator: t27 }) => { t27.selected && (t27.selected = false, e24 = true); }), e24 && t26.manipulatorSelectionChanged && t26.manipulatorSelectionChanged(); } }), t(n34)) break; const { manipulator: p36, tool: c42 } = n34; if (!p36.interactive) break; p36.selectable && c42.automaticManipulatorSelection && (p36.selected = !p36.selected, c42.manipulatorSelectionChanged && c42.manipulatorSelectionChanged()); const u23 = t25.native.shiftKey; p36.events.emit("immediate-click", { screenPoint: e23, button: t25.button, pointerType: t25.pointerType, shiftKey: u23, stopPropagation: s30 }); break; } case "click": { const e23 = n19(t25), i32 = this._intersect(e23, t25.pointerType, a34.forEachTool), r24 = this._findManipulatorByKey(i32, a34.forEachTool); if (t(r24) || !r24.interactive) break; const n34 = t25.native.shiftKey; r24.events.emit(t25.type, { screenPoint: e23, button: t25.button, pointerType: t25.pointerType, shiftKey: n34 }), s30(); break; } case "double-click": { const e23 = n19(t25), i32 = this._intersect(e23, t25.pointerType, a34.forEachTool), r24 = this._findManipulatorByKey(i32, a34.forEachTool); if (t(r24) || !r24.interactive) break; const n34 = t25.native.shiftKey; r24.events.emit("double-click", { screenPoint: e23, button: t25.button, pointerType: t25.pointerType, shiftKey: n34, stopPropagation: s30 }); break; } case "immediate-double-click": { const e23 = n19(t25), i32 = this._intersect(e23, t25.pointerType, a34.forEachTool), r24 = this._findManipulatorByKey(i32, a34.forEachTool); if (t(r24) || !r24.interactive) break; const n34 = t25.native.shiftKey; r24.events.emit("immediate-double-click", { screenPoint: e23, button: t25.button, pointerType: t25.pointerType, shiftKey: n34, stopPropagation: s30 }); break; } } this._onFocusChange(a34.forEachTool); } _ungrabManipulatorBeforeDragging(t25, e23, o30) { t25.grabbing = false, t25.events.emit("grab-changed", { action: "end", pointerType: o30.pointerType, screenPoint: n19(o30) }), this._grabbedManipulators.forEach(({ key: o31 }, i32) => { o31.tool === e23 && e23.manipulators.findById(o31.manipulatorId) === t25 && this._grabbedManipulators.delete(i32); }); } _handlePointerEnd(t25, e23) { const o30 = o(this._grabbedManipulators.get(t25.pointerId), ({ key: t26 }) => t26), n34 = this._findManipulatorByKey(o30, e23.forEachTool); r(n34) && !n34.dragging && (this._grabbedManipulators.size === 1 && this._draggedManipulators.size === 0 && this._revertToActiveTool && (e23.setActiveTool(this._currentlyActiveTool), this._revertToActiveTool = false, this._currentlyActiveTool = null), n34.grabbing && (n34.grabbing = false, n34.events.emit("grab-changed", { action: "end", pointerType: t25.pointerType, screenPoint: n19(t25) })), this._grabbedManipulators.delete(t25.pointerId)); } _cursorFromMap(e23, o30) { let r24 = null; return n(e23, ({ key: t25 }) => { const e24 = this._findManipulatorByKey(t25, o30); return !!(r(e24) && e24.interactive && "cursor" in e24 && e24.cursor) && (r24 = e24.cursor, true); }), r24; } _onFocusChange(t25) { this._updateCursor(t25), this._updateFocusedManipulatorTools(t25); } _updateCursor(t25) { this._grabbedManipulators.size > 0 ? this._cursor = this._cursorFromMap(this._grabbedManipulators, t25) || "grabbing" : this._hoveredManipulators.size > 0 ? this._cursor = this._cursorFromMap(this._hoveredManipulators, t25) || "pointer" : this._cursor = null; } _updateFocusedManipulatorTools(t25) { const e23 = new Set(); this._grabbedManipulators.forEach(({ key: { tool: t26 } }) => { e23.add(t26); }), this._hoveredManipulators.forEach(({ key: { tool: t26 } }) => { e23.add(t26); }), t25((t26) => { t26.hasFocusedManipulators = e23.has(t26); }); } clearPointers(t25, e23, r24 = true, n34) { const a34 = (e24) => e24.tool === t25 && (t(n34) || e24.manipulatorId === n34); this._grabbedManipulators.forEach(({ key: t26, pointerType: o30 }, r25) => { if (a34(t26)) { this._grabbedManipulators.delete(r25); const n35 = this._findManipulatorByKey(t26, e23); r(n35) && (n35.grabbing = false, n35.events.emit("grab-changed", { action: "end", screenPoint: null, pointerType: o30 })); } }), this._draggedManipulators.forEach(({ key: t26 }, o30) => { if (a34(t26)) { this._draggedManipulators.delete(o30); const r25 = this._findManipulatorByKey(t26, e23); r(r25) && (r25.dragging = false, r25.events.emit("drag", { action: "cancel" })); } }), r24 && this._hoveredManipulators.forEach(({ key: t26 }, o30) => { if (a34(t26)) { this._hoveredManipulators.delete(o30); const r25 = this._findManipulatorByKey(t26, e23); r(r25) && (r25.hovering = false); } }), this._onFocusChange(e23); } _intersect(t25, e23, i32) { let r24 = null; return i32((i33) => { if (i33.manipulators == null || !r18(i33)) return false; const n34 = i33.manipulators.intersect(t25, e23); return !t(n34) && (r24 = { manipulatorId: n34.id, tool: i33 }, true); }), r24; } updateHoveredStateFromKnownPointers(t25) { this._pointerLocations.forEach((e23, o30) => { this._updateHoveredStateForPointerAtScreenPosition(c2(e23.x, e23.y), o30, e23.pointerType, t25); }); } handleHoverEvent(t25, e23) { t25.type !== "pointer-up" && t25.type !== "immediate-click" && t25.type !== "pointer-move" || !c28(t25.pointerType) || this._updateHoveredStateForPointerAtScreenPosition(n19(t25), t25.pointerId, t25.pointerType, e23); } _updateHoveredStateForPointerAtScreenPosition(t25, e23, o30, a34) { const s30 = this._intersect(t25, o30, a34); let l27 = this._findManipulatorByKey(s30, a34); const p36 = o(this._hoveredManipulators.get(e23), ({ key: t26 }) => t26), c42 = this._findManipulatorByKey(p36, a34); r(l27) && !l27.interactive && (l27 = null), c42 !== l27 && (r(c42) && (c42.hovering = false), r(l27) ? (l27.hovering = true, this._hoveredManipulators.set(e23, { key: e2(s30) })) : this._hoveredManipulators.delete(e23), this._onFocusChange(a34)); } _findManipulatorByKey(t25, e23) { return this._findToolAndManipulatorByKey(t25, e23, h13) ? h13.manipulator : null; } _findToolAndManipulatorByKey(t25, e23, r24) { return t(t25) ? null : (r24.tool = null, r24.manipulator = null, e23((e24) => { if (e24 !== t25.tool || e24.manipulators == null || !r18(e24)) return false; const o30 = e24.manipulators.findById(t25.manipulatorId); return !!r(o30) && (r24.manipulator = o30, r24.tool = e24, true); }), r24.manipulator ? r24 : null); } }; function c28(t25) { return t25 === "mouse"; } function u14(t25) { return t25.pointerType !== "mouse" || t25.button === 0; } function d11(t25) { return !!t25.native.shiftKey; } var h13 = { manipulator: null, tool: null }; // node_modules/@arcgis/core/views/ToolViewManager.js var E7 = s.getLogger("esri.views.ToolViewManager"); var g13 = "attached"; var w11 = "tools"; var y12 = class extends d2 { constructor(t25) { super(t25), this._manipulatorState = new p20(), this.tools = new j3(), this.cursor = null, this._forEachTool = (t26) => { for (const o30 of this.tools.items) if (t26(o30)) return; }; } initialize() { this.handles.add([this.view.on(r17, (t25) => { this._handleInputEvent(t25); }, g3.TOOL), ...i18(this.tools), this.tools.on("before-remove", ({ item: t25 }) => { this._manipulatorState.clearPointers(t25, this._forEachTool); }), this.tools.on("change", () => { this._refreshToolWatchers(); })]); } destroy() { this.detach(), this.handles.removeAll(); } set activeTool(t25) { if (r(t25) && !this.view.ready) return void E7.error("Cannot set active tool while view is not ready."); if (t25 === this.activeTool) return; const o30 = this.activeTool; this._set("activeTool", t25), r(o30) && o30.deactivate(), r(t25) && t25.activate(), this._removeIncompleteTools(t25); const e23 = t(this.activeTool); for (const i32 of this.tools) { i32.setEditableFlag(o19.MANAGER, e23 || i32 === this.activeTool); const t26 = r18(i32); !e23 && t26 || this._manipulatorState.clearPointers(i32, this._forEachTool, !t26); } this._updateCursor(); } get updating() { return this.updatingHandles.updating || this.tools.some((t25) => t25.updating) || (this.textures?.updating ?? false); } attach() { this.view.type === "3d" ? (this._set("textures", new i16(this.view._stage, this.view.resourceController.scheduler)), this.handles.add([l4(() => { const { state: t25 } = this.view; return "camera" in t25 && t25.camera; }, () => { this._forEachManipulator((t25) => { t25.onViewChange != null && t25.onViewChange(); }); }), this.view.elevationProvider.on("elevation-change", (t25) => { this._forEachManipulator((o30) => { o30.onElevationChange != null && o30.onElevationChange(t25); }); }), n2(() => this._set("textures", l(this.textures)))], g13)) : this.handles.add(l4(() => this.view.extent, () => { this._forEachManipulator((t25) => { t25.onViewChange != null && t25.onViewChange(); }); })); } detach() { r(this.activeTool) && (this.activeTool = null), this.tools.removeAll(), this.handles.remove(g13); } _forEachManipulator(t25) { this._forEachTool((o30) => { o30.manipulators && o30.manipulators.forEach(({ manipulator: e23 }) => t25(e23, o30)); }); } _handleInputEvent(t25) { let o30 = false; const e23 = { ...t25, stopPropagation: () => { o30 = true, t25.stopPropagation(); } }; r(this.activeTool) ? this.activeTool.handleInputEvent && this.activeTool.handleInputEvent(e23) : this._forEachTool((t26) => { !o30 && t26.visible && t26.handleInputEvent(e23); }), !o30 && t25.type === "key-down" && t25.key === "Escape" && this.activeTool && (t25.stopPropagation(), this.activeTool = null), this._manipulatorState.handleInputEvent(e23, { forEachTool: this._forEachTool, activeTool: this.activeTool, setActiveTool: (t26) => { this.activeTool = t26; }, view: this.view }), !o30 && r(this.activeTool) && this.activeTool.handleInputEventAfter(e23), this._manipulatorState.handleHoverEvent(e23, this._forEachTool), this._updateCursor(); } _refreshToolWatchers() { this.handles.remove(w11), this._forEachTool((t25) => { if (t25 instanceof y) { const o30 = l4(() => [t25.cursor, t25.visible, t25.editable], () => { r18(t25) || this._manipulatorState.clearPointers(t25, this._forEachTool), this._updateCursor(); }); this.handles.add(o30, w11); } t25.manipulators && this.handles.add(t25.manipulators.on("change", (o30) => { o30.removed.forEach(({ id: o31 }) => { this._manipulatorState.clearPointers(t25, this._forEachTool, true, o31); }), this._manipulatorState.updateHoveredStateFromKnownPointers(this._forEachTool), this._updateCursor(); }), w11); }), this._manipulatorState.updateHoveredStateFromKnownPointers(this._forEachTool), this._updateCursor(); } _updateCursor() { const t25 = this._manipulatorState.cursor; let o30 = t25; this._forEachTool((e23) => !(!r(e23.cursor) || !e23.visible || !t(t25) && e23.preferManipulatorCursor) && (o30 = e23.cursor, true)), this._get("cursor") !== o30 && this._set("cursor", o30); } _removeIncompleteTools(t25) { this.tools.filter((o30) => (t(t25) || o30 !== t25) && !o30.created && o30.removeIncompleteOnCancel).forEach((t26) => { this.tools.remove(t26); }); } }; e([d({ constructOnly: true, nonNullable: true })], y12.prototype, "view", void 0), e([d({ readOnly: true, nonNullable: true })], y12.prototype, "textures", void 0), e([d({ value: null })], y12.prototype, "activeTool", null), e([d({ readOnly: true, type: j3 })], y12.prototype, "tools", void 0), e([d({ readOnly: true })], y12.prototype, "cursor", void 0), e([d({ readOnly: true })], y12.prototype, "updating", null), y12 = e([n3("esri.views.ToolViewManager")], y12); var j11 = y12; // node_modules/@arcgis/core/views/input/gamepad/GamepadInputDevice.js var o22 = class extends y { constructor(e23) { super(), this.nativeIndex = null, this._detectedDeviceType = "unknown", e23.mapping === "standard" ? this._detectedDeviceType = "standard" : n20.test(e23.id) ? this._detectedDeviceType = "spacemouse" : this._detectedDeviceType = "unknown", this.nativeIndex = e23.index; } get native() { return (navigator.getGamepads ? navigator.getGamepads() : [])[this.nativeIndex]; } get deviceType() { return this._detectedDeviceType; } get axisThreshold() { return a16[this.deviceType]; } }; e([d({ nonNullable: true, readOnly: true })], o22.prototype, "nativeIndex", void 0), e([d({ type: String, readOnly: true })], o22.prototype, "deviceType", null), e([d({ type: Number, readOnly: true })], o22.prototype, "axisThreshold", null), o22 = e([n3("esri.views.input.gamepad.GamepadInputDevice")], o22); var n20 = new RegExp("^(3dconnexion|space(mouse|navigator|pilot|explorer))", "i"); var a16 = { standard: 0.15, spacemouse: 0.025, unknown: 0 }; var i21 = o22; // node_modules/@arcgis/core/views/input/gamepad/GamepadSettings.js var c29 = class extends y { constructor(...e23) { super(...e23), this.devices = new j3(), this.enabledFocusMode = "document"; } }; e([d({ type: j3.ofType(i21), readOnly: true })], c29.prototype, "devices", void 0), e([d({ type: ["document", "view", "none"] })], c29.prototype, "enabledFocusMode", void 0), c29 = e([n3("esri.views.input.gamepad.GamepadSettings")], c29); var i22 = c29; // node_modules/@arcgis/core/views/input/Input.js var p21 = class extends y { constructor() { super(...arguments), this.gamepad = new i22(); } }; e([d({ readOnly: true })], p21.prototype, "gamepad", void 0), p21 = e([n3("esri.views.input.Input")], p21); var a17 = p21; // node_modules/@arcgis/core/views/navigation/gamepad/GamepadSettings.js var s16 = class extends y { constructor(o30) { super(o30), this.enabled = true, this.device = null, this.mode = "pan", this.tiltDirection = "forward-down", this.velocityFactor = 1; } }; e([d({ type: Boolean, nonNullable: true })], s16.prototype, "enabled", void 0), e([d({ type: i21 })], s16.prototype, "device", void 0), e([d({ type: ["pan", "zoom"], nonNullable: true })], s16.prototype, "mode", void 0), e([d({ type: ["forward-down", "forward-up"], nonNullable: true })], s16.prototype, "tiltDirection", void 0), e([d({ type: Number, nonNullable: true })], s16.prototype, "velocityFactor", void 0), s16 = e([n3("esri.views.navigation.gamepad.GamepadSettings")], s16); var a18 = s16; // node_modules/@arcgis/core/views/navigation/Navigation.js var a19 = class extends y { constructor(o30) { super(o30), this.browserTouchPanEnabled = true, this.gamepad = new a18(), this.momentumEnabled = true, this.mouseWheelZoomEnabled = true; } }; e([d({ type: Boolean })], a19.prototype, "browserTouchPanEnabled", void 0), e([d({ type: a18, nonNullable: true })], a19.prototype, "gamepad", void 0), e([d({ type: Boolean })], a19.prototype, "momentumEnabled", void 0), e([d({ type: Boolean })], a19.prototype, "mouseWheelZoomEnabled", void 0), a19 = e([n3("esri.views.navigation.Navigation")], a19); var p22 = a19; // node_modules/@arcgis/core/geometry/support/heightModelInfoUtils.js var s17; function h14(e23) { const r24 = e23.url && m7(e23.url); return !((e23.spatialReference && e23.spatialReference.vcsWkid) == null && r(r24) && r24.serverType === "ImageServer") && u15(e23) && e23.heightModelInfo ? e23.heightModelInfo : d12(e23) ? v5.deriveUnitFromSR(m21, e23.spatialReference) : null; } function u15(e23) { return "heightModelInfo" in e23; } function f11(e23) { if (e23.type === "unknown" || !("capabilities" in e23)) return false; switch (e23.type) { case "csv": case "feature": case "geojson": case "subtype-group": case "ogc-feature": case "wfs": return true; default: return false; } } function d12(e23) { return f11(e23) ? !!(e23.capabilities && e23.capabilities.data && e23.capabilities.data.supportsZ) : p23(e23); } function g14(e23) { return e23.layers != null || p23(e23) || f11(e23) || u15(e23); } function p23(e23) { switch (e23.type) { case "building-scene": case "elevation": case "integrated-mesh": case "point-cloud": case "scene": case "voxel": return true; case "line-of-sight": case "base-dynamic": case "base-elevation": case "base-tile": case "bing-maps": case "csv": case "geojson": case "feature": case "subtype-group": case "geo-rss": case "graphics": case "group": case "imagery": case "imagery-tile": case "kml": case "map-image": case "map-notes": case "media": case "ogc-feature": case "open-street-map": case "route": case "stream": case "tile": case "unknown": case "unsupported": case "vector-tile": case "wcs": case "web-tile": case "wfs": case "wms": case "wmts": case null: return false; } return false; } !function(e23) { e23[e23.Ok = 0] = "Ok", e23[e23.Units = 1] = "Units", e23[e23.HeightModel = 2] = "HeightModel", e23[e23.CRS = 3] = "CRS", e23[e23.Unsupported = 4] = "Unsupported"; }(s17 || (s17 = {})); var m21 = new v5({ heightModel: "gravity-related-height" }); // node_modules/@arcgis/core/views/support/projectionUtils.js var n21; var s18 = null; async function c30(r24) { s18 || (s18 = import("./geometryServiceUtils-Y6PPGAUO.js").then((e23) => n21 = e23)), await s18, f(r24); } async function p24(e23, s30, a34, m29) { if (!e23) return null; const l27 = e23.spatialReference; return en() || An(l27, s30) ? rn(e23, s30) : n21 ? n21.projectGeometry(e23, s30, a34, m29) : (await Promise.race([c30(m29), tn(m29)]), p24(e23, s30, a34, m29)); } // node_modules/@arcgis/core/views/support/DefaultsFromMap.js var h15 = class extends y { constructor(e23) { super(e23), this.required = { tileInfo: false, heightModelInfo: false, extent: false }, this.defaultSpatialReference = null, this.userSpatialReference = null, this.sourcePreloadCount = 10, this.priorityCollection = null, this.requiresExtentInSpatialReference = true, this.suspended = false, this._projectExtentTask = { task: null, input: null, output: null, spatialReference: null }; } destroy() { this._projectExtentTask.task && (this._projectExtentTask.task = h(this._projectExtentTask.task)), this._set("map", null); } get ready() { return !this._spatialReferenceTask.updating && !this._tileInfoTask.updating && !this._extentTask.updating; } get heightModelInfoReady() { return !this._heightModelInfoTask.updating; } get spatialReference() { return r(this.userSpatialReference) ? this.userSpatialReference : e2(this._spatialReferenceTask.spatialReference); } get extent() { return e2(this._extentTask.extent); } get heightModelInfo() { return e2(this._heightModelInfoTask.heightModelInfo); } get vcsWkid() { return e2(this._heightModelInfoTask.vcsWkid); } get latestVcsWkid() { return e2(this._heightModelInfoTask.latestVcsWkid); } get viewingMode() { return t(this.userSpatialReference) || this.userSpatialReference.equals(e2(this._spatialReferenceTask.spatialReference)) ? e2(this._spatialReferenceTask.viewingMode) : null; } get tileInfo() { return e2(this._tileInfoTask.tileInfo); } get mapCollections() { const e23 = this.map?.(), t25 = []; return r(this.priorityCollection) && t25.push(this.priorityCollection), t25.push({ parent: e23?.basemap, layers: e23?.basemap?.baseLayers }, { layers: e23?.layers }, { parent: e23?.ground, layers: e23?.ground?.layers }, { parent: e23?.basemap, layers: e23?.basemap?.referenceLayers }), t25; } get _allLayers() { return this._collectLayers(this.mapCollections); } get _spatialReferenceTask() { if (this.suspended) return this._get("_spatialReferenceTask") ?? { updating: false }; const { layers: e23, updating: t25 } = this._allLayers; let a34 = null; for (const i32 of e23) { const e24 = this._getSupportedSpatialReferences(i32); if (e24.length > 0) { const t26 = this._narrowDownSpatialReferenceCandidates(a34, e24); r(t26) && (a34 = t26); } if (r(a34) && a34.length === 1) break; } if (t25 && (t(a34) || a34.length !== 1)) return { updating: true }; const s30 = this._pickSpatialReferenceCandidate(a34); return { spatialReference: r(s30) ? s30.spatialReference : null, viewingMode: r(s30) ? s30.viewingMode : null, updating: false }; } get _tileInfoTask() { if (!this.required.tileInfo) return this._get("_tileInfoTask") ?? { updating: false }; if (!this.spatialReference) return { updating: this._spatialReferenceTask.updating }; const { layers: e23, updating: t25 } = this._collectLayers([{ parent: this.map?.()?.basemap, layers: this.map?.()?.basemap?.baseLayers }, { layers: this.map?.()?.layers }]); if (e23 && e23.length > 0 && "tileInfo" in e23[0]) { const t26 = e23[0].tileInfo; return { tileInfo: t26 && t26.spatialReference.equals(this.spatialReference) ? t26 : null, updating: false }; } return { updating: t25 }; } get _heightModelInfoTask() { if (!this.required.heightModelInfo || this.suspended && this._get("_heightModelInfoTask")?.heightModelInfo) return this._get("_heightModelInfoTask") ?? { updating: false }; const { layers: e23, updating: t25 } = this._allLayers; for (const a34 of e23) if (g14(a34)) { const e24 = h14(a34); if (e24) return { heightModelInfo: e24, vcsWkid: a34.spatialReference?.vcsWkid, latestVcsWkid: a34.spatialReference?.latestVcsWkid, updating: false }; } return { updating: t25 }; } get _extentCandidatesTask() { if (this.suspended || !this.required.extent) return this._get("_extentCandidatesTask") ?? { updating: false }; if (!this.spatialReference) return { updating: this._spatialReferenceTask.updating }; const e23 = this._allLayers, t25 = e23.updating, a34 = []; for (const s30 of e23.layers) { const e24 = "fullExtents" in s30 && s30.fullExtents || (r(s30.fullExtent) ? [s30.fullExtent] : []), t26 = this.requiresExtentInSpatialReference ? null : e24[0], i32 = e24.find((e25) => e25.spatialReference.equals(this.spatialReference)) ?? t26; if (i32) return { candidates: [{ extent: i32, layer: s30 }], updating: false }; if (this._getSupportedSpatialReferences(s30).length > 0) for (const n34 of e24) a34.push({ extent: n34, layer: s30 }); } return { candidates: a34, updating: t25 }; } get _extentTask() { const { candidates: e23, updating: t25 } = this._extentCandidatesTask; if (t25) return { updating: t25 }; if (t(e23) || e23.length === 0) return { updating: false }; if (!this.spatialReference) return { updating: this._spatialReferenceTask.updating }; const s30 = this._pickExtentCandidate(e23), l27 = this.spatialReference; return s30.extent.equals(this._projectExtentTask.input) && l27.equals(this._projectExtentTask.spatialReference) ? { extent: this._projectExtentTask.output, updating: r(this._projectExtentTask.task) && !this._projectExtentTask.task.finished } : (r(this._projectExtentTask.task) && (this._projectExtentTask.task = h(this._projectExtentTask.task)), this._projectExtentTask = { input: s30.extent.clone(), output: null, spatialReference: l27.clone(), task: O(async (e24) => { try { const t26 = await p24(s30.extent, l27, s30.layer.portalItem, e24); this._projectExtentTask = { ...this._projectExtentTask, task: null, output: t26 }; } catch (t26) { if (p(e24)) return; this._projectExtentTask = { ...this._projectExtentTask, task: null }; } }) }, { updating: true }); } _narrowDownSpatialReferenceCandidates(e23, t25) { if (t(e23)) return t25; const a34 = [], s30 = (e24, t26) => r(e24) ? r(t26) ? e24 === t26 && e24 : e24 : t26; for (const n34 of e23) for (const e24 of t25) { if (!n34.spatialReference.equals(e24.spatialReference)) continue; const t26 = s30(n34.viewingMode, e24.viewingMode); if (t26 !== false) { a34.push({ spatialReference: n34.spatialReference, viewingMode: t26 }); break; } } return a34.length > 0 ? a34 : null; } _pickSpatialReferenceCandidate(e23) { const t25 = this.defaultSpatialReference; return t(e23) || e23.length < 1 ? r(t25) ? { spatialReference: t25, viewingMode: null } : null : (r(t25) && e23.length > 1 && e23.some(({ spatialReference: e24 }) => e24.equals(t25)) && (e23 = e23.filter(({ spatialReference: e24 }) => e24.equals(t25))), e23.length > 1 && e23.some(({ viewingMode: e24 }) => e24 !== l8.Local) && (e23 = e23.filter(({ viewingMode: e24 }) => e24 !== l8.Local)), e23[0]); } _getSupportedSpatialReferences(e23) { const t25 = "supportedSpatialReferences" in e23 && e23.supportedSpatialReferences || (e23.spatialReference ? [e23.spatialReference] : []); if (t25.length === 0) return []; const a34 = []; for (const s30 of t25) { const t26 = this.getSpatialReferenceSupport({ spatialReference: s30, layer: e23 }); if (r(t26)) { const e24 = r(t26.constraints) ? t26.constraints : [{ spatialReference: s30, viewingMode: null }]; for (const { spatialReference: t27, viewingMode: n34 } of e24) (!this.requiresExtentInSpatialReference || t(this.userSpatialReference) || t27.equals(this.userSpatialReference)) && a34.push({ spatialReference: t27, viewingMode: n34 }); } } return a34; } _pickExtentCandidate(e23) { const t25 = this.spatialReference; return e23.find(({ extent: e24 }) => t25.equals(e24.spatialReference)) || e23[0]; } _collectLayers(e23) { if (this._loadMaybe(this.map?.()) !== "loaded") return { layers: [], updating: true }; const t25 = { layers: [], preloading: -1, updating: false }; for (const a34 of e23) if (this._collectCollection(a34, t25), t25.preloading === this.sourcePreloadCount) break; return { layers: t25.layers, updating: t25.updating }; } _collectCollection(e23, t25) { if (e23.layers) { switch (this._loadMaybe(e23.parent)) { case "loading": return t25.updating = true, void ++t25.preloading; case "failed": return; } for (const a34 of e23.layers) { switch (this._loadMaybe(a34)) { case "failed": continue; case "loading": t25.updating = true, ++t25.preloading; break; case "loaded": t25.updating || t25.layers.push(a34), "layers" in a34 && this._collectCollection({ layers: a34.layers }, t25); } if (t25.preloading === this.sourcePreloadCount) break; } } } _loadMaybe(e23) { return e23 && "loadStatus" in e23 ? e23.loadStatus === "not-loaded" ? (e23.load(), "loading") : e23.loadStatus : "loaded"; } }; e([d()], h15.prototype, "required", void 0), e([d({ constructOnly: true })], h15.prototype, "map", void 0), e([d({ constructOnly: true })], h15.prototype, "getSpatialReferenceSupport", void 0), e([d()], h15.prototype, "defaultSpatialReference", void 0), e([d()], h15.prototype, "userSpatialReference", void 0), e([d()], h15.prototype, "sourcePreloadCount", void 0), e([d()], h15.prototype, "priorityCollection", void 0), e([d()], h15.prototype, "requiresExtentInSpatialReference", void 0), e([d()], h15.prototype, "suspended", void 0), e([d({ readOnly: true })], h15.prototype, "ready", null), e([d({ readOnly: true })], h15.prototype, "heightModelInfoReady", null), e([d({ readOnly: true })], h15.prototype, "spatialReference", null), e([d({ readOnly: true })], h15.prototype, "extent", null), e([d({ readOnly: true })], h15.prototype, "heightModelInfo", null), e([d({ readOnly: true })], h15.prototype, "vcsWkid", null), e([d({ readOnly: true })], h15.prototype, "latestVcsWkid", null), e([d({ readOnly: true })], h15.prototype, "viewingMode", null), e([d({ readOnly: true })], h15.prototype, "tileInfo", null), e([d({ readOnly: true })], h15.prototype, "mapCollections", null), e([d({ readOnly: true })], h15.prototype, "_allLayers", null), e([d({ readOnly: true })], h15.prototype, "_spatialReferenceTask", null), e([d({ readOnly: true })], h15.prototype, "_tileInfoTask", null), e([d({ readOnly: true })], h15.prototype, "_heightModelInfoTask", null), e([d({ readOnly: true })], h15.prototype, "_extentCandidatesTask", null), e([d()], h15.prototype, "_extentTask", null), e([d()], h15.prototype, "_projectExtentTask", void 0), h15 = e([n3("esri.views.support.DefaultsFromMap")], h15); // node_modules/@arcgis/core/views/View.js var U7; var W2 = s.getLogger("esri.views.View"); var A6 = U7 = class extends a6(n5.EventedMixin(m3(y))) { constructor(e23) { super(e23), this._userSpatialReference = null, this._cursor = null, this.allLayerViews = new p4({ getCollections: () => [this.basemapView?.baseLayerViews, this.groundView?.layerViews, this.layerViews, this.basemapView?.referenceLayerViews], getChildrenFunction: (e24) => e24.layerViews }), this.groundView = null, this.animation = null, this.basemapView = null, this.fatalError = null, this.extent = null, this.graphics = new c8(), this.analyses = new n18(), this.navigating = false, this.typeSpecificPreconditionsReady = true, this.layerViews = new j3(), this.magnifier = new p18(), this.padding = { left: 0, top: 0, right: 0, bottom: 0 }, this.ready = false, this.spatialReferenceWarningDelay = 1e3, this.supportsGround = true, this.timeExtent = null, this.type = null, this.scale = null, this.updating = false, this.initialExtentRequired = true, this.input = new a17(), this.navigation = new p22(), this.layerViewManager = null, this.analysisViewManager = null, this.isHeightModelInfoRequired = false, this.width = null, this.height = null, this.resizing = false, this.suspended = false, this.viewEvents = new p19(this), this.persistableViewModels = new j3(), this._isValid = false, this._readyCycleForced = false, this.handles.add(l4(() => this.preconditionsReady, (e24) => { e24 ? (this._currentSpatialReference = this.spatialReference, U7.views.add(this)) : (this._currentSpatialReference = null, U7.views.remove(this)), this.notifyChange("spatialReference"), !e24 && this.ready ? (this.layerViewManager?.clear(), this.toolViewManager?.detach(), r(this.analysisViewManager) && this.analysisViewManager.detach(), this._teardown()) : e24 && !this.ready && (this._startup(), r(this.analysisViewManager) && this.analysisViewManager.attach(), this.toolViewManager.attach()); }, U)); } initialize() { this.addResolvingPromise(this.validate().then(() => (this._isValid = true, j4(() => this.ready)))), this.basemapView = new p17({ view: this }), this.layerViewManager = new M8({ view: this, layerViewImporter: { importLayerView: (e23) => this.importLayerView(e23), hasLayerViewModule: (e23) => this.hasLayerViewModule(e23) }, supportsGround: this.supportsGround }), this.toolViewManager = new j11({ view: this }), this._setupSpatialReferenceLogger(), this.handles.add([l4(() => this.initialExtentRequired, (e23) => this.defaultsFromMap.required = { ...this.defaultsFromMap.required, extent: e23 }, { sync: true, initial: true }), l4(() => this.ready, (e23) => { this.defaultsFromMap && (this.defaultsFromMap.suspended = e23, this.defaultsFromMap.userSpatialReference = e23 ? this.spatialReference : this._userSpatialReference); }, { sync: true }), l4(() => this._userSpatialReference, (e23) => { this.defaultsFromMap && (this.defaultsFromMap.userSpatialReference = e23); }, { sync: true, initial: true })]); } _setupSpatialReferenceLogger() { let e23 = null; this.handles.add([l4(() => this.defaultsFromMap?.ready, (t25) => { const i32 = this.map?.allLayers.length > 0; if (t25 && !this.spatialReference && i32) { if (r(e23)) return; const t26 = n2(() => e23 = h(e23)); e23 = O(async (t27) => { try { await L(this.spatialReferenceWarningDelay, null, t27); } catch { return; } finally { e23 = null; } W2.warn("#spatialReference", "no spatial reference could be derived from the currently added map layers"); }), this.handles.add(t26, "spatial-reference-logger-task"); } else this.handles.remove("spatial-reference-logger-task"); }, { sync: true })]); } destroy() { if (this.destroyed) return; this.viewEvents.destroy(), this.allLayerViews.destroy(), this.navigation && (this.navigation.destroy(), this._set("navigation", null)), this.graphics = l(this.graphics), this.analyses = l(this.analyses), this.handles.remove("defaultsFromMap"), this.defaultsFromMap.destroy(), this._set("defaultsFromMap", null), l(this.analysisViewManager), this.toolViewManager = l(this.toolViewManager), this.layerViewManager = l(this.layerViewManager), this.basemapView = l(this.basemapView), this.invalidate(), this._emitter.clear(), this.handles.removeAll(); const e23 = this.map; this.map = null, e23?.destroy(); } _startup() { this._set("ready", true); } _teardown() { this._set("ready", false); } whenReady() { return Promise.resolve(this); } toMap() { return W2.error("#toMap()", "Not implemented on this instance of View"), null; } get _defaultsFromMapSettings() { return {}; } get defaultsFromMap() { return new h15({ required: { tileInfo: false, heightModelInfo: false, extent: false }, map: () => this.map, getSpatialReferenceSupport: (e23) => this.getSpatialReferenceSupport(e23), ...this._defaultsFromMapSettings }); } get heightModelInfo() { return this.getDefaultHeightModelInfo(); } get interacting() { return this.navigating; } get preconditionsReady() { return !(this.fatalError || !this._isValid || this._readyCycleForced || !this.map || m8.isLoadable(this.map) && !this.map.loaded || this.width === 0 || this.height === 0 || !this.spatialReference || !this._validateSpatialReference(this.spatialReference) || !this._currentSpatialReference && !this.defaultsFromMap?.ready || !this.typeSpecificPreconditionsReady); } set map(e23) { e23 !== this._get("map") && (e23?.destroyed && (W2.warn("#map", "The provided map is already destroyed", { map: e23 }), e23 = null), m8.isLoadable(e23) && e23.load().catch(() => { }), this.initialized && (this.forceReadyCycle(), this._currentSpatialReference = null), this._set("map", e23)); } get spatialReference() { let e23 = this._userSpatialReference || this._currentSpatialReference || this.getDefaultSpatialReference() || null; return e23 && this.defaultsFromMap?.required?.heightModelInfo && (e23 = e23.clone(), e23.vcsWkid = this.defaultsFromMap.vcsWkid, e23.latestVcsWkid = this.defaultsFromMap.latestVcsWkid), e23; } set spatialReference(e23) { const t25 = !E2(e23, this._get("spatialReference")); this._set("_userSpatialReference", e23), t25 && (this._set("spatialReference", e23), this._spatialReferenceChanged(e23)); } _spatialReferenceChanged(e23) { } get stationary() { return !this.animation && !this.navigating && !this.resizing; } get initialExtent() { return this.defaultsFromMap?.extent; } get cursor() { const e23 = this.toolViewManager ? this.toolViewManager.cursor : null; return r(e23) ? e23 : this._cursor || "default"; } set cursor(e23) { this._cursor = e23, this.notifyChange("cursor"); } get size() { return [this.width, this.height]; } whenLayerView(e23) { return this.layerViewManager.whenLayerView(e23); } getDefaultSpatialReference() { return this.defaultsFromMap?.spatialReference; } getDefaultHeightModelInfo() { return (this.map && "heightModelInfo" in this.map ? this.map.heightModelInfo : void 0) ?? this.defaultsFromMap?.heightModelInfo ?? null; } importLayerView(e23) { throw new s2("importLayerView() not implemented"); } hasLayerViewModule(e23) { return false; } async validate() { } invalidate() { this._isValid = false; } getSpatialReferenceSupport() { return { constraints: null }; } _validateSpatialReference(e23) { return r(this.getSpatialReferenceSupport({ spatialReference: e23 })); } when(e23, t25) { return this.isResolved() && !this.ready && W2.warn("#when()", "Calling view.when() while the view is no longer ready but was already resolved once will resolve immediately. Use reactiveUtils.whenOnce(() => view.ready).then(...) instead."), super.when(e23, t25); } forceReadyCycle() { this.ready && (f2(() => this.preconditionsReady === false, () => this._readyCycleForced = false, { once: true }), this._readyCycleForced = true); } addAndActivateTool(e23) { this.toolViewManager.tools.add(e23), this.activeTool = e23; } tryFatalErrorRecovery() { this.fatalError = null; } }; A6.views = new j3(), e([d()], A6.prototype, "_userSpatialReference", void 0), e([o9("toolViewManager.activeTool")], A6.prototype, "activeTool", void 0), e([d({ readOnly: true })], A6.prototype, "allLayerViews", void 0), e([d()], A6.prototype, "groundView", void 0), e([d()], A6.prototype, "animation", void 0), e([d()], A6.prototype, "basemapView", void 0), e([d({ readOnly: true })], A6.prototype, "_defaultsFromMapSettings", null), e([d()], A6.prototype, "defaultsFromMap", null), e([d()], A6.prototype, "fatalError", void 0), e([d({ type: M2 })], A6.prototype, "extent", void 0), e([d(a9(c8, "graphics"))], A6.prototype, "graphics", void 0), e([d(a9(n18, "analyses"))], A6.prototype, "analyses", void 0), e([d({ readOnly: true, type: v5 })], A6.prototype, "heightModelInfo", null), e([d({ readOnly: true })], A6.prototype, "interacting", null), e([d({ readOnly: true })], A6.prototype, "navigating", void 0), e([d({ readOnly: true, dependsOn: ["fatalError", "_isValid", "_readyCycleForced", "map", "map.loaded?", "width", "height", "spatialReference", "_currentSpatialReference", "defaultsFromMap.ready", "typeSpecificPreconditionsReady"] })], A6.prototype, "preconditionsReady", null), e([d({ readOnly: true })], A6.prototype, "typeSpecificPreconditionsReady", void 0), e([d({ type: j3, readOnly: true })], A6.prototype, "layerViews", void 0), e([d({ type: p18 })], A6.prototype, "magnifier", void 0), e([d({ value: null, type: L4 })], A6.prototype, "map", null), e([d()], A6.prototype, "padding", void 0), e([d({ readOnly: true })], A6.prototype, "ready", void 0), e([d({ type: k2 })], A6.prototype, "spatialReference", null), e([d()], A6.prototype, "spatialReferenceWarningDelay", void 0), e([d()], A6.prototype, "stationary", null), e([d({ readOnly: true })], A6.prototype, "supportsGround", void 0), e([d({ type: y2 })], A6.prototype, "timeExtent", void 0), e([o9("toolViewManager.tools")], A6.prototype, "tools", void 0), e([d()], A6.prototype, "toolViewManager", void 0), e([d({ readOnly: true })], A6.prototype, "type", void 0), e([d({ type: Number })], A6.prototype, "scale", void 0), e([d({ readOnly: true })], A6.prototype, "updating", void 0), e([d({ readOnly: true })], A6.prototype, "initialExtentRequired", void 0), e([d({ readOnly: true })], A6.prototype, "initialExtent", null), e([d()], A6.prototype, "cursor", null), e([d({ readOnly: true })], A6.prototype, "input", void 0), e([d({ type: p22, nonNullable: true })], A6.prototype, "navigation", void 0), e([d()], A6.prototype, "layerViewManager", void 0), e([d()], A6.prototype, "analysisViewManager", void 0), e([d()], A6.prototype, "width", void 0), e([d()], A6.prototype, "height", void 0), e([d({ readOnly: true })], A6.prototype, "resizing", void 0), e([d({ value: null, readOnly: true })], A6.prototype, "size", null), e([d({ readOnly: true })], A6.prototype, "suspended", void 0), e([d({ readOnly: true })], A6.prototype, "viewEvents", void 0), e([d({ readOnly: true })], A6.prototype, "persistableViewModels", void 0), e([d()], A6.prototype, "_isValid", void 0), e([d()], A6.prototype, "_readyCycleForced", void 0), e([d()], A6.prototype, "_currentSpatialReference", void 0), A6 = U7 = e([n3("esri.views.View")], A6); var G4 = A6; // node_modules/@arcgis/core/views/ViewAnimation.js var p25 = class extends _ { constructor(t25) { super(t25), this.state = "running", this.target = null; } initialize() { this.addResolvingPromise(new Promise((t25, s30) => this._dfd = { resolve: t25, reject: s30 })); } get done() { return this.state === "finished" || this.state === "stopped"; } stop() { this.state !== "stopped" && this.state !== "finished" && (this._set("state", "stopped"), this._dfd.reject(new s2("ViewAnimation stopped"))); } finish() { this.state !== "stopped" && this.state !== "finished" && (this._set("state", "finished"), this._dfd.resolve()); } update(t25, s30) { s30 || (s30 = k(t25) ? "waiting-for-target" : "running"), this._set("target", t25), this._set("state", s30); } }; e([d({ readOnly: true })], p25.prototype, "done", null), e([d({ readOnly: true, type: String })], p25.prototype, "state", void 0), e([d()], p25.prototype, "target", void 0), p25 = e([n3("esri.views.ViewAnimation")], p25), function(t25) { t25.State = { RUNNING: "running", STOPPED: "stopped", FINISHED: "finished", WAITING_FOR_TARGET: "waiting-for-target" }; }(p25 || (p25 = {})); var n22 = p25; // node_modules/@arcgis/core/views/2d/AnimationManager.js var m22 = class { constructor(t25, i32, s30, e23) { const o30 = t25.targetGeometry, n34 = i32.targetGeometry; e23 ? typeof e23 == "string" && (e23 = r11(e23) || t11.ease) : e23 = t11.ease, this.easing = e23, this.duration = s30, this.sCenterX = o30.x, this.sCenterY = o30.y, this.sScale = t25.scale, this.sRotation = t25.rotation, this.tCenterX = n34.x, this.tCenterY = n34.y, this.tScale = i32.scale, this.tRotation = i32.rotation, this.dCenterX = this.tCenterX - this.sCenterX, this.dCenterY = this.tCenterY - this.sCenterY, this.dScale = this.tScale - this.sScale, this.dRotation = this.tRotation - this.sRotation, this.dRotation > 180 ? this.dRotation -= 360 : this.dRotation < -180 && (this.dRotation += 360); } applyRatio(t25, i32) { const s30 = this.easing(i32); let e23, o30, n34, a34; i32 >= 1 ? (e23 = this.tCenterX, o30 = this.tCenterY, n34 = this.tRotation, a34 = this.tScale) : (e23 = this.sCenterX + s30 * this.dCenterX, o30 = this.sCenterY + s30 * this.dCenterY, n34 = this.sRotation + s30 * this.dRotation, a34 = this.sScale + s30 * this.dScale), t25.targetGeometry.x = e23, t25.targetGeometry.y = o30, t25.scale = a34, t25.rotation = n34; } }; var u16 = class extends y { constructor(t25) { super(t25), this.duration = 200, this.transition = null, this.easing = t11.ease, this.view = null, this.viewpoint = null, this.viewpoint = new u5({ targetGeometry: new j2(), scale: 0, rotation: 0 }), this._updateTask = A({ postRender: this._postRender.bind(this) }), this._updateTask.pause(); } destroy() { this._updateTask.remove(), this._updateTask = null; } animate(t25, i32, s30) { this.stop(); const e23 = this.viewpoint; Z(e23, i32), this.transition = new m22(this.viewpoint, t25.target, s30 && s30.duration || this.duration, s30 && s30.easing || this.easing); const o30 = () => { this.animation === t25 && this._updateTask && (t25.state === "finished" && (this.transition.applyRatio(this.viewpoint, 1), this.view.state && (this.view.state.viewpoint = this.viewpoint.clone())), this.animation = null, this.updateFunction = null); }; return t25.when(o30, o30), this._startTime = performance.now(), this._updateTask.resume(), this.animation = t25, t25; } animateContinous(t25, i32) { this.stop(), this.updateFunction = i32, this.viewpoint = t25; const s30 = new n22({ target: t25.clone() }), e23 = () => { this.animation === s30 && this._updateTask && (this.animation = null, this.updateFunction = null); }; return s30.when(e23, e23), this._startTime = performance.now(), this._updateTask.resume(), this.animation = s30, s30; } stop() { this.animation && (this.animation.stop(), this.animation = null, this.updateFunction = null); } _postRender(t25) { const i32 = this.animation; if (i32 && i32.state !== n22.State.STOPPED) { if (this.updateFunction) this.updateFunction(this.viewpoint, t25.deltaTime); else { const t26 = (performance.now() - this._startTime) / this.transition.duration, i33 = t26 >= 1; this.transition.applyRatio(this.viewpoint, t26), i33 && this.animation.finish(); } this.view.state && (this.view.state.viewpoint = this.viewpoint.clone()); } else this._updateTask.pause(); } }; e([d()], u16.prototype, "animation", void 0), e([d()], u16.prototype, "duration", void 0), e([d()], u16.prototype, "transition", void 0), e([d()], u16.prototype, "easing", void 0), e([d()], u16.prototype, "view", void 0), e([d()], u16.prototype, "viewpoint", void 0), u16 = e([n3("esri.views.2d.AnimationManager")], u16); var d13 = u16; // node_modules/@arcgis/core/views/2d/FrameTask.js var s19 = class { constructor(t25) { this.view = t25, this._frameTaskHandle = null, this._updateRequested = false, this.stationary = true, this.animationInProgress = false, this.prepare = () => { this._updateParameters.state = this.view.state, this._updateParameters.stationary = this.view.stationary, this._updateParameters.pixelRatio = window.devicePixelRatio, this._updateParameters.renderingOptions = this.view.renderingOptions; }, this.update = () => { this._updateRequested = false; const { basemapView: t26, graphicsView: a34, labelManager: s30, layerViews: i32, state: { id: r24 } } = this.view; t26.baseLayerViews.forEach(this._updateLayerView, this), i32.forEach(this._updateLayerView, this), t26.referenceLayerViews.forEach(this._updateLayerView, this), r(s30) && (s30.lastUpdateId !== r24 && (s30.viewChange(), s30.lastUpdateId = r24), s30.updateRequested && s30.processUpdate(this._updateParameters)), r(a34) && (a34.lastUpdateId !== r24 && (a34.viewChange(), a34.lastUpdateId = r24), a34.updateRequested && a34.processUpdate(this._updateParameters)), this.view.graphicsTileStore.setViewState(this._updateParameters.state), this.animationInProgress || this._updateRequested || this._frameTaskHandle.pause(); }; } destroy() { this.stop(); } start() { if (this._frameTaskHandle) return; const e23 = this.view; this.stationary = e23.stationary, this._updateParameters = { state: e23.state, pixelRatio: window.devicePixelRatio, stationary: this.stationary, renderingOptions: e23.renderingOptions }, this._stationaryHandle = l4(() => e23.stationary, (e24) => { this.stationary = e24, this.requestFrame(); }), this._frameTaskHandle = A(this), this.requestUpdate(); } stop() { this._frameTaskHandle && (this._updateRequested = false, this._stationaryHandle.remove(), this._frameTaskHandle.remove(), this._updateParameters = this._stationaryHandle = this._frameTaskHandle = null, this.stationary = true, this.animationInProgress = false); } requestUpdate() { this._updateRequested || (this._updateRequested = true, this.requestFrame()); } requestFrame() { this._frameTaskHandle && this._frameTaskHandle.resume(); } _updateLayerView(e23) { const t25 = this.view.state, a34 = e23.lastUpdateId; a34 != null && (this.stationary || e23.moving) || (e23.moving = true, e23.moveStart()), a34 !== t25.id && e23.viewChange(), this.stationary && e23.moving && (e23.moving = false, e23.moveEnd()), e23.lastUpdateId = t25.id, e23.updateRequested && e23.processUpdate(this._updateParameters), "layerViews" in e23 && e23.layerViews.forEach(this._updateLayerView, this); } }; // node_modules/@arcgis/core/views/2d/layerViewModuleImportUtils.js function s20() { return Promise.all([import("./webglDeps-KBPNVQNX.js"), import("./mapViewDeps-56OJ7M5D.js")]); } var a20 = () => s20().then(() => import("./TileLayerView2D-4NJG3IPF.js")); var i23 = () => s20().then(() => import("./FeatureLayerView2D-T24YVAML.js")); var o23 = { "base-dynamic": () => s20().then(() => import("./BaseDynamicLayerView2D-RTE2HFAS.js")), "base-tile": a20, "bing-maps": a20, csv: i23, "geo-rss": () => s20().then(() => import("./GeoRSSLayerView2D-R3EIYHG2.js")), feature: i23, geojson: i23, graphics: () => s20().then(() => import("./GraphicsLayerView2D-TX2RGTD7.js")), group: () => s20().then(() => import("./GroupLayerView2D-VIMXGFZB.js")), imagery: () => s20().then(() => import("./ImageryLayerView2D-MZIFSUX7.js")), "imagery-tile": () => s20().then(() => import("./ImageryTileLayerView2D-HWIZTOT3.js")), kml: () => s20().then(() => import("./KMLLayerView2D-DY5PTMK4.js")), "map-image": () => s20().then(() => import("./MapImageLayerView2D-FYICZIN6.js")), "map-notes": () => s20().then(() => import("./MapNotesLayerView2D-LZWRGLL4.js")), media: () => s20().then(() => import("./MediaLayerView2D-5BSK3PWF.js")), "ogc-feature": () => s20().then(() => import("./OGCFeatureLayerView2D-5V6JYQHI.js")), "open-street-map": a20, route: () => s20().then(() => import("./RouteLayerView2D-JVBXSG6N.js")), stream: () => s20().then(() => import("./StreamLayerView2D-5TYMSFCF.js")), "subtype-group": () => s20().then(() => import("./SubtypeGroupLayerView2D-I4YXTADP.js")), tile: a20, "vector-tile": () => s20().then(() => import("./VectorTileLayerView2D-CYC5MZOG.js")), wcs: () => s20().then(() => import("./ImageryTileLayerView2D-HWIZTOT3.js")), "web-tile": a20, wfs: i23, wms: () => s20().then(() => import("./WMSLayerView2D-YJQTLBD4.js")), wmts: () => s20().then(() => import("./WMTSLayerView2D-TR327MSG.js")), "line-of-sight": null, "base-elevation": null, "building-scene": null, elevation: null, "integrated-mesh": null, "point-cloud": null, voxel: null, scene: null, unknown: null, unsupported: null }; function l19(r24) { const t25 = r24.declaredClass ? r24.declaredClass.slice(r24.declaredClass.lastIndexOf(".") + 1) : "Unknown", s30 = t25.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(); return new s2(`${s30}:view-not-supported`, `${t25} is not supported in 2D`); } var n23 = { hasLayerViewModule: (e23) => r(o23[e23.type]), importLayerView: (e23) => { const r24 = o23[e23.type]; if (t(r24)) throw l19(e23); return r24(e23); } }; // node_modules/@arcgis/core/geometry/support/near.js function o24(o30, m29) { const { spatialReference: r24 } = m29, i32 = [m29.x, m29.y]; let s30 = Number.POSITIVE_INFINITY, x5 = 0, c42 = 0; const a34 = [0, 0], f14 = o30.type === "extent" ? [[[o30.xmin, o30.ymin], [o30.xmin, o30.ymax], [o30.xmax, o30.ymax], [o30.xmax, o30.ymin], [o30.xmin, o30.ymin]]] : o30.rings; for (const n34 of f14) for (let o31 = 0; o31 < n34.length - 1; o31++) { o2(a34, i32, n34, o31); const m30 = m5(i32, a34); m30 < s30 && (s30 = m30, x5 = a34[0], c42 = a34[1]); } return { coordinate: new j2({ x: x5, y: c42, spatialReference: r24 }), distance: s30 }; } // node_modules/@arcgis/core/views/2d/constraints/GeometryConstraint.js var p26; var l20 = s.getLogger("esri.views.MapView"); var y13 = p26 = class extends y { constructor(e23) { super(e23), this.geometry = null, this.spatialReference = null; } get normalizedGeometry() { if (t(this.geometry) || !this.spatialReference) return null; if (!this.spatialReference.equals(this.geometry.spatialReference)) try { return rn(this.geometry, this.spatialReference); } catch (e23) { return l20.error("#constraints.geometry", "could not project the geometry to the view's spatial reference", { geometry: this.geometry, spatialReference: this.spatialReference, error: e23 }), null; } return this.geometry; } constrain(e23, r24) { if (t(this.normalizedGeometry)) return e23; const t25 = e23.targetGeometry; if (this.normalizedGeometry.type === "extent" ? r4(this.normalizedGeometry, t25) : c(this.normalizedGeometry, t25)) return e23; const { coordinate: s30 } = o24(this.normalizedGeometry, t25); return s30 ? (e23.targetGeometry = s30, e23) : e23; } clone() { return new p26({ geometry: this.geometry?.clone(), spatialReference: this.spatialReference?.clone() }); } }; e([d({ constructOnly: true })], y13.prototype, "geometry", void 0), e([d({ readOnly: true })], y13.prototype, "normalizedGeometry", null), e([d({ constructOnly: true })], y13.prototype, "spatialReference", void 0), y13 = p26 = e([n3("esri.views.2d.constraints.GeometryConstraint")], y13); // node_modules/@arcgis/core/views/2d/constraints/RotationConstraint.js var s21; var a21 = s21 = class extends y { constructor() { super(...arguments), this.enabled = true, this.rotationEnabled = true; } constrain(o30, r24) { return this.enabled && r24 ? (this.rotationEnabled || (o30.rotation = r24.rotation), o30) : o30; } clone() { return new s21({ enabled: this.enabled, rotationEnabled: this.rotationEnabled }); } }; e([d()], a21.prototype, "enabled", void 0), e([d()], a21.prototype, "rotationEnabled", void 0), a21 = s21 = e([n3("esri.views.2d.constraints.RotationConstraint")], a21); var n24 = a21; // node_modules/@arcgis/core/views/2d/constraints/ZoomConstraint.js var i24; var a22 = i24 = class extends y { constructor(e23) { super(e23), this._lodByScale = {}, this._scales = [], this.effectiveLODs = null, this.effectiveMinZoom = -1, this.effectiveMaxZoom = -1, this.effectiveMinScale = 0, this.effectiveMaxScale = 0, this.lods = null, this.minZoom = -1, this.maxZoom = -1, this.minScale = 0, this.maxScale = 0, this.snapToZoom = true; } initialize() { let e23, { lods: t25, minScale: o30, maxScale: s30, minZoom: i32, maxZoom: a34 } = this, c42 = -1, r24 = -1, l27 = false, n34 = false; if (o30 !== 0 && s30 !== 0 && o30 < s30 && ([o30, s30] = [s30, o30]), !t25 || !t25.length) return this._set("effectiveMinScale", o30), void this._set("effectiveMaxScale", s30); t25 = t25.map((e24) => e24.clone()), t25.sort((e24, t26) => t26.scale - e24.scale), t25.forEach((e24, t26) => e24.level = t26); for (const f14 of t25) !l27 && o30 > 0 && o30 >= f14.scale && (c42 = f14.level, l27 = true), !n34 && s30 > 0 && s30 >= f14.scale && (r24 = e23 ? e23.level : -1, n34 = true), e23 = f14; i32 === -1 && (i32 = o30 === 0 ? 0 : c42), a34 === -1 && (a34 = s30 === 0 ? t25.length - 1 : r24), i32 = Math.max(i32, 0), i32 = Math.min(i32, t25.length - 1), a34 = Math.max(a34, 0), a34 = Math.min(a34, t25.length - 1), i32 > a34 && ([i32, a34] = [a34, i32]), o30 = t25[i32].scale, s30 = t25[a34].scale, t25.splice(0, i32), t25.splice(a34 - i32 + 1, t25.length), t25.forEach((e24, t26) => { this._lodByScale[e24.scale] = e24, this._scales[t26] = e24.scale; }), this._set("effectiveLODs", t25), this._set("effectiveMinZoom", i32), this._set("effectiveMaxZoom", a34), this._set("effectiveMinScale", o30), this._set("effectiveMaxScale", s30); } constrain(e23, t25) { if (t25 && e23.scale === t25.scale) return e23; const o30 = this.effectiveMinScale, s30 = this.effectiveMaxScale, i32 = e23.targetGeometry, a34 = t25 && t25.targetGeometry, c42 = s30 !== 0 && e23.scale < s30, r24 = o30 !== 0 && e23.scale > o30; if (c42 || r24) { const c43 = r24 ? o30 : s30; if (a34) { const o31 = (c43 - t25.scale) / (e23.scale - t25.scale); i32.x = a34.x + (i32.x - a34.x) * o31, i32.y = a34.y + (i32.y - a34.y) * o31; } e23.scale = c43; } return this.snapToZoom && this.effectiveLODs && (e23.scale = this._getClosestScale(e23.scale)), e23; } fit(e23) { if (!this.effectiveLODs || !this.snapToZoom) return this.constrain(e23, null); const t25 = this.scaleToZoom(e23.scale), o30 = Math.abs(t25 - Math.floor(t25)); return e23.scale = this.zoomToScale(o30 > 0.99 ? Math.round(t25) : Math.floor(t25)), e23; } zoomToScale(e23) { if (!this.effectiveLODs) return 0; e23 -= this.effectiveMinZoom, e23 = Math.max(0, e23); const t25 = this._scales; if (e23 <= 0) return t25[0]; if (e23 >= t25.length) return t25[t25.length - 1]; const o30 = Math.round(e23 - 0.5), s30 = Math.round(e23); return t25[s30] + (s30 - e23) * (t25[o30] - t25[s30]); } scaleToZoom(e23) { if (!this.effectiveLODs) return -1; const t25 = this._scales; let o30, s30; if (e23 >= t25[0]) return this.effectiveMinZoom; if (e23 <= t25[t25.length - 1]) return this.effectiveMaxZoom; for (let i32 = 0; i32 < t25.length - 1; i32++) { if (o30 = t25[i32], s30 = t25[i32 + 1], s30 === e23) { return i32 + this.effectiveMinZoom + 1; } if (o30 > e23 && s30 < e23) { return i32 + this.effectiveMinZoom + 1 - (e23 - s30) / (o30 - s30); } } } snapToClosestScale(e23) { if (!this.effectiveLODs) return e23; const t25 = this.scaleToZoom(e23); return this.zoomToScale(Math.round(t25)); } snapToNextScale(e23, t25 = 0.5) { if (!this.effectiveLODs) return e23 * t25; const o30 = Math.round(this.scaleToZoom(e23)); return this.zoomToScale(o30 + 1); } snapToPreviousScale(e23, t25 = 2) { if (!this.effectiveLODs) return e23 * t25; const o30 = Math.round(this.scaleToZoom(e23)); return this.zoomToScale(o30 - 1); } clone() { return new i24({ lods: this.lods, minZoom: this.minZoom, maxZoom: this.maxZoom, minScale: this.minScale, maxScale: this.maxScale }); } _getClosestScale(e23) { return this._lodByScale[e23] || (e23 = this._scales.reduce((t25, o30) => Math.abs(o30 - e23) <= Math.abs(t25 - e23) ? o30 : t25, this._scales[0])), this._lodByScale[e23].scale; } }; e([d({ readOnly: true })], a22.prototype, "effectiveLODs", void 0), e([d({ readOnly: true })], a22.prototype, "effectiveMinZoom", void 0), e([d({ readOnly: true })], a22.prototype, "effectiveMaxZoom", void 0), e([d({ readOnly: true })], a22.prototype, "effectiveMinScale", void 0), e([d({ readOnly: true })], a22.prototype, "effectiveMaxScale", void 0), e([d()], a22.prototype, "lods", void 0), e([d()], a22.prototype, "minZoom", void 0), e([d()], a22.prototype, "maxZoom", void 0), e([d()], a22.prototype, "minScale", void 0), e([d()], a22.prototype, "maxScale", void 0), e([d()], a22.prototype, "snapToZoom", void 0), a22 = i24 = e([n3("esri.views.2d.constraints.ZoomConstraint")], a22); var c31 = a22; // node_modules/@arcgis/core/views/2d/MapViewConstraints.js var p27 = { base: null, key: "type", typeMap: { extent: M2, polygon: v3 } }; var c32 = class extends y { constructor(o30) { super(o30), this.lods = null, this.minScale = 0, this.maxScale = 0, this.minZoom = -1, this.maxZoom = -1, this.rotationEnabled = true, this.snapToZoom = true; } destroy() { this.view = null, this._set("_zoom", null), this._set("_rotation", null), this._set("_geometry", null); } set geometry(o30) { o30 ? this._set("geometry", o30) : this._set("geometry", null); } get version() { return this.commitProperty("_zoom"), this.commitProperty("_rotation"), this.commitProperty("_geometry"), (this._get("version") ?? 0) + 1; } get _defaultLODs() { const o30 = this.view?.defaultsFromMap?.tileInfo, t25 = this.view?.spatialReference; return o30 && t25 && o30.spatialReference.equals(t25) ? o30.lods : null; } get _geometry() { return new y13({ geometry: this.geometry, spatialReference: this.view?.spatialReference }); } get _rotation() { return new n24({ rotationEnabled: this.rotationEnabled }); } get _zoom() { const o30 = this._get("_zoom"), t25 = this.lods || this._defaultLODs, e23 = this.minZoom, r24 = this.maxZoom, s30 = this.minScale, i32 = this.maxScale, n34 = this.snapToZoom; return o30 && o30.lods === t25 && o30.minZoom === e23 && o30.maxZoom === r24 && o30.minScale === s30 && o30.maxScale === i32 && o30.snapToZoom === n34 ? o30 : new c31({ lods: t25, minZoom: e23, maxZoom: r24, minScale: s30, maxScale: i32, snapToZoom: n34 }); } canZoomInTo(o30) { const t25 = this.effectiveMaxScale; return t25 === 0 || o30 >= t25; } canZoomOutTo(o30) { const t25 = this.effectiveMinScale; return t25 === 0 || o30 <= t25; } constrain(o30, t25) { return this._zoom.constrain(o30, t25), this._rotation.constrain(o30, t25), this._geometry.constrain(o30, t25), o30; } constrainByGeometry(o30) { return this._geometry.constrain(o30); } fit(o30) { return this._zoom.fit(o30); } zoomToScale(o30) { return this._zoom.zoomToScale(o30); } scaleToZoom(o30) { return this._zoom.scaleToZoom(o30); } snapScale(o30) { return this._zoom.snapToClosestScale(o30); } snapToNextScale(o30) { return this._zoom.snapToNextScale(o30); } snapToPreviousScale(o30) { return this._zoom.snapToPreviousScale(o30); } }; e([d({ readOnly: true, aliasOf: "_zoom.effectiveLODs" })], c32.prototype, "effectiveLODs", void 0), e([d({ readOnly: true, aliasOf: "_zoom.effectiveMinScale" })], c32.prototype, "effectiveMinScale", void 0), e([d({ readOnly: true, aliasOf: "_zoom.effectiveMaxScale" })], c32.prototype, "effectiveMaxScale", void 0), e([d({ readOnly: true, aliasOf: "_zoom.effectiveMinZoom" })], c32.prototype, "effectiveMinZoom", void 0), e([d({ readOnly: true, aliasOf: "_zoom.effectiveMaxZoom" })], c32.prototype, "effectiveMaxZoom", void 0), e([d({ types: p27, value: null })], c32.prototype, "geometry", null), e([d({ type: [p3] })], c32.prototype, "lods", void 0), e([d()], c32.prototype, "minScale", void 0), e([d()], c32.prototype, "maxScale", void 0), e([d()], c32.prototype, "minZoom", void 0), e([d()], c32.prototype, "maxZoom", void 0), e([d()], c32.prototype, "rotationEnabled", void 0), e([d()], c32.prototype, "snapToZoom", void 0), e([d()], c32.prototype, "view", void 0), e([d({ readOnly: true })], c32.prototype, "version", null), e([d()], c32.prototype, "_defaultLODs", null), e([d({ type: y13 })], c32.prototype, "_geometry", null), e([d({ type: n24 })], c32.prototype, "_rotation", null), e([d({ readOnly: true, type: c31 })], c32.prototype, "_zoom", null), c32 = e([n3("esri.views.2d.MapViewConstraints")], c32); var y14 = c32; // node_modules/@arcgis/core/core/libs/gl-matrix-2/types/vec2.js function n25(n34) { return n34 instanceof Float32Array && n34.length >= 2; } function r20(n34) { return Array.isArray(n34) && n34.length >= 2; } function t18(t25) { return n25(t25) || r20(t25); } // node_modules/@arcgis/core/views/2d/ViewState.js var V4; var G5 = [0, 0]; var O4 = V4 = class extends l2 { constructor(t25) { super(t25), this._viewpoint2D = { center: n9(), rotation: 0, scale: 0, spatialReference: null }, this.center = [0, 0], this.extent = new M2(), this.id = 0, this.inverseTransform = e8(), this.resolution = 0, this.rotation = 0, this.scale = 0, this.transform = e8(), this.transformNoRotation = e8(), this.displayMat3 = e9(), this.displayViewMat3 = e9(), this.viewMat3 = e9(), this.viewMat2d = n8(), this.worldScreenWidth = 0, this.size = [0, 0]; } set pixelRatio(t25) { this._set("pixelRatio", t25), this._update(); } set size(t25) { this._set("size", t25), this._update(); } set viewpoint(t25) { if (t25) { const s30 = this._viewpoint2D, i32 = t25.targetGeometry; s30.center[0] = i32.x, s30.center[1] = i32.y, s30.rotation = t25.rotation, s30.scale = t25.scale, s30.spatialReference = i32.spatialReference; } this._update(); } copy(t25) { const s30 = this.size, i32 = this.viewpoint; return i32 && s30 ? (this.viewpoint = Z(i32, t25.viewpoint), this._set("size", a5(s30, t25.size))) : (this.viewpoint = t25.viewpoint.clone(), this._set("size", [t25.size[0], t25.size[1]])), this._set("pixelRatio", t25.pixelRatio), this; } clone() { return new V4({ size: this.size, viewpoint: this.viewpoint.clone(), pixelRatio: this.pixelRatio }); } toMap(t25, s30, i32) { return t18(s30) ? z(t25, s30, this.inverseTransform) : (G5[0] = s30, G5[1] = i32, z(t25, G5, this.inverseTransform)); } toScreen(t25, s30, i32) { return t18(s30) ? z(t25, s30, this.transform) : (G5[0] = s30, G5[1] = i32, z(t25, G5, this.transform)); } toScreenNoRotation(t25, s30, i32) { return t18(s30) ? z(t25, s30, this.transformNoRotation) : (G5[0] = s30, G5[1] = i32, z(t25, G5, this.transformNoRotation)); } getScreenTransform(t25, s30) { const { center: i32 } = this._viewpoint2D, e23 = this._get("pixelRatio") || 1, o30 = this._get("size"); return ut(t25, i32, o30, s30, 0, e23), t25; } _update() { const { center: t25, spatialReference: i32, scale: e23, rotation: o30 } = this._viewpoint2D, c42 = this._get("pixelRatio") || 1, m29 = this._get("size"), d20 = new u5({ targetGeometry: new j2(t25[0], t25[1], i32), scale: e23, rotation: o30 }); if (this._set("viewpoint", d20), !m29 || !i32 || !e23) return; this.resolution = ot(d20), this.rotation = o30, this.scale = e23, this.spatialReference = i32, a5(this.center, t25); const y17 = m29[0] !== 0 ? 2 / m29[0] : 0, _9 = m29[1] !== 0 ? -2 / m29[1] : 0; s5(this.displayMat3, y17, 0, 0, 0, _9, 0, -1, 1, 1); const x5 = r8(this.viewMat3), z6 = t10(m29[0] / 2, m29[1] / 2), g20 = t10(-m29[0] / 2, -m29[1] / 2), b10 = o4(o30); M3(x5, x5, z6), h4(x5, x5, b10), M3(x5, x5, g20), i3(this.displayViewMat3, this.displayMat3, x5); const V5 = f4(this.viewMat2d, z6); return e6(V5, V5, b10), i4(V5, V5, g20), _2(this.extent, d20, m29), ft(this.transform, d20, m29, c42), r9(this.inverseTransform, this.transform), lt(this.transformNoRotation, d20, m29, c42), this.worldScreenWidth = yt(this.spatialReference, this.resolution), this._set("id", this.id + 1), this; } }; e([d({ readOnly: true })], O4.prototype, "id", void 0), e([d({ value: 1, json: { write: true } })], O4.prototype, "pixelRatio", null), e([d({ json: { write: true } })], O4.prototype, "size", null), e([d()], O4.prototype, "spatialReference", void 0), e([d({ type: u5, json: { write: true } })], O4.prototype, "viewpoint", null), O4 = V4 = e([n3("esri.views.2d.ViewState")], O4); var U8 = O4; // node_modules/@arcgis/core/views/2d/PaddedViewState.js var l21; var m23; var w12 = l21 = class extends y { constructor() { super(...arguments), this.left = 0, this.top = 0, this.right = 0, this.bottom = 0; } clone() { return new l21({ left: this.left, top: this.top, right: this.right, bottom: this.bottom }); } }; e([d()], w12.prototype, "left", void 0), e([d()], w12.prototype, "top", void 0), e([d()], w12.prototype, "right", void 0), e([d()], w12.prototype, "bottom", void 0), w12 = l21 = e([n3("esri.views.2d.PaddedViewState.Padding")], w12); var u17 = m23 = class extends U8 { constructor(...t25) { super(...t25), this.paddedViewState = new U8(), this._updateContent = (() => { const t26 = n9(); return () => { const e23 = this._get("size"), i32 = this._get("padding"); if (!e23 || !i32) return; const o30 = this.paddedViewState; r7(t26, i32.left + i32.right, i32.top + i32.bottom), o6(t26, e23, t26), a5(o30.size, t26); const s30 = o30.viewpoint; s30 && (this.viewpoint = s30); }; })(), this.own(l4(() => [this.size, this.padding], () => this._updateContent(), U)), this.padding = new w12(), this.size = [0, 0]; } set padding(t25) { this._set("padding", t25 || new w12()); } set viewpoint(t25) { if (t25) { const e23 = t25.clone(); this.paddedViewState.viewpoint = t25, gt(e23, t25, this._get("size"), this._get("padding")); const i32 = this._viewpoint2D, o30 = e23.targetGeometry; i32.center[0] = o30.x, i32.center[1] = o30.y, i32.rotation = e23.rotation, i32.scale = e23.scale, i32.spatialReference = o30.spatialReference, this._update(); } } clone() { return new m23({ padding: this.padding.clone(), size: this.size.slice(), viewpoint: this.paddedViewState.viewpoint.clone(), pixelRatio: this.pixelRatio }); } }; e([d()], u17.prototype, "paddedViewState", void 0), e([d({ type: w12 })], u17.prototype, "padding", null), e([d()], u17.prototype, "viewpoint", null), u17 = m23 = e([n3("esri.views.2d.PaddedViewState")], u17); var g15 = u17; // node_modules/@arcgis/core/views/input/handlers/support.js function t19(t25, r24) { switch (r24) { case "primary": return t25.pointerType === "touch" || t25.button === 0; case "secondary": return t25.pointerType !== "touch" && t25.button === 2; case "tertiary": return t25.pointerType !== "touch" && t25.button === 1; } } // node_modules/@arcgis/core/views/2d/input/handlers/DoubleClickZoom.js var a23 = class extends i8 { constructor(t25, i32) { super(true), this.view = t25, this.registerIncoming("double-click", i32, (t26) => this._handleDoubleClick(t26, i32)); } _handleDoubleClick(t25, a34) { t19(t25.data, "primary") && (t25.stopPropagation(), a34 ? this.view.mapViewNavigation.zoomOut([t25.data.x, t25.data.y]) : this.view.mapViewNavigation.zoomIn([t25.data.x, t25.data.y])); } }; // node_modules/@arcgis/core/views/2d/input/handlers/DoubleTapDragZoom.js var e17 = class extends i8 { constructor(t25, e23, a34) { super(true), this.view = t25, this.pointerType = e23, this.registerIncoming("double-tap-drag", a34, (t26) => this._handleDoubleTapDrag(t26)); } _handleDoubleTapDrag(t25) { const { data: e23 } = t25, { pointerType: a34 } = e23; if (a34 !== this.pointerType) return; t25.stopPropagation(); const { action: s30, delta: i32 } = e23, { view: r24 } = this, { mapViewNavigation: n34 } = r24; switch (s30) { case "begin": { const { scale: t26 } = r24; this._startScale = t26, this._currentScale = t26, this._previousDelta = i32, n34.begin(); break; } case "update": { if (this._previousDelta.y === i32.y) return; this._previousDelta = i32; const t26 = 1.015 ** i32.y, e24 = this._startScale * t26, a35 = e24 / this._currentScale; n34.setViewpointImmediate(a35), this._currentScale = e24; break; } case "end": { const { constraints: t26 } = r24, { effectiveLODs: e24, snapToZoom: a35 } = t26; if (!a35 || !e24) return void n34.end(); const s31 = t26.snapScale(this._currentScale), o30 = (i32.y > 0 ? Math.max(s31, t26.snapToPreviousScale(this._startScale)) : Math.min(s31, t26.snapToNextScale(this._startScale))) / this._currentScale; n34.zoom(o30); break; } } } }; // node_modules/@arcgis/core/views/input/DragEventSeparator.js var t20 = class { constructor(t25) { this.callbacks = t25, this.currentCount = 0, this.callbacks.condition || (this.callbacks.condition = () => true); } handle(t25) { const s30 = t25.data, i32 = s30.pointers.size; switch (s30.action) { case "start": this.currentCount = i32, this._emitStart(t25); break; case "added": this._emitEnd(this.previousEvent), this.currentCount = i32, this._emitStart(t25); break; case "update": this._emitUpdate(t25); break; case "removed": this.startEvent && this._emitEnd(this.previousEvent), this.currentCount = i32, this._emitStart(t25); break; case "end": this._emitEnd(t25), this.currentCount = 0; } this.previousEvent = t25; } _emitStart(t25) { this.startEvent = t25, this.callbacks.condition(this.currentCount, t25) && this.callbacks.start(this.currentCount, t25, this.startEvent); } _emitUpdate(t25) { this.callbacks.condition(this.currentCount, t25) && this.callbacks.update(this.currentCount, t25, this.startEvent); } _emitEnd(t25) { this.callbacks.condition(this.currentCount, t25) && this.callbacks.end(this.currentCount, t25, this.startEvent), this.startEvent = null; } }; // node_modules/@arcgis/core/views/2d/input/handlers/DragPan.js var n26 = class extends i8 { constructor(t25, i32, a34) { super(true), this.view = t25, this.pointerAction = i32, this.registerIncoming("drag", a34, (t26) => this._handleDrag(t26)), this.registerIncoming("pointer-down", () => this.stopMomentumNavigation()); } onInstall(i32) { super.onInstall(i32), this.dragEventSeparator = new t20({ start: (t25, i33) => { this.view.mapViewNavigation.pan.begin(this.view, i33.data), i33.stopPropagation(); }, update: (t25, i33) => { this.view.mapViewNavigation.pan.update(this.view, i33.data), i33.stopPropagation(); }, end: (t25, i33) => { this.view.mapViewNavigation.pan.end(this.view, i33.data), i33.stopPropagation(); }, condition: (t25, i33) => t25 === 1 && t19(i33.data, this.pointerAction) }); } _handleDrag(t25) { const i32 = this.view.mapViewNavigation; i32.pinch.zoomMomentum || i32.pinch.rotateMomentum ? this.stopMomentumNavigation() : this.dragEventSeparator.handle(t25); } stopMomentumNavigation() { this.view.mapViewNavigation.pan.stopMomentumNavigation(); } }; // node_modules/@arcgis/core/views/2d/input/handlers/DragRotate.js var o25 = class extends i8 { constructor(a34, o30, r24) { super(true), this.view = a34, this.pointerAction = o30; const e23 = this.view.mapViewNavigation; this.dragEventSeparator = new t20({ start: (t25, a35) => { e23.rotate.begin(this.view, a35.data), a35.stopPropagation(); }, update: (t25, a35) => { e23.rotate.update(this.view, a35.data), a35.stopPropagation(); }, end: (t25, a35) => { e23.rotate.end(), a35.stopPropagation(); }, condition: (t25, a35) => t25 === 1 && t19(a35.data, this.pointerAction) }), this.registerIncoming("drag", r24, (t25) => this.dragEventSeparator.handle(t25)); } }; // node_modules/@arcgis/core/views/navigation/gamepadAndKeyboardUtils.js function n27(t25) { let n34 = t25 * t25; return t25 < 0 && (n34 *= -1), n34; } function a24(t25) { return t25.translation[0] = 0, t25.translation[1] = 0, t25.translation[2] = 0, t25.heading = 0, t25.tilt = 0, t25; } function i25(a34, i32, o30) { const s30 = o30, e23 = a34.state, r24 = a34.device, l27 = i32.tiltDirection === "forward-down" ? 1 : -1, c42 = 1; return r24.deviceType === "standard" ? (s30.translation[0] = n27(e23.axes[0]), s30.translation[1] = n27(e23.axes[1]), s30.translation[2] = n27(e23.buttons[7]) - n27(e23.buttons[6]), s30.heading = n27(e23.axes[2]), s30.tilt = n27(e23.axes[3])) : r24.deviceType === "spacemouse" && (s30.translation[0] = 1.2 * n27(e23.axes[0]), s30.translation[1] = 1.2 * n27(e23.axes[1]), s30.translation[2] = 2 * -n27(e23.axes[2]), s30.heading = 1.2 * n27(e23.axes[5]), s30.tilt = 1.2 * n27(e23.axes[3])), s30.tilt *= l27, q(s30.translation, s30.translation, c42), s30; } function s22(t25) { return t25.translation[0] === 0 && t25.translation[1] === 0 && t25.translation[2] === 0 && t25.heading === 0 && t25.tilt === 0 && t25.zoom === 0; } // node_modules/@arcgis/core/views/2d/input/handlers/GamepadNavigation.js var d14 = class extends i8 { constructor(i32) { super(true), this.view = i32, this.frameTask = null, this.watchHandles = new u3(), this.currentDevice = null, this.transformation = { translation: [0, 0, 0], heading: 0, tilt: 0, zoom: 0 }, this.handle = this.registerIncoming("gamepad", (t25) => this._handleGamePadEvent(t25)), this.handle.pause(); } onInstall(t25) { super.onInstall(t25), this.watchHandles.add([l4(() => this.view.navigation.gamepad?.enabled, (t26) => { t26 ? (this.handle.resume(), this.frameTask || (this.frameTask = A({ update: (t27) => this._frameUpdate(t27.deltaTime) }))) : (this.handle.pause(), this.frameTask && (this.frameTask.remove(), this.frameTask = null)); }, h2)]); } onUninstall() { this.watchHandles.removeAll(), this.frameTask && (this.frameTask.remove(), this.frameTask = null), super.onUninstall(); } _handleGamePadEvent(t25) { const i32 = this.view.navigation.gamepad.device; i32 && t25.data.device !== i32 || this.currentDevice && this.currentDevice !== t25.data.device || (t25.data.action === "end" ? (this.currentDevice = null, a24(this.transformation)) : (this.currentDevice = t25.data.device, i25(t25.data, this.view.navigation.gamepad, this.transformation))); } _frameUpdate(t25) { const i32 = this.transformation; if (s22(i32)) return; const e23 = this.view.viewpoint.clone(), a34 = this.view.navigation.gamepad.velocityFactor, r24 = c33 * a34 * t25; St(e23, e23, [i32.translation[0] * r24, -i32.translation[1] * r24]); const o30 = 1 + i32.translation[2] * v13 * t25, h19 = this.view.constraints.rotationEnabled ? -i32.heading * m24 * t25 : 0, d20 = this.view.size, p36 = [d20[0] / 2, d20[1]]; Gt(e23, e23, o30, h19, p36, d20); const f14 = this.view.constraints.constrain(e23, this.view.viewpoint); this.view.viewpoint = f14; } }; var m24 = 0.06; var c33 = 0.7; var v13 = 6e-4; // node_modules/@arcgis/core/views/2d/input/handlers/KeyPan.js var i26 = class extends i8 { constructor(e23, i32, t25) { super(true), this.view = e23, this.keys = i32, this._pressed = false, this._keyMap = { [i32.left]: "left", [i32.right]: "right", [i32.up]: "up", [i32.down]: "down" }, this.registerIncoming("key-down", t25, (e24) => this._handleKeyDown(e24)), this.registerIncoming("key-up", t25, (e24) => this._handleKeyUp(e24)), this.registerIncoming("blur", t25, () => this._handleBlur()); } _handleKeyDown(e23) { e23.data.repeat || this._handleKey(e23, true); } _handleKeyUp(e23) { this._handleKey(e23, false); } _handleBlur() { this._pressed && (this._pressed = false, this.view.mapViewNavigation.stop()); } _handleKey(e23, i32) { const t25 = this._keyMap[e23.data.key]; if (this._pressed = t25 != null, this._pressed) { if (i32) switch (this.view.mapViewNavigation.begin(), t25) { case "left": this.view.mapViewNavigation.continousPanLeft(); break; case "right": this.view.mapViewNavigation.continousPanRight(); break; case "up": this.view.mapViewNavigation.continousPanUp(); break; case "down": this.view.mapViewNavigation.continousPanDown(); } else this._pressed = false, this.view.mapViewNavigation.stop(); e23.stopPropagation(); } } }; // node_modules/@arcgis/core/views/2d/input/handlers/KeyRotate.js var i27 = class extends i8 { constructor(e23, i32, t25) { super(true), this.view = e23, this.keys = i32, this._pressed = false, this._keyToDirection = { [i32.clockwiseOption1]: "clockwise", [i32.clockwiseOption2]: "clockwise", [i32.counterClockwiseOption1]: "counterClockwise", [i32.counterClockwiseOption2]: "counterClockwise", [i32.resetOption1]: "reset", [i32.resetOption2]: "reset" }, this.registerIncoming("key-down", t25, (e24) => this._handleKeyDown(e24)), this.registerIncoming("key-up", t25, (e24) => this._handleKeyUp(e24)), this.registerIncoming("blur", t25, () => this._handleBlur()); } _handleKeyDown(e23) { e23.data.repeat || this._handleKey(e23, true); } _handleKeyUp(e23) { this._handleKey(e23, false); } _handleBlur() { this._pressed && (this._pressed = false, this.view.mapViewNavigation.stop()); } _handleKey(e23, i32) { const t25 = e23.modifiers; if (t25.size > 0 && !t25.has("Shift") || !this.view.constraints.rotationEnabled) return; const s30 = this._keyToDirection[e23.data.key]; if (this._pressed = s30 != null, this._pressed) { if (i32) switch (this.view.mapViewNavigation.begin(), s30) { case "clockwise": this.view.mapViewNavigation.continousRotateClockwise(); break; case "counterClockwise": this.view.mapViewNavigation.continousRotateCounterclockwise(); break; case "reset": this.view.mapViewNavigation.resetRotation(); } else this._pressed = false, this.view.mapViewNavigation.stop(); e23.stopPropagation(); } } }; // node_modules/@arcgis/core/views/2d/input/handlers/KeyZoom.js var t21; !function(o30) { o30[o30.IN = 0] = "IN", o30[o30.OUT = 1] = "OUT"; }(t21 || (t21 = {})); var e18 = class extends i8 { constructor(o30, e23, i32) { super(true), this.view = o30, this.keys = e23, this._keysToZoomAction = {}, this.registerIncoming("key-down", i32, (o31) => this._handleKeyDown(o31)), e23.zoomIn.forEach((o31) => this._keysToZoomAction[o31] = t21.IN), e23.zoomOut.forEach((o31) => this._keysToZoomAction[o31] = t21.OUT); } _handleKeyDown(o30) { this._handleKey(o30); } _handleKey(o30) { const e23 = o30.modifiers; if (e23.size > 0 && !e23.has("Shift")) return; const { key: i32 } = o30.data; if (!(i32 in this._keysToZoomAction)) return; const n34 = this._keysToZoomAction[i32], { mapViewNavigation: s30 } = this.view; let r24 = null; switch (n34) { case t21.IN: r24 = s30.zoomIn(); break; case t21.OUT: r24 = s30.zoomOut(); break; default: return; } s30.begin(), r24.then(() => s30.end()), o30.stopPropagation(); } }; // node_modules/@arcgis/core/views/2d/input/handlers/MouseWheelZoom.js var t22 = 0.6; var o26 = class extends i8 { constructor(e23, t25) { super(true), this.view = e23, this._canZoom = true, this.registerIncoming("mouse-wheel", t25, (e24) => this._handleMouseWheel(e24)); } _handleMouseWheel(e23) { if (!this.view.navigation.mouseWheelZoomEnabled) return; if (e23.preventDefault(), e23.stopPropagation(), !this._canZoom) return; const o30 = this.view.mapViewNavigation, { x: n34, y: i32, deltaY: s30 } = e23.data, a34 = 1 / t22 ** (1 / 60 * s30), h19 = o30.zoom(a34, [n34, i32]); h19 && (this._canZoom = false, h19.catch(() => { }).then(() => { this._canZoom = true, o30.end(); })); } }; // node_modules/@arcgis/core/views/2d/input/handlers/PinchAction.js var a25 = class extends i8 { constructor(i32) { super(true), this.view = i32, this.registerIncoming("drag", (t25) => this._handleDrag(t25)), this.registerIncoming("pointer-down", () => this._stopMomentumNavigation()); const a34 = this.view.mapViewNavigation; this.dragEventSeparator = new t20({ start: (t25, i33) => { a34.pinch.begin(this.view, i33.data), i33.stopPropagation(); }, update: (t25, i33) => { a34.pinch.update(this.view, i33.data), i33.stopPropagation(); }, end: (t25, i33) => { a34.pinch.end(this.view), i33.stopPropagation(); }, condition: (t25) => t25 >= 2 }); } _handleDrag(t25) { this.dragEventSeparator.handle(t25); } _stopMomentumNavigation() { this.view.mapViewNavigation.pinch.stopMomentumNavigation(); } }; // node_modules/@arcgis/core/views/input/gamepad/GamepadState.js function t23(t25) { const n34 = t25.native; return n34 ? { buttons: n34.buttons.map((t26) => t26.pressed ? t26.value ? t26.value : 1 : 0), axes: n34.axes.map((n35) => s23(n35, t25.axisThreshold)) } : { buttons: [], axes: [] }; } function n28(t25, n34) { if (t25.axes.length !== n34.axes.length) return false; if (t25.buttons.length !== n34.buttons.length) return false; for (let e23 = 0; e23 < t25.axes.length; e23++) if (t25.axes[e23] !== n34.axes[e23]) return false; for (let e23 = 0; e23 < t25.buttons.length; e23++) if (t25.buttons[e23] !== n34.buttons[e23]) return false; return true; } function e19(t25) { for (let n34 = 0; n34 < t25.axes.length; n34++) if (t25.axes[n34] !== 0) return false; for (let n34 = 0; n34 < t25.buttons.length; n34++) if (t25.buttons[n34] !== 0) return false; return true; } function s23(t25, n34) { const e23 = Math.abs(t25); return e23 < n34 ? 0 : Math.sign(t25) * (e23 - n34) / (1 - n34); } // node_modules/@arcgis/core/views/input/gamepad/GamepadSource.js var a26 = class { constructor(e23, t25) { this.element = e23, this.input = t25, this._hasEventListeners = false, this._onConnectGamepad = (e24) => { this._connectGamepad(e24.gamepad); }, this._onDisconnectGamepad = (e24) => { const t26 = e24.gamepad, i33 = t26.index, n35 = this.inputDevices[i33]; n35 && (this._emitGamepadEvent(t26, t23(n35), false), this.inputDevices.splice(i33, 1), this.latestUpdate.splice(i33, 1), this.input.gamepad.devices.remove(n35), this.ensurePollingState()); }, this.frameTask = null, this.latestUpdate = new Array(), this.inputDevices = new Array(), this.callback = null; const i32 = "getGamepads" in window.navigator, n34 = window.isSecureContext; this.supported = i32 && n34, this.supported && (this._forEachGamepad((e24) => this._connectGamepad(e24)), window.addEventListener("gamepadconnected", this._onConnectGamepad), window.addEventListener("gamepaddisconnected", this._onDisconnectGamepad), this.ensurePollingState()); } destroy() { this.hasEventListeners = false, this.supported && (window.removeEventListener("gamepadconnected", this._onConnectGamepad), window.removeEventListener("gamepaddisconnected", this._onDisconnectGamepad)); } set hasEventListeners(e23) { this._hasEventListeners !== e23 && (this._hasEventListeners = e23, this.ensurePollingState()); } get eventsEnabled() { return this.supported && this.inputDevices.length > 0 && this._hasEventListeners; } set onEvent(e23) { this.callback = e23; } _connectGamepad(e23) { const s30 = new i21(e23); s30.deviceType !== "unknown" && (this.inputDevices[e23.index] = s30, this.input.gamepad.devices.add(s30)), this.ensurePollingState(); } ensurePollingState() { this.eventsEnabled ? this._startPolling() : this._stopPolling(); } _startPolling() { this.frameTask == null && (this.frameTask = A({ update: () => this._readGamepadState() })); } _stopPolling() { this.frameTask != null && (this.frameTask.remove(), this.frameTask = null, this.latestUpdate = new Array()); } _readGamepadState() { const e23 = document.hasFocus(), t25 = this.element.contains(document.activeElement), a34 = this.input.gamepad.enabledFocusMode === "document" && !e23 || this.input.gamepad.enabledFocusMode === "view" && !t25; this._forEachGamepad((e24) => { const t26 = this.inputDevices[e24.index]; if (!t26) return; const d20 = this.latestUpdate[e24.index], o30 = t23(t26), r24 = a34 || e19(o30); if (d20) { if (d20.timestamp === e24.timestamp) return; if (!d20.active && r24) return; if (n28(d20.state, o30)) return; } this._emitGamepadEvent(e24, o30, !r24); }); } _forEachGamepad(e23) { const t25 = window.navigator.getGamepads(); for (let s30 = 0; s30 < t25.length; s30++) { const i32 = t25[s30]; this._validate(i32) && e23(i32); } } _emitGamepadEvent(e23, t25, s30) { const i32 = this.latestUpdate[e23.index], n34 = i32 && i32.active; if (!n34 && !s30) return; const a34 = !n34 && s30 ? "start" : n34 && s30 ? "update" : "end"; this.latestUpdate[e23.index] = { timestamp: e23.timestamp, state: t25, active: s30 }, this.callback && this.callback({ device: this.inputDevices[e23.index], state: t25, action: a34 }); } _validate(e23) { if (!e23) return false; if (!e23.connected) return false; for (let t25 = 0; t25 < e23.axes.length; t25++) if (isNaN(e23.axes[t25])) return false; return true; } }; // node_modules/@arcgis/core/views/input/BrowserEventSource.js var o27 = a("trident"); var a27 = a("edge"); var s24 = a("chrome"); var r21 = a("ff"); var h16 = a("safari"); var l22 = { touchNone: "esri-view-surface--touch-none", touchPan: "esri-view-surface--touch-pan" }; var u18 = class { constructor(e23, t25) { this.input = t25, this._active = {}, this._activePointerCaptures = new Set(), this._keyDownState = new Set(), this._eventId = 1, this._browserTouchPanningEnabled = false, this._element = e23, e23.getAttribute("tabindex") || e23.setAttribute("tabindex", "0"), this._eventHandlers = { "key-down": this._handleKey, "key-up": this._handleKey, "pointer-down": this._handlePointer, "pointer-move": this._handlePointerPreventDefault, "pointer-up": this._handlePointerPreventDefault, "pointer-enter": this._handlePointer, "pointer-leave": this._handlePointer, "pointer-cancel": this._handlePointer, "mouse-wheel": this._handleMouseWheel, "pointer-capture-lost": this._handlePointerCaptureLost }, this._updateTouchAction(), this._element.addEventListener("keydown", this._preventAltKeyDefault), this._gamepadSource = new a26(e23, this.input), this._gamepadSource.onEvent = (e24) => this._callback("gamepad", e24); } destroy() { this._callback = null, this.activeEvents = null, this._activePointerCaptures.forEach((e23) => { this._releasePointerCaptureSafe(e23); }), this._gamepadSource && (this._gamepadSource.destroy(), this._gamepadSource = null), this._activePointerCaptures = null, this._removeTouchAction(), this._element.removeEventListener("keydown", this._preventAltKeyDefault); } get browserTouchPanningEnabled() { return this._browserTouchPanningEnabled; } set browserTouchPanningEnabled(e23) { this._browserTouchPanningEnabled = e23, this._updateTouchAction(), this._updateTouchEventHandling(); } set onEventReceived(e23) { this._callback = e23; } set activeEvents(e23) { for (const t25 in this._active) if (!e23 || !e23.has(t25)) { const e24 = this._active[t25]; this._element.removeEventListener(c34[t25], e24), delete this._active[t25]; } e23 && e23.forEach((e24) => { if (!this._active[e24] && c34[e24]) { const t25 = (this._eventHandlers[e24] || this._handleDefault).bind(this, e24); this._element.addEventListener(c34[e24], t25), this._active[e24] = t25; } }), this._gamepadSource.hasEventListeners = e23 && e23.has("gamepad"); } setPointerCapture(e23, t25) { t25 ? (this._element.setPointerCapture(e23.pointerId), this._activePointerCaptures.add(e23.pointerId)) : (this._releasePointerCaptureSafe(e23.pointerId), this._activePointerCaptures.delete(e23.pointerId)); } _updateTouchAction() { this._element.classList.remove(this._browserTouchPanningEnabled ? l22.touchNone : l22.touchPan), this._element.classList.add(this._browserTouchPanningEnabled ? l22.touchPan : l22.touchNone); } _updateTouchEventHandling() { this._browserTouchPanningEnabled ? this._element.addEventListener("touchmove", this._preventMultiTouchPanning) : this._element.removeEventListener("touchmove", this._preventMultiTouchPanning); } _removeTouchAction() { this._element.classList.remove(l22.touchNone), this._element.classList.remove(l22.touchPan), this._element.removeEventListener("touchmove", this._preventMultiTouchPanning); } _releasePointerCaptureSafe(e23) { try { if (this._element.hasPointerCapture && !this._element.hasPointerCapture(e23)) return; this._element.releasePointerCapture(e23); } catch (t25) { } } _updateNormalizedPointerLikeEvent(e23, t25) { const n34 = i20(this._element, e23); return u18.test.disableSubpixelCoordinates && (n34.x = Math.round(n34.x), n34.y = Math.round(n34.y)), t25.x = n34.x, t25.y = n34.y, t25; } _handleKey(e23, n34) { const i32 = a13(n34); i32 && e23 === "key-up" && this._keyDownState.delete(i32); const o30 = { native: n34, key: i32, repeat: i32 && this._keyDownState.has(i32) }; i32 && e23 === "key-down" && this._keyDownState.add(o30.key), this._callback(e23, o30); } _handlePointer(e23, t25) { const n34 = this._updateNormalizedPointerLikeEvent(t25, { native: t25, x: 0, y: 0, pointerType: t25.pointerType, button: t25.button, buttons: t25.buttons, eventId: this._eventId++ }); this._callback(e23, n34); } _handlePointerPreventDefault(e23, t25) { const n34 = this._updateNormalizedPointerLikeEvent(t25, { native: t25, x: 0, y: 0, pointerType: t25.pointerType, button: t25.button, buttons: t25.buttons, eventId: this._eventId++ }); t25.preventDefault(), this._callback(e23, n34); } _handleMouseWheel(e23, t25) { let n34 = t25.deltaY; switch (t25.deltaMode) { case 0: (o27 || a27) && (n34 = n34 / document.documentElement.clientHeight * 600); break; case 1: n34 *= 30; break; case 2: n34 *= 900; } o27 || a27 ? n34 *= 0.7 : s24 || h16 ? n34 *= 0.6 : r21 && (n34 *= 1.375); const i32 = 100, l27 = Math.abs(n34); if (l27 > i32) { const e24 = 0.02; n34 = n34 / l27 * 200 / (1 + Math.exp(-e24 * (l27 - i32))); } const u23 = this._updateNormalizedPointerLikeEvent(t25, { native: t25, x: 0, y: 0, deltaY: n34 }); this._callback(e23, u23); } _handlePointerCaptureLost(e23, t25) { this._activePointerCaptures.delete(t25.pointerId), this._handleDefault(e23, t25); } _handleDefault(e23, t25) { const n34 = { native: t25 }; t25.preventDefault(), this._callback(e23, n34); } _preventAltKeyDefault(e23) { e23.key === "Alt" && e23.preventDefault(); } _preventMultiTouchPanning(e23) { e23.touches.length > 1 && e23.preventDefault(); } }; u18.test = { disableSubpixelCoordinates: false }; var c34 = { "key-down": "keydown", "key-up": "keyup", "pointer-down": "pointerdown", "pointer-up": "pointerup", "pointer-move": "pointermove", "mouse-wheel": "wheel", "pointer-capture-got": "gotpointercapture", "pointer-capture-lost": "lostpointercapture", "context-menu": "contextmenu", "pointer-enter": "pointerenter", "pointer-leave": "pointerleave", "pointer-cancel": "pointercancel", focus: "focus", blur: "blur" }; // node_modules/@arcgis/core/views/input/handlers/PreventContextMenu.js var e20 = class extends i8 { constructor() { super(true), this.registerIncoming("context-menu", (t25) => { t25.data.native.preventDefault(); }); } }; // node_modules/@arcgis/core/views/input/recognizers/support.js function e21(t25, e23) { return Math.abs(e23.x - t25.x) + Math.abs(e23.y - t25.y); } function n29(t25, e23) { const n34 = e23.x - t25.x, r24 = e23.y - t25.y; return Math.sqrt(n34 * n34 + r24 * r24); } function r22(e23, n34) { if (n34 ? (n34.radius = 0, n34.center.x = 0, n34.center.y = 0) : n34 = { radius: 0, center: c2() }, e23.length === 0) return n34; if (e23.length === 1) return n34.center.x = e23[0].x, n34.center.y = e23[0].y, n34; if (e23.length === 2) { const [t25, r25] = e23, [c43, s31] = [r25.x - t25.x, r25.y - t25.y]; return n34.radius = Math.sqrt(c43 * c43 + s31 * s31) / 2, n34.center.x = (t25.x + r25.x) / 2, n34.center.y = (t25.y + r25.y) / 2, n34; } let r24 = 0, c42 = 0; for (let t25 = 0; t25 < e23.length; t25++) r24 += e23[t25].x, c42 += e23[t25].y; r24 /= e23.length, c42 /= e23.length; const s30 = e23.map((t25) => t25.x - r24), x5 = e23.map((t25) => t25.y - c42); let o30 = 0, y17 = 0, a34 = 0, h19 = 0, l27 = 0, u23 = 0, i32 = 0; for (let t25 = 0; t25 < s30.length; t25++) { const e24 = s30[t25], n35 = x5[t25], r25 = e24 * e24, c43 = n35 * n35; o30 += r25, y17 += c43, a34 += e24 * n35, h19 += r25 * e24, l27 += c43 * n35, u23 += e24 * c43, i32 += n35 * r25; } const f14 = 0.5 * (h19 + u23), g20 = 0.5 * (l27 + i32), M9 = o30 * y17 - a34 * a34, d20 = (f14 * y17 - g20 * a34) / M9, m29 = (o30 * g20 - a34 * f14) / M9, p36 = c2(d20 + r24, m29 + c42); return { radius: Math.sqrt(d20 * d20 + m29 * m29 + (o30 + y17) / e23.length), center: p36 }; } // node_modules/@arcgis/core/views/input/recognizers/SingleAndDoubleClick.js var s25 = { maximumDoubleClickDelay: 250, maximumDoubleClickDistance: 10, maximumDoubleTouchDelay: 350, maximumDoubleTouchDistance: 35 }; var a28 = class extends i8 { constructor(t25 = s25.maximumDoubleClickDelay, i32 = s25.maximumDoubleClickDistance, o30 = s25.maximumDoubleTouchDelay, l27 = s25.maximumDoubleTouchDistance, a34 = t5) { super(false), this.maximumDoubleClickDelay = t25, this.maximumDoubleClickDistance = i32, this.maximumDoubleTouchDelay = o30, this.maximumDoubleTouchDistance = l27, this._clock = a34, this._pointerState = new Map(), this._click = this.registerOutgoing("click"), this._doubleClick = this.registerOutgoing("double-click"), this.registerIncoming("immediate-click", this._handleImmediateClick.bind(this)), this.registerIncoming("pointer-drag", this._handlePointerDrag.bind(this)), this.registerIncoming("drag", this._handleDrag.bind(this)); } onUninstall() { this._pointerState.forEach((e23) => e23.doubleClickTimeout = a2(e23.doubleClickTimeout)); } get hasPendingInputs() { return n(this._pointerState, (e23) => e23.doubleClickTimeout != null); } _pointerId(e23) { const t25 = e23.native; return t25.pointerType === "mouse" ? `${t25.pointerId}:${t25.button}` : `${t25.pointerType}`; } _handleImmediateClick(e23) { const t25 = e23.data, i32 = this._pointerId(t25), o30 = this._pointerState.get(i32); if (o30) { const s30 = t25.native.pointerType === "touch" ? this.maximumDoubleTouchDistance : this.maximumDoubleClickDistance; e21(o30.event.data, t25) > s30 ? (this._clearDoubleClickTimeout(i32, true), this._startClick(e23)) : (this._clearDoubleClickTimeout(i32, false), this._doubleClick.emit(o30.event.data, void 0, o30.event.modifiers)); } else this._startClick(e23); } _startClick(e23) { const t25 = this._pointerId(e23.data), i32 = e23.data.native.pointerType === "touch" ? this.maximumDoubleTouchDelay : this.maximumDoubleClickDelay; this._pointerState.set(t25, { event: e23, doubleClickTimeout: this._clock.setTimeout(() => this._doubleClickTimeoutExceeded(t25), i32) }), this.refreshHasPendingInputs(); } _handlePointerDrag(e23) { const t25 = this._pointerId(e23.data.currentEvent); this._clearDoubleClickTimeout(t25, true); } _handleDrag(e23) { const t25 = this._pointerId(e23.data.pointer); this._clearDoubleClickTimeout(t25, true); } _clearDoubleClickTimeout(e23, t25) { const i32 = this._pointerState.get(e23); i32 && (i32.doubleClickTimeout.remove(), i32.doubleClickTimeout = null, t25 && this._doubleClickTimeoutExceeded(e23), this._pointerState.delete(e23), this.refreshHasPendingInputs()); } _doubleClickTimeoutExceeded(e23) { const t25 = this._pointerState.get(e23); this._click.emit(t25.event.data, void 0, t25.event.modifiers), t25.doubleClickTimeout = null, this._pointerState.delete(e23), this.refreshHasPendingInputs(); } }; // node_modules/@arcgis/core/views/input/recognizers/DoubleTapDrag.js var s26 = class extends i8 { constructor(e23 = s25.maximumDoubleClickDelay, o30 = s25.maximumDoubleClickDistance, n34 = s25.maximumDoubleTouchDelay, s30 = s25.maximumDoubleTouchDistance, u23 = t5) { super(false), this.maximumDoubleClickDelay = e23, this.maximumDoubleClickDistance = o30, this.maximumDoubleTouchDelay = n34, this.maximumDoubleTouchDistance = s30, this._clock = u23, this._doubleTapDragReady = false, this._doubleTapDragActive = false, this._dragStartCenter = c2(0, 0), this._pointerState = new Map(), this._doubleTapDrag = this.registerOutgoing("double-tap-drag"), this._dragEventSeparator = new t20({ start: (t25, e24) => this._dragStart(t25, e24), update: (t25, e24) => this._dragUpdate(e24), end: (t25, e24) => this._dragEnd(e24) }), this.registerIncoming("drag", (t25) => this._dragEventSeparator.handle(t25)), this.registerIncoming("pointer-down", (t25) => this._handlePointerDown(t25)), this.registerIncoming("pointer-up", () => this._handlePointerUp()); } onUninstall() { this._pointerState.forEach((t25) => { t25.doubleTapTimeout != null && (t25.doubleTapTimeout.remove(), t25.doubleTapTimeout = null); }); } get hasPendingInputs() { return n(this._pointerState, (t25) => t25.doubleTapTimeout != null); } _clearPointerDown(t25) { const e23 = this._pointerState.get(t25); e23 && (e23.doubleTapTimeout.remove(), e23.doubleTapTimeout = null, this._pointerState.delete(t25), this.refreshHasPendingInputs()); } _createDoubleTapDragData(t25, e23, i32) { const { button: a34, buttons: o30, pointer: r24, pointers: n34, pointerType: s30, timestamp: u23 } = i32; return { action: t25, delta: e23, button: a34, buttons: o30, pointer: r24, pointers: n34, pointerType: s30, timestamp: u23 }; } _dragStart(t25, e23) { if (!this._doubleTapDragReady || t25 !== 1) return; this._doubleTapDragReady = false, this._doubleTapDragActive = true; const { data: a34, modifiers: o30 } = e23, { center: r24 } = a34; this._dragStartCenter = r24; const n34 = this._createDoubleTapDragData("begin", c2(0, 0), a34); this._doubleTapDrag.emit(n34, void 0, o30), e23.stopPropagation(); } _dragUpdate(t25) { if (!this._doubleTapDragActive) return; const { data: e23, modifiers: a34 } = t25, { center: o30 } = e23, r24 = c2(o30.x - this._dragStartCenter.x, o30.y - this._dragStartCenter.y), n34 = this._createDoubleTapDragData("update", r24, e23); this._doubleTapDrag.emit(n34, void 0, a34), t25.stopPropagation(); } _dragEnd(t25) { if (!this._doubleTapDragActive) return; const { data: e23, modifiers: a34 } = t25, { center: o30 } = e23, r24 = c2(o30.x - this._dragStartCenter.x, o30.y - this._dragStartCenter.y), n34 = this._createDoubleTapDragData("end", r24, e23); this._doubleTapDrag.emit(n34, void 0, a34), this._doubleTapDragActive = false, t25.stopPropagation(); } _handlePointerDown(t25) { const { data: e23 } = t25, i32 = this._pointerId(e23), a34 = this._pointerState.get(i32), { pointerType: o30 } = e23.native; if (a34) { const r24 = o30 === "touch" ? this.maximumDoubleTouchDistance : this.maximumDoubleClickDistance; this._clearPointerDown(i32), e21(a34.event.data, e23) > r24 ? this._storePointerDown(t25) : this._doubleTapDragReady = true; } else this._storePointerDown(t25); } _handlePointerUp() { this._doubleTapDragReady = false; } _pointerId(t25) { const { native: e23 } = t25, { pointerId: i32, button: a34, pointerType: o30 } = e23; return o30 === "mouse" ? `${i32}:${a34}` : `${o30}`; } _storePointerDown(t25) { const { data: e23 } = t25, { pointerType: i32 } = e23.native, a34 = this._pointerId(e23), o30 = i32 === "touch" ? this.maximumDoubleTouchDelay : this.maximumDoubleClickDelay, r24 = this._clock.setTimeout(() => this._clearPointerDown(a34), o30); this._pointerState.set(a34, { event: t25, doubleTapTimeout: r24 }), this.refreshHasPendingInputs(); } }; // node_modules/@arcgis/core/views/input/recognizers/Drag.js var s27 = class extends i8 { constructor(t25) { super(false), this.navigationTouch = t25, this.startStateModifiers = new Set(), this.activePointerMap = new Map(), this.isDragging = false, this.isCurrentDragSuppressed = false, this.drag = this.registerOutgoing("drag"), this.registerIncoming("pointer-drag", this._handlePointerDrag.bind(this)), this.registerIncoming("pointer-up", this._handlePointerUpAndPointerLost.bind(this)), this.registerIncoming("pointer-capture-lost", this._handlePointerUpAndPointerLost.bind(this)), this.registerIncoming("pointer-cancel", this._handlePointerUpAndPointerLost.bind(this)); } _createPayload(t25, e23, i32, n34) { return { action: t25, pointerType: this.pointerType, button: this.mouseButton, buttons: e23.buttons, timestamp: n34, pointers: o28(this.activePointerMap), pointer: e23, angle: i32.angle, radius: i32.radius, center: i32.center }; } _addPointer(t25) { const e23 = t25.native.pointerId, i32 = a29(this.activePointerMap).angle, n34 = { event: t25, initialAngle: 0, lastAngle: 0 }; this.activePointerMap.set(e23, n34); const s30 = h17(n34, r23(this.activePointerMap)); n34.initialAngle = s30, n34.lastAngle = s30, this._updatePointerAngles(i32); } _updatePointer(t25) { if (t25 && t25.x == null && t25.y == null) return; const e23 = t25.native.pointerId, i32 = this.activePointerMap.get(e23); i32 ? i32.event = t25 : this._addPointer(t25); } _removePointer(t25) { const e23 = a29(this.activePointerMap).angle; this.activePointerMap.delete(t25), this._updatePointerAngles(e23); } _updatePointerAngles(t25) { const e23 = a29(this.activePointerMap); this.activePointerMap.forEach((i32) => { i32.initialAngle = h17(i32, e23) - t25, i32.lastAngle = h17(i32, e23) - t25; }); } _emitEvent(t25, e23, i32) { const n34 = a29(this.activePointerMap); this.drag.emit(this._createPayload(t25, e23, n34, i32), void 0, this.startStateModifiers); } _handlePointerUpAndPointerLost(t25) { const i32 = t25.data.native.pointerId, n34 = n4(t25.timestamp); this.activePointerMap.get(i32) && (this.activePointerMap.size === 1 ? (this._updatePointer(t25.data), !this.isCurrentDragSuppressed && this._emitEvent("end", t25.data, n34), this.isDragging = false, this.isCurrentDragSuppressed = false, this._removePointer(i32)) : (this._removePointer(i32), this._emitEvent("removed", t25.data, n4(t25.timestamp)))); } _handlePointerDrag(t25) { const i32 = t25.data, n34 = i32.currentEvent, s30 = n4(t25.timestamp); switch (i32.action) { case "start": case "update": this.isDragging ? this.activePointerMap.has(n34.native.pointerId) ? (this._updatePointer(n34), !this.isCurrentDragSuppressed && this._emitEvent("update", n34, s30)) : (this._addPointer(n34), this._emitEvent("added", n34, s30), this.isCurrentDragSuppressed = this.isSuppressed) : (this._updatePointer(n34), this.pointerType = t25.data.startEvent.pointerType, this.mouseButton = t25.data.startEvent.button, this.startStateModifiers = t25.modifiers, this.isDragging = true, this.isCurrentDragSuppressed = this.isSuppressed, !this.isCurrentDragSuppressed && this._emitEvent("start", n34, s30)); } } get isSuppressed() { return this.navigationTouch && !this.navigationTouch.browserTouchPanEnabled && this.pointerType === "touch" && this.activePointerMap.size === 1; } }; function r23(e23) { const i32 = []; return e23.forEach((e24) => { i32.push(c2(e24.event.x, e24.event.y)); }), r22(i32); } function a29(t25) { const e23 = r23(t25); let i32 = 0; return t25.forEach((t26) => { let n34 = h17(t26, e23), s30 = n34 - t26.lastAngle; for (; s30 > Math.PI; ) s30 -= 2 * Math.PI; for (; s30 < -Math.PI; ) s30 += 2 * Math.PI; n34 = t26.lastAngle + s30, t26.lastAngle = n34; const r24 = n34 - t26.initialAngle; i32 += r24; }), i32 /= t25.size || 1, { angle: i32, radius: e23.radius, center: e23.center }; } function o28(t25) { const e23 = new Map(); return t25.forEach((t26, i32) => e23.set(i32, t26.event)), e23; } function h17(t25, e23) { const i32 = t25.event, n34 = i32.x - e23.center.x, s30 = i32.y - e23.center.y; return Math.atan2(s30, n34); } var p28; !function(t25) { t25[t25.Left = 0] = "Left", t25[t25.Middle = 1] = "Middle", t25[t25.Right = 2] = "Right", t25[t25.Back = 3] = "Back", t25[t25.Forward = 4] = "Forward", t25[t25.Undefined = -1] = "Undefined"; }(p28 || (p28 = {})); // node_modules/@arcgis/core/views/input/recognizers/ImmediateDoubleClick.js var n30 = class extends i8 { constructor(e23 = s25.maximumDoubleClickDelay, o30 = s25.maximumDoubleClickDistance, n34 = s25.maximumDoubleTouchDelay, a34 = s25.maximumDoubleTouchDistance, s30 = t5) { super(false), this.maximumDoubleClickDelay = e23, this.maximumDoubleClickDistance = o30, this.maximumDoubleTouchDelay = n34, this.maximumDoubleTouchDistance = a34, this._clock = s30, this._pointerState = new Map(), this._immediateDoubleClick = this.registerOutgoing("immediate-double-click"), this.registerIncoming("pointer-down", this._handlePointerDown.bind(this)), this.registerIncoming("pointer-up", (t25) => { this._handlePointerLoss(t25, "pointer-up"); }), this.registerIncoming("pointer-capture-lost", (t25) => { this._handlePointerLoss(t25, "pointer-capture-lost"); }), this.registerIncoming("pointer-cancel", (t25) => { this._handlePointerLoss(t25, "pointer-cancel"); }); } onUninstall() { this._pointerState.forEach((t25) => { t25.immediateDoubleClick && t25.immediateDoubleClick.timeoutHandle.remove(); }), super.onUninstall(); } _handlePointerDown(t25) { const e23 = t25.data, i32 = this._pointerId(e23); if (!this._pointerState.has(i32)) { const t26 = { downButton: e23.native.button, immediateDoubleClick: null }; this._pointerState.set(i32, t26), this.startCapturingPointer(e23.native); } } _handlePointerLoss(t25, e23) { const i32 = t25.data, n34 = this._pointerId(i32), a34 = this._pointerState.get(n34); if (a34 && e23 === "pointer-up" && a34.downButton === i32.native.button) { const e24 = a34.immediateDoubleClick; if (e24) { e24.timeoutHandle.remove(); const n35 = t25.data.native.pointerType === "touch" ? this.maximumDoubleTouchDistance : this.maximumDoubleClickDistance; e21(e24, t25.data) > n35 ? this._startImmediateDoubleClick(t25, a34) : (this._immediateDoubleClick.emit(t25.data, void 0, e24.modifiers), this._removeState(i32)); } else this._startImmediateDoubleClick(t25, a34); } } _startImmediateDoubleClick(t25, e23) { const i32 = t25.data.native.pointerType === "touch" ? this.maximumDoubleTouchDelay : this.maximumDoubleClickDelay; e23.immediateDoubleClick = { x: t25.data.x, y: t25.data.y, modifiers: t25.modifiers, timeoutHandle: this._clock.setTimeout(() => this._removeState(t25.data), i32) }; } _pointerId(t25) { const e23 = t25.native; return e23.pointerType === "mouse" ? `${e23.pointerId}:${e23.button}` : `${e23.pointerType}`; } _removeState(t25) { const e23 = this._pointerId(t25); this._pointerState.delete(e23), this.stopCapturingPointer(t25.native), this.refreshHasPendingInputs(); } }; // node_modules/@arcgis/core/views/input/recognizers/PointerClickHoldAndDrag.js var n31 = { maximumClickDelay: 300, movementUntilMouseDrag: 1.5, movementUntilPenDrag: 6, movementUntilTouchDrag: 6, holdDelay: 500 }; var o29 = class extends i8 { constructor(e23 = n31.maximumClickDelay, i32 = n31.movementUntilMouseDrag, o30 = n31.movementUntilPenDrag, r24 = n31.movementUntilTouchDrag, s30 = n31.holdDelay, a34 = t5) { super(false), this.maximumClickDelay = e23, this.movementUntilMouseDrag = i32, this.movementUntilPenDrag = o30, this.movementUntilTouchDrag = r24, this.holdDelay = s30, this._clock = a34, this._pointerState = new Map(), this._pointerDrag = this.registerOutgoing("pointer-drag"), this._immediateClick = this.registerOutgoing("immediate-click"), this._pointerHold = this.registerOutgoing("hold"), this.registerIncoming("pointer-down", this._handlePointerDown.bind(this)), this.registerIncoming("pointer-up", (t25) => { this._handlePointerLoss(t25, "pointer-up"); }), this.registerIncoming("pointer-capture-lost", (t25) => { this._handlePointerLoss(t25, "pointer-capture-lost"); }), this.registerIncoming("pointer-cancel", (t25) => { this._handlePointerLoss(t25, "pointer-cancel"); }), this._moveHandle = this.registerIncoming("pointer-move", this._handlePointerMove.bind(this)), this._moveHandle.pause(); } onUninstall() { this._pointerState.forEach((t25) => { t25.holdTimeout != null && (t25.holdTimeout.remove(), t25.holdTimeout = null); }), super.onUninstall(); } _handlePointerDown(t25) { const e23 = t25.data, i32 = e23.native.pointerId; let n34 = null; this._pointerState.size === 0 && (n34 = this._clock.setTimeout(() => { const e24 = this._pointerState.get(i32); if (e24) { if (!e24.isDragging) { const i33 = e24.previousEvent; this._pointerHold.emit(i33, void 0, t25.modifiers), e24.holdEmitted = true; } e24.holdTimeout = null; } }, this.holdDelay)); const o30 = { startEvent: e23, previousEvent: e23, startTimestamp: t25.timestamp, isDragging: false, downButton: e23.native.button, holdTimeout: n34, modifiers: new Set() }; this._pointerState.set(i32, o30), this.startCapturingPointer(e23.native), this._moveHandle.resume(), this._pointerState.size > 1 && this._startDragging(t25); } _createPointerDragData(t25, e23, i32) { return { action: t25, startEvent: e23.startEvent, previousEvent: e23.previousEvent, currentEvent: i32 }; } _handlePointerMove(t25) { const e23 = t25.data, n34 = e23.native.pointerId, o30 = this._pointerState.get(n34); if (o30) { if (o30.isDragging) this._pointerDrag.emit(this._createPointerDragData("update", o30, e23), void 0, o30.modifiers); else { n29(e23, o30.startEvent) > this._getDragThreshold(e23.native.pointerType) && this._startDragging(t25); } o30.previousEvent = e23; } } _getDragThreshold(t25) { switch (t25) { case "touch": return this.movementUntilTouchDrag; case "pen": return this.movementUntilPenDrag; default: return this.movementUntilMouseDrag; } } _startDragging(t25) { const e23 = t25.data, i32 = e23.native.pointerId; this._pointerState.forEach((n34) => { n34.holdTimeout != null && (n34.holdTimeout.remove(), n34.holdTimeout = null), n34.isDragging || (n34.modifiers = t25.modifiers, n34.isDragging = true, i32 === n34.startEvent.native.pointerId ? this._pointerDrag.emit(this._createPointerDragData("start", n34, e23)) : this._pointerDrag.emit(this._createPointerDragData("start", n34, n34.previousEvent), t25.timestamp)); }); } _handlePointerLoss(t25, e23) { const i32 = t25.data, n34 = i32.native.pointerId, o30 = this._pointerState.get(n34); if (o30) { if (o30.holdTimeout != null && (o30.holdTimeout.remove(), o30.holdTimeout = null), o30.isDragging) this._pointerDrag.emit(this._createPointerDragData("end", o30, e23 === "pointer-up" ? i32 : o30.previousEvent), void 0, o30.modifiers); else if (e23 === "pointer-up" && o30.downButton === i32.native.button) { t25.timestamp - o30.startTimestamp <= this.maximumClickDelay && !o30.holdEmitted && this._immediateClick.emit(i32); } this._pointerState.delete(n34), this.stopCapturingPointer(i32.native), this._pointerState.size === 0 && this._moveHandle.pause(); } } }; // node_modules/@arcgis/core/views/2d/input/MapViewInputManager.js var z5 = { counter: "Ctrl", pan: { left: "ArrowLeft", right: "ArrowRight", up: "ArrowUp", down: "ArrowDown" }, zoom: { zoomIn: ["=", "+"], zoomOut: ["-", "_"] }, rotate: { clockwiseOption1: "a", clockwiseOption2: "A", counterClockwiseOption1: "d", counterClockwiseOption2: "D", resetOption1: "n", resetOption2: "N" } }; var T6 = class extends y { constructor() { super(...arguments), this._handles = new u3(); } initialize() { const e23 = () => this.view?.ready; this._handles.add([f2(() => !e23(), () => this._disconnect()), f2(e23, () => this._connect())]); } destroy() { this._handles && (this._handles.removeAll(), this._handles = null), this._disconnect(); } get latestPointerType() { return this._inputManager?.latestPointerType; } get latestPointerLocation() { return this._inputManager?.latestPointerLocation; } _disconnect() { this._inputManager && (this.view.viewEvents.disconnect(), this._inputManager.destroy(), this._inputManager = null, this._source.destroy(), this._source = null); } _connect() { const e23 = this.view.surface, t25 = new u18(e23, this.view.input), o30 = [new n30(), new o29(), new a28(), new s27(this.view.navigation), new s26()], r24 = new c11({ eventSource: t25, recognizers: o30 }); r24.installHandlers("prevent-context-menu", [new e20()], g3.INTERNAL), r24.installHandlers("navigation", [new a25(this.view), new d14(this.view), new o26(this.view), new a23(this.view), new a23(this.view, [z5.counter]), new n26(this.view, "primary"), new i26(this.view, z5.pan), new e18(this.view, z5.zoom), new i27(this.view, z5.rotate), new o25(this.view, "secondary"), new e17(this.view, "touch")], g3.INTERNAL), this.view.viewEvents.connect(r24), this._source = t25, this._inputManager = r24, l4(() => this.view?.navigation?.browserTouchPanEnabled, (e24) => { this._source && (this._source.browserTouchPanningEnabled = !e24); }, h2); } get test() { return { inputManager: this._inputManager }; } }; e([d()], T6.prototype, "view", void 0), e([d()], T6.prototype, "latestPointerType", null), e([d()], T6.prototype, "latestPointerLocation", null), T6 = e([n3("esri.views.2d.input.MapViewInputManager")], T6); var k4 = T6; // node_modules/@arcgis/core/views/2d/support/HighlightOptions.js var p29 = 0; var i28 = class extends y { constructor() { super(...arguments), this.color = new l5([0, 255, 255]), this.haloOpacity = 1, this.fillOpacity = 0.25; } get version() { return p29++; } }; e([d({ readOnly: true })], i28.prototype, "version", null), e([d({ type: l5 })], i28.prototype, "color", void 0), e([d({ type: l5 })], i28.prototype, "haloColor", void 0), e([d()], i28.prototype, "haloOpacity", void 0), e([d()], i28.prototype, "fillOpacity", void 0), i28 = e([n3("esri.views.2d.support.HighlightOptions")], i28); var c35 = i28; // node_modules/@arcgis/core/views/support/createScreenshotPlan.js function t24(t25, h19, i32, e23, d20, l27, n34, o30) { let u23; t25.ignorePadding && (e23 = { left: 0, right: 0, top: 0, bottom: 0 }), t25.width != null && t25.height != null ? u23 = [t25.width, t25.height] : t25.width == null && t25.height != null ? u23 = [t25.height, t25.height] : t25.width != null && t25.height == null ? u23 = [t25.width, t25.width] : t25.width == null && t25.height == null && (u23 = null); const r24 = i32[0] - (e23.left + e23.right), a34 = i32[1] - (e23.top + e23.bottom); let g20, w13, c42 = t25.area || { x: 0, y: 0, width: r24, height: a34 }; if (u23) { const t26 = r24 / a34, h20 = u23[0] / u23[1]; if (h20 > t26) { const t27 = c42.width / h20; c42 = { x: c42.x, y: Math.round(c42.y + (c42.height - t27) / 2), width: c42.width, height: Math.round(t27) }; } else { const t27 = c42.height * h20; c42 = { x: Math.round(c42.x + (c42.width - t27) / 2), y: c42.y, width: Math.round(t27), height: c42.height }; } } else u23 = [c42.width, c42.height]; u23[0] > c42.width ? (g20 = Math.min(u23[0] / c42.width, h19), w13 = u23[0] / c42.width / g20) : (g20 = 1, w13 = u23[0] / c42.width); return { resolutionScale: g20, cropArea: { x: Math.round((c42.x + e23.left) * g20), y: Math.round((c42.y + e23.top) * g20), width: Math.round(c42.width * g20), height: Math.round(c42.height * g20) }, outputScale: w13, format: d20, quality: l27, children: n34, rotation: o30 }; } // node_modules/@arcgis/core/views/support/WebGLRequirements.js function i29(i32) { const s30 = l9(i32); if (!s30.available) return new s2("webgl:required", "WebGL is required but not supported."); if (i32 === "3d" && s30.majorPerformanceCaveat) return new s2("webgl:major-performance-caveat-detected", "Your WebGL implementation doesn't seem to support hardware accelerated rendering. Check your browser settings or if your GPU is in a blocklist."); if (!s30.supportsHighPrecisionFragment) return new s2("webgl:high-precision-fragment-required", "WebGL support for high precision fragment shaders is required but not supported."); if (!s30.supportsVertexShaderSamplers) return new s2("webgl:vertex-shader-samplers-required", "WebGL support for vertex shader samplers is required but not supported."); if (s30.type === o8.WEBGL1) { if (!s30.supportsElementIndexUint) return new s2("webgl:element-index-uint-required", "WebGL support for uint vertex indices is required but not supported."); if (!s30.supportsStandardDerivatives) return new s2("webgl:standard-derivatives-required", "WebGL support for standard derivatives is required but not supported."); if (!s30.supportsInstancedArrays) return new s2("webgl:instanced-arrays-required", "WebGL support for instanced rendering is required but not supported."); } return null; } // node_modules/@arcgis/core/views/ui/Component.js function i30(t25) { return t25 && "nodeType" in t25; } function d15(t25) { return t25 && typeof t25.render == "function"; } var c36 = { component: "esri-component" }; var p30 = class extends y { constructor() { super(...arguments), this.widget = null; } destroy() { this.widget && this.widget.destroy(), this.node = null; } get id() { return this.get("widget.id") || this.get("node.id"); } set node(t25) { const o30 = this._get("node"); t25 !== o30 && (t25 && t25.classList.add(c36.component), o30 && o30.classList.remove(c36.component), this._set("node", t25)); } castNode(t25) { return t25 ? typeof t25 == "string" || i30(t25) ? (this._set("widget", null), e3(t25)) : (d15(t25) && !t25.domNode && (t25.domNode = document.createElement("div")), this._set("widget", t25), t25.domNode) : (this._set("widget", null), null); } }; e([d({ dependsOn: [] })], p30.prototype, "id", null), e([d()], p30.prototype, "node", null), e([s3("node")], p30.prototype, "castNode", null), e([d({ readOnly: true })], p30.prototype, "widget", void 0), p30 = e([n3("esri.views.ui.Component")], p30); var l23 = p30; // node_modules/@arcgis/core/views/ui/UI.js var m25 = { left: 0, top: 0, bottom: 0, right: 0 }; var u19 = { bottom: 30, top: 15, right: 15, left: 15 }; var f12 = "manual"; var _6 = { ui: "esri-ui", corner: "esri-ui-corner", innerContainer: "esri-ui-inner-container", manualContainer: "esri-ui-manual-container", cornerContainer: "esri-ui-corner-container", topLeft: "esri-ui-top-left", topRight: "esri-ui-top-right", bottomLeft: "esri-ui-bottom-left", bottomRight: "esri-ui-bottom-right" }; function g16(t25) { return t25 && !t25._started && typeof t25.postMixInProperties == "function" && typeof t25.buildRendering == "function" && typeof t25.postCreate == "function" && typeof t25.startup == "function"; } function y15(t25) { const o30 = t25, i32 = typeof o30 == "object" && o30 !== null && Object.getPrototypeOf(o30); return (i32 === null || i32 === Object.prototype) && ("component" in o30 || "index" in o30 || "position" in o30) ? t25 : null; } function C4(t25, { top: o30, bottom: i32, left: e23, right: n34 }) { t25.style.top = o30, t25.style.bottom = i32, t25.style.left = e23, t25.style.right = n34; } var v14 = class extends n5.EventedAccessor { constructor(t25) { super(t25), this._cornerNameToContainerLookup = {}, this._positionNameToContainerLookup = {}, this._components = new Array(), this._componentToKey = new Map(), this._handles = new u3(), this.view = null, this._applyViewPadding = () => { const t26 = this.container; t26 && C4(t26, this._toPxPosition(this._getViewPadding())); }, this._applyUIPadding = () => { const t26 = this._innerContainer; t26 && C4(t26, this._toPxPosition(this.padding)); }, this._initContainers(); } initialize() { this._handles.add([l4(() => [this.view?.padding, this.container], this._applyViewPadding, h2), l4(() => this.padding, this._applyUIPadding, h2)]); } destroy() { this.container = null; for (const t25 of this._components) t25.destroy(); this._components.length = 0, this._handles.destroy(), this._componentToKey.clear(); } set container(t25) { const i32 = this._get("container"); t25 !== i32 && (t25 && (t25.classList.add(_6.ui), n7(t25), this._attachContainers(t25)), i32 && (i32.classList.remove(_6.ui), C4(i32, { top: "", bottom: "", left: "", right: "" }), t6(i32)), this._set("container", t25)); } get height() { const t25 = this.get("view.height") || 0; if (t25 === 0) return t25; const o30 = this._getViewPadding(), i32 = o30.top + o30.bottom; return Math.max(t25 - i32, 0); } get padding() { return this._get("padding"); } set padding(t25) { t25 ? this._override("padding", t25) : this._clearOverride("padding"); } castPadding(t25) { return typeof t25 == "number" ? { bottom: t25, top: t25, right: t25, left: t25 } : { ...u19, ...t25 }; } get width() { const t25 = this.get("view.width") || 0; if (t25 === 0) return t25; const o30 = this._getViewPadding(), i32 = o30.left + o30.right; return Math.max(t25 - i32, 0); } add(t25, o30) { let i32, e23; if (Array.isArray(t25)) return void t25.forEach((t26) => this.add(t26, o30)); const n34 = y15(t25); n34 && ({ index: i32, position: o30, component: t25, key: e23 } = n34), o30 && typeof o30 == "object" && ({ index: i32, key: e23, position: o30 } = o30), !t25 || o30 && !this._isValidPosition(o30) || this._add(t25, o30, i32, e23); } remove(t25, o30) { if (!t25) return; if (Array.isArray(t25)) return t25.map((t26) => this.remove(t26, o30)); const i32 = this._find(t25); if (i32) { const e23 = this._componentToKey; if (e23.has(t25) && e23.get(t25) !== o30) return; const n34 = this._components.indexOf(i32); return i32.node.parentNode && i32.node.parentNode.removeChild(i32.node), this._componentToKey.delete(t25), this._components.splice(n34, 1)[0]; } } empty(t25) { if (Array.isArray(t25)) return t25.map((t26) => this.empty(t26)).reduce((t26, o30) => t26.concat(o30)); if ((t25 = t25 || f12) === f12) { return Array.prototype.slice.call(this._manualContainer.children).filter((t26) => !t26.classList.contains(_6.corner)).map((t26) => this.remove(t26)); } return this._isValidPosition(t25) ? Array.prototype.slice.call(this._cornerNameToContainerLookup[t25].children).map(this.remove, this) : null; } move(t25, o30) { if (Array.isArray(t25) && t25.forEach((t26) => this.move(t26, o30)), !t25) return; let i32; const e23 = y15(t25) || y15(o30); if (e23 && (i32 = e23.index, o30 = e23.position, t25 = e23.component || t25), o30 && !this._isValidPosition(o30)) return; const n34 = this.remove(t25); n34 && this.add(n34, { position: o30, index: i32 }); } find(t25) { if (!t25) return null; const o30 = this._findById(t25); return o30 && (o30.widget || o30.node); } getPosition(t25) { for (const o30 in this._positionNameToContainerLookup) { if (this._positionNameToContainerLookup[o30].contains(t25)) return o30; } return null; } _add(t25, o30, i32, e23) { t25 instanceof l23 || (t25 = new l23({ node: t25 })), this._place({ component: t25, position: o30, index: i32 }), this._components.push(t25), e23 && this._componentToKey.set(t25, e23); } _find(t25) { return t25 ? t25 instanceof l23 ? this._findByComponent(t25) : typeof t25 == "string" ? this._findById(t25) : this._findByNode(t25.domNode || t25) : null; } _getViewPadding() { return this.get("view.padding") || m25; } _attachContainers(t25) { t25.appendChild(this._innerContainer), t25.appendChild(this._manualContainer); } _initContainers() { const t25 = document.createElement("div"); t25.classList.add(_6.innerContainer), t25.classList.add(_6.cornerContainer); const o30 = document.createElement("div"); o30.classList.add(_6.innerContainer), o30.classList.add(_6.manualContainer); const i32 = document.createElement("div"); i32.classList.add(_6.topLeft), i32.classList.add(_6.corner), t25.appendChild(i32); const e23 = document.createElement("div"); e23.classList.add(_6.topRight), e23.classList.add(_6.corner), t25.appendChild(e23); const n34 = document.createElement("div"); n34.classList.add(_6.bottomLeft), n34.classList.add(_6.corner), t25.appendChild(n34); const r24 = document.createElement("div"); r24.classList.add(_6.bottomRight), r24.classList.add(_6.corner), t25.appendChild(r24), this._innerContainer = t25, this._manualContainer = o30; const s30 = f3(); this._cornerNameToContainerLookup = { "top-left": i32, "top-right": e23, "bottom-left": n34, "bottom-right": r24, "top-leading": s30 ? e23 : i32, "top-trailing": s30 ? i32 : e23, "bottom-leading": s30 ? r24 : n34, "bottom-trailing": s30 ? n34 : r24 }, this._positionNameToContainerLookup = { manual: o30, ...this._cornerNameToContainerLookup }; } _isValidPosition(t25) { return !!this._positionNameToContainerLookup[t25]; } _place(t25) { const o30 = t25.component, e23 = t25.position || f12, n34 = t25.index, r24 = this._positionNameToContainerLookup[e23], s30 = n34 > -1; if (g16(o30.widget) && o30.widget.startup(), !s30) return void r24.appendChild(o30.node); const a34 = Array.prototype.slice.call(r24.children); if (n34 === 0) return void (r24.firstChild ? o3(o30.node, r24.firstChild) : r24.appendChild(o30.node)); n34 >= a34.length ? r24.appendChild(o30.node) : o3(o30.node, a34[n34]); } _toPxPosition(t25) { return { top: this._toPxUnit(t25.top), left: this._toPxUnit(t25.left), right: this._toPxUnit(t25.right), bottom: this._toPxUnit(t25.bottom) }; } _toPxUnit(t25) { return t25 === 0 ? "0" : t25 + "px"; } _findByComponent(t25) { let o30, i32 = null; return this._components.some((e23) => (o30 = e23 === t25, o30 && (i32 = e23), o30)), i32; } _findById(t25) { let o30, i32 = null; return this._components.some((e23) => (o30 = e23.id === t25, o30 && (i32 = e23), o30)), i32; } _findByNode(t25) { let o30, i32 = null; return this._components.some((e23) => (o30 = e23.node === t25, o30 && (i32 = e23), o30)), i32; } }; e([d()], v14.prototype, "container", null), e([d()], v14.prototype, "height", null), e([d({ value: u19 })], v14.prototype, "padding", null), e([s3("padding")], v14.prototype, "castPadding", null), e([d()], v14.prototype, "view", void 0), e([d()], v14.prototype, "width", null), v14 = e([n3("esri.views.ui.UI")], v14); var L10 = v14; // node_modules/@arcgis/core/widgets/Attribution/AttributionViewModel.js function d16(t25, e23) { return t25 && "copyright" in t25 && (!e23 || typeof t25.originOf == "function" && t25.originOf("copyright") === "user"); } function m26(t25, e23) { return t25.length !== e23.length || t25.some((t26, i32) => t26.text !== e23[i32].text); } function f13(t25, e23, i32) { if (!i32 || !e23) return; t25.find((t26) => t26.layerView === e23 && t26.text === i32) || t25.push({ text: i32, layerView: e23 }); } function y16(t25) { return t25.type === "bing-maps"; } var b9 = []; var g17 = class extends d2 { constructor(t25) { super(t25), this._clear = () => { this._fetchedAttributionData.clear(), this._pendingAttributions.clear(), this.handles.remove("suspension"), this.notifyChange("state"); }, this._pendingAttributions = new Set(), this._fetchedAttributionData = new Map(), this.items = new j3(), this.view = null, this._allLayerViewsChange = (t26) => { this.handles.remove("suspension"); const e23 = this.get("view.allLayerViews"); e23 && this.handles.add(e23.map((t27) => l4(() => [t27.suspended, t27.layer?.attributionVisible], () => this._updateAttributionItems())), "suspension"), t26 && t26.removed && t26.removed.forEach((t27) => { this._pendingAttributions.delete(t27), this._fetchedAttributionData.delete(t27); }), this._updateAttributionItems(); }, this.handles.add([a3(() => this.view?.allLayerViews, "change", (t26) => this._allLayerViewsChange(t26), { onListenerAdd: () => this._allLayerViewsChange(), onListenerRemove: this._clear }), f2(() => this.view?.stationary === true, () => this._updateAttributionItems())]); } destroy() { this.view = null, this._fetchedAttributionData.clear(), this._pendingAttributions.clear(), this.items.removeAll(); } get state() { return this.get("view.ready") ? this._pendingAttributions.size > 0 ? "loading" : "ready" : "disabled"; } _updateAttributionItems() { const t25 = this.get("view.allLayerViews"); b9.length = 0, t25 ? (t25.forEach((t26) => { if (t26.suspended || !t26.layer?.attributionVisible) return; const e23 = t26.layer; if (d16(e23, "user")) return void f13(b9, t26, e23.copyright); if (e23.hasAttributionData) { if (this._fetchedAttributionData.has(t26)) { const i33 = this._fetchedAttributionData.get(t26); return void (i33 ? f13(b9, t26, this._getDynamicAttribution(i33, this.view, e23)) : d16(e23) && f13(b9, t26, e23.copyright)); } return void this._fetchAttributionData(t26); } const i32 = e23.get("portalItem.accessInformation"); f13(b9, t26, i32 || e23.copyright); }), m26(this.items, b9) && (this.items.removeAll(), this.items.addMany(b9)), b9.length = 0, this.notifyChange("state")) : this._clear(); } async _fetchAttributionData(t25) { if (this._pendingAttributions.has(t25)) return; this._pendingAttributions.add(t25); const i32 = await a7(t25.layer.fetchAttributionData()); if (this._pendingAttributions.has(t25)) { const e23 = i32.ok ? this._createContributionIndex(i32.value, y16(t25.layer)) : null; this._pendingAttributions.delete(t25), this._fetchedAttributionData.set(t25, e23); } this._updateAttributionItems(); } _createContributionIndex(t25, e23) { const i32 = t25.contributors, r24 = {}; if (!i32) return r24; for (let s30 = 0; s30 < i32.length; s30++) { const t26 = i32[s30], o30 = t26.coverageAreas; if (!o30) return; for (const i33 of o30) { const o31 = i33.bbox, n34 = i33.zoomMin - (e23 && i33.zoomMin ? 1 : 0), a34 = i33.zoomMax - (e23 && i33.zoomMax ? 1 : 0), c42 = { xmin: o31[1], ymin: o31[0], xmax: o31[3], ymax: o31[2], spatialReference: k2.WGS84 }, u23 = { extent: R(c42), attribution: t26.attribution || "", score: i33.score != null ? i33.score : 100, id: s30 }; for (let t27 = n34; t27 <= a34; t27++) r24[t27] = r24[t27] || [], r24[t27].push(u23); } } return r24.maxKey = Math.max.apply(null, Object.keys(r24)), r24; } _getDynamicAttribution(t25, e23, i32) { const { extent: r24, scale: s30 } = e23; let o30 = i32.tileInfo.scaleToZoom(s30); if (o30 = Math.min(t25.maxKey, Math.round(o30)), !r24 || o30 == null || o30 <= -1) return ""; const n34 = t25[o30], a34 = M(r24.center.clone().normalize(), e23.spatialReference), c42 = {}; return n34 ? n34.filter((t26) => { const e24 = !c42[t26.id] && a34 && r4(t26.extent, a34); return e24 && (c42[t26.id] = true), e24; }).sort((t26, e24) => e24.score - t26.score || t26.objectId - e24.objectId).map((t26) => t26.attribution).join(", ") : ""; } }; e([d({ readOnly: true, type: j3 })], g17.prototype, "items", void 0), e([d({ readOnly: true })], g17.prototype, "state", null), e([d()], g17.prototype, "view", void 0), g17 = e([n3("esri.widgets.Attribution.AttributionViewModel")], g17); var _7 = g17; // node_modules/@arcgis/core/widgets/Attribution.js var d17 = { base: "esri-attribution esri-widget", poweredBy: "esri-attribution__powered-by", sources: "esri-attribution__sources", open: "esri-attribution--open", sourcesOpen: "esri-attribution__sources--open", link: "esri-attribution__link", widgetIcon: "esri-icon-description", interactive: "esri-interactive" }; var l24 = class extends O2 { constructor(e23, t25) { super(e23, t25), this._isOpen = false, this._attributionTextOverflowed = false, this._prevSourceNodeHeight = 0, this._resizeObserver = new ResizeObserver((e24) => e24.forEach(({ target: e25 }) => this._checkSourceTextOverflow(e25))), this.iconClass = d17.widgetIcon, this.itemDelimiter = " | ", this.label = void 0, this.messages = null, this.view = null, this.viewModel = new _7(); } initialize() { this.own(a3(() => this.viewModel?.items, "change", () => this.scheduleRender())); } destroy() { this._resizeObserver?.disconnect(); } get _isInteractive() { return this._isOpen || this._attributionTextOverflowed; } get attributionText() { return this.viewModel.items.reduce((e23, t25) => (e23.includes(t25.text) || e23.push(t25.text), e23), []).join(this.itemDelimiter); } render() { const e23 = { [d17.open]: this._isOpen }; return n6("div", { bind: this, class: this.classes(d17.base, e23), dir: "ltr", onclick: this._toggleState, onkeydown: this._toggleState }, this.renderSourcesNode(), this.renderPoweredBy()); } renderPoweredBy() { return n6("div", { class: d17.poweredBy }, "Powered by", " ", n6("a", { class: d17.link, href: "http://www.esri.com/", target: "_blank", rel: "noreferrer" }, "Esri")); } renderSourcesNode() { const e23 = this._isOpen, t25 = this._isInteractive, i32 = t25 ? "0" : "", { attributionText: r24 } = this, s30 = { [d17.sourcesOpen]: e23, [d17.interactive]: t25 }; return n6("div", { afterCreate: this._afterSourcesNodeCreate, bind: this, class: this.classes(d17.sources, s30), innerHTML: r24, tabindex: i32 }); } _afterSourcesNodeCreate(e23) { this._prevSourceNodeHeight = e23.clientWidth, this._resizeObserver.observe(e23); } _checkSourceTextOverflow(e23) { let t25 = false; const { clientHeight: i32, clientWidth: r24, scrollWidth: s30 } = e23, o30 = s30 > r24, n34 = this._attributionTextOverflowed !== o30; if (this._attributionTextOverflowed = o30, n34 && (t25 = true), this._isOpen) { const e24 = i32 < this._prevSourceNodeHeight; this._prevSourceNodeHeight = i32, e24 && (this._isOpen = false, t25 = true); } t25 && this.scheduleRender(); } _toggleState() { this._isInteractive && (this._isOpen = !this._isOpen); } }; e([d()], l24.prototype, "_isOpen", void 0), e([d()], l24.prototype, "_isInteractive", null), e([d()], l24.prototype, "_attributionTextOverflowed", void 0), e([d()], l24.prototype, "_prevSourceNodeHeight", void 0), e([d({ readOnly: true, dependsOn: ["viewModel.items.length", "itemDelimiter"] })], l24.prototype, "attributionText", null), e([d()], l24.prototype, "iconClass", void 0), e([d()], l24.prototype, "itemDelimiter", void 0), e([d({ aliasOf: { source: "messages.widgetLabel", overridable: true } })], l24.prototype, "label", void 0), e([d(), e4("esri/widgets/Attribution/t9n/Attribution")], l24.prototype, "messages", void 0), e([o9("viewModel.view")], l24.prototype, "view", void 0), e([d({ type: _7 })], l24.prototype, "viewModel", void 0), e([t7()], l24.prototype, "_toggleState", null), l24 = e([n3("esri.widgets.Attribution")], l24); var u20 = l24; // node_modules/@arcgis/core/widgets/Compass/CompassViewModel.js var p31 = "esri.widgets.CompassViewModel"; var d18 = class extends e16(y) { constructor(t25) { super(t25), this._handles = new u3(), this.orientation = { x: 0, y: 0, z: 0 }, this.view = null, this._updateForCamera = this._updateForCamera.bind(this), this._updateForRotation = this._updateForRotation.bind(this), this._updateRotationWatcher = this._updateRotationWatcher.bind(this); } initialize() { this._handles.add(l4(() => this.view, this._updateRotationWatcher, h2)); } destroy() { this._handles = a2(this._handles), this.view = null; } get canShowNorth() { const t25 = this.get("view.spatialReference"); return !(!t25 || !t25.isWebMercator && !t25.isGeographic); } get state() { return this.get("view.ready") ? this.canShowNorth ? "compass" : "rotation" : "disabled"; } reset() { if (!this.get("view.ready")) return; const t25 = {}; this.view.type === "2d" ? t25.rotation = 0 : t25.heading = 0, this.callGoTo({ target: t25 }); } _updateForRotation(t25) { t25 != null && (this.orientation = { z: t25 }); } _updateForCamera(t25) { if (!t25) return; const o30 = -t25.heading; this.orientation = { x: 0, y: 0, z: o30 }; } _updateRotationWatcher(t25) { this._handles.removeAll(), t25 && this._handles.add(t25.type === "2d" ? l4(() => t25?.rotation, this._updateForRotation, h2) : l4(() => t25?.camera, this._updateForCamera, h2)); } }; e([d({ readOnly: true })], d18.prototype, "canShowNorth", null), e([d()], d18.prototype, "orientation", void 0), e([d({ readOnly: true })], d18.prototype, "state", null), e([d()], d18.prototype, "view", void 0), d18 = e([n3(p31)], d18); var c37 = d18; // node_modules/@arcgis/core/widgets/Compass.js var p32 = { base: "esri-compass esri-widget--button esri-widget", text: "esri-icon-font-fallback-text", icon: "esri-compass__icon", rotationIcon: "esri-icon-dial", northIcon: "esri-icon-compass", widgetIcon: "esri-icon-locate-circled", interactive: "esri-interactive", disabled: "esri-disabled" }; var l25 = class extends O2 { constructor(s30, e23) { super(s30, e23), this.goToOverride = null, this.iconClass = p32.widgetIcon, this.label = void 0, this.messages = null, this.view = null, this.viewModel = new c37(); } reset() { return this.viewModel.reset(); } render() { const { orientation: s30, state: e23 } = this.viewModel, o30 = e23 === "disabled", t25 = (e23 === "rotation" ? "rotation" : "compass") === "compass", r24 = o30 ? -1 : 0, i32 = { [p32.disabled]: o30, [p32.interactive]: !o30 }, a34 = { [p32.northIcon]: t25, [p32.rotationIcon]: !t25 }, { messages: c42 } = this; return n6("div", { bind: this, class: this.classes(p32.base, i32), onclick: this._reset, onkeydown: this._reset, role: "button", tabIndex: r24, "aria-label": c42.reset, title: c42.reset }, n6("span", { "aria-hidden": "true", class: this.classes(p32.icon, a34), styles: this._toRotationTransform(s30) }), n6("span", { class: p32.text }, c42.reset)); } _reset() { this.viewModel.reset(); } _toRotationTransform(s30) { return { transform: `rotateZ(${s30.z}deg)` }; } }; e([o9("viewModel.goToOverride")], l25.prototype, "goToOverride", void 0), e([d()], l25.prototype, "iconClass", void 0), e([d({ aliasOf: { source: "messages.widgetLabel", overridable: true } })], l25.prototype, "label", void 0), e([d(), e4("esri/widgets/Compass/t9n/Compass")], l25.prototype, "messages", void 0), e([o9("viewModel.view")], l25.prototype, "view", void 0), e([d({ type: c37 })], l25.prototype, "viewModel", void 0), e([t7()], l25.prototype, "_reset", null), l25 = e([n3("esri.widgets.Compass")], l25); var d19 = l25; // node_modules/@arcgis/core/widgets/NavigationToggle/NavigationToggleViewModel.js var a30 = class extends y { constructor(t25) { super(t25), this._handles = new u3(), this.navigationMode = "pan", this.view = null; } initialize() { this._handles.add(f2(() => this.view?.inputManager, () => this._setNavigationMode())); } destroy() { this._handles.destroy(), this._handles = null, this.view = null; } get state() { return this.get("view.ready") && this.view.type === "3d" ? "ready" : "disabled"; } toggle() { this.state !== "disabled" && (this.navigationMode = this.navigationMode !== "pan" ? "pan" : "rotate", this._setNavigationMode()); } _setNavigationMode() { this.get("view.inputManager").primaryDragAction = this.navigationMode === "pan" ? "pan" : "rotate"; } }; e([d({ readOnly: true })], a30.prototype, "state", null), e([d()], a30.prototype, "navigationMode", void 0), e([d()], a30.prototype, "view", void 0), a30 = e([n3("esri.widgets.NavigationToggleViewModel")], a30); var n32 = a30; // node_modules/@arcgis/core/widgets/NavigationToggle.js var g18 = { base: "esri-navigation-toggle esri-widget", button: "esri-navigation-toggle__button esri-widget--button", activeButton: "esri-navigation-toggle__button--active", panButton: "esri-navigation-toggle__button--pan", rotateButton: "esri-navigation-toggle__button--rotate", isLayoutHorizontal: "esri-navigation-toggle--horizontal", rotationIcon: "esri-icon-rotate", panIcon: "esri-icon-pan", widgetIcon: "esri-icon-pan2", disabled: "esri-disabled" }; var p33 = class extends O2 { constructor(t25, o30) { super(t25, o30), this.iconClass = g18.widgetIcon, this.label = void 0, this.messages = null, this.view = null, this.viewModel = new n32(); } set layout(t25) { t25 !== "horizontal" && (t25 = "vertical"), this._set("layout", t25); } toggle() { return this.viewModel.toggle(); } render() { const t25 = this.get("viewModel.state") === "disabled", o30 = this.get("viewModel.navigationMode") === "pan", e23 = { [g18.disabled]: t25, [g18.isLayoutHorizontal]: this.layout === "horizontal" }, s30 = { [g18.activeButton]: o30 }, i32 = { [g18.activeButton]: !o30 }, a34 = t25 ? -1 : 0, r24 = this.messages.toggle; return n6("div", { bind: this, class: this.classes(g18.base, e23), onclick: this._toggle, onkeydown: this._toggle, tabIndex: a34, "aria-label": r24, title: r24 }, n6("div", { class: this.classes(g18.button, g18.panButton, s30) }, n6("span", { class: g18.panIcon })), n6("div", { class: this.classes(g18.button, g18.rotateButton, i32) }, n6("span", { class: g18.rotationIcon }))); } _toggle() { this.toggle(); } }; e([d()], p33.prototype, "iconClass", void 0), e([d({ aliasOf: { source: "messages.widgetLabel", overridable: true } })], p33.prototype, "label", void 0), e([d({ value: "vertical" })], p33.prototype, "layout", null), e([d(), e4("esri/widgets/NavigationToggle/t9n/NavigationToggle")], p33.prototype, "messages", void 0), e([o9("viewModel.view")], p33.prototype, "view", void 0), e([d({ type: n32 })], p33.prototype, "viewModel", void 0), e([t7()], p33.prototype, "_toggle", null), p33 = e([n3("esri.widgets.NavigationToggle")], p33); var c38 = p33; // node_modules/@arcgis/core/widgets/Zoom/IconButton.js var c39 = { button: "esri-widget--button esri-widget", disabled: "esri-disabled", interactive: "esri-interactive", iconText: "esri-icon-font-fallback-text", icon: "esri-icon" }; var n33 = class extends O2 { constructor() { super(...arguments), this.enabled = true, this.iconClass = "", this.title = ""; } render() { const t25 = this.enabled ? 0 : -1, s30 = { [c39.disabled]: !this.enabled, [c39.interactive]: this.enabled }, i32 = { [this.iconClass]: !!this.iconClass }; return n6("div", { bind: this, class: this.classes(c39.button, s30), onclick: this._triggerAction, onkeydown: this._triggerAction, role: "button", tabIndex: t25, title: this.title }, n6("span", { "aria-hidden": "true", role: "presentation", class: this.classes(c39.icon, i32) }), n6("span", { class: c39.iconText }, this.title)); } _triggerAction() { this.action.call(this); } }; e([d()], n33.prototype, "action", void 0), e([d()], n33.prototype, "enabled", void 0), e([d()], n33.prototype, "iconClass", void 0), e([d()], n33.prototype, "title", void 0), e([t7()], n33.prototype, "_triggerAction", null), n33 = e([n3("esri.widgets.IconButton")], n33); var a31 = n33; // node_modules/@arcgis/core/widgets/Zoom/ZoomConditions2D.js var s28 = class extends y { get canZoomIn() { if (!this.get("view.ready")) return false; const e23 = this.get("view.animation.target.scale") || this.get("view.scale"), t25 = this.get("view.constraints.effectiveMaxScale"); return t25 === 0 || e23 > t25; } get canZoomOut() { if (!this.get("view.ready")) return false; const e23 = this.get("view.animation.target.scale") || this.get("view.scale"), t25 = this.get("view.constraints.effectiveMinScale"); return t25 === 0 || e23 < t25; } }; e([d({ readOnly: true })], s28.prototype, "canZoomIn", null), e([d({ readOnly: true })], s28.prototype, "canZoomOut", null), e([d()], s28.prototype, "view", void 0), s28 = e([n3("esri.widgets.Zoom.ZoomConditions2D")], s28); var i31 = s28; // node_modules/@arcgis/core/widgets/Zoom/ZoomConditions3D.js var s29 = class extends y { get canZoomIn() { return !!this.get("view.ready"); } get canZoomOut() { return !!this.get("view.ready"); } }; e([d({ readOnly: true })], s29.prototype, "canZoomIn", null), e([d({ readOnly: true })], s29.prototype, "canZoomOut", null), e([d()], s29.prototype, "view", void 0), s29 = e([n3("esri.widgets.Zoom.ZoomConditions3D")], s29); var c40 = s29; // node_modules/@arcgis/core/widgets/Zoom/ZoomViewModel.js var m27 = class extends y { constructor(o30) { super(o30), this.canZoomIn = false, this.canZoomOut = false; } destroy() { this.view = null; } get state() { return this.get("view.ready") ? "ready" : "disabled"; } set view(o30) { o30 ? o30.type === "2d" ? this._zoomConditions = new i31({ view: o30 }) : o30.type === "3d" && (this._zoomConditions = new c40({ view: o30 })) : this._zoomConditions = null, this._set("view", o30); } zoomIn() { if (!this.canZoomIn) return; const o30 = this.view; o30.type === "2d" ? o30.mapViewNavigation.zoomIn() : j(o30.goTo({ zoomFactor: 2 })); } zoomOut() { if (!this.canZoomOut) return; const o30 = this.view; o30.type === "2d" ? o30.mapViewNavigation.zoomOut() : j(o30.goTo({ zoomFactor: 0.5 })); } }; e([d()], m27.prototype, "_zoomConditions", void 0), e([d({ aliasOf: "_zoomConditions.canZoomIn", readOnly: true })], m27.prototype, "canZoomIn", void 0), e([d({ aliasOf: "_zoomConditions.canZoomOut", readOnly: true })], m27.prototype, "canZoomOut", void 0), e([d({ readOnly: true })], m27.prototype, "state", null), e([d()], m27.prototype, "view", null), m27 = e([n3("esri.widgets.Zoom.ZoomViewModel")], m27); var a32 = m27; // node_modules/@arcgis/core/widgets/Zoom.js var l26 = { base: "esri-zoom esri-widget", horizontalLayout: "esri-zoom--horizontal", zoomInIcon: "esri-icon-plus", zoomOutIcon: "esri-icon-minus", widgetIcon: "esri-icon-zoom-in-magnifying-glass" }; var u21 = class extends O2 { constructor(o30, t25) { super(o30, t25), this.iconClass = l26.widgetIcon, this.label = void 0, this.messages = null, this.view = null, this.viewModel = new a32(); } initialize() { this._zoomInButton = new a31({ action: this.zoomIn.bind(this), iconClass: l26.zoomInIcon }), this._zoomOutButton = new a31({ action: this.zoomOut.bind(this), iconClass: l26.zoomOutIcon }); } destroy() { this._zoomInButton.destroy(), this._zoomOutButton.destroy(), this._zoomInButton = null, this._zoomOutButton = null; } set layout(o30) { o30 !== "horizontal" && (o30 = "vertical"), this._set("layout", o30); } render() { const o30 = this.viewModel, t25 = { [l26.horizontalLayout]: this.layout === "horizontal" }; return this._zoomInButton.enabled = o30.state === "ready" && o30.canZoomIn, this._zoomOutButton.enabled = o30.state === "ready" && o30.canZoomOut, this._zoomInButton.title = this.messages.zoomIn, this._zoomOutButton.title = this.messages.zoomOut, n6("div", { class: this.classes(l26.base, t25) }, this._zoomInButton.render(), this._zoomOutButton.render()); } zoomIn() { return this.viewModel.zoomIn(); } zoomOut() { return this.viewModel.zoomOut(); } }; e([d()], u21.prototype, "iconClass", void 0), e([d({ aliasOf: { source: "messages.widgetLabel", overridable: true } })], u21.prototype, "label", void 0), e([d({ value: "vertical" })], u21.prototype, "layout", null), e([d(), e4("esri/widgets/Zoom/t9n/Zoom")], u21.prototype, "messages", void 0), e([o9("viewModel.view")], u21.prototype, "view", void 0), e([d({ type: a32 })], u21.prototype, "viewModel", void 0), u21 = e([n3("esri.widgets.Zoom")], u21); var c41 = u21; // node_modules/@arcgis/core/views/ui/DefaultUI.js var h18 = "esri.views.ui.DefaultUI"; function u22(t25) { return t25 && t25.view !== void 0; } s.getLogger(h18); var g19 = class extends L10 { constructor(t25) { super(t25), this._defaultPositionLookup = { attribution: "manual", compass: "top-left", "navigation-toggle": "top-left", zoom: "top-left" }, this.components = []; } initialize() { this._handles.add([l4(() => this.components, this._componentsWatcher.bind(this), h2), l4(() => this.view, this._updateViewAwareWidgets.bind(this), h2)]); } _add(t25, o30, e23, i32) { if (typeof t25 == "string" && this._defaultPositionLookup[t25]) { if (this._find(t25)) return; t25 = this._createComponent(t25); } super._add(t25, o30, e23, i32); } _removeComponents(t25) { t25.forEach((t26) => { const o30 = this._find(t26); o30 && (this.remove(o30), o30.destroy()); }); } _updateViewAwareWidgets(t25) { this.components.forEach((o30) => { const e23 = this._find(o30), i32 = e23 && e23.widget; u22(i32) && (i32.view = t25); }); } _componentsWatcher(t25, o30) { this._removeComponents(o30), this._addComponents(t25), this._adjustPadding(t25); } _adjustPadding(t25) { if (!t25.includes("attribution") && !this._isOverridden("padding")) { const { top: t26 } = this.padding; this.padding = t26; } } _addComponents(t25) { this.initialized && t25.forEach((t26) => this.add(this._createComponent(t26), this._defaultPositionLookup[t26])); } _createComponent(t25) { const o30 = this._createWidget(t25); if (o30) return new l23({ id: t25, node: o30 }); } _createWidget(t25) { return t25 === "attribution" ? this._createAttribution() : t25 === "compass" ? this._createCompass() : t25 === "navigation-toggle" ? this._createNavigationToggle() : t25 === "zoom" ? this._createZoom() : void 0; } _createAttribution() { return new u20({ view: this.view }); } _createCompass() { return new d19({ view: this.view }); } _createNavigationToggle() { return new c38({ view: this.view }); } _createZoom() { return new c41({ view: this.view }); } }; e([d()], g19.prototype, "components", void 0), g19 = e([n3(h18)], g19); var _8 = g19; // node_modules/@arcgis/core/views/ui/2d/DefaultUI2D.js var e22 = class extends _8 { constructor(o30) { super(o30), this.components = ["attribution", "zoom"]; } }; e([d()], e22.prototype, "components", void 0), e22 = e([n3("esri.views.ui.2d.DefaultUI2D")], e22); var p34 = e22; // node_modules/@arcgis/core/webmap/background/ColorBackground.js var p35; var a33 = p35 = class extends l2 { constructor(o30) { super(o30), this.color = new l5([0, 0, 0, 1]); } clone() { return new p35(m({ color: this.color })); } }; e([d({ type: l5, json: { write: true } })], a33.prototype, "color", void 0), a33 = p35 = e([n3("esri.webmap.background.ColorBackground")], a33); var m28 = a33; // node_modules/@arcgis/core/views/MapView.js var he = s.getLogger("esri.views.MapView"); var ce2; var de3; var ue2; var me2; var ge; var fe2; async function ye2() { const [, { GraphicsView2D: e23, GraphicContainer: t25, LabelManager: i32, MapViewNavigation: s30, MagnifierView2D: r24, Stage: n34 }] = await Promise.all([import("./webglDeps-KBPNVQNX.js"), import("./mapViewDeps-56OJ7M5D.js")]); de3 = e23, ue2 = t25, me2 = i32, ge = s30, fe2 = r24, ce2 = n34; } var we = 160; function _e(e23) { return e23 && e23.declaredClass === "esri.Viewpoint"; } var ve = class extends w4(g12(p16(G4))) { constructor(e23) { super(e23), this._magnifierView = null, this._stage = null, this._resolveWhenReady = [], this.rootLayerViews = new p4({ getCollections: () => [this.basemapView?.baseLayerViews, this.layerViews, this.basemapView?.referenceLayerViews], getChildrenFunction: () => null }), this.featuresTilingScheme = null, this.fullOpacity = 1, this.graphicsView = null, this.labelManager = null, this.mapViewNavigation = null, this.renderingOptions = { samplingMode: "dynamic", edgeLabelsVisible: true, labelsAnimationTime: 125, labelCollisionsEnabled: true }, this.rendering = false, this.supersampleScreenshotsEnabled = false, this.supportsGround = false, this._stationaryTimer = null, this.frameTask = new s19(this), this._pePromise = null, this.floors = new j3(), this.highlightOptions = new c35(), this.inputManager = new k4({ view: this }), this.map = null, this.resizeAlign = "center", this.spatialReferenceLocked = false, this.timeline = new e10(), this.type = "2d", this.ui = new p34(), this._pixelFormat = { flipY: true, premultipliedAlpha: true }, this.constraints = new y14(), this.padding = { top: 0, right: 0, bottom: 0, left: 0 }, this.handles.add([l4(() => this.viewpoint, () => { this._lastStationaryEventTimestamp = performance.now(), this._flipStationary(we); }, U), this.on("resize", (e24) => this._resizeHandler(e24)), l4(() => this.animationManager?.animation, (e24) => { this.animation = e24; })]), c9(); } destroy() { this._set("preconditionsReady", false), this._gotoTask = this.frameTask = null, this.rootLayerViews.destroy(), this.inputManager.destroy(), this._set("inputManager", null); } get graphicsTileStore() { return new l10(this.featuresTilingScheme); } get initialExtentRequired() { const { scale: e23, constraints: t25, center: i32, viewpoint: s30, extent: r24 } = this; let n34 = this.zoom; return !(this.map && "initialViewProperties" in this.map && this.map.initialViewProperties?.viewpoint) && (!r24 && (t25?.effectiveLODs || (n34 = -1), (!i32 || e23 === 0 && n34 === -1) && (!s30 || !r(s30.targetGeometry) || s30.targetGeometry.type !== "extent" && !s30.scale))); } get resourceManager() { return this._stage.resourceManager; } get textureManager() { return this._stage.painter.textureManager; } get _defaultsFromMapSettings() { return { required: { tileInfo: true, heightModelInfo: false, extent: false }, requiresExtentInSpatialReference: this.spatialReferenceLocked }; } get _projectionEngineLoaded() { return !!en() || (this._pePromise || (this._pePromise = tn().finally(() => { this._pePromise = null; })), false); } get typeSpecificPreconditionsReady() { const e23 = this._getDefaultViewpoint(); if (!e23) return false; const t25 = this.spatialReference, i32 = e2(e23.targetGeometry); return !!An(i32.spatialReference, t25) || this._projectionEngineLoaded; } set animation(e23) { const t25 = this._get("animation"); if (e23 === t25) return; if (t25 && t25.stop(), !e23 || e23.isFulfilled()) return void this._set("animation", null); this._set("animation", e23), this.frameTask.animationInProgress = true; const i32 = () => { e23 === this._get("animation") && (this._set("animation", null), this.frameTask.requestFrame()), this.frameTask.animationInProgress = false; }; e23.when(i32, i32); } get background() { return this.get("map.initialViewProperties.background") || null; } set background(e23) { e23 === void 0 ? this._clearOverride("background") : this._override("background", e23); } get center() { if (!this.ready) return this._get("center"); const { center: e23, spatialReference: t25 } = this.state.paddedViewState; return new j2({ x: e23[0], y: e23[1], spatialReference: t25 }); } set center(e23) { if (e23 == null) return; if (!this.ready) return this._set("center", e23), void this.notifyChange("initialExtentRequired"); let t25; try { t25 = this._project(e23, this.spatialReference); } catch (s30) { return void he.error(new s2("mapview:invalid-center", "could not project the value in the view's spatial reference", { input: e23, error: s30 })); } const i32 = this.viewpoint; xt(i32, i32, t25), this.viewpoint = i32; } set constraints(e23) { const t25 = this._get("constraints"); t25 && (this.handles.remove("map-view-constraints"), t25.destroy()), this._set("constraints", e23), e23 && (e23.view = this, this.ready && (this.state.viewpoint = e23.fit(this.state.paddedViewState.viewpoint)), this.handles.add(l4(() => e23.version, () => { this.ready && this.state && (this.state.viewpoint = e23.fit(this.state.paddedViewState.viewpoint)); }, U), "map-view-constraints")); } get extent() { return this.ready ? this.state.paddedViewState.extent.clone() : this._get("extent"); } set extent(e23) { if (e23 == null) return; if (!e23.width || !e23.height) return void he.error(new s2("mapview:invalid-extent", "invalid extent size")); if (!this.ready) return this._set("extent", e23), this._set("center", null), this._set("viewpoint", null), this._set("scale", 0), this._set("zoom", -1), void this.notifyChange("initialExtentRequired"); let t25; try { t25 = this._project(e23, this.spatialReference); } catch (s30) { return void he.error(new s2("mapview:invalid-extent", "could not project the value in the view's spatial reference", { error: s30 })); } const i32 = this.viewpoint; tt(i32, i32, t25, this.size, { constraints: this.constraints }), this.viewpoint = i32; } get padding() { return this.ready ? this.state.padding : this._get("padding"); } set padding(e23) { this.ready ? (this.state.padding = e23, this._set("padding", this.state.padding)) : this._set("padding", e23); } get resolution() { return this.state ? this.state.resolution : 0; } get rotation() { return this.ready ? this.state.rotation : this._get("rotation"); } set rotation(e23) { if (isNaN(e23)) return; if (!this.ready) return void this._set("rotation", e23); const t25 = this.viewpoint; wt(t25, t25, e23), this.viewpoint = t25; } get scale() { return this.ready ? this.state.scale : this._get("scale"); } set scale(e23) { if (!e23 || isNaN(e23)) return; if (!this.ready) { this._set("scale", e23), this._set("zoom", -1); const t26 = this._get("extent"); return t26 && (this._set("extent", null), this._set("center", t26.center)), void this.notifyChange("initialExtentRequired"); } const t25 = this.viewpoint; jt(t25, t25, e23), this.viewpoint = t25; } get stationary() { return !(this.animation || this.navigating || this.resizing || this._stationaryTimer); } get updating() { return !this.destroyed && (!this.layerViewManager || !this.labelManager || !this.graphicsView || this.layerViewManager.updating === true || this.labelManager.updating === true || this.graphicsView.updating === true || this.allLayerViews.some((e23) => !e23.destroyed && !("layerViews" in e23) && e23.updating === true)); } get viewpoint() { if (!this.ready) return this._get("viewpoint"); const e23 = this.state.paddedViewState; return e23 && e23.viewpoint.clone(); } set viewpoint(e23) { if (e23 == null) return; if (!this.ready) return this._set("viewpoint", e23), this._set("extent", null), this._set("center", null), this._set("zoom", -1), this._set("scale", 0), void this.notifyChange("initialExtentRequired"); let t25, s30; try { t25 = this._project(e23, this.spatialReference), !e23.scale || isNaN(e23.scale) ? s30 = new s2("mapview:invalid-viewpoint", `invalid scale value of ${e23.scale}`) : t(e23.targetGeometry) && (s30 = new s2("mapview:invalid-viewpoint", "geometry not defined")); } catch (a34) { s30 = new s2("mapview:invalid-viewpoint", "could not project the value in the view's spatial reference", { error: a34 }); } if (s30) return void he.error(s30); this._scaleBeforeChangingSpatialReference = null; const r24 = new u5({ targetGeometry: new j2(), scale: 0, rotation: 0 }); Z(r24, t25), this.constraints.constrain(r24, this.state.paddedViewState.viewpoint), this.state.viewpoint = r24, this.frameTask.requestFrame(), this._set("viewpoint", r24); } get zoom() { return this.ready ? this.constraints.scaleToZoom(this.scale) : this._get("zoom"); } set zoom(e23) { if (e23 == null) return; if (!this.ready) { this._set("zoom", e23), this._set("scale", 0); const t26 = this._get("extent"); return t26 && (this._set("extent", null), this._set("center", t26.center)), void this.notifyChange("initialExtentRequired"); } if (!this.constraints.effectiveLODs) return void this._set("zoom", -1); const t25 = this.viewpoint; jt(t25, t25, this.constraints.zoomToScale(e23)), this.viewpoint = t25, this._set("zoom", this.constraints.scaleToZoom(this.scale)); } get navigating() { return !(!this.mapViewNavigation || !this.mapViewNavigation.interacting); } goTo(e23, t25) { if (e23) return this.animation && (this.animation = null), this._createAnimation(), j4(() => this.ready, t25).then(() => { const i32 = { animate: true, ...t25 }, s30 = Y(e23, this); return this.animation.update(s30), this._gotoTask = {}, i32.animate ? this._gotoAnimated(s30, i32) : this._gotoImmediate(s30, i32); }); he.error("#goTo()", "target cannot be null or undefined"); } async hitTest(e23, t25) { const i32 = o21(e23) ? r19(this, e23) : e23; if (!this.ready || isNaN(i32.x) || isNaN(i32.y)) return { screenPoint: i32, results: [] }; let s30 = new Set(), r24 = false, n34 = null, a34 = null; t25?.include ? Te(t25.include, je(this, (e24) => s30.add(e24), (e24) => { n34 || (n34 = new Set()), n34.add(e24); }, (e24) => s30.add(e24), () => r24 = true)) : (r24 = true, s30 = new Set(this.allLayerViews)), t25?.exclude && Te(t25.exclude, je(this, (e24) => s30.delete(e24), (e24) => { a34 || (a34 = new Set()), a34.add(e24); })); const o30 = this.allLayerViews.filter((e24) => !e24.suspended && s30.has(e24)).reverse(), l27 = this.toMap(i32); let h19 = [...r24 ? this.graphicsView.hitTest(l27).map((e24) => ({ type: "graphic", graphic: e24, layer: null, mapPoint: l27 })) : [], ...await Promise.all(o30.map((e24) => e24.hitTest(l27, i32)).toArray())].filter(r).flat().filter(r); return n34 && (h19 = h19.filter((e24) => !("graphic" in e24) || !e24.graphic || n34.has(Se(e24.graphic)))), a34 && (h19 = h19.filter((e24) => !("graphic" in e24) || !e24.graphic || a34.has(Se(e24.graphic)))), { screenPoint: i32, results: h19 }; } async takeScreenshot(e23) { const t25 = this._createScreenshotPlan(e23), i32 = await this._stage.takeScreenshot(t25); return r10(i32, { format: t25.format, quality: t25.quality, rotation: 0, disableDecorations: false }, this._pixelFormat); } async _takeScreenshot(e23) { const t25 = this._createScreenshotPlan(e23), i32 = await this._stage.takeScreenshot(t25); return l7(i32, this._pixelFormat); } _createScreenshotPlan(e23) { e23 = e23 || {}; const t25 = this.supersampleScreenshotsEnabled ? Math.min(4, w3(this.size, Math.min(4096, this._stage.context.parameters.maxTextureSize))) : 1; let i32; e23.layers ? (i32 = [], e23.layers.forEach((e24) => { const t26 = this.allLayerViews.find((t27) => t27.layer.id === e24.id); t26 && "container" in t26 && t26.container && i32.push(t26.container); })) : i32 = this._stage.children; const { format: s30, quality: r24 } = s7(e23.format, e23.quality); return t24(e23, t25, this.size, this.padding, s30, r24, i32, e23.rotation); } get test() { return { takeScreenshot: (e23) => this._takeScreenshot(e23) }; } toMap(e23) { if (!this.ready) return null; const t25 = o21(e23) ? r19(this, e23) : e23, i32 = [0, 0], [s30, r24] = this.state.toMap(i32, [t25.x, t25.y]), n34 = this.spatialReference; return new j2({ x: s30, y: r24, spatialReference: n34 }); } toScreen(e23) { if (!this.ready) return null; const t25 = this._project(e23, this.spatialReference), i32 = [t25.x, t25.y]; return this.state.toScreen(i32, i32), c2(i32[0], i32[1]); } on(e23, t25, i32, s30) { const r24 = this.inputManager && this.viewEvents.on(e23, t25, i32, s30); return r24 || super.on(e23, t25); } hasEventListener(e23) { return super.hasEventListener(e23) || this.viewEvents.hasHandler(e23); } whenLayerView(e23) { return super.whenLayerView(e23); } graphicChanged(e23) { if (this.graphicsView) { this.graphicsView.graphicUpdateHandler(e23); } } whenReady() { return new Promise((e23) => { this.ready ? e23(this) : this._resolveWhenReady.push(e23); }); } forceDOMReadyCycle() { this.forceReadyCycle(); } getDefaultSpatialReference() { return this.map && "initialViewProperties" in this.map && this.map?.initialViewProperties?.spatialReference || this.defaultsFromMap?.spatialReference || null; } hasLayerViewModule(e23) { return n23.hasLayerViewModule(e23); } importLayerView(e23) { return n23.importLayerView(e23); } pixelSizeAt() { return this.ready ? this.state.resolution : (he.error("#pixelSizeAt()", "Map view cannot be used before it is ready"), null); } popupHitTest(e23) { return this.hitTest(e23).then((t25) => ({ ...t25, mapPoint: this.toMap(e23) })); } requestUpdate() { this.ready && this.frameTask.requestUpdate(); } validate() { let e23 = i29(this.type); return a("safari") && a("safari") < 9 && (e23 = new s2("mapview:browser-not-supported", "This browser is not supported by MapView (Safari < 9)", { type: "safari", requiredVersion: 9, detectedVersion: a("safari") })), r(e23) ? (he.warn("#validate()", e23.message), Promise.reject(e23)) : ye2(); } _createAnimation() { return this.animation && !this.animation.done || (this.animation = new n22()), this.animation; } _cancellableGoTo(e23, t25, i32) { const s30 = () => e23 === this._gotoTask, r24 = i32.then(() => { s30() && (this.animation = null); }).catch((e24) => { throw s30() && (this.animation = null, t25.done || (t25.stop(), this.frameTask.animationInProgress = false)), e24; }), n34 = new Promise((e24) => e24(r24)); return t25.when().catch(() => { s30() && n34.cancel && n34.cancel(); }), n34; } _gotoImmediate(e23, t25) { const i32 = this._gotoTask, s30 = this.animation, r24 = e23.then((e24) => { if (f(t25), i32 !== this._gotoTask) throw new s2("view:goto-interrupted", "Goto was interrupted"); this.viewpoint = s30.target = e24, s30.finish(); }); return this._cancellableGoTo(i32, s30, r24); } _flipStationary(e23) { return this._stationaryTimer !== null || (this._stationaryTimer = setTimeout(() => { this._stationaryTimer = null; const e24 = performance.now() - this._lastStationaryEventTimestamp; e24 < we && (this._stationaryTimer = this._flipStationary(e24)); }, e23)), this._stationaryTimer; } _getDefaultViewpoint() { const { constraints: e23, initialExtent: t25, map: s30, padding: r24, size: n34 } = this; if (!e23) return null; const a34 = s30 && "initialViewProperties" in s30 && s30.initialViewProperties, o30 = { zoom: this._get("zoom"), scale: this._get("scale"), center: this._get("center"), extent: this._get("extent"), rotation: this._get("rotation"), viewpoint: this._get("viewpoint"), spatialReference: this._userSpatialReference }; e23.effectiveLODs ? o30.zoom !== -1 && (o30.scale = e23.zoomToScale(o30.zoom)) : o30.zoom = -1; let l27 = null, c42 = null, d20 = 0; const u23 = o30.viewpoint && o30.viewpoint.rotation, m29 = o30.viewpoint && o30.viewpoint.targetGeometry; r(m29) && (m29.type === "extent" ? l27 = m29 : m29.type === "point" && (c42 = m29, d20 = o30.viewpoint.scale)); const g20 = o30.extent || l27 || e2(a34?.viewpoint?.targetGeometry)?.extent || t25, f14 = o30.center || c42 || g20?.center, y17 = o30.scale || d20 || a34?.viewpoint?.scale || g20 && H(g20, [n34[0] - r24.left - r24.right, n34[1] - r24.top - r24.bottom]), w13 = o30.rotation || u23 || a34?.viewpoint?.rotation || 0; return f14 && y17 ? new u5({ targetGeometry: f14, scale: y17, rotation: w13 }) : null; } _gotoAnimated(e23, t25) { const i32 = this._gotoTask, s30 = this.animation, r24 = e23.then((e24) => { if (f(t25), i32 !== this._gotoTask) throw new s2("view:goto-interrupted", "Goto was interrupted"); return s30.update(e24), this.animationManager.animate(s30, this.viewpoint, t25), s30.when().then(() => { }, () => { }); }); return this._cancellableGoTo(i32, s30, r24); } _project(e23, t25) { const i32 = e23 && e23.targetGeometry || e23; if (!t25) return e23; if (!i32) return null; if (t25.imageCoordinateSystem || i32.spatialReference?.imageCoordinateSystem) return e23; if (E2(t25, i32.spatialReference)) return e23; const s30 = rn(i32, t25); if (!s30) throw new s2("mapview:projection-not-possible", "projecting input geometry to target spatial reference returned a null value", { geometry: i32, spatialReference: t25 }); return _e(e23) ? (e23.targetGeometry = s30, e23) : s30; } _resizeHandler(e23) { if (!this.ready) return; const t25 = this.state; let i32 = this.state.paddedViewState.viewpoint; const s30 = this.state.paddedViewState.size.concat(); t25.size = [e23.width, e23.height], ht(i32, i32, s30, this.state.paddedViewState.size, this.resizeAlign), i32 = this.constraints.constrain(i32, null), this.state.viewpoint = i32; } _startup() { this.timeline.begin("MapView Startup"); const e23 = this._getDefaultViewpoint(), t25 = e23.targetGeometry; try { this._project(e23, this.spatialReference); } catch (o30) { he.warn(new t2("mapview:startup-projection-error", "projection of initial viewpoint to the view's spatial reference, defaulting to the initial viewpoint.", { center: t25.toJSON(), spatialReference: this.spatialReference, error: o30 })), e23.targetGeometry = this.defaultsFromMap.extent?.center || new j2({ x: 0, y: 0, spatialReference: this.spatialReference }); } this.constraints?.fit(e23), this._set("state", new g15({ padding: this._get("padding"), size: this.size, viewpoint: e23 })), this.graphics.owner = this; const i32 = new ce2(this.surface, { canvas: this.renderCanvas, supersampleScreenshots: this.supersampleScreenshotsEnabled, contextOptions: { disabledExtensions: this.deactivatedWebGLExtensions, debugWebGLExtensions: this.debugWebGLExtensions }, renderingOptions: this.renderingOptions, timeline: this.timeline }); this._stage = i32, this._magnifierView = new fe2(), this._magnifierView.magnifier = this.magnifier; const s30 = new me2({ view: this }); this._set("labelManager", s30); const r24 = new d13({ view: this }); this._set("animationManager", r24); const n34 = new ge({ view: this, animationManager: r24 }); this._set("mapViewNavigation", n34), this._setupSpatialReferenceDependentProperties(), this.handles.add([this.rootLayerViews.on("change", () => this._updateStageChildren()), i32.on("post-render", () => this._set("rendering", i32.renderRequested)), i32.on("will-render", () => this._set("rendering", i32.renderRequested)), i32.on("webgl-error", (e24) => this.fatalError = e24.error), l4(() => this.stationary, (e24) => i32.stationary = e24, w), l4(() => this.background, (e24) => { i32.background = e24, this._magnifierView.background = e24; }, w), l4(() => this.magnifier, (e24) => this._magnifierView.magnifier = e24, w), l4(() => this.renderingOptions, (e24) => i32.renderingOptions = e24, w), l4(() => this.highlightOptions, (e24) => i32.highlightOptions = e24, w), l4(() => this.state.id, () => i32.state = this.state, w)], "map-view"), this._updateStageChildren(); const a34 = this._resolveWhenReady; this._resolveWhenReady = [], a34.forEach((e24) => e24(this)), this.timeline.end("MapView Startup"), this.frameTask && this.frameTask.start(), this._set("ready", true); } _teardown() { this._destroySpatialReferenceDependentProperties(), this.handles.remove("map-view"), this.mapViewNavigation.destroy(), this._set("mapViewNavigation", null), this.animationManager.destroy(), this._set("animationManager", null), this.layerViewManager.clear(), this.labelManager.destroy(), this._magnifierView.destroy(), this._stage.destroy(), this._stage = null, this._set("graphicsView", null), this._magnifierView = null, this._set("labelManager", null), this._set("mapViewNavigation", null), this.graphics.owner = null, this.frameTask && this.frameTask.stop(), this._stationaryTimer && (clearTimeout(this._stationaryTimer), this._stationaryTimer = null), this._set("ready", false); const { center: [e23, t25], spatialReference: i32, rotation: s30, scale: r24 } = this.state.paddedViewState, n34 = new j2({ x: e23, y: t25, spatialReference: i32 }); this._set("viewpoint", null), this._set("extent", null), this._set("center", n34), this._set("zoom", -1), this._set("rotation", s30), this._set("scale", r24), this._set("spatialReference", i32), this._set("state", null), this.animation = null; } _updateStageChildren() { this._stage.removeAllChildren(), this.rootLayerViews.forEach((e24) => { this._stage.addChild(e24.container); }); const e23 = this.graphicsView; this._stage.addChild(e23.container), this._stage.addChild(this._magnifierView); } _setupSpatialReferenceDependentProperties() { const e23 = new h5(S2.create({ spatialReference: this.spatialReference, size: 512, numLODs: 36 })); this._set("featuresTilingScheme", e23); const t25 = new de3({ view: this, graphics: this.graphics, requestUpdateCallback: () => this.requestUpdate(), container: new ue2(e23) }); this.frameTask.graphicsView = t25, this._set("graphicsView", t25); } _destroySpatialReferenceDependentProperties() { const e23 = this.graphicsView; this._set("graphicsView", null), this.frameTask.graphicsView = null, e23.destroy(), this._set("featuresTilingScheme", null); } _spatialReferenceChanged(e23) { if (!this.ready) return; this.frameTask.stop(); for (const i32 of this.allLayerViews) i32.processDetach(); this._destroySpatialReferenceDependentProperties(); const t25 = this.state.paddedViewState.clone(); if (t(this._scaleBeforeChangingSpatialReference)) this._scaleBeforeChangingSpatialReference = t25.scale; else { const e24 = t25.viewpoint.clone(); e24.scale = this._scaleBeforeChangingSpatialReference, t25.viewpoint = e24; } const s30 = t25.clone(), [r24, n34] = t25.center; let o30 = null; try { o30 = this._project(new j2({ x: r24, y: n34, spatialReference: t25.spatialReference }), e23); } catch (p36) { en() || he.warn(new t2("mapview:spatial-reference-change", "could not project the view's center to the new spatial reference", { center: o30.toJSON(), spatialReference: e23, error: p36 })); } o30 || (o30 = new j2({ x: 0, y: 0, spatialReference: e23 })); const l27 = xt(new u5({ targetGeometry: new j2(), scale: 0, rotation: 0 }), t25.viewpoint, o30); s30.viewpoint = l27; try { const i32 = 20, r25 = [t25.size[0] / 2, t25.size[1] / 2], n35 = [r25[0] + i32, r25[1]], o31 = t25.toMap([0, 0], n35), { x: p36, y: h19 } = this._project(new j2({ x: o31[0], y: o31[1], spatialReference: t25.spatialReference }), e23); o31[0] = p36, o31[1] = h19, s30.toScreen(o31, o31); const c42 = pt(r25, o31, n35), d20 = Math.hypot(o31[0] - r25[0], o31[1] - r25[1]) / i32; !Number.isFinite(d20) || Math.abs(d20) > 4 ? (l27.rotation = 0, l27.targetGeometry = new j2({ x: 0, y: 0, spatialReference: e23 })) : (l27.scale *= d20, l27.scale > a("mapview-srswitch-adjust-rotation-scale-threshold") ? l27.rotation = 0 : l27.rotation += Number.isFinite(c42) ? c42 : 0); } catch { } this._get("constraints").constrain(l27, null), this._get("state").viewpoint = l27, this._stage.state = this.state, this._setupSpatialReferenceDependentProperties(); for (const i32 of this.allLayerViews) i32.processAttach(); this.frameTask.requestFrame(), this.frameTask.start(), this._updateStageChildren(); } }; ve.type = "2d", e([d({ readOnly: true })], ve.prototype, "animationManager", void 0), e([d({ constructOnly: true })], ve.prototype, "deactivatedWebGLExtensions", void 0), e([d({ constructOnly: true })], ve.prototype, "debugWebGLExtensions", void 0), e([d({ readOnly: true })], ve.prototype, "featuresTilingScheme", void 0), e([d({ readOnly: true })], ve.prototype, "fullOpacity", void 0), e([d({ readOnly: true })], ve.prototype, "graphicsTileStore", null), e([d()], ve.prototype, "graphicsView", void 0), e([d({ readOnly: true })], ve.prototype, "state", void 0), e([d()], ve.prototype, "initialExtentRequired", null), e([d()], ve.prototype, "labelManager", void 0), e([d({ readOnly: true })], ve.prototype, "resourceManager", null), e([d({ readOnly: true })], ve.prototype, "textureManager", null), e([d({ readOnly: true })], ve.prototype, "mapViewNavigation", void 0), e([d({ constructOnly: true })], ve.prototype, "renderCanvas", void 0), e([d()], ve.prototype, "renderingOptions", void 0), e([d({ readOnly: true })], ve.prototype, "rendering", void 0), e([d({ constructOnly: true })], ve.prototype, "supersampleScreenshotsEnabled", void 0), e([d({ readOnly: true })], ve.prototype, "supportsGround", void 0), e([d()], ve.prototype, "_stationaryTimer", void 0), e([d()], ve.prototype, "_defaultsFromMapSettings", null), e([d()], ve.prototype, "_pePromise", void 0), e([d({ readOnly: true })], ve.prototype, "typeSpecificPreconditionsReady", null), e([d()], ve.prototype, "animation", null), e([d({ type: m28 })], ve.prototype, "background", null), e([d({ value: null, type: j2, dependsOn: ["state.id", "ready"] })], ve.prototype, "center", null), e([d({ type: y14 })], ve.prototype, "constraints", null), e([d({ value: null, type: M2, dependsOn: ["state.id", "ready"] })], ve.prototype, "extent", null), e([d()], ve.prototype, "floors", void 0), e([d({ type: c35 })], ve.prototype, "highlightOptions", void 0), e([d({ readOnly: true })], ve.prototype, "inputManager", void 0), e([d()], ve.prototype, "map", void 0), e([d({ value: { top: 0, right: 0, bottom: 0, left: 0 }, cast: (e23) => ({ top: 0, right: 0, bottom: 0, left: 0, ...e23 }) })], ve.prototype, "padding", null), e([d()], ve.prototype, "resizeAlign", void 0), e([d({ readOnly: true, dependsOn: ["state.id"] })], ve.prototype, "resolution", null), e([d({ value: 0, type: Number, dependsOn: ["state.id", "ready"] })], ve.prototype, "rotation", null), e([d({ value: 0, type: Number, dependsOn: ["state.id", "ready"] })], ve.prototype, "scale", null), e([d({ constructOnly: true })], ve.prototype, "spatialReferenceLocked", void 0), e([d()], ve.prototype, "stationary", null), e([d({ type: e10, readOnly: true })], ve.prototype, "timeline", void 0), e([d({ readOnly: true })], ve.prototype, "type", void 0), e([d({ readOnly: true })], ve.prototype, "updating", null), e([d({ value: null, type: u5, dependsOn: ["state.id", "ready"] })], ve.prototype, "viewpoint", null), e([d({ value: -1, dependsOn: ["state.id", "ready"] })], ve.prototype, "zoom", null), e([d({ type: Boolean })], ve.prototype, "navigating", null), e([d({ type: p34 })], ve.prototype, "ui", void 0), ve = e([n3("esri.views.MapView")], ve); var Ve = ve; function Se(e23) { const t25 = e23.getObjectId(); return t25 ? `${e23.layer?.uid ?? e23.sourceLayer?.uid ?? "MapView"}/${t25}` : `"MapView/${e23.uid}`; } function je(e23, i32, s30, r24, n34) { return (a34) => { if (a34 instanceof g2) { if (a34.layer === e23) n34?.(); else { const t25 = e23.allLayerViews.find((e24) => e24.layer === a34.layer); t25 && r24?.(t25); } s30(Se(a34)); } else { const t25 = e23.allLayerViews.find((e24) => e24.layer === a34); t25 && i32(t25); } }; } function Te(e23, t25) { if (e23) if (t3(e23)) for (const i32 of e23) if (t3(i32)) for (const e24 of i32) t25(e24); else t25(i32); else t25(e23); } // dep:@arcgis_core_views_MapView var arcgis_core_views_MapView_default = Ve; export { arcgis_core_views_MapView_default as default }; //# sourceMappingURL=@arcgis_core_views_MapView.js.map