(self.webpackChunkRemoteClient = self.webpackChunkRemoteClient || []).push([
  [3900],
  {
    56761: (e, t, i) => {
      'use strict';
      i.d(t, { B: () => p, F: () => m });
      var s = i(60991),
        n = i(76996),
        r = i(92143),
        a = i(76506),
        o = 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, a.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, s) => {
                  e[t++] = s;
                }),
                  (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 m {
        constructor(e) {
          (this.geometryInfo = e),
            (this._boundsStore = new p()),
            (this._featuresById = new Map()),
            (this._markedIds = new Set()),
            (this.events = new n.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 s of e) {
            const e = this._boundsStore.get(s.objectId);
            e && t((0, o.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 s.Z('featurestore:invalid-feature', 'feature id is missing', { feature: e }),
            );
          const i = this._featuresById.get(t);
          let n;
          if (
            (this._markedIds.add(t),
            i
              ? ((e.displayId = i.displayId),
                (n = this._boundsStore.get(t)),
                this._boundsStore.delete(t))
              : (0, a.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);
          (n = (0, d.g)(
            n || (0, l.a)(),
            e.geometry,
            this.geometryInfo.hasZ,
            this.geometryInfo.hasM,
          )),
            this._boundsStore.set(t, n),
            this._featuresById.set(t, e);
        }
        _remove(e) {
          return (
            (0, a.i)(this.onFeatureRemove) && this.onFeatureRemove(e),
            this._markedIds.delete(e.objectId),
            this._boundsStore.delete(e.objectId),
            this._featuresById.delete(e.objectId),
            e
          );
        }
      }
    },
    3900: (e, t, i) => {
      'use strict';
      i.r(t), i.d(t, { default: () => b });
      var s = i(60991),
        n = i(32422),
        r = i(60947),
        a = i(40267),
        o = i(19957),
        l = i(56761),
        d = i(24251),
        u = i(50815),
        h = i(4571),
        c = i(77358),
        p = i(1709),
        m = i(54732),
        f = i(14249);
      i(76506),
        i(92143),
        i(31450),
        i(71552),
        i(40642),
        i(81172),
        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(50406),
        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(82058),
        i(88762),
        i(32101),
        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 y = r.W,
        g = { xmin: -180, ymin: -90, xmax: 180, ymax: 90, spatialReference: r.W },
        _ = {
          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,
          },
        };
      function I(e) {
        return (0, n.wp)(e) ? null != e.z : !!e.hasZ;
      }
      function x(e) {
        return (0, n.wp)(e) ? null != e.m : !!e.hasM;
      }
      const b = class {
        constructor() {
          (this._queryEngine = null), (this._nextObjectId = null);
        }
        destroy() {
          this._queryEngine && this._queryEngine && this._queryEngine.destroy(),
            (this._queryEngine = this._requiredFields = this._fieldsIndex = this._createDefaultAttributes = null);
        }
        async load(e) {
          const t = [],
            { features: i } = e,
            n = this._inferLayerProperties(i, e.fields),
            r = e.fields || [],
            a = null != e.hasM ? e.hasM : n.hasM,
            c = null != e.hasZ ? e.hasZ : n.hasZ,
            I = !e.spatialReference && !n.spatialReference,
            x = I ? y : e.spatialReference || n.spatialReference,
            b = I ? g : null,
            F = e.geometryType || n.geometryType,
            B = !F;
          let S = e.objectIdField || n.objectIdField,
            M = e.timeInfo;
          if (
            !B &&
            (I &&
              t.push({
                name: 'feature-layer:spatial-reference-not-found',
                message: 'Spatial reference not provided or found in features. Defaults to WGS84',
              }),
            !F)
          )
            throw new s.Z(
              'feature-layer:missing-property',
              "geometryType not set and couldn't be inferred from the provided features",
            );
          if (!S)
            throw new s.Z(
              'feature-layer:missing-property',
              "objectIdField not set and couldn't be found in the provided fields",
            );
          if (
            (n.objectIdField &&
              S !== n.objectIdField &&
              (t.push({
                name: 'feature-layer:duplicated-oid-field',
                message: `Provided objectIdField "${S}" doesn't match the field name "${n.objectIdField}", found in the provided fields`,
              }),
              (S = n.objectIdField)),
            S && !n.objectIdField)
          ) {
            let e = null;
            r.some((t) => t.name === S && ((e = t), !0))
              ? ((e.type = 'esriFieldTypeOID'), (e.editable = !1), (e.nullable = !1))
              : r.unshift({
                  alias: S,
                  name: S,
                  type: 'esriFieldTypeOID',
                  editable: !1,
                  nullable: !1,
                });
          }
          for (const e of r) {
            if (
              (null == e.name && (e.name = e.alias), null == e.alias && (e.alias = e.name), !e.name)
            )
              throw new s.Z('feature-layer:invalid-field-name', 'field name is missing', {
                field: e,
              });
            if (
              (e.name === S && (e.type = 'esriFieldTypeOID'), -1 === m.k.jsonValues.indexOf(e.type))
            )
              throw new s.Z(
                'feature-layer:invalid-field-type',
                `invalid type for field "${e.name}"`,
                { field: e },
              );
          }
          const w = {};
          this._requiredFields = [];
          for (const e of r)
            if ('esriFieldTypeOID' !== e.type && 'esriFieldTypeGlobalID' !== e.type) {
              (e.editable = null == e.editable || !!e.editable),
                (e.nullable = null == e.nullable || !!e.nullable);
              const t = (0, f.os)(e);
              e.nullable || void 0 !== t ? (w[e.name] = t) : this._requiredFields.push(e);
            }
          if (
            ((this._fieldsIndex = new p.Z(r)), (this._createDefaultAttributes = (0, h.d)(w, S)), M)
          ) {
            if (M.startTimeField) {
              const e = this._fieldsIndex.get(M.startTimeField);
              e
                ? ((M.startTimeField = e.name), (e.type = 'esriFieldTypeDate'))
                : (M.startTimeField = null);
            }
            if (M.endTimeField) {
              const e = this._fieldsIndex.get(M.endTimeField);
              e
                ? ((M.endTimeField = e.name), (e.type = 'esriFieldTypeDate'))
                : (M.endTimeField = null);
            }
            if (M.trackIdField) {
              const e = this._fieldsIndex.get(M.trackIdField);
              e
                ? (M.trackIdField = e.name)
                : ((M.trackIdField = null),
                  t.push({
                    name: 'feature-layer:invalid-timeInfo-trackIdField',
                    message: 'trackIdField is missing',
                    details: { timeInfo: M },
                  }));
            }
            M.startTimeField ||
              M.endTimeField ||
              (t.push({
                name: 'feature-layer:invalid-timeInfo',
                message: 'startTimeField and endTimeField are missing or invalid',
                details: { timeInfo: M },
              }),
              (M = null));
          }
          const v = {
            warnings: t,
            featureErrors: [],
            layerDefinition: {
              ..._,
              drawingInfo: (0, h.a)(F),
              templates: (0, h.b)(w),
              extent: b,
              geometryType: F,
              objectIdField: S,
              fields: r,
              hasZ: !!c,
              hasM: !!a,
              timeInfo: M,
            },
            assignedObjectIds: {},
          };
          if (
            ((this._queryEngine = new u.Q({
              fields: r,
              geometryType: F,
              hasM: a,
              hasZ: c,
              objectIdField: S,
              spatialReference: x,
              featureStore: new l.F({ geometryType: F, hasM: a, hasZ: c }),
              timeInfo: M,
              cacheSpatialQueries: !0,
            })),
            !i || !i.length)
          )
            return (this._nextObjectId = o.i), v;
          const E = (0, o.f)(S, i);
          return (
            (this._nextObjectId = E + 1), await (0, d.c)(i, x), this._loadInitialFeatures(v, i)
          );
        }
        async applyEdits(e) {
          const { spatialReference: t, geometryType: i } = this._queryEngine;
          return (
            await Promise.all([(0, c.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);
        }
        _inferLayerProperties(e, t) {
          let i,
            s,
            r = null,
            a = null,
            o = null;
          for (const t of e) {
            const e = t.geometry;
            if (
              e &&
              (r || (r = (0, n.Ji)(e)),
              a || (a = e.spatialReference),
              null == i && (i = I(e)),
              null == s && (s = x(e)),
              r && a && null != i && null != s)
            )
              break;
          }
          if (t && t.length) {
            let e = null;
            t.some((t) => {
              const i = 'esriFieldTypeOID' === t.type,
                s = !t.type && t.name && 'objectid' === t.name.toLowerCase();
              return (e = t), i || s;
            }) && (o = e.name);
          }
          return { geometryType: r, spatialReference: a, objectIdField: o, hasM: s, hasZ: i };
        }
        _loadInitialFeatures(e, t) {
          const {
              geometryType: i,
              hasM: s,
              hasZ: r,
              objectIdField: o,
              spatialReference: l,
              featureStore: u,
            } = this._queryEngine,
            h = [];
          for (const s of t) {
            if (
              (null != s.uid && (e.assignedObjectIds[s.uid] = -1),
              s.geometry && i !== (0, n.Ji)(s.geometry))
            ) {
              e.featureErrors.push((0, c.a)('Incorrect geometry type.'));
              continue;
            }
            const t = this._createDefaultAttributes(),
              r = (0, c.m)(
                this._fieldsIndex,
                t,
                s.attributes,
                this._requiredFields,
                !0,
                e.warnings,
              );
            r
              ? e.featureErrors.push(r)
              : (this._assignObjectId(t, s.attributes, !0),
                (s.attributes = t),
                null != s.uid && (e.assignedObjectIds[s.uid] = s.attributes[o]),
                s.geometry && (s.geometry = (0, d.p)(s.geometry, s.geometry.spatialReference, l)),
                h.push(s));
          }
          if (
            (u.addMany((0, a.n)([], h, i, r, s, o)),
            (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: s } = e,
            n = { addResults: [], deleteResults: [], updateResults: [], uidToObjectId: {} };
          if (
            (t && t.length && this._applyAddEdits(n, t),
            i && i.length && this._applyUpdateEdits(n, i),
            s && s.length)
          ) {
            for (const e of s) n.deleteResults.push((0, c.c)(e));
            this._queryEngine.featureStore.removeManyById(s);
          }
          return { fullExtent: this._queryEngine.fullExtent, featureEditResults: n };
        }
        _applyAddEdits(e, t) {
          const { addResults: i } = e,
            {
              geometryType: s,
              hasM: r,
              hasZ: o,
              objectIdField: l,
              spatialReference: u,
              featureStore: h,
            } = this._queryEngine,
            p = [];
          for (const r of t) {
            if (r.geometry && s !== (0, n.Ji)(r.geometry)) {
              i.push((0, c.a)('Incorrect geometry type.'));
              continue;
            }
            const t = this._createDefaultAttributes(),
              a = (0, c.m)(this._fieldsIndex, t, r.attributes, this._requiredFields);
            if (a) i.push(a);
            else {
              if ((this._assignObjectId(t, r.attributes), (r.attributes = t), null != r.uid)) {
                const t = r.attributes[l];
                e.uidToObjectId[r.uid] = t;
              }
              r.geometry &&
                (r.geometry = (0, d.p)((0, c.s)(r.geometry, u), r.geometry.spatialReference, u)),
                p.push(r),
                i.push((0, c.c)(r.attributes[l]));
            }
          }
          h.addMany((0, a.n)([], p, s, o, r, l));
        }
        _applyUpdateEdits({ updateResults: e }, t) {
          const {
            geometryType: i,
            hasM: s,
            hasZ: r,
            objectIdField: o,
            spatialReference: l,
            featureStore: u,
          } = this._queryEngine;
          for (const h of t) {
            const { attributes: t, geometry: p } = h,
              m = t && t[o];
            if (null == m) {
              e.push((0, c.a)(`Identifier field ${o} missing`));
              continue;
            }
            if (!u.has(m)) {
              e.push((0, c.a)(`Feature with object id ${m} missing`));
              continue;
            }
            const f = (0, a.o)(u.getFeature(m), i, r, s);
            if (p) {
              if (i !== (0, n.Ji)(p)) {
                e.push((0, c.a)('Incorrect geometry type.'));
                continue;
              }
              f.geometry = (0, d.p)((0, c.s)(p, l), p.spatialReference, l);
            }
            if (t) {
              const i = (0, c.m)(this._fieldsIndex, f.attributes, t, this._requiredFields);
              if (i) {
                e.push(i);
                continue;
              }
            }
            u.add((0, a.p)(f, i, r, s, o)), e.push((0, c.c)(m));
          }
        }
        _assignObjectId(e, t, i = !1) {
          const s = this._queryEngine.objectIdField;
          i && t && isFinite(t[s]) ? (e[s] = t[s]) : (e[s] = this._nextObjectId++);
        }
      };
    },
    88994: (e, t, i) => {
      'use strict';
      i.d(t, { P: () => o });
      var s = i(27794),
        n = i(76506),
        r = i(6906),
        a = i(98576);
      class o {
        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(), x.prune(), b.prune(), F.prune();
        }
        all(e) {
          this._all(this.data, e);
        }
        search(e, t) {
          let i = this.data;
          const s = this.toBBox;
          if (g(e, i))
            for (I.clear(); i; ) {
              for (let n = 0, r = i.children.length; n < r; n++) {
                const r = i.children[n],
                  a = i.leaf ? s(r) : r;
                g(e, a) && (i.leaf ? t(r) : y(e, a) ? 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 s = 0, n = t.children.length; s < n; s++) {
              const n = t.children[s],
                r = t.leaf ? i(n) : n;
              if (g(e, r)) {
                if (t.leaf || y(e, r)) return !0;
                I.push(n);
              }
            }
            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 S([])), this;
        }
        remove(e) {
          if (!e) return this;
          let t,
            i = this.data,
            r = null,
            a = 0,
            o = !1;
          const l = this.toBBox(e);
          for (b.clear(), F.clear(); i || b.length > 0; ) {
            var d;
            if (
              (i ||
                ((i = (0, n.a)(b.pop())),
                (r = b.data[b.length - 1]),
                (a = null != (d = F.pop()) ? d : 0),
                (o = !0)),
              i.leaf && ((t = (0, s.i)(i.children, e, i.children.length, i.indexHint)), -1 !== t))
            )
              return i.children.splice(t, 1), b.push(i), this._condense(b), this;
            o || i.leaf || !y(i, l)
              ? r
                ? (a++, (i = r.children[a]), (o = !1))
                : (i = null)
              : (b.push(i), F.push(a), (a = 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 (x.clear(); i; ) {
            var s;
            if (!0 === i.leaf) for (const e of i.children) t(e);
            else x.pushArray(i.children);
            i = null != (s = x.pop()) ? s : null;
          }
        }
        _build(e, t, i, s) {
          const n = i - t + 1;
          let r = this._maxEntries;
          if (n <= r) {
            const s = new S(e.slice(t, i + 1));
            return l(s, this.toBBox), s;
          }
          s || ((s = Math.ceil(Math.log(n) / Math.log(r))), (r = Math.ceil(n / r ** (s - 1))));
          const a = new M([]);
          a.height = s;
          const o = Math.ceil(n / r),
            d = o * Math.ceil(Math.sqrt(r));
          _(e, t, i, d, this.compareMinX);
          for (let n = t; n <= i; n += d) {
            const t = Math.min(n + d - 1, i);
            _(e, n, t, o, this.compareMinY);
            for (let i = n; i <= t; i += o) {
              const n = Math.min(i + o - 1, t);
              a.children.push(this._build(e, i, n, s - 1));
            }
          }
          return l(a, this.toBBox), a;
        }
        _chooseSubtree(e, t, i, s) {
          for (; s.push(t), !0 !== t.leaf && s.length - 1 !== i; ) {
            let i,
              s = 1 / 0,
              a = 1 / 0;
            for (let o = 0, l = t.children.length; o < l; o++) {
              const l = t.children[o],
                d = p(l),
                u =
                  ((n = e),
                  (r = l),
                  (Math.max(r.maxX, n.maxX) - Math.min(r.minX, n.minX)) *
                    (Math.max(r.maxY, n.maxY) - Math.min(r.minY, n.minY)) -
                    d);
              u < a
                ? ((a = u), (s = d < s ? d : s), (i = l))
                : u === a && d < s && ((s = d), (i = l));
            }
            t = i || t.children[0];
          }
          var n, r;
          return t;
        }
        _insert(e, t, i) {
          const s = this.toBBox,
            n = i ? e : s(e);
          b.clear();
          const r = this._chooseSubtree(n, this.data, t, b);
          for (
            r.children.push(e), u(r, n);
            t >= 0 && b.data[t].children.length > this._maxEntries;

          )
            this._split(b, t), t--;
          this._adjustParentBBoxes(n, b, t);
        }
        _split(e, t) {
          const i = e.data[t],
            s = i.children.length,
            n = this._minEntries;
          this._chooseSplitAxis(i, n, s);
          const r = this._chooseSplitIndex(i, n, s);
          if (!r)
            return void console.log(
              '  Error: assertion failed at PooledRBush._split: no valid split index',
            );
          const a = i.children.splice(r, i.children.length - r),
            o = i.leaf ? new S(a) : new M(a);
          (o.height = i.height),
            l(i, this.toBBox),
            l(o, this.toBBox),
            t ? e.data[t - 1].children.push(o) : this._splitRoot(i, o);
        }
        _splitRoot(e, t) {
          (this.data = new M([e, t])), (this.data.height = e.height + 1), l(this.data, this.toBBox);
        }
        _chooseSplitIndex(e, t, i) {
          let s, n, r;
          s = n = 1 / 0;
          for (let a = t; a <= i - t; a++) {
            const t = d(e, 0, a, this.toBBox),
              o = d(e, a, i, this.toBBox),
              l = f(t, o),
              u = p(t) + p(o);
            l < s
              ? ((s = l), (r = a), (n = u < n ? u : n))
              : l === s && u < n && ((n = u), (r = a));
          }
          return r;
        }
        _chooseSplitAxis(e, t, i) {
          const s = e.leaf ? this.compareMinX : h,
            n = e.leaf ? this.compareMinY : c;
          this._allDistMargin(e, t, i, s) < this._allDistMargin(e, t, i, n) && e.children.sort(s);
        }
        _allDistMargin(e, t, i, s) {
          e.children.sort(s);
          const n = this.toBBox,
            r = d(e, 0, t, n),
            a = d(e, i - t, i, n);
          let o = m(r) + m(a);
          for (let s = t; s < i - t; s++) {
            const t = e.children[s];
            u(r, e.leaf ? n(t) : t), (o += m(r));
          }
          for (let s = i - t - 1; s >= t; s--) {
            const t = e.children[s];
            u(a, e.leaf ? n(t) : t), (o += m(a));
          }
          return o;
        }
        _adjustParentBBoxes(e, t, i) {
          for (let s = i; s >= 0; s--) u(t.data[s], 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 n = e.data[t - 1],
                  r = n.children;
                r.splice((0, s.i)(r, i, r.length, n.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, s, n) {
        n || (n = new S([])),
          (n.minX = 1 / 0),
          (n.minY = 1 / 0),
          (n.maxX = -1 / 0),
          (n.maxY = -1 / 0);
        for (let r, a = t; a < i; a++) (r = e.children[a]), u(n, e.leaf ? s(r) : r);
        return n;
      }
      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 m(e) {
        return e.maxX - e.minX + (e.maxY - e.minY);
      }
      function f(e, t) {
        const i = Math.max(e.minX, t.minX),
          s = Math.max(e.minY, t.minY),
          n = Math.min(e.maxX, t.maxX),
          r = Math.min(e.maxY, t.maxY);
        return Math.max(0, n - i) * Math.max(0, r - s);
      }
      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, s, r) {
        const o = [t, i];
        for (; o.length; ) {
          const t = (0, n.a)(o.pop()),
            i = (0, n.a)(o.pop());
          if (t - i <= s) continue;
          const l = i + Math.ceil((t - i) / s / 2) * s;
          (0, a.q)(e, l, i, t, r), o.push(i, l, l, t);
        }
      }
      const I = new r.P(),
        x = new r.P(),
        b = new r.P(),
        F = new r.P({ deallocator: void 0 });
      class B 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 s.P());
        }
      }
      class S extends B {
        constructor(e) {
          super(), (this.children = e), (this.leaf = !0);
        }
      }
      class M extends B {
        constructor(e) {
          super(), (this.children = e), (this.leaf = !1);
        }
      }
    },
    4571: (e, t, i) => {
      'use strict';
      i.d(t, { a: () => a, b: () => l, c: () => d, d: () => o });
      var s = i(76506),
        n = i(89219),
        r = i(6941);
      function a(e) {
        return {
          renderer: {
            type: 'simple',
            symbol:
              'esriGeometryPoint' === e || 'esriGeometryMultipoint' === e
                ? r.d
                : 'esriGeometryPolyline' === e
                ? r.a
                : r.b,
          },
        };
      }
      function o(e, t) {
        if ((0, s.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 s = new Function(i);
          return () => new s();
        } catch (i) {
          return () => ({ [t]: null, ...e });
        }
      }
      function l(e = {}) {
        return [{ name: 'New Feature', description: '', prototype: { attributes: (0, s.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: n.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: () => a,
        c: () => o,
        d: () => n,
        e: () => l,
        f: () => d,
        g: () => u,
      });
      const s = [252, 146, 31, 255],
        n = {
          type: 'esriSMS',
          style: 'esriSMSCircle',
          size: 6,
          color: s,
          outline: {
            type: 'esriSLS',
            style: 'esriSLSSolid',
            width: 0.75,
            color: [153, 153, 153, 255],
          },
        },
        r = { type: 'esriSLS', style: 'esriSLSSolid', width: 0.75, color: s },
        a = {
          type: 'esriSFS',
          style: 'esriSFSSolid',
          color: [252, 146, 31, 196],
          outline: {
            type: 'esriSLS',
            style: 'esriSLSSolid',
            width: 0.75,
            color: [255, 255, 255, 191],
          },
        },
        o = {
          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: () => s });
      const s = 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',
      });
    },
    19957: (e, t, i) => {
      'use strict';
      i.d(t, { f: () => n, i: () => s });
      const s = 1;
      function n(e, t) {
        let i = 0;
        for (const n of t) {
          var s;
          const t = null == (s = n.attributes) ? void 0 : s[e];
          'number' == typeof t && isFinite(t) && (i = Math.max(i, t));
        }
        return i;
      }
    },
    44722: (e, t, i) => {
      'use strict';
      i.d(t, { o: () => r });
      var s = i(71331),
        n = i(85674);
      const r = {
        getObjectId: (e) => e.objectId,
        getAttributes: (e) => e.attributes,
        getAttribute: (e, t) => e.attributes[t],
        cloneWithGeometry: (e, t) => new n.O(t, e.attributes, null, e.objectId),
        getGeometry: (e) => e.geometry,
        getCentroid: (e, t) => (
          e.centroid || (e.centroid = (0, s.g)(new n.a(), e.geometry, t.hasZ, t.hasM)), e.centroid
        ),
      };
    },
    77358: (e, t, i) => {
      'use strict';
      i.d(t, { a: () => o, c: () => d, l: () => f, m: () => h, s: () => m });
      var s = i(60947),
        n = i(14249);
      class r {
        constructor() {
          (this.code = null), (this.description = null);
        }
      }
      class a {
        constructor(e) {
          (this.error = new r()),
            (this.globalId = null),
            (this.objectId = null),
            (this.success = !1),
            (this.uniqueId = null),
            (this.error.description = e);
        }
      }
      function o(e) {
        return new a(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, s, r = !1, a) {
        u.clear();
        for (const s in i) {
          const l = e.get(s);
          if (!l) continue;
          const d = i[s],
            h = c(l, d);
          if (
            (h !== d &&
              a &&
              a.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, n.Qc)(l, h);
            if (e) return o((0, n.vP)(e, l, h));
            t[l.name] = h;
          }
        }
        if (s)
          for (const e of s) if (!u.has(e.name)) return o(`missing required field "${e.name}"`);
        return null;
      }
      function c(e, t) {
        let i = t;
        return (
          'string' == typeof t && (0, n.H7)(e)
            ? (i = parseFloat(t))
            : null != t && (0, n.qN)(e) && 'string' != typeof t && (i = String(t)),
          (0, n.Pz)(i)
        );
      }
      let p;
      function m(e, t) {
        if (!e || !(0, s.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 f(e, t) {
        !(0, s.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)
            );
          })());
      }
    },
  },
]);
