(self.webpackChunkRemoteClient = self.webpackChunkRemoteClient || []).push([
  [5181],
  {
    56761: (e, t, i) => {
      'use strict';
      i.d(t, { B: () => p, F: () => f });
      var n = i(60991),
        s = i(76996),
        r = i(92143),
        o = i(76506),
        a = i(53326),
        l = i(92482),
        d = i(40267),
        u = i(88994),
        h = i(44722);
      const c = { minX: 0, minY: 0, maxX: 0, maxY: 0 };
      class p {
        constructor() {
          (this._indexInvalid = !1),
            (this._boundsToLoad = []),
            (this._boundsById = new Map()),
            (this._idByBounds = new Map()),
            (this._index = new u.P(
              9,
              (0, o.h)('csp-restrictions')
                ? (e) => ({ minX: e[0], minY: e[1], maxX: e[2], maxY: e[3] })
                : ['[0]', '[1]', '[2]', '[3]'],
            )),
            (this._loadIndex = () => {
              if (this._indexInvalid) {
                const e = new Array(this._idByBounds.size);
                let t = 0;
                this._idByBounds.forEach((i, n) => {
                  e[t++] = n;
                }),
                  (this._indexInvalid = !1),
                  this._index.clear(),
                  this._index.load(e);
              } else
                this._boundsToLoad.length &&
                  (this._index.load(this._boundsToLoad.filter((e) => this._idByBounds.has(e))),
                  (this._boundsToLoad.length = 0));
            });
        }
        clear() {
          (this._indexInvalid = !1),
            (this._boundsToLoad.length = 0),
            this._boundsById.clear(),
            this._idByBounds.clear(),
            this._index.clear();
        }
        delete(e) {
          const t = this._boundsById.get(e);
          this._boundsById.delete(e),
            t && (this._idByBounds.delete(t), this._indexInvalid || this._index.remove(t));
        }
        forEachInBounds(e, t) {
          this._loadIndex(),
            (function (e, t, i) {
              (c.minX = t[0]), (c.minY = t[1]), (c.maxX = t[2]), (c.maxY = t[3]), e.search(c, i);
            })(this._index, e, (e) => t(this._idByBounds.get(e)));
        }
        get(e) {
          return this._boundsById.get(e);
        }
        has(e) {
          return this._boundsById.has(e);
        }
        invalidateIndex() {
          this._indexInvalid || ((this._indexInvalid = !0), (this._boundsToLoad.length = 0));
        }
        set(e, t) {
          if (!this._indexInvalid) {
            const t = this._boundsById.get(e);
            t && (this._index.remove(t), this._idByBounds.delete(t));
          }
          this._boundsById.set(e, t),
            t &&
              (this._idByBounds.set(t, e),
              this._indexInvalid ||
                (this._boundsToLoad.push(t), this._boundsToLoad.length > 5e4 && this._loadIndex()));
        }
      }
      class f {
        constructor(e) {
          (this.geometryInfo = e),
            (this._boundsStore = new p()),
            (this._featuresById = new Map()),
            (this._markedIds = new Set()),
            (this.events = new s.E()),
            (this.featureAdapter = h.o);
        }
        get geometryType() {
          return this.geometryInfo.geometryType;
        }
        get hasM() {
          return this.geometryInfo.hasM;
        }
        get hasZ() {
          return this.geometryInfo.hasZ;
        }
        get numFeatures() {
          return this._featuresById.size;
        }
        get fullBounds() {
          if (!this.numFeatures) return null;
          const e = (0, l.a)(l.N);
          return (
            this._featuresById.forEach((t) => {
              const i = this._boundsStore.get(t.objectId);
              i &&
                ((e[0] = Math.min(i[0], e[0])),
                (e[1] = Math.min(i[1], e[1])),
                (e[2] = Math.max(i[2], e[2])),
                (e[3] = Math.max(i[3], e[3])));
            }),
            e
          );
        }
        get storeStatistics() {
          let e = 0;
          return (
            this._featuresById.forEach((t) => {
              t.geometry && t.geometry.coords && (e += t.geometry.coords.length);
            }),
            {
              featureCount: this._featuresById.size,
              vertexCount: e / (this.hasZ ? (this.hasM ? 4 : 3) : this.hasM ? 3 : 2),
            }
          );
        }
        add(e) {
          this._add(e), this._emitChanged();
        }
        addMany(e) {
          for (const t of e) this._add(t);
          this._emitChanged();
        }
        clear() {
          this._featuresById.clear(), this._boundsStore.clear(), this._emitChanged();
        }
        removeById(e) {
          const t = this._featuresById.get(e);
          return t ? (this._remove(t), this._emitChanged(), t) : null;
        }
        removeManyById(e) {
          this._boundsStore.invalidateIndex();
          for (const t of e) {
            const e = this._featuresById.get(t);
            e && this._remove(e);
          }
          this._emitChanged();
        }
        forEachBounds(e, t, i) {
          for (const n of e) {
            const e = this._boundsStore.get(n.objectId);
            e && t((0, a.C)(i, e));
          }
        }
        getFeature(e) {
          return this._featuresById.get(e);
        }
        has(e) {
          return this._featuresById.has(e);
        }
        forEach(e) {
          this._featuresById.forEach((t) => e(t));
        }
        forEachInBounds(e, t) {
          this._boundsStore.forEachInBounds(e, (e) => {
            t(this._featuresById.get(e));
          });
        }
        startMarkingUsedFeatures() {
          this._boundsStore.invalidateIndex(), this._markedIds.clear();
        }
        sweep() {
          let e = !1;
          this._featuresById.forEach((t, i) => {
            this._markedIds.has(i) || ((e = !0), this._remove(t));
          }),
            this._markedIds.clear(),
            e && this._emitChanged();
        }
        _emitChanged() {
          this.events.emit('changed', void 0);
        }
        _add(e) {
          if (!e) return;
          const t = e.objectId;
          if (null == t)
            return void r.L.getLogger('esri.layers.graphics.data.FeatureStore').error(
              new n.Z('featurestore:invalid-feature', 'feature id is missing', { feature: e }),
            );
          const i = this._featuresById.get(t);
          let s;
          if (
            (this._markedIds.add(t),
            i
              ? ((e.displayId = i.displayId),
                (s = this._boundsStore.get(t)),
                this._boundsStore.delete(t))
              : (0, o.i)(this.onFeatureAdd) && this.onFeatureAdd(e),
            !e.geometry || !e.geometry.coords || !e.geometry.coords.length)
          )
            return this._boundsStore.set(t, null), void this._featuresById.set(t, e);
          (s = (0, d.g)(
            s || (0, l.a)(),
            e.geometry,
            this.geometryInfo.hasZ,
            this.geometryInfo.hasM,
          )),
            this._boundsStore.set(t, s),
            this._featuresById.set(t, e);
        }
        _remove(e) {
          return (
            (0, o.i)(this.onFeatureRemove) && this.onFeatureRemove(e),
            this._markedIds.delete(e.objectId),
            this._boundsStore.delete(e.objectId),
            this._featuresById.delete(e.objectId),
            e
          );
        }
      }
    },
    65181: (e, t, i) => {
      'use strict';
      i.r(t), i.d(t, { default: () => _ });
      var n = i(82058),
        s = i(60991),
        r = i(32422),
        o = i(60947),
        a = i(40267),
        l = i(56761),
        d = i(24251),
        u = i(50815),
        h = i(90995),
        c = i(4571),
        p = i(77358),
        f = i(1709),
        m = i(54732),
        y = i(14249);
      i(31450),
        i(76506),
        i(71552),
        i(88762),
        i(32101),
        i(92143),
        i(40642),
        i(81172),
        i(50406),
        i(21801),
        i(34250),
        i(91306),
        i(86656),
        i(22723),
        i(17533),
        i(73796),
        i(74673),
        i(21972),
        i(23639),
        i(91055),
        i(27794),
        i(6906),
        i(26341),
        i(97714),
        i(2906),
        i(91597),
        i(86787),
        i(35132),
        i(89623),
        i(84069),
        i(44567),
        i(98380),
        i(92896),
        i(76996),
        i(53326),
        i(92482),
        i(88994),
        i(98576),
        i(44722),
        i(72334),
        i(82426),
        i(53785),
        i(57251),
        i(95587),
        i(65775),
        i(12381),
        i(73173),
        i(92624),
        i(77314),
        i(91700),
        i(95533),
        i(94751),
        i(74569),
        i(22781),
        i(30831),
        i(72274),
        i(5777),
        i(89219),
        i(71435),
        i(19124),
        i(7176),
        i(60217),
        i(14172),
        i(20438),
        i(40705),
        i(60599),
        i(15324),
        i(10401),
        i(22739),
        i(20543),
        i(91162),
        i(41864),
        i(49900),
        i(66284),
        i(33921),
        i(3482),
        i(67477),
        i(78533),
        i(74653),
        i(91091),
        i(58943),
        i(56420),
        i(74742),
        i(28239),
        i(88610),
        i(6941),
        i(9801),
        i(53523),
        i(59465),
        i(42911),
        i(46826),
        i(45433);
      const g = {
          hasAttachments: !1,
          capabilities: 'query, editing, create, delete, update',
          useStandardizedQueries: !0,
          supportsCoordinatesQuantization: !0,
          supportsReturningQueryGeometry: !0,
          advancedQueryCapabilities: {
            supportsQueryAttachments: !1,
            supportsStatistics: !0,
            supportsPercentileStatistics: !0,
            supportsReturningGeometryCentroid: !0,
            supportsQueryWithDistance: !0,
            supportsDistinct: !0,
            supportsReturningQueryExtent: !0,
            supportsReturningGeometryProperties: !1,
            supportsHavingClause: !0,
            supportsOrderBy: !0,
            supportsPagination: !0,
            supportsQueryWithResultType: !1,
            supportsSqlExpression: !0,
            supportsDisjointSpatialRel: !0,
          },
        },
        _ = class {
          constructor() {
            this._queryEngine = null;
          }
          destroy() {
            this._queryEngine && this._queryEngine && this._queryEngine.destroy(),
              (this._queryEngine = this._requiredFields = this._fieldsIndex = this._createDefaultAttributes = null);
          }
          async load(e) {
            const t = [];
            await this._checkProjection(e.spatialReference);
            let i = null;
            e.url &&
              ((i = (await (0, n.default)(e.url, { responseType: 'json' })).data),
              await (0, h.v)(i));
            const r = (0, h.i)(i, { geometryType: e.geometryType }),
              p = e.fields || r.fields || [],
              _ = null != e.hasZ ? e.hasZ : r.hasZ,
              I = r.geometryType,
              b =
                e.objectIdField ||
                ('number' === r.objectIdFieldType ? r.objectIdFieldName : 'OBJECTID') ||
                'OBJECTID',
              x = e.spatialReference || o.W;
            let F = e.timeInfo;
            if (!I)
              throw new s.Z(
                'geojson-layer:missing-property',
                "geometryType not set and couldn't be inferred from the provided features",
              );
            if (
              ('string' === r.objectIdFieldType &&
                t.push({
                  name: 'geojson-layer:unsupported-id-type',
                  message: "Feature ids are of type string and can't be honored.",
                }),
              p === r.fields &&
                r.unknownFields.length > 0 &&
                t.push({
                  name: 'geojson-layer:unknown-field-types',
                  message:
                    "Some fields types couldn't be inferred from the features and were dropped",
                  details: { unknownFields: r.unknownFields },
                }),
              b)
            ) {
              let e = null;
              p.some((t) => t.name === b && ((e = t), !0))
                ? ((e.type = 'esriFieldTypeOID'), (e.editable = !1), (e.nullable = !1))
                : p.unshift({
                    alias: b,
                    name: b,
                    type: 'esriFieldTypeOID',
                    editable: !1,
                    nullable: !1,
                  });
            }
            for (const e of p) {
              if (
                (null == e.name && (e.name = e.alias),
                null == e.alias && (e.alias = e.name),
                !e.name)
              )
                throw new s.Z('geojson-layer:invalid-field-name', 'field name is missing', {
                  field: e,
                });
              if (
                (e.name === b && (e.type = 'esriFieldTypeOID'),
                -1 === m.k.jsonValues.indexOf(e.type))
              )
                throw new s.Z(
                  'geojson-layer:invalid-field-type',
                  `invalid type for field "${e.name}"`,
                  { field: e },
                );
            }
            const S = {};
            this._requiredFields = [];
            for (const e of p)
              if ('esriFieldTypeOID' !== e.type && 'esriFieldTypeGlobalID' !== e.type) {
                (e.editable = null == e.editable || !!e.editable),
                  (e.nullable = null == e.nullable || !!e.nullable);
                const t = (0, y.os)(e);
                e.nullable || void 0 !== t ? (S[e.name] = t) : this._requiredFields.push(e);
              }
            if (((this._fieldsIndex = new f.Z(p)), F)) {
              if (F.startTimeField) {
                const e = this._fieldsIndex.get(F.startTimeField);
                e
                  ? ((F.startTimeField = e.name), (e.type = 'esriFieldTypeDate'))
                  : (F.startTimeField = null);
              }
              if (F.endTimeField) {
                const e = this._fieldsIndex.get(F.endTimeField);
                e
                  ? ((F.endTimeField = e.name), (e.type = 'esriFieldTypeDate'))
                  : (F.endTimeField = null);
              }
              if (F.trackIdField) {
                const e = this._fieldsIndex.get(F.trackIdField);
                e
                  ? (F.trackIdField = e.name)
                  : ((F.trackIdField = null),
                    t.push({
                      name: 'geojson-layer:invalid-timeInfo-trackIdField',
                      message: 'trackIdField is missing',
                      details: { timeInfo: F },
                    }));
              }
              F.startTimeField ||
                F.endTimeField ||
                (t.push({
                  name: 'geojson-layer:invalid-timeInfo',
                  message: 'startTimeField and endTimeField are missing',
                  details: { timeInfo: F },
                }),
                (F = null));
            }
            const B = {
              warnings: t,
              featureErrors: [],
              layerDefinition: {
                ...g,
                drawingInfo: (0, c.a)(I),
                templates: (0, c.b)(S),
                extent: null,
                geometryType: I,
                objectIdField: b,
                fields: p,
                hasZ: !!_,
                timeInfo: F,
              },
            };
            (this._queryEngine = new u.Q({
              fields: p,
              geometryType: I,
              hasM: !1,
              hasZ: _,
              objectIdField: b,
              spatialReference: x,
              timeInfo: F,
              featureStore: new l.F({ geometryType: I, hasM: !1, hasZ: _ }),
              cacheSpatialQueries: !0,
            })),
              (this._createDefaultAttributes = (0, c.d)(S, b)),
              (this._nextObjectId = r.maxObjectId + 1);
            const w = (0, h.c)(i, {
              geometryType: I,
              hasZ: _,
              objectIdField: 'number' === r.objectIdFieldType ? b : null,
            });
            if (!(0, o.e)(x, o.W))
              for (const e of w)
                e.geometry &&
                  (e.geometry = (0, a.b)((0, d.p)((0, a.c)(e.geometry, I, _, !1), o.W, x)));
            return this._loadInitialFeatures(B, w), B;
          }
          async applyEdits(e) {
            const { spatialReference: t, geometryType: i } = this._queryEngine;
            return (
              await Promise.all([(0, p.l)(t, i), (0, d.c)(e.adds, t), (0, d.c)(e.updates, t)]),
              this._applyEdits(e)
            );
          }
          queryFeatures(e = {}, t = {}) {
            return this._queryEngine.executeQuery(e, t.signal);
          }
          queryFeatureCount(e = {}, t = {}) {
            return this._queryEngine.executeQueryForCount(e, t.signal);
          }
          queryObjectIds(e = {}, t = {}) {
            return this._queryEngine.executeQueryForIds(e, t.signal);
          }
          queryExtent(e = {}, t = {}) {
            return this._queryEngine.executeQueryForExtent(e, t.signal);
          }
          querySnapping(e, t = {}) {
            return this._queryEngine.executeQueryForSnapping(e, t.signal);
          }
          _loadInitialFeatures(e, t) {
            const { featureStore: i, objectIdField: n } = this._queryEngine,
              s = [];
            for (const i of t) {
              const t = this._createDefaultAttributes(),
                r = (0, p.m)(
                  this._fieldsIndex,
                  t,
                  i.attributes,
                  this._requiredFields,
                  !0,
                  e.warnings,
                );
              r
                ? e.featureErrors.push(r)
                : (this._assignObjectId(t, i.attributes, !0),
                  (i.attributes = t),
                  (i.objectId = t[n]),
                  s.push(i));
            }
            if (
              (i.addMany(s),
              (e.layerDefinition.extent = this._queryEngine.fullExtent),
              e.layerDefinition.timeInfo)
            ) {
              const { start: t, end: i } = this._queryEngine.timeExtent;
              e.layerDefinition.timeInfo.timeExtent = [t, i];
            }
            return e;
          }
          _applyEdits(e) {
            const { adds: t, updates: i, deletes: n } = e,
              s = { addResults: [], deleteResults: [], updateResults: [], uidToObjectId: {} };
            if (
              (t && t.length && this._applyAddEdits(s, t),
              i && i.length && this._applyUpdateEdits(s, i),
              n && n.length)
            ) {
              for (const e of n) s.deleteResults.push((0, p.c)(e));
              this._queryEngine.featureStore.removeManyById(n);
            }
            return {
              fullExtent: this._queryEngine.fullExtent,
              timeExtent: this._queryEngine.timeExtent,
              featureEditResults: s,
            };
          }
          _applyAddEdits(e, t) {
            const { addResults: i } = e,
              {
                geometryType: n,
                hasM: s,
                hasZ: o,
                objectIdField: l,
                spatialReference: u,
                featureStore: h,
              } = this._queryEngine,
              c = [];
            for (const s of t) {
              if (s.geometry && n !== (0, r.Ji)(s.geometry)) {
                i.push((0, p.a)('Incorrect geometry type.'));
                continue;
              }
              const t = this._createDefaultAttributes(),
                o = (0, p.m)(this._fieldsIndex, t, s.attributes, this._requiredFields);
              if (o) i.push(o);
              else {
                if ((this._assignObjectId(t, s.attributes), (s.attributes = t), null != s.uid)) {
                  const t = s.attributes[l];
                  e.uidToObjectId[s.uid] = t;
                }
                s.geometry &&
                  (s.geometry = (0, d.p)((0, p.s)(s.geometry, u), s.geometry.spatialReference, u)),
                  c.push(s),
                  i.push((0, p.c)(s.attributes[l]));
              }
            }
            h.addMany((0, a.n)([], c, n, o, s, l));
          }
          _applyUpdateEdits({ updateResults: e }, t) {
            const {
              geometryType: i,
              hasM: n,
              hasZ: s,
              objectIdField: o,
              spatialReference: l,
              featureStore: u,
            } = this._queryEngine;
            for (const h of t) {
              const { attributes: t, geometry: c } = h,
                f = t && t[o];
              if (null == f) {
                e.push((0, p.a)(`Identifier field ${o} missing`));
                continue;
              }
              if (!u.has(f)) {
                e.push((0, p.a)(`Feature with object id ${f} missing`));
                continue;
              }
              const m = (0, a.o)(u.getFeature(f), i, s, n);
              if (c) {
                if (i !== (0, r.Ji)(c)) {
                  e.push((0, p.a)('Incorrect geometry type.'));
                  continue;
                }
                m.geometry = (0, d.p)((0, p.s)(c, l), c.spatialReference, l);
              }
              if (t) {
                const i = (0, p.m)(this._fieldsIndex, m.attributes, t, this._requiredFields);
                if (i) {
                  e.push(i);
                  continue;
                }
              }
              u.add((0, a.p)(m, i, s, n, o)), e.push((0, p.c)(f));
            }
          }
          _assignObjectId(e, t, i = !1) {
            const n = this._queryEngine.objectIdField;
            i && isFinite(t[n]) ? (e[n] = t[n]) : (e[n] = this._nextObjectId++);
          }
          async _checkProjection(e) {
            try {
              await (0, d.c)(o.W, e);
            } catch {
              throw new s.Z('geojson-layer', 'Projection not supported');
            }
          }
        };
    },
    88994: (e, t, i) => {
      'use strict';
      i.d(t, { P: () => a });
      var n = i(27794),
        s = i(76506),
        r = i(6906),
        o = i(98576);
      class a {
        constructor(e = 9, t) {
          (this.compareMinX = h),
            (this.compareMinY = c),
            (this.toBBox = function (e) {
              return e;
            }),
            (this._maxEntries = Math.max(4, e || 9)),
            (this._minEntries = Math.max(2, Math.ceil(0.4 * this._maxEntries))),
            t && ('function' == typeof t ? (this.toBBox = t) : this._initFormat(t)),
            this.clear();
        }
        destroy() {
          this.clear(), I.prune(), b.prune(), x.prune(), F.prune();
        }
        all(e) {
          this._all(this.data, e);
        }
        search(e, t) {
          let i = this.data;
          const n = this.toBBox;
          if (g(e, i))
            for (I.clear(); i; ) {
              for (let s = 0, r = i.children.length; s < r; s++) {
                const r = i.children[s],
                  o = i.leaf ? n(r) : r;
                g(e, o) && (i.leaf ? t(r) : y(e, o) ? this._all(r, t) : I.push(r));
              }
              i = I.pop();
            }
        }
        collides(e) {
          let t = this.data;
          const i = this.toBBox;
          if (!g(e, t)) return !1;
          for (I.clear(); t; ) {
            for (let n = 0, s = t.children.length; n < s; n++) {
              const s = t.children[n],
                r = t.leaf ? i(s) : s;
              if (g(e, r)) {
                if (t.leaf || y(e, r)) return !0;
                I.push(s);
              }
            }
            t = I.pop();
          }
          return !1;
        }
        load(e) {
          if (!e.length) return this;
          if (e.length < this._minEntries) {
            for (let t = 0, i = e.length; t < i; t++) this.insert(e[t]);
            return this;
          }
          let t = this._build(e.slice(0, e.length), 0, e.length - 1, 0);
          if (this.data.children.length)
            if (this.data.height === t.height) this._splitRoot(this.data, t);
            else {
              if (this.data.height < t.height) {
                const e = this.data;
                (this.data = t), (t = e);
              }
              this._insert(t, this.data.height - t.height - 1, !0);
            }
          else this.data = t;
          return this;
        }
        insert(e) {
          return e && this._insert(e, this.data.height - 1), this;
        }
        clear() {
          return (this.data = new B([])), this;
        }
        remove(e) {
          if (!e) return this;
          let t,
            i = this.data,
            r = null,
            o = 0,
            a = !1;
          const l = this.toBBox(e);
          for (x.clear(), F.clear(); i || x.length > 0; ) {
            var d;
            if (
              (i ||
                ((i = (0, s.a)(x.pop())),
                (r = x.data[x.length - 1]),
                (o = null != (d = F.pop()) ? d : 0),
                (a = !0)),
              i.leaf && ((t = (0, n.i)(i.children, e, i.children.length, i.indexHint)), -1 !== t))
            )
              return i.children.splice(t, 1), x.push(i), this._condense(x), this;
            a || i.leaf || !y(i, l)
              ? r
                ? (o++, (i = r.children[o]), (a = !1))
                : (i = null)
              : (x.push(i), F.push(o), (o = 0), (r = i), (i = i.children[0]));
          }
          return this;
        }
        toJSON() {
          return this.data;
        }
        fromJSON(e) {
          return (this.data = e), this;
        }
        _all(e, t) {
          let i = e;
          for (b.clear(); i; ) {
            var n;
            if (!0 === i.leaf) for (const e of i.children) t(e);
            else b.pushArray(i.children);
            i = null != (n = b.pop()) ? n : null;
          }
        }
        _build(e, t, i, n) {
          const s = i - t + 1;
          let r = this._maxEntries;
          if (s <= r) {
            const n = new B(e.slice(t, i + 1));
            return l(n, this.toBBox), n;
          }
          n || ((n = Math.ceil(Math.log(s) / Math.log(r))), (r = Math.ceil(s / r ** (n - 1))));
          const o = new w([]);
          o.height = n;
          const a = Math.ceil(s / r),
            d = a * Math.ceil(Math.sqrt(r));
          _(e, t, i, d, this.compareMinX);
          for (let s = t; s <= i; s += d) {
            const t = Math.min(s + d - 1, i);
            _(e, s, t, a, this.compareMinY);
            for (let i = s; i <= t; i += a) {
              const s = Math.min(i + a - 1, t);
              o.children.push(this._build(e, i, s, n - 1));
            }
          }
          return l(o, this.toBBox), o;
        }
        _chooseSubtree(e, t, i, n) {
          for (; n.push(t), !0 !== t.leaf && n.length - 1 !== i; ) {
            let i,
              n = 1 / 0,
              o = 1 / 0;
            for (let a = 0, l = t.children.length; a < l; a++) {
              const l = t.children[a],
                d = p(l),
                u =
                  ((s = e),
                  (r = l),
                  (Math.max(r.maxX, s.maxX) - Math.min(r.minX, s.minX)) *
                    (Math.max(r.maxY, s.maxY) - Math.min(r.minY, s.minY)) -
                    d);
              u < o
                ? ((o = u), (n = d < n ? d : n), (i = l))
                : u === o && d < n && ((n = d), (i = l));
            }
            t = i || t.children[0];
          }
          var s, r;
          return t;
        }
        _insert(e, t, i) {
          const n = this.toBBox,
            s = i ? e : n(e);
          x.clear();
          const r = this._chooseSubtree(s, this.data, t, x);
          for (
            r.children.push(e), u(r, s);
            t >= 0 && x.data[t].children.length > this._maxEntries;

          )
            this._split(x, t), t--;
          this._adjustParentBBoxes(s, x, t);
        }
        _split(e, t) {
          const i = e.data[t],
            n = i.children.length,
            s = this._minEntries;
          this._chooseSplitAxis(i, s, n);
          const r = this._chooseSplitIndex(i, s, n);
          if (!r)
            return void console.log(
              '  Error: assertion failed at PooledRBush._split: no valid split index',
            );
          const o = i.children.splice(r, i.children.length - r),
            a = i.leaf ? new B(o) : new w(o);
          (a.height = i.height),
            l(i, this.toBBox),
            l(a, this.toBBox),
            t ? e.data[t - 1].children.push(a) : this._splitRoot(i, a);
        }
        _splitRoot(e, t) {
          (this.data = new w([e, t])), (this.data.height = e.height + 1), l(this.data, this.toBBox);
        }
        _chooseSplitIndex(e, t, i) {
          let n, s, r;
          n = s = 1 / 0;
          for (let o = t; o <= i - t; o++) {
            const t = d(e, 0, o, this.toBBox),
              a = d(e, o, i, this.toBBox),
              l = m(t, a),
              u = p(t) + p(a);
            l < n
              ? ((n = l), (r = o), (s = u < s ? u : s))
              : l === n && u < s && ((s = u), (r = o));
          }
          return r;
        }
        _chooseSplitAxis(e, t, i) {
          const n = e.leaf ? this.compareMinX : h,
            s = e.leaf ? this.compareMinY : c;
          this._allDistMargin(e, t, i, n) < this._allDistMargin(e, t, i, s) && e.children.sort(n);
        }
        _allDistMargin(e, t, i, n) {
          e.children.sort(n);
          const s = this.toBBox,
            r = d(e, 0, t, s),
            o = d(e, i - t, i, s);
          let a = f(r) + f(o);
          for (let n = t; n < i - t; n++) {
            const t = e.children[n];
            u(r, e.leaf ? s(t) : t), (a += f(r));
          }
          for (let n = i - t - 1; n >= t; n--) {
            const t = e.children[n];
            u(o, e.leaf ? s(t) : t), (a += f(o));
          }
          return a;
        }
        _adjustParentBBoxes(e, t, i) {
          for (let n = i; n >= 0; n--) u(t.data[n], e);
        }
        _condense(e) {
          for (let t = e.length - 1; t >= 0; t--) {
            const i = e.data[t];
            if (0 === i.children.length)
              if (t > 0) {
                const s = e.data[t - 1],
                  r = s.children;
                r.splice((0, n.i)(r, i, r.length, s.indexHint), 1);
              } else this.clear();
            else l(i, this.toBBox);
          }
        }
        _initFormat(e) {
          const t = ['return a', ' - b', ';'];
          (this.compareMinX = new Function('a', 'b', t.join(e[0]))),
            (this.compareMinY = new Function('a', 'b', t.join(e[1]))),
            (this.toBBox = new Function(
              'a',
              'return {minX: a' +
                e[0] +
                ', minY: a' +
                e[1] +
                ', maxX: a' +
                e[2] +
                ', maxY: a' +
                e[3] +
                '};',
            ));
        }
      }
      function l(e, t) {
        d(e, 0, e.children.length, t, e);
      }
      function d(e, t, i, n, s) {
        s || (s = new B([])),
          (s.minX = 1 / 0),
          (s.minY = 1 / 0),
          (s.maxX = -1 / 0),
          (s.maxY = -1 / 0);
        for (let r, o = t; o < i; o++) (r = e.children[o]), u(s, e.leaf ? n(r) : r);
        return s;
      }
      function u(e, t) {
        (e.minX = Math.min(e.minX, t.minX)),
          (e.minY = Math.min(e.minY, t.minY)),
          (e.maxX = Math.max(e.maxX, t.maxX)),
          (e.maxY = Math.max(e.maxY, t.maxY));
      }
      function h(e, t) {
        return e.minX - t.minX;
      }
      function c(e, t) {
        return e.minY - t.minY;
      }
      function p(e) {
        return (e.maxX - e.minX) * (e.maxY - e.minY);
      }
      function f(e) {
        return e.maxX - e.minX + (e.maxY - e.minY);
      }
      function m(e, t) {
        const i = Math.max(e.minX, t.minX),
          n = Math.max(e.minY, t.minY),
          s = Math.min(e.maxX, t.maxX),
          r = Math.min(e.maxY, t.maxY);
        return Math.max(0, s - i) * Math.max(0, r - n);
      }
      function y(e, t) {
        return e.minX <= t.minX && e.minY <= t.minY && t.maxX <= e.maxX && t.maxY <= e.maxY;
      }
      function g(e, t) {
        return t.minX <= e.maxX && t.minY <= e.maxY && t.maxX >= e.minX && t.maxY >= e.minY;
      }
      function _(e, t, i, n, r) {
        const a = [t, i];
        for (; a.length; ) {
          const t = (0, s.a)(a.pop()),
            i = (0, s.a)(a.pop());
          if (t - i <= n) continue;
          const l = i + Math.ceil((t - i) / n / 2) * n;
          (0, o.q)(e, l, i, t, r), a.push(i, l, l, t);
        }
      }
      const I = new r.P(),
        b = new r.P(),
        x = new r.P(),
        F = new r.P({ deallocator: void 0 });
      class S extends class {
        constructor() {
          (this.minX = 1 / 0), (this.minY = 1 / 0), (this.maxX = -1 / 0), (this.maxY = -1 / 0);
        }
      } {
        constructor() {
          super(...arguments), (this.height = 1), (this.indexHint = new n.P());
        }
      }
      class B extends S {
        constructor(e) {
          super(), (this.children = e), (this.leaf = !0);
        }
      }
      class w extends S {
        constructor(e) {
          super(), (this.children = e), (this.leaf = !1);
        }
      }
    },
    4571: (e, t, i) => {
      'use strict';
      i.d(t, { a: () => o, b: () => l, c: () => d, d: () => a });
      var n = i(76506),
        s = i(89219),
        r = i(6941);
      function o(e) {
        return {
          renderer: {
            type: 'simple',
            symbol:
              'esriGeometryPoint' === e || 'esriGeometryMultipoint' === e
                ? r.d
                : 'esriGeometryPolyline' === e
                ? r.a
                : r.b,
          },
        };
      }
      function a(e, t) {
        if ((0, n.h)('csp-restrictions')) return () => ({ [t]: null, ...e });
        try {
          let i = `this.${t} = null;`;
          for (const t in e)
            i += `this${t.indexOf('.') ? `["${t}"]` : `.${t}`} = ${JSON.stringify(e[t])};`;
          const n = new Function(i);
          return () => new n();
        } catch (i) {
          return () => ({ [t]: null, ...e });
        }
      }
      function l(e = {}) {
        return [{ name: 'New Feature', description: '', prototype: { attributes: (0, n.d9)(e) } }];
      }
      function d(e, t) {
        return {
          attachment: null,
          data: { isVersioned: !1, supportsAttachment: !1, supportsM: !1, supportsZ: e },
          metadata: { supportsAdvancedFieldProperties: !1 },
          operations: {
            supportsCalculate: !1,
            supportsTruncate: !1,
            supportsValidateSql: !1,
            supportsAdd: t,
            supportsDelete: t,
            supportsEditing: t,
            supportsChangeTracking: !1,
            supportsQuery: !0,
            supportsQueryAttachments: !1,
            supportsResizeAttachments: !1,
            supportsSync: !1,
            supportsUpdate: t,
            supportsExceedsLimitStatistics: !0,
          },
          query: s.q,
          queryRelated: { supportsCount: !0, supportsOrderBy: !0, supportsPagination: !0 },
          editing: {
            supportsGeometryUpdate: t,
            supportsGlobalId: !1,
            supportsReturnServiceEditsInSourceSpatialReference: !1,
            supportsRollbackOnFailure: !1,
            supportsUpdateWithoutM: !1,
            supportsUploadWithItemId: !1,
            supportsDeleteByAnonymous: !1,
            supportsDeleteByOthers: !1,
            supportsUpdateByAnonymous: !1,
            supportsUpdateByOthers: !1,
          },
        };
      }
    },
    6941: (e, t, i) => {
      'use strict';
      i.d(t, {
        a: () => r,
        b: () => o,
        c: () => a,
        d: () => s,
        e: () => l,
        f: () => d,
        g: () => u,
      });
      const n = [252, 146, 31, 255],
        s = {
          type: 'esriSMS',
          style: 'esriSMSCircle',
          size: 6,
          color: n,
          outline: {
            type: 'esriSLS',
            style: 'esriSLSSolid',
            width: 0.75,
            color: [153, 153, 153, 255],
          },
        },
        r = { type: 'esriSLS', style: 'esriSLSSolid', width: 0.75, color: n },
        o = {
          type: 'esriSFS',
          style: 'esriSFSSolid',
          color: [252, 146, 31, 196],
          outline: {
            type: 'esriSLS',
            style: 'esriSLSSolid',
            width: 0.75,
            color: [255, 255, 255, 191],
          },
        },
        a = {
          type: 'esriTS',
          color: [255, 255, 255, 255],
          font: { family: 'arial-unicode-ms', size: 10, weight: 'bold' },
          horizontalAlignment: 'center',
          kerning: !0,
          haloColor: [0, 0, 0, 255],
          haloSize: 1,
          rotated: !1,
          text: '',
          xoffset: 0,
          yoffset: 0,
          angle: 0,
        },
        l = {
          type: 'esriSMS',
          style: 'esriSMSCircle',
          color: [0, 0, 0, 255],
          outline: null,
          size: 10.5,
        },
        d = { type: 'esriSLS', style: 'esriSLSSolid', color: [0, 0, 0, 255], width: 1.5 },
        u = { type: 'esriSFS', style: 'esriSFSSolid', color: [0, 0, 0, 255], outline: null };
    },
    54732: (e, t, i) => {
      'use strict';
      i.d(t, { k: () => n });
      const n = new (i(57251).J)({
        esriFieldTypeSmallInteger: 'small-integer',
        esriFieldTypeInteger: 'integer',
        esriFieldTypeSingle: 'single',
        esriFieldTypeDouble: 'double',
        esriFieldTypeLong: 'long',
        esriFieldTypeString: 'string',
        esriFieldTypeDate: 'date',
        esriFieldTypeOID: 'oid',
        esriFieldTypeGeometry: 'geometry',
        esriFieldTypeBlob: 'blob',
        esriFieldTypeRaster: 'raster',
        esriFieldTypeGUID: 'guid',
        esriFieldTypeGlobalID: 'global-id',
        esriFieldTypeXML: 'xml',
      });
    },
    90995: (e, t, i) => {
      'use strict';
      i.d(t, { c: () => x, g: () => o, i: () => b, v: () => I });
      var n = i(60991),
        s = i(85674);
      const r = {
        LineString: 'esriGeometryPolyline',
        MultiLineString: 'esriGeometryPolyline',
        MultiPoint: 'esriGeometryMultipoint',
        Point: 'esriGeometryPoint',
        Polygon: 'esriGeometryPolygon',
        MultiPolygon: 'esriGeometryPolygon',
      };
      function o(e) {
        return r[e];
      }
      function* a(e) {
        switch (e.type) {
          case 'Feature':
            yield e;
            break;
          case 'FeatureCollection':
            for (const t of e.features) t && (yield t);
        }
      }
      function* l(e) {
        if (!e) return null;
        switch (e.type) {
          case 'Point':
            yield e.coordinates;
            break;
          case 'LineString':
          case 'MultiPoint':
            yield* e.coordinates;
            break;
          case 'MultiLineString':
          case 'Polygon':
            for (const t of e.coordinates) yield* t;
            break;
          case 'MultiPolygon':
            for (const t of e.coordinates) for (const e of t) yield* e;
        }
      }
      function d(e) {
        for (const t of e) if (t.length > 2) return !0;
        return !1;
      }
      function u(e) {
        let t = 0;
        for (let i = 0; i < e.length; i++) {
          const n = e[i],
            s = e[(i + 1) % e.length];
          t += n[0] * s[1] - s[0] * n[1];
        }
        return t <= 0;
      }
      function h(e) {
        const t = e[0],
          i = e[e.length - 1];
        return (t[0] === i[0] && t[1] === i[1] && t[2] === i[2]) || e.push(t), e;
      }
      function c(e, t, i) {
        switch (t.type) {
          case 'LineString':
            return (function (e, t, i) {
              return m(e, t.coordinates, i), e;
            })(e, t, i);
          case 'MultiLineString':
            return (function (e, t, i) {
              for (const n of t.coordinates) m(e, n, i);
              return e;
            })(e, t, i);
          case 'MultiPoint':
            return (function (e, t, i) {
              return m(e, t.coordinates, i), e;
            })(e, t, i);
          case 'MultiPolygon':
            return (function (e, t, i) {
              for (const n of t.coordinates) {
                p(e, n[0], i);
                for (let t = 1; t < n.length; t++) f(e, n[t], i);
              }
              return e;
            })(e, t, i);
          case 'Point':
            return (function (e, t, i) {
              return g(e, t.coordinates, i), e;
            })(e, t, i);
          case 'Polygon':
            return (function (e, t, i) {
              const n = t.coordinates;
              p(e, n[0], i);
              for (let t = 1; t < n.length; t++) f(e, n[t], i);
              return e;
            })(e, t, i);
        }
      }
      function p(e, t, i) {
        const n = h(t);
        u(n) ? m(e, n, i) : y(e, n, i);
      }
      function f(e, t, i) {
        const n = h(t);
        u(n) ? y(e, n, i) : m(e, n, i);
      }
      function m(e, t, i) {
        for (const n of t) g(e, n, i);
        e.lengths.push(t.length);
      }
      function y(e, t, i) {
        for (let n = t.length - 1; n >= 0; n--) g(e, t[n], i);
        e.lengths.push(t.length);
      }
      function g(e, t, i) {
        const [n, s, r] = t;
        e.coords.push(n, s), i.hasZ && e.coords.push(r || 0);
      }
      function _(e) {
        switch (typeof e) {
          case 'string':
            return 'esriFieldTypeString';
          case 'number':
            return 'esriFieldTypeDouble';
          default:
            return 'unknown';
        }
      }
      function I(e) {
        if (!e) throw new n.Z('geojson-layer:empty', 'GeoJSON data is empty');
        if ('Feature' !== e.type && 'FeatureCollection' !== e.type)
          throw new n.Z(
            'geojson-layer:unsupported-geojson-object',
            'missing or not supported GeoJSON object type',
            { data: e },
          );
        const { crs: t } = e;
        if (!t) return;
        const i =
            'string' == typeof t
              ? t
              : 'name' === t.type
              ? t.properties.name
              : 'EPSG' === t.type
              ? t.properties.code
              : null,
          s = new RegExp('.*(CRS84H?|4326)$', 'i');
        if (!i || !s.test(i))
          throw new n.Z('geojson-layer:unsupported-crs', "unsupported GeoJSON 'crs' member", {
            crs: t,
          });
      }
      function b(e, t = {}) {
        const i = [],
          n = new Set(),
          s = new Set();
        let r,
          u = !1,
          h = Number.NEGATIVE_INFINITY,
          c = null,
          p = !1,
          { geometryType: f = null } = t,
          m = !1;
        for (const t of a(e)) {
          const { geometry: e, properties: a, id: y } = t;
          if (
            (!e || (f || (f = o(e.type)), o(e.type) === f)) &&
            (u || (u = d(l(e))),
            p ||
              ((p = null != y),
              p &&
                ((r = typeof y), 'number' === r && (c = Object.keys(a).filter((e) => a[e] === y)))),
            p &&
              'number' === r &&
              null != y &&
              ((h = Math.max(h, y)),
              c.length > 1
                ? (c = c.filter((e) => a[e] === y))
                : 1 === c.length && (c = a[c[0]] === y ? c : [])),
            !m && a)
          ) {
            let e = !0;
            for (const t in a) {
              if (n.has(t)) continue;
              const r = a[t];
              if (null == r) {
                (e = !1), s.add(t);
                continue;
              }
              const o = _(r);
              'unknown' !== o
                ? (s.delete(t), n.add(t), i.push({ name: t, alias: t, type: o }))
                : s.add(t);
            }
            m = e;
          }
        }
        const y = (c && 1 === c.length && c[0]) || null;
        if (y) for (const e of i) e.name === y && (e.type = 'esriFieldTypeOID');
        return {
          fields: i,
          geometryType: f,
          hasZ: u,
          maxObjectId: Math.max(0, h),
          objectIdFieldName: y,
          objectIdFieldType: r,
          unknownFields: Array.from(s),
        };
      }
      function x(e, t) {
        return Array.from(
          (function* (e, t = {}) {
            const { geometryType: i, objectIdField: n } = t;
            for (const a of e) {
              var r;
              const { geometry: e, properties: l, id: d } = a;
              if (e && o(e.type) !== i) continue;
              const u = l || {};
              let h = null != (r = u[n]) ? r : null;
              n && null != d && !u[n] && (u[n] = h = d);
              const p = new s.O(e ? c(new s.a(), e, t) : null, u, null, h);
              yield p;
            }
          })(a(e), t),
        );
      }
    },
    44722: (e, t, i) => {
      'use strict';
      i.d(t, { o: () => r });
      var n = i(71331),
        s = i(85674);
      const r = {
        getObjectId: (e) => e.objectId,
        getAttributes: (e) => e.attributes,
        getAttribute: (e, t) => e.attributes[t],
        cloneWithGeometry: (e, t) => new s.O(t, e.attributes, null, e.objectId),
        getGeometry: (e) => e.geometry,
        getCentroid: (e, t) => (
          e.centroid || (e.centroid = (0, n.g)(new s.a(), e.geometry, t.hasZ, t.hasM)), e.centroid
        ),
      };
    },
    77358: (e, t, i) => {
      'use strict';
      i.d(t, { a: () => a, c: () => d, l: () => m, m: () => h, s: () => f });
      var n = i(60947),
        s = i(14249);
      class r {
        constructor() {
          (this.code = null), (this.description = null);
        }
      }
      class o {
        constructor(e) {
          (this.error = new r()),
            (this.globalId = null),
            (this.objectId = null),
            (this.success = !1),
            (this.uniqueId = null),
            (this.error.description = e);
        }
      }
      function a(e) {
        return new o(e);
      }
      class l {
        constructor(e) {
          (this.globalId = null), (this.success = !0), (this.objectId = this.uniqueId = e);
        }
      }
      function d(e) {
        return new l(e);
      }
      const u = new Set();
      function h(e, t, i, n, r = !1, o) {
        u.clear();
        for (const n in i) {
          const l = e.get(n);
          if (!l) continue;
          const d = i[n],
            h = c(l, d);
          if (
            (h !== d &&
              o &&
              o.push({
                name: 'invalid-value-type',
                message: 'attribute value was converted to match the field type',
                details: { field: l, originalValue: d, sanitizedValue: h },
              }),
            u.add(l.name),
            l && (r || l.editable))
          ) {
            const e = (0, s.Qc)(l, h);
            if (e) return a((0, s.vP)(e, l, h));
            t[l.name] = h;
          }
        }
        if (n)
          for (const e of n) if (!u.has(e.name)) return a(`missing required field "${e.name}"`);
        return null;
      }
      function c(e, t) {
        let i = t;
        return (
          'string' == typeof t && (0, s.H7)(e)
            ? (i = parseFloat(t))
            : null != t && (0, s.qN)(e) && 'string' != typeof t && (i = String(t)),
          (0, s.Pz)(i)
        );
      }
      let p;
      function f(e, t) {
        if (!e || !(0, n.j)(t)) return e;
        if ('rings' in e || 'paths' in e) {
          if (!p) throw new TypeError('geometry engine not loaded');
          return p.simplify(t, e);
        }
        return e;
      }
      async function m(e, t) {
        !(0, n.j)(e) ||
          ('esriGeometryPolygon' !== t && 'esriGeometryPolyline' !== t) ||
          (await (async function () {
            return (
              p ||
              ((p = await Promise.all([i.e(3361), i.e(3981)])
                .then(i.bind(i, 43981))
                .then(function (e) {
                  return e.g;
                })),
              p)
            );
          })());
      }
    },
  },
]);
