(self.webpackChunkRemoteClient = self.webpackChunkRemoteClient || []).push([
  [3117],
  {
    82673: (t, e, r) => {
      'use strict';
      r.d(e, { I: () => n });
      var i = r(29768),
        s = r(17533);
      let o = 0;
      const n = (t) => {
        let e = class extends t {
          constructor(...t) {
            super(...t),
              Object.defineProperty(this, 'uid', {
                writable: !1,
                configurable: !1,
                value: Date.now().toString(16) + '-object-' + o++,
              });
          }
        };
        return (e = (0, i._)([(0, s.j)('esri.core.Identifiable')], e)), e;
      };
      let a = class extends n(class {}) {};
      a = (0, i._)([(0, s.j)('esri.core.Identifiable')], a);
    },
    54179: (t, e, r) => {
      'use strict';
      r.d(e, { M: () => d, a: () => h });
      var i = r(29768),
        s = r(21972),
        o = r(50161),
        n = r(86656),
        a = r(26341),
        l = r(17533);
      const u = (t) => {
        let e = class extends t {
          constructor(...t) {
            super(...t);
          }
          clear(t, e = 'user') {
            return p(this).delete(t, (0, s.n)(e));
          }
          write(t = {}, e) {
            return (0, a.w)(this, (t = t || {}), e), t;
          }
          setAtOrigin(t, e, r) {
            (0, n.g)(this).setAtOrigin(t, e, (0, s.n)(r));
          }
          removeOrigin(t) {
            const e = p(this),
              r = (0, s.n)(t),
              i = e.keys(r);
            for (const t of i) e.originOf(t) === r && e.set(t, e.get(t, r), 6);
          }
          updateOrigin(t, e) {
            const r = p(this),
              i = (0, s.n)(e),
              o = this.get(t);
            for (let e = i + 1; e < s.b; ++e) r.delete(t, e);
            r.set(t, o, i);
          }
          toJSON(t) {
            return this.write({}, t);
          }
        };
        return (
          (e = (0, i._)([(0, l.j)('esri.core.WriteableMultiOriginJSONSupport')], e)),
          (e.prototype.toJSON.isDefaultToJSON = !0),
          e
        );
      };
      function p(t) {
        return (0, n.g)(t).store;
      }
      const d = (t) => {
        let e = class extends u((0, o.R)(t)) {
          constructor(...t) {
            super(...t);
          }
        };
        return (e = (0, i._)([(0, l.j)('esri.core.MultiOriginJSONSupport')], e)), e;
      };
      let h = class extends d(s.Z) {};
      h = (0, i._)([(0, l.j)('esri.core.MultiOriginJSONSupport')], h);
    },
    62162: (t, e, r) => {
      'use strict';
      r.d(e, { P: () => _ });
      var i = r(29768),
        s = r(88762),
        o = r(82058),
        n = r(41864),
        a = r(60991),
        l = r(92143),
        u = r(76506),
        p = r(50406),
        d = r(32101),
        h = r(34250),
        c = (r(91306), r(97714)),
        y = r(17533),
        g = r(2906),
        f = r(49900),
        v = r(56420),
        m = r(74653);
      const b = l.L.getLogger('esri.layers.mixins.PortalLayer'),
        _ = (t) => {
          let e = class extends t {
            constructor() {
              super(...arguments),
                (this.resourceReferences = { portalItem: null, paths: [] }),
                (this.userHasEditingPrivileges = !0);
            }
            destroy() {
              var t;
              null == (t = this.portalItem) || t.destroy(), (this.portalItem = null);
            }
            set portalItem(t) {
              t !== this._get('portalItem') &&
                (this.removeOrigin('portal-item'), this._set('portalItem', t));
            }
            readPortalItem(t, e, r) {
              if (e.itemId) return new v.default({ id: e.itemId, portal: r && r.portal });
            }
            writePortalItem(t, e) {
              t && t.id && (e.itemId = t.id);
            }
            async loadFromPortal(t, e) {
              if (this.portalItem && this.portalItem.id)
                try {
                  const i = await r
                    .e(8642)
                    .then(r.bind(r, 8642))
                    .then(function (t) {
                      return t.l;
                    });
                  return (
                    (0, p.k_)(e),
                    await i.load(
                      {
                        instance: this,
                        supportedTypes: t.supportedTypes,
                        validateItem: t.validateItem,
                        supportsData: t.supportsData,
                      },
                      e,
                    )
                  );
                } catch (t) {
                  throw (
                    ((0, p.D_)(t) ||
                      b.warn(
                        `Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n  ${t}`,
                      ),
                    t)
                  );
                }
            }
            async finishLoadEditablePortalLayer(t) {
              this._set(
                'userHasEditingPrivileges',
                await this.fetchUserHasEditingPrivileges(t).catch((t) => ((0, p.r9)(t), !0)),
              );
            }
            async fetchUserHasEditingPrivileges(t) {
              const e = this.url ? (null == s.id ? void 0 : s.id.findCredential(this.url)) : null;
              if (!e) return !0;
              const r = w.credential === e ? w.user : await this.fetchEditingUser(t);
              return (
                (w.credential = e),
                (w.user = r),
                (0, u.b)(r) || null == r.privileges || r.privileges.includes('features:user:edit')
              );
            }
            async fetchEditingUser(t) {
              var e, r;
              const i = null == (e = this.portalItem) || null == (r = e.portal) ? void 0 : r.user;
              if (i) return i;
              const a = s.id.findServerInfo(this.url);
              if (null == a || !a.owningSystemUrl) return null;
              const l = `${a.owningSystemUrl}/sharing/rest`,
                p = f.Z.getDefault();
              if (p && p.loaded && (0, d.Fv)(p.restUrl) === (0, d.Fv)(l)) return p.user;
              const h = `${l}/community/self`,
                c = (0, u.i)(t) ? t.signal : null,
                y = await (0, n.r)(
                  (0, o.default)(h, { authMode: 'no-prompt', query: { f: 'json' }, signal: c }),
                );
              return y.ok ? m.default.fromJSON(y.value.data) : null;
            }
            read(t, e) {
              e && (e.layer = this), super.read(t, e);
            }
            write(t, e) {
              const r = e && e.portal,
                i =
                  this.portalItem &&
                  this.portalItem.id &&
                  (this.portalItem.portal || f.Z.getDefault());
              return r && i && !(0, d.tm)(i.restUrl, r.restUrl)
                ? (e.messages &&
                    e.messages.push(
                      new a.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(t, { ...e, layer: this });
            }
          };
          return (
            (0, i._)([(0, h.Cb)({ type: v.default })], e.prototype, 'portalItem', null),
            (0, i._)(
              [(0, c.r)('web-document', 'portalItem', ['itemId'])],
              e.prototype,
              'readPortalItem',
              null,
            ),
            (0, i._)(
              [(0, g.w)('web-document', 'portalItem', { itemId: { type: String } })],
              e.prototype,
              'writePortalItem',
              null,
            ),
            (0, i._)([(0, h.Cb)()], e.prototype, 'resourceReferences', void 0),
            (0, i._)(
              [(0, h.Cb)({ readOnly: !0 })],
              e.prototype,
              'userHasEditingPrivileges',
              void 0,
            ),
            (e = (0, i._)([(0, y.j)('esri.layers.mixins.PortalLayer')], e)),
            e
          );
        },
        w = { credential: null, user: null };
    },
    50161: (t, e, r) => {
      'use strict';
      r.d(e, { R: () => p });
      var i = r(29768),
        s = r(21972),
        o = r(76506),
        n = r(26341),
        a = r(86656),
        l = r(17533);
      class u {
        constructor() {
          (this._propertyOriginMap = new Map()),
            (this._originStores = new Array(s.b)),
            (this._values = new Map());
        }
        clone(t) {
          const e = new u(),
            r = this._originStores[0];
          r &&
            r.forEach((t, r) => {
              e.set(r, (0, o.d9)(t), 0);
            });
          for (let r = 2; r < s.b; r++) {
            const i = this._originStores[r];
            i &&
              i.forEach((i, s) => {
                (t && t.has(s)) || e.set(s, (0, o.d9)(i), r);
              });
          }
          return e;
        }
        get(t, e) {
          const r = void 0 === e ? this._values : this._originStores[e];
          return r ? r.get(t) : void 0;
        }
        keys(t) {
          const e = null == t ? this._values : this._originStores[t];
          return e ? [...e.keys()] : [];
        }
        set(t, e, r = 6) {
          let i = this._originStores[r];
          if (
            (i || ((i = new Map()), (this._originStores[r] = i)),
            i.set(t, e),
            !this._values.has(t) || (0, o.a)(this._propertyOriginMap.get(t)) <= r)
          ) {
            const i = this._values.get(t);
            return this._values.set(t, e), this._propertyOriginMap.set(t, r), i !== e;
          }
          return !1;
        }
        delete(t, e = 6) {
          const r = this._originStores[e];
          if (!r) return;
          const i = r.get(t);
          if ((r.delete(t), this._values.has(t) && this._propertyOriginMap.get(t) === e)) {
            this._values.delete(t);
            for (let r = e - 1; r >= 0; r--) {
              const e = this._originStores[r];
              if (e && e.has(t)) {
                this._values.set(t, e.get(t)), this._propertyOriginMap.set(t, r);
                break;
              }
            }
          }
          return i;
        }
        has(t, e) {
          const r = void 0 === e ? this._values : this._originStores[e];
          return !!r && r.has(t);
        }
        revert(t, e) {
          for (; e > 0 && !this.has(t, e); ) --e;
          const r = this._originStores[e],
            i = r && r.get(t),
            s = this._values.get(t);
          return this._values.set(t, i), this._propertyOriginMap.set(t, e), s !== i;
        }
        originOf(t) {
          return this._propertyOriginMap.get(t) || 0;
        }
        forEach(t) {
          this._values.forEach(t);
        }
      }
      const p = (t) => {
        let e = class extends t {
          constructor(...t) {
            super(...t);
            const e = (0, o.a)((0, a.g)(this)),
              r = e.metadatas,
              i = e.store,
              s = new u();
            (e.store = s),
              i.keys().forEach((t) => {
                s.set(t, i.get(t), 0);
              }),
              Object.keys(r).forEach((t) => {
                e.internalGet(t) && s.set(t, e.internalGet(t), 0);
              });
          }
          read(t, e) {
            (0, n.r)(this, t, e);
          }
          getAtOrigin(t, e) {
            const r = d(this),
              i = (0, s.n)(e);
            if ('string' == typeof t) return r.get(t, i);
            const o = {};
            return (
              t.forEach((t) => {
                o[t] = r.get(t, i);
              }),
              o
            );
          }
          originOf(t) {
            return (0, s.c)(this.originIdOf(t));
          }
          originIdOf(t) {
            return d(this).originOf(t);
          }
          revert(t, e) {
            const r = d(this),
              i = (0, s.n)(e),
              o = (0, a.g)(this);
            let n;
            (n = 'string' == typeof t ? ('*' === t ? r.keys(i) : [t]) : t),
              n.forEach((t) => {
                o.invalidate(t), r.revert(t, i), o.commit(t);
              });
          }
        };
        return (e = (0, i._)([(0, l.j)('esri.core.ReadOnlyMultiOriginJSONSupport')], e)), e;
      };
      function d(t) {
        return (0, a.g)(t).store;
      }
      let h = class extends p(s.Z) {};
      h = (0, i._)([(0, l.j)('esri.core.ReadOnlyMultiOriginJSONSupport')], h);
    },
    41617: (t, e, r) => {
      'use strict';
      r.d(e, { Z: () => _ });
      var i = r(29768),
        s = r(31450),
        o = (r(74569), r(82058)),
        n = r(60991),
        a = r(76996),
        l = r(82673),
        u = r(22739),
        p = r(92143),
        d = r(50406),
        h = r(32101),
        c = r(34250),
        y = (r(76506), r(91306), r(17533)),
        g = r(21801),
        f = r(60947);
      r(71552),
        r(73796),
        r(74673),
        r(21972),
        r(23639),
        r(86656),
        r(22723),
        r(91055),
        r(27794),
        r(6906),
        r(40642),
        r(81172),
        r(26341),
        r(97714),
        r(2906),
        r(84069),
        r(91597),
        r(86787),
        r(35132),
        r(89623),
        r(44567),
        r(98380),
        r(92896),
        r(22781),
        r(57251),
        r(32422),
        r(88762),
        r(20543);
      let v = 0;
      const m = p.L.getLogger('esri.layers.Layer');
      let b = class extends a.E.EventedMixin((0, l.I)(u.L)) {
        constructor() {
          super(...arguments),
            (this.attributionDataUrl = null),
            (this.fullExtent = new g.Z(-180, -90, 180, 90, f.Z.WGS84)),
            (this.id = Date.now().toString(16) + '-layer-' + v++),
            (this.legendEnabled = !0),
            (this.listMode = 'show'),
            (this.opacity = 1),
            (this.parent = null),
            (this.popupEnabled = !0),
            (this.attributionVisible = !0),
            (this.spatialReference = f.Z.WGS84),
            (this.title = null),
            (this.type = null),
            (this.url = null),
            (this.visible = !0);
        }
        static async fromArcGISServerUrl(t) {
          const e = 'string' == typeof t ? { url: t } : t,
            i = await r.e(6601).then(r.bind(r, 66601));
          try {
            return await i.fromUrl(e);
          } catch (t) {
            throw (
              (m.error(
                "#fromArcGISServerUrl({ url: '" + e.url + "'})",
                'Failed to create layer from arcgis server url',
                t,
              ),
              t)
            );
          }
        }
        static async fromPortalItem(t) {
          const e = 'portalItem' in t ? t : { portalItem: t },
            i = await r.e(6458).then(r.bind(r, 36458));
          try {
            return await i.fromItem(e);
          } catch (t) {
            const r = e && e.portalItem,
              i = (r && r.id) || 'unset',
              o = (r && r.portal && r.portal.url) || s.Z.portalUrl;
            throw (
              (m.error(
                '#fromPortalItem()',
                "Failed to create layer from portal item (portal: '" + o + "', id: '" + i + "')",
                t,
              ),
              t)
            );
          }
        }
        initialize() {
          this.when().catch((t) => {
            var e, r;
            (0, d.D_)(t) ||
              p.L.getLogger(this.declaredClass).error(
                '#load()',
                `Failed to load layer (title: '${
                  null != (e = this.title) ? e : 'no title'
                }', id: '${null != (r = this.id) ? r : 'no id'}')`,
                { error: t },
              );
          });
        }
        destroy() {
          if (this.parent) {
            const t = this,
              e = this.parent;
            'layers' in e && e.layers.includes(t)
              ? e.layers.remove(t)
              : 'tables' in e && e.tables.includes(t)
              ? e.tables.remove(t)
              : 'baseLayers' in e && e.baseLayers.includes(t)
              ? e.baseLayers.remove(t)
              : 'baseLayers' in e && e.referenceLayers.includes(t) && e.referenceLayers.remove(t);
          }
        }
        get hasAttributionData() {
          return null != this.attributionDataUrl;
        }
        get parsedUrl() {
          const t = this.url;
          return t ? (0, h.mN)(t) : null;
        }
        async fetchAttributionData() {
          const t = this.attributionDataUrl;
          if (this.hasAttributionData && t)
            return (await (0, o.default)(t, { query: { f: 'json' }, responseType: 'json' })).data;
          throw new n.Z('layer:no-attribution-data', 'Layer does not have attribution data');
        }
      };
      (0, i._)([(0, c.Cb)({ type: String })], b.prototype, 'attributionDataUrl', void 0),
        (0, i._)([(0, c.Cb)({ type: g.Z })], b.prototype, 'fullExtent', void 0),
        (0, i._)([(0, c.Cb)({ readOnly: !0 })], b.prototype, 'hasAttributionData', null),
        (0, i._)([(0, c.Cb)({ type: String })], b.prototype, 'id', void 0),
        (0, i._)(
          [(0, c.Cb)({ type: Boolean, nonNullable: !0 })],
          b.prototype,
          'legendEnabled',
          void 0,
        ),
        (0, i._)(
          [(0, c.Cb)({ type: ['show', 'hide', 'hide-children'] })],
          b.prototype,
          'listMode',
          void 0,
        ),
        (0, i._)(
          [(0, c.Cb)({ type: Number, range: { min: 0, max: 1 }, nonNullable: !0 })],
          b.prototype,
          'opacity',
          void 0,
        ),
        (0, i._)([(0, c.Cb)()], b.prototype, 'parent', void 0),
        (0, i._)([(0, c.Cb)({ readOnly: !0 })], b.prototype, 'parsedUrl', null),
        (0, i._)([(0, c.Cb)({ type: Boolean })], b.prototype, 'popupEnabled', void 0),
        (0, i._)([(0, c.Cb)({ type: Boolean })], b.prototype, 'attributionVisible', void 0),
        (0, i._)([(0, c.Cb)({ type: f.Z })], b.prototype, 'spatialReference', void 0),
        (0, i._)([(0, c.Cb)({ type: String })], b.prototype, 'title', void 0),
        (0, i._)(
          [(0, c.Cb)({ type: String, readOnly: !0, json: { read: !1 } })],
          b.prototype,
          'type',
          void 0,
        ),
        (0, i._)([(0, c.Cb)()], b.prototype, 'url', void 0),
        (0, i._)([(0, c.Cb)({ type: Boolean, nonNullable: !0 })], b.prototype, 'visible', void 0),
        (b = (0, i._)([(0, y.j)('esri.layers.Layer')], b));
      const _ = b;
    },
    63117: (t, e, r) => {
      'use strict';
      r.r(e), r.d(e, { default: () => h });
      var i = r(29768),
        s = r(60991),
        o = r(54179),
        n = r(6906),
        a = r(34250),
        l = (r(76506), r(91306), r(92143), r(17533)),
        u = r(41617),
        p = r(62162);
      r(81172),
        r(71552),
        r(31450),
        r(40642),
        r(21972),
        r(23639),
        r(86656),
        r(22723),
        r(91055),
        r(27794),
        r(50406),
        r(50161),
        r(26341),
        r(74569),
        r(21801),
        r(73796),
        r(74673),
        r(97714),
        r(60947),
        r(2906),
        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(76996),
        r(82673),
        r(22739),
        r(20543),
        r(41864),
        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 d = class extends (0, p.P)((0, o.M)(u.Z)) {
        constructor(t) {
          super(t), (this.resourceInfo = null), (this.type = 'unknown');
        }
        initialize() {
          this.addResolvingPromise(
            new Promise((t, e) => {
              (0, n.Os)(() => {
                const t =
                  this.resourceInfo && (this.resourceInfo.layerType || this.resourceInfo.type);
                let r = 'Unknown layer type';
                t && (r += ' ' + t), e(new s.Z('layer:unknown-layer-type', r, { layerType: t }));
              });
            }),
          );
        }
        read(t, e) {
          super.read({ resourceInfo: t }, e);
        }
        write() {
          return null;
        }
      };
      (0, i._)([(0, a.Cb)({ readOnly: !0 })], d.prototype, 'resourceInfo', void 0),
        (0, i._)([(0, a.Cb)({ type: ['show', 'hide'] })], d.prototype, 'listMode', void 0),
        (0, i._)(
          [(0, a.Cb)({ json: { read: !1 }, readOnly: !0, value: 'unknown' })],
          d.prototype,
          'type',
          void 0,
        ),
        (d = (0, i._)([(0, l.j)('esri.layers.UnknownLayer')], d));
      const h = d;
    },
  },
]);
