import { s3 as s } from "./chunk-E5O6P5I2.js"; import { has } from "./chunk-SPWQ3AWG.js"; import { h, r, t, x } from "./chunk-YXWMMD76.js"; // node_modules/@arcgis/core/core/deprecate.js var n = /* @__PURE__ */ new Set(); function e(e4, i2, o3 = false) { o3 && n.has(i2) || (o3 && n.add(i2), e4.warn(`\u{1F6D1} DEPRECATED - ${i2}`)); } function t2(n2, e4, i2 = {}) { if (has("esri-deprecation-warnings")) { const { moduleName: o3 } = i2; r2(n2, `Property: ${(o3 ? o3 + "::" : "") + e4}`, i2); } } function r2(n2, i2, o3 = {}) { if (has("esri-deprecation-warnings")) { const { replacement: t5, version: r4, see: s3, warnOnce: a2 } = o3; let c = i2; t5 && (c += ` \u{1F6E0}\uFE0F Replacement: ${t5}`), r4 && (c += ` \u2699\uFE0F Version: ${r4}`), s3 && (c += ` \u{1F517} See ${s3} for more details.`), e(n2, c, a2); } } // node_modules/@arcgis/core/core/clock.js function e2(e4) { return { setTimeout: (t5, o3) => { const r4 = e4.setTimeout(t5, o3); return { remove: () => e4.clearTimeout(r4) }; } }; } var t3 = e2(globalThis); // node_modules/@arcgis/core/core/events.js function e3(e4) { return e4 && ("function" == typeof e4.on || "function" == typeof e4.addEventListener); } function r3(r4, t5, n2) { if (!e3(r4)) throw new TypeError("target is not a Evented or EventTarget object"); if ("on" in r4) return r4.on(t5, n2); if (Array.isArray(t5)) { const e4 = t5.slice(); for (const t6 of e4) r4.addEventListener(t6, n2); return { remove() { for (const t6 of e4) r4.removeEventListener(t6, n2); } }; } return r4.addEventListener(t5, n2), { remove() { r4.removeEventListener(t5, n2); } }; } function t4(t5, n2, o3) { if (!e3(t5)) throw new TypeError("target is not a Evented or EventTarget object"); if ("once" in t5) return t5.once(n2, o3); const i2 = r3(t5, n2, (e4) => { i2.remove(), o3.call(t5, e4); }); return { remove() { i2.remove(); } }; } var o = { Win: "Meta", Scroll: "ScrollLock", Spacebar: " ", Down: "ArrowDown", Left: "ArrowLeft", Right: "ArrowRight", Up: "ArrowUp", Del: "Delete", Apps: "ContextMenu", Esc: "Escape", Multiply: "*", Add: "+", Subtract: "-", Decimal: ".", Divide: "/" }; function i({ key: e4 }) { return o[e4] || e4; } // node_modules/@arcgis/core/core/promiseUtils.js function a(t5 = "Aborted") { return new s("AbortError", t5); } function f(t5, e4 = "Aborted") { if (p(t5)) throw a(e4); } function h2(t5) { return r(t5) ? "aborted" in t5 ? t5 : t5.signal : t5; } function p(t5) { const e4 = h2(t5); return r(e4) && e4.aborted; } function w(t5) { if (j(t5)) throw t5; } function b(t5) { if (!j(t5)) throw t5; } function v(t5, e4) { const r4 = h2(t5); if (!t(r4)) { if (!r4.aborted) return t4(r4, "abort", () => e4()); e4(); } } function d(t5, e4) { const r4 = h2(t5); if (!t(r4)) return f(r4), t4(r4, "abort", () => e4(a())); } function y(t5, e4) { const r4 = h2(e4); return t(r4) ? t5 : new Promise((r5, n2) => { let o3 = v(e4, () => n2(a())); const i2 = () => o3 = h(o3); t5.then(i2, i2), t5.then(r5, n2); }); } function j(t5) { return "AbortError" === (t5 == null ? void 0 : t5.name); } async function g(t5) { try { return await t5; } catch (e4) { if (!j(e4)) throw e4; return; } } function A() { let t5 = null; const e4 = new Promise((e5, r4) => { t5 = { promise: void 0, resolve: e5, reject: r4 }; }); return t5.promise = e4, t5; } async function E(t5) { if (!t5) return; if ("function" != typeof t5.forEach) { const e5 = Object.keys(t5), r4 = e5.map((e6) => t5[e6]), n2 = await E(r4), o3 = {}; return e5.map((t6, e6) => o3[t6] = n2[e6]), o3; } const e4 = t5; return new Promise((t6) => { const r4 = []; let n2 = e4.length; 0 === n2 && t6(r4), e4.forEach((e5) => { const o3 = { promise: e5 || Promise.resolve(e5) }; r4.push(o3), o3.promise.then((t7) => { o3.value = t7; }).catch((t7) => { o3.error = t7; }).then(() => { --n2, 0 === n2 && t6(r4); }); }); }); } async function L(t5) { return (await E(t5)).filter((t6) => !!t6.value).map((t6) => t6.value); } function U(t5, e4, r4) { const n2 = new AbortController(); return v(r4, () => n2.abort()), new Promise((r5, o3) => { let i2 = setTimeout(() => { i2 = 0, r5(e4); }, t5); v(n2, () => { i2 && (clearTimeout(i2), o3(a())); }); }); } function C(t5) { return t5 && "function" == typeof t5.then; } function $(t5) { return C(t5) ? t5 : Promise.resolve(t5); } function x2(t5, e4 = -1) { let r4, n2, o3, i2, s3 = null; const c = (...l) => { if (r4) { n2 = l, i2 && i2.reject(a()), i2 = A(); const t6 = x(i2.promise); if (s3) { const t7 = s3; s3 = null, t7.abort(); } return t6; } if (o3 = i2 || A(), i2 = null, e4 > 0) { const n3 = new AbortController(); r4 = $(t5(...l, n3.signal)); const o4 = r4; U(e4).then(() => { r4 === o4 && (i2 ? n3.abort() : s3 = n3); }); } else r4 = 1, r4 = $(t5(...l)); const m = () => { const t6 = n2; n2 = o3 = r4 = s3 = null, null != t6 && c(...t6); }, f2 = r4, h3 = o3; return f2.then(m, m), f2.then(h3.resolve, h3.reject), x(h3.promise); }; return c; } function D() { let e4, r4; const n2 = new Promise((t5, n3) => { e4 = t5, r4 = n3; }), o3 = (t5) => { e4(t5); }; return o3.resolve = (t5) => e4(t5), o3.reject = (t5) => r4(t5), o3.timeout = (e5, r5) => t3.setTimeout(() => o3.reject(r5), e5), o3.promise = n2, o3; } async function O(t5) { await Promise.resolve(), f(t5); } export { t3 as t, t2, r2 as r, e3 as e, r3 as r2, i, a, f, p, w, b, v, d, y, j, g, A, E, L, U, C, $, x2 as x, D, O }; //# sourceMappingURL=chunk-V6P2MAQQ.js.map