(self.webpackChunkRemoteClient = self.webpackChunkRemoteClient || []).push([
  [6287],
  {
    93314: (e, t, r) => {
      'use strict';
      r.d(t, { Z: () => h });
      var i,
        s = r(29768),
        n = r(74673),
        a = r(76506),
        o = r(35197),
        l = r(34250),
        u = (r(91306), r(92143), r(97714)),
        d = r(17533),
        p = r(2906);
      r(21972),
        r(23639),
        r(86656),
        r(22723),
        r(91055),
        r(27794),
        r(6906),
        r(50406),
        r(60991),
        r(81172),
        r(71552),
        r(31450),
        r(40642),
        r(26341);
      let c = (i = class extends n.a {
        constructor(e) {
          super(e), (this.end = null), (this.start = null);
        }
        static get allTime() {
          return y;
        }
        static get empty() {
          return m;
        }
        readEnd(e, t) {
          return null != t.end ? new Date(t.end) : null;
        }
        writeEnd(e, t) {
          t.end = e ? e.getTime() : null;
        }
        get isAllTime() {
          return this.equals(i.allTime);
        }
        get isEmpty() {
          return this.equals(i.empty);
        }
        readStart(e, t) {
          return null != t.start ? new Date(t.start) : null;
        }
        writeStart(e, t) {
          t.start = e ? e.getTime() : null;
        }
        clone() {
          return new i({ end: this.end, start: this.start });
        }
        expandTo(e) {
          if (this.isEmpty || this.isAllTime) return this.clone();
          const t = (0, a.e)(this.start, (t) => (0, o.t)(t, e)),
            r = (0, a.e)(this.end, (t) => (0, o.o)((0, o.t)(t, e), 1, e));
          return new i({ start: t, end: r });
        }
        intersection(e) {
          if (!e) return this.clone();
          if (this.isEmpty || e.isEmpty) return i.empty;
          if (this.isAllTime) return e.clone();
          if (e.isAllTime) return this.clone();
          const t = (0, a.m)(this.start, -1 / 0, (e) => e.getTime()),
            r = (0, a.m)(this.end, 1 / 0, (e) => e.getTime()),
            s = (0, a.m)(e.start, -1 / 0, (e) => e.getTime()),
            n = (0, a.m)(e.end, 1 / 0, (e) => e.getTime());
          let o, l;
          if (
            (s >= t && s <= r ? (o = s) : t >= s && t <= n && (o = t),
            r >= s && r <= n ? (l = r) : n >= t && n <= r && (l = n),
            !isNaN(o) && !isNaN(l))
          ) {
            const e = new i();
            return (
              (e.start = o === -1 / 0 ? null : new Date(o)),
              (e.end = l === 1 / 0 ? null : new Date(l)),
              e
            );
          }
          return i.empty;
        }
        offset(e, t) {
          if (this.isEmpty || this.isAllTime) return this.clone();
          const r = new i(),
            { start: s, end: n } = this;
          return (
            (0, a.i)(s) && (r.start = (0, o.o)(s, e, t)),
            (0, a.i)(n) && (r.end = (0, o.o)(n, e, t)),
            r
          );
        }
        equals(e) {
          if (!e) return !1;
          const t = (0, a.i)(this.start) ? this.start.getTime() : this.start,
            r = (0, a.i)(this.end) ? this.end.getTime() : this.end,
            i = (0, a.i)(e.start) ? e.start.getTime() : e.start,
            s = (0, a.i)(e.end) ? e.end.getTime() : e.end;
          return t === i && r === s;
        }
        union(e) {
          if (!e || e.isEmpty) return this.clone();
          if (this.isEmpty) return e.clone();
          if (this.isAllTime || e.isAllTime) return y.clone();
          const t =
              (0, a.i)(this.start) && (0, a.i)(e.start)
                ? new Date(Math.min(this.start.getTime(), e.start.getTime()))
                : null,
            r =
              (0, a.i)(this.end) && (0, a.i)(e.end)
                ? new Date(Math.max(this.end.getTime(), e.end.getTime()))
                : null;
          return new i({ start: t, end: r });
        }
      });
      (0, s._)(
        [(0, l.Cb)({ type: Date, json: { write: { allowNull: !0 } } })],
        c.prototype,
        'end',
        void 0,
      ),
        (0, s._)([(0, u.r)('end')], c.prototype, 'readEnd', null),
        (0, s._)([(0, p.w)('end')], c.prototype, 'writeEnd', null),
        (0, s._)([(0, l.Cb)({ readOnly: !0, json: { read: !1 } })], c.prototype, 'isAllTime', null),
        (0, s._)([(0, l.Cb)({ readOnly: !0, json: { read: !1 } })], c.prototype, 'isEmpty', null),
        (0, s._)(
          [(0, l.Cb)({ type: Date, json: { write: { allowNull: !0 } } })],
          c.prototype,
          'start',
          void 0,
        ),
        (0, s._)([(0, u.r)('start')], c.prototype, 'readStart', null),
        (0, s._)([(0, p.w)('start')], c.prototype, 'writeStart', null),
        (c = i = (0, s._)([(0, d.j)('esri.TimeExtent')], c));
      const y = new c(),
        m = new c({ start: void 0, end: void 0 }),
        h = c;
    },
    11118: (e, t, r) => {
      'use strict';
      r.d(t, { B: () => a });
      var i = r(29768),
        s = r(34250),
        n = (r(76506), r(91306), r(92143), r(17533));
      const a = (e) => {
        let t = class extends e {
          constructor() {
            super(...arguments), (this.blendMode = 'normal'), (this.effect = null);
          }
        };
        return (
          (0, i._)(
            [
              (0, s.Cb)({
                type: [
                  'average',
                  'color-burn',
                  'color-dodge',
                  'color',
                  'darken',
                  'destination-atop',
                  'destination-in',
                  'destination-out',
                  'destination-over',
                  'difference',
                  'exclusion',
                  'hard-light',
                  'hue',
                  'invert',
                  'lighten',
                  'lighter',
                  'luminosity',
                  'minus',
                  'multiply',
                  'normal',
                  'overlay',
                  'plus',
                  'reflect',
                  'saturation',
                  'screen',
                  'soft-light',
                  'source-atop',
                  'source-in',
                  'source-out',
                  'vivid-light',
                  'xor',
                ],
                nonNullable: !0,
                json: {
                  read: !1,
                  write: !1,
                  origins: { 'web-map': { default: 'normal', read: !0, write: !0 } },
                },
              }),
            ],
            t.prototype,
            'blendMode',
            void 0,
          ),
          (0, i._)([(0, s.Cb)()], t.prototype, 'effect', void 0),
          (t = (0, i._)([(0, n.j)('esri.layers.mixins.BlendLayer')], t)),
          t
        );
      };
    },
    47842: (e, t, r) => {
      'use strict';
      r.d(t, { E: () => w });
      var i,
        s = r(29768),
        n = r(57251),
        a = r(74673),
        o = r(76506),
        l = r(34250),
        u = (r(91306), r(92143), r(97714)),
        d = r(17533),
        p = r(2906),
        c = r(14249),
        y = r(17298);
      let m = (i = class extends a.a {
        async collectRequiredFields(e, t) {
          return (0, c.io)(e, t, this.expression);
        }
        clone() {
          return new i({ expression: this.expression, title: this.title });
        }
      });
      (0, s._)(
        [(0, l.Cb)({ type: String, json: { write: !0 } })],
        m.prototype,
        'expression',
        void 0,
      ),
        (0, s._)([(0, l.Cb)({ type: String, json: { write: !0 } })], m.prototype, 'title', void 0),
        (m = i = (0, s._)([(0, d.j)('esri.layers.support.FeatureExpressionInfo')], m));
      var h,
        g = m;
      const f = (0, n.s)()({
          onTheGround: 'on-the-ground',
          relativeToGround: 'relative-to-ground',
          relativeToScene: 'relative-to-scene',
          absoluteHeight: 'absolute-height',
        }),
        v = new n.J({
          foot: 'feet',
          kilometer: 'kilometers',
          meter: 'meters',
          mile: 'miles',
          'us-foot': 'us-feet',
          yard: 'yards',
        });
      let b = (h = class extends a.a {
        constructor() {
          super(...arguments), (this.offset = null);
        }
        readFeatureExpressionInfo(e, t) {
          return null != e
            ? e
            : t.featureExpression && 0 === t.featureExpression.value
            ? { expression: '0' }
            : void 0;
        }
        writeFeatureExpressionInfo(e, t, r, i) {
          (t[r] = e.write(null, i)), '0' === e.expression && (t.featureExpression = { value: 0 });
        }
        get mode() {
          const { offset: e, featureExpressionInfo: t } = this;
          return this._isOverridden('mode')
            ? this._get('mode')
            : (0, o.i)(e) || t
            ? 'relative-to-ground'
            : 'on-the-ground';
        }
        set mode(e) {
          this._override('mode', e);
        }
        set unit(e) {
          this._set('unit', e);
        }
        write(e, t) {
          return this.offset || this.mode || this.featureExpressionInfo || this.unit
            ? super.write(e, t)
            : null;
        }
        clone() {
          return new h({
            mode: this.mode,
            offset: this.offset,
            featureExpressionInfo: this.featureExpressionInfo
              ? this.featureExpressionInfo.clone()
              : void 0,
            unit: this.unit,
          });
        }
      });
      (0, s._)(
        [(0, l.Cb)({ type: g, json: { write: !0 } })],
        b.prototype,
        'featureExpressionInfo',
        void 0,
      ),
        (0, s._)(
          [(0, u.r)('featureExpressionInfo', ['featureExpressionInfo', 'featureExpression'])],
          b.prototype,
          'readFeatureExpressionInfo',
          null,
        ),
        (0, s._)(
          [
            (0, p.w)('featureExpressionInfo', {
              featureExpressionInfo: { type: g },
              'featureExpression.value': { type: [0] },
            }),
          ],
          b.prototype,
          'writeFeatureExpressionInfo',
          null,
        ),
        (0, s._)(
          [
            (0, l.Cb)({
              type: f.apiValues,
              nonNullable: !0,
              json: {
                type: f.jsonValues,
                read: f.read,
                write: { writer: f.write, isRequired: !0 },
              },
            }),
          ],
          b.prototype,
          'mode',
          null,
        ),
        (0, s._)([(0, l.Cb)({ type: Number, json: { write: !0 } })], b.prototype, 'offset', void 0),
        (0, s._)(
          [(0, l.Cb)({ type: y.s, json: { type: String, read: v.read, write: v.write } })],
          b.prototype,
          'unit',
          null,
        ),
        (b = h = (0, s._)([(0, d.j)('esri.layers.support.ElevationInfo')], b));
      var w = b;
    },
    89440: (e, t, r) => {
      'use strict';
      r.d(t, { O: () => p });
      var i = r(29768),
        s = r(60991),
        n = r(34250),
        a = (r(76506), r(91306), r(92143), r(17533)),
        o = r(2906),
        l = r(26341),
        u = r(43022);
      const d = {
          'web-scene/operational-layers': {
            ArcGISFeatureLayer: !0,
            ArcGISImageServiceLayer: !0,
            ArcGISMapServiceLayer: !0,
            ArcGISSceneServiceLayer: !0,
            ArcGISTiledElevationServiceLayer: !0,
            ArcGISTiledImageServiceLayer: !0,
            ArcGISTiledMapServiceLayer: !0,
            BuildingSceneLayer: !0,
            GroupLayer: !0,
            IntegratedMeshLayer: !0,
            PointCloudLayer: !0,
            WebTiledLayer: !0,
            CSV: !0,
            VectorTileLayer: !0,
            WMS: !0,
            KML: !0,
            RasterDataLayer: !0,
          },
          'web-scene/basemap': {
            ArcGISTiledImageServiceLayer: !0,
            ArcGISTiledMapServiceLayer: !0,
            WebTiledLayer: !0,
            OpenStreetMap: !0,
            VectorTileLayer: !0,
            ArcGISImageServiceLayer: !0,
            WMS: !0,
            ArcGISMapServiceLayer: !0,
          },
          'web-scene/ground': {
            ArcGISTiledElevationServiceLayer: !0,
            RasterDataElevationLayer: !0,
          },
          'web-map/operational-layers': {
            ArcGISFeatureLayer: !0,
            ArcGISImageServiceLayer: !0,
            ArcGISImageServiceVectorLayer: !0,
            ArcGISMapServiceLayer: !0,
            ArcGISStreamLayer: !0,
            ArcGISTiledImageServiceLayer: !0,
            ArcGISTiledMapServiceLayer: !0,
            BingMapsAerial: !0,
            BingMapsHybrid: !0,
            BingMapsRoad: !0,
            CSV: !0,
            GeoRSS: !0,
            GroupLayer: !0,
            KML: !0,
            OGCFeatureLayer: !0,
            SubtypeGroupLayer: !0,
            VectorTileLayer: !0,
            WFS: !0,
            WMS: !0,
            WebTiledLayer: !0,
          },
          'web-map/basemap': {
            ArcGISImageServiceLayer: !0,
            ArcGISImageServiceVectorLayer: !0,
            ArcGISMapServiceLayer: !0,
            ArcGISTiledImageServiceLayer: !0,
            ArcGISTiledMapServiceLayer: !0,
            OpenStreetMap: !0,
            VectorTileLayer: !0,
            WMS: !0,
            WebTiledLayer: !0,
            BingMapsAerial: !0,
            BingMapsRoad: !0,
            BingMapsHybrid: !0,
          },
          'web-map/tables': { ArcGISFeatureLayer: !0 },
          'portal-item/operational-layers': {
            ArcGISSceneServiceLayer: !0,
            PointCloudLayer: !0,
            BuildingSceneLayer: !0,
            IntegratedMeshLayer: !0,
          },
        },
        p = (e) => {
          let t = class extends e {
            constructor() {
              super(...arguments), (this.title = null);
            }
            writeListMode(e, t, r, i) {
              ((i && 'ground' === i.layerContainerType) || (e && (0, l.b)(this, r, {}, i))) &&
                (t[r] = e);
            }
            writeOperationalLayerType(e, t, r, i) {
              !e || (i && 'tables' === i.layerContainerType) || (t.layerType = e);
            }
            writeTitle(e, t) {
              t.title = e || 'Layer';
            }
            read(e, t) {
              t && (t.layer = this), (0, l.a)(this, e, (t) => super.read(e, t), t);
            }
            write(e, t) {
              if (t && t.origin) {
                const e = `${t.origin}/${t.layerContainerType || 'operational-layers'}`,
                  r = d[e];
                let i = r && r[this.operationalLayerType];
                if (
                  ('ArcGISTiledElevationServiceLayer' === this.operationalLayerType &&
                    'web-scene/operational-layers' === e &&
                    (i = !1),
                  !i)
                )
                  return (
                    t.messages &&
                      t.messages.push(
                        new s.Z(
                          'layer:unsupported',
                          `Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,
                          { layer: this },
                        ),
                      ),
                    null
                  );
              }
              const r = super.write(e, { ...t, layer: this }),
                i =
                  !!t &&
                  !!t.messages &&
                  !!t.messages.filter(
                    (e) => e instanceof s.Z && 'web-document-write:property-required' === e.name,
                  ).length;
              return !this.url && i ? null : r;
            }
            beforeSave() {}
          };
          return (
            (0, i._)(
              [
                (0, n.Cb)({
                  type: String,
                  json: {
                    write: { ignoreOrigin: !0 },
                    origins: {
                      'web-scene': { write: { isRequired: !0, ignoreOrigin: !0 } },
                      'portal-item': { write: !1 },
                    },
                  },
                }),
              ],
              t.prototype,
              'id',
              void 0,
            ),
            (0, i._)(
              [
                (0, n.Cb)({
                  json: {
                    write: { ignoreOrigin: !0 },
                    origins: { 'web-map': { read: !1, write: !1 } },
                  },
                }),
              ],
              t.prototype,
              'listMode',
              void 0,
            ),
            (0, i._)([(0, o.w)('listMode')], t.prototype, 'writeListMode', null),
            (0, i._)(
              [
                (0, n.Cb)({
                  type: String,
                  readOnly: !0,
                  json: {
                    read: !1,
                    write: { target: 'layerType', ignoreOrigin: !0 },
                    origins: { 'portal-item': { write: !1 } },
                  },
                }),
              ],
              t.prototype,
              'operationalLayerType',
              void 0,
            ),
            (0, i._)(
              [(0, o.w)('operationalLayerType')],
              t.prototype,
              'writeOperationalLayerType',
              null,
            ),
            (0, i._)([(0, n.Cb)(u.o)], t.prototype, 'opacity', void 0),
            (0, i._)(
              [
                (0, n.Cb)({
                  type: String,
                  json: {
                    write: { ignoreOrigin: !0, allowNull: !0 },
                    origins: {
                      'web-scene': { write: { isRequired: !0, ignoreOrigin: !0, allowNull: !0 } },
                      'portal-item': { write: !1 },
                    },
                  },
                  value: 'Layer',
                }),
              ],
              t.prototype,
              'title',
              void 0,
            ),
            (0, i._)([(0, o.w)('title')], t.prototype, 'writeTitle', null),
            (0, i._)(
              [
                (0, n.Cb)({
                  type: Boolean,
                  json: {
                    name: 'visibility',
                    origins: {
                      'web-document': { name: 'visibility', default: !0 },
                      'portal-item': {
                        name: 'visibility',
                        read: { source: ['visible', 'visibility'] },
                      },
                    },
                  },
                }),
              ],
              t.prototype,
              'visible',
              void 0,
            ),
            (t = (0, i._)([(0, a.j)('esri.layers.mixins.OperationalLayer')], t)),
            t
          );
        };
    },
    62162: (e, t, r) => {
      'use strict';
      r.d(t, { P: () => w });
      var i = r(29768),
        s = r(88762),
        n = r(82058),
        a = r(41864),
        o = r(60991),
        l = r(92143),
        u = r(76506),
        d = r(50406),
        p = r(32101),
        c = r(34250),
        y = (r(91306), r(97714)),
        m = r(17533),
        h = r(2906),
        g = r(49900),
        f = r(56420),
        v = r(74653);
      const b = l.L.getLogger('esri.layers.mixins.PortalLayer'),
        w = (e) => {
          let t = class extends e {
            constructor() {
              super(...arguments),
                (this.resourceReferences = { portalItem: null, paths: [] }),
                (this.userHasEditingPrivileges = !0);
            }
            destroy() {
              var e;
              null == (e = this.portalItem) || e.destroy(), (this.portalItem = null);
            }
            set portalItem(e) {
              e !== this._get('portalItem') &&
                (this.removeOrigin('portal-item'), this._set('portalItem', e));
            }
            readPortalItem(e, t, r) {
              if (t.itemId) return new f.default({ id: t.itemId, portal: r && r.portal });
            }
            writePortalItem(e, t) {
              e && e.id && (t.itemId = e.id);
            }
            async loadFromPortal(e, t) {
              if (this.portalItem && this.portalItem.id)
                try {
                  const i = await r
                    .e(8642)
                    .then(r.bind(r, 8642))
                    .then(function (e) {
                      return e.l;
                    });
                  return (
                    (0, d.k_)(t),
                    await i.load(
                      {
                        instance: this,
                        supportedTypes: e.supportedTypes,
                        validateItem: e.validateItem,
                        supportsData: e.supportsData,
                      },
                      t,
                    )
                  );
                } catch (e) {
                  throw (
                    ((0, d.D_)(e) ||
                      b.warn(
                        `Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n  ${e}`,
                      ),
                    e)
                  );
                }
            }
            async finishLoadEditablePortalLayer(e) {
              this._set(
                'userHasEditingPrivileges',
                await this.fetchUserHasEditingPrivileges(e).catch((e) => ((0, d.r9)(e), !0)),
              );
            }
            async fetchUserHasEditingPrivileges(e) {
              const t = this.url ? (null == s.id ? void 0 : s.id.findCredential(this.url)) : null;
              if (!t) return !0;
              const r = S.credential === t ? S.user : await this.fetchEditingUser(e);
              return (
                (S.credential = t),
                (S.user = r),
                (0, u.b)(r) || null == r.privileges || r.privileges.includes('features:user:edit')
              );
            }
            async fetchEditingUser(e) {
              var t, r;
              const i = null == (t = this.portalItem) || null == (r = t.portal) ? void 0 : r.user;
              if (i) return i;
              const o = s.id.findServerInfo(this.url);
              if (null == o || !o.owningSystemUrl) return null;
              const l = `${o.owningSystemUrl}/sharing/rest`,
                d = g.Z.getDefault();
              if (d && d.loaded && (0, p.Fv)(d.restUrl) === (0, p.Fv)(l)) return d.user;
              const c = `${l}/community/self`,
                y = (0, u.i)(e) ? e.signal : null,
                m = await (0, a.r)(
                  (0, n.default)(c, { authMode: 'no-prompt', query: { f: 'json' }, signal: y }),
                );
              return m.ok ? v.default.fromJSON(m.value.data) : null;
            }
            read(e, t) {
              t && (t.layer = this), super.read(e, t);
            }
            write(e, t) {
              const r = t && t.portal,
                i =
                  this.portalItem &&
                  this.portalItem.id &&
                  (this.portalItem.portal || g.Z.getDefault());
              return r && i && !(0, p.tm)(i.restUrl, r.restUrl)
                ? (t.messages &&
                    t.messages.push(
                      new o.Z(
                        'layer:cross-portal',
                        `The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save the scene, set the layer.portalItem to null or save the scene to the same portal as the item associated with the layer`,
                        { layer: this },
                      ),
                    ),
                  null)
                : super.write(e, { ...t, layer: this });
            }
          };
          return (
            (0, i._)([(0, c.Cb)({ type: f.default })], t.prototype, 'portalItem', null),
            (0, i._)(
              [(0, y.r)('web-document', 'portalItem', ['itemId'])],
              t.prototype,
              'readPortalItem',
              null,
            ),
            (0, i._)(
              [(0, h.w)('web-document', 'portalItem', { itemId: { type: String } })],
              t.prototype,
              'writePortalItem',
              null,
            ),
            (0, i._)([(0, c.Cb)()], t.prototype, 'resourceReferences', void 0),
            (0, i._)(
              [(0, c.Cb)({ readOnly: !0 })],
              t.prototype,
              'userHasEditingPrivileges',
              void 0,
            ),
            (t = (0, i._)([(0, m.j)('esri.layers.mixins.PortalLayer')], t)),
            t
          );
        },
        S = { credential: null, user: null };
    },
    58912: (e, t, r) => {
      'use strict';
      r.d(t, { S: () => a });
      var i = r(29768),
        s = r(34250),
        n = (r(76506), r(91306), r(92143), r(17533));
      const a = (e) => {
        let t = class extends e {
          constructor() {
            super(...arguments), (this.minScale = 0), (this.maxScale = 0);
          }
          get scaleRangeId() {
            return `${this.minScale},${this.maxScale}`;
          }
        };
        return (
          (0, i._)(
            [(0, s.Cb)({ type: Number, nonNullable: !0, json: { write: !0 } })],
            t.prototype,
            'minScale',
            void 0,
          ),
          (0, i._)(
            [(0, s.Cb)({ type: Number, nonNullable: !0, json: { write: !0 } })],
            t.prototype,
            'maxScale',
            void 0,
          ),
          (0, i._)([(0, s.Cb)({ readOnly: !0 })], t.prototype, 'scaleRangeId', null),
          (t = (0, i._)([(0, n.j)('esri.layers.mixins.ScaleRangeLayer')], t)),
          t
        );
      };
    },
    43022: (e, t, r) => {
      'use strict';
      r.d(t, {
        a: () => f,
        b: () => y,
        c: () => I,
        d: () => u,
        e: () => m,
        f: () => v,
        i: () => w,
        l: () => p,
        m: () => S,
        o: () => g,
        p: () => d,
        r: () => h,
        s: () => b,
        u: () => c,
      });
      var i = r(93314),
        s = r(21801),
        n = r(60947),
        a = r(38742),
        o = r(47842),
        l = r(34394);
      const u = {
          type: Boolean,
          value: !0,
          json: {
            origins: { service: { read: !1, write: !1 }, 'web-map': { read: !1, write: !1 } },
            name: 'screenSizePerspective',
            write: !0,
          },
        },
        d = {
          type: Boolean,
          value: !0,
          json: {
            name: 'disablePopup',
            read: { reader: (e, t) => !t.disablePopup },
            write: {
              enabled: !0,
              writer(e, t, r) {
                t[r] = !e;
              },
            },
          },
        },
        p = { type: Boolean, value: !0, json: { name: 'showLabels', write: !0 } },
        c = {
          type: String,
          json: {
            origins: { 'portal-item': { write: !1 } },
            write: { isRequired: !0, ignoreOrigin: !0, writer: a.w },
          },
        },
        y = {
          type: Boolean,
          value: !0,
          json: { origins: { service: { read: { enabled: !1 } } }, name: 'showLegend', write: !0 },
        },
        m = {
          value: null,
          type: o.E,
          json: {
            origins: { service: { name: 'elevationInfo', write: !0 } },
            name: 'layerDefinition.elevationInfo',
            write: !0,
          },
        };
      function h(e) {
        return { type: e, readOnly: !0, json: { origins: { service: { read: !0 } }, read: !1 } };
      }
      const g = {
          type: Number,
          json: {
            origins: {
              'web-document': { default: 1, write: !0, read: !0 },
              'portal-item': { write: !0 },
            },
          },
        },
        f = {
          ...g,
          json: {
            ...g.json,
            origins: {
              'web-document': {
                ...g.json.origins['web-document'],
                write: {
                  enabled: !0,
                  target: {
                    opacity: { type: Number },
                    'layerDefinition.drawingInfo.transparency': { type: Number },
                  },
                },
              },
            },
            read: {
              source: ['layerDefinition.drawingInfo.transparency', 'drawingInfo.transparency'],
              reader: (e, t, r) =>
                (r && 'service' !== r.origin) ||
                !t.drawingInfo ||
                void 0 === t.drawingInfo.transparency
                  ? t.layerDefinition &&
                    t.layerDefinition.drawingInfo &&
                    void 0 !== t.layerDefinition.drawingInfo.transparency
                    ? (0, l.t)(t.layerDefinition.drawingInfo.transparency)
                    : void 0
                  : (0, l.t)(t.drawingInfo.transparency),
            },
          },
        },
        v = {
          type: i.Z,
          readOnly: !0,
          get() {
            var e, t;
            if (null == (e = this.layer) || !e.timeInfo) return null;
            const r = null == (t = this.view) ? void 0 : t.timeExtent,
              i = this.layer.timeExtent,
              s = this.layer.useViewTime ? (r && i ? r.intersection(i) : r || i) : i;
            if (!s || s.isEmpty) return s;
            const n = this.layer.timeOffset,
              a = n ? s.offset(-n.value, n.unit) : s,
              o = this._get('timeExtent');
            return a.equals(o) ? o : a;
          },
        },
        b = {
          type: s.Z,
          readOnly: !0,
          json: {
            origins: {
              service: {
                read: {
                  source: ['fullExtent', 'spatialReference'],
                  reader: (e, t) => {
                    const r = s.Z.fromJSON(e);
                    return (
                      null != t.spatialReference &&
                        'object' == typeof t.spatialReference &&
                        (r.spatialReference = n.Z.fromJSON(t.spatialReference)),
                      r
                    );
                  },
                },
              },
            },
            read: !1,
          },
        },
        w = {
          type: String,
          json: { origins: { service: { read: !1 }, 'portal-item': { read: !1 } } },
        },
        S = {
          type: Number,
          json: {
            origins: { service: { write: { enabled: !1 } } },
            read: { source: 'layerDefinition.minScale' },
            write: { target: 'layerDefinition.minScale' },
          },
        },
        I = {
          type: Number,
          json: {
            origins: { service: { write: { enabled: !1 } } },
            read: { source: 'layerDefinition.maxScale' },
            write: { target: 'layerDefinition.maxScale' },
          },
        };
    },
    85557: (e, t, r) => {
      'use strict';
      r.d(t, { m: () => n });
      var i = r(53785),
        s = r(89623);
      const n = {
        inches: (0, i.c)(1, 'meters', 'inches'),
        feet: (0, i.c)(1, 'meters', 'feet'),
        'us-feet': (0, i.c)(1, 'meters', 'us-feet'),
        yards: (0, i.c)(1, 'meters', 'yards'),
        miles: (0, i.c)(1, 'meters', 'miles'),
        'nautical-miles': (0, i.c)(1, 'meters', 'nautical-miles'),
        millimeters: (0, i.c)(1, 'meters', 'millimeters'),
        centimeters: (0, i.c)(1, 'meters', 'centimeters'),
        decimeters: (0, i.c)(1, 'meters', 'decimeters'),
        meters: (0, i.c)(1, 'meters', 'meters'),
        kilometers: (0, i.c)(1, 'meters', 'kilometers'),
        'decimal-degrees': 1 / (0, i.l)(1, 'meters', s.e.radius),
      };
    },
    91162: (e, t, r) => {
      'use strict';
      r.d(t, { a: () => l, l: () => o });
      var i = r(41864),
        s = r(15324),
        n = r(22739),
        a = r(76506);
      async function o(e, t) {
        return await e.load(), l(e, t);
      }
      async function l(e, t) {
        const r = [],
          o = (...e) => {
            for (const t of e)
              (0, a.b)(t) ||
                (Array.isArray(t)
                  ? o(...t)
                  : s.Z.isCollection(t)
                  ? t.forEach((e) => o(e))
                  : n.L.isLoadable(t) && r.push(t));
          };
        t(o);
        let l = null;
        if (
          (await (0, i.m)(r, async (e) => {
            var t;
            !1 !==
              (
                await (0, i.r)(
                  ((t = e),
                  'loadAll' in t && 'function' == typeof t.loadAll ? e.loadAll() : e.load()),
                )
              ).ok ||
              l ||
              (l = e);
          }),
          l)
        )
          throw l.loadError;
        return e;
      }
    },
    34394: (e, t, r) => {
      'use strict';
      r.d(t, { o: () => s, t: () => n });
      var i = r(91306);
      function s(e) {
        const t = (0, i.m)(100 * (1 - e));
        return Math.max(0, Math.min(t, 100));
      }
      function n(e) {
        const t = 1 - e / 100;
        return Math.max(0, Math.min(t, 1));
      }
    },
    35197: (e, t, r) => {
      'use strict';
      r.d(t, { c: () => o, o: () => n, t: () => a }), r(76506);
      const i = {
          milliseconds: 1,
          seconds: 1e3,
          minutes: 6e4,
          hours: 36e5,
          days: 864e5,
          weeks: 6048e5,
          months: 26784e5,
          years: 31536e6,
          decades: 31536e7,
          centuries: 31536e8,
        },
        s = {
          milliseconds: { getter: 'getMilliseconds', setter: 'setMilliseconds', multiplier: 1 },
          seconds: { getter: 'getSeconds', setter: 'setSeconds', multiplier: 1 },
          minutes: { getter: 'getMinutes', setter: 'setMinutes', multiplier: 1 },
          hours: { getter: 'getHours', setter: 'setHours', multiplier: 1 },
          days: { getter: 'getDate', setter: 'setDate', multiplier: 1 },
          weeks: { getter: 'getDate', setter: 'setDate', multiplier: 7 },
          months: { getter: 'getMonth', setter: 'setMonth', multiplier: 1 },
          years: { getter: 'getFullYear', setter: 'setFullYear', multiplier: 1 },
          decades: { getter: 'getFullYear', setter: 'setFullYear', multiplier: 10 },
          centuries: { getter: 'getFullYear', setter: 'setFullYear', multiplier: 100 },
        };
      function n(e, t, r) {
        const i = new Date(e.getTime());
        if (t && r) {
          const e = s[r],
            { getter: n, setter: a, multiplier: o } = e;
          i[a](i[n]() + t * o);
        }
        return i;
      }
      function a(e, t) {
        switch (t) {
          case 'milliseconds':
            return new Date(e.getTime());
          case 'seconds':
            return new Date(
              e.getFullYear(),
              e.getMonth(),
              e.getDate(),
              e.getHours(),
              e.getMinutes(),
              e.getSeconds(),
            );
          case 'minutes':
            return new Date(
              e.getFullYear(),
              e.getMonth(),
              e.getDate(),
              e.getHours(),
              e.getMinutes(),
            );
          case 'hours':
            return new Date(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours());
          case 'days':
            return new Date(e.getFullYear(), e.getMonth(), e.getDate());
          case 'weeks':
            return new Date(e.getFullYear(), e.getMonth(), e.getDate() - e.getDay());
          case 'months':
            return new Date(e.getFullYear(), e.getMonth(), 1);
          case 'years':
            return new Date(e.getFullYear(), 0, 1);
          case 'decades':
            return new Date(e.getFullYear() - (e.getFullYear() % 10), 0, 1);
          case 'centuries':
            return new Date(e.getFullYear() - (e.getFullYear() % 100), 0, 1);
          default:
            return new Date();
        }
      }
      function o(e, t, r) {
        return 0 === e ? 0 : (e * i[t]) / i[r];
      }
    },
    17298: (e, t, r) => {
      'use strict';
      r.d(t, { s: () => s });
      var i = r(85557);
      const s = (function () {
        const e = Object.keys(i.m);
        return e.sort(), e;
      })();
    },
    88610: (e, t, r) => {
      'use strict';
      r.d(t, { g: () => c });
      var i = r(60991),
        s = r(76506),
        n = r(71552),
        a = r(17533);
      const o = new Set([
          'bing-maps',
          'imagery',
          'imagery-tile',
          'map-image',
          'open-street-map',
          'tile',
          'unknown',
          'unsupported',
          'vector-tile',
          'web-tile',
        ]),
        l = new Set([
          'csv',
          'feature',
          'geo-rss',
          'group',
          'imagery',
          'imagery-tile',
          'kml',
          'map-image',
          'map-notes',
          'ogc-feature',
          'tile',
          'unknown',
          'unsupported',
          'vector-tile',
          'web-tile',
          'wfs',
        ]);
      function u(e) {
        return !('feature' !== e.type || e.url || !e.source || 'memory' !== e.source.type);
      }
      function d(e, t) {
        if (t.restrictedWebMapWriting) {
          const r = (function (e) {
            return 'basemap' === e.layerContainerType
              ? o
              : 'operational-layers' === e.layerContainerType
              ? l
              : null;
          })(t);
          return !(0, s.i)(r) || (r.has(e.type) && !u(e));
        }
        return !0;
      }
      function p(e, t) {
        'maxScale' in e && (t.maxScale = (0, a.n)(e.maxScale)),
          'minScale' in e && (t.minScale = (0, a.n)(e.minScale));
      }
      function c(e, t, r) {
        if (!('write' in e) || !e.write)
          return (
            r &&
              r.messages &&
              r.messages.push(
                new i.Z(
                  'layer:unsupported',
                  `Layers (${e.title}, ${e.id}) of type '${e.declaredClass}' cannot be persisted`,
                  { layer: e },
                ),
              ),
            null
          );
        if (d(e, r)) {
          const t = {};
          return e.write(t, r) ? t : null;
        }
        return (
          (0, s.i)(t) &&
            (function (e, t) {
              if (
                ((function (e, t) {
                  if (u(e)) {
                    const r = (0, n.g)('featureCollection.layers', t),
                      i = r && r[0] && r[0].layerDefinition;
                    i && p(e, i);
                  } else
                    'stream' === e.type
                      ? p(e, (t.layerDefinition = t.layerDefinition || {}))
                      : 'group' !== e.type && p(e, t);
                })(e, t),
                'blendMode' in e &&
                  ((t.blendMode = e.blendMode), 'normal' === t.blendMode && delete t.blendMode),
                (t.opacity = (0, a.n)(e.opacity)),
                (t.title = e.title || 'Layer'),
                (t.visibility = e.visible),
                'legendEnabled' in e && 'wmts' !== e.type)
              )
                if (u(e)) {
                  const r = t.featureCollection;
                  r && (r.showLegend = e.legendEnabled);
                } else t.showLegend = e.legendEnabled;
            })(e, (t = (0, s.d9)(t))),
          t
        );
      }
    },
    1128: (e, t, r) => {
      'use strict';
      r.r(t), r.d(t, { default: () => C });
      var i = r(29768),
        s = r(91162),
        n = r(76506),
        a = r(54179),
        o = r(34250),
        l = r(86656),
        u = (r(91306), r(92143)),
        d = r(17533),
        p = r(2906),
        c = r(41617),
        y = r(11118),
        m = r(89440),
        h = r(62162),
        g = r(58912),
        f = r(15324),
        v = r(10401),
        b = r(50406);
      function w(e) {
        return e && 'group' === e.type;
      }
      function S(e, t, r) {
        let i, s;
        if (e)
          for (let n = 0, a = e.length; n < a; n++) {
            if (((i = e.getItemAt(n)), i[t] === r)) return i;
            if (w(i) && ((s = S(i.layers, t, r)), s)) return s;
          }
      }
      const I = u.L.getLogger('esri.support.LayersMixin'),
        L = (e) => {
          let t = class extends e {
            constructor(...e) {
              super(...e), (this.layers = new f.Z());
              const t = (e) => {
                  (e.parent = this),
                    this.layerAdded(e),
                    ('elevation' !== e.type && 'base-elevation' !== e.type) ||
                      I.error(
                        `Layer 'title:${e.title}, id:${e.id}' of type '${e.type}' is not supported as an operational layer and will therefore be ignored.`,
                      );
                },
                r = (e) => {
                  (e.parent = null), this.layerRemoved(e);
                };
              this.layers.on('before-add', (e) => {
                var t;
                (t = e.item).parent && 'remove' in t.parent && t.parent.remove(t);
              }),
                this.layers.on('after-add', (e) => t(e.item)),
                this.layers.on('after-remove', (e) => r(e.item));
            }
            destroy() {
              const e = this.layers.removeAll();
              for (const t of e) this.layerRemoved(t), t.destroy();
              this.layers.destroy();
            }
            set layers(e) {
              this._set('layers', (0, v.r)(e, this._get('layers')));
            }
            add(e, t) {
              const r = this.layers;
              if (((t = r.getNextIndex(t)), e instanceof c.Z)) {
                const i = e;
                i.parent === this ? this.reorder(i, t) : r.add(i, t);
              } else
                (0, b.y8)(e)
                  ? e.then((e) => {
                      this.destroyed || this.add(e, t);
                    })
                  : I.error(
                      '#add()',
                      'The item being added is not a Layer or a Promise that resolves to a Layer.',
                    );
            }
            addMany(e, t) {
              const r = this.layers;
              (t = r.getNextIndex(t)),
                e.slice().forEach((e) => {
                  e.parent !== this ? (r.add(e, t), (t += 1)) : this.reorder(e, t);
                });
            }
            findLayerById(e) {
              return S(this.layers, 'id', e);
            }
            findLayerByUid(e) {
              return S(this.layers, 'uid', e);
            }
            remove(e) {
              return this.layers.remove(e);
            }
            removeMany(e) {
              return this.layers.removeMany(e);
            }
            removeAll() {
              return this.layers.removeAll();
            }
            reorder(e, t) {
              return this.layers.reorder(e, t);
            }
            layerAdded(e) {}
            layerRemoved(e) {}
          };
          return (
            (0, i._)([(0, o.Cb)()], t.prototype, 'layers', null),
            (t = (0, i._)([(0, d.j)('esri.support.LayersMixin')], t)),
            t
          );
        },
        _ = u.L.getLogger('esri.support.TablesMixin');
      function T(e) {
        return e && 'group' === e.type;
      }
      function x(e, t, r) {
        if (e)
          for (let i = 0, s = e.length; i < s; i++) {
            const s = e.getItemAt(i);
            if (s[t] === r) return s;
            if (T(s)) {
              const e = x(s.tables, t, r);
              if (e) return e;
            }
          }
      }
      const M = (e) => {
        let t = class extends e {
          constructor(...e) {
            super(...e),
              (this.tables = new f.Z()),
              this.tables.on('after-add', (e) => {
                const t = e.item;
                t.parent && t.parent !== this && 'tables' in t.parent && t.parent.tables.remove(t),
                  (t.parent = this),
                  'feature' !== t.type &&
                    _.error(
                      `Layer 'title:${t.title}, id:${t.id}' of type '${t.type}' is not supported as a table and will therefore be ignored.`,
                    );
              }),
              this.tables.on('after-remove', (e) => {
                e.item.parent = null;
              });
          }
          destroy() {
            const e = this.tables.removeAll();
            for (const t of e) t.destroy();
            this.tables.destroy();
          }
          set tables(e) {
            this._set('tables', (0, v.r)(e, this._get('tables')));
          }
          findTableById(e) {
            return x(this.tables, 'id', e);
          }
          findTableByUid(e) {
            return x(this.tables, 'uid', e);
          }
        };
        return (
          (0, i._)([(0, o.Cb)()], t.prototype, 'tables', null),
          (t = (0, i._)([(0, d.j)('esri.support.TablesMixin')], t)),
          t
        );
      };
      var E = r(88610);
      r(41864),
        r(60991),
        r(81172),
        r(71552),
        r(31450),
        r(40642),
        r(91055),
        r(76996),
        r(21972),
        r(23639),
        r(27794),
        r(6906),
        r(22723),
        r(22739),
        r(20543),
        r(50161),
        r(26341),
        r(74569),
        r(21801),
        r(73796),
        r(74673),
        r(97714),
        r(60947),
        r(91597),
        r(86787),
        r(35132),
        r(89623),
        r(84069),
        r(44567),
        r(98380),
        r(92896),
        r(22781),
        r(57251),
        r(32422),
        r(82058),
        r(88762),
        r(32101),
        r(82673),
        r(43022),
        r(93314),
        r(35197),
        r(38742),
        r(47842),
        r(14249),
        r(9801),
        r(53523),
        r(59465),
        r(42911),
        r(46826),
        r(45433),
        r(60217),
        r(17298),
        r(85557),
        r(53785),
        r(95587),
        r(34394),
        r(49900),
        r(66284),
        r(33921),
        r(3482),
        r(73173),
        r(67477),
        r(78533),
        r(74653),
        r(91091),
        r(58943),
        r(56420),
        r(74742),
        r(28239);
      let A = class extends (0, y.B)((0, g.S)((0, m.O)((0, h.P)(M(L((0, a.M)(c.Z))))))) {
        constructor(e) {
          super(e),
            (this._visibilityHandles = {}),
            (this.fullExtent = void 0),
            (this.operationalLayerType = 'GroupLayer'),
            (this.spatialReference = void 0),
            (this.type = 'group'),
            (this._visibilityWatcher = this._visibilityWatcher.bind(this));
        }
        initialize() {
          this._enforceVisibility(this.visibilityMode, this.visible),
            this.watch('visible', this._visibleWatcher.bind(this), !0);
        }
        _writeLayers(e, t, r, i) {
          const s = [];
          if (!e) return s;
          e.forEach((e) => {
            const t = (0, E.g)(e, i.webmap ? i.webmap.getLayerJSONFromResourceInfo(e) : null, i);
            (0, n.i)(t) && t.layerType && s.push(t);
          }),
            (t.layers = s);
        }
        set portalItem(e) {
          this._set('portalItem', e);
        }
        set visibilityMode(e) {
          const t = this._get('visibilityMode') !== e;
          this._set('visibilityMode', e), t && this._enforceVisibility(e, this.visible);
        }
        load(e) {
          return (
            this.addResolvingPromise(
              this.loadFromPortal(
                { supportedTypes: ['Feature Service', 'Feature Collection', 'Scene Service'] },
                e,
              ),
            ),
            Promise.resolve(this)
          );
        }
        loadAll() {
          return (0, s.l)(this, (e) => {
            e(this.layers);
          });
        }
        layerAdded(e) {
          e.visible && 'exclusive' === this.visibilityMode
            ? this._turnOffOtherLayers(e)
            : 'inherited' === this.visibilityMode && (e.visible = this.visible),
            (this._visibilityHandles[e.uid] = e.watch('visible', this._visibilityWatcher, !0));
        }
        layerRemoved(e) {
          const t = this._visibilityHandles[e.uid];
          t && (t.remove(), delete this._visibilityHandles[e.uid]),
            this._enforceVisibility(this.visibilityMode, this.visible);
        }
        _turnOffOtherLayers(e) {
          this.layers.forEach((t) => {
            t !== e && (t.visible = !1);
          });
        }
        _enforceVisibility(e, t) {
          if (!(0, l.g)(this).initialized) return;
          const r = this.layers;
          let i = r.find((e) => e.visible);
          switch (e) {
            case 'exclusive':
              r.length && !i && ((i = r.getItemAt(0)), (i.visible = !0)),
                this._turnOffOtherLayers(i);
              break;
            case 'inherited':
              r.forEach((e) => {
                e.visible = t;
              });
          }
        }
        _visibleWatcher(e) {
          'inherited' === this.visibilityMode &&
            this.layers.forEach((t) => {
              t.visible = e;
            });
        }
        _visibilityWatcher(e, t, r, i) {
          const s = i;
          switch (this.visibilityMode) {
            case 'exclusive':
              e ? this._turnOffOtherLayers(s) : this._isAnyLayerVisible() || (s.visible = !0);
              break;
            case 'inherited':
              s.visible = this.visible;
          }
        }
        _isAnyLayerVisible() {
          return this.layers.some((e) => e.visible);
        }
      };
      (0, i._)([(0, o.Cb)()], A.prototype, 'fullExtent', void 0),
        (0, i._)(
          [(0, o.Cb)({ json: { read: !1, write: { ignoreOrigin: !0 } } })],
          A.prototype,
          'layers',
          void 0,
        ),
        (0, i._)([(0, p.w)('layers')], A.prototype, '_writeLayers', null),
        (0, i._)(
          [(0, o.Cb)({ type: ['GroupLayer'] })],
          A.prototype,
          'operationalLayerType',
          void 0,
        ),
        (0, i._)(
          [(0, o.Cb)({ json: { origins: { 'web-document': { read: !1, write: !1 } } } })],
          A.prototype,
          'portalItem',
          null,
        ),
        (0, i._)([(0, o.Cb)()], A.prototype, 'spatialReference', void 0),
        (0, i._)(
          [(0, o.Cb)({ json: { read: !1 }, readOnly: !0, value: 'group' })],
          A.prototype,
          'type',
          void 0,
        ),
        (0, i._)(
          [
            (0, o.Cb)({
              type: ['independent', 'inherited', 'exclusive'],
              value: 'independent',
              json: { write: !0, origins: { 'web-map': { read: !1, write: !1 } } },
            }),
          ],
          A.prototype,
          'visibilityMode',
          null,
        ),
        (A = (0, i._)([(0, d.j)('esri.layers.GroupLayer')], A));
      const C = A;
    },
  },
]);
