(self.webpackChunkRemoteClient = self.webpackChunkRemoteClient || []).push([
  [4494],
  {
    68522: (t, e, i) => {
      'use strict';
      function a(t) {
        return 'string' == typeof t ? document.getElementById(t) : t;
      }
      i.d(e, { b: () => a }),
        (() => {
          if ('function' == typeof Element.prototype.closest) return (t, e) => t.closest(e);
          Element.prototype.matches || Element.prototype.msMatchesSelector;
        })();
    },
    45435: (t, e, i) => {
      'use strict';
      i.d(e, { W: () => r, i: () => h, p: () => o });
      var a = i(22723);
      const r = Symbol('widget'),
        n = new WeakMap();
      function o(t, e) {
        const i = e.vnodeSelector;
        if (h(i)) {
          const a = e.properties || {},
            r = a.key || i;
          return {
            vnodeSelector: 'div',
            properties: {
              parentWidget: t,
              widgetConstructor: i,
              key: r,
              widgetProps: { ...a, key: r },
              afterCreate: s,
              afterUpdate: l,
              afterRemoved: c,
            },
            children: void 0,
            text: void 0,
            domNode: null,
          };
        }
        const a = e.children;
        if (a) for (let e = 0; e < a.length; ++e) a[e] = o(t, a[e]);
        return e;
      }
      function s(t, e, i, { parentWidget: r, widgetConstructor: o, widgetProps: s }) {
        const l = new o({ ...s, container: t });
        n.set(t, l),
          null == l.afterCreate || l.afterCreate(l, t),
          r._internalHandles.add((0, a.m)(() => c(t)));
      }
      function l(t, e, i, { widgetProps: a }) {
        const r = n.get(t);
        r && (r.set(a), null == r.afterUpdate || r.afterUpdate(r, t));
      }
      function c(t) {
        const e = n.get(t);
        e && (e.destroy(), n.delete(t));
      }
      function h(t) {
        return 'function' == typeof t && t[r];
      }
    },
    3482: (t, e, i) => {
      'use strict';
      i.d(e, { b: () => m, g: () => h, o: () => d });
      var a,
        r,
        n,
        o = i(76506);
      let s;
      const l =
        null != (a = null == (r = o.g.esriConfig) ? void 0 : r.locale)
          ? a
          : null == (n = o.g.dojoConfig)
          ? void 0
          : n.locale;
      function c() {
        var t, e;
        return null != (t = null != l ? l : null == (e = o.g.navigator) ? void 0 : e.language)
          ? t
          : 'en';
      }
      function h() {
        return void 0 === s && (s = c()), s;
      }
      const u = [];
      function d(t) {
        return (
          u.push(t),
          {
            remove() {
              u.splice(u.indexOf(t), 1);
            },
          }
        );
      }
      const p = [];
      function m(t) {
        return (
          p.push(t),
          {
            remove() {
              u.splice(p.indexOf(t), 1);
            },
          }
        );
      }
      null == o.g.addEventListener ||
        o.g.addEventListener('languagechange', function () {
          const t = null != undefined ? undefined : c();
          s !== t &&
            ((s = t),
            [...p].forEach((e) => {
              e.call(null, t);
            }),
            [...u].forEach((e) => {
              e.call(null, t);
            }));
        });
    },
    26569: (t, e, i) => {
      'use strict';
      i.d(e, { d: () => T });
      var a = i(83073);
      const r = 'http://www.w3.org/2000/svg';
      let n,
        o = [],
        s = (t, e) => {
          let i = {};
          return (
            Object.keys(t).forEach((e) => {
              i[e] = t[e];
            }),
            e &&
              Object.keys(e).forEach((t) => {
                i[t] = e[t];
              }),
            i
          );
        },
        l = (t, e) =>
          t.vnodeSelector === e.vnodeSelector &&
          (t.properties && e.properties
            ? t.properties.key === e.properties.key && t.properties.bind === e.properties.bind
            : !t.properties && !e.properties),
        c = (t) => {
          if ('string' != typeof t) throw new Error('Style values must be strings');
        },
        h = (t, e, i) => {
          if ('' !== e.vnodeSelector) for (let a = i; a < t.length; a++) if (l(t[a], e)) return a;
          return -1;
        },
        u = (t, e, i, a) => {
          let r = t[e];
          if ('' === r.vnodeSelector) return;
          let n = r.properties;
          if (!(n ? (void 0 === n.key ? n.bind : n.key) : void 0))
            for (let n = 0; n < t.length; n++)
              if (n !== e) {
                let e = t[n];
                if (l(e, r))
                  throw new Error(
                    `${i.vnodeSelector} had a ${r.vnodeSelector} child ${
                      'added' === a ? a : 'removed'
                    }, but there is now more than one. You must add unique key properties to make them distinguishable.`,
                  );
              }
        },
        d = (t) => {
          if (t.properties) {
            let e = t.properties.enterAnimation;
            e && e(t.domNode, t.properties);
          }
        },
        p = [],
        m = !1,
        f = (t) => {
          (t.children || []).forEach(f),
            t.properties &&
              t.properties.afterRemoved &&
              t.properties.afterRemoved.apply(t.properties.bind || t.properties, [t.domNode]);
        },
        b = () => {
          (m = !1), p.forEach(f), (p.length = 0);
        },
        g = (t) => {
          p.push(t),
            m ||
              ((m = !0),
              'undefined' != typeof window && 'requestIdleCallback' in window
                ? window.requestIdleCallback(b, { timeout: 16 })
                : setTimeout(b, 16));
        },
        v = (t) => {
          let e = t.domNode;
          if (t.properties) {
            let i = t.properties.exitAnimation;
            if (i) {
              e.style.pointerEvents = 'none';
              let a = () => {
                e.parentNode && (e.parentNode.removeChild(e), g(t));
              };
              return void i(e, a, t.properties);
            }
          }
          e.parentNode && (e.parentNode.removeChild(e), g(t));
        },
        y = (t, e, i) => {
          if (!e) return;
          let n = i.eventHandlerInterceptor,
            o = Object.keys(e),
            s = o.length;
          for (let l = 0; l < s; l++) {
            let s = o[l],
              h = e[s];
            if ('className' === s)
              throw new Error('Property "className" is not supported, use "class".');
            if ('class' === s) k(t, h, !0);
            else if ('classes' === s) {
              let e = Object.keys(h),
                i = e.length;
              for (let a = 0; a < i; a++) {
                let i = e[a];
                h[i] && t.classList.add(i);
              }
            } else if ('styles' === s) {
              let e = Object.keys(h),
                a = e.length;
              for (let r = 0; r < a; r++) {
                let a = e[r],
                  n = h[a];
                n && (c(n), i.styleApplyer(t, a, n));
              }
            } else if ('key' !== s && null != h) {
              let o = typeof h;
              'function' === o
                ? (0 === s.lastIndexOf('on', 0) &&
                    (n && (h = n(s, h, t, e)),
                    'oninput' === s &&
                      (function () {
                        let t = h;
                        h = function (e) {
                          t.apply(this, [e]), (e.target['oninput-value'] = e.target.value);
                        };
                      })()),
                  (t[s] = h))
                : i.namespace === r
                ? 'href' === s
                  ? t.setAttributeNS('http://www.w3.org/1999/xlink', s, h)
                  : t.setAttribute(s, h)
                : 'string' === o && 'value' !== s
                ? 'innerHTML' === s
                  ? (t[s] = a.r.sanitize(h))
                  : t.setAttribute(s, h)
                : (t[s] = h);
            }
          }
        },
        w = (t, e, i) => {
          ((t, e, i) => {
            if (e) for (let a of e) x(a, t, void 0, i);
          })(t, e.children, i),
            e.text && (t.textContent = e.text),
            y(t, e.properties, i),
            e.properties &&
              e.properties.afterCreate &&
              e.properties.afterCreate.apply(e.properties.bind || e.properties, [
                t,
                i,
                e.vnodeSelector,
                e.properties,
                e.children,
              ]);
        },
        x = (t, e, i, a) => {
          let n,
            o = 0,
            l = t.vnodeSelector,
            c = e.ownerDocument;
          if ('' === l)
            (n = t.domNode = c.createTextNode(t.text)),
              void 0 !== i ? e.insertBefore(n, i) : e.appendChild(n);
          else {
            for (let h = 0; h <= l.length; ++h) {
              let u = l.charAt(h);
              if (h === l.length || '.' === u || '#' === u) {
                let u = l.charAt(o - 1),
                  d = l.slice(o, h);
                '.' === u
                  ? n.classList.add(d)
                  : '#' === u
                  ? (n.id = d)
                  : ('svg' === d && (a = s(a, { namespace: r })),
                    void 0 !== a.namespace
                      ? (n = t.domNode = c.createElementNS(a.namespace, d))
                      : ((n = t.domNode = t.domNode || c.createElement(d)),
                        'input' === d &&
                          t.properties &&
                          void 0 !== t.properties.type &&
                          n.setAttribute('type', t.properties.type)),
                    void 0 !== i ? e.insertBefore(n, i) : n.parentNode !== e && e.appendChild(n)),
                  (o = h + 1);
              }
            }
            w(n, t, a);
          }
        },
        k = (t, e, i) => {
          e &&
            e.split(' ').forEach((e) => {
              e && t.classList.toggle(e, i);
            });
        };
      n = (t, e, i) => {
        let p = t.domNode,
          m = !1;
        if (t === e) return !1;
        let f = !1;
        if ('' === e.vnodeSelector) {
          if (e.text !== t.text) {
            let t = p.ownerDocument.createTextNode(e.text);
            return p.parentNode.replaceChild(t, p), (e.domNode = t), (m = !0), m;
          }
          e.domNode = p;
        } else
          0 === e.vnodeSelector.lastIndexOf('svg', 0) && (i = s(i, { namespace: r })),
            t.text !== e.text &&
              ((f = !0),
              void 0 === e.text ? p.removeChild(p.firstChild) : (p.textContent = e.text)),
            (e.domNode = p),
            (f =
              ((t, e, i, a, r) => {
                if (i === a) return !1;
                a = a || o;
                let s,
                  c = (i = i || o).length,
                  p = a.length,
                  m = 0,
                  f = 0,
                  b = !1;
                for (; f < p; ) {
                  let o = m < c ? i[m] : void 0,
                    p = a[f];
                  if (void 0 !== o && l(o, p)) (b = n(o, p, r) || b), m++;
                  else {
                    let o = h(i, p, m + 1);
                    if (o >= 0) {
                      for (s = m; s < o; s++) v(i[s]), u(i, s, t, 'removed');
                      (b = n(i[o], p, r) || b), (m = o + 1);
                    } else x(p, e, m < c ? i[m].domNode : void 0, r), d(p), u(a, f, t, 'added');
                  }
                  f++;
                }
                if (c > m) for (s = m; s < c; s++) v(i[s]), u(i, s, t, 'removed');
                return b;
              })(e, p, t.children, e.children, i) || f),
            (f =
              ((t, e, i, n) => {
                if (!i) return;
                let o = !1,
                  s = Object.keys(i),
                  l = s.length;
                for (let h = 0; h < l; h++) {
                  let l = s[h],
                    u = i[l],
                    d = e[l];
                  if ('class' === l) d !== u && (k(t, d, !1), k(t, u, !0));
                  else if ('classes' === l) {
                    let e = t.classList,
                      i = Object.keys(u),
                      a = i.length;
                    for (let t = 0; t < a; t++) {
                      let a = i[t],
                        r = !!u[a];
                      r !== !!d[a] && ((o = !0), r ? e.add(a) : e.remove(a));
                    }
                  } else if ('styles' === l) {
                    let e = Object.keys(u),
                      i = e.length;
                    for (let a = 0; a < i; a++) {
                      let i = e[a],
                        r = u[i];
                      r !== d[i] &&
                        ((o = !0), r ? (c(r), n.styleApplyer(t, i, r)) : n.styleApplyer(t, i, ''));
                    }
                  } else if ((u || 'string' != typeof d || (u = ''), 'value' === l)) {
                    let e = t[l];
                    e !== u &&
                      (t['oninput-value'] ? e === t['oninput-value'] : u !== d) &&
                      ((t[l] = u), (t['oninput-value'] = void 0)),
                      u !== d && (o = !0);
                  } else if (u !== d) {
                    let e = typeof u;
                    ('function' === e && n.eventHandlerInterceptor) ||
                      (n.namespace === r
                        ? 'href' === l
                          ? t.setAttributeNS('http://www.w3.org/1999/xlink', l, u)
                          : t.setAttribute(l, u)
                        : 'string' === e
                        ? 'innerHTML' === l
                          ? (t[l] = a.r.sanitize(u))
                          : 'role' === l && '' === u
                          ? t.removeAttribute(l)
                          : t.setAttribute(l, u)
                        : t[l] !== u && (t[l] = u),
                      (o = !0));
                  }
                }
                return o;
              })(p, t.properties, e.properties, i) || f),
            e.properties &&
              e.properties.afterUpdate &&
              e.properties.afterUpdate.apply(e.properties.bind || e.properties, [
                p,
                i,
                e.vnodeSelector,
                e.properties,
                e.children,
              ]);
        return (
          f &&
            e.properties &&
            e.properties.updateAnimation &&
            e.properties.updateAnimation(p, e.properties, t.properties),
          m
        );
      };
      let _ = (t, e) => ({
        getLastRender: () => t,
        update: (i) => {
          if (t.vnodeSelector !== i.vnodeSelector)
            throw new Error(
              'The selector for the root VNode may not be changed. (consider using dom.merge and add one extra level to the virtual DOM)',
            );
          let a = t;
          (t = i), n(a, i, e);
        },
        domNode: t.domNode,
      });
      const S = {
        namespace: void 0,
        performanceLogger: () => {},
        eventHandlerInterceptor: void 0,
        styleApplyer: (t, e, i) => {
          '-' === e.charAt(0) ? t.style.setProperty(e, i) : (t.style[e] = i);
        },
      };
      let D,
        C = (t) => s(S, t),
        T = {
          create: (t, e) => ((e = C(e)), x(t, document.createElement('div'), void 0, e), _(t, e)),
          append: (t, e, i) => ((i = C(i)), x(e, t, void 0, i), _(e, i)),
          insertBefore: (t, e, i) => ((i = C(i)), x(e, t.parentNode, t, i), _(e, i)),
          merge: (t, e, i) => ((i = C(i)), (e.domNode = t), w(t, e, i), _(e, i)),
          replace: (t, e, i) => (
            (i = C(i)), x(e, t.parentNode, t, i), t.parentNode.removeChild(t), _(e, i)
          ),
        };
      D = Array.prototype.find ? (t, e) => t.find(e) : (t, e) => t.filter(e)[0];
    },
    10279: (t, e, i) => {
      'use strict';
      i.d(e, { g: () => r });
      var a = i(76506);
      function r() {
        const t = n.getRandomValues(new Uint16Array(8));
        (t[3] = (4095 & t[3]) | 16384), (t[4] = (16383 & t[4]) | 32768);
        const e = (e) => t[e].toString(16);
        return e(0) + e(1) + '-' + e(2) + '-' + e(3) + '-' + e(4) + '-' + e(5) + e(6) + e(7);
      }
      const n = a.g.crypto || a.g.msCrypto;
    },
    83073: (t, e, i) => {
      'use strict';
      i.d(e, { c: () => dt, g: () => gt, r: () => bt, s: () => pt });
      var a,
        r,
        n = i(91055),
        o = (i(76506), i(92143)),
        s = Function.prototype,
        l = Object.prototype,
        c = s.toString,
        h = l.hasOwnProperty,
        u = c.call(Object),
        d = l.toString,
        p =
          ((a = Object.getPrototypeOf),
          (r = Object),
          function (t) {
            return a(r(t));
          }),
        m = { exports: {} },
        f = {},
        b = { exports: {} },
        g = {};
      var v = /javascript\s*\:/gim;
      (g.whiteList = {
        'align-content': !1,
        'align-items': !1,
        'align-self': !1,
        'alignment-adjust': !1,
        'alignment-baseline': !1,
        all: !1,
        'anchor-point': !1,
        animation: !1,
        'animation-delay': !1,
        'animation-direction': !1,
        'animation-duration': !1,
        'animation-fill-mode': !1,
        'animation-iteration-count': !1,
        'animation-name': !1,
        'animation-play-state': !1,
        'animation-timing-function': !1,
        azimuth: !1,
        'backface-visibility': !1,
        background: !0,
        'background-attachment': !0,
        'background-clip': !0,
        'background-color': !0,
        'background-image': !0,
        'background-origin': !0,
        'background-position': !0,
        'background-repeat': !0,
        'background-size': !0,
        'baseline-shift': !1,
        binding: !1,
        bleed: !1,
        'bookmark-label': !1,
        'bookmark-level': !1,
        'bookmark-state': !1,
        border: !0,
        'border-bottom': !0,
        'border-bottom-color': !0,
        'border-bottom-left-radius': !0,
        'border-bottom-right-radius': !0,
        'border-bottom-style': !0,
        'border-bottom-width': !0,
        'border-collapse': !0,
        'border-color': !0,
        'border-image': !0,
        'border-image-outset': !0,
        'border-image-repeat': !0,
        'border-image-slice': !0,
        'border-image-source': !0,
        'border-image-width': !0,
        'border-left': !0,
        'border-left-color': !0,
        'border-left-style': !0,
        'border-left-width': !0,
        'border-radius': !0,
        'border-right': !0,
        'border-right-color': !0,
        'border-right-style': !0,
        'border-right-width': !0,
        'border-spacing': !0,
        'border-style': !0,
        'border-top': !0,
        'border-top-color': !0,
        'border-top-left-radius': !0,
        'border-top-right-radius': !0,
        'border-top-style': !0,
        'border-top-width': !0,
        'border-width': !0,
        bottom: !1,
        'box-decoration-break': !0,
        'box-shadow': !0,
        'box-sizing': !0,
        'box-snap': !0,
        'box-suppress': !0,
        'break-after': !0,
        'break-before': !0,
        'break-inside': !0,
        'caption-side': !1,
        chains: !1,
        clear: !0,
        clip: !1,
        'clip-path': !1,
        'clip-rule': !1,
        color: !0,
        'color-interpolation-filters': !0,
        'column-count': !1,
        'column-fill': !1,
        'column-gap': !1,
        'column-rule': !1,
        'column-rule-color': !1,
        'column-rule-style': !1,
        'column-rule-width': !1,
        'column-span': !1,
        'column-width': !1,
        columns: !1,
        contain: !1,
        content: !1,
        'counter-increment': !1,
        'counter-reset': !1,
        'counter-set': !1,
        crop: !1,
        cue: !1,
        'cue-after': !1,
        'cue-before': !1,
        cursor: !1,
        direction: !1,
        display: !0,
        'display-inside': !0,
        'display-list': !0,
        'display-outside': !0,
        'dominant-baseline': !1,
        elevation: !1,
        'empty-cells': !1,
        filter: !1,
        flex: !1,
        'flex-basis': !1,
        'flex-direction': !1,
        'flex-flow': !1,
        'flex-grow': !1,
        'flex-shrink': !1,
        'flex-wrap': !1,
        float: !1,
        'float-offset': !1,
        'flood-color': !1,
        'flood-opacity': !1,
        'flow-from': !1,
        'flow-into': !1,
        font: !0,
        'font-family': !0,
        'font-feature-settings': !0,
        'font-kerning': !0,
        'font-language-override': !0,
        'font-size': !0,
        'font-size-adjust': !0,
        'font-stretch': !0,
        'font-style': !0,
        'font-synthesis': !0,
        'font-variant': !0,
        'font-variant-alternates': !0,
        'font-variant-caps': !0,
        'font-variant-east-asian': !0,
        'font-variant-ligatures': !0,
        'font-variant-numeric': !0,
        'font-variant-position': !0,
        'font-weight': !0,
        grid: !1,
        'grid-area': !1,
        'grid-auto-columns': !1,
        'grid-auto-flow': !1,
        'grid-auto-rows': !1,
        'grid-column': !1,
        'grid-column-end': !1,
        'grid-column-start': !1,
        'grid-row': !1,
        'grid-row-end': !1,
        'grid-row-start': !1,
        'grid-template': !1,
        'grid-template-areas': !1,
        'grid-template-columns': !1,
        'grid-template-rows': !1,
        'hanging-punctuation': !1,
        height: !0,
        hyphens: !1,
        icon: !1,
        'image-orientation': !1,
        'image-resolution': !1,
        'ime-mode': !1,
        'initial-letters': !1,
        'inline-box-align': !1,
        'justify-content': !1,
        'justify-items': !1,
        'justify-self': !1,
        left: !1,
        'letter-spacing': !0,
        'lighting-color': !0,
        'line-box-contain': !1,
        'line-break': !1,
        'line-grid': !1,
        'line-height': !1,
        'line-snap': !1,
        'line-stacking': !1,
        'line-stacking-ruby': !1,
        'line-stacking-shift': !1,
        'line-stacking-strategy': !1,
        'list-style': !0,
        'list-style-image': !0,
        'list-style-position': !0,
        'list-style-type': !0,
        margin: !0,
        'margin-bottom': !0,
        'margin-left': !0,
        'margin-right': !0,
        'margin-top': !0,
        'marker-offset': !1,
        'marker-side': !1,
        marks: !1,
        mask: !1,
        'mask-box': !1,
        'mask-box-outset': !1,
        'mask-box-repeat': !1,
        'mask-box-slice': !1,
        'mask-box-source': !1,
        'mask-box-width': !1,
        'mask-clip': !1,
        'mask-image': !1,
        'mask-origin': !1,
        'mask-position': !1,
        'mask-repeat': !1,
        'mask-size': !1,
        'mask-source-type': !1,
        'mask-type': !1,
        'max-height': !0,
        'max-lines': !1,
        'max-width': !0,
        'min-height': !0,
        'min-width': !0,
        'move-to': !1,
        'nav-down': !1,
        'nav-index': !1,
        'nav-left': !1,
        'nav-right': !1,
        'nav-up': !1,
        'object-fit': !1,
        'object-position': !1,
        opacity: !1,
        order: !1,
        orphans: !1,
        outline: !1,
        'outline-color': !1,
        'outline-offset': !1,
        'outline-style': !1,
        'outline-width': !1,
        overflow: !1,
        'overflow-wrap': !1,
        'overflow-x': !1,
        'overflow-y': !1,
        padding: !0,
        'padding-bottom': !0,
        'padding-left': !0,
        'padding-right': !0,
        'padding-top': !0,
        page: !1,
        'page-break-after': !1,
        'page-break-before': !1,
        'page-break-inside': !1,
        'page-policy': !1,
        pause: !1,
        'pause-after': !1,
        'pause-before': !1,
        perspective: !1,
        'perspective-origin': !1,
        pitch: !1,
        'pitch-range': !1,
        'play-during': !1,
        position: !1,
        'presentation-level': !1,
        quotes: !1,
        'region-fragment': !1,
        resize: !1,
        rest: !1,
        'rest-after': !1,
        'rest-before': !1,
        richness: !1,
        right: !1,
        rotation: !1,
        'rotation-point': !1,
        'ruby-align': !1,
        'ruby-merge': !1,
        'ruby-position': !1,
        'shape-image-threshold': !1,
        'shape-outside': !1,
        'shape-margin': !1,
        size: !1,
        speak: !1,
        'speak-as': !1,
        'speak-header': !1,
        'speak-numeral': !1,
        'speak-punctuation': !1,
        'speech-rate': !1,
        stress: !1,
        'string-set': !1,
        'tab-size': !1,
        'table-layout': !1,
        'text-align': !0,
        'text-align-last': !0,
        'text-combine-upright': !0,
        'text-decoration': !0,
        'text-decoration-color': !0,
        'text-decoration-line': !0,
        'text-decoration-skip': !0,
        'text-decoration-style': !0,
        'text-emphasis': !0,
        'text-emphasis-color': !0,
        'text-emphasis-position': !0,
        'text-emphasis-style': !0,
        'text-height': !0,
        'text-indent': !0,
        'text-justify': !0,
        'text-orientation': !0,
        'text-overflow': !0,
        'text-shadow': !0,
        'text-space-collapse': !0,
        'text-transform': !0,
        'text-underline-position': !0,
        'text-wrap': !0,
        top: !1,
        transform: !1,
        'transform-origin': !1,
        'transform-style': !1,
        transition: !1,
        'transition-delay': !1,
        'transition-duration': !1,
        'transition-property': !1,
        'transition-timing-function': !1,
        'unicode-bidi': !1,
        'vertical-align': !1,
        visibility: !1,
        'voice-balance': !1,
        'voice-duration': !1,
        'voice-family': !1,
        'voice-pitch': !1,
        'voice-range': !1,
        'voice-rate': !1,
        'voice-stress': !1,
        'voice-volume': !1,
        volume: !1,
        'white-space': !1,
        widows: !1,
        width: !0,
        'will-change': !1,
        'word-break': !0,
        'word-spacing': !0,
        'word-wrap': !0,
        'wrap-flow': !1,
        'wrap-through': !1,
        'writing-mode': !1,
        'z-index': !1,
      }),
        (g.getDefaultWhiteList = function () {
          return {
            'align-content': !1,
            'align-items': !1,
            'align-self': !1,
            'alignment-adjust': !1,
            'alignment-baseline': !1,
            all: !1,
            'anchor-point': !1,
            animation: !1,
            'animation-delay': !1,
            'animation-direction': !1,
            'animation-duration': !1,
            'animation-fill-mode': !1,
            'animation-iteration-count': !1,
            'animation-name': !1,
            'animation-play-state': !1,
            'animation-timing-function': !1,
            azimuth: !1,
            'backface-visibility': !1,
            background: !0,
            'background-attachment': !0,
            'background-clip': !0,
            'background-color': !0,
            'background-image': !0,
            'background-origin': !0,
            'background-position': !0,
            'background-repeat': !0,
            'background-size': !0,
            'baseline-shift': !1,
            binding: !1,
            bleed: !1,
            'bookmark-label': !1,
            'bookmark-level': !1,
            'bookmark-state': !1,
            border: !0,
            'border-bottom': !0,
            'border-bottom-color': !0,
            'border-bottom-left-radius': !0,
            'border-bottom-right-radius': !0,
            'border-bottom-style': !0,
            'border-bottom-width': !0,
            'border-collapse': !0,
            'border-color': !0,
            'border-image': !0,
            'border-image-outset': !0,
            'border-image-repeat': !0,
            'border-image-slice': !0,
            'border-image-source': !0,
            'border-image-width': !0,
            'border-left': !0,
            'border-left-color': !0,
            'border-left-style': !0,
            'border-left-width': !0,
            'border-radius': !0,
            'border-right': !0,
            'border-right-color': !0,
            'border-right-style': !0,
            'border-right-width': !0,
            'border-spacing': !0,
            'border-style': !0,
            'border-top': !0,
            'border-top-color': !0,
            'border-top-left-radius': !0,
            'border-top-right-radius': !0,
            'border-top-style': !0,
            'border-top-width': !0,
            'border-width': !0,
            bottom: !1,
            'box-decoration-break': !0,
            'box-shadow': !0,
            'box-sizing': !0,
            'box-snap': !0,
            'box-suppress': !0,
            'break-after': !0,
            'break-before': !0,
            'break-inside': !0,
            'caption-side': !1,
            chains: !1,
            clear: !0,
            clip: !1,
            'clip-path': !1,
            'clip-rule': !1,
            color: !0,
            'color-interpolation-filters': !0,
            'column-count': !1,
            'column-fill': !1,
            'column-gap': !1,
            'column-rule': !1,
            'column-rule-color': !1,
            'column-rule-style': !1,
            'column-rule-width': !1,
            'column-span': !1,
            'column-width': !1,
            columns: !1,
            contain: !1,
            content: !1,
            'counter-increment': !1,
            'counter-reset': !1,
            'counter-set': !1,
            crop: !1,
            cue: !1,
            'cue-after': !1,
            'cue-before': !1,
            cursor: !1,
            direction: !1,
            display: !0,
            'display-inside': !0,
            'display-list': !0,
            'display-outside': !0,
            'dominant-baseline': !1,
            elevation: !1,
            'empty-cells': !1,
            filter: !1,
            flex: !1,
            'flex-basis': !1,
            'flex-direction': !1,
            'flex-flow': !1,
            'flex-grow': !1,
            'flex-shrink': !1,
            'flex-wrap': !1,
            float: !1,
            'float-offset': !1,
            'flood-color': !1,
            'flood-opacity': !1,
            'flow-from': !1,
            'flow-into': !1,
            font: !0,
            'font-family': !0,
            'font-feature-settings': !0,
            'font-kerning': !0,
            'font-language-override': !0,
            'font-size': !0,
            'font-size-adjust': !0,
            'font-stretch': !0,
            'font-style': !0,
            'font-synthesis': !0,
            'font-variant': !0,
            'font-variant-alternates': !0,
            'font-variant-caps': !0,
            'font-variant-east-asian': !0,
            'font-variant-ligatures': !0,
            'font-variant-numeric': !0,
            'font-variant-position': !0,
            'font-weight': !0,
            grid: !1,
            'grid-area': !1,
            'grid-auto-columns': !1,
            'grid-auto-flow': !1,
            'grid-auto-rows': !1,
            'grid-column': !1,
            'grid-column-end': !1,
            'grid-column-start': !1,
            'grid-row': !1,
            'grid-row-end': !1,
            'grid-row-start': !1,
            'grid-template': !1,
            'grid-template-areas': !1,
            'grid-template-columns': !1,
            'grid-template-rows': !1,
            'hanging-punctuation': !1,
            height: !0,
            hyphens: !1,
            icon: !1,
            'image-orientation': !1,
            'image-resolution': !1,
            'ime-mode': !1,
            'initial-letters': !1,
            'inline-box-align': !1,
            'justify-content': !1,
            'justify-items': !1,
            'justify-self': !1,
            left: !1,
            'letter-spacing': !0,
            'lighting-color': !0,
            'line-box-contain': !1,
            'line-break': !1,
            'line-grid': !1,
            'line-height': !1,
            'line-snap': !1,
            'line-stacking': !1,
            'line-stacking-ruby': !1,
            'line-stacking-shift': !1,
            'line-stacking-strategy': !1,
            'list-style': !0,
            'list-style-image': !0,
            'list-style-position': !0,
            'list-style-type': !0,
            margin: !0,
            'margin-bottom': !0,
            'margin-left': !0,
            'margin-right': !0,
            'margin-top': !0,
            'marker-offset': !1,
            'marker-side': !1,
            marks: !1,
            mask: !1,
            'mask-box': !1,
            'mask-box-outset': !1,
            'mask-box-repeat': !1,
            'mask-box-slice': !1,
            'mask-box-source': !1,
            'mask-box-width': !1,
            'mask-clip': !1,
            'mask-image': !1,
            'mask-origin': !1,
            'mask-position': !1,
            'mask-repeat': !1,
            'mask-size': !1,
            'mask-source-type': !1,
            'mask-type': !1,
            'max-height': !0,
            'max-lines': !1,
            'max-width': !0,
            'min-height': !0,
            'min-width': !0,
            'move-to': !1,
            'nav-down': !1,
            'nav-index': !1,
            'nav-left': !1,
            'nav-right': !1,
            'nav-up': !1,
            'object-fit': !1,
            'object-position': !1,
            opacity: !1,
            order: !1,
            orphans: !1,
            outline: !1,
            'outline-color': !1,
            'outline-offset': !1,
            'outline-style': !1,
            'outline-width': !1,
            overflow: !1,
            'overflow-wrap': !1,
            'overflow-x': !1,
            'overflow-y': !1,
            padding: !0,
            'padding-bottom': !0,
            'padding-left': !0,
            'padding-right': !0,
            'padding-top': !0,
            page: !1,
            'page-break-after': !1,
            'page-break-before': !1,
            'page-break-inside': !1,
            'page-policy': !1,
            pause: !1,
            'pause-after': !1,
            'pause-before': !1,
            perspective: !1,
            'perspective-origin': !1,
            pitch: !1,
            'pitch-range': !1,
            'play-during': !1,
            position: !1,
            'presentation-level': !1,
            quotes: !1,
            'region-fragment': !1,
            resize: !1,
            rest: !1,
            'rest-after': !1,
            'rest-before': !1,
            richness: !1,
            right: !1,
            rotation: !1,
            'rotation-point': !1,
            'ruby-align': !1,
            'ruby-merge': !1,
            'ruby-position': !1,
            'shape-image-threshold': !1,
            'shape-outside': !1,
            'shape-margin': !1,
            size: !1,
            speak: !1,
            'speak-as': !1,
            'speak-header': !1,
            'speak-numeral': !1,
            'speak-punctuation': !1,
            'speech-rate': !1,
            stress: !1,
            'string-set': !1,
            'tab-size': !1,
            'table-layout': !1,
            'text-align': !0,
            'text-align-last': !0,
            'text-combine-upright': !0,
            'text-decoration': !0,
            'text-decoration-color': !0,
            'text-decoration-line': !0,
            'text-decoration-skip': !0,
            'text-decoration-style': !0,
            'text-emphasis': !0,
            'text-emphasis-color': !0,
            'text-emphasis-position': !0,
            'text-emphasis-style': !0,
            'text-height': !0,
            'text-indent': !0,
            'text-justify': !0,
            'text-orientation': !0,
            'text-overflow': !0,
            'text-shadow': !0,
            'text-space-collapse': !0,
            'text-transform': !0,
            'text-underline-position': !0,
            'text-wrap': !0,
            top: !1,
            transform: !1,
            'transform-origin': !1,
            'transform-style': !1,
            transition: !1,
            'transition-delay': !1,
            'transition-duration': !1,
            'transition-property': !1,
            'transition-timing-function': !1,
            'unicode-bidi': !1,
            'vertical-align': !1,
            visibility: !1,
            'voice-balance': !1,
            'voice-duration': !1,
            'voice-family': !1,
            'voice-pitch': !1,
            'voice-range': !1,
            'voice-rate': !1,
            'voice-stress': !1,
            'voice-volume': !1,
            volume: !1,
            'white-space': !1,
            widows: !1,
            width: !0,
            'will-change': !1,
            'word-break': !0,
            'word-spacing': !0,
            'word-wrap': !0,
            'wrap-flow': !1,
            'wrap-through': !1,
            'writing-mode': !1,
            'z-index': !1,
          };
        }),
        (g.onAttr = function (t, e, i) {}),
        (g.onIgnoreAttr = function (t, e, i) {}),
        (g.safeAttrValue = function (t, e) {
          return v.test(e) ? '' : e;
        });
      var y = function (t) {
          return String.prototype.trim ? t.trim() : t.replace(/(^\s*)|(\s*$)/g, '');
        },
        w = g;
      function x(t) {
        return null == t;
      }
      function k(t) {
        ((t = (function (t) {
          var e = {};
          for (var i in t) e[i] = t[i];
          return e;
        })(t || {})).whiteList = t.whiteList || w.whiteList),
          (t.onAttr = t.onAttr || w.onAttr),
          (t.onIgnoreAttr = t.onIgnoreAttr || w.onIgnoreAttr),
          (t.safeAttrValue = t.safeAttrValue || w.safeAttrValue),
          (this.options = t);
      }
      k.prototype.process = function (t) {
        if (!(t = (t = t || '').toString())) return '';
        var e = this.options,
          i = e.whiteList,
          a = e.onAttr,
          r = e.onIgnoreAttr,
          n = e.safeAttrValue;
        return (function (t, e) {
          ';' !==
            (t = (function (t) {
              return String.prototype.trimRight ? t.trimRight() : t.replace(/(\s*$)/g, '');
            })(t))[t.length - 1] && (t += ';');
          var i = t.length,
            a = !1,
            r = 0,
            n = 0,
            o = '';
          function s() {
            if (!a) {
              var i = y(t.slice(r, n)),
                s = i.indexOf(':');
              if (-1 !== s) {
                var l = y(i.slice(0, s)),
                  c = y(i.slice(s + 1));
                if (l) {
                  var h = e(r, o.length, l, c, i);
                  h && (o += h + '; ');
                }
              }
            }
            r = n + 1;
          }
          for (; n < i; n++) {
            var l = t[n];
            if ('/' === l && '*' === t[n + 1]) {
              var c = t.indexOf('*/', n + 2);
              if (-1 === c) break;
              (r = (n = c + 1) + 1), (a = !1);
            } else
              '(' === l
                ? (a = !0)
                : ')' === l
                ? (a = !1)
                : ';' === l
                ? a || s()
                : '\n' === l && s();
          }
          return y(o);
        })(t, function (t, e, o, s, l) {
          var c = i[o],
            h = !1;
          if (
            (!0 === c
              ? (h = c)
              : 'function' == typeof c
              ? (h = c(s))
              : c instanceof RegExp && (h = c.test(s)),
            !0 !== h && (h = !1),
            (s = n(o, s)))
          ) {
            var u,
              d = { position: e, sourcePosition: t, source: l, isWhite: h };
            return h ? (x((u = a(o, s, d))) ? o + ':' + s : u) : x((u = r(o, s, d))) ? void 0 : u;
          }
        });
      };
      var _ = k;
      !(function (t, e) {
        var i = g,
          a = _;
        for (var r in (((e = t.exports = function (t, e) {
          return new a(e).process(t);
        }).FilterCSS = a),
        i))
          e[r] = i[r];
      })(b, b.exports);
      var S = {
          indexOf: function (t, e) {
            var i, a;
            if (Array.prototype.indexOf) return t.indexOf(e);
            for (i = 0, a = t.length; i < a; i++) if (t[i] === e) return i;
            return -1;
          },
          forEach: function (t, e, i) {
            var a, r;
            if (Array.prototype.forEach) return t.forEach(e, i);
            for (a = 0, r = t.length; a < r; a++) e.call(i, t[a], a, t);
          },
          trim: function (t) {
            return String.prototype.trim ? t.trim() : t.replace(/(^\s*)|(\s*$)/g, '');
          },
          spaceIndex: function (t) {
            var e = /\s|\n|\t/.exec(t);
            return e ? e.index : -1;
          },
        },
        D = b.exports.FilterCSS,
        C = b.exports.getDefaultWhiteList,
        T = S,
        $ = new D();
      function I(t) {
        return t.replace(A, '&lt;').replace(E, '&gt;');
      }
      var A = /</g,
        E = />/g,
        O = /"/g,
        R = /&quot;/g,
        N = /&#([a-zA-Z0-9]*);?/gim,
        M = /&colon;?/gim,
        P = /&newline;?/gim,
        L = /((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a)\:/gi,
        H = /e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,
        F = /u\s*r\s*l\s*\(.*/gi;
      function z(t) {
        return t.replace(O, '&quot;');
      }
      function j(t) {
        return t.replace(R, '"');
      }
      function V(t) {
        return t.replace(N, function (t, e) {
          return 'x' === e[0] || 'X' === e[0]
            ? String.fromCharCode(parseInt(e.substr(1), 16))
            : String.fromCharCode(parseInt(e, 10));
        });
      }
      function U(t) {
        return t.replace(M, ':').replace(P, ' ');
      }
      function B(t) {
        for (var e = '', i = 0, a = t.length; i < a; i++)
          e += t.charCodeAt(i) < 32 ? ' ' : t.charAt(i);
        return T.trim(e);
      }
      function q(t) {
        return B((t = U((t = V((t = j(t)))))));
      }
      function W(t) {
        return I((t = z(t)));
      }
      var G = /<!--[\s\S]*?-->/g;
      (f.whiteList = {
        a: ['target', 'href', 'title'],
        abbr: ['title'],
        address: [],
        area: ['shape', 'coords', 'href', 'alt'],
        article: [],
        aside: [],
        audio: ['autoplay', 'controls', 'crossorigin', 'loop', 'muted', 'preload', 'src'],
        b: [],
        bdi: ['dir'],
        bdo: ['dir'],
        big: [],
        blockquote: ['cite'],
        br: [],
        caption: [],
        center: [],
        cite: [],
        code: [],
        col: ['align', 'valign', 'span', 'width'],
        colgroup: ['align', 'valign', 'span', 'width'],
        dd: [],
        del: ['datetime'],
        details: ['open'],
        div: [],
        dl: [],
        dt: [],
        em: [],
        figcaption: [],
        figure: [],
        font: ['color', 'size', 'face'],
        footer: [],
        h1: [],
        h2: [],
        h3: [],
        h4: [],
        h5: [],
        h6: [],
        header: [],
        hr: [],
        i: [],
        img: ['src', 'alt', 'title', 'width', 'height'],
        ins: ['datetime'],
        li: [],
        mark: [],
        nav: [],
        ol: [],
        p: [],
        pre: [],
        s: [],
        section: [],
        small: [],
        span: [],
        sub: [],
        summary: [],
        sup: [],
        strong: [],
        strike: [],
        table: ['width', 'border', 'align', 'valign'],
        tbody: ['align', 'valign'],
        td: ['width', 'rowspan', 'colspan', 'align', 'valign'],
        tfoot: ['align', 'valign'],
        th: ['width', 'rowspan', 'colspan', 'align', 'valign'],
        thead: ['align', 'valign'],
        tr: ['rowspan', 'align', 'valign'],
        tt: [],
        u: [],
        ul: [],
        video: [
          'autoplay',
          'controls',
          'crossorigin',
          'loop',
          'muted',
          'playsinline',
          'poster',
          'preload',
          'src',
          'height',
          'width',
        ],
      }),
        (f.getDefaultWhiteList = function () {
          return {
            a: ['target', 'href', 'title'],
            abbr: ['title'],
            address: [],
            area: ['shape', 'coords', 'href', 'alt'],
            article: [],
            aside: [],
            audio: ['autoplay', 'controls', 'crossorigin', 'loop', 'muted', 'preload', 'src'],
            b: [],
            bdi: ['dir'],
            bdo: ['dir'],
            big: [],
            blockquote: ['cite'],
            br: [],
            caption: [],
            center: [],
            cite: [],
            code: [],
            col: ['align', 'valign', 'span', 'width'],
            colgroup: ['align', 'valign', 'span', 'width'],
            dd: [],
            del: ['datetime'],
            details: ['open'],
            div: [],
            dl: [],
            dt: [],
            em: [],
            figcaption: [],
            figure: [],
            font: ['color', 'size', 'face'],
            footer: [],
            h1: [],
            h2: [],
            h3: [],
            h4: [],
            h5: [],
            h6: [],
            header: [],
            hr: [],
            i: [],
            img: ['src', 'alt', 'title', 'width', 'height'],
            ins: ['datetime'],
            li: [],
            mark: [],
            nav: [],
            ol: [],
            p: [],
            pre: [],
            s: [],
            section: [],
            small: [],
            span: [],
            sub: [],
            summary: [],
            sup: [],
            strong: [],
            strike: [],
            table: ['width', 'border', 'align', 'valign'],
            tbody: ['align', 'valign'],
            td: ['width', 'rowspan', 'colspan', 'align', 'valign'],
            tfoot: ['align', 'valign'],
            th: ['width', 'rowspan', 'colspan', 'align', 'valign'],
            thead: ['align', 'valign'],
            tr: ['rowspan', 'align', 'valign'],
            tt: [],
            u: [],
            ul: [],
            video: [
              'autoplay',
              'controls',
              'crossorigin',
              'loop',
              'muted',
              'playsinline',
              'poster',
              'preload',
              'src',
              'height',
              'width',
            ],
          };
        }),
        (f.onTag = function (t, e, i) {}),
        (f.onIgnoreTag = function (t, e, i) {}),
        (f.onTagAttr = function (t, e, i) {}),
        (f.onIgnoreTagAttr = function (t, e, i) {}),
        (f.safeAttrValue = function (t, e, i, a) {
          if (((i = q(i)), 'href' === e || 'src' === e)) {
            if ('#' === (i = T.trim(i))) return '#';
            if (
              'http://' !== i.substr(0, 7) &&
              'https://' !== i.substr(0, 8) &&
              'mailto:' !== i.substr(0, 7) &&
              'tel:' !== i.substr(0, 4) &&
              'data:image/' !== i.substr(0, 11) &&
              'ftp://' !== i.substr(0, 6) &&
              './' !== i.substr(0, 2) &&
              '../' !== i.substr(0, 3) &&
              '#' !== i[0] &&
              '/' !== i[0]
            )
              return '';
          } else if ('background' === e) {
            if (((L.lastIndex = 0), L.test(i))) return '';
          } else if ('style' === e) {
            if (((H.lastIndex = 0), H.test(i))) return '';
            if (((F.lastIndex = 0), F.test(i) && ((L.lastIndex = 0), L.test(i)))) return '';
            !1 !== a && (i = (a = a || $).process(i));
          }
          return W(i);
        }),
        (f.escapeHtml = I),
        (f.escapeQuote = z),
        (f.unescapeQuote = j),
        (f.escapeHtmlEntities = V),
        (f.escapeDangerHtml5Entities = U),
        (f.clearNonPrintableCharacter = B),
        (f.friendlyAttrValue = q),
        (f.escapeAttrValue = W),
        (f.onIgnoreTagStripAll = function () {
          return '';
        }),
        (f.StripTagBody = function (t, e) {
          'function' != typeof e && (e = function () {});
          var i = !Array.isArray(t),
            a = [],
            r = !1;
          return {
            onIgnoreTag: function (n, o, s) {
              if (
                (function (e) {
                  return !!i || -1 !== T.indexOf(t, e);
                })(n)
              ) {
                if (s.isClosing) {
                  var l = '[/removed]',
                    c = s.position + l.length;
                  return a.push([!1 !== r ? r : s.position, c]), (r = !1), l;
                }
                return r || (r = s.position), '[removed]';
              }
              return e(n, o, s);
            },
            remove: function (t) {
              var e = '',
                i = 0;
              return (
                T.forEach(a, function (a) {
                  (e += t.slice(i, a[0])), (i = a[1]);
                }),
                (e += t.slice(i))
              );
            },
          };
        }),
        (f.stripCommentTag = function (t) {
          return t.replace(G, '');
        }),
        (f.stripBlankChar = function (t) {
          var e = t.split('');
          return (e = e.filter(function (t) {
            var e = t.charCodeAt(0);
            return !(127 === e || (e <= 31 && 10 !== e && 13 !== e));
          })).join('');
        }),
        (f.cssFilter = $),
        (f.getDefaultCSSWhiteList = C);
      var X = {},
        Y = S;
      function K(t) {
        var e = Y.spaceIndex(t);
        if (-1 === e) var i = t.slice(1, -1);
        else i = t.slice(1, e + 1);
        return (
          '/' === (i = Y.trim(i).toLowerCase()).slice(0, 1) && (i = i.slice(1)),
          '/' === i.slice(-1) && (i = i.slice(0, -1)),
          i
        );
      }
      function Z(t) {
        return '</' === t.slice(0, 2);
      }
      var J = /[^a-zA-Z0-9_:\.\-]/gim;
      function Q(t, e) {
        for (; e < t.length; e++) {
          var i = t[e];
          if (' ' !== i) return '=' === i ? e : -1;
        }
      }
      function tt(t, e) {
        for (; e > 0; e--) {
          var i = t[e];
          if (' ' !== i) return '=' === i ? e : -1;
        }
      }
      function et(t) {
        return (function (t) {
          return (
            ('"' === t[0] && '"' === t[t.length - 1]) || ("'" === t[0] && "'" === t[t.length - 1])
          );
        })(t)
          ? t.substr(1, t.length - 2)
          : t;
      }
      (X.parseTag = function (t, e, i) {
        var a = '',
          r = 0,
          n = !1,
          o = !1,
          s = 0,
          l = t.length,
          c = '',
          h = '';
        t: for (s = 0; s < l; s++) {
          var u = t.charAt(s);
          if (!1 === n) {
            if ('<' === u) {
              n = s;
              continue;
            }
          } else if (!1 === o) {
            if ('<' === u) {
              (a += i(t.slice(r, s))), (n = s), (r = s);
              continue;
            }
            if ('>' === u) {
              (a += i(t.slice(r, n))),
                (c = K((h = t.slice(n, s + 1)))),
                (a += e(n, a.length, c, h, Z(h))),
                (r = s + 1),
                (n = !1);
              continue;
            }
            if ('"' === u || "'" === u)
              for (var d = 1, p = t.charAt(s - d); '' === p.trim() || '=' === p; ) {
                if ('=' === p) {
                  o = u;
                  continue t;
                }
                p = t.charAt(s - ++d);
              }
          } else if (u === o) {
            o = !1;
            continue;
          }
        }
        return r < t.length && (a += i(t.substr(r))), a;
      }),
        (X.parseAttr = function (t, e) {
          var i = 0,
            a = [],
            r = !1,
            n = t.length;
          function o(t, i) {
            if (!((t = (t = Y.trim(t)).replace(J, '').toLowerCase()).length < 1)) {
              var r = e(t, i || '');
              r && a.push(r);
            }
          }
          for (var s = 0; s < n; s++) {
            var l,
              c = t.charAt(s);
            if (!1 !== r || '=' !== c)
              if (!1 === r || s !== i || ('"' !== c && "'" !== c) || '=' !== t.charAt(s - 1)) {
                if (/\s|\n|\t/.test(c)) {
                  if (((t = t.replace(/\s|\n|\t/g, ' ')), !1 === r)) {
                    if (-1 === (l = Q(t, s))) {
                      o(Y.trim(t.slice(i, s))), (r = !1), (i = s + 1);
                      continue;
                    }
                    s = l - 1;
                    continue;
                  }
                  if (-1 === (l = tt(t, s - 1))) {
                    o(r, et(Y.trim(t.slice(i, s)))), (r = !1), (i = s + 1);
                    continue;
                  }
                }
              } else {
                if (-1 === (l = t.indexOf(c, s + 1))) break;
                o(r, Y.trim(t.slice(i + 1, l))), (r = !1), (i = (s = l) + 1);
              }
            else (r = t.slice(i, s)), (i = s + 1);
          }
          return (
            i < t.length && (!1 === r ? o(t.slice(i)) : o(r, et(Y.trim(t.slice(i))))),
            Y.trim(a.join(' '))
          );
        });
      var it = b.exports.FilterCSS,
        at = f,
        rt = X,
        nt = rt.parseTag,
        ot = rt.parseAttr,
        st = S;
      function lt(t) {
        return null == t;
      }
      function ct(t) {
        (t = (function (t) {
          var e = {};
          for (var i in t) e[i] = t[i];
          return e;
        })(t || {})).stripIgnoreTag &&
          (t.onIgnoreTag &&
            console.error(
              'Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time',
            ),
          (t.onIgnoreTag = at.onIgnoreTagStripAll)),
          (t.whiteList = t.whiteList || at.whiteList),
          (t.onTag = t.onTag || at.onTag),
          (t.onTagAttr = t.onTagAttr || at.onTagAttr),
          (t.onIgnoreTag = t.onIgnoreTag || at.onIgnoreTag),
          (t.onIgnoreTagAttr = t.onIgnoreTagAttr || at.onIgnoreTagAttr),
          (t.safeAttrValue = t.safeAttrValue || at.safeAttrValue),
          (t.escapeHtml = t.escapeHtml || at.escapeHtml),
          (this.options = t),
          !1 === t.css
            ? (this.cssFilter = !1)
            : ((t.css = t.css || {}), (this.cssFilter = new it(t.css)));
      }
      ct.prototype.process = function (t) {
        if (!(t = (t = t || '').toString())) return '';
        var e = this.options,
          i = e.whiteList,
          a = e.onTag,
          r = e.onIgnoreTag,
          n = e.onTagAttr,
          o = e.onIgnoreTagAttr,
          s = e.safeAttrValue,
          l = e.escapeHtml,
          c = this.cssFilter;
        e.stripBlankChar && (t = at.stripBlankChar(t)),
          e.allowCommentTag || (t = at.stripCommentTag(t));
        var h = !1;
        e.stripIgnoreTagBody &&
          ((h = at.StripTagBody(e.stripIgnoreTagBody, r)), (r = h.onIgnoreTag));
        var u = nt(
          t,
          function (t, e, h, u, d) {
            var p,
              m = { sourcePosition: t, position: e, isClosing: d, isWhite: i.hasOwnProperty(h) };
            if (!lt((p = a(h, u, m)))) return p;
            if (m.isWhite) {
              if (m.isClosing) return '</' + h + '>';
              var f = (function (t) {
                  var e = st.spaceIndex(t);
                  if (-1 === e) return { html: '', closing: '/' === t[t.length - 2] };
                  var i = '/' === (t = st.trim(t.slice(e + 1, -1)))[t.length - 1];
                  return i && (t = st.trim(t.slice(0, -1))), { html: t, closing: i };
                })(u),
                b = i[h],
                g = ot(f.html, function (t, e) {
                  var i,
                    a = -1 !== st.indexOf(b, t);
                  return lt((i = n(h, t, e, a)))
                    ? a
                      ? (e = s(h, t, e, c))
                        ? t + '="' + e + '"'
                        : t
                      : lt((i = o(h, t, e, a)))
                      ? void 0
                      : i
                    : i;
                });
              return (u = '<' + h), g && (u += ' ' + g), f.closing && (u += ' /'), u + '>';
            }
            return lt((p = r(h, u, m))) ? l(u) : p;
          },
          l,
        );
        return h && (u = h.remove(u)), u;
      };
      var ht = ct;
      !(function (t, e) {
        var i = f,
          a = X,
          r = ht;
        function n(t, e) {
          return new r(e).process(t);
        }
        for (var o in (((e = t.exports = n).filterXSS = n), (e.FilterXSS = r), i)) e[o] = i[o];
        for (var o in a) e[o] = a[o];
        'undefined' != typeof self &&
          'undefined' != typeof DedicatedWorkerGlobalScope &&
          self instanceof DedicatedWorkerGlobalScope &&
          (self.filterXSS = t.exports);
      })(m, m.exports);
      var ut = (function () {
        function t(t, e) {
          var i,
            a = this;
          (this.arcgisWhiteList = {
            a: ['href', 'target', 'style'],
            abbr: ['title'],
            img: ['src', 'width', 'height', 'border', 'alt', 'style'],
            video: [
              'autoplay',
              'controls',
              'height',
              'loop',
              'muted',
              'poster',
              'preload',
              'width',
            ],
            audio: ['autoplay', 'controls', 'loop', 'muted', 'preload'],
            source: ['media', 'src', 'type'],
            span: ['style'],
            table: ['width', 'height', 'cellpadding', 'cellspacing', 'border', 'style'],
            div: ['style', 'align'],
            font: ['size', 'color', 'style'],
            tr: ['height', 'valign', 'align', 'style'],
            td: ['height', 'width', 'valign', 'align', 'colspan', 'rowspan', 'nowrap', 'style'],
            th: ['height', 'width', 'valign', 'align', 'colspan', 'rowspan', 'nowrap', 'style'],
            p: ['style'],
            b: [],
            strong: [],
            i: [],
            em: [],
            u: [],
            br: [],
            li: [],
            ul: [],
            ol: [],
            hr: [],
            tbody: [],
          }),
            (this.allowedProtocols = [
              'http',
              'https',
              'mailto',
              'iform',
              'tel',
              'flow',
              'lfmobile',
              'arcgis-navigator',
              'arcgis-appstudio-player',
              'arcgis-survey123',
              'arcgis-collector',
              'arcgis-workforce',
              'arcgis-explorer',
              'arcgis-trek2there',
              'mspbi',
              'comgooglemaps',
              'pdfefile',
              'pdfehttp',
              'pdfehttps',
              'boxapp',
              'boxemm',
              'awb',
              'awbs',
              'gropen',
              'radarscope',
            ]),
            (this.arcgisFilterOptions = {
              allowCommentTag: !0,
              safeAttrValue: function (t, e, i, r) {
                return ('a' === t && 'href' === e) ||
                  (('img' === t || 'source' === t) && 'src' === e)
                  ? a.sanitizeUrl(i)
                  : m.exports.safeAttrValue(t, e, i, r);
              },
            }),
            t && !e
              ? (i = t)
              : t && e
              ? ((i = Object.create(this.arcgisFilterOptions)),
                Object.keys(t).forEach(function (e) {
                  'whiteList' === e
                    ? (i.whiteList = a._extendObjectOfArrays([
                        a.arcgisWhiteList,
                        t.whiteList || {},
                      ]))
                    : (i[e] = t[e]);
                }))
              : ((i = Object.create(this.arcgisFilterOptions)).whiteList = this.arcgisWhiteList),
            (this.xssFilterOptions = i),
            (this._xssFilter = new m.exports.FilterXSS(i));
        }
        return (
          (t.prototype.sanitize = function (t, e) {
            switch ((void 0 === e && (e = {}), typeof t)) {
              case 'number':
                return isNaN(t) || !isFinite(t) ? null : t;
              case 'boolean':
                return t;
              case 'string':
                return this._xssFilter.process(t);
              case 'object':
                return this._iterateOverObject(t, e);
              default:
                if (e.allowUndefined && void 0 === t) return;
                return null;
            }
          }),
          (t.prototype.sanitizeUrl = function (t) {
            var e = this._trim(t.substring(0, t.indexOf(':')));
            return '/' === t ||
              '#' === t ||
              '#' === t[0] ||
              this.allowedProtocols.indexOf(e.toLowerCase()) > -1
              ? m.exports.escapeAttrValue(t)
              : '';
          }),
          (t.prototype.sanitizeHTMLAttribute = function (t, e, i, a) {
            return 'function' == typeof this.xssFilterOptions.safeAttrValue
              ? this.xssFilterOptions.safeAttrValue(t, e, i, a)
              : m.exports.safeAttrValue(t, e, i, a);
          }),
          (t.prototype.validate = function (t, e) {
            void 0 === e && (e = {});
            var i = this.sanitize(t, e);
            return { isValid: t === i, sanitized: i };
          }),
          (t.prototype._extendObjectOfArrays = function (t) {
            var e = {};
            return (
              t.forEach(function (t) {
                Object.keys(t).forEach(function (i) {
                  Array.isArray(t[i]) && Array.isArray(e[i])
                    ? (e[i] = e[i].concat(t[i]))
                    : (e[i] = t[i]);
                });
              }),
              e
            );
          }),
          (t.prototype._iterateOverObject = function (t, e) {
            var i = this;
            void 0 === e && (e = {});
            try {
              var a = !1,
                r = void 0;
              if (Array.isArray(t))
                r = t.reduce(function (t, r) {
                  var n = i.validate(r, e);
                  return n.isValid ? t.concat([r]) : ((a = !0), t.concat([n.sanitized]));
                }, []);
              else {
                if (
                  !(function (t) {
                    if (
                      !(function (t) {
                        return !!t && 'object' == typeof t;
                      })(t) ||
                      '[object Object]' != d.call(t) ||
                      (function (t) {
                        var e = !1;
                        if (null != t && 'function' != typeof t.toString)
                          try {
                            e = !!(t + '');
                          } catch (t) {}
                        return e;
                      })(t)
                    )
                      return !1;
                    var e = p(t);
                    if (null === e) return !0;
                    var i = h.call(e, 'constructor') && e.constructor;
                    return 'function' == typeof i && i instanceof i && c.call(i) == u;
                  })(t)
                ) {
                  if (e.allowUndefined && void 0 === t) return;
                  return null;
                }
                r = Object.keys(t).reduce(function (r, n) {
                  var o = t[n],
                    s = i.validate(o, e);
                  return s.isValid ? (r[n] = o) : ((a = !0), (r[n] = s.sanitized)), r;
                }, {});
              }
              return a ? r : t;
            } catch (t) {
              return null;
            }
          }),
          (t.prototype._trim = function (t) {
            return String.prototype.trim ? t.trim() : t.replace(/(^\s*)|(\s*$)/g, '');
          }),
          t
        );
      })();
      function dt(t) {
        const e = n.A.acquire();
        for (let t = 0; t < arguments.length; t++) {
          const i = arguments[t],
            a = typeof i;
          if ('string' === a) e.push(i);
          else if (Array.isArray(i)) e.push.apply(e, i);
          else if ('object' === a) for (const t in i) i[t] && e.push(t);
        }
        const i = e.join(' ');
        return n.A.release(e), i;
      }
      function pt(t) {
        this[t.getAttribute('data-node-ref')] = t;
      }
      o.L.getLogger('esri.widgets.support.widgetUtils');
      const mt = [
          'dd',
          'dl',
          'dt',
          'h1',
          'h2',
          'h3',
          'h4',
          'h5',
          'h6',
          'sub',
          'sup',
          'animate',
          'animatetransform',
          'circle',
          'clippath',
          'defs',
          'ellipse',
          'g',
          'image',
          'line',
          'lineargradient',
          'marker',
          'mask',
          'path',
          'pattern',
          'polygon',
          'polyline',
          'radialgradient',
          'rect',
          'stop',
          'svg',
          'switch',
          'symbol',
          'text',
          'textpath',
          'tspan',
          'use',
        ].reduce((t, e) => ((t[e] = []), t), {}),
        ft = [
          'align',
          'alink',
          'alt',
          'bgcolor',
          'border',
          'cellpadding',
          'cellspacing',
          'class',
          'color',
          'cols',
          'colspan',
          'coords',
          'dir',
          'face',
          'height',
          'hspace',
          'ismap',
          'lang',
          'marginheight',
          'marginwidth',
          'multiple',
          'nohref',
          'noresize',
          'noshade',
          'nowrap',
          'ref',
          'rel',
          'rev',
          'rows',
          'rowspan',
          'scrolling',
          'shape',
          'span',
          'summary',
          'tabindex',
          'title',
          'usemap',
          'valign',
          'value',
          'vlink',
          'vspace',
          'width',
        ],
        bt = new ut(
          {
            whiteList: mt,
            onTagAttr: (t, e, i) => {
              const a = `${e}="${i}"`;
              if (ft.includes(e)) return a;
            },
            stripIgnoreTag: !0,
            stripIgnoreTagBody: ['script', 'style'],
          },
          !0,
        );
      function gt() {
        return getComputedStyle(document.body)
          .getPropertyValue('--esri-calcite-theme-name')
          .replace(/\s|'|"/g, '');
      }
    },
    82933: (t, e, i) => {
      'use strict';
      i.d(e, { Z: () => h });
      var a = i(29768),
        r = i(21972),
        n = i(15324),
        o = i(76506),
        s = i(34250),
        l = i(17533);
      i(23639),
        i(92143),
        i(31450),
        i(71552),
        i(40642),
        i(86656),
        i(22723),
        i(91055),
        i(27794),
        i(6906),
        i(50406),
        i(60991),
        i(81172),
        i(91306),
        i(76996);
      let c = class extends r.Z {
        constructor(t) {
          super(t), (this._groups = new Map());
        }
        destroy() {
          this.removeAll();
        }
        get size() {
          let t = 0;
          return (
            this._groups.forEach((e) => {
              t += e.length;
            }),
            t
          );
        }
        add(t, e) {
          if (!this._isHandle(t) && !Array.isArray(t) && !n.Z.isCollection(t)) return this;
          const i = this._getOrCreateGroup(e);
          return (
            Array.isArray(t) || n.Z.isCollection(t)
              ? t.forEach((t) => this._isHandle(t) && i.push(t))
              : i.push(t),
            this.notifyChange('size'),
            this
          );
        }
        forEach(t, e) {
          if ('function' == typeof t) this._groups.forEach((e) => e.forEach(t));
          else {
            const i = this._getGroup(t);
            i && e && i.forEach(e);
          }
        }
        has(t) {
          return this._groups.has(this._ensureGroupKey(t));
        }
        remove(t) {
          if (Array.isArray(t) || n.Z.isCollection(t)) return t.forEach(this.remove, this), this;
          if (!this.has(t)) return this;
          const e = this._getGroup(t);
          for (let t = 0; t < e.length; t++) e[t].remove();
          return this._deleteGroup(t), this.notifyChange('size'), this;
        }
        removeAll() {
          return (
            this._groups.forEach((t) => {
              for (let e = 0; e < t.length; e++) t[e].remove();
            }),
            this._groups.clear(),
            this.notifyChange('size'),
            this
          );
        }
        _isHandle(t) {
          return t && !!t.remove;
        }
        _getOrCreateGroup(t) {
          if (this.has(t)) return this._getGroup(t);
          const e = [];
          return this._groups.set(this._ensureGroupKey(t), e), e;
        }
        _getGroup(t) {
          return (0, o.a)(this._groups.get(this._ensureGroupKey(t)));
        }
        _deleteGroup(t) {
          return this._groups.delete(this._ensureGroupKey(t));
        }
        _ensureGroupKey(t) {
          return t || '_default_';
        }
      };
      (0, a._)([(0, s.Cb)({ readOnly: !0 })], c.prototype, 'size', null),
        (c = (0, a._)([(0, l.j)('esri.core.Handles')], c));
      const h = c;
    },
    617: (t, e, i) => {
      'use strict';
      i.d(e, {
        S1: () => h,
        on: () => f,
        OY: () => m,
        cm: () => d,
        N1: () => u,
        LR: () => p,
        tH: () => r,
      });
      var a = i(50406);
      function r(t, e, i, r, n) {
        const o = 'function' == typeof r ? r : null,
          s = 'object' == typeof r ? r : null;
        'boolean' == typeof r && (n = r);
        let l,
          c = !1;
        function h() {
          l && (l.remove(), (l = null));
        }
        const u = (0, a.dD)();
        (0, a.fu)(s, () => {
          h(), u.reject((0, a.zE)());
        });
        const d = {
          then: u.promise.then.bind(u.promise),
          catch: u.promise.catch.bind(u.promise),
          remove: h,
        };
        return (
          Object.freeze(d),
          (l = (function (t, e, i, a, r) {
            const n = t.watch(
              e,
              (e, r, n, o) => {
                (i && !i(e)) || null == a || a.call(t, e, r, n, o);
              },
              r,
            );
            if (Array.isArray(e))
              for (const r of e) {
                const n = t.get(r);
                i && i(n) && (null == a || a.call(t, n, n, e, t));
              }
            else {
              const r = t.get(e);
              i && i(r) && (null == a || a.call(t, r, r, e, t));
            }
            return n;
          })(
            t,
            e,
            i,
            (e, i, a, r) => {
              (c = !0),
                h(),
                o && o.call(t, e, i, a, r),
                u.resolve({ value: e, oldValue: i, propertyName: a, target: r });
            },
            n,
          )),
          c && h(),
          d
        );
      }
      function n(t) {
        return !!t;
      }
      function o(t) {
        return !t;
      }
      function s(t) {
        return !0 === t;
      }
      function l(t) {
        return !1 === t;
      }
      i(76506), i(60991), i(92143), i(31450), i(71552), i(40642), i(81172);
      const c = /\?(\.|$)/g;
      function h(t, e, i, a) {
        const r = Array.isArray(e) ? e : e.indexOf(',') > -1 ? e.split(',') : [e],
          n = (function (t, e, i, a) {
            return t.watch(e, i, a);
          })(t, e, i, a);
        for (const e of r) {
          const a = e.trim().replace(c, '$1'),
            r = t.get(a);
          i.call(t, r, r, a, t);
        }
        return n;
      }
      function u(t, e, i, a) {
        return r(t, e, n, i, a);
      }
      function d(t, e, i, a) {
        return r(t, e, o, i, a);
      }
      function p(t, e, i, a) {
        return r(t, e, s, i, a);
      }
      function m(t, e, i, a) {
        return r(t, e, l, i, a);
      }
      function f(t, e, i, r, n, o, s) {
        const l = {};
        function c(e) {
          const a = l[e];
          a && (o && o(a.target, e, t, i), a.handle.remove(), delete l[e]);
        }
        const u = h(
          t,
          e,
          (e, o, s) => {
            c(s),
              (0, a.i)(e) &&
                ((l[s] = { handle: (0, a.o)(e, i, r), target: e }), n && n(e, s, t, i));
          },
          s,
        );
        return {
          remove() {
            u.remove();
            for (const t in l) c(t);
          },
        };
      }
    },
    64494: (t, e, i) => {
      'use strict';
      i.r(e), i.d(e, { default: () => pt });
      var a = i(88762),
        r = i(29768),
        n = i(31450),
        o = i(82058),
        s = i(60991),
        l = i(76996),
        c = i(50406),
        h = i(76506),
        u = i(71552),
        d = i(32101),
        p = i(34250),
        m = (i(91306), i(92143), i(17533)),
        f = i(66284),
        b = i(96729),
        g = i(83073);
      function v(t) {
        return function (e, i) {
          e.hasOwnProperty('_messageBundleProps') ||
            (e._messageBundleProps = e._messageBundleProps ? e._messageBundleProps.slice() : []),
            e._messageBundleProps.push({ bundlePath: t, propertyName: i });
        };
      }
      var y = i(45435),
        w = function (t, e) {
          for (var i = 0, a = t.length; i < a; i++) {
            var r = t[i];
            Array.isArray(r)
              ? w(r, e)
              : null != r &&
                !1 !== r &&
                (r.hasOwnProperty('vnodeSelector') ||
                  (r = {
                    vnodeSelector: '',
                    properties: void 0,
                    children: void 0,
                    text: r.toString(),
                    domNode: null,
                  }),
                e.push(r));
          }
        };
      function x(t, e, ...i) {
        return 'function' != typeof t || (0, y.i)(t)
          ? (function (t, e) {
              for (var i = [], a = 2; a < arguments.length; a++) i[a - 2] = arguments[a];
              if (1 === i.length && 'string' == typeof i[0])
                return {
                  vnodeSelector: t,
                  properties: e || void 0,
                  children: void 0,
                  text: i[0],
                  domNode: null,
                };
              var r = [];
              return (
                w(i, r),
                {
                  vnodeSelector: t,
                  properties: e || void 0,
                  children: r,
                  text: void 0,
                  domNode: null,
                }
              );
            })(t, e, ...i)
          : t(e, ...i);
      }
      var k = i(22723);
      i(23639), i(40642), i(91055);
      var _,
        S = i(74673);
      i(21972), i(86656), i(27794), i(6906), i(81172), i(26341);
      let D = (_ = class extends S.a {
        constructor(t) {
          super(t),
            (this._oAuthCred = null),
            (this.appId = null),
            (this.authNamespace = '/'),
            (this.expiration = 20160),
            (this.forceLogin = !1),
            (this.forceUserId = !1),
            (this.locale = null),
            (this.minTimeUntilExpiration = 30),
            (this.popup = !1),
            (this.popupCallbackUrl = 'oauth-callback.html'),
            (this.popupWindowFeatures = 'height=490,width=800,resizable,scrollbars,status'),
            (this.portalUrl = 'https://www.arcgis.com'),
            (this.preserveUrlHash = !1),
            (this.userId = null);
        }
        clone() {
          return _.fromJSON(this.toJSON());
        }
      });
      (0, r._)([(0, p.Cb)({ json: { write: !0 } })], D.prototype, 'appId', void 0),
        (0, r._)([(0, p.Cb)({ json: { write: !0 } })], D.prototype, 'authNamespace', void 0),
        (0, r._)([(0, p.Cb)({ json: { write: !0 } })], D.prototype, 'expiration', void 0),
        (0, r._)([(0, p.Cb)({ json: { write: !0 } })], D.prototype, 'forceLogin', void 0),
        (0, r._)([(0, p.Cb)({ json: { write: !0 } })], D.prototype, 'forceUserId', void 0),
        (0, r._)([(0, p.Cb)({ json: { write: !0 } })], D.prototype, 'locale', void 0),
        (0, r._)(
          [(0, p.Cb)({ json: { write: !0 } })],
          D.prototype,
          'minTimeUntilExpiration',
          void 0,
        ),
        (0, r._)([(0, p.Cb)({ json: { write: !0 } })], D.prototype, 'popup', void 0),
        (0, r._)([(0, p.Cb)({ json: { write: !0 } })], D.prototype, 'popupCallbackUrl', void 0),
        (0, r._)([(0, p.Cb)({ json: { write: !0 } })], D.prototype, 'popupWindowFeatures', void 0),
        (0, r._)([(0, p.Cb)({ json: { write: !0 } })], D.prototype, 'portalUrl', void 0),
        (0, r._)([(0, p.Cb)({ json: { write: !0 } })], D.prototype, 'preserveUrlHash', void 0),
        (0, r._)([(0, p.Cb)({ json: { write: !0 } })], D.prototype, 'userId', void 0),
        (D = _ = (0, r._)([(0, m.j)('esri.identity.OAuthInfo')], D));
      const C = D;
      let T = class extends S.a {
        constructor(t) {
          super(t),
            (this.adminTokenServiceUrl = null),
            (this.currentVersion = null),
            (this.hasPortal = null),
            (this.hasServer = null),
            (this.owningSystemUrl = null),
            (this.owningTenant = null),
            (this.server = null),
            (this.shortLivedTokenValidity = null),
            (this.tokenServiceUrl = null),
            (this.webTierAuth = null);
        }
      };
      (0, r._)([(0, p.Cb)({ json: { write: !0 } })], T.prototype, 'adminTokenServiceUrl', void 0),
        (0, r._)([(0, p.Cb)({ json: { write: !0 } })], T.prototype, 'currentVersion', void 0),
        (0, r._)([(0, p.Cb)({ json: { write: !0 } })], T.prototype, 'hasPortal', void 0),
        (0, r._)([(0, p.Cb)({ json: { write: !0 } })], T.prototype, 'hasServer', void 0),
        (0, r._)([(0, p.Cb)({ json: { write: !0 } })], T.prototype, 'owningSystemUrl', void 0),
        (0, r._)([(0, p.Cb)({ json: { write: !0 } })], T.prototype, 'owningTenant', void 0),
        (0, r._)([(0, p.Cb)({ json: { write: !0 } })], T.prototype, 'server', void 0),
        (0, r._)(
          [(0, p.Cb)({ json: { write: !0 } })],
          T.prototype,
          'shortLivedTokenValidity',
          void 0,
        ),
        (0, r._)([(0, p.Cb)({ json: { write: !0 } })], T.prototype, 'tokenServiceUrl', void 0),
        (0, r._)([(0, p.Cb)({ json: { write: !0 } })], T.prototype, 'webTierAuth', void 0),
        (T = (0, r._)([(0, m.j)('esri.identity.ServerInfo')], T));
      const $ = T,
        I = 'esri-identity-form__group',
        A = 'esri-identity-form__label',
        E = 'esri-input',
        O = 'esri-button';
      let R = class extends b.Z {
        constructor(t, e) {
          super(t, e),
            (this._usernameInputNode = null),
            (this._passwordInputNode = null),
            (this.messages = null),
            (this.signingIn = !1),
            (this.server = null),
            (this.resource = null),
            (this.error = null),
            (this.oAuthPrompt = !1);
        }
        render() {
          const {
              error: t,
              server: e,
              resource: i,
              signingIn: a,
              oAuthPrompt: r,
              messages: n,
            } = this,
            o = x(
              'div',
              { class: I },
              (0, f.ng)(r ? n.oAuthInfo : n.info, {
                server: /\.arcgis\.com/i.test(e) ? 'ArcGIS Online' : e,
                resource: `(${i || n.lblItem})`,
              }),
            ),
            s = r
              ? null
              : x(
                  'div',
                  { class: I, key: 'username' },
                  x(
                    'label',
                    { class: A },
                    n.lblUser,
                    x('input', {
                      value: '',
                      required: !0,
                      autocomplete: 'off',
                      spellcheck: !1,
                      type: 'text',
                      bind: this,
                      afterCreate: g.s,
                      'data-node-ref': '_usernameInputNode',
                      class: E,
                    }),
                  ),
                ),
            l = r
              ? null
              : x(
                  'div',
                  { class: I, key: 'password' },
                  x(
                    'label',
                    { class: A },
                    n.lblPwd,
                    x('input', {
                      value: '',
                      required: !0,
                      type: 'password',
                      bind: this,
                      afterCreate: g.s,
                      'data-node-ref': '_passwordInputNode',
                      class: E,
                    }),
                  ),
                ),
            c = x(
              'div',
              { class: this.classes(I, 'esri-identity-form__footer') },
              x('input', {
                type: 'submit',
                disabled: !!a,
                value: a ? n.lblSigning : n.lblOk,
                class: O,
              }),
              x('input', {
                type: 'button',
                value: n.lblCancel,
                bind: this,
                onclick: this._cancel,
                class: this.classes(O, 'esri-button--secondary'),
              }),
            ),
            h = t
              ? x('div', null, t.details && t.details.httpStatus ? n.invalidUser : n.noAuthService)
              : null;
          return x(
            'form',
            { class: 'esri-identity-form', bind: this, onsubmit: this._submit },
            o,
            h,
            s,
            l,
            c,
          );
        }
        _cancel() {
          this._set('signingIn', !1),
            this._usernameInputNode && (this._usernameInputNode.value = ''),
            this._passwordInputNode && (this._passwordInputNode.value = ''),
            this.emit('cancel');
        }
        _submit(t) {
          t.preventDefault(), this._set('signingIn', !0);
          const e = this.oAuthPrompt
            ? {}
            : {
                username: this._usernameInputNode && this._usernameInputNode.value,
                password: this._passwordInputNode && this._passwordInputNode.value,
              };
          this.emit('submit', e);
        }
      };
      (0, r._)([(0, p.Cb)(), v('esri/identity/t9n/identity')], R.prototype, 'messages', void 0),
        (0, r._)([(0, p.Cb)()], R.prototype, 'signingIn', void 0),
        (0, r._)([(0, p.Cb)()], R.prototype, 'server', void 0),
        (0, r._)([(0, p.Cb)()], R.prototype, 'resource', void 0),
        (0, r._)([(0, p.Cb)()], R.prototype, 'error', void 0),
        (0, r._)([(0, p.Cb)()], R.prototype, 'oAuthPrompt', void 0),
        (R = (0, r._)([(0, m.j)('esri.identity.IdentityForm')], R));
      var N,
        M = R,
        P = [
          'input',
          'select',
          'textarea',
          'a[href]',
          'button',
          '[tabindex]',
          'audio[controls]',
          'video[controls]',
          '[contenteditable]:not([contenteditable="false"])',
          'details>summary:first-of-type',
          'details',
        ],
        L = P.join(','),
        H =
          'undefined' == typeof Element
            ? function () {}
            : Element.prototype.matches ||
              Element.prototype.msMatchesSelector ||
              Element.prototype.webkitMatchesSelector,
        F = function (t) {
          var e = parseInt(t.getAttribute('tabindex'), 10);
          return isNaN(e)
            ? (function (t) {
                return 'true' === t.contentEditable;
              })(t)
              ? 0
              : ('AUDIO' !== t.nodeName && 'VIDEO' !== t.nodeName && 'DETAILS' !== t.nodeName) ||
                null !== t.getAttribute('tabindex')
              ? t.tabIndex
              : 0
            : e;
        },
        z = function (t, e) {
          return t.tabIndex === e.tabIndex
            ? t.documentOrder - e.documentOrder
            : t.tabIndex - e.tabIndex;
        },
        j = function (t) {
          return 'INPUT' === t.tagName;
        },
        V = function (t, e) {
          return !(
            e.disabled ||
            (function (t) {
              return j(t) && 'hidden' === t.type;
            })(e) ||
            (function (t, e) {
              if ('hidden' === getComputedStyle(t).visibility) return !0;
              var i = H.call(t, 'details>summary:first-of-type') ? t.parentElement : t;
              if (H.call(i, 'details:not([open]) *')) return !0;
              if (e && 'full' !== e) {
                if ('non-zero-area' === e) {
                  var a = t.getBoundingClientRect(),
                    r = a.width,
                    n = a.height;
                  return 0 === r && 0 === n;
                }
              } else
                for (; t; ) {
                  if ('none' === getComputedStyle(t).display) return !0;
                  t = t.parentElement;
                }
              return !1;
            })(e, t.displayCheck) ||
            (function (t) {
              return (
                'DETAILS' === t.tagName &&
                Array.prototype.slice.apply(t.children).some(function (t) {
                  return 'SUMMARY' === t.tagName;
                })
              );
            })(e)
          );
        },
        U = function (t, e) {
          return !(
            !V(t, e) ||
            (function (t) {
              return (
                (function (t) {
                  return j(t) && 'radio' === t.type;
                })(t) &&
                !(function (t) {
                  if (!t.name) return !0;
                  var e,
                    i = t.form || t.ownerDocument,
                    a = function (t) {
                      return i.querySelectorAll('input[type="radio"][name="' + t + '"]');
                    };
                  if (
                    'undefined' != typeof window &&
                    void 0 !== window.CSS &&
                    'function' == typeof window.CSS.escape
                  )
                    e = a(window.CSS.escape(t.name));
                  else
                    try {
                      e = a(t.name);
                    } catch (t) {
                      return (
                        console.error(
                          'Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s',
                          t.message,
                        ),
                        !1
                      );
                    }
                  var r = (function (t, e) {
                    for (var i = 0; i < t.length; i++)
                      if (t[i].checked && t[i].form === e) return t[i];
                  })(e, t.form);
                  return !r || r === t;
                })(t)
              );
            })(e) ||
            F(e) < 0
          );
        },
        B = P.concat('iframe').join(','),
        q = function (t, e) {
          if (((e = e || {}), !t)) throw new Error('No node provided');
          return !1 !== H.call(t, B) && V(e, t);
        };
      function W(t, e) {
        var i = Object.keys(t);
        if (Object.getOwnPropertySymbols) {
          var a = Object.getOwnPropertySymbols(t);
          e &&
            (a = a.filter(function (e) {
              return Object.getOwnPropertyDescriptor(t, e).enumerable;
            })),
            i.push.apply(i, a);
        }
        return i;
      }
      function G(t, e, i) {
        return (
          e in t
            ? Object.defineProperty(t, e, {
                value: i,
                enumerable: !0,
                configurable: !0,
                writable: !0,
              })
            : (t[e] = i),
          t
        );
      }
      var X,
        Y =
          ((X = []),
          {
            activateTrap: function (t) {
              if (X.length > 0) {
                var e = X[X.length - 1];
                e !== t && e.pause();
              }
              var i = X.indexOf(t);
              -1 === i || X.splice(i, 1), X.push(t);
            },
            deactivateTrap: function (t) {
              var e = X.indexOf(t);
              -1 !== e && X.splice(e, 1), X.length > 0 && X[X.length - 1].unpause();
            },
          }),
        K = function (t) {
          return setTimeout(t, 0);
        },
        Z = function (t, e) {
          var i = -1;
          return (
            t.every(function (t, a) {
              return !e(t) || ((i = a), !1);
            }),
            i
          );
        },
        J = function (t) {
          for (var e = arguments.length, i = new Array(e > 1 ? e - 1 : 0), a = 1; a < e; a++)
            i[a - 1] = arguments[a];
          return 'function' == typeof t ? t.apply(void 0, i) : t;
        },
        Q = function (t, e) {
          var i,
            a = document,
            r = (function (t) {
              for (var e = 1; e < arguments.length; e++) {
                var i = null != arguments[e] ? arguments[e] : {};
                e % 2
                  ? W(Object(i), !0).forEach(function (e) {
                      G(t, e, i[e]);
                    })
                  : Object.getOwnPropertyDescriptors
                  ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(i))
                  : W(Object(i)).forEach(function (e) {
                      Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(i, e));
                    });
              }
              return t;
            })({ returnFocusOnDeactivate: !0, escapeDeactivates: !0, delayInitialFocus: !0 }, e),
            n = {
              containers: [],
              tabbableGroups: [],
              nodeFocusedBeforeActivation: null,
              mostRecentlyFocusedNode: null,
              active: !1,
              paused: !1,
            },
            o = function (t, e, i) {
              return t && void 0 !== t[e] ? t[e] : r[i || e];
            },
            s = function (t) {
              return n.containers.some(function (e) {
                return e.contains(t);
              });
            },
            l = function (t) {
              var e = r[t];
              if (!e) return null;
              var i = e;
              if ('string' == typeof e && !(i = a.querySelector(e)))
                throw new Error('`'.concat(t, '` refers to no known node'));
              if ('function' == typeof e && !(i = e()))
                throw new Error('`'.concat(t, '` did not return a node'));
              return i;
            },
            c = function () {
              var t;
              if (null !== l('initialFocus')) t = l('initialFocus');
              else if (s(a.activeElement)) t = a.activeElement;
              else {
                var e = n.tabbableGroups[0];
                t = (e && e.firstTabbableNode) || l('fallbackFocus');
              }
              if (!t)
                throw new Error('Your focus-trap needs to have at least one focusable element');
              return t;
            },
            h = function () {
              if (
                ((n.tabbableGroups = n.containers
                  .map(function (t) {
                    var e = (function (t, e) {
                      var i = [],
                        a = [];
                      return (
                        (function (t, e, i) {
                          var a = Array.prototype.slice.apply(t.querySelectorAll(L));
                          return e && H.call(t, L) && a.unshift(t), a.filter(i);
                        })(t, (e = e || {}).includeContainer, U.bind(null, e)).forEach(function (
                          t,
                          e,
                        ) {
                          var r = F(t);
                          0 === r ? i.push(t) : a.push({ documentOrder: e, tabIndex: r, node: t });
                        }),
                        a
                          .sort(z)
                          .map(function (t) {
                            return t.node;
                          })
                          .concat(i)
                      );
                    })(t);
                    if (e.length > 0)
                      return {
                        container: t,
                        firstTabbableNode: e[0],
                        lastTabbableNode: e[e.length - 1],
                      };
                  })
                  .filter(function (t) {
                    return !!t;
                  })),
                n.tabbableGroups.length <= 0 && !l('fallbackFocus'))
              )
                throw new Error(
                  'Your focus-trap must have at least one container with at least one tabbable node in it at all times',
                );
            },
            u = function t(e) {
              e !== a.activeElement &&
                (e && e.focus
                  ? (e.focus({ preventScroll: !!r.preventScroll }),
                    (n.mostRecentlyFocusedNode = e),
                    (function (t) {
                      return (
                        t.tagName &&
                        'input' === t.tagName.toLowerCase() &&
                        'function' == typeof t.select
                      );
                    })(e) && e.select())
                  : t(c()));
            },
            d = function (t) {
              return l('setReturnFocus') || t;
            },
            p = function (t) {
              s(t.target) ||
                (J(r.clickOutsideDeactivates, t)
                  ? i.deactivate({ returnFocus: r.returnFocusOnDeactivate && !q(t.target) })
                  : J(r.allowOutsideClick, t) || t.preventDefault());
            },
            m = function (t) {
              var e = s(t.target);
              e || t.target instanceof Document
                ? e && (n.mostRecentlyFocusedNode = t.target)
                : (t.stopImmediatePropagation(), u(n.mostRecentlyFocusedNode || c()));
            },
            f = function (t) {
              if (
                !1 !== r.escapeDeactivates &&
                (function (t) {
                  return 'Escape' === t.key || 'Esc' === t.key || 27 === t.keyCode;
                })(t)
              )
                return t.preventDefault(), void i.deactivate();
              (function (t) {
                return 'Tab' === t.key || 9 === t.keyCode;
              })(t) &&
                (function (t) {
                  h();
                  var e = null;
                  if (n.tabbableGroups.length > 0) {
                    var i = Z(n.tabbableGroups, function (e) {
                      return e.container.contains(t.target);
                    });
                    if (i < 0)
                      e = t.shiftKey
                        ? n.tabbableGroups[n.tabbableGroups.length - 1].lastTabbableNode
                        : n.tabbableGroups[0].firstTabbableNode;
                    else if (t.shiftKey) {
                      var a = Z(n.tabbableGroups, function (e) {
                        var i = e.firstTabbableNode;
                        return t.target === i;
                      });
                      if (
                        (a < 0 && n.tabbableGroups[i].container === t.target && (a = i), a >= 0)
                      ) {
                        var r = 0 === a ? n.tabbableGroups.length - 1 : a - 1;
                        e = n.tabbableGroups[r].lastTabbableNode;
                      }
                    } else {
                      var o = Z(n.tabbableGroups, function (e) {
                        var i = e.lastTabbableNode;
                        return t.target === i;
                      });
                      if (
                        (o < 0 && n.tabbableGroups[i].container === t.target && (o = i), o >= 0)
                      ) {
                        var s = o === n.tabbableGroups.length - 1 ? 0 : o + 1;
                        e = n.tabbableGroups[s].firstTabbableNode;
                      }
                    }
                  } else e = l('fallbackFocus');
                  e && (t.preventDefault(), u(e));
                })(t);
            },
            b = function (t) {
              J(r.clickOutsideDeactivates, t) ||
                s(t.target) ||
                J(r.allowOutsideClick, t) ||
                (t.preventDefault(), t.stopImmediatePropagation());
            },
            g = function () {
              if (n.active)
                return (
                  Y.activateTrap(i),
                  (N = r.delayInitialFocus
                    ? K(function () {
                        u(c());
                      })
                    : u(c())),
                  a.addEventListener('focusin', m, !0),
                  a.addEventListener('mousedown', p, { capture: !0, passive: !1 }),
                  a.addEventListener('touchstart', p, { capture: !0, passive: !1 }),
                  a.addEventListener('click', b, { capture: !0, passive: !1 }),
                  a.addEventListener('keydown', f, { capture: !0, passive: !1 }),
                  i
                );
            },
            v = function () {
              if (n.active)
                return (
                  a.removeEventListener('focusin', m, !0),
                  a.removeEventListener('mousedown', p, !0),
                  a.removeEventListener('touchstart', p, !0),
                  a.removeEventListener('click', b, !0),
                  a.removeEventListener('keydown', f, !0),
                  i
                );
            };
          return (
            (i = {
              activate: function (t) {
                if (n.active) return this;
                var e = o(t, 'onActivate'),
                  i = o(t, 'onPostActivate'),
                  r = o(t, 'checkCanFocusTrap');
                r || h(),
                  (n.active = !0),
                  (n.paused = !1),
                  (n.nodeFocusedBeforeActivation = a.activeElement),
                  e && e();
                var s = function () {
                  r && h(), g(), i && i();
                };
                return r ? (r(n.containers.concat()).then(s, s), this) : (s(), this);
              },
              deactivate: function (t) {
                if (!n.active) return this;
                clearTimeout(N), v(), (n.active = !1), (n.paused = !1), Y.deactivateTrap(i);
                var e = o(t, 'onDeactivate'),
                  a = o(t, 'onPostDeactivate'),
                  r = o(t, 'checkCanReturnFocus');
                e && e();
                var s = o(t, 'returnFocus', 'returnFocusOnDeactivate'),
                  l = function () {
                    K(function () {
                      s && u(d(n.nodeFocusedBeforeActivation)), a && a();
                    });
                  };
                return s && r
                  ? (r(d(n.nodeFocusedBeforeActivation)).then(l, l), this)
                  : (l(), this);
              },
              pause: function () {
                return n.paused || !n.active || ((n.paused = !0), v()), this;
              },
              unpause: function () {
                return n.paused && n.active ? ((n.paused = !1), h(), g(), this) : this;
              },
              updateContainerElements: function (t) {
                var e = [].concat(t).filter(Boolean);
                return (
                  (n.containers = e.map(function (t) {
                    return 'string' == typeof t ? a.querySelector(t) : t;
                  })),
                  n.active && h(),
                  this
                );
              },
            }).updateContainerElements(t),
            i
          );
        };
      const tt = 'esri-identity-modal__content';
      let et = class extends b.Z {
        constructor(t, e) {
          super(t, e),
            (this.container = document.createElement('div')),
            (this.content = null),
            (this.open = !1),
            (this._close = () => {
              this.open = !1;
            }),
            document.body.appendChild(this.container),
            this.own(this.watch('open', () => this._toggleFocusTrap()));
        }
        destroy() {
          this._destroyFocusTrap();
        }
        render() {
          const t = this.id,
            { open: e, content: i, title: a, messages: r } = this,
            n = e && !!i,
            o = { 'esri-identity-modal--open': n, 'esri-identity-modal--closed': !n },
            s = x(
              'button',
              {
                class: 'esri-identity-modal__close-button',
                'aria-label': r.close,
                title: r.close,
                bind: this,
                onclick: this._close,
              },
              x('span', { 'aria-hidden': 'true', class: 'esri-icon-close' }),
            ),
            l = `${t}_title`,
            c = `${t}_content`,
            h = a ? x('h1', { id: l, class: 'esri-identity-modal__title' }, a) : null,
            u = n
              ? x(
                  'div',
                  {
                    bind: this,
                    class: 'esri-identity-modal__dialog',
                    role: 'dialog',
                    'aria-labelledby': l,
                    'aria-describedby': c,
                    afterCreate: this._createFocusTrap,
                  },
                  s,
                  h,
                  this._renderContent(c),
                )
              : null;
          return x('div', { tabIndex: -1, class: this.classes('esri-identity-modal', o) }, u);
        }
        _destroyFocusTrap() {
          var t;
          null == (t = this._focusTrap) || t.deactivate({ onDeactivate: null }),
            (this._focusTrap = null);
        }
        _toggleFocusTrap() {
          const { _focusTrap: t, open: e } = this;
          t && (e ? t.activate() : t.deactivate());
        }
        _createFocusTrap(t) {
          this._destroyFocusTrap();
          const e = requestAnimationFrame(() => {
            (this._focusTrap = Q(t, { initialFocus: 'input', onDeactivate: this._close })),
              this._toggleFocusTrap();
          });
          this.own((0, k.m)(() => cancelAnimationFrame(e)));
        }
        _renderContent(t) {
          const e = this.content;
          return 'string' == typeof e
            ? x('div', { class: tt, id: t, innerHTML: e })
            : (i = e) && 'function' == typeof i.render
            ? x('div', { class: tt, id: t }, e.render())
            : e instanceof HTMLElement
            ? x('div', { class: tt, id: t, bind: e, afterCreate: this._attachToNode })
            : null;
          var i;
        }
        _attachToNode(t) {
          t.appendChild(this);
        }
      };
      (0, r._)([(0, p.Cb)({ readOnly: !0 })], et.prototype, 'container', void 0),
        (0, r._)([(0, p.Cb)()], et.prototype, 'content', void 0),
        (0, r._)([(0, p.Cb)()], et.prototype, 'open', void 0),
        (0, r._)([(0, p.Cb)(), v('esri/t9n/common')], et.prototype, 'messages', void 0),
        (0, r._)([(0, p.Cb)({ aliasOf: 'messages.auth.signIn' })], et.prototype, 'title', void 0),
        (et = (0, r._)([(0, m.j)('esri.identity.IdentityModal')], et));
      var it = et;
      class at {
        constructor(t, e) {
          (this.oAuthInfo = null),
            (this.storage = null),
            (this.appId = null),
            (this.expires = null),
            (this.ssl = null),
            (this.token = null),
            (this.userId = null),
            (this.oAuthInfo = t),
            (this.storage = e),
            this._init();
        }
        isValid() {
          let t = !1;
          if (this.oAuthInfo && this.token && this.userId) {
            const e = Date.now();
            this.expires > e &&
              (this.expires - e) / 1e3 > 60 * this.oAuthInfo.minTimeUntilExpiration &&
              (t = !0);
          }
          return t;
        }
        save() {
          if (!this.storage) return;
          const t = this._load(),
            e = this.oAuthInfo;
          if (e && e.authNamespace && e.portalUrl) {
            let i = t[e.authNamespace];
            i || (i = t[e.authNamespace] = {}),
              (i[e.portalUrl] = {
                appId: (this.appId = e.appId),
                expires: this.expires,
                ssl: this.ssl,
                token: this.token,
                userId: this.userId,
              });
            try {
              this.storage.setItem('esriJSAPIOAuth', JSON.stringify(t));
            } catch (t) {
              console.log(t);
            }
          }
        }
        destroy() {
          const t = this._load(),
            e = this.oAuthInfo;
          if (e && e.appId && e.portalUrl && this.token && this.expires > Date.now()) {
            const t = e.portalUrl.replace(/^http:/i, 'https:') + '/sharing/rest/oauth2/revokeToken',
              i = new FormData();
            if (
              (i.append('f', 'json'),
              i.append('auth_token', this.token),
              i.append('client_id', e.appId),
              i.append('token_type_hint', 'access_token'),
              'function' == typeof navigator.sendBeacon)
            )
              navigator.sendBeacon(t, i);
            else {
              const e = new XMLHttpRequest();
              e.open('POST', t), e.send(i);
            }
          }
          if (e && e.authNamespace && e.portalUrl && this.storage) {
            const i = t[e.authNamespace];
            if (i) {
              delete i[e.portalUrl];
              try {
                this.storage.setItem('esriJSAPIOAuth', JSON.stringify(t));
              } catch (t) {
                console.log(t);
              }
            }
          }
          e && ((e._oAuthCred = null), (this.oAuthInfo = null));
        }
        _init() {
          const t = this._load(),
            e = this.oAuthInfo;
          if (e && e.authNamespace && e.portalUrl) {
            let i = t[e.authNamespace];
            i &&
              ((i = i[e.portalUrl]),
              i &&
                ((this.appId = i.appId),
                (this.expires = i.expires),
                (this.ssl = i.ssl),
                (this.token = i.token),
                (this.userId = i.userId)));
          }
        }
        _load() {
          let t = {};
          if (this.storage) {
            const e = this.storage.getItem('esriJSAPIOAuth');
            if (e)
              try {
                t = JSON.parse(e);
              } catch (t) {
                console.log(t);
              }
          }
          return t;
        }
      }
      at.prototype.declaredClass = 'esri.identity.OAuthCredential';
      const rt = {},
        nt = (t) => {
          const e = new d.R9(t.owningSystemUrl).host,
            i = new d.R9(t.server).host,
            a = /.+\.arcgis\.com$/i;
          return a.test(e) && a.test(i);
        },
        ot = (t, e) => !!(nt(t) && e && e.some((e) => e.test(t.server)));
      let st = null,
        lt = null;
      try {
        (st = window.localStorage), (lt = window.sessionStorage);
      } catch {}
      class ct extends l.E {
        constructor() {
          super(),
            (this._portalConfig = h.g.esriGeowConfig),
            (this.serverInfos = []),
            (this.oAuthInfos = []),
            (this.credentials = []),
            (this._soReqs = []),
            (this._xoReqs = []),
            (this._portals = []),
            (this.defaultOAuthInfo = null),
            (this.defaultTokenValidity = 60),
            (this.dialog = null),
            (this.formConstructor = M),
            (this.tokenValidity = null),
            (this.normalizeWebTierAuth = !1),
            (this._appOrigin = 'null' !== window.origin ? window.origin : window.location.origin),
            (this._appUrlObj = (0, d.mN)(window.location.href)),
            (this._busy = null),
            (this._rejectOnPersistedPageShow = !1),
            (this._oAuthHash = null),
            (this._gwTokenUrl = '/sharing/rest/generateToken'),
            (this._agsRest = '/rest/services'),
            (this._agsPortal = /\/sharing(\/|$)/i),
            (this._agsAdmin = /(https?:\/\/[^\/]+\/[^\/]+)\/admin\/?(\/.*)?$/i),
            (this._adminSvcs = /\/rest\/admin\/services(\/|$)/i),
            (this._gwDomains = [
              {
                regex: /^https?:\/\/www\.arcgis\.com/i,
                customBaseUrl: 'maps.arcgis.com',
                tokenServiceUrl: 'https://www.arcgis.com/sharing/rest/generateToken',
              },
              {
                regex: /^https?:\/\/(?:dev|[a-z\d-]+\.mapsdev)\.arcgis\.com/i,
                customBaseUrl: 'mapsdev.arcgis.com',
                tokenServiceUrl: 'https://dev.arcgis.com/sharing/rest/generateToken',
              },
              {
                regex: /^https?:\/\/(?:devext|[a-z\d-]+\.mapsdevext)\.arcgis\.com/i,
                customBaseUrl: 'mapsdevext.arcgis.com',
                tokenServiceUrl: 'https://devext.arcgis.com/sharing/rest/generateToken',
              },
              {
                regex: /^https?:\/\/(?:qaext|[a-z\d-]+\.mapsqa)\.arcgis\.com/i,
                customBaseUrl: 'mapsqa.arcgis.com',
                tokenServiceUrl: 'https://qaext.arcgis.com/sharing/rest/generateToken',
              },
              {
                regex: /^https?:\/\/[a-z\d-]+\.maps\.arcgis\.com/i,
                customBaseUrl: 'maps.arcgis.com',
                tokenServiceUrl: 'https://www.arcgis.com/sharing/rest/generateToken',
              },
            ]),
            (this._legacyFed = []),
            (this._regexSDirUrl = /http.+\/rest\/services\/?/gi),
            (this._regexServerType = /(\/(FeatureServer|GPServer|GeoDataServer|GeocodeServer|GeoenrichmentServer|GeometryServer|GlobeServer|ImageServer|MapServer|MobileServer|NAServer|NetworkDiagramServer|OGCFeatureServer|ParcelFabricServer|RelationalCatalogServer|SceneServer|StreamServer|UtilityNetworkServer|ValidationServer|VectorTileServer|VersionManagementServer)).*/gi),
            (this._gwUser = /http.+\/users\/([^\/]+)\/?.*/i),
            (this._gwItem = /http.+\/items\/([^\/]+)\/?.*/i),
            (this._gwGroup = /http.+\/groups\/([^\/]+)\/?.*/i),
            (this._rePortalTokenSvc = /\/sharing(\/rest)?\/generatetoken/i),
            (this._createDefaultOAuthInfo = !0),
            (this._hasTestedIfAppIsOnPortal = !1),
            this._getOAuthHash(),
            window.addEventListener('pageshow', (t) => {
              this._pageShowHandler(t);
            });
        }
        registerServers(t) {
          const e = this.serverInfos;
          e
            ? ((t = t.filter((t) => !this.findServerInfo(t.server))),
              (this.serverInfos = e.concat(t)))
            : (this.serverInfos = t),
            t.forEach((t) => {
              t.owningSystemUrl && this._portals.push(t.owningSystemUrl),
                t.hasPortal && this._portals.push(t.server);
            });
        }
        registerOAuthInfos(t) {
          const e = this.oAuthInfos;
          if (e) {
            for (const i of t) {
              const t = this.findOAuthInfo(i.portalUrl);
              t && e.splice(e.indexOf(t), 1);
            }
            this.oAuthInfos = e.concat(t);
          } else this.oAuthInfos = t;
        }
        registerToken(t) {
          t = { ...t };
          const e = this._sanitizeUrl(t.server),
            i = this._isServerRsrc(e);
          let a,
            r = this.findServerInfo(e),
            n = !0;
          r ||
            ((r = new $()),
            (r.server = this._getServerInstanceRoot(e)),
            i
              ? (r.hasServer = !0)
              : ((r.tokenServiceUrl = this._getTokenSvcUrl(e)), (r.hasPortal = !0)),
            this.registerServers([r])),
            (a = this._findCredential(e)),
            a
              ? (delete t.server, Object.assign(a, t), (n = !1))
              : ((a = new ht({
                  userId: t.userId,
                  server: r.server,
                  token: t.token,
                  expires: t.expires,
                  ssl: t.ssl,
                  scope: i ? 'server' : 'portal',
                })),
                (a.resources = [e]),
                this.credentials.push(a)),
            a.emitTokenChange(!1),
            n || a.refreshServerTokens();
        }
        toJSON() {
          return (0, h.yd)({
            serverInfos: this.serverInfos.map((t) => t.toJSON()),
            oAuthInfos: this.oAuthInfos.map((t) => t.toJSON()),
            credentials: this.credentials.map((t) => t.toJSON()),
          });
        }
        initialize(t) {
          if (!t) return;
          'string' == typeof t && (t = JSON.parse(t));
          const e = t.serverInfos,
            i = t.oAuthInfos,
            a = t.credentials;
          if (e) {
            const t = [];
            e.forEach((e) => {
              e.server && e.tokenServiceUrl && t.push(e.declaredClass ? e : new $(e));
            }),
              t.length && this.registerServers(t);
          }
          if (i) {
            const t = [];
            i.forEach((e) => {
              e.appId && t.push(e.declaredClass ? e : new C(e));
            }),
              t.length && this.registerOAuthInfos(t);
          }
          a &&
            a.forEach((t) => {
              t.server &&
                t.token &&
                t.expires &&
                t.expires > Date.now() &&
                ((t = t.declaredClass ? t : new ht(t)).emitTokenChange(), this.credentials.push(t));
            });
        }
        findServerInfo(t) {
          let e;
          t = this._sanitizeUrl(t);
          for (const i of this.serverInfos)
            if (this._hasSameServerInstance(i.server, t)) {
              e = i;
              break;
            }
          return e;
        }
        findOAuthInfo(t) {
          let e;
          t = this._sanitizeUrl(t);
          for (const i of this.oAuthInfos)
            if (this._hasSameServerInstance(i.portalUrl, t)) {
              e = i;
              break;
            }
          return e;
        }
        findCredential(t, e) {
          let i;
          t = this._sanitizeUrl(t);
          const a = this._isServerRsrc(t) ? 'server' : 'portal';
          if (e) {
            for (const r of this.credentials)
              if (this._hasSameServerInstance(r.server, t) && e === r.userId && r.scope === a) {
                i = r;
                break;
              }
          } else
            for (const e of this.credentials)
              if (
                this._hasSameServerInstance(e.server, t) &&
                -1 !== this._getIdenticalSvcIdx(t, e) &&
                e.scope === a
              ) {
                i = e;
                break;
              }
          return i;
        }
        getCredential(t, e) {
          let i,
            a,
            r = !0;
          e && ((i = !!e.token), (a = e.error), (r = !1 !== e.prompt)),
            (e = { ...e }),
            (t = this._sanitizeUrl(t));
          const n = (0, c.yi)(),
            o = (0, c.hh)();
          if (
            (e.signal &&
              (0, c.fu)(e.signal, () => {
                n.abort();
              }),
            (0, c.fu)(n, () => {
              o.reject(new s.Z('identity-manager:user-aborted', 'ABORTED'));
            }),
            (0, c.Hc)(n))
          )
            return o.promise;
          e.signal = n.signal;
          const l = this._isAdminResource(t),
            h = i ? this.findCredential(t) : null;
          let u;
          if (h && a && a.details && 498 === a.details.httpStatus) h.destroy();
          else if (h)
            return (
              (u = new s.Z(
                'identity-manager:not-authorized',
                "You are currently signed in as: '" +
                  h.userId +
                  "'. You do not have access to this resource: " +
                  t,
                { error: a },
              )),
              o.reject(u),
              o.promise
            );
          const p = this._findCredential(t, e);
          if (p) return o.resolve(p), o.promise;
          let m = this.findServerInfo(t);
          if (m)
            !m.hasServer &&
              this._isServerRsrc(t) &&
              ((m._restInfoPms = this._getTokenSvcUrl(t)), (m.hasServer = !0));
          else {
            const e = this._getTokenSvcUrl(t);
            if (!e)
              return (
                (u = new s.Z(
                  'identity-manager:unknown-resource',
                  'Unknown resource - could not find token service endpoint.',
                )),
                o.reject(u),
                o.promise
              );
            (m = new $()),
              (m.server = this._getServerInstanceRoot(t)),
              'string' == typeof e
                ? ((m.tokenServiceUrl = e), (m.hasPortal = !0))
                : ((m._restInfoPms = e), (m.hasServer = !0)),
              this.registerServers([m]);
          }
          return (
            m.hasPortal &&
              void 0 === m._selfReq &&
              (r ||
                (0, d.D6)(m.tokenServiceUrl, this._appOrigin) ||
                this._gwDomains.some((t) => t.tokenServiceUrl === m.tokenServiceUrl)) &&
              (m._selfReq = {
                owningTenant: e && e.owningTenant,
                selfDfd: this._getPortalSelf(
                  m.tokenServiceUrl.replace(this._rePortalTokenSvc, '/sharing/rest/portals/self'),
                  t,
                ),
              }),
            this._enqueue(t, m, e, o, l)
          );
        }
        getResourceName(t) {
          return this._isRESTService(t)
            ? t.replace(this._regexSDirUrl, '').replace(this._regexServerType, '') || ''
            : (this._gwUser.test(t) && t.replace(this._gwUser, '$1')) ||
                (this._gwItem.test(t) && t.replace(this._gwItem, '$1')) ||
                (this._gwGroup.test(t) && t.replace(this._gwGroup, '$1')) ||
                '';
        }
        generateToken(t, e, i) {
          const a = this._rePortalTokenSvc.test(t.tokenServiceUrl),
            r = new d.R9(this._appOrigin),
            n = t.shortLivedTokenValidity;
          let l, c, h, u, p, m, f, b;
          e &&
            ((b = this.tokenValidity || n || this.defaultTokenValidity), b > n && n > 0 && (b = n)),
            i &&
              ((l = i.isAdmin),
              (c = i.serverUrl),
              (h = i.token),
              (m = i.signal),
              (f = i.ssl),
              (t.customParameters = i.customParameters)),
            l
              ? (u = t.adminTokenServiceUrl)
              : ((u = t.tokenServiceUrl),
                (p = new d.R9(u.toLowerCase())),
                t.webTierAuth &&
                  null != i &&
                  i.serverUrl &&
                  !f &&
                  'http' === r.scheme &&
                  ((0, d.D6)(r.uri, u, !0) ||
                    ('https' === p.scheme &&
                      r.host === p.host &&
                      '7080' === r.port &&
                      '7443' === p.port)) &&
                  (u = u.replace(/^https:/i, 'http:').replace(/:7443/i, ':7080')));
          const g = {
            query: {
              request: 'getToken',
              username: null == e ? void 0 : e.username,
              password: null == e ? void 0 : e.password,
              serverUrl: c,
              token: h,
              expiration: b,
              referer: l || a ? this._appOrigin : null,
              client: l ? 'referer' : null,
              f: 'json',
              ...t.customParameters,
            },
            method: 'post',
            authMode: 'anonymous',
            useProxy: this._useProxy(t, i),
            signal: m,
            ...(null == i ? void 0 : i.ioArgs),
          };
          return (
            a || (g.withCredentials = !1),
            (0, o.default)(u, g).then((i) => {
              const a = i.data;
              if (!a || !a.token)
                return new s.Z(
                  'identity-manager:authentication-failed',
                  'Unable to generate token',
                );
              const r = t.server;
              return (
                rt[r] || (rt[r] = {}), e && (rt[r][e.username] = e.password), (a.validity = b), a
              );
            })
          );
        }
        isBusy() {
          return !!this._busy;
        }
        checkSignInStatus(t) {
          return this.checkAppAccess(t, '').then((t) => t.credential);
        }
        checkAppAccess(t, e, i) {
          let a = !1;
          return this.getCredential(t, { prompt: !1 })
            .then((r) => {
              let n;
              const l = { f: 'json' };
              if ('portal' === r.scope)
                if (e && (this._doPortalSignIn(t) || (i && i.force)))
                  (n = r.server + '/sharing/rest/oauth2/validateAppAccess'), (l.client_id = e);
                else {
                  if (!r.token) return { credential: r };
                  n = r.server + '/sharing/rest';
                }
              else {
                if (!r.token) return { credential: r };
                n = r.server + '/rest/services';
              }
              return (
                r.token && (l.token = r.token),
                (0, o.default)(n, { query: l, authMode: 'anonymous' })
                  .then((t) => {
                    if (!1 === t.data.valid)
                      throw new s.Z(
                        'identity-manager:not-authorized',
                        `You are currently signed in as: '${r.userId}'.`,
                        t.data,
                      );
                    return (a = !!t.data.viewOnlyUserTypeApp), { credential: r };
                  })
                  .catch((t) => {
                    if ('identity-manager:not-authorized' === t.name) throw t;
                    const e = t.details && t.details.httpStatus;
                    if (498 === e)
                      throw (
                        (r.destroy(),
                        new s.Z('identity-manager:not-authenticated', 'User is not signed in.'))
                      );
                    if (400 === e) throw new s.Z('identity-manager:invalid-request');
                    return { credential: r };
                  })
              );
            })
            .then((t) => ({ credential: t.credential, viewOnly: a }));
        }
        setOAuthResponseHash(t) {
          var e;
          const i = this._oAuthDfd;
          if (((this._oAuthDfd = null), !i || !t)) return;
          clearInterval(this._oAuthIntervalId),
            null == (e = this._oAuthOnHashHandle) || e.remove(),
            '#' === t.charAt(0) && (t = t.substring(1));
          const a = (0, d.u0)(t);
          if (a.error) {
            const t = 'access_denied' === a.error,
              e = new s.Z(
                t ? 'identity-manager:user-aborted' : 'identity-manager:authentication-failed',
                t ? 'ABORTED' : 'OAuth: ' + a.error + ' - ' + a.error_description,
              );
            i.reject(e);
          } else {
            const t = i.sinfo_,
              e = i.oinfo_,
              r = e._oAuthCred,
              n = new ht({
                userId: a.username,
                server: t.server,
                token: a.access_token,
                expires: Date.now() + 1e3 * Number(a.expires_in),
                ssl: 'true' === a.ssl,
                _oAuthCred: r,
              });
            (e.userId = n.userId),
              (r.storage = a.persist ? st : lt),
              (r.token = n.token),
              (r.expires = n.expires),
              (r.userId = n.userId),
              (r.ssl = n.ssl),
              r.save(),
              i.resolve(n);
          }
        }
        setOAuthRedirectionHandler(t) {
          this._oAuthRedirectFunc = t;
        }
        setProtocolErrorHandler(t) {
          this._protocolFunc = t;
        }
        signIn(t, e, i = {}) {
          const a = (0, c.hh)(),
            r = () => {
              var t, e, i, a, r;
              null == (t = l) || t.remove(),
                null == (e = h) || e.remove(),
                null == (i = u) || i.remove(),
                null == (a = o) || a.destroy(),
                null == (r = this.dialog) || r.destroy(),
                (this.dialog = o = l = h = u = null);
            },
            n = () => {
              r(),
                (this._oAuthDfd = null),
                a.reject(new s.Z('identity-manager:user-aborted', 'ABORTED'));
            };
          i.signal &&
            (0, c.fu)(i.signal, () => {
              n();
            });
          let o = new this.formConstructor();
          (o.resource = this.getResourceName(t)),
            (o.server = e.server),
            (this.dialog = new it()),
            (this.dialog.content = o),
            (this.dialog.open = !0),
            this.emit('dialog-create');
          let l = o.on('cancel', n),
            h = this.dialog.watch('open', n),
            u = o.on('submit', (t) => {
              this.generateToken(e, t, { isAdmin: i.isAdmin, signal: i.signal })
                .then((n) => {
                  r();
                  const o = new ht({
                    userId: t.username,
                    server: e.server,
                    token: n.token,
                    expires: null != n.expires ? Number(n.expires) : null,
                    ssl: !!n.ssl,
                    isAdmin: i.isAdmin,
                    validity: n.validity,
                  });
                  a.resolve(o);
                })
                .catch((t) => {
                  (o.error = t), (o.signingIn = !1);
                });
            });
          return a.promise;
        }
        oAuthSignIn(t, e, i, a) {
          this._oAuthDfd = (0, c.hh)();
          const r = this._oAuthDfd;
          null != a &&
            a.signal &&
            (0, c.fu)(a.signal, () => {
              const t = this._oAuthDfd && this._oAuthDfd.oAuthWin_;
              t && !t.closed ? t.close() : this.dialog && l();
            }),
            (r.resUrl_ = t),
            (r.sinfo_ = e),
            (r.oinfo_ = i);
          const n = !a || !1 !== a.oAuthPopupConfirmation;
          if (!i.popup || !n) return this._doOAuthSignIn(t, e, i), r.promise;
          const o = new this.formConstructor();
          (o.oAuthPrompt = !0),
            (o.server = e.server),
            (this.dialog = new it()),
            (this.dialog.content = o),
            (this.dialog.open = !0),
            this.emit('dialog-create');
          const l = () => {
              p(),
                (this._oAuthDfd = null),
                r.reject(new s.Z('identity-manager:user-aborted', 'ABORTED'));
            },
            h = o.on('cancel', l),
            u = this.dialog.watch('open', l),
            d = o.on('submit', () => {
              p(), this._doOAuthSignIn(t, e, i);
            }),
            p = () => {
              h.remove(),
                u.remove(),
                d.remove(),
                o.destroy(),
                this.dialog.destroy(),
                (this.dialog = null);
            };
          return r.promise;
        }
        destroyCredentials() {
          this.credentials &&
            this.credentials.slice().forEach((t) => {
              t.destroy();
            }),
            this.emit('credentials-destroy');
        }
        enablePostMessageAuth(t = 'https://www.arcgis.com/sharing/rest') {
          this._postMessageAuthHandle && this._postMessageAuthHandle.remove(),
            (this._postMessageAuthHandle = (0, c.o)(window, 'message', (e) => {
              var i;
              if (
                (e.origin === this._appOrigin || e.origin.endsWith('.arcgis.com')) &&
                'arcgis:auth:requestCredential' === (null == (i = e.data) ? void 0 : i.type)
              ) {
                const i = e.source;
                this.getCredential(t)
                  .then((t) => {
                    i.postMessage(
                      {
                        type: 'arcgis:auth:credential',
                        credential: {
                          expires: t.expires,
                          server: t.server,
                          ssl: t.ssl,
                          token: t.token,
                          userId: t.userId,
                        },
                      },
                      e.origin,
                    );
                  })
                  .catch((t) => {
                    i.postMessage(
                      { type: 'arcgis:auth:error', error: { name: t.name, message: t.message } },
                      e.origin,
                    );
                  });
              }
            }));
        }
        disablePostMessageAuth() {
          this._postMessageAuthHandle &&
            (this._postMessageAuthHandle.remove(), (this._postMessageAuthHandle = null));
        }
        _getOAuthHash() {
          let t = window.location.hash;
          if (t) {
            '#' === t.charAt(0) && (t = t.substring(1));
            const e = (0, d.u0)(t);
            let i = !1;
            if (e.access_token && e.expires_in && e.state && e.hasOwnProperty('username'))
              try {
                (e.state = JSON.parse(e.state)),
                  'object' == typeof e.state &&
                    e.state.portalUrl &&
                    ((this._oAuthHash = e), (i = !0));
              } catch {}
            else
              e.error &&
                e.error_description &&
                (console.log('IdentityManager OAuth Error: ', e.error, ' - ', e.error_description),
                'access_denied' === e.error && (i = !0));
            i && (window.location.hash = ('object' == typeof e.state && e.state.hash) || '');
          }
        }
        _pageShowHandler(t) {
          if (t.persisted && this.isBusy() && this._rejectOnPersistedPageShow) {
            const t = new s.Z('identity-manager:user-aborted', 'ABORTED');
            this._errbackFunc(t);
          }
        }
        _findCredential(t, e) {
          let i,
            a,
            r,
            n,
            o = -1;
          const s = e && e.token,
            l = e && e.resource,
            c = this._isServerRsrc(t) ? 'server' : 'portal',
            h = this.credentials.filter(
              (e) => this._hasSameServerInstance(e.server, t) && e.scope === c,
            );
          if (((t = l || t), h.length))
            if (1 === h.length) {
              if (
                ((i = h[0]),
                (n = this.findServerInfo(i.server)),
                (a = n && n.owningSystemUrl),
                (r = a && this.findCredential(a, i.userId)),
                (o = this._getIdenticalSvcIdx(t, i)),
                !s)
              )
                return -1 === o && i.resources.push(t), this._addResource(t, r), i;
              -1 !== o && (i.resources.splice(o, 1), this._removeResource(t, r));
            } else {
              let e, i;
              if (
                (h.some(
                  (s) => (
                    (i = this._getIdenticalSvcIdx(t, s)),
                    -1 !== i &&
                      ((e = s),
                      (n = this.findServerInfo(e.server)),
                      (a = n && n.owningSystemUrl),
                      (r = a && this.findCredential(a, e.userId)),
                      (o = i),
                      !0)
                  ),
                ),
                s)
              )
                e && (e.resources.splice(o, 1), this._removeResource(t, r));
              else if (e) return this._addResource(t, r), e;
            }
        }
        _findOAuthInfo(t) {
          let e = this.findOAuthInfo(t);
          if (!e)
            for (const i of this.oAuthInfos)
              if (this._isIdProvider(i.portalUrl, t)) {
                e = i;
                break;
              }
          return e;
        }
        _addResource(t, e) {
          e && -1 === this._getIdenticalSvcIdx(t, e) && e.resources.push(t);
        }
        _removeResource(t, e) {
          let i = -1;
          e && ((i = this._getIdenticalSvcIdx(t, e)), i > -1 && e.resources.splice(i, 1));
        }
        _useProxy(t, e) {
          return (
            (e && e.isAdmin && !(0, d.D6)(t.adminTokenServiceUrl, this._appOrigin)) ||
            (!this._isPortalDomain(t.tokenServiceUrl) &&
              '10.1' === String(t.currentVersion) &&
              !(0, d.D6)(t.tokenServiceUrl, this._appOrigin))
          );
        }
        _getOrigin(t) {
          const e = new d.R9(t);
          return e.scheme + '://' + e.host + (null != e.port ? ':' + e.port : '');
        }
        _getServerInstanceRoot(t) {
          const e = t.toLowerCase();
          let i = e.indexOf(this._agsRest);
          return (
            -1 === i &&
              this._isAdminResource(t) &&
              (i = this._agsAdmin.test(t)
                ? t.replace(this._agsAdmin, '$1').length
                : t.search(this._adminSvcs)),
            -1 === i && (i = e.indexOf('/sharing')),
            -1 === i && '/' === e.substr(-1) && (i = e.length - 1),
            i > -1 ? t.substring(0, i) : t
          );
        }
        _hasSameServerInstance(t, e) {
          return (
            '/' === t.substr(-1) && (t = t.slice(0, -1)),
            (t = t.toLowerCase()),
            (e = this._getServerInstanceRoot(e).toLowerCase()),
            (t = this._normalizeAGOLorgDomain(t)),
            (e = this._normalizeAGOLorgDomain(e)),
            (t = t.substr(t.indexOf(':'))) === e.substr(e.indexOf(':'))
          );
        }
        _normalizeAGOLorgDomain(t) {
          const e = /^https?:\/\/(?:cdn|[a-z\d-]+\.maps)\.arcgis\.com/i,
            i = /^https?:\/\/(?:cdndev|[a-z\d-]+\.mapsdevext)\.arcgis\.com/i,
            a = /^https?:\/\/(?:cdnqa|[a-z\d-]+\.mapsqa)\.arcgis\.com/i;
          return (
            e.test(t)
              ? (t = t.replace(e, 'https://www.arcgis.com'))
              : i.test(t)
              ? (t = t.replace(i, 'https://devext.arcgis.com'))
              : a.test(t) && (t = t.replace(a, 'https://qaext.arcgis.com')),
            t
          );
        }
        _sanitizeUrl(t) {
          const e = (n.Z.request.proxyUrl || '').toLowerCase(),
            i = e ? t.toLowerCase().indexOf(e + '?') : -1;
          return (
            -1 !== i && (t = t.substring(i + e.length + 1)), (t = (0, d.Fv)(t)), (0, d.mN)(t).path
          );
        }
        _isRESTService(t) {
          return t.indexOf(this._agsRest) > -1;
        }
        _isAdminResource(t) {
          return this._agsAdmin.test(t) || this._adminSvcs.test(t);
        }
        _isServerRsrc(t) {
          return this._isRESTService(t) || this._isAdminResource(t);
        }
        _isIdenticalService(t, e) {
          let i;
          if (this._isRESTService(t) && this._isRESTService(e)) {
            const a = this._getSuffix(t).toLowerCase(),
              r = this._getSuffix(e).toLowerCase();
            if (((i = a === r), !i)) {
              const t = /(.*)\/(MapServer|FeatureServer|UtilityNetworkServer).*/gi;
              i = a.replace(t, '$1') === r.replace(t, '$1');
            }
          } else
            this._isAdminResource(t) && this._isAdminResource(e)
              ? (i = !0)
              : this._isServerRsrc(t) ||
                this._isServerRsrc(e) ||
                !this._isPortalDomain(t) ||
                (i = !0);
          return i;
        }
        _isPortalDomain(t) {
          const e = new d.R9(t.toLowerCase()),
            i = this._portalConfig;
          let a = this._gwDomains.some((t) => t.regex.test(e.uri));
          return (
            !a &&
              i &&
              (a = this._hasSameServerInstance(this._getServerInstanceRoot(i.restBaseUrl), e.uri)),
            a || (n.Z.portalUrl && (a = (0, d.D6)(e, n.Z.portalUrl, !0))),
            a || (a = this._portals.some((t) => this._hasSameServerInstance(t, e.uri))),
            (a = a || this._agsPortal.test(e.path)),
            a
          );
        }
        _isIdProvider(t, e) {
          let i = -1,
            a = -1;
          this._gwDomains.forEach((r, n) => {
            -1 === i && r.regex.test(t) && (i = n), -1 === a && r.regex.test(e) && (a = n);
          });
          let r = !1;
          if (
            (i > -1 &&
              a > -1 &&
              (0 === i || 4 === i
                ? (0 !== a && 4 !== a) || (r = !0)
                : 1 === i
                ? (1 !== a && 2 !== a) || (r = !0)
                : 2 === i
                ? 2 === a && (r = !0)
                : 3 === i && 3 === a && (r = !0)),
            !r)
          ) {
            const i = this.findServerInfo(e),
              a = i && i.owningSystemUrl;
            a && nt(i) && this._isPortalDomain(a) && this._isIdProvider(t, a) && (r = !0);
          }
          return r;
        }
        _getIdenticalSvcIdx(t, e) {
          let i = -1;
          for (let a = 0; a < e.resources.length; a++) {
            const r = e.resources[a];
            if (this._isIdenticalService(t, r)) {
              i = a;
              break;
            }
          }
          return i;
        }
        _getSuffix(t) {
          return t.replace(this._regexSDirUrl, '').replace(this._regexServerType, '$1');
        }
        _getTokenSvcUrl(t) {
          let e, i, a;
          if (this._isRESTService(t) || this._isAdminResource(t)) {
            const a = this._getServerInstanceRoot(t);
            return (
              (e = a + '/admin/generateToken'),
              (i = (0, o.default)((t = a + '/rest/info'), { query: { f: 'json' } }).then(
                (t) => t.data,
              )),
              { adminUrl: e, promise: i }
            );
          }
          if (this._isPortalDomain(t)) {
            let e = '';
            if (
              (this._gwDomains.some((i) => (i.regex.test(t) && (e = i.tokenServiceUrl), !!e)),
              e ||
                this._portals.some(
                  (i) => (this._hasSameServerInstance(i, t) && (e = i + this._gwTokenUrl), !!e),
                ),
              e ||
                ((a = t.toLowerCase().indexOf('/sharing')),
                -1 !== a && (e = t.substring(0, a) + this._gwTokenUrl)),
              e || (e = this._getOrigin(t) + this._gwTokenUrl),
              e)
            ) {
              const i = new d.R9(t).port;
              /^http:\/\//i.test(t) && '7080' === i && (e = e.replace(/:7080/i, ':7443')),
                (e = e.replace(/http:/i, 'https:'));
            }
            return e;
          }
          if (-1 !== t.toLowerCase().indexOf('premium.arcgisonline.com'))
            return 'https://premium.arcgisonline.com/server/tokens';
        }
        _exchangeToken(t, e, i) {
          return (0, o.default)(`${t}/sharing/rest/oauth2/exchangeToken`, {
            authMode: 'anonymous',
            method: 'post',
            query: { f: 'json', client_id: e, token: i },
          }).then((t) => t.data.token);
        }
        _getPlatformSelf(t, e) {
          return (0, o.default)(`${t}/sharing/rest/oauth2/platformSelf`, {
            authMode: 'anonymous',
            headers: {
              'X-Esri-Auth-Client-Id': e,
              'X-Esri-Auth-Redirect-Uri': window.location.href.replace(/#.*$/, ''),
            },
            method: 'post',
            query: { f: 'json' },
            withCredentials: !0,
          }).then((t) => t.data);
        }
        _getPortalSelf(t, e) {
          let i;
          return (
            this._gwDomains.some((e) => (e.regex.test(t) && (i = e.customBaseUrl), !!i)),
            i
              ? Promise.resolve({
                  allSSL: !0,
                  currentVersion: '4.4',
                  customBaseUrl: i,
                  portalMode: 'multitenant',
                  supportsOAuth: !0,
                })
              : (this._appOrigin.startsWith('https:')
                  ? (t = t.replace(/^http:/i, 'https:').replace(/:7080/i, ':7443'))
                  : /^http:/i.test(e) &&
                    (t = t.replace(/^https:/i, 'http:').replace(/:7443/i, ':7080')),
                (0, o.default)(t, {
                  query: { f: 'json' },
                  authMode: 'anonymous',
                  withCredentials: !0,
                }).then((t) => t.data))
          );
        }
        _doPortalSignIn(t) {
          const e = this._portalConfig,
            i = window.location.href,
            a = this.findServerInfo(t);
          return !(
            (!e && !this._isPortalDomain(i)) ||
            !(a
              ? a.hasPortal || (a.owningSystemUrl && this._isPortalDomain(a.owningSystemUrl))
              : this._isPortalDomain(t)) ||
            !(
              this._isIdProvider(i, t) ||
              (e &&
                (this._hasSameServerInstance(this._getServerInstanceRoot(e.restBaseUrl), t) ||
                  this._isIdProvider(e.restBaseUrl, t))) ||
              (0, d.D6)(i, t, !0)
            )
          );
        }
        _checkProtocol(t, e, i, a) {
          let r = !0;
          const n = a ? e.adminTokenServiceUrl : e.tokenServiceUrl;
          return (
            n.trim().toLowerCase().startsWith('https:') &&
              !this._appOrigin.startsWith('https:') &&
              (0, d.ed)(n) &&
              ((r =
                !!this._protocolFunc && !!this._protocolFunc({ resourceUrl: t, serverInfo: e })),
              !r) &&
              i(
                new s.Z(
                  'identity-manager:aborted',
                  'Aborted the Sign-In process to avoid sending password over insecure connection.',
                ),
              ),
            r
          );
        }
        _enqueue(t, e, i, a, r, n) {
          return (
            a || (a = (0, c.hh)()),
            (a.resUrl_ = t),
            (a.sinfo_ = e),
            (a.options_ = i),
            (a.admin_ = r),
            (a.refresh_ = n),
            this._busy
              ? this._hasSameServerInstance(this._getServerInstanceRoot(t), this._busy.resUrl_)
                ? (this._oAuthDfd && this._oAuthDfd.oAuthWin_ && this._oAuthDfd.oAuthWin_.focus(),
                  this._soReqs.push(a))
                : this._xoReqs.push(a)
              : this._doSignIn(a),
            a.promise
          );
        }
        _doSignIn(t) {
          (this._busy = t), (this._rejectOnPersistedPageShow = !1);
          const e = (e) => {
              const i = t.options_ && t.options_.resource,
                a = t.resUrl_,
                r = t.refresh_;
              let n = !1;
              -1 === this.credentials.indexOf(e) &&
                (r && -1 !== this.credentials.indexOf(r)
                  ? ((r.userId = e.userId),
                    (r.token = e.token),
                    (r.expires = e.expires),
                    (r.validity = e.validity),
                    (r.ssl = e.ssl),
                    (r.creationTime = e.creationTime),
                    (n = !0),
                    (e = r))
                  : this.credentials.push(e)),
                e.resources || (e.resources = []),
                e.resources.push(i || a),
                (e.scope = this._isServerRsrc(a) ? 'server' : 'portal'),
                e.emitTokenChange();
              const o = this._soReqs,
                s = {};
              (this._soReqs = []),
                o.forEach((t) => {
                  if (!this._isIdenticalService(a, t.resUrl_)) {
                    const i = this._getSuffix(t.resUrl_);
                    s[i] || ((s[i] = !0), e.resources.push(t.resUrl_));
                  }
                }),
                t.resolve(e),
                o.forEach((t) => {
                  this._hasSameServerInstance(this._getServerInstanceRoot(a), t.resUrl_)
                    ? t.resolve(e)
                    : this._soReqs.push(t);
                }),
                (this._busy = t.resUrl_ = t.sinfo_ = t.refresh_ = null),
                n || this.emit('credential-create', { credential: e }),
                this._soReqs.length
                  ? this._doSignIn(this._soReqs.shift())
                  : this._xoReqs.length && this._doSignIn(this._xoReqs.shift());
            },
            i = (e) => {
              t.reject(e),
                (this._busy = t.resUrl_ = t.sinfo_ = t.refresh_ = null),
                this._soReqs.length
                  ? this._doSignIn(this._soReqs.shift())
                  : this._xoReqs.length && this._doSignIn(this._xoReqs.shift());
            },
            a = (a, r, n, o) => {
              var l, h;
              const u = t.sinfo_,
                p = !t.options_ || !1 !== t.options_.prompt,
                m = u.hasPortal && this._findOAuthInfo(t.resUrl_);
              let f, b;
              if (a)
                e(
                  new ht({
                    userId: a,
                    server: u.server,
                    token: n || null,
                    expires: null != o ? Number(o) : null,
                    ssl: !!r,
                  }),
                );
              else if (
                window !== window.parent &&
                null != (l = this._appUrlObj.query) &&
                l['arcgis-auth-origin'] &&
                null != (h = this._appUrlObj.query) &&
                h['arcgis-auth-portal'] &&
                this._hasSameServerInstance(
                  this._getServerInstanceRoot(this._appUrlObj.query['arcgis-auth-portal']),
                  t.resUrl_,
                )
              ) {
                var g;
                window.parent.postMessage(
                  { type: 'arcgis:auth:requestCredential' },
                  this._appUrlObj.query['arcgis-auth-origin'],
                );
                const a = (0, c.o)(window, 'message', (t) => {
                  t.source === window.parent &&
                    t.data &&
                    ('arcgis:auth:credential' === t.data.type
                      ? (a.remove(), e(new ht(t.data.credential)))
                      : 'arcgis:auth:error' === t.data.type &&
                        (a.remove(), i(s.Z.fromJSON(t.data.error))));
                });
                (0, c.fu)(null == (g = t.options_) ? void 0 : g.signal, () => {
                  a.remove();
                });
              } else if (m) {
                let a = m._oAuthCred;
                if (!a) {
                  const t = new at(m, st),
                    e = new at(m, lt);
                  t.isValid() && e.isValid()
                    ? t.expires > e.expires
                      ? ((a = t), e.destroy())
                      : ((a = e), t.destroy())
                    : (a = t.isValid() ? t : e),
                    (m._oAuthCred = a);
                }
                if (a.isValid())
                  (f = new ht({
                    userId: a.userId,
                    server: u.server,
                    token: a.token,
                    expires: a.expires,
                    ssl: a.ssl,
                    _oAuthCred: a,
                  })),
                    m.appId !== a.appId && this._doPortalSignIn(t.resUrl_)
                      ? (t._pendingDfd = this._exchangeToken(f.server, m.appId, f.token)
                          .then((t) => {
                            (f.token = t), (a.token = t), a.save(), e(f);
                          })
                          .catch(() => {
                            e(f);
                          }))
                      : e(f);
                else if (
                  this._oAuthHash &&
                  this._hasSameServerInstance(m.portalUrl, this._oAuthHash.state.portalUrl)
                ) {
                  const t = this._oAuthHash;
                  (f = new ht({
                    userId: t.username,
                    server: u.server,
                    token: t.access_token,
                    expires: Date.now() + 1e3 * Number(t.expires_in),
                    ssl: 'true' === t.ssl,
                    oAuthState: t.state,
                    _oAuthCred: a,
                  })),
                    (m.userId = f.userId),
                    (a.storage = t.persist ? st : lt),
                    (a.token = f.token),
                    (a.expires = f.expires),
                    (a.userId = f.userId),
                    (a.ssl = f.ssl),
                    a.save(),
                    (this._oAuthHash = null),
                    e(f);
                } else {
                  const a = () => {
                    p
                      ? (t._pendingDfd = this.oAuthSignIn(t.resUrl_, u, m, t.options_).then(e, i))
                      : ((b = new s.Z(
                          'identity-manager:not-authenticated',
                          'User is not signed in.',
                        )),
                        i(b));
                  };
                  this._doPortalSignIn(t.resUrl_)
                    ? (t._pendingDfd = this._getPlatformSelf(u.server, m.appId)
                        .then(({ portalUrl: t, token: i, username: r }) => {
                          !t || (0, d.D6)(t, this._appOrigin, !0)
                            ? ((f = new ht({ server: u.server, userId: r, token: i })), e(f))
                            : a();
                        })
                        .catch(a))
                    : a();
                }
              } else if (p) {
                if (this._checkProtocol(t.resUrl_, u, i, t.admin_)) {
                  let a = t.options_;
                  t.admin_ && ((a = a || {}), (a.isAdmin = !0)),
                    (t._pendingDfd = this.signIn(t.resUrl_, u, a).then(e, i));
                }
              } else
                (b = new s.Z('identity-manager:not-authenticated', 'User is not signed in.')), i(b);
            },
            r = () => {
              const a = t.sinfo_,
                r = a.owningSystemUrl,
                n = t.options_;
              let o, s, l, c;
              if (
                (n && ((o = n.token), (s = n.error), (l = n.prompt)),
                (c = this._findCredential(r, { token: o, resource: t.resUrl_ })),
                !c)
              )
                for (const t of this.credentials)
                  if (this._isIdProvider(r, t.server)) {
                    c = t;
                    break;
                  }
              if (c) {
                const r = this.findCredential(t.resUrl_, c.userId);
                if (r) e(r);
                else if (ot(a, this._legacyFed)) {
                  const t = c.toJSON();
                  (t.server = a.server), (t.resources = null), e(new ht(t));
                } else
                  (t._pendingDfd = this.generateToken(this.findServerInfo(c.server), null, {
                    serverUrl: t.resUrl_,
                    token: c.token,
                    signal: t.options_.signal,
                    ssl: c.ssl,
                  })).then((i) => {
                    e(
                      new ht({
                        userId: c.userId,
                        server: a.server,
                        token: i.token,
                        expires: null != i.expires ? Number(i.expires) : null,
                        ssl: !!i.ssl,
                        isAdmin: t.admin_,
                        validity: i.validity,
                      }),
                    );
                  }, i);
              } else
                (this._busy = null),
                  o && (t.options_.token = null),
                  (t._pendingDfd = this.getCredential(r.replace(/\/?$/, '/sharing'), {
                    resource: t.resUrl_,
                    owningTenant: a.owningTenant,
                    signal: t.options_.signal,
                    token: o,
                    error: s,
                    prompt: l,
                  })).then(
                    () => {
                      this._enqueue(t.resUrl_, t.sinfo_, t.options_, t, t.admin_);
                    },
                    (t) => {
                      i(t);
                    },
                  );
            };
          this._errbackFunc = i;
          const n = t.sinfo_.owningSystemUrl,
            o = this._isServerRsrc(t.resUrl_),
            l = t.sinfo_._restInfoPms;
          l
            ? l.promise.then(
                (e) => {
                  const i = t.sinfo_;
                  if (i._restInfoPms) {
                    (i.adminTokenServiceUrl = i._restInfoPms.adminUrl),
                      (i._restInfoPms = null),
                      (i.tokenServiceUrl =
                        (0, u.g)('authInfo.tokenServicesUrl', e) ||
                        (0, u.g)('authInfo.tokenServiceUrl', e) ||
                        (0, u.g)('tokenServiceUrl', e)),
                      (i.shortLivedTokenValidity = (0, u.g)('authInfo.shortLivedTokenValidity', e)),
                      (i.currentVersion = e.currentVersion),
                      (i.owningTenant = e.owningTenant);
                    const t = (i.owningSystemUrl = e.owningSystemUrl);
                    t && this._portals.push(t);
                  }
                  o && i.owningSystemUrl ? r() : a();
                },
                () => {
                  t.sinfo_._restInfoPms = null;
                  const e = new s.Z(
                    'identity-manager:server-identification-failed',
                    'Unknown resource - could not find token service endpoint.',
                  );
                  i(e);
                },
              )
            : o && n
            ? r()
            : t.sinfo_._selfReq
            ? t.sinfo_._selfReq.selfDfd
                .then((e) => {
                  const i = {};
                  let a, r, n, o;
                  return (
                    e &&
                      ((a = e.user && e.user.username),
                      (i.username = a),
                      (i.allSSL = e.allSSL),
                      (r = e.supportsOAuth),
                      (n = e.currentVersion),
                      'multitenant' === e.portalMode && (o = e.customBaseUrl)),
                    (t.sinfo_.webTierAuth = !!a),
                    a && this.normalizeWebTierAuth
                      ? this.generateToken(t.sinfo_, null, { ssl: i.allSSL })
                          .catch(() => null)
                          .then(
                            (t) => (
                              (i.portalToken = t && t.token),
                              (i.tokenExpiration = t && t.expires),
                              i
                            ),
                          )
                      : !a && r && parseFloat(n) >= 4.4 && !this._findOAuthInfo(t.resUrl_)
                      ? this._generateOAuthInfo({
                          portalUrl: t.sinfo_.server,
                          customBaseUrl: o,
                          owningTenant: t.sinfo_._selfReq.owningTenant,
                        })
                          .catch(() => null)
                          .then(() => i)
                      : i
                  );
                })
                .catch(() => null)
                .then((e) => {
                  (t.sinfo_._selfReq = null),
                    e ? a(e.username, e.allSSL, e.portalToken, e.tokenExpiration) : a();
                })
            : a();
        }
        _generateOAuthInfo(t) {
          let e,
            i,
            a = t.portalUrl;
          const r = t.customBaseUrl,
            n = t.owningTenant,
            s =
              !this.defaultOAuthInfo &&
              this._createDefaultOAuthInfo &&
              !this._hasTestedIfAppIsOnPortal;
          if (s) {
            i = window.location.href;
            let t = i.indexOf('?');
            t > -1 && (i = i.slice(0, t)),
              (t = i.search(/\/(apps|home)\//)),
              (i = t > -1 ? i.slice(0, t) : null);
          }
          return (
            s && i
              ? ((this._hasTestedIfAppIsOnPortal = !0),
                (e = (0, o.default)(i + '/sharing/rest', { query: { f: 'json' } }).then(() => {
                  this.defaultOAuthInfo = new C({
                    appId: 'arcgisonline',
                    popupCallbackUrl: i + '/home/oauth-callback.html',
                  });
                })))
              : (e = Promise.resolve()),
            e.then(() => {
              if (this.defaultOAuthInfo)
                return (
                  (a = a.replace(/^http:/i, 'https:')),
                  (0, o.default)(a + '/sharing/rest/oauth2/validateRedirectUri', {
                    query: {
                      accountId: n,
                      client_id: this.defaultOAuthInfo.appId,
                      redirect_uri: (0, d.hF)(this.defaultOAuthInfo.popupCallbackUrl),
                      f: 'json',
                    },
                  }).then((t) => {
                    if (t.data.valid) {
                      const e = this.defaultOAuthInfo.clone();
                      t.data.urlKey && r
                        ? (e.portalUrl = 'https://' + t.data.urlKey.toLowerCase() + '.' + r)
                        : (e.portalUrl = a),
                        (e.popup =
                          window !== window.top ||
                          !(
                            (0, d.D6)(a, this._appOrigin) ||
                            this._gwDomains.some(
                              (t) => t.regex.test(a) && t.regex.test(this._appOrigin),
                            )
                          )),
                        this.oAuthInfos.push(e);
                    }
                  })
                );
            })
          );
        }
        _doOAuthSignIn(t, e, i) {
          const a = { portalUrl: i.portalUrl };
          !i.popup && i.preserveUrlHash && window.location.hash && (a.hash = window.location.hash);
          const r = {
            client_id: i.appId,
            response_type: 'token',
            state: JSON.stringify(a),
            expiration: i.expiration,
            locale: i.locale,
            redirect_uri: i.popup
              ? (0, d.hF)(i.popupCallbackUrl)
              : window.location.href.replace(/#.*$/, ''),
          };
          i.forceLogin && (r.force_login = !0),
            i.forceUserId && i.userId && (r.prepopulatedusername = i.userId),
            !i.popup && this._doPortalSignIn(t) && (r.redirectToUserOrgUrl = !0);
          const n = i.portalUrl.replace(/^http:/i, 'https:') + '/sharing/oauth2/authorize',
            o = n + '?' + (0, d.B7)(r);
          if (i.popup) {
            const t = window.open(o, 'esriJSAPIOAuth', i.popupWindowFeatures);
            if (t)
              t.focus(),
                (this._oAuthDfd.oAuthWin_ = t),
                (this._oAuthIntervalId = setInterval(() => {
                  if (t.closed) {
                    clearInterval(this._oAuthIntervalId), this._oAuthOnHashHandle.remove();
                    const t = this._oAuthDfd;
                    if (t) {
                      const e = new s.Z('identity-manager:user-aborted', 'ABORTED');
                      t.reject(e);
                    }
                  }
                }, 500)),
                (this._oAuthOnHashHandle = (0, c.o)(h.g, 'arcgis:auth:hash', (t) => {
                  this.setOAuthResponseHash(t.detail);
                }));
            else {
              const t = new s.Z('identity-manager:popup-blocked', 'ABORTED');
              this._oAuthDfd.reject(t);
            }
          } else
            (this._rejectOnPersistedPageShow = !0),
              this._oAuthRedirectFunc
                ? this._oAuthRedirectFunc({
                    authorizeParams: r,
                    authorizeUrl: n,
                    resourceUrl: t,
                    serverInfo: e,
                    oAuthInfo: i,
                  })
                : (window.location.href = o);
        }
      }
      ct.prototype.declaredClass = 'esri.identity.IdentityManagerBase';
      let ht = class extends l.E.EventedAccessor {
        constructor(t) {
          super(t),
            (this._oAuthCred = null),
            (this.tokenRefreshBuffer = 2),
            t && t._oAuthCred && (this._oAuthCred = t._oAuthCred);
        }
        initialize() {
          (this.resources = this.resources || []),
            null == this.creationTime && (this.creationTime = Date.now());
        }
        refreshToken() {
          const t = a.id.findServerInfo(this.server),
            e = t && t.owningSystemUrl,
            i = !!e && 'server' === this.scope,
            r = i && ot(t, a.id._legacyFed),
            n = t.webTierAuth,
            o = n && a.id.normalizeWebTierAuth,
            s = rt[this.server],
            l = s && s[this.userId];
          let c,
            h = this.resources && this.resources[0],
            u = i && a.id.findServerInfo(e),
            d = { username: this.userId, password: l };
          if (n && !o) return;
          i &&
            !u &&
            a.id.serverInfos.some((t) => (a.id._isIdProvider(e, t.server) && (u = t), !!u));
          const p = u && a.id.findCredential(u.server, this.userId);
          if (!i || p) {
            if (!r) {
              if (i) c = { serverUrl: h, token: p && p.token, ssl: p && p.ssl };
              else if (o) (d = null), (c = { ssl: this.ssl });
              else {
                if (!l) {
                  let e;
                  return (
                    h &&
                      ((h = a.id._sanitizeUrl(h)),
                      (this._enqueued = 1),
                      (e = a.id._enqueue(h, t, null, null, this.isAdmin, this)),
                      e
                        .then(() => {
                          (this._enqueued = 0), this.refreshServerTokens();
                        })
                        .catch(() => {
                          this._enqueued = 0;
                        })),
                    e
                  );
                }
                this.isAdmin && (c = { isAdmin: !0 });
              }
              return a.id
                .generateToken(i ? u : t, i ? null : d, c)
                .then((t) => {
                  (this.token = t.token),
                    (this.expires = null != t.expires ? Number(t.expires) : null),
                    (this.creationTime = Date.now()),
                    (this.validity = t.validity),
                    this.emitTokenChange(),
                    this.refreshServerTokens();
                })
                .catch(() => {});
            }
            p.refreshToken();
          }
        }
        refreshServerTokens() {
          'portal' === this.scope &&
            a.id.credentials.forEach((t) => {
              const e = a.id.findServerInfo(t.server),
                i = e && e.owningSystemUrl;
              t !== this &&
                t.userId === this.userId &&
                i &&
                'server' === t.scope &&
                (a.id._hasSameServerInstance(this.server, i) ||
                  a.id._isIdProvider(i, this.server)) &&
                (ot(e, a.id._legacyFed)
                  ? ((t.token = this.token),
                    (t.expires = this.expires),
                    (t.creationTime = this.creationTime),
                    (t.validity = this.validity),
                    t.emitTokenChange())
                  : t.refreshToken());
            });
        }
        emitTokenChange(t) {
          clearTimeout(this._refreshTimer);
          const e = this.server && a.id.findServerInfo(this.server),
            i = e && e.owningSystemUrl,
            r = i && a.id.findServerInfo(i);
          !1 === t ||
            (i && 'portal' !== this.scope && (!r || !r.webTierAuth || a.id.normalizeWebTierAuth)) ||
            (null == this.expires && null == this.validity) ||
            this._startRefreshTimer(),
            this.emit('token-change');
        }
        destroy() {
          (this.userId = this.server = this.token = this.expires = this.validity = this.resources = this.creationTime = null),
            this._oAuthCred && (this._oAuthCred.destroy(), (this._oAuthCred = null));
          const t = a.id.credentials.indexOf(this);
          t > -1 && a.id.credentials.splice(t, 1), this.emitTokenChange(), this.emit('destroy');
        }
        toJSON() {
          const t = (0, h.yd)({
              userId: this.userId,
              server: this.server,
              token: this.token,
              expires: this.expires,
              validity: this.validity,
              ssl: this.ssl,
              isAdmin: this.isAdmin,
              creationTime: this.creationTime,
              scope: this.scope,
            }),
            e = this.resources;
          return e && e.length > 0 && (t.resources = e.slice()), t;
        }
        _startRefreshTimer() {
          clearTimeout(this._refreshTimer);
          const t = 6e4 * this.tokenRefreshBuffer,
            e = 2 ** 31 - 1;
          let i =
            (this.validity ? this.creationTime + 6e4 * this.validity : this.expires) - Date.now();
          i < 0 ? (i = 0) : i > e && (i = e),
            (this._refreshTimer = setTimeout(this.refreshToken.bind(this), i > t ? i - t : i));
        }
      };
      (0, r._)([(0, p.Cb)()], ht.prototype, 'creationTime', void 0),
        (0, r._)([(0, p.Cb)()], ht.prototype, 'expires', void 0),
        (0, r._)([(0, p.Cb)()], ht.prototype, 'isAdmin', void 0),
        (0, r._)([(0, p.Cb)()], ht.prototype, 'oAuthState', void 0),
        (0, r._)([(0, p.Cb)()], ht.prototype, 'resources', void 0),
        (0, r._)([(0, p.Cb)()], ht.prototype, 'scope', void 0),
        (0, r._)([(0, p.Cb)()], ht.prototype, 'server', void 0),
        (0, r._)([(0, p.Cb)()], ht.prototype, 'ssl', void 0),
        (0, r._)([(0, p.Cb)()], ht.prototype, 'token', void 0),
        (0, r._)([(0, p.Cb)()], ht.prototype, 'tokenRefreshBuffer', void 0),
        (0, r._)([(0, p.Cb)()], ht.prototype, 'userId', void 0),
        (0, r._)([(0, p.Cb)()], ht.prototype, 'validity', void 0),
        (ht = (0, r._)([(0, m.j)('esri.identity.Credential')], ht)),
        i(33921),
        i(57251),
        i(3482),
        i(73173),
        i(68522),
        i(82933),
        i(15324),
        i(20543),
        i(10279),
        i(617),
        i(86787),
        i(26569);
      class ut extends ct {}
      ut.prototype.declaredClass = 'esri.identity.IdentityManager';
      const dt = new ut();
      (0, a.qh)(dt);
      const pt = dt;
    },
    96729: (t, e, i) => {
      'use strict';
      i.d(e, { Z: () => vn });
      var a = i(29768),
        r = i(66284),
        n = i(23639),
        o = i(68522),
        s = i(76996),
        l = i(82933),
        c = i(76506),
        h = i(92143),
        u = i(20543),
        d = i(50406),
        p = i(10279),
        m = i(617),
        f = i(34250),
        b = i(86787),
        g = i(17533),
        v = i(21972),
        y = i(26569),
        w = i(73173),
        x = i(32101),
        k = i(45435),
        _ = i(83073),
        S = i(3482);
      i(33921),
        i(57251),
        i(71552),
        i(40642),
        i(60991),
        i(81172),
        i(31450),
        i(82058),
        i(88762),
        i(22723),
        i(15324),
        i(91055),
        i(6906),
        i(27794),
        i(91306),
        i(86656),
        (t = i.hmd(t));
      const D = {
          handleInterceptedEvent: (t, e, i, a) => (
            t.scheduleRender(), e.properties[`on${a.type}`].apply(e.properties.bind || i, [a])
          ),
        },
        C = {
          namespace: void 0,
          performanceLogger: () => {},
          eventHandlerInterceptor: void 0,
          styleApplyer: (t, e, i) => {
            t.style[e] = i;
          },
        },
        T = (t, e, i = !1) => {
          let a = t;
          return (
            e.forEach((t, r) => {
              var n;
              const o =
                null != (n = a) && n.children
                  ? ((s = (e) => e.domNode === t), a.children.find(s))
                  : void 0;
              var s;
              (i && !o && r !== e.length - 1) || (a = o);
            }),
            a
          );
        };
      let $,
        I,
        A,
        E = !1,
        O = !1,
        R = !1,
        N = !1,
        M = null,
        P = !1;
      const L = 'undefined' != typeof window ? window : {},
        H = L.document || { head: {} },
        F = {
          $flags$: 0,
          $resourcesUrl$: '',
          jmp: (t) => t(),
          raf: (t) => requestAnimationFrame(t),
          ael: (t, e, i, a) => t.addEventListener(e, i, a),
          rel: (t, e, i, a) => t.removeEventListener(e, i, a),
          ce: (t, e) => new CustomEvent(t, e),
        },
        z = (() => {
          try {
            return new CSSStyleSheet(), 'function' == typeof new CSSStyleSheet().replace;
          } catch (t) {}
          return !1;
        })(),
        j = (t, e, i, a) => {
          i &&
            i.map(([i, a, r]) => {
              const n = U(t, i),
                o = V(e, r),
                s = B(i);
              F.ael(n, a, o, s),
                (e.$rmListeners$ = e.$rmListeners$ || []).push(() => F.rel(n, a, o, s));
            });
        },
        V = (t, e) => (i) => {
          try {
            t.$hostElement$[e](i);
          } catch (t) {
            Pt(t);
          }
        },
        U = (t, e) => (4 & e ? H : 8 & e ? L : 16 & e ? H.body : t),
        B = (t) => 0 != (2 & t),
        q = 'http://www.w3.org/1999/xlink',
        W = new WeakMap(),
        G = (t, e) => 'sc-' + (e && 32 & t.$flags$ ? t.$tagName$ + '-' + e : t.$tagName$),
        X = {},
        Y = (t) => 'object' == (t = typeof t) || 'function' === t,
        K = (t, e, ...i) => {
          let a = null,
            r = null,
            n = null,
            o = !1,
            s = !1,
            l = [];
          const c = (e) => {
            for (let i = 0; i < e.length; i++)
              (a = e[i]),
                Array.isArray(a)
                  ? c(a)
                  : null != a &&
                    'boolean' != typeof a &&
                    ((o = 'function' != typeof t && !Y(a)) && (a = String(a)),
                    o && s ? (l[l.length - 1].$text$ += a) : l.push(o ? Z(null, a) : a),
                    (s = o));
          };
          if ((c(i), e)) {
            e.key && (r = e.key), e.name && (n = e.name);
            {
              const t = e.className || e.class;
              t &&
                (e.class =
                  'object' != typeof t
                    ? t
                    : Object.keys(t)
                        .filter((e) => t[e])
                        .join(' '));
            }
          }
          if ('function' == typeof t) return t(null === e ? {} : e, l, Q);
          const h = Z(t, null);
          return (
            (h.$attrs$ = e), l.length > 0 && (h.$children$ = l), (h.$key$ = r), (h.$name$ = n), h
          );
        },
        Z = (t, e) => ({
          $flags$: 0,
          $tag$: t,
          $text$: e,
          $elm$: null,
          $children$: null,
          $attrs$: null,
          $key$: null,
          $name$: null,
        }),
        J = {},
        Q = { forEach: (t, e) => t.map(tt).forEach(e), map: (t, e) => t.map(tt).map(e).map(et) },
        tt = (t) => ({
          vattrs: t.$attrs$,
          vchildren: t.$children$,
          vkey: t.$key$,
          vname: t.$name$,
          vtag: t.$tag$,
          vtext: t.$text$,
        }),
        et = (t) => {
          if ('function' == typeof t.vtag) {
            const e = Object.assign({}, t.vattrs);
            return (
              t.vkey && (e.key = t.vkey),
              t.vname && (e.name = t.vname),
              K(t.vtag, e, ...(t.vchildren || []))
            );
          }
          const e = Z(t.vtag, t.vtext);
          return (
            (e.$attrs$ = t.vattrs),
            (e.$children$ = t.vchildren),
            (e.$key$ = t.vkey),
            (e.$name$ = t.vname),
            e
          );
        },
        it = (t, e, i, a, r, n) => {
          if (i !== a) {
            let o = Mt(t, e),
              s = e.toLowerCase();
            if ('class' === e) {
              const e = t.classList,
                r = rt(i),
                n = rt(a);
              e.remove(...r.filter((t) => t && !n.includes(t))),
                e.add(...n.filter((t) => t && !r.includes(t)));
            } else if ('style' === e) {
              for (const e in i)
                (a && null != a[e]) ||
                  (e.includes('-') ? t.style.removeProperty(e) : (t.style[e] = ''));
              for (const e in a)
                (i && a[e] === i[e]) ||
                  (e.includes('-') ? t.style.setProperty(e, a[e]) : (t.style[e] = a[e]));
            } else if ('key' === e);
            else if ('ref' === e) a && a(t);
            else if (t.__lookupSetter__(e) || 'o' !== e[0] || 'n' !== e[1]) {
              const l = Y(a);
              if ((o || (l && null !== a)) && !r)
                try {
                  if (t.tagName.includes('-')) t[e] = a;
                  else {
                    let r = null == a ? '' : a;
                    'list' === e ? (o = !1) : (null != i && t[e] == r) || (t[e] = r);
                  }
                } catch (t) {}
              let c = !1;
              s !== (s = s.replace(/^xlink\:?/, '')) && ((e = s), (c = !0)),
                null == a || !1 === a
                  ? (!1 === a && '' !== t.getAttribute(e)) ||
                    (c ? t.removeAttributeNS(q, e) : t.removeAttribute(e))
                  : (!o || 4 & n || r) &&
                    !l &&
                    ((a = !0 === a ? '' : a), c ? t.setAttributeNS(q, e, a) : t.setAttribute(e, a));
            } else
              (e = '-' === e[2] ? e.slice(3) : Mt(L, s) ? s.slice(2) : s[2] + e.slice(3)),
                i && F.rel(t, e, i, !1),
                a && F.ael(t, e, a, !1);
          }
        },
        at = /\s/,
        rt = (t) => (t ? t.split(at) : []),
        nt = (t, e, i, a) => {
          const r = 11 === e.$elm$.nodeType && e.$elm$.host ? e.$elm$.host : e.$elm$,
            n = (t && t.$attrs$) || X,
            o = e.$attrs$ || X;
          for (a in n) a in o || it(r, a, n[a], void 0, i, e.$flags$);
          for (a in o) it(r, a, n[a], o[a], i, e.$flags$);
        },
        ot = (t, e, i, a) => {
          let r,
            n,
            o,
            s = e.$children$[i],
            l = 0;
          if (
            (E ||
              ((R = !0),
              'slot' === s.$tag$ &&
                ($ && a.classList.add($ + '-s'), (s.$flags$ |= s.$children$ ? 2 : 1))),
            null !== s.$text$)
          )
            r = s.$elm$ = H.createTextNode(s.$text$);
          else if (1 & s.$flags$) r = s.$elm$ = H.createTextNode('');
          else {
            if (
              (N || (N = 'svg' === s.$tag$),
              (r = s.$elm$ = H.createElementNS(
                N ? 'http://www.w3.org/2000/svg' : 'http://www.w3.org/1999/xhtml',
                2 & s.$flags$ ? 'slot-fb' : s.$tag$,
              )),
              N && 'foreignObject' === s.$tag$ && (N = !1),
              nt(null, s, N),
              null != $ && r['s-si'] !== $ && r.classList.add((r['s-si'] = $)),
              s.$children$)
            )
              for (l = 0; l < s.$children$.length; ++l) (n = ot(t, s, l, r)), n && r.appendChild(n);
            'svg' === s.$tag$ ? (N = !1) : 'foreignObject' === r.tagName && (N = !0);
          }
          return (
            (r['s-hn'] = A),
            3 & s.$flags$ &&
              ((r['s-sr'] = !0),
              (r['s-cr'] = I),
              (r['s-sn'] = s.$name$ || ''),
              (o = t && t.$children$ && t.$children$[i]),
              o && o.$tag$ === s.$tag$ && t.$elm$ && st(t.$elm$, !1)),
            r
          );
        },
        st = (t, e) => {
          F.$flags$ |= 1;
          const i = t.childNodes;
          for (let t = i.length - 1; t >= 0; t--) {
            const a = i[t];
            a['s-hn'] !== A &&
              a['s-ol'] &&
              (dt(a).insertBefore(a, ut(a)), a['s-ol'].remove(), (a['s-ol'] = void 0), (R = !0)),
              e && st(a, e);
          }
          F.$flags$ &= -2;
        },
        lt = (t, e, i, a, r, n) => {
          let o,
            s = (t['s-cr'] && t['s-cr'].parentNode) || t;
          for (s.shadowRoot && s.tagName === A && (s = s.shadowRoot); r <= n; ++r)
            a[r] && ((o = ot(null, i, r, t)), o && ((a[r].$elm$ = o), s.insertBefore(o, ut(e))));
        },
        ct = (t, e, i, a, r) => {
          for (; e <= i; ++e)
            (a = t[e]) &&
              ((r = a.$elm$),
              vt(a),
              (O = !0),
              r['s-ol'] ? r['s-ol'].remove() : st(r, !0),
              r.remove());
        },
        ht = (t, e) =>
          t.$tag$ === e.$tag$ && ('slot' === t.$tag$ ? t.$name$ === e.$name$ : t.$key$ === e.$key$),
        ut = (t) => (t && t['s-ol']) || t,
        dt = (t) => (t['s-ol'] ? t['s-ol'] : t).parentNode,
        pt = (t, e) => {
          const i = (e.$elm$ = t.$elm$),
            a = t.$children$,
            r = e.$children$,
            n = e.$tag$,
            o = e.$text$;
          let s;
          null === o
            ? ((N = 'svg' === n || ('foreignObject' !== n && N)),
              'slot' === n || nt(t, e, N),
              null !== a && null !== r
                ? ((t, e, i, a) => {
                    let r,
                      n,
                      o = 0,
                      s = 0,
                      l = 0,
                      c = 0,
                      h = e.length - 1,
                      u = e[0],
                      d = e[h],
                      p = a.length - 1,
                      m = a[0],
                      f = a[p];
                    for (; o <= h && s <= p; )
                      if (null == u) u = e[++o];
                      else if (null == d) d = e[--h];
                      else if (null == m) m = a[++s];
                      else if (null == f) f = a[--p];
                      else if (ht(u, m)) pt(u, m), (u = e[++o]), (m = a[++s]);
                      else if (ht(d, f)) pt(d, f), (d = e[--h]), (f = a[--p]);
                      else if (ht(u, f))
                        ('slot' !== u.$tag$ && 'slot' !== f.$tag$) || st(u.$elm$.parentNode, !1),
                          pt(u, f),
                          t.insertBefore(u.$elm$, d.$elm$.nextSibling),
                          (u = e[++o]),
                          (f = a[--p]);
                      else if (ht(d, m))
                        ('slot' !== u.$tag$ && 'slot' !== f.$tag$) || st(d.$elm$.parentNode, !1),
                          pt(d, m),
                          t.insertBefore(d.$elm$, u.$elm$),
                          (d = e[--h]),
                          (m = a[++s]);
                      else {
                        for (l = -1, c = o; c <= h; ++c)
                          if (e[c] && null !== e[c].$key$ && e[c].$key$ === m.$key$) {
                            l = c;
                            break;
                          }
                        l >= 0
                          ? ((n = e[l]),
                            n.$tag$ !== m.$tag$
                              ? (r = ot(e && e[s], i, l, t))
                              : (pt(n, m), (e[l] = void 0), (r = n.$elm$)),
                            (m = a[++s]))
                          : ((r = ot(e && e[s], i, s, t)), (m = a[++s])),
                          r && dt(u.$elm$).insertBefore(r, ut(u.$elm$));
                      }
                    o > h
                      ? lt(t, null == a[p + 1] ? null : a[p + 1].$elm$, i, a, s, p)
                      : s > p && ct(e, o, h);
                  })(i, a, e, r)
                : null !== r
                ? (null !== t.$text$ && (i.textContent = ''), lt(i, null, e, r, 0, r.length - 1))
                : null !== a && ct(a, 0, a.length - 1),
              N && 'svg' === n && (N = !1))
            : (s = i['s-cr'])
            ? (s.parentNode.textContent = o)
            : t.$text$ !== o && (i.data = o);
        },
        mt = (t) => {
          let e,
            i,
            a,
            r,
            n,
            o,
            s = t.childNodes;
          for (i = 0, a = s.length; i < a; i++)
            if (((e = s[i]), 1 === e.nodeType)) {
              if (e['s-sr'])
                for (n = e['s-sn'], e.hidden = !1, r = 0; r < a; r++)
                  if (((o = s[r].nodeType), s[r]['s-hn'] !== e['s-hn'] || '' !== n)) {
                    if (1 === o && n === s[r].getAttribute('slot')) {
                      e.hidden = !0;
                      break;
                    }
                  } else if (1 === o || (3 === o && '' !== s[r].textContent.trim())) {
                    e.hidden = !0;
                    break;
                  }
              mt(e);
            }
        },
        ft = [],
        bt = (t) => {
          let e,
            i,
            a,
            r,
            n,
            o,
            s = 0,
            l = t.childNodes,
            c = l.length;
          for (; s < c; s++) {
            if (((e = l[s]), e['s-sr'] && (i = e['s-cr']) && i.parentNode))
              for (a = i.parentNode.childNodes, r = e['s-sn'], o = a.length - 1; o >= 0; o--)
                (i = a[o]),
                  i['s-cn'] ||
                    i['s-nr'] ||
                    i['s-hn'] === e['s-hn'] ||
                    (gt(i, r)
                      ? ((n = ft.find((t) => t.$nodeToRelocate$ === i)),
                        (O = !0),
                        (i['s-sn'] = i['s-sn'] || r),
                        n
                          ? (n.$slotRefNode$ = e)
                          : ft.push({ $slotRefNode$: e, $nodeToRelocate$: i }),
                        i['s-sr'] &&
                          ft.map((t) => {
                            gt(t.$nodeToRelocate$, i['s-sn']) &&
                              ((n = ft.find((t) => t.$nodeToRelocate$ === i)),
                              n && !t.$slotRefNode$ && (t.$slotRefNode$ = n.$slotRefNode$));
                          }))
                      : ft.some((t) => t.$nodeToRelocate$ === i) ||
                        ft.push({ $nodeToRelocate$: i }));
            1 === e.nodeType && bt(e);
          }
        },
        gt = (t, e) =>
          1 === t.nodeType
            ? (null === t.getAttribute('slot') && '' === e) || t.getAttribute('slot') === e
            : t['s-sn'] === e || '' === e,
        vt = (t) => {
          t.$attrs$ && t.$attrs$.ref && t.$attrs$.ref(null), t.$children$ && t.$children$.map(vt);
        },
        yt = (t, e, i) => {
          const a = t;
          return {
            emit: (t) =>
              wt(a, e, {
                bubbles: !!(4 & i),
                composed: !!(2 & i),
                cancelable: !!(1 & i),
                detail: t,
              }),
          };
        },
        wt = (t, e, i) => {
          const a = F.ce(e, i);
          return t.dispatchEvent(a), a;
        },
        xt = (t, e) => ((t.$flags$ |= 16), t.$ancestorComponent$, Ut(() => kt(t, e))),
        kt = (t, e) => {
          const i = t.$hostElement$,
            a = (t.$cmpMeta$.$tagName$, () => {}),
            r = i;
          let n;
          return (
            (n = Ct(r, e ? 'componentWillLoad' : 'componentWillUpdate')),
            (n = Tt(n, () => Ct(r, 'componentWillRender'))),
            a(),
            Tt(n, () => _t(t, r, e))
          );
        },
        _t = async (t, e, i) => {
          const a = t.$hostElement$,
            r = (t.$cmpMeta$.$tagName$, () => {});
          a['s-rc'],
            i &&
              ((t) => {
                const e = t.$cmpMeta$,
                  i = t.$hostElement$,
                  a = e.$flags$,
                  r = (e.$tagName$, () => {}),
                  n = ((t, e, i, a) => {
                    let r = G(e, i),
                      n = Lt.get(r);
                    if (((t = 11 === t.nodeType ? t : H), n))
                      if ('string' == typeof n) {
                        t = t.head || t;
                        let e,
                          i = W.get(t);
                        i || W.set(t, (i = new Set())),
                          i.has(r) ||
                            ((e = H.createElement('style')),
                            (e.innerHTML = n),
                            t.insertBefore(e, t.querySelector('link')),
                            i && i.add(r));
                      } else
                        t.adoptedStyleSheets.includes(n) ||
                          (t.adoptedStyleSheets = [...t.adoptedStyleSheets, n]);
                    return r;
                  })(i.shadowRoot ? i.shadowRoot : i.getRootNode(), e, t.$modeName$);
                10 & a &&
                  ((i['s-sc'] = n), i.classList.add(n + '-h'), 2 & a && i.classList.add(n + '-s')),
                  r();
              })(t);
          const n = (t.$cmpMeta$.$tagName$, () => {});
          St(t, e, a), n(), r(), Dt(t);
        },
        St = (t, e, i) => {
          try {
            (M = e),
              (e = e.render && e.render()),
              (t.$flags$ &= -17),
              (t.$flags$ |= 2),
              ((t, e) => {
                const i = t.$hostElement$,
                  a = t.$cmpMeta$,
                  r = t.$vnode$ || Z(null, null),
                  n = (o = e) && o.$tag$ === J ? e : K(null, null, e);
                var o;
                if (
                  ((A = i.tagName),
                  a.$attrsToReflect$ &&
                    ((n.$attrs$ = n.$attrs$ || {}),
                    a.$attrsToReflect$.map(([t, e]) => (n.$attrs$[e] = i[t]))),
                  (n.$tag$ = null),
                  (n.$flags$ |= 4),
                  (t.$vnode$ = n),
                  (n.$elm$ = r.$elm$ = i.shadowRoot || i),
                  ($ = i['s-sc']),
                  (I = i['s-cr']),
                  (E = 0 != (1 & a.$flags$)),
                  (O = !1),
                  pt(r, n),
                  (F.$flags$ |= 1),
                  R)
                ) {
                  let t, e, i, a, r, o;
                  bt(n.$elm$);
                  let s = 0;
                  for (; s < ft.length; s++)
                    (t = ft[s]),
                      (e = t.$nodeToRelocate$),
                      e['s-ol'] ||
                        ((i = H.createTextNode('')),
                        (i['s-nr'] = e),
                        e.parentNode.insertBefore((e['s-ol'] = i), e));
                  for (s = 0; s < ft.length; s++)
                    if (((t = ft[s]), (e = t.$nodeToRelocate$), t.$slotRefNode$)) {
                      for (
                        a = t.$slotRefNode$.parentNode,
                          r = t.$slotRefNode$.nextSibling,
                          i = e['s-ol'];
                        (i = i.previousSibling);

                      )
                        if (
                          ((o = i['s-nr']),
                          o &&
                            o['s-sn'] === e['s-sn'] &&
                            a === o.parentNode &&
                            ((o = o.nextSibling), !o || !o['s-nr']))
                        ) {
                          r = o;
                          break;
                        }
                      ((!r && a !== e.parentNode) || e.nextSibling !== r) &&
                        e !== r &&
                        (!e['s-hn'] && e['s-ol'] && (e['s-hn'] = e['s-ol'].parentNode.nodeName),
                        a.insertBefore(e, r));
                    } else 1 === e.nodeType && (e.hidden = !0);
                }
                O && mt(n.$elm$), (F.$flags$ &= -2), (ft.length = 0);
              })(t, e);
          } catch (e) {
            Pt(e, t.$hostElement$);
          }
          return (M = null), null;
        },
        Dt = (t) => {
          t.$cmpMeta$.$tagName$;
          const e = t.$hostElement$;
          t.$ancestorComponent$,
            Ct(e, 'componentDidRender'),
            64 & t.$flags$
              ? Ct(e, 'componentDidUpdate')
              : ((t.$flags$ |= 64), Ct(e, 'componentDidLoad'));
        },
        Ct = (t, e, i) => {
          if (t && t[e])
            try {
              return t[e](i);
            } catch (t) {
              Pt(t);
            }
        },
        Tt = (t, e) => (t && t.then ? t.then(e) : e()),
        $t = (t, e, i) => {
          if (e.$members$) {
            t.watchers && (e.$watchers$ = t.watchers);
            const i = Object.entries(e.$members$),
              a = t.prototype;
            i.map(([t, [i]]) => {
              (31 & i || 32 & i) &&
                Object.defineProperty(a, t, {
                  get() {
                    return (e = t), Rt(this).$instanceValues$.get(e);
                    var e;
                  },
                  set(i) {
                    ((t, e, i, a) => {
                      const r = Rt(t),
                        n = t,
                        o = r.$instanceValues$.get(e),
                        s = r.$flags$,
                        l = n;
                      var c, h;
                      if (
                        ((c = i),
                        (h = a.$members$[e][0]),
                        (i =
                          null == c || Y(c)
                            ? c
                            : 4 & h
                            ? 'false' !== c && ('' === c || !!c)
                            : 2 & h
                            ? parseFloat(c)
                            : 1 & h
                            ? String(c)
                            : c) !== o)
                      ) {
                        if ((r.$instanceValues$.set(e, i), a.$watchers$ && 128 & s)) {
                          const t = a.$watchers$[e];
                          t &&
                            t.map((t) => {
                              try {
                                l[t](i, o, e);
                              } catch (t) {
                                Pt(t, n);
                              }
                            });
                        }
                        if (2 == (18 & s)) {
                          if (l.componentShouldUpdate && !1 === l.componentShouldUpdate(i, o, e))
                            return;
                          xt(r, !1);
                        }
                      }
                    })(this, t, i, e);
                  },
                  configurable: !0,
                  enumerable: !0,
                });
            });
            {
              const r = new Map();
              (a.attributeChangedCallback = function (t, e, i) {
                F.jmp(() => {
                  const e = r.get(t);
                  this[e] = (null !== i || 'boolean' != typeof this[e]) && i;
                });
              }),
                (t.observedAttributes = i
                  .filter(([t, e]) => 15 & e[0])
                  .map(([t, i]) => {
                    const a = i[1] || t;
                    return r.set(a, t), 512 & i[0] && e.$attrsToReflect$.push([t, a]), a;
                  }));
            }
          }
          return t;
        },
        It = (t, e) => {
          const i = { $flags$: e[0], $tagName$: e[1] };
          (i.$members$ = e[2]),
            (i.$listeners$ = e[3]),
            (i.$watchers$ = t.$watchers$),
            (i.$attrsToReflect$ = []);
          const a = t.prototype.connectedCallback,
            r = t.prototype.disconnectedCallback;
          return (
            Object.assign(t.prototype, {
              __registerHost() {
                Nt(this, i);
              },
              connectedCallback() {
                ((t) => {
                  if (0 == (1 & F.$flags$)) {
                    const e = Rt(t),
                      i = e.$cmpMeta$,
                      a = (i.$tagName$, () => {});
                    1 & e.$flags$
                      ? (j(t, e, i.$listeners$), e.$lazyInstance$)
                      : ((e.$flags$ |= 1),
                        12 & i.$flags$ &&
                          ((t) => {
                            const e = (t['s-cr'] = H.createComment(''));
                            (e['s-cn'] = !0), t.insertBefore(e, t.firstChild);
                          })(t),
                        (async (t, e, i, a, r) => {
                          if (
                            0 == (32 & e.$flags$) &&
                            ((r = t.constructor), (e.$flags$ |= 160), r.style)
                          ) {
                            let a = r.style;
                            'string' != typeof a &&
                              (a =
                                a[
                                  (e.$modeName$ = ((t) => Ht.map((e) => e(t)).find((t) => !!t))(t))
                                ]);
                            const n = G(i, e.$modeName$);
                            if (!Lt.has(n)) {
                              const t = (i.$tagName$, () => {});
                              ((t, e, i) => {
                                let a = Lt.get(t);
                                z && i ? ((a = a || new CSSStyleSheet()), a.replace(e)) : (a = e),
                                  Lt.set(t, a);
                              })(n, a, !!(1 & i.$flags$)),
                                t();
                            }
                          }
                          e.$ancestorComponent$, xt(e, !0);
                        })(t, e, i)),
                      a();
                  }
                })(this),
                  a && a.call(this);
              },
              disconnectedCallback() {
                ((t) => {
                  if (0 == (1 & F.$flags$)) {
                    const e = Rt(t);
                    e.$rmListeners$ &&
                      (e.$rmListeners$.map((t) => t()), (e.$rmListeners$ = void 0));
                  }
                })(this),
                  r && r.call(this);
              },
            }),
            (t.is = i.$tagName$),
            $t(t, i)
          );
        },
        At = (t) => {
          t.attachShadow({ mode: 'open' });
        },
        Et = (t, e) => e,
        Ot = new WeakMap(),
        Rt = (t) => Ot.get(t),
        Nt = (t, e) => {
          const i = { $flags$: 0, $hostElement$: t, $cmpMeta$: e, $instanceValues$: new Map() };
          return j(t, i, e.$listeners$), Ot.set(t, i);
        },
        Mt = (t, e) => e in t,
        Pt = (t, e) => (0, console.error)(t, e),
        Lt = new Map(),
        Ht = [],
        Ft = [],
        zt = [],
        jt = (t) => {
          for (let e = 0; e < t.length; e++)
            try {
              t[e](performance.now());
            } catch (t) {
              Pt(t);
            }
          t.length = 0;
        },
        Vt = () => {
          jt(Ft), jt(zt), (P = Ft.length > 0) && F.raf(Vt);
        },
        Ut =
          ((Bt = zt),
          !0,
          (t) => {
            Bt.push(t),
              P ||
                ((P = !0),
                4 & F.$flags$
                  ? ((t) => {
                      Promise.resolve(void 0).then(t);
                    })(Vt)
                  : F.raf(Vt));
          });
      var Bt;
      function qt(t, e) {
        const i =
            {
              Up: 'ArrowUp',
              Down: 'ArrowDown',
              Left: 'ArrowLeft',
              Right: 'ArrowRight',
              Spacebar: ' ',
              Esc: 'Escape',
            }[t] || t,
          a = 'rtl' === e;
        return a && 'ArrowLeft' === i ? 'ArrowRight' : a && 'ArrowRight' === i ? 'ArrowLeft' : i;
      }
      const Wt = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
        Gt = 'calcite--rtl',
        Xt = () =>
          [2, 1, 1, 1, 3]
            .map((t) => {
              let e = '';
              for (let i = 0; i < t; i++)
                e += ((65536 * (1 + Math.random())) | 0).toString(16).substring(1);
              return e;
            })
            .join('-');
      function Yt(t, e) {
        return Array.from(t.attributes)
          .filter((t) => t && !e.includes(t.name))
          .reduce(
            (t, { name: e, value: i }) => Object.assign(Object.assign({}, t), { [e]: i }),
            {},
          );
      }
      function Kt(t) {
        return Zt(t, 'dir', 'ltr', !0);
      }
      function Zt(t, e, i, a = !1) {
        const r = `[${e}]`,
          n = a ? Jt(r, t) : t.closest(r);
        return n ? n.getAttribute(e) : i;
      }
      function Jt(t, e = this) {
        return (function e(i) {
          return i && i !== document && i !== window
            ? i.closest(t) || e(i.getRootNode().host)
            : null;
        })(e);
      }
      async function Qt(t) {
        t && ('function' == typeof t.setFocus ? t.setFocus() : t.focus());
      }
      function te(t, e) {
        return Array.from(t.children).filter((t) => t.matches(e));
      }
      function ee(t, e) {
        return t.contains(e);
      }
      function ie(t, e, i) {
        return 'string' == typeof e && '' !== e ? e : '' === e ? t[i] : void 0;
      }
      var ae;
      function re(t) {
        const { r: e, g: i, b: a } = t;
        return `#${e.toString(16).padStart(2, '0')}${i.toString(16).padStart(2, '0')}${a
          .toString(16)
          .padStart(2, '0')}`.toLowerCase();
      }
      !(function (t) {
        (t.green = 'checkCircle'),
          (t.yellow = 'exclamationMarkTriangle'),
          (t.red = 'exclamationMarkTriangle'),
          (t.blue = 'lightbulb');
      })(ae || (ae = {}));
      const ne = /^[0-9A-F]$/i,
        oe = /^#[0-9A-F]{3}$/i,
        se = /^#[0-9A-F]{6}$/i;
      function le(t) {
        return ce(t) || he(t);
      }
      function ce(t) {
        return t && 4 === t.length && oe.test(t);
      }
      function he(t) {
        return t && 7 === t.length && se.test(t);
      }
      function ue(t) {
        return (t = t.toLowerCase()).startsWith('#') || (t = `#${t}`), ce(t) ? re(de(t)) : t;
      }
      function de(t) {
        if (!le(t)) return null;
        if (3 === (t = t.replace('#', '')).length) {
          const [e, i, a] = t.split('');
          return {
            r: parseInt(`${e}${e}`, 16),
            g: parseInt(`${i}${i}`, 16),
            b: parseInt(`${a}${a}`, 16),
          };
        }
        return {
          r: parseInt(t.slice(0, 2), 16),
          g: parseInt(t.slice(2, 4), 16),
          b: parseInt(t.slice(4, 6), 16),
        };
      }
      function pe(t, ...e) {
        return e.every((e) => e && t && `${e}` in t);
      }
      function me(t, e) {
        return (null == t ? void 0 : t.rgbNumber()) === (null == e ? void 0 : e.rgbNumber());
      }
      const fe = 'icon',
        be = class extends HTMLElement {
          constructor() {
            super(),
              this.__registerHost(),
              At(this),
              (this.appearance = 'solid'),
              (this.color = 'blue'),
              (this.intlLoading = 'Loading'),
              (this.alignment = 'center'),
              (this.loading = !1),
              (this.round = !1),
              (this.scale = 'm'),
              (this.splitChild = !1),
              (this.width = 'auto'),
              (this.childElType = 'button'),
              (this.hasContent = !1),
              (this.handleClick = (t) => {
                if ('button' === this.childElType && 'button' !== this.type) {
                  const e = this.el.getAttribute('form'),
                    i = e ? document.getElementsByName(`${e}`)[0] : this.el.closest('form');
                  if (i) {
                    const t = i.onsubmit;
                    switch (this.type) {
                      case 'submit':
                        t ? t() : i.checkValidity() ? i.submit() : i.reportValidity();
                        break;
                      case 'reset':
                        i.reset();
                    }
                  }
                  t.preventDefault();
                }
              });
          }
          connectedCallback() {
            (this.childElType = this.href ? 'a' : 'button'), this.setupTextContentObserver();
          }
          disconnectedCallback() {
            this.observer.disconnect();
          }
          componentWillLoad() {
            {
              this.updateHasContent();
              const t = this.el.getAttribute('type');
              this.type = 'button' === this.childElType && t ? t : 'submit';
            }
          }
          render() {
            const t = Kt(this.el),
              e = Yt(this.el, [
                'appearance',
                'alignment',
                'calcite-hydrated',
                'class',
                'color',
                'dir',
                'icon-start',
                'icon-end',
                'id',
                'split-child',
                'loading',
                'scale',
                'slot',
                'width',
              ]),
              i = this.childElType,
              a = K(
                'div',
                { class: 'calcite-button--loader' },
                K('calcite-loader', { active: !0, inline: !0, label: this.intlLoading }),
              ),
              r = 'l' === this.scale ? 'm' : 's',
              n = K('calcite-icon', {
                class: { [fe]: !0, 'icon--start': !0 },
                flipRtl: 'start' === this.iconFlipRtl || 'both' === this.iconFlipRtl,
                icon: this.iconStart,
                scale: r,
              }),
              o = K('calcite-icon', {
                class: { [fe]: !0, 'icon--end': !0 },
                flipRtl: 'end' === this.iconFlipRtl || 'both' === this.iconFlipRtl,
                icon: this.iconEnd,
                scale: r,
              }),
              s = K('span', { class: 'content' }, K('slot', null));
            return K(
              i,
              Object.assign({}, e, {
                class: { [Gt]: 'rtl' === t, 'content--slotted': this.hasContent },
                disabled: this.disabled,
                onClick: this.handleClick,
                ref: (t) => (this.childEl = t),
                tabIndex: this.disabled ? -1 : null,
              }),
              this.loading ? a : null,
              this.iconStart ? n : null,
              this.hasContent ? s : null,
              this.iconEnd ? o : null,
            );
          }
          async setFocus() {
            this.childEl.focus();
          }
          updateHasContent() {
            var t, e;
            const i = this.el.textContent.trim().length > 0 || this.el.childNodes.length > 0;
            this.hasContent =
              1 === this.el.childNodes.length &&
              '#text' ===
                (null === (t = this.el.childNodes[0]) || void 0 === t ? void 0 : t.nodeName)
                ? (null === (e = this.el.textContent) || void 0 === e ? void 0 : e.trim().length) >
                  0
                : i;
          }
          setupTextContentObserver() {
            (this.observer = new MutationObserver(() => {
              this.updateHasContent();
            })),
              this.observer.observe(this.el, { childList: !0, subtree: !0 });
          }
          get el() {
            return this;
          }
          static get style() {
            return '@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host{display:inline-block;width:auto;vertical-align:middle}:host([round]){border-radius:50px}:host([round]) a,:host([round]) button{border-radius:50px}:host button,:host a{outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out}:host button:focus,:host a:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}:host button,:host a{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:0.375rem 1rem;text-decoration:none;width:100%;height:100%;border-radius:0;border:none;-webkit-user-select:none;-ms-user-select:none;-moz-user-select:none;user-select:none;font-family:inherit;-webkit-appearance:none;cursor:pointer;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transition:background-color 0.15s ease-in-out, border 0.15s ease-in-out, outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out, -webkit-box-shadow 0.15s ease-in-out;transition:background-color 0.15s ease-in-out, border 0.15s ease-in-out, outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out, -webkit-box-shadow 0.15s ease-in-out;transition:background-color 0.15s ease-in-out, border 0.15s ease-in-out, box-shadow 0.15s ease-in-out, outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:background-color 0.15s ease-in-out, border 0.15s ease-in-out, box-shadow 0.15s ease-in-out, outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out, -webkit-box-shadow 0.15s ease-in-out}:host button:hover,:host a:hover{text-decoration:none}.content{display:-ms-flexbox;display:flex;-ms-flex-preferred-size:auto;flex-basis:auto;margin-left:0.5rem;margin-right:0.5rem}:host(:not([icon-start])) .content{margin-left:unset}:host(:not([icon-end])) .content{margin-right:unset}:host([icon-start]:not([icon-end])) .calcite--rtl .content{margin-left:unset;margin-right:0.5rem}:host([icon-end]:not([icon-start])) .calcite--rtl .content{margin-right:unset;margin-left:0.5rem}:host([width=auto]){width:auto}:host([width=half]){width:50%}:host([width=full]){width:100%}:host([alignment=center]:not([width=auto])) a,:host([alignment=center]:not([width=auto])) button{-ms-flex-pack:center;justify-content:center}:host([alignment=start]:not([width=auto])) a,:host([alignment=start]:not([width=auto])) button{-ms-flex-pack:start;justify-content:flex-start}:host([alignment=end]:not([width=auto])) a,:host([alignment=end]:not([width=auto])) button{-ms-flex-pack:end;justify-content:flex-end}:host([alignment*=space-between]:not([width=auto])) a,:host([alignment*=space-between]:not([width=auto])) button{-ms-flex-pack:justify;justify-content:space-between}:host([alignment=icon-start-space-between]:not([width=auto])) .icon--start{margin-right:auto}:host([alignment=icon-start-space-between]:not([width=auto])) a,:host([alignment=icon-start-space-between]:not([width=auto])) button{text-align:unset}:host([alignment=icon-end-space-between]:not([width=auto])) .icon--end{margin-left:auto}:host([alignment=icon-end-space-between]:not([width=auto])) a,:host([alignment=icon-end-space-between]:not([width=auto])) button{text-align:unset}:host([alignment=icon-start-space-between]:not([width=auto])) .calcite--rtl .icon--start{margin-right:unset;margin-left:auto}:host([alignment=icon-end-space-between]:not([width=auto])) .calcite--rtl .icon--end{margin-left:unset;margin-right:auto}:host([alignment=center]) a:not(.content--slotted) .icon--start+.icon--end,:host([alignment=center]) button:not(.content--slotted) .icon--start+.icon--end{margin-left:0.5rem}:host([alignment=center]) .calcite--rtl a:not(.content--slotted) .icon--start+.icon--end,:host([alignment=center]) .calcite--rtl button:not(.content--slotted) .icon--start+.icon--end{margin-left:unset;margin-right:0.5rem}.icon{display:-ms-inline-flexbox;display:inline-flex;position:relative;margin:0;line-height:inherit;-webkit-transition:150ms ease-in-out;transition:150ms ease-in-out}:host([disabled]){pointer-events:none}:host([disabled]) button,:host([disabled]) a{pointer-events:none;opacity:var(--calcite-ui-opacity-disabled)}.calcite-button--loader{display:-ms-flexbox;display:flex;position:absolute;top:0;left:0;right:0;bottom:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.calcite-button--loader calcite-loader{margin:0}:host([loading]) button,:host([loading]) a{color:transparent !important;pointer-events:none}:host([loading]) button .calcite-button--icon,:host([loading]) a .calcite-button--icon{opacity:0}:host([appearance=solid][color=blue]) button,:host([appearance=solid][color=blue]) a{color:var(--calcite-ui-foreground-1);background-color:var(--calcite-ui-brand);border:1px solid transparent}:host([appearance=solid][color=blue]) button:hover,:host([appearance=solid][color=blue]) button:focus,:host([appearance=solid][color=blue]) a:hover,:host([appearance=solid][color=blue]) a:focus{background-color:var(--calcite-ui-brand-hover)}:host([appearance=solid][color=blue]) button:active,:host([appearance=solid][color=blue]) a:active{background-color:var(--calcite-ui-brand)}:host([appearance=solid][color=blue]) button .calcite-button--icon,:host([appearance=solid][color=blue]) a .calcite-button--icon{fill:var(--calcite-ui-foreground-1)}:host([appearance=solid][color=blue]) button calcite-loader,:host([appearance=solid][color=blue]) a calcite-loader{color:var(--calcite-ui-foreground-1)}:host([appearance=solid][color=red]) button,:host([appearance=solid][color=red]) a{color:var(--calcite-ui-foreground-1);background-color:var(--calcite-ui-danger);border:1px solid transparent}:host([appearance=solid][color=red]) button:hover,:host([appearance=solid][color=red]) button:focus,:host([appearance=solid][color=red]) a:hover,:host([appearance=solid][color=red]) a:focus{background-color:var(--calcite-ui-danger-hover)}:host([appearance=solid][color=red]) button:active,:host([appearance=solid][color=red]) a:active{background-color:var(--calcite-ui-danger)}:host([appearance=solid][color=red]) button .calcite-button--icon,:host([appearance=solid][color=red]) a .calcite-button--icon{fill:var(--calcite-ui-foreground-1)}:host([appearance=solid][color=red]) button calcite-loader,:host([appearance=solid][color=red]) a calcite-loader{color:var(--calcite-ui-foreground-1)}:host([appearance=solid][color=neutral]) button,:host([appearance=solid][color=neutral]) a{color:var(--calcite-ui-text-1);background-color:var(--calcite-ui-foreground-3);border:1px solid transparent}:host([appearance=solid][color=neutral]) button:hover,:host([appearance=solid][color=neutral]) button:focus,:host([appearance=solid][color=neutral]) a:hover,:host([appearance=solid][color=neutral]) a:focus{background-color:var(--calcite-ui-foreground-2)}:host([appearance=solid][color=neutral]) button:active,:host([appearance=solid][color=neutral]) a:active{background-color:var(--calcite-ui-foreground-3)}:host([appearance=solid][color=neutral]) button .calcite-button--icon,:host([appearance=solid][color=neutral]) a .calcite-button--icon{fill:var(--calcite-ui-text-1)}:host([appearance=solid][color=neutral]) button calcite-loader,:host([appearance=solid][color=neutral]) a calcite-loader{color:var(--calcite-ui-text-1)}:host([appearance=solid][color=inverse]) button,:host([appearance=solid][color=inverse]) a{color:#ffffff;background-color:var(--calcite-ui-inverse);border:1px solid transparent}:host([appearance=solid][color=inverse]) button:hover,:host([appearance=solid][color=inverse]) button:focus,:host([appearance=solid][color=inverse]) a:hover,:host([appearance=solid][color=inverse]) a:focus{background-color:var(--calcite-ui-inverse-hover)}:host([appearance=solid][color=inverse]) button:active,:host([appearance=solid][color=inverse]) a:active{background-color:var(--calcite-ui-inverse)}:host([appearance=solid][color=inverse]) button .calcite-button--icon,:host([appearance=solid][color=inverse]) a .calcite-button--icon{fill:#ffffff}:host([appearance=solid][color=inverse]) button calcite-loader,:host([appearance=solid][color=inverse]) a calcite-loader{color:#ffffff}:host([appearance=outline][color=blue]) button,:host([appearance=outline][color=blue]) a{color:var(--calcite-ui-brand);background-color:var(--calcite-ui-foreground-1);border:1px solid var(--calcite-ui-brand);-webkit-box-shadow:inset 0 0 0 1px transparent;box-shadow:inset 0 0 0 1px transparent}:host([appearance=outline][color=blue]) button:hover,:host([appearance=outline][color=blue]) a:hover{border-color:var(--calcite-ui-brand);-webkit-box-shadow:inset 0 0 0 1px var(--calcite-ui-brand);box-shadow:inset 0 0 0 1px var(--calcite-ui-brand)}:host([appearance=outline][color=blue]) button:active,:host([appearance=outline][color=blue]) button:focus,:host([appearance=outline][color=blue]) a:active,:host([appearance=outline][color=blue]) a:focus{color:var(--calcite-ui-brand-press);border-color:var(--calcite-ui-brand-press);-webkit-box-shadow:inset 0 0 0 2px var(--calcite-ui-brand-press);box-shadow:inset 0 0 0 2px var(--calcite-ui-brand-press)}:host([appearance=outline][color=blue]) button:active .calcite-button--icon,:host([appearance=outline][color=blue]) button:focus .calcite-button--icon,:host([appearance=outline][color=blue]) a:active .calcite-button--icon,:host([appearance=outline][color=blue]) a:focus .calcite-button--icon{fill:var(--calcite-ui-brand-press)}:host([appearance=outline][color=blue]) button .calcite-button--icon,:host([appearance=outline][color=blue]) a .calcite-button--icon{fill:var(--calcite-ui-brand)}:host([appearance=outline][color=blue]) button calcite-loader,:host([appearance=outline][color=blue]) a calcite-loader{color:var(--calcite-ui-brand)}:host([appearance=outline][color=red]) button,:host([appearance=outline][color=red]) a{color:var(--calcite-ui-danger);background-color:var(--calcite-ui-foreground-1);border:1px solid var(--calcite-ui-danger);-webkit-box-shadow:inset 0 0 0 1px transparent;box-shadow:inset 0 0 0 1px transparent}:host([appearance=outline][color=red]) button:hover,:host([appearance=outline][color=red]) a:hover{border-color:var(--calcite-ui-danger);-webkit-box-shadow:inset 0 0 0 1px var(--calcite-ui-danger);box-shadow:inset 0 0 0 1px var(--calcite-ui-danger)}:host([appearance=outline][color=red]) button:active,:host([appearance=outline][color=red]) button:focus,:host([appearance=outline][color=red]) a:active,:host([appearance=outline][color=red]) a:focus{color:var(--calcite-ui-danger-press);border-color:var(--calcite-ui-danger-press);-webkit-box-shadow:inset 0 0 0 2px var(--calcite-ui-danger-press);box-shadow:inset 0 0 0 2px var(--calcite-ui-danger-press)}:host([appearance=outline][color=red]) button:active .calcite-button--icon,:host([appearance=outline][color=red]) button:focus .calcite-button--icon,:host([appearance=outline][color=red]) a:active .calcite-button--icon,:host([appearance=outline][color=red]) a:focus .calcite-button--icon{fill:var(--calcite-ui-danger-press)}:host([appearance=outline][color=red]) button .calcite-button--icon,:host([appearance=outline][color=red]) a .calcite-button--icon{fill:var(--calcite-ui-danger)}:host([appearance=outline][color=red]) button calcite-loader,:host([appearance=outline][color=red]) a calcite-loader{color:var(--calcite-ui-danger)}:host([appearance=outline][color=neutral]) button,:host([appearance=outline][color=neutral]) a{color:var(--calcite-ui-text-1);background-color:var(--calcite-ui-foreground-1);border:1px solid var(--calcite-ui-foreground-3);-webkit-box-shadow:inset 0 0 0 1px transparent;box-shadow:inset 0 0 0 1px transparent}:host([appearance=outline][color=neutral]) button:hover,:host([appearance=outline][color=neutral]) a:hover{border-color:var(--calcite-ui-foreground-3);-webkit-box-shadow:inset 0 0 0 1px var(--calcite-ui-foreground-3);box-shadow:inset 0 0 0 1px var(--calcite-ui-foreground-3)}:host([appearance=outline][color=neutral]) button:active,:host([appearance=outline][color=neutral]) button:focus,:host([appearance=outline][color=neutral]) a:active,:host([appearance=outline][color=neutral]) a:focus{color:var(--calcite-ui-text-1);border-color:var(--calcite-ui-border-2);-webkit-box-shadow:inset 0 0 0 2px var(--calcite-ui-border-2);box-shadow:inset 0 0 0 2px var(--calcite-ui-border-2)}:host([appearance=outline][color=neutral]) button:active .calcite-button--icon,:host([appearance=outline][color=neutral]) button:focus .calcite-button--icon,:host([appearance=outline][color=neutral]) a:active .calcite-button--icon,:host([appearance=outline][color=neutral]) a:focus .calcite-button--icon{fill:var(--calcite-ui-text-1)}:host([appearance=outline][color=neutral]) button .calcite-button--icon,:host([appearance=outline][color=neutral]) a .calcite-button--icon{fill:var(--calcite-ui-text-1)}:host([appearance=outline][color=neutral]) button calcite-loader,:host([appearance=outline][color=neutral]) a calcite-loader{color:var(--calcite-ui-text-1)}:host([appearance=outline][color=inverse]) button,:host([appearance=outline][color=inverse]) a{color:var(--calcite-ui-text-1);background-color:var(--calcite-ui-foreground-1);border:1px solid var(--calcite-ui-inverse);-webkit-box-shadow:inset 0 0 0 1px transparent;box-shadow:inset 0 0 0 1px transparent}:host([appearance=outline][color=inverse]) button:hover,:host([appearance=outline][color=inverse]) a:hover{border-color:var(--calcite-ui-inverse);-webkit-box-shadow:inset 0 0 0 1px var(--calcite-ui-inverse);box-shadow:inset 0 0 0 1px var(--calcite-ui-inverse)}:host([appearance=outline][color=inverse]) button:active,:host([appearance=outline][color=inverse]) button:focus,:host([appearance=outline][color=inverse]) a:active,:host([appearance=outline][color=inverse]) a:focus{color:var(--calcite-ui-text-1);border-color:var(--calcite-ui-inverse-hover);-webkit-box-shadow:inset 0 0 0 2px var(--calcite-ui-inverse-hover);box-shadow:inset 0 0 0 2px var(--calcite-ui-inverse-hover)}:host([appearance=outline][color=inverse]) button:active .calcite-button--icon,:host([appearance=outline][color=inverse]) button:focus .calcite-button--icon,:host([appearance=outline][color=inverse]) a:active .calcite-button--icon,:host([appearance=outline][color=inverse]) a:focus .calcite-button--icon{fill:var(--calcite-ui-text-1)}:host([appearance=outline][color=inverse]) button .calcite-button--icon,:host([appearance=outline][color=inverse]) a .calcite-button--icon{fill:var(--calcite-ui-text-1)}:host([appearance=outline][color=inverse]) button calcite-loader,:host([appearance=outline][color=inverse]) a calcite-loader{color:var(--calcite-ui-text-1)}:host([appearance=clear][color=blue]) button,:host([appearance=clear][color=blue]) a{color:var(--calcite-ui-brand);background-color:transparent;border:1px solid var(--calcite-ui-brand);-webkit-box-shadow:inset 0 0 0 1px transparent;box-shadow:inset 0 0 0 1px transparent}:host([appearance=clear][color=blue]) button:hover,:host([appearance=clear][color=blue]) a:hover{border-color:var(--calcite-ui-brand);-webkit-box-shadow:inset 0 0 0 1px var(--calcite-ui-brand);box-shadow:inset 0 0 0 1px var(--calcite-ui-brand)}:host([appearance=clear][color=blue]) button:active,:host([appearance=clear][color=blue]) button:focus,:host([appearance=clear][color=blue]) a:active,:host([appearance=clear][color=blue]) a:focus{color:var(--calcite-ui-brand-press);border-color:var(--calcite-ui-brand-press);-webkit-box-shadow:inset 0 0 0 2px var(--calcite-ui-brand-press);box-shadow:inset 0 0 0 2px var(--calcite-ui-brand-press)}:host([appearance=clear][color=blue]) button:active .calcite-button--icon,:host([appearance=clear][color=blue]) button:focus .calcite-button--icon,:host([appearance=clear][color=blue]) a:active .calcite-button--icon,:host([appearance=clear][color=blue]) a:focus .calcite-button--icon{fill:var(--calcite-ui-brand-press)}:host([appearance=clear][color=blue]) button .calcite-button--icon,:host([appearance=clear][color=blue]) a .calcite-button--icon{fill:var(--calcite-ui-brand)}:host([appearance=clear][color=blue]) button calcite-loader,:host([appearance=clear][color=blue]) a calcite-loader{color:var(--calcite-ui-brand)}:host([appearance=clear][color=red]) button,:host([appearance=clear][color=red]) a{color:var(--calcite-ui-danger);background-color:transparent;border:1px solid var(--calcite-ui-danger);-webkit-box-shadow:inset 0 0 0 1px transparent;box-shadow:inset 0 0 0 1px transparent}:host([appearance=clear][color=red]) button:hover,:host([appearance=clear][color=red]) a:hover{border-color:var(--calcite-ui-danger);-webkit-box-shadow:inset 0 0 0 1px var(--calcite-ui-danger);box-shadow:inset 0 0 0 1px var(--calcite-ui-danger)}:host([appearance=clear][color=red]) button:active,:host([appearance=clear][color=red]) button:focus,:host([appearance=clear][color=red]) a:active,:host([appearance=clear][color=red]) a:focus{color:var(--calcite-ui-danger-press);border-color:var(--calcite-ui-danger-press);-webkit-box-shadow:inset 0 0 0 2px var(--calcite-ui-danger-press);box-shadow:inset 0 0 0 2px var(--calcite-ui-danger-press)}:host([appearance=clear][color=red]) button:active .calcite-button--icon,:host([appearance=clear][color=red]) button:focus .calcite-button--icon,:host([appearance=clear][color=red]) a:active .calcite-button--icon,:host([appearance=clear][color=red]) a:focus .calcite-button--icon{fill:var(--calcite-ui-danger-press)}:host([appearance=clear][color=red]) button .calcite-button--icon,:host([appearance=clear][color=red]) a .calcite-button--icon{fill:var(--calcite-ui-danger)}:host([appearance=clear][color=red]) button calcite-loader,:host([appearance=clear][color=red]) a calcite-loader{color:var(--calcite-ui-danger)}:host([appearance=clear][color=neutral]) button,:host([appearance=clear][color=neutral]) a{color:var(--calcite-ui-text-1);background-color:transparent;border:1px solid var(--calcite-ui-foreground-3);-webkit-box-shadow:inset 0 0 0 1px transparent;box-shadow:inset 0 0 0 1px transparent}:host([appearance=clear][color=neutral]) button:hover,:host([appearance=clear][color=neutral]) a:hover{border-color:var(--calcite-ui-foreground-3);-webkit-box-shadow:inset 0 0 0 1px var(--calcite-ui-foreground-3);box-shadow:inset 0 0 0 1px var(--calcite-ui-foreground-3)}:host([appearance=clear][color=neutral]) button:active,:host([appearance=clear][color=neutral]) button:focus,:host([appearance=clear][color=neutral]) a:active,:host([appearance=clear][color=neutral]) a:focus{color:var(--calcite-ui-text-1);border-color:var(--calcite-ui-border-2);-webkit-box-shadow:inset 0 0 0 2px var(--calcite-ui-border-2);box-shadow:inset 0 0 0 2px var(--calcite-ui-border-2)}:host([appearance=clear][color=neutral]) button:active .calcite-button--icon,:host([appearance=clear][color=neutral]) button:focus .calcite-button--icon,:host([appearance=clear][color=neutral]) a:active .calcite-button--icon,:host([appearance=clear][color=neutral]) a:focus .calcite-button--icon{fill:var(--calcite-ui-text-1)}:host([appearance=clear][color=neutral]) button .calcite-button--icon,:host([appearance=clear][color=neutral]) a .calcite-button--icon{fill:var(--calcite-ui-text-1)}:host([appearance=clear][color=neutral]) button calcite-loader,:host([appearance=clear][color=neutral]) a calcite-loader{color:var(--calcite-ui-text-1)}:host([appearance=clear][color=inverse]) button,:host([appearance=clear][color=inverse]) a{color:var(--calcite-ui-text-1);background-color:transparent;border:1px solid var(--calcite-ui-inverse);-webkit-box-shadow:inset 0 0 0 1px transparent;box-shadow:inset 0 0 0 1px transparent}:host([appearance=clear][color=inverse]) button:hover,:host([appearance=clear][color=inverse]) a:hover{border-color:var(--calcite-ui-inverse);-webkit-box-shadow:inset 0 0 0 1px var(--calcite-ui-inverse);box-shadow:inset 0 0 0 1px var(--calcite-ui-inverse)}:host([appearance=clear][color=inverse]) button:active,:host([appearance=clear][color=inverse]) button:focus,:host([appearance=clear][color=inverse]) a:active,:host([appearance=clear][color=inverse]) a:focus{color:var(--calcite-ui-text-1);border-color:var(--calcite-ui-inverse-hover);-webkit-box-shadow:inset 0 0 0 2px var(--calcite-ui-inverse-hover);box-shadow:inset 0 0 0 2px var(--calcite-ui-inverse-hover)}:host([appearance=clear][color=inverse]) button:active .calcite-button--icon,:host([appearance=clear][color=inverse]) button:focus .calcite-button--icon,:host([appearance=clear][color=inverse]) a:active .calcite-button--icon,:host([appearance=clear][color=inverse]) a:focus .calcite-button--icon{fill:var(--calcite-ui-text-1)}:host([appearance=clear][color=inverse]) button .calcite-button--icon,:host([appearance=clear][color=inverse]) a .calcite-button--icon{fill:var(--calcite-ui-text-1)}:host([appearance=clear][color=inverse]) button calcite-loader,:host([appearance=clear][color=inverse]) a calcite-loader{color:var(--calcite-ui-text-1)}:host([appearance=outline][split-child=primary]) button,:host([appearance=clear][split-child=primary]) button{border-right:0}:host([appearance=outline][split-child=secondary]) button .calcite--rtl,:host([appearance=clear][split-child=secondary]) button .calcite--rtl{border-right:0}:host([appearance=outline][split-child=secondary]) button,:host([appearance=clear][split-child=secondary]) button{border-left:0}:host([appearance=outline][split-child=primary]) button .calcite--rtl,:host([appearance=clear][split-child=primary]) button .calcite--rtl{border-left:0}:host([appearance=transparent][color=blue]) button,:host([appearance=transparent][color=blue]) a{color:var(--calcite-ui-text-link);background-color:transparent}:host([appearance=transparent][color=blue]) button:hover,:host([appearance=transparent][color=blue]) button:focus,:host([appearance=transparent][color=blue]) a:hover,:host([appearance=transparent][color=blue]) a:focus{background-color:var(--calcite-button-transparent-hover)}:host([appearance=transparent][color=blue]) button:active,:host([appearance=transparent][color=blue]) a:active{background-color:var(--calcite-button-transparent-press)}:host([appearance=transparent][color=blue]) button calcite-loader,:host([appearance=transparent][color=blue]) a calcite-loader{color:var(--calcite-ui-text-link)}:host([appearance=transparent][color=red]) button,:host([appearance=transparent][color=red]) a{color:var(--calcite-ui-danger-press);background-color:transparent}:host([appearance=transparent][color=red]) button:hover,:host([appearance=transparent][color=red]) button:focus,:host([appearance=transparent][color=red]) a:hover,:host([appearance=transparent][color=red]) a:focus{background-color:var(--calcite-button-transparent-hover)}:host([appearance=transparent][color=red]) button:active,:host([appearance=transparent][color=red]) a:active{background-color:var(--calcite-button-transparent-press)}:host([appearance=transparent][color=red]) button calcite-loader,:host([appearance=transparent][color=red]) a calcite-loader{color:var(--calcite-ui-danger-press)}:host([appearance=transparent][color=neutral]) button,:host([appearance=transparent][color=neutral]) a{color:var(--calcite-ui-text-1);background-color:transparent}:host([appearance=transparent][color=neutral]) button:hover,:host([appearance=transparent][color=neutral]) button:focus,:host([appearance=transparent][color=neutral]) a:hover,:host([appearance=transparent][color=neutral]) a:focus{background-color:var(--calcite-button-transparent-hover)}:host([appearance=transparent][color=neutral]) button:active,:host([appearance=transparent][color=neutral]) a:active{background-color:var(--calcite-button-transparent-press)}:host([appearance=transparent][color=neutral]) button calcite-loader,:host([appearance=transparent][color=neutral]) a calcite-loader{color:var(--calcite-ui-text-1)}:host([appearance=transparent][color=inverse]) button,:host([appearance=transparent][color=inverse]) a{color:var(--calcite-ui-foreground-1);background-color:transparent}:host([appearance=transparent][color=inverse]) button:hover,:host([appearance=transparent][color=inverse]) button:focus,:host([appearance=transparent][color=inverse]) a:hover,:host([appearance=transparent][color=inverse]) a:focus{background-color:var(--calcite-button-transparent-hover)}:host([appearance=transparent][color=inverse]) button:active,:host([appearance=transparent][color=inverse]) a:active{background-color:var(--calcite-button-transparent-press)}:host([appearance=transparent][color=inverse]) button calcite-loader,:host([appearance=transparent][color=inverse]) a calcite-loader{color:var(--calcite-ui-foreground-1)}:host([scale=s]:not([appearance=transparent])) button.content--slotted,:host([scale=s]:not([appearance=transparent])) a.content--slotted{padding:7px 12px;font-size:12px;line-height:1.33}:host([scale=s][appearance=transparent]) button.content--slotted,:host([scale=s][appearance=transparent]) a.content--slotted{padding:8px 12px;font-size:12px;line-height:1.33}:host([scale=m]:not([appearance=transparent])) button.content--slotted,:host([scale=m]:not([appearance=transparent])) a.content--slotted{padding:13px 20px;font-size:14px;line-height:1.15}:host([scale=m][appearance=transparent]) button.content--slotted,:host([scale=m][appearance=transparent]) a.content--slotted{padding:14px 20px;font-size:14px;line-height:1.15}:host([scale=l]:not([appearance=transparent])) button.content--slotted,:host([scale=l]:not([appearance=transparent])) a.content--slotted{padding:15px 24px;font-size:18px;line-height:1.2}:host([scale=l][appearance=transparent]) button.content--slotted,:host([scale=l][appearance=transparent]) a.content--slotted{padding:16px 24px;font-size:18px;line-height:1.2}:host([scale=s]) button:not(.content--slotted),:host([scale=s]) a:not(.content--slotted){height:32px;width:32px;font-size:12px}:host([scale=m]) button:not(.content--slotted),:host([scale=m]) a:not(.content--slotted){height:44px;width:44px;font-size:14px}:host([scale=l]) button:not(.content--slotted),:host([scale=l]) a:not(.content--slotted){height:56px;width:56px;font-size:18px}:host([scale=s][icon-start][icon-end]) button:not(.content--slotted),:host([scale=s][icon-start][icon-end]) a:not(.content--slotted){height:32px;width:48px;font-size:12px}:host([scale=m][icon-start][icon-end]) button:not(.content--slotted),:host([scale=m][icon-start][icon-end]) a:not(.content--slotted){height:44px;width:66px;font-size:14px}:host([scale=l][icon-start][icon-end]) button:not(.content--slotted),:host([scale=l][icon-start][icon-end]) a:not(.content--slotted){height:56px;width:84px;font-size:18px}';
          }
        },
        ge =
          '\n  bottom: 0 !important;\n  left: 0 !important;\n  margin: 0 !important;\n  opacity: 0 !important;\n  outline: none !important;\n  padding: 0 !important;\n  position: absolute !important;\n  right: 0 !important;\n  top: 0 !important;\n  transform: none !important;\n  -webkit-appearance: none !important;\n  z-index: -1 !important;\n';
      function ve(t, e, i) {
        return (
          t(
            (i = {
              path: e,
              exports: {},
              require: function (t, e) {
                return (function () {
                  throw new Error(
                    'Dynamic requires are not currently supported by @rollup/plugin-commonjs',
                  );
                })();
              },
            }),
            i.exports,
          ),
          i.exports
        );
      }
      var ye = {
          aliceblue: [240, 248, 255],
          antiquewhite: [250, 235, 215],
          aqua: [0, 255, 255],
          aquamarine: [127, 255, 212],
          azure: [240, 255, 255],
          beige: [245, 245, 220],
          bisque: [255, 228, 196],
          black: [0, 0, 0],
          blanchedalmond: [255, 235, 205],
          blue: [0, 0, 255],
          blueviolet: [138, 43, 226],
          brown: [165, 42, 42],
          burlywood: [222, 184, 135],
          cadetblue: [95, 158, 160],
          chartreuse: [127, 255, 0],
          chocolate: [210, 105, 30],
          coral: [255, 127, 80],
          cornflowerblue: [100, 149, 237],
          cornsilk: [255, 248, 220],
          crimson: [220, 20, 60],
          cyan: [0, 255, 255],
          darkblue: [0, 0, 139],
          darkcyan: [0, 139, 139],
          darkgoldenrod: [184, 134, 11],
          darkgray: [169, 169, 169],
          darkgreen: [0, 100, 0],
          darkgrey: [169, 169, 169],
          darkkhaki: [189, 183, 107],
          darkmagenta: [139, 0, 139],
          darkolivegreen: [85, 107, 47],
          darkorange: [255, 140, 0],
          darkorchid: [153, 50, 204],
          darkred: [139, 0, 0],
          darksalmon: [233, 150, 122],
          darkseagreen: [143, 188, 143],
          darkslateblue: [72, 61, 139],
          darkslategray: [47, 79, 79],
          darkslategrey: [47, 79, 79],
          darkturquoise: [0, 206, 209],
          darkviolet: [148, 0, 211],
          deeppink: [255, 20, 147],
          deepskyblue: [0, 191, 255],
          dimgray: [105, 105, 105],
          dimgrey: [105, 105, 105],
          dodgerblue: [30, 144, 255],
          firebrick: [178, 34, 34],
          floralwhite: [255, 250, 240],
          forestgreen: [34, 139, 34],
          fuchsia: [255, 0, 255],
          gainsboro: [220, 220, 220],
          ghostwhite: [248, 248, 255],
          gold: [255, 215, 0],
          goldenrod: [218, 165, 32],
          gray: [128, 128, 128],
          green: [0, 128, 0],
          greenyellow: [173, 255, 47],
          grey: [128, 128, 128],
          honeydew: [240, 255, 240],
          hotpink: [255, 105, 180],
          indianred: [205, 92, 92],
          indigo: [75, 0, 130],
          ivory: [255, 255, 240],
          khaki: [240, 230, 140],
          lavender: [230, 230, 250],
          lavenderblush: [255, 240, 245],
          lawngreen: [124, 252, 0],
          lemonchiffon: [255, 250, 205],
          lightblue: [173, 216, 230],
          lightcoral: [240, 128, 128],
          lightcyan: [224, 255, 255],
          lightgoldenrodyellow: [250, 250, 210],
          lightgray: [211, 211, 211],
          lightgreen: [144, 238, 144],
          lightgrey: [211, 211, 211],
          lightpink: [255, 182, 193],
          lightsalmon: [255, 160, 122],
          lightseagreen: [32, 178, 170],
          lightskyblue: [135, 206, 250],
          lightslategray: [119, 136, 153],
          lightslategrey: [119, 136, 153],
          lightsteelblue: [176, 196, 222],
          lightyellow: [255, 255, 224],
          lime: [0, 255, 0],
          limegreen: [50, 205, 50],
          linen: [250, 240, 230],
          magenta: [255, 0, 255],
          maroon: [128, 0, 0],
          mediumaquamarine: [102, 205, 170],
          mediumblue: [0, 0, 205],
          mediumorchid: [186, 85, 211],
          mediumpurple: [147, 112, 219],
          mediumseagreen: [60, 179, 113],
          mediumslateblue: [123, 104, 238],
          mediumspringgreen: [0, 250, 154],
          mediumturquoise: [72, 209, 204],
          mediumvioletred: [199, 21, 133],
          midnightblue: [25, 25, 112],
          mintcream: [245, 255, 250],
          mistyrose: [255, 228, 225],
          moccasin: [255, 228, 181],
          navajowhite: [255, 222, 173],
          navy: [0, 0, 128],
          oldlace: [253, 245, 230],
          olive: [128, 128, 0],
          olivedrab: [107, 142, 35],
          orange: [255, 165, 0],
          orangered: [255, 69, 0],
          orchid: [218, 112, 214],
          palegoldenrod: [238, 232, 170],
          palegreen: [152, 251, 152],
          paleturquoise: [175, 238, 238],
          palevioletred: [219, 112, 147],
          papayawhip: [255, 239, 213],
          peachpuff: [255, 218, 185],
          peru: [205, 133, 63],
          pink: [255, 192, 203],
          plum: [221, 160, 221],
          powderblue: [176, 224, 230],
          purple: [128, 0, 128],
          rebeccapurple: [102, 51, 153],
          red: [255, 0, 0],
          rosybrown: [188, 143, 143],
          royalblue: [65, 105, 225],
          saddlebrown: [139, 69, 19],
          salmon: [250, 128, 114],
          sandybrown: [244, 164, 96],
          seagreen: [46, 139, 87],
          seashell: [255, 245, 238],
          sienna: [160, 82, 45],
          silver: [192, 192, 192],
          skyblue: [135, 206, 235],
          slateblue: [106, 90, 205],
          slategray: [112, 128, 144],
          slategrey: [112, 128, 144],
          snow: [255, 250, 250],
          springgreen: [0, 255, 127],
          steelblue: [70, 130, 180],
          tan: [210, 180, 140],
          teal: [0, 128, 128],
          thistle: [216, 191, 216],
          tomato: [255, 99, 71],
          turquoise: [64, 224, 208],
          violet: [238, 130, 238],
          wheat: [245, 222, 179],
          white: [255, 255, 255],
          whitesmoke: [245, 245, 245],
          yellow: [255, 255, 0],
          yellowgreen: [154, 205, 50],
        },
        we = ve(function (t) {
          var e = Array.prototype.concat,
            i = Array.prototype.slice,
            a = (t.exports = function (t) {
              for (var a, r = [], n = 0, o = t.length; n < o; n++) {
                var s = t[n];
                (a = s) &&
                'string' != typeof a &&
                (a instanceof Array ||
                  Array.isArray(a) ||
                  (a.length >= 0 &&
                    (a.splice instanceof Function ||
                      (Object.getOwnPropertyDescriptor(a, a.length - 1) &&
                        'String' !== a.constructor.name))))
                  ? (r = e.call(r, i.call(s)))
                  : r.push(s);
              }
              return r;
            });
          a.wrap = function (t) {
            return function () {
              return t(a(arguments));
            };
          };
        }),
        xe = ve(function (t) {
          var e = {};
          for (var i in ye) ye.hasOwnProperty(i) && (e[ye[i]] = i);
          var a = (t.exports = { to: {}, get: {} });
          function r(t, e, i) {
            return Math.min(Math.max(e, t), i);
          }
          function n(t) {
            var e = t.toString(16).toUpperCase();
            return e.length < 2 ? '0' + e : e;
          }
          (a.get = function (t) {
            var e, i;
            switch (t.substring(0, 3).toLowerCase()) {
              case 'hsl':
                (e = a.get.hsl(t)), (i = 'hsl');
                break;
              case 'hwb':
                (e = a.get.hwb(t)), (i = 'hwb');
                break;
              default:
                (e = a.get.rgb(t)), (i = 'rgb');
            }
            return e ? { model: i, value: e } : null;
          }),
            (a.get.rgb = function (t) {
              if (!t) return null;
              var e,
                i,
                a,
                n = [0, 0, 0, 1];
              if ((e = t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i))) {
                for (a = e[2], e = e[1], i = 0; i < 3; i++) {
                  var o = 2 * i;
                  n[i] = parseInt(e.slice(o, o + 2), 16);
                }
                a && (n[3] = parseInt(a, 16) / 255);
              } else if ((e = t.match(/^#([a-f0-9]{3,4})$/i))) {
                for (a = (e = e[1])[3], i = 0; i < 3; i++) n[i] = parseInt(e[i] + e[i], 16);
                a && (n[3] = parseInt(a + a, 16) / 255);
              } else if (
                (e = t.match(
                  /^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/,
                ))
              ) {
                for (i = 0; i < 3; i++) n[i] = parseInt(e[i + 1], 0);
                e[4] && (n[3] = parseFloat(e[4]));
              } else {
                if (
                  !(e = t.match(
                    /^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/,
                  ))
                )
                  return (e = t.match(/(\D+)/))
                    ? 'transparent' === e[1]
                      ? [0, 0, 0, 0]
                      : (n = ye[e[1]])
                      ? ((n[3] = 1), n)
                      : null
                    : null;
                for (i = 0; i < 3; i++) n[i] = Math.round(2.55 * parseFloat(e[i + 1]));
                e[4] && (n[3] = parseFloat(e[4]));
              }
              for (i = 0; i < 3; i++) n[i] = r(n[i], 0, 255);
              return (n[3] = r(n[3], 0, 1)), n;
            }),
            (a.get.hsl = function (t) {
              if (!t) return null;
              var e = t.match(
                /^hsla?\(\s*([+-]?(?:\d*\.)?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/,
              );
              if (e) {
                var i = parseFloat(e[4]);
                return [
                  (parseFloat(e[1]) + 360) % 360,
                  r(parseFloat(e[2]), 0, 100),
                  r(parseFloat(e[3]), 0, 100),
                  r(isNaN(i) ? 1 : i, 0, 1),
                ];
              }
              return null;
            }),
            (a.get.hwb = function (t) {
              if (!t) return null;
              var e = t.match(
                /^hwb\(\s*([+-]?\d*[\.]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/,
              );
              if (e) {
                var i = parseFloat(e[4]);
                return [
                  ((parseFloat(e[1]) % 360) + 360) % 360,
                  r(parseFloat(e[2]), 0, 100),
                  r(parseFloat(e[3]), 0, 100),
                  r(isNaN(i) ? 1 : i, 0, 1),
                ];
              }
              return null;
            }),
            (a.to.hex = function () {
              var t = we(arguments);
              return (
                '#' + n(t[0]) + n(t[1]) + n(t[2]) + (t[3] < 1 ? n(Math.round(255 * t[3])) : '')
              );
            }),
            (a.to.rgb = function () {
              var t = we(arguments);
              return t.length < 4 || 1 === t[3]
                ? 'rgb(' +
                    Math.round(t[0]) +
                    ', ' +
                    Math.round(t[1]) +
                    ', ' +
                    Math.round(t[2]) +
                    ')'
                : 'rgba(' +
                    Math.round(t[0]) +
                    ', ' +
                    Math.round(t[1]) +
                    ', ' +
                    Math.round(t[2]) +
                    ', ' +
                    t[3] +
                    ')';
            }),
            (a.to.rgb.percent = function () {
              var t = we(arguments),
                e = Math.round((t[0] / 255) * 100),
                i = Math.round((t[1] / 255) * 100),
                a = Math.round((t[2] / 255) * 100);
              return t.length < 4 || 1 === t[3]
                ? 'rgb(' + e + '%, ' + i + '%, ' + a + '%)'
                : 'rgba(' + e + '%, ' + i + '%, ' + a + '%, ' + t[3] + ')';
            }),
            (a.to.hsl = function () {
              var t = we(arguments);
              return t.length < 4 || 1 === t[3]
                ? 'hsl(' + t[0] + ', ' + t[1] + '%, ' + t[2] + '%)'
                : 'hsla(' + t[0] + ', ' + t[1] + '%, ' + t[2] + '%, ' + t[3] + ')';
            }),
            (a.to.hwb = function () {
              var t = we(arguments),
                e = '';
              return (
                t.length >= 4 && 1 !== t[3] && (e = ', ' + t[3]),
                'hwb(' + t[0] + ', ' + t[1] + '%, ' + t[2] + '%' + e + ')'
              );
            }),
            (a.to.keyword = function (t) {
              return e[t.slice(0, 3)];
            });
        }),
        ke = ve(function (t) {
          var e = {};
          for (var i in ye) ye.hasOwnProperty(i) && (e[ye[i]] = i);
          var a = (t.exports = {
            rgb: { channels: 3, labels: 'rgb' },
            hsl: { channels: 3, labels: 'hsl' },
            hsv: { channels: 3, labels: 'hsv' },
            hwb: { channels: 3, labels: 'hwb' },
            cmyk: { channels: 4, labels: 'cmyk' },
            xyz: { channels: 3, labels: 'xyz' },
            lab: { channels: 3, labels: 'lab' },
            lch: { channels: 3, labels: 'lch' },
            hex: { channels: 1, labels: ['hex'] },
            keyword: { channels: 1, labels: ['keyword'] },
            ansi16: { channels: 1, labels: ['ansi16'] },
            ansi256: { channels: 1, labels: ['ansi256'] },
            hcg: { channels: 3, labels: ['h', 'c', 'g'] },
            apple: { channels: 3, labels: ['r16', 'g16', 'b16'] },
            gray: { channels: 1, labels: ['gray'] },
          });
          for (var r in a)
            if (a.hasOwnProperty(r)) {
              if (!('channels' in a[r])) throw new Error('missing channels property: ' + r);
              if (!('labels' in a[r])) throw new Error('missing channel labels property: ' + r);
              if (a[r].labels.length !== a[r].channels)
                throw new Error('channel and label counts mismatch: ' + r);
              var n = a[r].channels,
                o = a[r].labels;
              delete a[r].channels,
                delete a[r].labels,
                Object.defineProperty(a[r], 'channels', { value: n }),
                Object.defineProperty(a[r], 'labels', { value: o });
            }
          (a.rgb.hsl = function (t) {
            var e,
              i,
              a = t[0] / 255,
              r = t[1] / 255,
              n = t[2] / 255,
              o = Math.min(a, r, n),
              s = Math.max(a, r, n),
              l = s - o;
            return (
              s === o
                ? (e = 0)
                : a === s
                ? (e = (r - n) / l)
                : r === s
                ? (e = 2 + (n - a) / l)
                : n === s && (e = 4 + (a - r) / l),
              (e = Math.min(60 * e, 360)) < 0 && (e += 360),
              (i = (o + s) / 2),
              [e, 100 * (s === o ? 0 : i <= 0.5 ? l / (s + o) : l / (2 - s - o)), 100 * i]
            );
          }),
            (a.rgb.hsv = function (t) {
              var e,
                i,
                a,
                r,
                n,
                o = t[0] / 255,
                s = t[1] / 255,
                l = t[2] / 255,
                c = Math.max(o, s, l),
                h = c - Math.min(o, s, l),
                u = function (t) {
                  return (c - t) / 6 / h + 0.5;
                };
              return (
                0 === h
                  ? (r = n = 0)
                  : ((n = h / c),
                    (e = u(o)),
                    (i = u(s)),
                    (a = u(l)),
                    o === c
                      ? (r = a - i)
                      : s === c
                      ? (r = 1 / 3 + e - a)
                      : l === c && (r = 2 / 3 + i - e),
                    r < 0 ? (r += 1) : r > 1 && (r -= 1)),
                [360 * r, 100 * n, 100 * c]
              );
            }),
            (a.rgb.hwb = function (t) {
              var e = t[0],
                i = t[1],
                r = t[2];
              return [
                a.rgb.hsl(t)[0],
                (1 / 255) * Math.min(e, Math.min(i, r)) * 100,
                100 * (r = 1 - (1 / 255) * Math.max(e, Math.max(i, r))),
              ];
            }),
            (a.rgb.cmyk = function (t) {
              var e,
                i = t[0] / 255,
                a = t[1] / 255,
                r = t[2] / 255;
              return [
                100 * ((1 - i - (e = Math.min(1 - i, 1 - a, 1 - r))) / (1 - e) || 0),
                100 * ((1 - a - e) / (1 - e) || 0),
                100 * ((1 - r - e) / (1 - e) || 0),
                100 * e,
              ];
            }),
            (a.rgb.keyword = function (t) {
              var i = e[t];
              if (i) return i;
              var a,
                r,
                n,
                o = 1 / 0;
              for (var s in ye)
                if (ye.hasOwnProperty(s)) {
                  var l =
                    ((r = t),
                    (n = ye[s]),
                    Math.pow(r[0] - n[0], 2) + Math.pow(r[1] - n[1], 2) + Math.pow(r[2] - n[2], 2));
                  l < o && ((o = l), (a = s));
                }
              return a;
            }),
            (a.keyword.rgb = function (t) {
              return ye[t];
            }),
            (a.rgb.xyz = function (t) {
              var e = t[0] / 255,
                i = t[1] / 255,
                a = t[2] / 255;
              return [
                100 *
                  (0.4124 * (e = e > 0.04045 ? Math.pow((e + 0.055) / 1.055, 2.4) : e / 12.92) +
                    0.3576 * (i = i > 0.04045 ? Math.pow((i + 0.055) / 1.055, 2.4) : i / 12.92) +
                    0.1805 * (a = a > 0.04045 ? Math.pow((a + 0.055) / 1.055, 2.4) : a / 12.92)),
                100 * (0.2126 * e + 0.7152 * i + 0.0722 * a),
                100 * (0.0193 * e + 0.1192 * i + 0.9505 * a),
              ];
            }),
            (a.rgb.lab = function (t) {
              var e = a.rgb.xyz(t),
                i = e[0],
                r = e[1],
                n = e[2];
              return (
                (r /= 100),
                (n /= 108.883),
                (i = (i /= 95.047) > 0.008856 ? Math.pow(i, 1 / 3) : 7.787 * i + 16 / 116),
                [
                  116 * (r = r > 0.008856 ? Math.pow(r, 1 / 3) : 7.787 * r + 16 / 116) - 16,
                  500 * (i - r),
                  200 * (r - (n = n > 0.008856 ? Math.pow(n, 1 / 3) : 7.787 * n + 16 / 116)),
                ]
              );
            }),
            (a.hsl.rgb = function (t) {
              var e,
                i,
                a,
                r,
                n,
                o = t[0] / 360,
                s = t[1] / 100,
                l = t[2] / 100;
              if (0 === s) return [(n = 255 * l), n, n];
              (e = 2 * l - (i = l < 0.5 ? l * (1 + s) : l + s - l * s)), (r = [0, 0, 0]);
              for (var c = 0; c < 3; c++)
                (a = o + (1 / 3) * -(c - 1)) < 0 && a++,
                  a > 1 && a--,
                  (n =
                    6 * a < 1
                      ? e + 6 * (i - e) * a
                      : 2 * a < 1
                      ? i
                      : 3 * a < 2
                      ? e + (i - e) * (2 / 3 - a) * 6
                      : e),
                  (r[c] = 255 * n);
              return r;
            }),
            (a.hsl.hsv = function (t) {
              var e = t[0],
                i = t[1] / 100,
                a = t[2] / 100,
                r = i,
                n = Math.max(a, 0.01);
              return (
                (i *= (a *= 2) <= 1 ? a : 2 - a),
                (r *= n <= 1 ? n : 2 - n),
                [e, 100 * (0 === a ? (2 * r) / (n + r) : (2 * i) / (a + i)), ((a + i) / 2) * 100]
              );
            }),
            (a.hsv.rgb = function (t) {
              var e = t[0] / 60,
                i = t[1] / 100,
                a = t[2] / 100,
                r = Math.floor(e) % 6,
                n = e - Math.floor(e),
                o = 255 * a * (1 - i),
                s = 255 * a * (1 - i * n),
                l = 255 * a * (1 - i * (1 - n));
              switch (((a *= 255), r)) {
                case 0:
                  return [a, l, o];
                case 1:
                  return [s, a, o];
                case 2:
                  return [o, a, l];
                case 3:
                  return [o, s, a];
                case 4:
                  return [l, o, a];
                case 5:
                  return [a, o, s];
              }
            }),
            (a.hsv.hsl = function (t) {
              var e,
                i,
                a,
                r = t[0],
                n = t[1] / 100,
                o = t[2] / 100,
                s = Math.max(o, 0.01);
              return (
                (a = (2 - n) * o),
                (i = n * s),
                [r, 100 * (i = (i /= (e = (2 - n) * s) <= 1 ? e : 2 - e) || 0), 100 * (a /= 2)]
              );
            }),
            (a.hwb.rgb = function (t) {
              var e,
                i,
                a,
                r,
                n,
                o,
                s,
                l = t[0] / 360,
                c = t[1] / 100,
                h = t[2] / 100,
                u = c + h;
              switch (
                (u > 1 && ((c /= u), (h /= u)),
                (a = 6 * l - (e = Math.floor(6 * l))),
                0 != (1 & e) && (a = 1 - a),
                (r = c + a * ((i = 1 - h) - c)),
                e)
              ) {
                default:
                case 6:
                case 0:
                  (n = i), (o = r), (s = c);
                  break;
                case 1:
                  (n = r), (o = i), (s = c);
                  break;
                case 2:
                  (n = c), (o = i), (s = r);
                  break;
                case 3:
                  (n = c), (o = r), (s = i);
                  break;
                case 4:
                  (n = r), (o = c), (s = i);
                  break;
                case 5:
                  (n = i), (o = c), (s = r);
              }
              return [255 * n, 255 * o, 255 * s];
            }),
            (a.cmyk.rgb = function (t) {
              var e = t[0] / 100,
                i = t[1] / 100,
                a = t[2] / 100,
                r = t[3] / 100;
              return [
                255 * (1 - Math.min(1, e * (1 - r) + r)),
                255 * (1 - Math.min(1, i * (1 - r) + r)),
                255 * (1 - Math.min(1, a * (1 - r) + r)),
              ];
            }),
            (a.xyz.rgb = function (t) {
              var e,
                i,
                a,
                r = t[0] / 100,
                n = t[1] / 100,
                o = t[2] / 100;
              return (
                (i = -0.9689 * r + 1.8758 * n + 0.0415 * o),
                (a = 0.0557 * r + -0.204 * n + 1.057 * o),
                (e =
                  (e = 3.2406 * r + -1.5372 * n + -0.4986 * o) > 0.0031308
                    ? 1.055 * Math.pow(e, 1 / 2.4) - 0.055
                    : 12.92 * e),
                (i = i > 0.0031308 ? 1.055 * Math.pow(i, 1 / 2.4) - 0.055 : 12.92 * i),
                (a = a > 0.0031308 ? 1.055 * Math.pow(a, 1 / 2.4) - 0.055 : 12.92 * a),
                [
                  255 * (e = Math.min(Math.max(0, e), 1)),
                  255 * (i = Math.min(Math.max(0, i), 1)),
                  255 * (a = Math.min(Math.max(0, a), 1)),
                ]
              );
            }),
            (a.xyz.lab = function (t) {
              var e = t[0],
                i = t[1],
                a = t[2];
              return (
                (i /= 100),
                (a /= 108.883),
                (e = (e /= 95.047) > 0.008856 ? Math.pow(e, 1 / 3) : 7.787 * e + 16 / 116),
                [
                  116 * (i = i > 0.008856 ? Math.pow(i, 1 / 3) : 7.787 * i + 16 / 116) - 16,
                  500 * (e - i),
                  200 * (i - (a = a > 0.008856 ? Math.pow(a, 1 / 3) : 7.787 * a + 16 / 116)),
                ]
              );
            }),
            (a.lab.xyz = function (t) {
              var e,
                i,
                a,
                r = t[0];
              (e = t[1] / 500 + (i = (r + 16) / 116)), (a = i - t[2] / 200);
              var n = Math.pow(i, 3),
                o = Math.pow(e, 3),
                s = Math.pow(a, 3);
              return (
                (i = n > 0.008856 ? n : (i - 16 / 116) / 7.787),
                (e = o > 0.008856 ? o : (e - 16 / 116) / 7.787),
                (a = s > 0.008856 ? s : (a - 16 / 116) / 7.787),
                [(e *= 95.047), (i *= 100), (a *= 108.883)]
              );
            }),
            (a.lab.lch = function (t) {
              var e,
                i = t[0],
                a = t[1],
                r = t[2];
              return (
                (e = (360 * Math.atan2(r, a)) / 2 / Math.PI) < 0 && (e += 360),
                [i, Math.sqrt(a * a + r * r), e]
              );
            }),
            (a.lch.lab = function (t) {
              var e,
                i = t[0],
                a = t[1];
              return (e = (t[2] / 360) * 2 * Math.PI), [i, a * Math.cos(e), a * Math.sin(e)];
            }),
            (a.rgb.ansi16 = function (t) {
              var e = t[0],
                i = t[1],
                r = t[2],
                n = 1 in arguments ? arguments[1] : a.rgb.hsv(t)[2];
              if (0 === (n = Math.round(n / 50))) return 30;
              var o =
                30 +
                ((Math.round(r / 255) << 2) | (Math.round(i / 255) << 1) | Math.round(e / 255));
              return 2 === n && (o += 60), o;
            }),
            (a.hsv.ansi16 = function (t) {
              return a.rgb.ansi16(a.hsv.rgb(t), t[2]);
            }),
            (a.rgb.ansi256 = function (t) {
              var e = t[0],
                i = t[1],
                a = t[2];
              return e === i && i === a
                ? e < 8
                  ? 16
                  : e > 248
                  ? 231
                  : Math.round(((e - 8) / 247) * 24) + 232
                : 16 +
                    36 * Math.round((e / 255) * 5) +
                    6 * Math.round((i / 255) * 5) +
                    Math.round((a / 255) * 5);
            }),
            (a.ansi16.rgb = function (t) {
              var e = t % 10;
              if (0 === e || 7 === e) return t > 50 && (e += 3.5), [(e = (e / 10.5) * 255), e, e];
              var i = 0.5 * (1 + ~~(t > 50));
              return [(1 & e) * i * 255, ((e >> 1) & 1) * i * 255, ((e >> 2) & 1) * i * 255];
            }),
            (a.ansi256.rgb = function (t) {
              if (t >= 232) {
                var e = 10 * (t - 232) + 8;
                return [e, e, e];
              }
              var i;
              return (
                (t -= 16),
                [
                  (Math.floor(t / 36) / 5) * 255,
                  (Math.floor((i = t % 36) / 6) / 5) * 255,
                  ((i % 6) / 5) * 255,
                ]
              );
            }),
            (a.rgb.hex = function (t) {
              var e = (
                ((255 & Math.round(t[0])) << 16) +
                ((255 & Math.round(t[1])) << 8) +
                (255 & Math.round(t[2]))
              )
                .toString(16)
                .toUpperCase();
              return '000000'.substring(e.length) + e;
            }),
            (a.hex.rgb = function (t) {
              var e = t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
              if (!e) return [0, 0, 0];
              var i = e[0];
              3 === e[0].length &&
                (i = i
                  .split('')
                  .map(function (t) {
                    return t + t;
                  })
                  .join(''));
              var a = parseInt(i, 16);
              return [(a >> 16) & 255, (a >> 8) & 255, 255 & a];
            }),
            (a.rgb.hcg = function (t) {
              var e,
                i = t[0] / 255,
                a = t[1] / 255,
                r = t[2] / 255,
                n = Math.max(Math.max(i, a), r),
                o = Math.min(Math.min(i, a), r),
                s = n - o;
              return (
                (e =
                  s <= 0
                    ? 0
                    : n === i
                    ? ((a - r) / s) % 6
                    : n === a
                    ? 2 + (r - i) / s
                    : 4 + (i - a) / s + 4),
                (e /= 6),
                [360 * (e %= 1), 100 * s, 100 * (s < 1 ? o / (1 - s) : 0)]
              );
            }),
            (a.hsl.hcg = function (t) {
              var e,
                i = t[1] / 100,
                a = t[2] / 100,
                r = 0;
              return (
                (e = a < 0.5 ? 2 * i * a : 2 * i * (1 - a)) < 1 && (r = (a - 0.5 * e) / (1 - e)),
                [t[0], 100 * e, 100 * r]
              );
            }),
            (a.hsv.hcg = function (t) {
              var e = t[1] / 100,
                i = t[2] / 100,
                a = e * i,
                r = 0;
              return a < 1 && (r = (i - a) / (1 - a)), [t[0], 100 * a, 100 * r];
            }),
            (a.hcg.rgb = function (t) {
              var e = t[0] / 360,
                i = t[1] / 100,
                a = t[2] / 100;
              if (0 === i) return [255 * a, 255 * a, 255 * a];
              var r,
                n = [0, 0, 0],
                o = (e % 1) * 6,
                s = o % 1,
                l = 1 - s;
              switch (Math.floor(o)) {
                case 0:
                  (n[0] = 1), (n[1] = s), (n[2] = 0);
                  break;
                case 1:
                  (n[0] = l), (n[1] = 1), (n[2] = 0);
                  break;
                case 2:
                  (n[0] = 0), (n[1] = 1), (n[2] = s);
                  break;
                case 3:
                  (n[0] = 0), (n[1] = l), (n[2] = 1);
                  break;
                case 4:
                  (n[0] = s), (n[1] = 0), (n[2] = 1);
                  break;
                default:
                  (n[0] = 1), (n[1] = 0), (n[2] = l);
              }
              return (
                (r = (1 - i) * a),
                [255 * (i * n[0] + r), 255 * (i * n[1] + r), 255 * (i * n[2] + r)]
              );
            }),
            (a.hcg.hsv = function (t) {
              var e = t[1] / 100,
                i = e + (t[2] / 100) * (1 - e),
                a = 0;
              return i > 0 && (a = e / i), [t[0], 100 * a, 100 * i];
            }),
            (a.hcg.hsl = function (t) {
              var e = t[1] / 100,
                i = (t[2] / 100) * (1 - e) + 0.5 * e,
                a = 0;
              return (
                i > 0 && i < 0.5 ? (a = e / (2 * i)) : i >= 0.5 && i < 1 && (a = e / (2 * (1 - i))),
                [t[0], 100 * a, 100 * i]
              );
            }),
            (a.hcg.hwb = function (t) {
              var e = t[1] / 100,
                i = e + (t[2] / 100) * (1 - e);
              return [t[0], 100 * (i - e), 100 * (1 - i)];
            }),
            (a.hwb.hcg = function (t) {
              var e = t[1] / 100,
                i = 1 - t[2] / 100,
                a = i - e,
                r = 0;
              return a < 1 && (r = (i - a) / (1 - a)), [t[0], 100 * a, 100 * r];
            }),
            (a.apple.rgb = function (t) {
              return [(t[0] / 65535) * 255, (t[1] / 65535) * 255, (t[2] / 65535) * 255];
            }),
            (a.rgb.apple = function (t) {
              return [(t[0] / 255) * 65535, (t[1] / 255) * 65535, (t[2] / 255) * 65535];
            }),
            (a.gray.rgb = function (t) {
              return [(t[0] / 100) * 255, (t[0] / 100) * 255, (t[0] / 100) * 255];
            }),
            (a.gray.hsl = a.gray.hsv = function (t) {
              return [0, 0, t[0]];
            }),
            (a.gray.hwb = function (t) {
              return [0, 100, t[0]];
            }),
            (a.gray.cmyk = function (t) {
              return [0, 0, 0, t[0]];
            }),
            (a.gray.lab = function (t) {
              return [t[0], 0, 0];
            }),
            (a.gray.hex = function (t) {
              var e = 255 & Math.round((t[0] / 100) * 255),
                i = ((e << 16) + (e << 8) + e).toString(16).toUpperCase();
              return '000000'.substring(i.length) + i;
            }),
            (a.rgb.gray = function (t) {
              return [((t[0] + t[1] + t[2]) / 3 / 255) * 100];
            });
        });
      function _e(t, e) {
        return function (i) {
          return e(t(i));
        };
      }
      function Se(t, e) {
        for (var i = [e[t].parent, t], a = ke[e[t].parent][t], r = e[t].parent; e[r].parent; )
          i.unshift(e[r].parent), (a = _e(ke[e[r].parent][r], a)), (r = e[r].parent);
        return (a.conversion = i), a;
      }
      var De = {};
      Object.keys(ke).forEach(function (t) {
        (De[t] = {}),
          Object.defineProperty(De[t], 'channels', { value: ke[t].channels }),
          Object.defineProperty(De[t], 'labels', { value: ke[t].labels });
        var e = (function (t) {
          for (
            var e = (function (t) {
                var e = (function () {
                    for (var t = {}, e = Object.keys(ke), i = e.length, a = 0; a < i; a++)
                      t[e[a]] = { distance: -1, parent: null };
                    return t;
                  })(),
                  i = [t];
                for (e[t].distance = 0; i.length; )
                  for (var a = i.pop(), r = Object.keys(ke[a]), n = r.length, o = 0; o < n; o++) {
                    var s = r[o],
                      l = e[s];
                    -1 === l.distance &&
                      ((l.distance = e[a].distance + 1), (l.parent = a), i.unshift(s));
                  }
                return e;
              })(t),
              i = {},
              a = Object.keys(e),
              r = a.length,
              n = 0;
            n < r;
            n++
          ) {
            var o = a[n];
            null !== e[o].parent && (i[o] = Se(o, e));
          }
          return i;
        })(t);
        Object.keys(e).forEach(function (i) {
          var a = e[i];
          (De[t][i] = (function (t) {
            var e = function (e) {
              if (null == e) return e;
              arguments.length > 1 && (e = Array.prototype.slice.call(arguments));
              var i = t(e);
              if ('object' == typeof i)
                for (var a = i.length, r = 0; r < a; r++) i[r] = Math.round(i[r]);
              return i;
            };
            return 'conversion' in t && (e.conversion = t.conversion), e;
          })(a)),
            (De[t][i].raw = (function (t) {
              var e = function (e) {
                return null == e
                  ? e
                  : (arguments.length > 1 && (e = Array.prototype.slice.call(arguments)), t(e));
              };
              return 'conversion' in t && (e.conversion = t.conversion), e;
            })(a));
        });
      });
      var Ce = De,
        Te = [].slice,
        $e = ['keyword', 'gray', 'hex'],
        Ie = {};
      Object.keys(Ce).forEach(function (t) {
        Ie[Te.call(Ce[t].labels).sort().join('')] = t;
      });
      var Ae = {};
      function Ee(t, e) {
        if (!(this instanceof Ee)) return new Ee(t, e);
        if ((e && e in $e && (e = null), e && !(e in Ce))) throw new Error('Unknown model: ' + e);
        var i, a;
        if (null == t) (this.model = 'rgb'), (this.color = [0, 0, 0]), (this.valpha = 1);
        else if (t instanceof Ee)
          (this.model = t.model), (this.color = t.color.slice()), (this.valpha = t.valpha);
        else if ('string' == typeof t) {
          var r = xe.get(t);
          if (null === r) throw new Error('Unable to parse color from string: ' + t);
          (this.model = r.model),
            (a = Ce[this.model].channels),
            (this.color = r.value.slice(0, a)),
            (this.valpha = 'number' == typeof r.value[a] ? r.value[a] : 1);
        } else if (t.length) {
          (this.model = e || 'rgb'), (a = Ce[this.model].channels);
          var n = Te.call(t, 0, a);
          (this.color = Me(n, a)), (this.valpha = 'number' == typeof t[a] ? t[a] : 1);
        } else if ('number' == typeof t)
          (t &= 16777215),
            (this.model = 'rgb'),
            (this.color = [(t >> 16) & 255, (t >> 8) & 255, 255 & t]),
            (this.valpha = 1);
        else {
          this.valpha = 1;
          var o = Object.keys(t);
          'alpha' in t &&
            (o.splice(o.indexOf('alpha'), 1),
            (this.valpha = 'number' == typeof t.alpha ? t.alpha : 0));
          var s = o.sort().join('');
          if (!(s in Ie))
            throw new Error('Unable to parse color from object: ' + JSON.stringify(t));
          this.model = Ie[s];
          var l = Ce[this.model].labels,
            c = [];
          for (i = 0; i < l.length; i++) c.push(t[l[i]]);
          this.color = Me(c);
        }
        if (Ae[this.model])
          for (a = Ce[this.model].channels, i = 0; i < a; i++) {
            var h = Ae[this.model][i];
            h && (this.color[i] = h(this.color[i]));
          }
        (this.valpha = Math.max(0, Math.min(1, this.valpha))), Object.freeze && Object.freeze(this);
      }
      function Oe(t, e, i) {
        return (
          (t = Array.isArray(t) ? t : [t]).forEach(function (t) {
            (Ae[t] || (Ae[t] = []))[e] = i;
          }),
          (t = t[0]),
          function (a) {
            var r;
            return arguments.length
              ? (i && (a = i(a)), ((r = this[t]()).color[e] = a), r)
              : ((r = this[t]().color[e]), i && (r = i(r)), r);
          }
        );
      }
      function Re(t) {
        return function (e) {
          return Math.max(0, Math.min(t, e));
        };
      }
      function Ne(t) {
        return Array.isArray(t) ? t : [t];
      }
      function Me(t, e) {
        for (var i = 0; i < e; i++) 'number' != typeof t[i] && (t[i] = 0);
        return t;
      }
      (Ee.prototype = {
        toString: function () {
          return this.string();
        },
        toJSON: function () {
          return this[this.model]();
        },
        string: function (t) {
          var e = this.model in xe.to ? this : this.rgb(),
            i =
              1 === (e = e.round('number' == typeof t ? t : 1)).valpha
                ? e.color
                : e.color.concat(this.valpha);
          return xe.to[e.model](i);
        },
        percentString: function (t) {
          var e = this.rgb().round('number' == typeof t ? t : 1),
            i = 1 === e.valpha ? e.color : e.color.concat(this.valpha);
          return xe.to.rgb.percent(i);
        },
        array: function () {
          return 1 === this.valpha ? this.color.slice() : this.color.concat(this.valpha);
        },
        object: function () {
          for (
            var t = {}, e = Ce[this.model].channels, i = Ce[this.model].labels, a = 0;
            a < e;
            a++
          )
            t[i[a]] = this.color[a];
          return 1 !== this.valpha && (t.alpha = this.valpha), t;
        },
        unitArray: function () {
          var t = this.rgb().color;
          return (
            (t[0] /= 255), (t[1] /= 255), (t[2] /= 255), 1 !== this.valpha && t.push(this.valpha), t
          );
        },
        unitObject: function () {
          var t = this.rgb().object();
          return (
            (t.r /= 255),
            (t.g /= 255),
            (t.b /= 255),
            1 !== this.valpha && (t.alpha = this.valpha),
            t
          );
        },
        round: function (t) {
          return (
            (t = Math.max(t || 0, 0)),
            new Ee(
              this.color
                .map(
                  (function (t) {
                    return function (e) {
                      return (function (t, e) {
                        return Number(t.toFixed(e));
                      })(e, t);
                    };
                  })(t),
                )
                .concat(this.valpha),
              this.model,
            )
          );
        },
        alpha: function (t) {
          return arguments.length
            ? new Ee(this.color.concat(Math.max(0, Math.min(1, t))), this.model)
            : this.valpha;
        },
        red: Oe('rgb', 0, Re(255)),
        green: Oe('rgb', 1, Re(255)),
        blue: Oe('rgb', 2, Re(255)),
        hue: Oe(['hsl', 'hsv', 'hsl', 'hwb', 'hcg'], 0, function (t) {
          return ((t % 360) + 360) % 360;
        }),
        saturationl: Oe('hsl', 1, Re(100)),
        lightness: Oe('hsl', 2, Re(100)),
        saturationv: Oe('hsv', 1, Re(100)),
        value: Oe('hsv', 2, Re(100)),
        chroma: Oe('hcg', 1, Re(100)),
        gray: Oe('hcg', 2, Re(100)),
        white: Oe('hwb', 1, Re(100)),
        wblack: Oe('hwb', 2, Re(100)),
        cyan: Oe('cmyk', 0, Re(100)),
        magenta: Oe('cmyk', 1, Re(100)),
        yellow: Oe('cmyk', 2, Re(100)),
        black: Oe('cmyk', 3, Re(100)),
        x: Oe('xyz', 0, Re(100)),
        y: Oe('xyz', 1, Re(100)),
        z: Oe('xyz', 2, Re(100)),
        l: Oe('lab', 0, Re(100)),
        a: Oe('lab', 1),
        b: Oe('lab', 2),
        keyword: function (t) {
          return arguments.length ? new Ee(t) : Ce[this.model].keyword(this.color);
        },
        hex: function (t) {
          return arguments.length ? new Ee(t) : xe.to.hex(this.rgb().round().color);
        },
        rgbNumber: function () {
          var t = this.rgb().color;
          return ((255 & t[0]) << 16) | ((255 & t[1]) << 8) | (255 & t[2]);
        },
        luminosity: function () {
          for (var t = this.rgb().color, e = [], i = 0; i < t.length; i++) {
            var a = t[i] / 255;
            e[i] = a <= 0.03928 ? a / 12.92 : Math.pow((a + 0.055) / 1.055, 2.4);
          }
          return 0.2126 * e[0] + 0.7152 * e[1] + 0.0722 * e[2];
        },
        contrast: function (t) {
          var e = this.luminosity(),
            i = t.luminosity();
          return e > i ? (e + 0.05) / (i + 0.05) : (i + 0.05) / (e + 0.05);
        },
        level: function (t) {
          var e = this.contrast(t);
          return e >= 7.1 ? 'AAA' : e >= 4.5 ? 'AA' : '';
        },
        isDark: function () {
          var t = this.rgb().color;
          return (299 * t[0] + 587 * t[1] + 114 * t[2]) / 1e3 < 128;
        },
        isLight: function () {
          return !this.isDark();
        },
        negate: function () {
          for (var t = this.rgb(), e = 0; e < 3; e++) t.color[e] = 255 - t.color[e];
          return t;
        },
        lighten: function (t) {
          var e = this.hsl();
          return (e.color[2] += e.color[2] * t), e;
        },
        darken: function (t) {
          var e = this.hsl();
          return (e.color[2] -= e.color[2] * t), e;
        },
        saturate: function (t) {
          var e = this.hsl();
          return (e.color[1] += e.color[1] * t), e;
        },
        desaturate: function (t) {
          var e = this.hsl();
          return (e.color[1] -= e.color[1] * t), e;
        },
        whiten: function (t) {
          var e = this.hwb();
          return (e.color[1] += e.color[1] * t), e;
        },
        blacken: function (t) {
          var e = this.hwb();
          return (e.color[2] += e.color[2] * t), e;
        },
        grayscale: function () {
          var t = this.rgb().color,
            e = 0.3 * t[0] + 0.59 * t[1] + 0.11 * t[2];
          return Ee.rgb(e, e, e);
        },
        fade: function (t) {
          return this.alpha(this.valpha - this.valpha * t);
        },
        opaquer: function (t) {
          return this.alpha(this.valpha + this.valpha * t);
        },
        rotate: function (t) {
          var e = this.hsl(),
            i = e.color[0];
          return (i = (i = (i + t) % 360) < 0 ? 360 + i : i), (e.color[0] = i), e;
        },
        mix: function (t, e) {
          if (!t || !t.rgb)
            throw new Error(
              'Argument to "mix" was not a Color instance, but rather an instance of ' + typeof t,
            );
          var i = t.rgb(),
            a = this.rgb(),
            r = void 0 === e ? 0.5 : e,
            n = 2 * r - 1,
            o = i.alpha() - a.alpha(),
            s = ((n * o == -1 ? n : (n + o) / (1 + n * o)) + 1) / 2,
            l = 1 - s;
          return Ee.rgb(
            s * i.red() + l * a.red(),
            s * i.green() + l * a.green(),
            s * i.blue() + l * a.blue(),
            i.alpha() * r + a.alpha() * (1 - r),
          );
        },
      }),
        Object.keys(Ce).forEach(function (t) {
          if (-1 === $e.indexOf(t)) {
            var e = Ce[t].channels;
            (Ee.prototype[t] = function () {
              if (this.model === t) return new Ee(this);
              if (arguments.length) return new Ee(arguments, t);
              var i = 'number' == typeof arguments[e] ? e : this.valpha;
              return new Ee(Ne(Ce[this.model][t].raw(this.color)).concat(i), t);
            }),
              (Ee[t] = function (i) {
                return 'number' == typeof i && (i = Me(Te.call(arguments), e)), new Ee(i, t);
              });
          }
        });
      var Pe = Ee;
      const Le = 'section',
        He = 'header',
        Fe = 'control',
        ze = 'channel',
        je = 'scope',
        Ve = Pe('#007AC2'),
        Ue = { r: 255, g: 255, b: 255 },
        Be = { h: 360, s: 100, v: 100 },
        qe = 'No color',
        We = {
          s: {
            slider: { height: 10, width: 156 },
            colorField: { height: 80, width: 156 },
            thumb: { radius: 8 },
          },
          m: {
            slider: { height: 14, width: 272 },
            colorField: { height: 150, width: 272 },
            thumb: { radius: 10 },
          },
          l: {
            slider: { height: 16, width: 420 },
            colorField: { height: 200, width: 420 },
            thumb: { radius: 12 },
          },
        };
      var Ge = 'object' == typeof i.g && i.g && i.g.Object === Object && i.g,
        Xe = 'object' == typeof self && self && self.Object === Object && self,
        Ye = Ge || Xe || Function('return this')(),
        Ke = Ye.Symbol,
        Ze = Object.prototype,
        Je = Ze.hasOwnProperty,
        Qe = Ze.toString,
        ti = Ke ? Ke.toStringTag : void 0,
        ei = Object.prototype.toString,
        ii = Ke ? Ke.toStringTag : void 0;
      function ai(t) {
        return null == t
          ? void 0 === t
            ? '[object Undefined]'
            : '[object Null]'
          : ii && ii in Object(t)
          ? (function (t) {
              var e = Je.call(t, ti),
                i = t[ti];
              try {
                t[ti] = void 0;
                var a = !0;
              } catch (t) {}
              var r = Qe.call(t);
              return a && (e ? (t[ti] = i) : delete t[ti]), r;
            })(t)
          : (function (t) {
              return ei.call(t);
            })(t);
      }
      function ri(t) {
        return null != t && 'object' == typeof t;
      }
      var ni = Ke ? Ke.prototype : void 0;
      ni && ni.toString;
      var oi = /\s/,
        si = /^\s+/;
      function li(t) {
        var e = typeof t;
        return null != t && ('object' == e || 'function' == e);
      }
      var ci = /^[-+]0x[0-9a-f]+$/i,
        hi = /^0b[01]+$/i,
        ui = /^0o[0-7]+$/i,
        di = parseInt;
      function pi(t) {
        if ('number' == typeof t) return t;
        if (
          (function (t) {
            return 'symbol' == typeof t || (ri(t) && '[object Symbol]' == ai(t));
          })(t)
        )
          return NaN;
        if (li(t)) {
          var e = 'function' == typeof t.valueOf ? t.valueOf() : t;
          t = li(e) ? e + '' : e;
        }
        if ('string' != typeof t) return 0 === t ? t : +t;
        t = (function (t) {
          return t
            ? t
                .slice(
                  0,
                  (function (t) {
                    for (var e = t.length; e-- && oi.test(t.charAt(e)); );
                    return e;
                  })(t) + 1,
                )
                .replace(si, '')
            : t;
        })(t);
        var i = hi.test(t);
        return i || ui.test(t) ? di(t.slice(2), i ? 2 : 8) : ci.test(t) ? NaN : +t;
      }
      var mi = Object.prototype;
      mi.hasOwnProperty,
        mi.propertyIsEnumerable,
        (function (t) {
          ri(t) && ai(t);
        })(
          (function () {
            return arguments;
          })(),
        );
      var fi = 'object' == typeof exports && exports && !exports.nodeType && exports,
        bi = fi && t && !t.nodeType && t,
        gi = bi && bi.exports === fi ? Ye.Buffer : void 0;
      gi && gi.isBuffer;
      var vi = 'object' == typeof exports && exports && !exports.nodeType && exports,
        yi = vi && t && !t.nodeType && t,
        wi = yi && yi.exports === vi && Ge.process,
        xi = (function () {
          try {
            return (
              (yi && yi.require && yi.require('util').types) ||
              (wi && wi.binding && wi.binding('util'))
            );
          } catch (t) {}
        })();
      xi && xi.isTypedArray;
      var ki = function () {
          return Ye.Date.now();
        },
        _i = Math.max,
        Si = Math.min;
      const Di = (t, e, i) => Math.max(e, Math.min(t, i)),
        Ci = ue(Ve.hex()),
        Ti = class extends HTMLElement {
          constructor() {
            super(),
              this.__registerHost(),
              At(this),
              (this.calciteColorPickerChange = yt(this, 'calciteColorPickerChange', 7)),
              (this.allowEmpty = !1),
              (this.appearance = 'default'),
              (this.color = Ve),
              (this.format = 'auto'),
              (this.hideHex = !1),
              (this.hideChannels = !1),
              (this.hideSaved = !1),
              (this.intlB = 'B'),
              (this.intlBlue = 'Blue'),
              (this.intlDeleteColor = 'Delete color'),
              (this.intlG = 'G'),
              (this.intlGreen = 'Green'),
              (this.intlH = 'H'),
              (this.intlHsv = 'HSV'),
              (this.intlHex = 'Hex'),
              (this.intlHue = 'Hue'),
              (this.intlNoColor = qe),
              (this.intlR = 'R'),
              (this.intlRed = 'Red'),
              (this.intlRgb = 'RGB'),
              (this.intlS = 'S'),
              (this.intlSaturation = 'Saturation'),
              (this.intlSaveColor = 'Save color'),
              (this.intlSaved = 'Saved'),
              (this.intlV = 'V'),
              (this.intlValue = 'Value'),
              (this.scale = 'm'),
              (this.value = Ci),
              (this.colorUpdateLocked = !1),
              (this.hueThumbState = 'idle'),
              (this.mode = 'hex'),
              (this.shiftKeyChannelAdjustment = 0),
              (this.sliderThumbState = 'idle'),
              (this.colorFieldAndSliderInteractive = !1),
              (this.channelMode = 'rgb'),
              (this.channels = this.toChannels(Ve)),
              (this.dimensions = We.m),
              (this.savedColors = []),
              (this.handleTabActivate = (t) => {
                (this.channelMode = t.currentTarget.getAttribute('data-color-mode')),
                  this.updateChannelsFromColor(this.color);
              }),
              (this.handleColorFieldScopeKeyDown = (t) => {
                const e = qt(t.key),
                  i = {
                    ArrowUp: { x: 0, y: -10 },
                    ArrowRight: { x: 10, y: 0 },
                    ArrowDown: { x: 0, y: 10 },
                    ArrowLeft: { x: -10, y: 0 },
                  };
                if (Object.keys(i).includes(e))
                  return (
                    t.preventDefault(),
                    (this.scopeOrientation =
                      'ArrowDown' === e || 'ArrowUp' === e ? 'vertical' : 'horizontal'),
                    void this.captureColorFieldColor(
                      this.colorFieldScopeLeft + i[e].x || 0,
                      this.colorFieldScopeTop + i[e].y || 0,
                      !1,
                    )
                  );
              }),
              (this.handleHueScopeKeyDown = (t) => {
                var e;
                const i = t.shiftKey ? 10 : 1,
                  a = qt(t.key),
                  r = { ArrowUp: 1, ArrowRight: 1, ArrowDown: -1, ArrowLeft: -1 };
                if (Object.keys(r).includes(a)) {
                  t.preventDefault();
                  const n = r[a] * i,
                    o = null === (e = this.baseColorFieldColor) || void 0 === e ? void 0 : e.hue(),
                    s = o ? this.baseColorFieldColor.hue(o + n) : Pe({ h: 0, s: 0, v: 100 });
                  this.internalColorSet(s, !1);
                }
              }),
              (this.handleHexInputChange = (t) => {
                t.stopPropagation();
                const { allowEmpty: e, color: i } = this,
                  a = t.target.value;
                !e || a
                  ? a !== (i && ue(i.hex())) && this.internalColorSet(Pe(a))
                  : this.internalColorSet(null);
              }),
              (this.handleSavedColorSelect = (t) => {
                const e = t.currentTarget;
                this.internalColorSet(Pe(e.color));
              }),
              (this.handleChannelInput = (t) => {
                const e = t.currentTarget,
                  i = t.detail.nativeEvent.target,
                  a = Number(e.getAttribute('data-channel-index')),
                  r = 'rgb' === this.channelMode ? Ue[Object.keys(Ue)[a]] : Be[Object.keys(Be)[a]];
                let n;
                if (this.allowEmpty && !e.value) n = '';
                else {
                  const t = Number(e.value) + this.shiftKeyChannelAdjustment;
                  n = Di(t, 0, r).toString();
                }
                (e.value = n), (i.value = n);
              }),
              (this.handleChannelChange = (t) => {
                const e = t.currentTarget,
                  i = Number(e.getAttribute('data-channel-index')),
                  a = [...this.channels];
                if (this.allowEmpty && !e.value)
                  return (this.channels = [null, null, null]), void this.internalColorSet(null);
                (a[i] = Number(e.value)), this.updateColorFromChannels(a);
              }),
              (this.handleSavedColorKeyDown = (t) => {
                (' ' !== t.key && 'Enter' !== t.key) ||
                  (t.preventDefault(), t.stopPropagation(), this.handleSavedColorSelect(t));
              }),
              (this.handleColorFieldAndSliderMouseLeave = () => {
                (this.colorFieldAndSliderInteractive = !1),
                  'drag' !== this.sliderThumbState &&
                    'drag' !== this.hueThumbState &&
                    ((this.hueThumbState = 'idle'),
                    (this.sliderThumbState = 'idle'),
                    this.drawColorFieldAndSlider());
              }),
              (this.handleColorFieldAndSliderMouseDown = (t) => {
                const { offsetX: e, offsetY: i } = t;
                (this.activeThumbX = e),
                  (this.activeThumbY = i),
                  (this.globalThumbX = e),
                  (this.globalThumbY = i);
                const a = this.getCanvasRegion(i);
                'color-field' === a
                  ? ((this.hueThumbState = 'drag'), this.captureColorFieldColor(e, i))
                  : 'slider' === a &&
                    ((this.sliderThumbState = 'drag'), this.captureHueSliderColor(e)),
                  t.preventDefault(),
                  document.addEventListener('mousemove', this.globalMouseMoveHandler),
                  document.addEventListener('mouseup', this.globalMouseUpHandler, { once: !0 });
              }),
              (this.globalMouseUpHandler = () => {
                (this.hueThumbState = 'idle'),
                  (this.sliderThumbState = 'idle'),
                  this.drawColorFieldAndSlider();
              }),
              (this.globalMouseMoveHandler = (t) => {
                const { el: e, dimensions: i } = this,
                  a = 'drag' === this.sliderThumbState,
                  r = 'drag' === this.hueThumbState;
                if (!e.isConnected || (!a && !r)) return;
                (this.globalThumbX = this.globalThumbX + t.movementX),
                  (this.globalThumbY = this.globalThumbY + t.movementY),
                  (this.activeThumbX = Di(this.globalThumbX, 0, i.colorField.width)),
                  (this.activeThumbY = Di(
                    this.globalThumbY,
                    0,
                    i.colorField.height + i.slider.height,
                  ));
                const n = r
                  ? 'color-field'
                  : a
                  ? 'slider'
                  : this.getCanvasRegion(this.activeThumbY);
                'color-field' === n
                  ? this.captureColorFieldColor(this.activeThumbX, this.activeThumbY, !1)
                  : 'slider' === n && this.captureHueSliderColor(this.activeThumbX);
              }),
              (this.handleColorFieldAndSliderMouseEnterOrMove = ({ offsetX: t, offsetY: e }) => {
                const {
                  dimensions: { colorField: i, slider: a, thumb: r },
                } = this;
                this.colorFieldAndSliderInteractive = e <= i.height + a.height;
                const n = this.getCanvasRegion(e);
                if ('color-field' === n) {
                  const a = this.hueThumbState,
                    n = this.baseColorFieldColor.hsv(),
                    o = Math.round(n.saturationv() / (Be.s / i.width)),
                    s = Math.round(i.height - n.value() / (Be.v / i.height)),
                    l = this.containsPoint(t, e, o, s, r.radius);
                  let c = !1;
                  'idle' === a && l
                    ? ((this.hueThumbState = 'hover'), (c = !0))
                    : 'hover' !== a || l || ((this.hueThumbState = 'idle'), (c = !0)),
                    'drag' !== this.hueThumbState && c && this.drawColorFieldAndSlider();
                } else if ('slider' === n) {
                  const n = this.baseColorFieldColor.hsv().saturationv(100).value(100),
                    o = this.sliderThumbState,
                    s = Math.round(n.hue() / (360 / a.width)),
                    l = Math.round((a.height + this.getSliderCapSpacing()) / 2) + i.height,
                    c = this.containsPoint(t, e, s, l, r.radius);
                  let h = !1;
                  'idle' === o && c
                    ? ((this.sliderThumbState = 'hover'), (h = !0))
                    : 'hover' !== o || c || ((this.sliderThumbState = 'idle'), (h = !0)),
                    'drag' !== this.sliderThumbState && h && this.drawColorFieldAndSlider();
                }
              }),
              (this.storeHexInputRef = (t) => {
                this.hexInputNode = t;
              }),
              (this.renderChannelsTabTitle = (t) => {
                const { channelMode: e, intlRgb: i, intlHsv: a } = this,
                  r = 'rgb' === t ? i : a;
                return K(
                  'calcite-tab-title',
                  {
                    active: t === e,
                    class: 'color-mode',
                    'data-color-mode': t,
                    key: t,
                    onCalciteTabsActivate: this.handleTabActivate,
                  },
                  r,
                );
              }),
              (this.renderChannelsTab = (t) => {
                const {
                    channelMode: e,
                    channels: i,
                    intlB: a,
                    intlBlue: r,
                    intlG: n,
                    intlGreen: o,
                    intlH: s,
                    intlHue: l,
                    intlR: c,
                    intlRed: h,
                    intlS: u,
                    intlSaturation: d,
                    intlV: p,
                    intlValue: m,
                  } = this,
                  f = 'rgb' === t,
                  b = f ? [c, n, a] : [s, u, p],
                  g = f ? [h, o, r] : [l, d, m];
                return K(
                  'calcite-tab',
                  { active: t === e, class: Fe, key: t },
                  K(
                    'div',
                    { class: 'channels' },
                    i.map((t, e) => this.renderChannel(t, e, b[e], g[e])),
                  ),
                );
              }),
              (this.renderChannel = (t, e, i, a) =>
                K('calcite-input', {
                  'aria-label': a,
                  class: ze,
                  'data-channel-index': e,
                  numberButtonType: 'none',
                  onCalciteInputChange: this.handleChannelChange,
                  onCalciteInputInput: this.handleChannelInput,
                  prefixText: i,
                  scale: 's',
                  type: 'number',
                  value: null == t ? void 0 : t.toString(),
                })),
              (this.deleteColor = () => {
                const t = this.color.hex();
                if (!(this.savedColors.indexOf(t) > -1)) return;
                const e = this.savedColors.filter((e) => e !== t);
                this.savedColors = e;
                const i = `calcite-color-${this.storageId}`;
                this.storageId && localStorage.setItem(i, JSON.stringify(e));
              }),
              (this.saveColor = () => {
                const t = this.color.hex();
                if (this.savedColors.indexOf(t) > -1) return;
                const e = [...this.savedColors, t];
                this.savedColors = e;
                const i = `calcite-color-${this.storageId}`;
                this.storageId && localStorage.setItem(i, JSON.stringify(e));
              }),
              (this.drawColorFieldAndSlider = (function (t, e, i) {
                var a = !0,
                  r = !0;
                return (
                  li(i) &&
                    ((a = 'leading' in i ? !!i.leading : a),
                    (r = 'trailing' in i ? !!i.trailing : r)),
                  (function (t, e, i) {
                    var a,
                      r,
                      n,
                      o,
                      s,
                      l,
                      c = 0,
                      h = !1,
                      u = !1,
                      d = !0;
                    if ('function' != typeof t) throw new TypeError('Expected a function');
                    function p(e) {
                      var i = a,
                        n = r;
                      return (a = r = void 0), (c = e), (o = t.apply(n, i));
                    }
                    function m(t) {
                      return (c = t), (s = setTimeout(b, e)), h ? p(t) : o;
                    }
                    function f(t) {
                      var i = t - l;
                      return void 0 === l || i >= e || i < 0 || (u && t - c >= n);
                    }
                    function b() {
                      var t = ki();
                      if (f(t)) return g(t);
                      s = setTimeout(
                        b,
                        (function (t) {
                          var i = e - (t - l);
                          return u ? Si(i, n - (t - c)) : i;
                        })(t),
                      );
                    }
                    function g(t) {
                      return (s = void 0), d && a ? p(t) : ((a = r = void 0), o);
                    }
                    function v() {
                      var t = ki(),
                        i = f(t);
                      if (((a = arguments), (r = this), (l = t), i)) {
                        if (void 0 === s) return m(l);
                        if (u) return clearTimeout(s), (s = setTimeout(b, e)), p(l);
                      }
                      return void 0 === s && (s = setTimeout(b, e)), o;
                    }
                    return (
                      (e = pi(e) || 0),
                      li(i) &&
                        ((h = !!i.leading),
                        (n = (u = 'maxWait' in i) ? _i(pi(i.maxWait) || 0, e) : n),
                        (d = 'trailing' in i ? !!i.trailing : d)),
                      (v.cancel = function () {
                        void 0 !== s && clearTimeout(s), (c = 0), (a = l = r = s = void 0);
                      }),
                      (v.flush = function () {
                        return void 0 === s ? o : g(ki());
                      }),
                      v
                    );
                  })(t, 16, { leading: a, maxWait: 16, trailing: r })
                );
              })(() => {
                this.fieldAndSliderRenderingContext &&
                  (this.drawColorField(), this.drawHueSlider());
              })),
              (this.captureColorFieldColor = (t, e, i = !0) => {
                const {
                    dimensions: {
                      colorField: { height: a, width: r },
                    },
                  } = this,
                  n = Math.round((Be.s / r) * t),
                  o = Math.round((Be.v / a) * (a - e));
                this.internalColorSet(this.baseColorFieldColor.hsv().saturationv(n).value(o), i);
              }),
              (this.initColorFieldAndSlider = (t) => {
                (this.fieldAndSliderRenderingContext = t.getContext('2d')),
                  this.setCanvasContextSize(t, {
                    width: this.dimensions.colorField.width,
                    height:
                      this.dimensions.colorField.height +
                      this.dimensions.slider.height +
                      2 * this.getSliderCapSpacing(),
                  }),
                  this.drawColorFieldAndSlider();
              });
          }
          handleColorChange(t, e) {
            this.drawColorFieldAndSlider(),
              this.updateChannelsFromColor(t),
              (this.previousColor = e),
              this.colorUpdateLocked || (this.value = this.toValue(t));
          }
          handleFormatChange(t) {
            (this.mode = 'auto' === t ? this.mode : t), (this.value = this.toValue(this.color));
          }
          handleScaleChange(t = 'm') {
            this.updateDimensions(t);
          }
          handleValueChange(t, e) {
            const { allowEmpty: i, format: a } = this;
            let r = !1;
            if (!i || t) {
              const i = (function (t) {
                if ('string' == typeof t) {
                  if (t.startsWith('#')) {
                    const { length: e } = t;
                    if (4 === e || 7 === e) return 'hex';
                    if (5 === e || 9 === e) return 'hexa';
                  }
                  if (t.startsWith('rgba(')) return 'rgba-css';
                  if (t.startsWith('rgb(')) return 'rgb-css';
                  if (t.startsWith('hsl(')) return 'hsl-css';
                  if (t.startsWith('hsla(')) return 'hsla-css';
                }
                if ('object' == typeof t) {
                  if (pe(t, 'r', 'g', 'b')) return pe(t, 'a') ? 'rgba' : 'rgb';
                  if (pe(t, 'h', 's', 'l')) return pe(t, 'a') ? 'hsla' : 'hsl';
                  if (pe(t, 'h', 's', 'v')) return pe(t, 'a') ? 'hsva' : 'hsv';
                }
                return null;
              })(t);
              if (!i || ('auto' !== a && i !== a))
                return console.warn(`ignoring invalid color value: ${t}`), void (this.value = e);
              (r = this.mode !== i), (this.mode = i);
            }
            if (this.colorUpdateLocked) return void this.calciteColorPickerChange.emit();
            const n = i && !t ? null : Pe(t),
              o = !me(n, this.color);
            (r || o) && ((this.color = n), this.calciteColorPickerChange.emit());
          }
          get baseColorFieldColor() {
            return this.color || this.previousColor || Ve;
          }
          handleChannelKeyUpOrDown(t) {
            this.shiftKeyChannelAdjustment = 0;
            const e = qt(t.key);
            if (
              ('ArrowUp' !== e && 'ArrowDown' !== e) ||
              !t.composedPath().some((t) => {
                var e;
                return null === (e = t.classList) || void 0 === e ? void 0 : e.contains(ze);
              })
            )
              return;
            const { shiftKey: i } = t;
            if ((t.preventDefault(), !this.color))
              return this.internalColorSet(this.previousColor), void t.stopPropagation();
            this.shiftKeyChannelAdjustment =
              'ArrowUp' === e && i ? 9 : 'ArrowDown' === e && i ? -9 : 0;
          }
          async setFocus() {
            Qt(this.hexInputNode);
          }
          componentWillLoad() {
            const t = `calcite-color-${this.storageId}`;
            this.storageId &&
              localStorage.getItem(t) &&
              (this.savedColors = JSON.parse(localStorage.getItem(t)));
          }
          connectedCallback() {
            const { color: t, format: e, value: i } = this,
              a = 'auto' !== e ? this.toValue(t, e) : Ci,
              r = 'auto' !== e && i === Ci ? a : i;
            this.handleValueChange(r, a), this.updateDimensions(this.scale);
          }
          disconnectedCallback() {
            document.removeEventListener('mousemove', this.globalMouseMoveHandler),
              document.removeEventListener('mouseup', this.globalMouseUpHandler);
          }
          render() {
            const {
                allowEmpty: t,
                color: e,
                intlDeleteColor: i,
                el: a,
                hideHex: r,
                hideChannels: n,
                hideSaved: o,
                intlHex: s,
                intlSaved: l,
                intlSaveColor: c,
                savedColors: h,
                scale: u,
              } = this,
              d = e ? e.hex() : null,
              p = 's' !== u ? 'm' : u,
              {
                colorFieldAndSliderInteractive: m,
                colorFieldScopeTop: f,
                colorFieldScopeLeft: b,
                hueScopeLeft: g,
                hueScopeTop: v,
                scopeOrientation: y,
                dimensions: {
                  colorField: { height: w, width: x },
                  slider: { height: k },
                },
              } = this,
              _ = v || k / 2 + w,
              S = g || (x * Ve.hue()) / Be.h,
              D = Kt(a),
              C = null === e,
              T = 'vertical' === y;
            return K(
              'div',
              { class: 'container' },
              K(
                'div',
                { class: 'color-field-and-slider-wrap' },
                K('canvas', {
                  class: { 'color-field-and-slider': !0, 'color-field-and-slider--interactive': m },
                  onMouseDown: this.handleColorFieldAndSliderMouseDown,
                  onMouseEnter: this.handleColorFieldAndSliderMouseEnterOrMove,
                  onMouseLeave: this.handleColorFieldAndSliderMouseLeave,
                  onMouseMove: this.handleColorFieldAndSliderMouseEnterOrMove,
                  ref: this.initColorFieldAndSlider,
                }),
                K('div', {
                  'aria-label': T ? this.intlValue : this.intlSaturation,
                  'aria-valuemax': T ? Be.v : Be.s,
                  'aria-valuemin': '0',
                  'aria-valuenow':
                    (T ? (null == e ? void 0 : e.saturationv()) : null == e ? void 0 : e.value()) ||
                    '0',
                  class: je,
                  onKeyDown: this.handleColorFieldScopeKeyDown,
                  role: 'slider',
                  style: { top: `${f || 0}px`, left: `${b || 0}px` },
                  tabindex: '0',
                }),
                K('div', {
                  'aria-label': this.intlHue,
                  'aria-valuemax': Be.h,
                  'aria-valuemin': '0',
                  'aria-valuenow': (null == e ? void 0 : e.round().hue()) || Ve.round().hue(),
                  class: je,
                  onKeyDown: this.handleHueScopeKeyDown,
                  role: 'slider',
                  style: { top: `${_}px`, left: `${S}px` },
                  tabindex: '0',
                }),
              ),
              r && n
                ? null
                : K(
                    'div',
                    { class: { 'control-section': !0, [Le]: !0 } },
                    r
                      ? null
                      : K(
                          'div',
                          { class: 'color-hex-options' },
                          K(
                            'span',
                            { class: { [He]: !0, 'header--hex': !0, 'header--underlined': !0 } },
                            s,
                          ),
                          K('calcite-color-picker-hex-input', {
                            allowEmpty: t,
                            class: Fe,
                            dir: D,
                            onCalciteColorPickerHexInputChange: this.handleHexInputChange,
                            ref: this.storeHexInputRef,
                            scale: p,
                            value: d,
                          }),
                        ),
                    n
                      ? null
                      : K(
                          'calcite-tabs',
                          { class: { 'color-mode-container': !0, 'section--split': !0 }, dir: D },
                          K(
                            'calcite-tab-nav',
                            { slot: 'tab-nav' },
                            this.renderChannelsTabTitle('rgb'),
                            this.renderChannelsTabTitle('hsv'),
                          ),
                          this.renderChannelsTab('rgb'),
                          this.renderChannelsTab('hsv'),
                        ),
                  ),
              o
                ? null
                : K(
                    'div',
                    { class: { 'saved-colors-section': !0, [Le]: !0 } },
                    K(
                      'div',
                      { class: He },
                      K('label', null, l),
                      K(
                        'div',
                        { class: 'saved-colors-buttons' },
                        K('calcite-button', {
                          appearance: 'transparent',
                          'aria-label': i,
                          class: 'delete-color',
                          color: 'neutral',
                          disabled: C,
                          iconStart: 'minus',
                          onClick: this.deleteColor,
                          scale: u,
                        }),
                        K('calcite-button', {
                          appearance: 'transparent',
                          'aria-label': c,
                          class: 'save-color',
                          color: 'neutral',
                          disabled: C,
                          iconStart: 'plus',
                          onClick: this.saveColor,
                          scale: u,
                        }),
                      ),
                    ),
                    h.length > 0
                      ? K('div', { class: 'saved-colors' }, [
                          ...h.map((t) =>
                            K('calcite-color-picker-swatch', {
                              active: d === t,
                              class: 'saved-color',
                              color: t,
                              key: t,
                              onClick: this.handleSavedColorSelect,
                              onKeyDown: this.handleSavedColorKeyDown,
                              scale: u,
                              tabIndex: 0,
                            }),
                          ),
                        ])
                      : null,
                  ),
            );
          }
          captureHueSliderColor(t) {
            const {
                dimensions: {
                  slider: { width: e },
                },
              } = this,
              i = (360 / e) * t;
            this.internalColorSet(this.baseColorFieldColor.hue(i), !1);
          }
          getCanvasRegion(t) {
            const {
              dimensions: {
                colorField: { height: e },
                slider: { height: i },
              },
            } = this;
            return t <= e ? 'color-field' : t <= e + i ? 'slider' : 'none';
          }
          internalColorSet(t, e = !0) {
            (e && me(t, this.color)) ||
              ((this.colorUpdateLocked = !0),
              (this.color = t),
              (this.value = this.toValue(t)),
              (this.colorUpdateLocked = !1));
          }
          toValue(t, e = this.mode) {
            if (!t) return null;
            if (e.includes('hex')) return ue(t.round().hex());
            if (e.includes('-css'))
              return t[e.replace('-css', '').replace('a', '')]().round().string();
            const i = t[e]().round().object();
            return e.endsWith('a') && ((i.a = i.alpha), delete i.alpha), i;
          }
          getSliderCapSpacing() {
            const {
              dimensions: {
                slider: { height: t },
                thumb: { radius: e },
              },
            } = this;
            return 2 * e - t;
          }
          updateDimensions(t = 'm') {
            this.dimensions = We[t];
          }
          drawColorField() {
            const t = this.fieldAndSliderRenderingContext,
              {
                dimensions: {
                  colorField: { height: e, width: i },
                },
              } = this;
            (t.fillStyle = this.baseColorFieldColor.hsv().saturationv(100).value(100).string()),
              t.fillRect(0, 0, i, e);
            const a = t.createLinearGradient(0, 0, i, 0);
            a.addColorStop(0, 'rgba(255,255,255,1)'),
              a.addColorStop(1, 'rgba(255,255,255,0)'),
              (t.fillStyle = a),
              t.fillRect(0, 0, i, e);
            const r = t.createLinearGradient(0, 0, 0, e);
            r.addColorStop(0, 'rgba(0,0,0,0)'),
              r.addColorStop(1, 'rgba(0,0,0,1)'),
              (t.fillStyle = r),
              t.fillRect(0, 0, i, e),
              this.drawActiveColorFieldColor();
          }
          setCanvasContextSize(t, { height: e, width: i }) {
            const a = window.devicePixelRatio || 1;
            (t.width = i * a),
              (t.height = e * a),
              (t.style.height = `${e}px`),
              (t.style.width = `${i}px`),
              t.getContext('2d').scale(a, a);
          }
          containsPoint(t, e, i, a, r) {
            return Math.pow(t - i, 2) + Math.pow(e - a, 2) <= Math.pow(r, 2);
          }
          drawActiveColorFieldColor() {
            const { color: t } = this;
            if (!t) return;
            const e = t.hsv(),
              {
                dimensions: {
                  colorField: { height: i, width: a },
                  thumb: { radius: r },
                },
              } = this,
              n = e.saturationv() / (Be.s / a),
              o = i - e.value() / (Be.v / i);
            requestAnimationFrame(() => {
              (this.colorFieldScopeLeft = n), (this.colorFieldScopeTop = o);
            }),
              this.drawThumb(this.fieldAndSliderRenderingContext, r, n, o, e, this.hueThumbState);
          }
          drawThumb(t, e, i, a, r, n) {
            const o = 2 * Math.PI;
            t.beginPath(),
              t.arc(i, a, e, 0, o),
              (t.shadowBlur = 'hover' === n ? 32 : 16),
              (t.shadowColor = `rgba(0, 0, 0, ${'drag' === n ? 0.32 : 0.16})`),
              (t.fillStyle = '#fff'),
              t.fill(),
              t.beginPath(),
              t.arc(i, a, e - 3, 0, o),
              (t.shadowBlur = 0),
              (t.shadowColor = 'transparent'),
              (t.fillStyle = r.rgb().string()),
              t.fill();
          }
          drawActiveHueSliderColor() {
            const { color: t } = this;
            if (!t) return;
            const e = t.hsv().saturationv(100).value(100),
              {
                dimensions: {
                  colorField: { height: i },
                  slider: { height: a, width: r },
                  thumb: { radius: n },
                },
              } = this,
              o = e.hue() / (360 / r),
              s = a / 2 + i;
            requestAnimationFrame(() => {
              (this.hueScopeLeft = o), (this.hueScopeTop = s);
            }),
              this.drawThumb(
                this.fieldAndSliderRenderingContext,
                n,
                o,
                s,
                e,
                this.sliderThumbState,
              );
          }
          drawHueSlider() {
            const t = this.fieldAndSliderRenderingContext,
              {
                dimensions: {
                  colorField: { height: e },
                  slider: { height: i, width: a },
                },
              } = this,
              r = t.createLinearGradient(0, 0, a, 0),
              n = ['red', 'yellow', 'lime', 'cyan', 'blue', 'magenta', 'red'],
              o = 1 / (n.length - 1);
            let s = 0;
            n.forEach((t) => {
              r.addColorStop(s, Pe(t).string()), (s += o);
            }),
              (t.fillStyle = r),
              t.clearRect(0, e, a, i + 2 * this.getSliderCapSpacing()),
              t.fillRect(0, e, a, i),
              this.drawActiveHueSliderColor();
          }
          updateColorFromChannels(t) {
            this.internalColorSet(Pe(t, this.channelMode));
          }
          updateChannelsFromColor(t) {
            this.channels = t ? this.toChannels(t) : [null, null, null];
          }
          toChannels(t) {
            const { channelMode: e } = this;
            return t[e]()
              .array()
              .map((t) => Math.floor(t));
          }
          get el() {
            return this;
          }
          static get watchers() {
            return {
              color: ['handleColorChange'],
              format: ['handleFormatChange'],
              scale: ['handleScaleChange'],
              value: ['handleValueChange'],
            };
          }
          static get style() {
            return '@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host([scale=s]) .container{width:156px}:host([scale=s]) .saved-colors{grid-template-columns:repeat(auto-fill, minmax(20px, 1fr))}:host([scale=s]) .channels{-ms-flex-direction:column;flex-direction:column}:host([scale=s]) .channel{width:100%;margin-bottom:4px}:host([scale=s]) .channel:last-child{margin-bottom:0}:host([scale=m]) .container{width:272px}:host([scale=l][dir=rtl]) .control-section>:nth-child(2){margin-left:0;margin-right:12px}:host([scale=l]) .container{width:420px}:host([scale=l]) .color-field-and-slider{margin-bottom:-20px}:host([scale=l]) .section{padding:0 16px 16px}:host([scale=l]) .section:first-of-type{padding-top:16px}:host([scale=l]) .saved-colors{grid-template-columns:repeat(auto-fill, minmax(28px, 1fr));grid-gap:12px;padding-top:16px}:host([scale=l]) .control-section{-ms-flex-wrap:nowrap;flex-wrap:nowrap}:host([scale=l]) .control-section>:nth-child(2){margin-left:12px}:host([scale=l]) .color-hex-options{-ms-flex-negative:1;flex-shrink:1}:host([scale=l]) .color-mode-container{-ms-flex-negative:3;flex-shrink:3}:host([appearance=minimal]) .container{border:none}.container{background-color:var(--calcite-ui-foreground-1);display:inline-block;border:1px solid var(--calcite-ui-border-1)}.color-field-and-slider-wrap{position:relative}.scope{font-size:var(--calcite-font-size--1);padding:0;margin-bottom:0;margin-right:0;outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;width:0.5rem;height:0.5rem;position:absolute;pointer-events:none;margin-top:-0.25rem;margin-left:-0.25rem;outline-offset:10px}.scope:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:2px;outline-offset:12px}.color-field-and-slider{margin-bottom:-16px}.color-field-and-slider--interactive{cursor:pointer}.control-section{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap}.section{padding:0 12px 12px}.section:first-of-type{padding-top:12px}.color-hex-options,.section--split{-ms-flex-positive:1;flex-grow:1}.header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;color:var(--calcite-ui-text-3);font-weight:500;font-size:0.875rem;line-height:1.5}.header.header--underlined{border-bottom:1px solid var(--calcite-ui-border-1)}.header--hex{line-height:1.5;font-size:0.875rem;line-height:1.5;padding:12px 0 15px}.control{margin-top:8px}.channels{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.channel{width:31%}.saved-colors{padding-top:12px;display:-ms-grid;display:grid;grid-template-columns:repeat(auto-fill, minmax(24px, 1fr));grid-gap:8px;width:100%}.saved-colors-buttons{display:-ms-flexbox;display:flex}.saved-color{outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;cursor:pointer}.saved-color:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}.saved-color:hover{-webkit-transition:outline-color 100ms ease-in-out;transition:outline-color 100ms ease-in-out;outline:2px solid var(--calcite-ui-border-2);outline-offset:2px}';
          }
        },
        $i = Pe(),
        Ii = class extends HTMLElement {
          constructor() {
            super(),
              this.__registerHost(),
              At(this),
              (this.calciteColorPickerHexInputChange = yt(
                this,
                'calciteColorPickerHexInputChange',
                7,
              )),
              (this.allowEmpty = !1),
              (this.intlHex = 'Hex'),
              (this.intlNoColor = qe),
              (this.scale = 'm'),
              (this.value = ue($i.hex())),
              (this.onCalciteInputBlur = (t) => {
                const e = t.currentTarget,
                  i = e.value,
                  a = `#${i}`;
                (this.allowEmpty && !i) ||
                  (le(a) && he(a)) ||
                  (e.value =
                    this.allowEmpty && !this.internalColor
                      ? ''
                      : this.formatForInternalInput(re(this.internalColor.object())));
              }),
              (this.onInputChange = (t) => {
                const e = t.currentTarget.value;
                let i;
                if (e) {
                  const t = e;
                  if (!de(`#${t}`)) return;
                  i = ue(t);
                } else this.allowEmpty && (i = null);
                (this.value = i), this.calciteColorPickerHexInputChange.emit();
              }),
              (this.internalColor = $i),
              (this.previousNonNullValue = this.value),
              (this.storeInputRef = (t) => {
                this.inputNode = t;
              });
          }
          connectedCallback() {
            const { allowEmpty: t, value: e } = this;
            if (e) {
              const t = ue(e);
              le(t) && ((this.internalColor = Pe(t)), (this.value = t));
            } else t && ((this.internalColor = null), (this.value = null));
          }
          handleValueChange(t, e) {
            if (t) {
              const e = ue(t);
              if (le(e)) {
                const { internalColor: t } = this,
                  i = !t || e !== ue(t.hex());
                return (
                  (this.internalColor = Pe(e)),
                  (this.previousNonNullValue = e),
                  (this.value = e),
                  void (i && this.calciteColorPickerHexInputChange.emit())
                );
              }
            } else if (this.allowEmpty)
              return (
                (this.internalColor = null),
                (this.value = null),
                void this.calciteColorPickerHexInputChange.emit()
              );
            this.value = e;
          }
          onInputKeyDown(t) {
            const { altKey: e, ctrlKey: i, metaKey: a, shiftKey: r } = t,
              { el: n, inputNode: o, internalColor: s, value: l } = this,
              c = qt(t.key);
            if ('ArrowDown' === c || 'ArrowUp' === c) {
              if (!l) return (this.value = this.previousNonNullValue), void t.preventDefault();
              const e = 'ArrowUp' === c ? 1 : -1,
                i = r ? 10 : 1;
              return (
                (this.value = ue(this.nudgeRGBChannels(s, i * e).hex())), void t.preventDefault()
              );
            }
            const h = e || i || a,
              u = o.value.length >= 6,
              d = n.shadowRoot.activeElement,
              p = d.selectionStart != d.selectionEnd,
              m = 1 === c.length,
              f = ne.test(c);
            !m || h || (f && (p || !u)) || t.preventDefault();
          }
          render() {
            const { el: t, intlHex: e, value: i } = this,
              a = this.formatForInternalInput(i),
              r = Kt(t);
            return K(
              'div',
              { class: 'container' },
              K('calcite-input', {
                'aria-label': e,
                class: 'input',
                dir: r,
                onCalciteInputBlur: this.onCalciteInputBlur,
                onChange: this.onInputChange,
                prefixText: '#',
                ref: this.storeInputRef,
                scale: 's',
                value: a,
              }),
              a
                ? K('calcite-color-picker-swatch', {
                    active: !0,
                    class: 'preview',
                    color: `#${a}`,
                    scale: 's',
                  })
                : null,
            );
          }
          async setFocus() {
            Qt(this.inputNode);
          }
          formatForInternalInput(t) {
            return t ? t.replace('#', '') : '';
          }
          nudgeRGBChannels(t, e) {
            return Pe.rgb(t.array().map((t) => t + e));
          }
          get el() {
            return this;
          }
          static get watchers() {
            return { value: ['handleValueChange'] };
          }
          static get style() {
            return '@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host{display:block}.container{width:100%;display:inline-grid;-ms-flex-align:center;align-items:center;grid-template-columns:1fr auto}.preview{grid-column:2/3;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;pointer-events:none;margin-top:0;margin-bottom:0;margin-left:0.25rem;margin-right:0.25rem;z-index:1}.preview,.input{grid-row:1}.input{grid-column:1/3;text-transform:uppercase;width:100%}';
          }
        },
        Ai = class extends HTMLElement {
          constructor() {
            super(), this.__registerHost(), At(this), (this.active = !1), (this.scale = 'm');
          }
          handleColorChange(t) {
            this.internalColor = Pe(t);
          }
          componentWillLoad() {
            this.handleColorChange(this.color);
          }
          render() {
            const { active: t, el: e, internalColor: i } = this,
              a = t ? '100%' : '0',
              r = i.hex(),
              n =
                'light' ===
                (function (t) {
                  return Jt('.calcite-theme-dark', t) ? 'dark' : 'light';
                })(e)
                  ? 'rgba(0, 0, 0, 0.15)'
                  : 'rgba(255, 255, 255, 0.15)';
            return K(
              'svg',
              { class: 'swatch', xmlns: 'http://www.w3.org/2000/svg' },
              K('title', null, r),
              K('rect', {
                fill: r,
                height: '100%',
                id: 'swatch',
                rx: a,
                stroke: n,
                'stroke-width': '2',
                style: { 'clip-path': `inset(0 round ${a})` },
                width: '100%',
              }),
            );
          }
          get el() {
            return this;
          }
          static get watchers() {
            return { color: ['handleColorChange'] };
          }
          static get style() {
            return '@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host{display:-ms-inline-flexbox;display:inline-flex;position:relative}:host([scale=s]){height:1.25rem;width:1.25rem}:host([scale=m]){height:1.5rem;width:1.5rem}:host([scale=l]){height:2rem;width:2rem}.swatch{overflow:visible;height:inherit;width:inherit}.swatch rect{-webkit-transition-property:all;transition-property:all;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.no-color-icon{height:100%;width:100%;top:0;right:0;bottom:0;left:0;position:absolute}';
          }
        };
      function Ei(t) {
        return new Intl.NumberFormat(t, { minimumFractionDigits: 0, maximumFractionDigits: 20 });
      }
      function Oi(t, e) {
        if (t) {
          const i = Ri(e),
            a = Ni(e),
            r = t.split(''),
            n = r.lastIndexOf(a),
            o = r
              .map((t, e) => (t === i || (t === a && e !== n) ? '' : t))
              .reduce((t, e) => t + e)
              .replace(a, '.');
          return isNaN(Number(o)) ? t : o;
        }
        return t;
      }
      function Ri(t) {
        const e = Ei(t)
          .formatToParts(1234567.8)
          .find((t) => 'group' === t.type).value;
        return 0 === e.trim().length ? ' ' : e;
      }
      function Ni(t) {
        const e = Ei(t)
          .formatToParts(1234567.8)
          .find((t) => 'decimal' === t.type).value;
        return 0 === e.trim().length ? ' ' : e;
      }
      function Mi(t, e, i = !1) {
        if (t) {
          const a = Number(Pi(t));
          if (!isNaN(a))
            return Ei(e)
              .formatToParts(a)
              .map(({ type: t, value: a }) => {
                switch (t) {
                  case 'group':
                    return i ? Ri(e) : '';
                  case 'decimal':
                    return Ni(e);
                  default:
                    return a;
                }
              })
              .reduce((t, e) => t + e);
        }
        return t;
      }
      function Pi(t) {
        return (null == t ? void 0 : t.endsWith('.')) ? t.replace('.', '') : t;
      }
      function Li(t) {
        return t < 0 ? -1 : 1;
      }
      function Hi(t, e, i) {
        const a = e[0] - t[0],
          r = e[1] - t[1];
        return a ? ((3 * r) / a - i) / 2 : i;
      }
      function Fi(t, e, i, a, r) {
        const [n, o] = t,
          [s, l] = e,
          c = (s - n) / 3;
        return `C ${r([n + c, o + c * i]).join(',')} ${r([s - c, l - c * a]).join(',')} ${r([
          s,
          l,
        ]).join(',')}`;
      }
      const zi = class extends HTMLElement {
          constructor() {
            super(),
              this.__registerHost(),
              (this.data = []),
              (this.width = 300),
              (this.height = 100),
              (this.maskId = `calcite-graph-mask-${Xt()}`);
          }
          render() {
            const { data: t, width: e, height: i, highlightMax: a, highlightMin: r } = this,
              n = this.maskId;
            if (!t || 0 === t.length)
              return K('svg', {
                class: 'svg',
                height: i,
                preserveAspectRatio: 'none',
                viewBox: `0 0 ${e} ${i}`,
                width: e,
              });
            const { min: o, max: s } = (function (t) {
                const [e, i] = t[0],
                  a = [e, i],
                  r = [e, i];
                return t.reduce(
                  ({ min: t, max: e }, [i, a]) => ({
                    min: [Math.min(t[0], i), Math.min(t[1], a)],
                    max: [Math.max(e[0], i), Math.max(e[1], a)],
                  }),
                  { min: a, max: r },
                );
              })(t),
              l = (function ({ width: t, height: e, min: i, max: a }) {
                const r = a[0] - i[0],
                  n = a[1] - i[1];
                return (i) => [(i[0] / r) * t, e - (i[1] / n) * e];
              })({ min: o, max: s, width: e, height: i }),
              [c] = l([r, s[1]]),
              [h] = l([a, s[1]]),
              u = (function ({ data: t, min: e, max: i, t: a }) {
                if (0 === t.length) return '';
                const [r, n] = a(t[0]),
                  [o, s] = a(e),
                  [l] = a(i);
                let c, h, u;
                const d = t.reduce((e, i, r) => {
                    if (((h = t[r - 2]), (u = t[r - 1]), r > 1)) {
                      const t = (function (t, e, i) {
                          const a = e[0] - t[0],
                            r = i[0] - e[0],
                            n = (e[1] - t[1]) / (a || (r < 0 && 0)),
                            o = (i[1] - e[1]) / (r || (a < 0 && 0)),
                            s = (n * r + o * a) / (a + r);
                          return (
                            (Li(n) + Li(o)) *
                              Math.min(Math.abs(n), Math.abs(o), 0.5 * Math.abs(s)) || 0
                          );
                        })(h, u, i),
                        r = void 0 === c ? Hi(h, u, t) : c,
                        n = Fi(h, u, r, t, a);
                      return (c = t), `${e} ${n}`;
                    }
                    return e;
                  }, `M ${o},${s} L ${o},${n} L ${r},${n}`),
                  p = t[t.length - 1];
                return `${d} ${Fi(u, p, c, Hi(u, p, c), a)} L ${l},${s} Z`;
              })({ data: t, min: o, max: s, t: l });
            return K(
              'svg',
              {
                class: 'svg',
                height: i,
                preserveAspectRatio: 'none',
                viewBox: `0 0 ${e} ${i}`,
                width: e,
              },
              void 0 !== r
                ? K(
                    'svg',
                    {
                      class: 'svg',
                      height: i,
                      preserveAspectRatio: 'none',
                      viewBox: `0 0 ${e} ${i}`,
                      width: e,
                    },
                    K(
                      'mask',
                      { height: '100%', id: `${n}1`, width: '100%', x: '0%', y: '0%' },
                      K('path', {
                        d: `\n              M 0,0\n              L ${c - 1},0\n              L ${
                          c - 1
                        },${i}\n              L 0,${i}\n              Z\n            `,
                        fill: 'white',
                      }),
                    ),
                    K(
                      'mask',
                      { height: '100%', id: `${n}2`, width: '100%', x: '0%', y: '0%' },
                      K('path', {
                        d: `\n              M ${c + 1},0\n              L ${
                          h - 1
                        },0\n              L ${h - 1},${i}\n              L ${
                          c + 1
                        }, ${i}\n              Z\n            `,
                        fill: 'white',
                      }),
                    ),
                    K(
                      'mask',
                      { height: '100%', id: `${n}3`, width: '100%', x: '0%', y: '0%' },
                      K('path', {
                        d: `\n                  M ${
                          h + 1
                        },0\n                  L ${e},0\n                  L ${e},${i}\n                  L ${
                          h + 1
                        }, ${i}\n                  Z\n                `,
                        fill: 'white',
                      }),
                    ),
                    K('path', { class: 'graph-path', d: u, mask: `url(#${n}1)` }),
                    K('path', { class: 'graph-path--highlight', d: u, mask: `url(#${n}2)` }),
                    K('path', { class: 'graph-path', d: u, mask: `url(#${n}3)` }),
                  )
                : K('path', { class: 'graph-path', d: u }),
            );
          }
          get el() {
            return this;
          }
          static get style() {
            return '@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}.svg{fill:currentColor;stroke:transparent;margin:0;padding:0;display:block}';
          }
        },
        ji = {},
        Vi = {},
        Ui = { s: 16, m: 24, l: 32 },
        Bi = class extends HTMLElement {
          constructor() {
            super(),
              this.__registerHost(),
              At(this),
              (this.icon = null),
              (this.flipRtl = !1),
              (this.scale = 'm'),
              (this.visible = !1);
          }
          connectedCallback() {
            this.waitUntilVisible(() => {
              (this.visible = !0), this.loadIconPathData();
            });
          }
          disconnectedCallback() {
            this.intersectionObserver &&
              (this.intersectionObserver.disconnect(), (this.intersectionObserver = null));
          }
          async componentWillLoad() {
            this.loadIconPathData();
          }
          render() {
            const { el: t, flipRtl: e, pathData: i, scale: a, textLabel: r } = this,
              n = Kt(t),
              o = Ui[a],
              s = !!r,
              l = [].concat(i || '');
            return K(
              J,
              {
                'aria-hidden': (!s).toString(),
                'aria-label': s ? r : null,
                role: s ? 'img' : null,
              },
              K(
                'svg',
                {
                  class: { 'flip-rtl': 'rtl' === n && e, svg: !0 },
                  fill: 'currentColor',
                  height: '100%',
                  viewBox: `0 0 ${o} ${o}`,
                  width: '100%',
                  xmlns: 'http://www.w3.org/2000/svg',
                },
                l.map((t) =>
                  K(
                    'path',
                    'string' == typeof t
                      ? { d: t }
                      : { d: t.d, opacity: 'opacity' in t ? t.opacity : 1 },
                  ),
                ),
              ),
            );
          }
          async loadIconPathData() {
            const { icon: t, scale: e, visible: i } = this;
            t &&
              i &&
              (this.pathData = await (async function ({ icon: t, scale: e }) {
                const i = Ui[e],
                  a = (function (t) {
                    const e = !isNaN(Number(t.charAt(0))),
                      i = t.split('-');
                    return 1 === i.length
                      ? e
                        ? `i${t}`
                        : t
                      : i
                          .map((t, i) =>
                            0 === i
                              ? e
                                ? `i${t.toUpperCase()}`
                                : t
                              : t.charAt(0).toUpperCase() + t.slice(1),
                          )
                          .join('');
                  })(t),
                  r = 'F' === a.charAt(a.length - 1),
                  n = `${r ? a.substring(0, a.length - 1) : a}${i}${r ? 'F' : ''}`;
                if (ji[n]) return ji[n];
                Vi[n] ||
                  (Vi[n] = fetch(
                    ((t) => {
                      const e = new URL(t, F.$resourcesUrl$);
                      return e.origin !== L.location.origin ? e.href : e.pathname;
                    })(`./assets/calcite-icon/${n}.json`),
                  )
                    .then((t) => t.json())
                    .catch(
                      () => (console.error(`"${n}" is not a valid calcite-ui-icon name`), ''),
                    ));
                const o = await Vi[n];
                return (ji[n] = o), o;
              })({ icon: t, scale: e }));
          }
          waitUntilVisible(t) {
            'undefined' != typeof window && window.IntersectionObserver
              ? ((this.intersectionObserver = new IntersectionObserver(
                  (e) => {
                    e.forEach((e) => {
                      e.isIntersecting &&
                        (this.intersectionObserver.disconnect(),
                        (this.intersectionObserver = null),
                        t());
                    });
                  },
                  { rootMargin: '50px' },
                )),
                this.intersectionObserver.observe(this.el))
              : t();
          }
          static get assetsDirs() {
            return ['assets'];
          }
          get el() {
            return this;
          }
          static get watchers() {
            return { icon: ['loadIconPathData'], scale: ['loadIconPathData'] };
          }
          static get style() {
            return '@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host{display:-ms-inline-flexbox;display:inline-flex}:host([scale=s]){width:1rem;height:1rem;min-width:1rem;min-height:1rem}:host([scale=m]){width:1.5rem;height:1.5rem;min-width:1.5rem;min-height:1.5rem}:host([scale=l]){width:2rem;height:2rem;min-width:2rem;min-height:2rem}.flip-rtl{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.svg{display:block}';
          }
        },
        qi = {
          tel: 'phone',
          password: 'lock',
          email: 'email-address',
          date: 'calendar',
          time: 'clock',
          search: 'search',
        };
      function Wi(t) {
        return !(!t || isNaN(Number(t)));
      }
      const Gi = class extends HTMLElement {
        constructor() {
          super(),
            this.__registerHost(),
            (this.calciteInputFocus = yt(this, 'calciteInputFocus', 7)),
            (this.calciteInputBlur = yt(this, 'calciteInputBlur', 7)),
            (this.calciteInputInput = yt(this, 'calciteInputInput', 7)),
            (this.calciteInputChange = yt(this, 'calciteInputChange', 7)),
            (this.alignment = 'start'),
            (this.autofocus = !1),
            (this.groupSeparator = !1),
            (this.loading = !1),
            (this.locale = document.documentElement.lang || 'en'),
            (this.localeFormat = !1),
            (this.numberButtonType = 'vertical'),
            (this.required = !1),
            (this.scale = 'm'),
            (this.status = 'idle'),
            (this.type = 'text'),
            (this.value = ''),
            (this.childElType = 'input'),
            (this.localizedValue = Mi(this.value, this.locale, this.groupSeparator)),
            (this.clearInputValue = (t) => {
              this.setValue('', t, !0);
            }),
            (this.inputBlurHandler = () => {
              'number' === this.type && this.setLocalizedValue(this.value),
                this.calciteInputBlur.emit({ element: this.childEl, value: this.value }),
                this.preFocusValue !== this.value && this.calciteInputChange.emit();
            }),
            (this.inputFocusHandler = (t) => {
              t.target !== this.slottedActionEl && this.setFocus(),
                this.calciteInputFocus.emit({ element: this.childEl, value: this.value }),
                (this.preFocusValue = this.value);
            }),
            (this.inputInputHandler = (t) => {
              this.setValue(t.target.value, t);
            }),
            (this.inputKeyDownHandler = (t) => {
              'Enter' === t.key && this.calciteInputChange.emit();
            }),
            (this.inputNumberInputHandler = (t) => {
              const e = t.target.value,
                i = Oi(e, this.locale);
              'insertFromPaste' === t.inputType
                ? (Wi(i) || t.preventDefault(),
                  this.setValue(
                    (function (t) {
                      if (!t || ((e = t), !Wt.some((t) => e.includes(t)))) return null;
                      var e;
                      let i = !1;
                      const a = t
                        .split('')
                        .filter((t, e) =>
                          t.match(/\./g) && !i
                            ? ((i = !0), !0)
                            : !(!t.match(/\-/g) || 0 !== e) || Wt.includes(t),
                        )
                        .reduce((t, e) => t + e);
                      return Wi(a) ? Number(a).toString() : null;
                    })(i),
                    t,
                  ),
                  (this.childNumberEl.value = this.localizedValue))
                : this.setValue(Oi(e, this.locale), t);
            }),
            (this.inputNumberKeyDownHandler = (t) => {
              if ('number' !== this.type) return;
              if ('ArrowUp' === t.key) return void this.nudgeNumberValue('up', t);
              if ('ArrowDown' === t.key) return void this.nudgeNumberValue('down', t);
              const e = [
                ...Wt,
                'ArrowLeft',
                'ArrowRight',
                'Enter',
                'Backspace',
                'Escape',
                'Tab',
                '-',
              ];
              if (t.altKey || t.ctrlKey || t.metaKey) return;
              if (e.includes(t.key) && !t.shiftKey)
                return void ('Enter' === t.key && this.calciteInputChange.emit());
              const i = Ni(this.locale);
              if (t.key === i) {
                if (!this.value && !this.childNumberEl.value) return;
                if (this.value && -1 === this.childNumberEl.value.indexOf(i)) return;
              }
              t.preventDefault();
            }),
            (this.nudgeNumberValue = (t, e) => {
              var i, a;
              if ('number' !== this.type) return;
              const r =
                  (null ===
                    (a = null === (i = this.value) || void 0 === i ? void 0 : i.split('.')[1]) ||
                  void 0 === a
                    ? void 0
                    : a.length) || 0,
                n = this.maxString ? parseFloat(this.maxString) : null,
                o = this.minString ? parseFloat(this.minString) : null,
                s = 'any' === this.step ? 1 : Math.abs(this.step || 1);
              let l = this.value && '' !== this.value ? parseFloat(this.value) : 0,
                c = this.value;
              'up' === t && ((!n && 0 !== n) || l < n) && (c = (l += s).toFixed(r).toString()),
                'down' === t && ((!o && 0 !== o) || l > o) && (c = (l -= s).toFixed(r).toString()),
                this.setValue(c, e, !0);
            }),
            (this.numberButtonMouseDownHandler = (t) => {
              t.preventDefault();
              const e = t.target.dataset.adjustment;
              this.nudgeNumberValue(e, t);
            }),
            (this.reset = (t) => {
              'number' === this.type && t.preventDefault(), this.setValue(this.defaultValue, t);
            }),
            (this.setChildElRef = (t) => {
              this.childEl = t;
            }),
            (this.setChildNumberElRef = (t) => {
              this.childNumberEl = t;
            }),
            (this.setLocalizedValue = (t) => {
              this.localizedValue = Mi(t, this.locale, this.groupSeparator);
            }),
            (this.setValue = (t, e, i = !1) => {
              const a = this.value;
              if (
                ((this.value = 'number' === this.type ? Pi(t) : t),
                'number' === this.type && this.setLocalizedValue(this.value),
                e)
              ) {
                if ('number' === this.type && (null == t ? void 0 : t.endsWith('.'))) return;
                this.calciteInputInput.emit({ element: this.childEl, nativeEvent: e, value: t })
                  .defaultPrevented
                  ? ((this.value = a), this.setLocalizedValue(a))
                  : i && this.calciteInputChange.emit();
              }
            });
        }
        disabledWatcher() {
          this.setDisabledAction();
        }
        maxWatcher() {
          var t;
          this.maxString =
            (null === (t = this.max) || void 0 === t ? void 0 : t.toString()) || null;
        }
        minWatcher() {
          var t;
          this.minString =
            (null === (t = this.min) || void 0 === t ? void 0 : t.toString()) || null;
        }
        valueWatcher(t) {
          'number' === this.type && this.localizedValue !== Mi(t, this.locale)
            ? this.setLocalizedValue(t)
            : this.childEl && this.childEl.value !== t && (this.childEl.value = t);
        }
        updateRequestedIcon() {
          this.requestedIcon = ie(qi, this.icon, this.type);
        }
        get isClearable() {
          var t;
          return (
            !this.isTextarea &&
            (this.clearable || 'search' === this.type) &&
            (null === (t = this.value) || void 0 === t ? void 0 : t.length) > 0
          );
        }
        get isTextarea() {
          return 'textarea' === this.childElType;
        }
        connectedCallback() {
          var t;
          (this.form = this.el.closest('form')),
            null === (t = this.form) || void 0 === t || t.addEventListener('reset', this.reset),
            (this.scale = Zt(this.el, 'scale', this.scale)),
            (this.status = Zt(this.el, 'status', this.status)),
            (this.step = this.step || 'number' !== this.type ? this.step : 'any'),
            'number' !== this.type || Wi(this.value) || (this.value = null);
        }
        disconnectedCallback() {
          var t;
          null === (t = this.form) || void 0 === t || t.removeEventListener('reset', this.reset);
        }
        componentWillLoad() {
          var t, e;
          (this.childElType = 'textarea' === this.type ? 'textarea' : 'input'),
            (this.defaultValue = this.value),
            (this.maxString = null === (t = this.max) || void 0 === t ? void 0 : t.toString()),
            (this.minString = null === (e = this.min) || void 0 === e ? void 0 : e.toString()),
            (this.requestedIcon = ie(qi, this.icon, this.type));
        }
        componentDidLoad() {
          (this.slottedActionEl = this.el.querySelector('[slot=action]')),
            this.setDisabledAction(),
            'number' === this.type && this.childEl && (this.childEl.style.cssText = ge);
        }
        componentShouldUpdate(t, e, i) {
          return !('number' === this.type && 'value' === i && t && !Wi(t) && ((this.value = e), 1));
        }
        keyDownHandler(t) {
          this.isClearable &&
            'Escape' === qt(t.key) &&
            (this.clearInputValue(t), t.preventDefault());
        }
        async setFocus() {
          var t, e;
          'number' === this.type
            ? null === (t = this.childNumberEl) || void 0 === t || t.focus()
            : null === (e = this.childEl) || void 0 === e || e.focus();
        }
        setDisabledAction() {
          if (!this.slottedActionEl) return;
          const t = this.slottedActionEl;
          this.disabled ? t.setAttribute('disabled', '') : t.removeAttribute('disabled');
        }
        render() {
          const t = Kt(this.el),
            e = Yt(this.el, [
              'alignment',
              'dir',
              'clearable',
              'min',
              'max',
              'step',
              'value',
              'icon',
              'loading',
              'prefix-text',
              'scale',
              'status',
              'suffix-text',
              'number-button-type',
              'locale',
              'group-separator',
            ]),
            i = K(
              'div',
              { class: 'calcite-input-loading' },
              K('calcite-progress', { type: 'indeterminate' }),
            ),
            a = 's' === this.scale || 'm' === this.scale ? 's' : 'm',
            r = K(
              'button',
              {
                class: 'calcite-input-clear-button',
                disabled: this.loading,
                onClick: this.clearInputValue,
              },
              K('calcite-icon', { icon: 'x', scale: a }),
            ),
            n = K('calcite-icon', {
              class: 'calcite-input-icon',
              dir: t,
              flipRtl: this.iconFlipRtl,
              icon: this.requestedIcon,
              scale: a,
            }),
            o = 'horizontal' === this.numberButtonType ? 'number-button-item-horizontal' : null,
            s = K(
              'div',
              {
                class: `calcite-input-number-button-item ${o}`,
                'data-adjustment': 'up',
                onMouseDown: this.numberButtonMouseDownHandler,
              },
              K('calcite-icon', { icon: 'chevron-up', scale: a }),
            ),
            l = K(
              'div',
              {
                class: `calcite-input-number-button-item ${o}`,
                'data-adjustment': 'down',
                onMouseDown: this.numberButtonMouseDownHandler,
              },
              K('calcite-icon', { icon: 'chevron-down', scale: a }),
            ),
            c = K('div', { class: 'calcite-input-number-button-wrapper' }, s, l),
            h = K('div', { class: 'calcite-input-prefix' }, this.prefixText),
            u = K('div', { class: 'calcite-input-suffix' }, this.suffixText),
            d =
              'number' === this.type
                ? K(
                    'input',
                    Object.assign({}, e, {
                      autofocus: !!this.autofocus || null,
                      defaultValue: this.defaultValue,
                      disabled: !!this.disabled || null,
                      key: 'localized-input',
                      maxLength: this.maxLength,
                      minLength: this.minLength,
                      name: void 0,
                      onBlur: this.inputBlurHandler,
                      onFocus: this.inputFocusHandler,
                      onInput: this.inputNumberInputHandler,
                      onKeyDown: this.inputNumberKeyDownHandler,
                      placeholder: this.placeholder || '',
                      ref: this.setChildNumberElRef,
                      tabIndex: 0,
                      type: 'text',
                      value: this.localizedValue,
                    }),
                  )
                : null,
            p = [
              K(
                this.childElType,
                Object.assign({}, e, {
                  autofocus: !!this.autofocus || null,
                  defaultValue: this.defaultValue,
                  disabled: !!this.disabled || null,
                  max: this.maxString,
                  maxLength: this.maxLength,
                  min: this.minString,
                  minLength: this.minLength,
                  name: this.name,
                  onBlur: this.inputBlurHandler,
                  onFocus: this.inputFocusHandler,
                  onInput: this.inputInputHandler,
                  onKeyDown: this.inputKeyDownHandler,
                  placeholder: this.placeholder || '',
                  ref: this.setChildElRef,
                  required: !!this.required || null,
                  step: this.step,
                  tabIndex: this.disabled || 'number' === this.type ? -1 : null,
                  type: this.type,
                  value: this.value,
                }),
              ),
              this.isTextarea
                ? K(
                    'div',
                    { class: 'calcite-input-resize-icon-wrapper' },
                    K('calcite-icon', { icon: 'chevron-down', scale: 's' }),
                  )
                : null,
            ];
          return K(
            J,
            { onClick: this.inputFocusHandler },
            K(
              'div',
              { class: { 'calcite-input-wrapper': !0, [Gt]: 'rtl' === t }, dir: t },
              'number' === this.type && 'horizontal' === this.numberButtonType ? l : null,
              this.prefixText ? h : null,
              K(
                'div',
                { class: 'calcite-input-element-wrapper' },
                d,
                p,
                this.isClearable ? r : null,
                this.requestedIcon ? n : null,
                this.loading ? i : null,
              ),
              K('div', { class: 'calcite-action-wrapper' }, K('slot', { name: 'action' })),
              'number' === this.type && 'vertical' === this.numberButtonType ? c : null,
              this.suffixText ? u : null,
              'number' === this.type && 'horizontal' === this.numberButtonType ? s : null,
            ),
          );
        }
        get el() {
          return this;
        }
        static get watchers() {
          return {
            disabled: ['disabledWatcher'],
            max: ['maxWatcher'],
            min: ['minWatcher'],
            value: ['valueWatcher'],
            icon: ['updateRequestedIcon'],
            type: ['updateRequestedIcon'],
          };
        }
        static get style() {
          return '@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}.sc-calcite-input:root{--calcite-popper-transition:150ms ease-in-out}[hidden].sc-calcite-input-h{display:none}[scale=s].sc-calcite-input-h textarea.sc-calcite-input,[scale=s].sc-calcite-input-h input.sc-calcite-input,[scale=s].sc-calcite-input-h .calcite-input-prefix.sc-calcite-input,[scale=s].sc-calcite-input-h .calcite-input-suffix.sc-calcite-input{font-size:var(--calcite-font-size--2);padding:0.5rem;height:2rem}[scale=s].sc-calcite-input-h textarea.sc-calcite-input{min-height:32px}[scale=s].sc-calcite-input-h .calcite-input-number-button-wrapper.sc-calcite-input,[scale=s].sc-calcite-input-h .calcite-action-wrapper.sc-calcite-input calcite-button.sc-calcite-input,[scale=s].sc-calcite-input-h .calcite-action-wrapper.sc-calcite-input calcite-button.sc-calcite-input button.sc-calcite-input{height:2rem}[scale=s].sc-calcite-input-h textarea.sc-calcite-input,[scale=s].sc-calcite-input-h input[type=file].sc-calcite-input{height:auto}[scale=s].sc-calcite-input-h .calcite-input-clear-button.sc-calcite-input{min-height:32px;min-width:32px}[scale=m].sc-calcite-input-h textarea.sc-calcite-input,[scale=m].sc-calcite-input-h input.sc-calcite-input,[scale=m].sc-calcite-input-h .calcite-input-prefix.sc-calcite-input,[scale=m].sc-calcite-input-h .calcite-input-suffix.sc-calcite-input{font-size:var(--calcite-font-size--1);padding:0.75rem;height:44px}[scale=m].sc-calcite-input-h textarea.sc-calcite-input{min-height:44px}[scale=m].sc-calcite-input-h .calcite-input-number-button-wrapper.sc-calcite-input,[scale=m].sc-calcite-input-h .calcite-action-wrapper.sc-calcite-input calcite-button.sc-calcite-input,[scale=m].sc-calcite-input-h .calcite-action-wrapper.sc-calcite-input calcite-button.sc-calcite-input button.sc-calcite-input{height:44px}[scale=m].sc-calcite-input-h textarea.sc-calcite-input,[scale=m].sc-calcite-input-h input[type=file].sc-calcite-input{height:auto}[scale=m].sc-calcite-input-h .calcite-input-clear-button.sc-calcite-input{min-height:44px;min-width:44px}[scale=l].sc-calcite-input-h textarea.sc-calcite-input,[scale=l].sc-calcite-input-h input.sc-calcite-input,[scale=l].sc-calcite-input-h .calcite-input-prefix.sc-calcite-input,[scale=l].sc-calcite-input-h .calcite-input-suffix.sc-calcite-input{font-size:var(--calcite-font-size-1);padding:1rem;height:56px}[scale=l].sc-calcite-input-h textarea.sc-calcite-input{min-height:56px}[scale=l].sc-calcite-input-h .calcite-input-number-button-wrapper.sc-calcite-input,[scale=l].sc-calcite-input-h .calcite-action-wrapper.sc-calcite-input calcite-button.sc-calcite-input,[scale=l].sc-calcite-input-h .calcite-action-wrapper.sc-calcite-input calcite-button.sc-calcite-input button.sc-calcite-input{height:56px}[scale=l].sc-calcite-input-h textarea.sc-calcite-input,[scale=l].sc-calcite-input-h input[type=file].sc-calcite-input{height:auto}[scale=l].sc-calcite-input-h .calcite-input-clear-button.sc-calcite-input{min-height:56px;min-width:56px}[disabled].sc-calcite-input-h{pointer-events:none}[disabled].sc-calcite-input-h .calcite-input-wrapper.sc-calcite-input{opacity:var(--calcite-ui-opacity-disabled);pointer-events:none}[disabled].sc-calcite-input-h textarea.sc-calcite-input,[disabled].sc-calcite-input-h input.sc-calcite-input{pointer-events:none}.sc-calcite-input-h textarea.sc-calcite-input,.sc-calcite-input-h input.sc-calcite-input{display:-ms-flexbox;display:flex;position:relative;min-width:20%;max-width:100%;max-height:100%;-ms-flex:1;flex:1;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:none;font-family:inherit;-webkit-transition:150ms ease-in-out, height 0s;transition:150ms ease-in-out, height 0s;-webkit-box-shadow:0 0 0 0 transparent;box-shadow:0 0 0 0 transparent;outline:0;margin:0;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-1);font-weight:400;border-radius:0;-webkit-border-radius:0}.sc-calcite-input-h input[type=search].sc-calcite-input::-webkit-search-decoration{-webkit-appearance:none}.sc-calcite-input-h textarea.sc-calcite-input,.sc-calcite-input-h input.sc-calcite-input{outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out}.sc-calcite-input-h textarea.sc-calcite-input:focus,.sc-calcite-input-h input.sc-calcite-input:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.sc-calcite-input-h input.sc-calcite-input,.sc-calcite-input-h textarea.sc-calcite-input{color:var(--calcite-ui-text-1);border:1px solid var(--calcite-ui-border-1)}.sc-calcite-input-h input.sc-calcite-input:-ms-input-placeholder,.sc-calcite-input-h textarea.sc-calcite-input:-ms-input-placeholder{color:var(--calcite-ui-text-3);font-weight:400}.sc-calcite-input-h input.sc-calcite-input::-ms-input-placeholder,.sc-calcite-input-h textarea.sc-calcite-input::-ms-input-placeholder{color:var(--calcite-ui-text-3);font-weight:400}.sc-calcite-input-h input.sc-calcite-input::placeholder,.sc-calcite-input-h input.sc-calcite-input:-ms-input-placeholder,.sc-calcite-input-h input.sc-calcite-input::-ms-input-placeholder,.sc-calcite-input-h textarea.sc-calcite-input::placeholder,.sc-calcite-input-h textarea.sc-calcite-input:-ms-input-placeholder,.sc-calcite-input-h textarea.sc-calcite-input::-ms-input-placeholder{color:var(--calcite-ui-text-3);font-weight:400}.sc-calcite-input-h input.sc-calcite-input:focus,.sc-calcite-input-h textarea.sc-calcite-input:focus{border-color:var(--calcite-ui-brand);color:var(--calcite-ui-text-1)}.sc-calcite-input-h input[readonly].sc-calcite-input,.sc-calcite-input-h textarea[readonly].sc-calcite-input{background-color:var(--calcite-ui-background)}.sc-calcite-input-h input[readonly].sc-calcite-input:focus,.sc-calcite-input-h textarea[readonly].sc-calcite-input:focus{color:var(--calcite-ui-text-1)}.sc-calcite-input-h calcite-icon.sc-calcite-input{color:var(--calcite-ui-text-1)}.sc-calcite-input-h slot.sc-calcite-input:not[name=input-message]{display:block;margin-bottom:0.375rem;color:var(--calcite-ui-text-2);font-weight:500}[icon].sc-calcite-input-h input.sc-calcite-input{padding-left:2.25rem}[icon].sc-calcite-input-h .calcite--rtl.sc-calcite-input input.sc-calcite-input{padding-right:2.25rem;padding-left:0.75rem}[icon][scale=l].sc-calcite-input-h .calcite--rtl.sc-calcite-input input.sc-calcite-input{padding-right:3rem;padding-left:0.75rem}[icon][scale=l].sc-calcite-input-h input.sc-calcite-input{padding-left:3rem}.calcite-input-element-wrapper.sc-calcite-input{display:-ms-inline-flexbox;display:inline-flex;-ms-flex:1;flex:1;min-width:20%;position:relative;-ms-flex-order:3;order:3}.calcite-input-icon.sc-calcite-input{display:block;position:absolute;pointer-events:none;-webkit-transition:150ms ease-in-out;transition:150ms ease-in-out;top:calc(50% - 9px);left:0.75rem;margin:1px auto 0;z-index:1}[scale=l].sc-calcite-input-h .calcite-input-icon.sc-calcite-input{top:calc(50% - 12px)}.calcite--rtl.sc-calcite-input .calcite-input-icon.sc-calcite-input{left:unset;right:0.75rem}input[type=text].sc-calcite-input::-ms-clear{display:none;width:0;height:0}input[type=text].sc-calcite-input::-ms-reveal{display:none;width:0;height:0}input[type=search].sc-calcite-input::-webkit-search-decoration,input[type=search].sc-calcite-input::-webkit-search-cancel-button,input[type=search].sc-calcite-input::-webkit-search-results-button,input[type=search].sc-calcite-input::-webkit-search-results-decoration,input[type=date].sc-calcite-input::-webkit-clear-button,input[type=time].sc-calcite-input::-webkit-clear-button{display:none}.calcite-input-clear-button.sc-calcite-input{display:-ms-flexbox;display:flex;-ms-flex-item-align:stretch;align-self:stretch;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer;min-height:100%;border:1px solid var(--calcite-ui-border-1);-webkit-transition:150ms ease-in-out;transition:150ms ease-in-out;pointer-events:initial;background-color:var(--calcite-ui-foreground-1);border-left:none;-ms-flex-order:4;order:4}.calcite-input-clear-button.sc-calcite-input:hover,.calcite-input-clear-button.sc-calcite-input:focus{background-color:var(--calcite-ui-foreground-2)}.calcite-input-clear-button.sc-calcite-input:active{background-color:var(--calcite-ui-foreground-3)}.calcite-input-clear-button.sc-calcite-input:disabled{opacity:var(--calcite-ui-opacity-disabled)}.calcite--rtl.sc-calcite-input .calcite-input-clear-button.sc-calcite-input{border-left:1px solid var(--calcite-ui-border-1);border-right:none}.calcite-input-clear-button.sc-calcite-input{outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out}.calcite-input-clear-button.sc-calcite-input:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.calcite-input-loading.sc-calcite-input{display:block;pointer-events:none;position:absolute;top:1px;left:1px;right:1px}.calcite-action-wrapper.sc-calcite-input{display:-ms-flexbox;display:flex;-ms-flex-order:7;order:7}.calcite-input-prefix.sc-calcite-input,.calcite-input-suffix.sc-calcite-input{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-line-pack:center;align-content:center;height:auto;min-height:100%;word-break:break-word;-webkit-user-select:none;-ms-user-select:none;-moz-user-select:none;user-select:none;-webkit-box-sizing:border-box;box-sizing:border-box;font-weight:500;border:1px solid var(--calcite-ui-border-1);background-color:var(--calcite-ui-background);color:var(--calcite-ui-text-2);line-height:1}.calcite-input-prefix.sc-calcite-input{-ms-flex-order:2;order:2;border-right-width:0px}.calcite-input-suffix.sc-calcite-input{-ms-flex-order:5;order:5;border-left-width:0px}.calcite--rtl.sc-calcite-input .calcite-input-prefix.sc-calcite-input{border-right-width:1px;border-left-width:0px}.calcite--rtl.sc-calcite-input .calcite-input-suffix.sc-calcite-input{border-left-width:1px;border-right-width:0px}[readonly].sc-calcite-input-h .calcite-input-number-button-item.sc-calcite-input{pointer-events:none}[alignment=start].sc-calcite-input-h textarea.sc-calcite-input,[alignment=start].sc-calcite-input-h input.sc-calcite-input{text-align:left}[alignment=end].sc-calcite-input-h textarea.sc-calcite-input,[alignment=end].sc-calcite-input-h input.sc-calcite-input{text-align:right}[alignment=start].sc-calcite-input-h .calcite--rtl.sc-calcite-input textarea.sc-calcite-input,[alignment=start].sc-calcite-input-h .calcite--rtl.sc-calcite-input input.sc-calcite-input{text-align:right}[alignment=end].sc-calcite-input-h .calcite--rtl.sc-calcite-input textarea.sc-calcite-input,[alignment=end].sc-calcite-input-h .calcite--rtl.sc-calcite-input input.sc-calcite-input{text-align:left}.sc-calcite-input-h input[type=number].sc-calcite-input{-moz-appearance:textfield}.sc-calcite-input-h input[type=number].sc-calcite-input::-webkit-inner-spin-button,.sc-calcite-input-h input[type=number].sc-calcite-input::-webkit-outer-spin-button{-webkit-appearance:none;-moz-appearance:textfield;margin:0}.calcite-input-number-button-wrapper.sc-calcite-input{-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;box-sizing:border-box;-webkit-transition:150ms ease-in-out;transition:150ms ease-in-out;pointer-events:none;-ms-flex-order:6;order:6}[number-button-type=vertical].sc-calcite-input-h .calcite-input-wrapper.sc-calcite-input{-ms-flex-direction:row;flex-direction:row;display:-ms-flexbox;display:flex}[number-button-type=vertical].sc-calcite-input-h input.sc-calcite-input,[number-button-type=vertical].sc-calcite-input-h textarea.sc-calcite-input{-ms-flex-order:2;order:2}[number-button-type=horizontal].sc-calcite-input-h .calcite--rtl.sc-calcite-input .calcite-input-number-button-item[data-adjustment=down].sc-calcite-input calcite-icon.sc-calcite-input{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}[number-button-type=horizontal].sc-calcite-input-h .calcite--rtl.sc-calcite-input .calcite-input-number-button-item[data-adjustment=up].sc-calcite-input calcite-icon.sc-calcite-input{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.calcite-input-number-button-item.number-button-item-horizontal[data-adjustment=down].sc-calcite-input,.calcite-input-number-button-item.number-button-item-horizontal[data-adjustment=up].sc-calcite-input{min-height:100%;max-height:100%;-ms-flex-order:1;order:1;-ms-flex-item-align:auto;align-self:auto}.calcite-input-number-button-item.number-button-item-horizontal[data-adjustment=down].sc-calcite-input calcite-icon.sc-calcite-input,.calcite-input-number-button-item.number-button-item-horizontal[data-adjustment=up].sc-calcite-input calcite-icon.sc-calcite-input{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.calcite-input-number-button-item.number-button-item-horizontal[data-adjustment=down].sc-calcite-input{border-left:1px solid var(--calcite-ui-border-1);border-right:0px}.calcite-input-number-button-item.number-button-item-horizontal[data-adjustment=up].sc-calcite-input{-ms-flex-order:5;order:5}.calcite--rtl.sc-calcite-input .calcite-input-number-button-item.number-button-item-horizontal[data-adjustment=down].sc-calcite-input{border-right:1px solid var(--calcite-ui-border-1);border-left:0px}.calcite--rtl.sc-calcite-input .calcite-input-number-button-item.number-button-item-horizontal[data-adjustment=up].sc-calcite-input{border-left:1px solid var(--calcite-ui-border-1);border-right:0px}[number-button-type=vertical].sc-calcite-input-h .calcite-input-number-button-item[data-adjustment=down].sc-calcite-input{border-top:0}.calcite-input-number-button-item.sc-calcite-input{display:-ms-flexbox;display:flex;-ms-flex-item-align:center;align-self:center;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer;max-height:50%;min-height:50%;padding:0 0.75rem;border:1px solid var(--calcite-ui-border-1);-webkit-transition:background-color 0.15s ease-in-out;transition:background-color 0.15s ease-in-out;pointer-events:initial;background-color:var(--calcite-ui-foreground-1);border-left:none}.calcite-input-number-button-item.sc-calcite-input calcite-icon.sc-calcite-input{pointer-events:none}.calcite-input-number-button-item.sc-calcite-input:hover,.calcite-input-number-button-item.sc-calcite-input:focus{background-color:var(--calcite-ui-foreground-2)}.calcite-input-number-button-item.sc-calcite-input:active{background-color:var(--calcite-ui-foreground-3)}[number-button-type=vertical].sc-calcite-input-h .calcite--rtl.sc-calcite-input .calcite-input-number-button-item.sc-calcite-input{border-right:none;border-left:1px solid var(--calcite-ui-border-1)}.calcite-input-wrapper.sc-calcite-input{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;position:relative}.sc-calcite-input-h input.sc-calcite-input::-webkit-calendar-picker-indicator{display:none}.sc-calcite-input-h input[type=date].sc-calcite-input::-webkit-input-placeholder{visibility:hidden !important}.sc-calcite-input-h textarea.sc-calcite-input::-webkit-resizer{-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;bottom:0;right:0;padding:0 0.375rem}@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none){.calcite-input-resize-icon-wrapper.sc-calcite-input{display:none}}.calcite-input-resize-icon-wrapper.sc-calcite-input{background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-3);position:absolute;z-index:1;bottom:2px;right:2px;pointer-events:none;width:16px;height:16px}.calcite-input-resize-icon-wrapper.sc-calcite-input calcite-icon.sc-calcite-input{bottom:4px;right:4px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.calcite--rtl.sc-calcite-input textarea.sc-calcite-input::-webkit-resizer{left:0;right:unset}.calcite--rtl.sc-calcite-input .calcite-input-resize-icon-wrapper.sc-calcite-input{left:2px;right:unset}.calcite--rtl.sc-calcite-input .calcite-input-resize-icon-wrapper.sc-calcite-input calcite-icon.sc-calcite-input{bottom:4px;right:4px;-webkit-transform:rotate(45deg);transform:rotate(45deg)}[type=file].sc-calcite-input-h input.sc-calcite-input,[type=file].sc-calcite-input-h textarea.sc-calcite-input{cursor:pointer;padding:1.5rem;border:1px dashed #d4d4d4;background-color:#f8f8f8;text-align:center}.no-bottom-border.sc-calcite-input-h input.sc-calcite-input.sc-calcite-input{border-bottom:none}[status=invalid].sc-calcite-input-h .calcite-input-icon.sc-calcite-input{color:var(--calcite-ui-danger)}[status=valid].sc-calcite-input-h .calcite-input-icon.sc-calcite-input{color:var(--calcite-ui-success)}[status=idle].sc-calcite-input-h .calcite-input-icon.sc-calcite-input{color:var(--calcite-ui-text-2)}';
        }
      };
      var Xi;
      !(function (t) {
        (t.valid = 'check-circle'),
          (t.invalid = 'exclamation-mark-triangle'),
          (t.idle = 'information');
      })(Xi || (Xi = {}));
      const Yi = class extends HTMLElement {
          constructor() {
            super(),
              this.__registerHost(),
              (this.calciteLabelFocus = yt(this, 'calciteLabelFocus', 7)),
              (this.alignment = 'start'),
              (this.status = 'idle'),
              (this.scale = 'm'),
              (this.layout = 'default'),
              (this.handleCalciteHtmlForClicks = (t) => {
                if (!this.for) return;
                const e =
                  ((i = this.el),
                  (a = `#${this.for}`),
                  (function t(e) {
                    if (!e) return null;
                    e.assignedSlot && (e = e.assignedSlot);
                    const i = (function (t) {
                        return t.getRootNode();
                      })(e),
                      r = i.querySelector(a),
                      n = (function (t) {
                        return t.host || null;
                      })(i);
                    return r || (n ? t(n) : null);
                  })(i));
                var i, a;
                if (!e) return;
                if (!e.localName.startsWith('calcite')) return;
                if (t === e) return;
                if (
                  ['button', 'input', 'meter', 'output', 'progress', 'select', 'textarea'].includes(
                    t.localName,
                  )
                )
                  return;
                const r = [
                  'calcite-button',
                  'calcite-checkbox',
                  'calcite-date',
                  'calcite-inline-editable',
                  'calcite-input',
                  'calcite-radio',
                  'calcite-radio-button',
                  'calcite-radio-button-group',
                  'calcite-radio-group',
                  'calcite-rating',
                  'calcite-select',
                  'calcite-slider',
                  'calcite-switch',
                ];
                if (!r.includes(t.localName)) {
                  for (let e = 0; e < r.length; e++) if (t.closest(r[e])) return;
                  e.click();
                }
              });
          }
          onClick(t) {
            const e = t.target;
            this.calciteLabelFocus.emit({
              labelEl: this.el,
              interactedEl: e,
              requestedInput: this.for,
            }),
              this.handleCalciteHtmlForClicks(e);
          }
          render() {
            const t = Yt(this.el, ['disabled', 'id', 'dir', 'layout', 'scale', 'status']),
              e = Kt(this.el);
            return K(
              'label',
              Object.assign({}, t, { class: { [Gt]: 'rtl' === e } }),
              K('slot', null),
            );
          }
          get el() {
            return this;
          }
          static get style() {
            return '@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}.sc-calcite-label:root{--calcite-popper-transition:150ms ease-in-out}[hidden].sc-calcite-label-h{display:none}[alignment=start].sc-calcite-label-h,[alignment=end].sc-calcite-label-h .calcite--rtl.sc-calcite-label{text-align:left}[alignment=end].sc-calcite-label-h,[alignment=start].sc-calcite-label-h .calcite--rtl.sc-calcite-label{text-align:right}[alignment=center].sc-calcite-label-h{text-align:center}[scale=s].sc-calcite-label-h label.sc-calcite-label{font-size:var(--calcite-font-size--2);line-height:1rem;margin-bottom:0.5rem}[scale=m].sc-calcite-label-h label.sc-calcite-label{font-size:var(--calcite-font-size--1);line-height:1rem;margin-bottom:0.75rem}[scale=l].sc-calcite-label-h label.sc-calcite-label{font-size:var(--calcite-font-size-0);line-height:1.25rem;margin-bottom:1rem}.sc-calcite-label-h label.sc-calcite-label{cursor:pointer;width:100%;margin-top:0;margin-right:0;margin-left:0;line-height:1.375}[layout=default].sc-calcite-label-h label.sc-calcite-label{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;grid-gap:0.25rem;gap:0.25rem}[layout=inline].sc-calcite-label-h label.sc-calcite-label,[layout=inline-space-between].sc-calcite-label-h label.sc-calcite-label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;grid-gap:0.5rem;gap:0.5rem}[layout=inline][scale=l].sc-calcite-label-h label.sc-calcite-label{grid-gap:0.75rem;gap:0.75rem}[layout=inline-space-between].sc-calcite-label-h label.sc-calcite-label{-ms-flex-pack:justify;justify-content:space-between}[disabled].sc-calcite-label-h>label.sc-calcite-label{pointer-events:none;opacity:0.5}.sc-calcite-label-h[disabled] .sc-calcite-label-s>*{pointer-events:none}.sc-calcite-label-h[disabled] .sc-calcite-label-s>*[disabled],.sc-calcite-label-h[disabled] .sc-calcite-label-s>*[disabled] *{--bg-opacity:1}.sc-calcite-label-h[disabled] .sc-calcite-label-s>calcite-input-message:not([active]){--bg-opacity:0}[status=invalid].sc-calcite-label-h label.sc-calcite-label{color:var(--calcite-ui-danger)}[status=valid].sc-calcite-label-h label.sc-calcite-label{color:var(--calcite-ui-text-2)}[status=idle].sc-calcite-label-h label.sc-calcite-label{color:var(--calcite-ui-text-2)}[disable-spacing].sc-calcite-label-h label.sc-calcite-label{grid-gap:0;gap:0;margin:0}';
          }
        },
        Ki = class extends HTMLElement {
          constructor() {
            super(),
              this.__registerHost(),
              At(this),
              (this.active = !1),
              (this.inline = !1),
              (this.scale = 'm'),
              (this.value = 0),
              (this.text = '');
          }
          render() {
            const { el: t, inline: e, label: i, scale: a, text: r, type: n, value: o } = this,
              s = t.id || Xt(),
              l = e ? this.getInlineSize(a) : this.getSize(a),
              c = 0.45 * l,
              h = `0 0 ${l} ${l}`,
              u = 'determinate' === n,
              d = 2 * c * Math.PI,
              p = (o / 100) * d,
              m = d - p,
              f = Math.floor(o),
              b = {
                'aria-valuenow': f,
                'aria-valuemin': 0,
                'aria-valuemax': 100,
                complete: 100 === f,
              },
              g = { r: c, cx: l / 2, cy: l / 2 },
              v = { 'stroke-dasharray': `${p} ${m}` };
            return K(
              J,
              Object.assign({ 'aria-label': i, id: s, role: 'progressbar' }, u ? b : {}),
              K(
                'div',
                { class: 'loader__svgs' },
                K(
                  'svg',
                  { class: 'loader__svg loader__svg--1', viewBox: h },
                  K('circle', Object.assign({}, g)),
                ),
                K(
                  'svg',
                  { class: 'loader__svg loader__svg--2', viewBox: h },
                  K('circle', Object.assign({}, g)),
                ),
                K(
                  'svg',
                  Object.assign(
                    { class: 'loader__svg loader__svg--3', viewBox: h },
                    u ? { style: v } : {},
                  ),
                  K('circle', Object.assign({}, g)),
                ),
              ),
              r && K('div', { class: 'loader__text' }, r),
              u && K('div', { class: 'loader__percentage' }, o),
            );
          }
          getSize(t) {
            return { s: 32, m: 56, l: 80 }[t];
          }
          getInlineSize(t) {
            return { s: 12, m: 16, l: 20 }[t];
          }
          get el() {
            return this;
          }
          static get style() {
            return '@charset "UTF-8";@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host{-ms-flex-align:center;align-items:center;position:relative;-ms-flex-pack:center;justify-content:center;display:none;margin-left:auto;margin-right:auto;opacity:1;padding-top:4rem;padding-bottom:4rem;min-height:var(--loader-size);font-size:var(--loader-font-size);stroke:var(--calcite-ui-brand);stroke-width:3;fill:none;-webkit-transform:scale(1, 1);transform:scale(1, 1);animation:loader-color-shift 6s alternate-reverse infinite linear}:host([scale=s]){--loader-font-size:var(--calcite-font-size--2);--loader-size:2rem;--loader-size-inline:0.75rem}:host([scale=m]){--loader-font-size:var(--calcite-font-size-0);--loader-size:4rem;--loader-size-inline:1rem}:host([scale=l]){--loader-font-size:var(--calcite-font-size-2);--loader-size:6rem;--loader-size-inline:1.25rem}:host([no-padding]){padding-top:0;padding-bottom:0}:host([active]){display:-ms-flexbox;display:flex}.loader__text{display:block;text-align:center;margin-top:calc(var(--loader-size) + 1.5rem)}.loader__percentage{display:block;position:absolute;color:var(--calcite-ui-text-1);text-align:center;font-size:var(--loader-font-size);width:var(--loader-size);top:4rem;left:50%;margin-left:calc(var(--loader-size) / 2 * -1);margin-top:calc(var(--loader-size) / 2);line-height:0.25;-webkit-transform:scale(1, 1);transform:scale(1, 1)}.loader__svgs{position:absolute;overflow:visible;opacity:1;width:var(--loader-size);height:var(--loader-size);top:4rem;left:50%;margin-left:calc(var(--loader-size) / 2 * -1);-webkit-transform:scale(1, 1);transform:scale(1, 1)}.loader__svg{position:absolute;overflow:visible;top:0;left:0;-webkit-transform-origin:center;transform-origin:center;width:var(--loader-size);height:var(--loader-size);-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-name:loader-clockwise;animation-name:loader-clockwise}@supports (display: grid){.loader__svg--1{-webkit-animation-name:loader-offset-1;animation-name:loader-offset-1}.loader__svg--2{-webkit-animation-name:loader-offset-2;animation-name:loader-offset-2}.loader__svg--3{-webkit-animation-name:loader-offset-3;animation-name:loader-offset-3}}:host([type=determinate]){-webkit-animation:none;animation:none;stroke:var(--calcite-ui-border-3)}:host([type=determinate]) .loader__svg--3{-webkit-animation:none;animation:none;stroke:var(--calcite-ui-brand);stroke-dasharray:150.79632;-webkit-transform:rotate(-90deg);transform:rotate(-90deg);-webkit-transition:all 100ms linear;transition:all 100ms linear}:host([inline]){position:relative;margin:0;padding-top:0;padding-bottom:0;-webkit-animation:none;animation:none;stroke:currentColor;stroke-width:2;height:var(--loader-size-inline);min-height:var(--loader-size-inline);width:var(--loader-size-inline);margin-right:var(--loader-size-inline)/2;vertical-align:-var(--loader-size-inline)/5}:host([inline][dir=rtl]){margin-right:0;margin-left:var(--loader-size-inline)/2}:host([active][inline]){display:inline-block}:host([inline]) .loader__svgs{top:0;left:0;margin:0;width:var(--loader-size-inline);height:var(--loader-size-inline)}:host([inline]) .loader__svg{width:var(--loader-size-inline);height:var(--loader-size-inline)}:host([complete]){opacity:0;-webkit-transform:scale(0.75, 0.75);transform:scale(0.75, 0.75);-webkit-transform-origin:center;transform-origin:center;-webkit-transition:opacity 200ms linear 1000ms, -webkit-transform 200ms linear 1000ms;transition:opacity 200ms linear 1000ms, -webkit-transform 200ms linear 1000ms;transition:opacity 200ms linear 1000ms, transform 200ms linear 1000ms;transition:opacity 200ms linear 1000ms, transform 200ms linear 1000ms, -webkit-transform 200ms linear 1000ms}:host([complete]) .loader__svgs{opacity:0;-webkit-transform:scale(0.75, 0.75);transform:scale(0.75, 0.75);-webkit-transform-origin:center;transform-origin:center;-webkit-transition:opacity 180ms linear 800ms, -webkit-transform 180ms linear 800ms;transition:opacity 180ms linear 800ms, -webkit-transform 180ms linear 800ms;transition:opacity 180ms linear 800ms, transform 180ms linear 800ms;transition:opacity 180ms linear 800ms, transform 180ms linear 800ms, -webkit-transform 180ms linear 800ms}:host([complete]) .loader__percentage{color:var(--calcite-ui-brand);-webkit-transform:scale(1.05, 1.05);transform:scale(1.05, 1.05);-webkit-transform-origin:center;transform-origin:center;-webkit-transition:color 200ms linear, -webkit-transform 200ms linear;transition:color 200ms linear, -webkit-transform 200ms linear;transition:color 200ms linear, transform 200ms linear;transition:color 200ms linear, transform 200ms linear, -webkit-transform 200ms linear}.loader__svg--1{stroke-dasharray:27.9252444444% 139.6262222222%;-webkit-animation-duration:0.72s;animation-duration:0.72s}@-webkit-keyframes loader-offset-1{0%{stroke-dasharray:27.9252444444% 251.3272%;stroke-dashoffset:0}50%{stroke-dasharray:139.6262222222% 139.6262222222%;stroke-dashoffset:-83.7757333333%}100%{stroke-dasharray:27.9252444444% 251.3272%;stroke-dashoffset:-279.2524444444%}}@keyframes loader-offset-1{0%{stroke-dasharray:27.9252444444% 251.3272%;stroke-dashoffset:0}50%{stroke-dasharray:139.6262222222% 139.6262222222%;stroke-dashoffset:-83.7757333333%}100%{stroke-dasharray:27.9252444444% 251.3272%;stroke-dashoffset:-279.2524444444%}}.loader__svg--2{stroke-dasharray:55.8504888889% 139.6262222222%;-webkit-animation-duration:0.96s;animation-duration:0.96s}@-webkit-keyframes loader-offset-2{0%{stroke-dasharray:55.8504888889% 223.4019555556%;stroke-dashoffset:0}50%{stroke-dasharray:139.6262222222% 139.6262222222%;stroke-dashoffset:-97.7383555556%}100%{stroke-dasharray:55.8504888889% 223.4019555556%;stroke-dashoffset:-279.2524444444%}}@keyframes loader-offset-2{0%{stroke-dasharray:55.8504888889% 223.4019555556%;stroke-dashoffset:0}50%{stroke-dasharray:139.6262222222% 139.6262222222%;stroke-dashoffset:-97.7383555556%}100%{stroke-dasharray:55.8504888889% 223.4019555556%;stroke-dashoffset:-279.2524444444%}}.loader__svg--3{stroke-dasharray:13.9626222222% 139.6262222222%;-webkit-animation-duration:1.16s;animation-duration:1.16s}@-webkit-keyframes loader-offset-3{0%{stroke-dasharray:13.9626222222% 265.2898222222%;stroke-dashoffset:0}50%{stroke-dasharray:139.6262222222% 139.6262222222%;stroke-dashoffset:-76.7944222222%}100%{stroke-dasharray:13.9626222222% 265.2898222222%;stroke-dashoffset:-279.2524444444%}}@keyframes loader-offset-3{0%{stroke-dasharray:13.9626222222% 265.2898222222%;stroke-dashoffset:0}50%{stroke-dasharray:139.6262222222% 139.6262222222%;stroke-dashoffset:-76.7944222222%}100%{stroke-dasharray:13.9626222222% 265.2898222222%;stroke-dashoffset:-279.2524444444%}}@-webkit-keyframes loader-color-shift{0%{stroke:var(--calcite-ui-brand)}33%{stroke:var(--calcite-ui-brand-press)}66%{stroke:var(--calcite-ui-brand-hover)}100%{stroke:var(--calcite-ui-brand)}}@keyframes loader-color-shift{0%{stroke:var(--calcite-ui-brand)}33%{stroke:var(--calcite-ui-brand-press)}66%{stroke:var(--calcite-ui-brand-hover)}100%{stroke:var(--calcite-ui-brand)}}@-webkit-keyframes loader-clockwise{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes loader-clockwise{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}';
          }
        },
        Zi = class extends HTMLElement {
          constructor() {
            super(),
              this.__registerHost(),
              At(this),
              (this.calciteOptionChange = yt(this, 'calciteOptionChange', 7)),
              (this.disabled = !1),
              (this.mutationObserver = new MutationObserver(() => {
                this.ensureTextContentDependentProps(), this.calciteOptionChange.emit();
              }));
          }
          handlePropChange(t, e, i) {
            ('label' !== i && 'value' !== i) || this.ensureTextContentDependentProps(),
              this.calciteOptionChange.emit();
          }
          ensureTextContentDependentProps() {
            const {
              el: { textContent: t },
            } = this;
            (this.label && this.label !== this.internallySetLabel) ||
              ((this.label = t), (this.internallySetLabel = t)),
              (this.value && this.value !== this.internallySetValue) ||
                ((this.value = t), (this.internallySetValue = t));
          }
          connectedCallback() {
            this.ensureTextContentDependentProps(),
              this.mutationObserver.observe(this.el, {
                childList: !0,
                attributeFilter: ['label', 'value'],
              });
          }
          disconnectedCallback() {
            this.mutationObserver.disconnect();
          }
          render() {
            return K('slot', null, this.label);
          }
          get el() {
            return this;
          }
          static get watchers() {
            return {
              disabled: ['handlePropChange'],
              label: ['handlePropChange'],
              selected: ['handlePropChange'],
              value: ['handlePropChange'],
            };
          }
        },
        Ji = class extends HTMLElement {
          constructor() {
            super(),
              this.__registerHost(),
              At(this),
              (this.calciteOptionGroupChange = yt(this, 'calciteOptionGroupChange', 7)),
              (this.disabled = !1);
          }
          handlePropChange() {
            this.calciteOptionGroupChange.emit();
          }
          render() {
            return K(Et, null, K('div', null, this.label), K('slot', null));
          }
          static get watchers() {
            return { disabled: ['handlePropChange'], label: ['handlePropChange'] };
          }
        };
      var Qi;
      !(function (t) {
        (t.circle = 'circle'), (t.square = 'square'), (t.grip = 'grip');
      })(Qi || (Qi = {}));
      const ta = class extends HTMLElement {
        constructor() {
          super(),
            this.__registerHost(),
            At(this),
            (this.type = 'determinate'),
            (this.value = 0),
            (this.text = null),
            (this.reversed = !1);
        }
        render() {
          const t = 'determinate' === this.type ? { width: 100 * this.value + '%' } : {};
          return K(
            Et,
            null,
            K(
              'div',
              { class: 'track' },
              K('div', {
                class: {
                  bar: !0,
                  indeterminate: 'indeterminate' === this.type,
                  reversed: this.reversed,
                },
                style: t,
              }),
            ),
            this.text ? K('div', { class: 'text' }, this.text) : null,
          );
        }
        get el() {
          return this;
        }
        static get style() {
          return '@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host{position:relative;display:block;width:100%}.track,.bar{position:absolute;top:0;height:2px}.track{z-index:0;width:100%;overflow:hidden;background:var(--calcite-ui-border-3)}.bar{background-color:var(--calcite-ui-brand);z-index:0}.indeterminate{width:20%;-webkit-animation:looping-progress-bar-ani 2200ms linear infinite;animation:looping-progress-bar-ani 2200ms linear infinite}.reversed{animation-direction:reverse}.text{padding-top:1rem;padding-bottom:0;padding-left:0;padding-right:0;text-align:center;font-size:var(--calcite-font-size--2);line-height:1rem;font-weight:var(--calcite-font-weight-medium)}@-webkit-keyframes looping-progress-bar-ani{0%{-webkit-transform:translate3d(-100%, 0, 0);transform:translate3d(-100%, 0, 0)}50%{width:40%}100%{-webkit-transform:translate3d(600%, 0, 0);transform:translate3d(600%, 0, 0)}}@keyframes looping-progress-bar-ani{0%{-webkit-transform:translate3d(-100%, 0, 0);transform:translate3d(-100%, 0, 0)}50%{width:40%}100%{-webkit-transform:translate3d(600%, 0, 0);transform:translate3d(600%, 0, 0)}}';
        }
      };
      function ea(t) {
        return 'CALCITE-OPTION' === t.tagName;
      }
      const ia = class extends HTMLElement {
          constructor() {
            super(),
              this.__registerHost(),
              At(this),
              (this.calciteSelectChange = yt(this, 'calciteSelectChange', 7)),
              (this.disabled = !1),
              (this.scale = 'm'),
              (this.width = 'auto'),
              (this.componentToNativeEl = new Map()),
              (this.mutationObserver = new MutationObserver(() => this.populateInternalSelect())),
              (this.handleInternalSelectChange = () => {
                const t = this.selectEl.selectedOptions[0];
                this.selectFromNativeOption(t), requestAnimationFrame(() => this.emitChangeEvent());
              }),
              (this.populateInternalSelect = () => {
                const t = Array.from(this.el.children);
                this.clearInternalSelect(),
                  t.forEach((t) => {
                    var e;
                    return null === (e = this.selectEl) || void 0 === e
                      ? void 0
                      : e.append(this.toNativeElement(t));
                  });
              }),
              (this.storeSelectRef = (t) => {
                (this.selectEl = t), this.populateInternalSelect();
                const e = this.selectEl.selectedOptions[0];
                this.selectFromNativeOption(e);
              }),
              (this.emitChangeEvent = () => {
                this.calciteSelectChange.emit();
              });
          }
          connectedCallback() {
            const { el: t } = this;
            this.mutationObserver.observe(t, { subtree: !0, childList: !0 });
          }
          disconnectedCallback() {
            this.mutationObserver.disconnect();
          }
          async setFocus() {
            Qt(this.selectEl);
          }
          handleOptionOrGroupChange(t) {
            t.stopPropagation();
            const e = t.target,
              i = this.componentToNativeEl.get(e);
            i && (this.updateNativeElement(e, i), ea(e) && e.selected && this.deselectAllExcept(e));
          }
          handleLabelFocus(t) {
            const { requestedInput: e, labelEl: i } = t.detail,
              { el: a } = this;
            (i.contains(a) || (e && e === a.getAttribute('id'))) &&
              (this.setFocus(), t.stopImmediatePropagation());
          }
          updateNativeElement(t, e) {
            if (((e.disabled = t.disabled), (e.label = t.label), ea(t))) {
              const i = e;
              (i.selected = t.selected), (i.value = t.value), (i.innerText = t.label);
            }
          }
          clearInternalSelect() {
            this.componentToNativeEl.forEach((t) => t.remove()), this.componentToNativeEl.clear();
          }
          selectFromNativeOption(t) {
            if (!t) return;
            let e;
            this.componentToNativeEl.forEach((i, a) => {
              ea(a) && i === t && ((a.selected = !0), (e = a), this.deselectAllExcept(a));
            }),
              e && requestAnimationFrame(() => (this.selectedOption = e));
          }
          toNativeElement(t) {
            if (ea(t)) {
              const e = document.createElement('option');
              return this.updateNativeElement(t, e), this.componentToNativeEl.set(t, e), e;
            }
            if (
              (function (t) {
                return 'CALCITE-OPTION-GROUP' === t.tagName;
              })(t)
            ) {
              const e = document.createElement('optgroup');
              return (
                this.updateNativeElement(t, e),
                Array.from(t.children).forEach((i) => {
                  const a = this.toNativeElement(i);
                  e.append(a), this.componentToNativeEl.set(t, a);
                }),
                this.componentToNativeEl.set(t, e),
                e
              );
            }
            throw new Error('unsupported element child provided');
          }
          deselectAllExcept(t) {
            this.el.querySelectorAll('calcite-option').forEach((e) => {
              e !== t && (e.selected = !1);
            });
          }
          renderChevron(t) {
            return K(
              'div',
              { class: { 'icon-container': !0, [Gt]: 'rtl' === t } },
              K('calcite-icon', { class: 'icon', icon: 'chevron-down', scale: 's' }),
            );
          }
          render() {
            const t = Kt(this.el);
            return K(
              Et,
              null,
              K(
                'select',
                {
                  'aria-label': this.label,
                  class: { select: !0, [Gt]: 'rtl' === t },
                  disabled: this.disabled,
                  onChange: this.handleInternalSelectChange,
                  ref: this.storeSelectRef,
                },
                K('slot', null),
              ),
              this.renderChevron(t),
            );
          }
          get el() {
            return this;
          }
          static get style() {
            return '@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:host{--calcite-icon-size:1rem;--calcite-spacing-quarter:0.25rem;--calcite-spacing-half:0.5rem;--calcite-spacing-three-quarters:0.75rem;--calcite-spacing:1rem;--calcite-spacing-plus-quarter:1.25rem;--calcite-spacing-plus-half:1.5rem;--calcite-spacing-double:2rem;--calcite-menu-min-width:10rem;--calcite-header-min-height:3rem;--calcite-footer-min-height:3rem}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host{display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;position:relative;width:var(--select-width)}:host([scale=s]){--calcite-select-font-size:var(--calcite-font-size--2);--calcite-select-spacing:0.25rem 0.5rem}:host([scale=m]){--calcite-select-font-size:var(--calcite-font-size--1);--calcite-select-spacing:0.5rem 0.75rem}:host([scale=l]){--calcite-select-font-size:var(--calcite-font-size-1);--calcite-select-spacing:0.75rem 1rem}:host([width=auto]){width:auto}:host([width=half]){width:50%}:host([width=full]){width:100%}.select{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-width:1px;border-style:solid;border-right-width:0;background-color:var(--calcite-ui-foreground-1);border-color:var(--calcite-ui-border-1);border-radius:0;color:var(--calcite-ui-text-2);cursor:pointer;font-family:inherit;margin:0;width:100%;outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;font-size:var(--calcite-select-font-size);padding:var(--calcite-select-spacing)}.select:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.select:hover{background-color:var(--calcite-ui-foreground-2)}.select.calcite--rtl{border-right-width:1px;border-color:var(--calcite-ui-border-1);border-right-style:solid}select:disabled{border-color:var(--calcite-ui-border-1);--bg-opacity:1}:host([disabled]){pointer-events:none;-webkit-user-select:none;-ms-user-select:none;-moz-user-select:none;user-select:none;opacity:0.5}.icon-container{-ms-flex-align:center;align-items:center;background-color:transparent;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-1);border-left-width:0;color:var(--calcite-ui-text-2);display:-ms-flexbox;display:flex;pointer-events:none;position:absolute;right:0;top:0;bottom:0;padding-left:0.5rem;padding-right:0.5rem}.icon-container.calcite--rtl{border-color:var(--calcite-ui-border-1);border-right-width:0;left:0;right:unset;border-left-style:solid}.select:focus~.icon-container{border-color:transparent}';
          }
        },
        aa = class extends HTMLElement {
          constructor() {
            super(),
              this.__registerHost(),
              At(this),
              (this.calciteSliderChange = yt(this, 'calciteSliderChange', 7)),
              (this.calciteSliderUpdate = yt(this, 'calciteSliderUpdate', 7)),
              (this.disabled = !1),
              (this.min = 0),
              (this.max = 100),
              (this.value = null),
              (this.snap = !1),
              (this.step = 1),
              (this.hasHistogram = !1),
              (this.guid = `calcite-slider-${Xt()}`),
              (this.isRange = !1),
              (this.tickValues = []),
              (this.activeProp = 'value'),
              (this.minMaxValueRange = null),
              (this.minValueDragRange = null),
              (this.maxValueDragRange = null);
          }
          histogramWatcher(t) {
            this.hasHistogram = !!t;
          }
          componentWillLoad() {
            (this.isRange = !(!this.maxValue && 0 !== this.maxValue)),
              (this.tickValues = this.generateTickValues()),
              (this.value = this.bound(this.value)),
              this.snap && (this.value = this.getClosestStep(this.value)),
              this.histogram && (this.hasHistogram = !0),
              this.emitChange();
          }
          componentDidRender() {
            this.labelHandles &&
              (this.adjustHostObscuredHandleLabel('value'),
              this.isRange &&
                (this.adjustHostObscuredHandleLabel('minValue'),
                (this.precise && this.isRange && !this.hasHistogram) ||
                  this.hyphenateCollidingRangeHandleLabels())),
              this.hideObscuredBoundingTickLabels();
          }
          render() {
            const t = this.el.id || this.guid,
              e = this.minValue || this.min,
              i = this.maxValue || this.value,
              a = this.isRange ? 'maxValue' : 'value',
              r = this[a],
              n = 100 * this.getUnitInterval(e) + '%',
              o = 100 - 100 * this.getUnitInterval(i) + '%',
              s = K(
                'button',
                {
                  'aria-label': this.isRange ? this.maxLabel : this.minLabel,
                  'aria-orientation': 'horizontal',
                  'aria-valuemax': this.max,
                  'aria-valuemin': this.min,
                  'aria-valuenow': r,
                  class: {
                    thumb: !0,
                    'thumb--value': !0,
                    'thumb--active': 'minMaxValue' !== this.lastDragProp && this.dragProp === a,
                  },
                  disabled: this.disabled,
                  onBlur: () => (this.activeProp = null),
                  onFocus: () => (this.activeProp = a),
                  onMouseDown: () => this.dragStart(a),
                  onTouchStart: (t) => this.dragStart(a, t),
                  ref: (t) => (this.maxHandle = t),
                  role: 'slider',
                  style: { right: o },
                },
                K('div', { class: 'handle' }),
              ),
              l = K(
                'button',
                {
                  'aria-label': this.isRange ? this.maxLabel : this.minLabel,
                  'aria-orientation': 'horizontal',
                  'aria-valuemax': this.max,
                  'aria-valuemin': this.min,
                  'aria-valuenow': r,
                  class: {
                    thumb: !0,
                    'thumb--value': !0,
                    'thumb--active': 'minMaxValue' !== this.lastDragProp && this.dragProp === a,
                  },
                  disabled: this.disabled,
                  onBlur: () => (this.activeProp = null),
                  onFocus: () => (this.activeProp = a),
                  onMouseDown: () => this.dragStart(a),
                  onTouchStart: (t) => this.dragStart(a, t),
                  ref: (t) => (this.maxHandle = t),
                  role: 'slider',
                  style: { right: o },
                },
                K(
                  'span',
                  { 'aria-hidden': 'true', class: 'handle__label handle__label--value' },
                  r ? r.toLocaleString() : r,
                ),
                K(
                  'span',
                  { 'aria-hidden': 'true', class: 'handle__label handle__label--value static' },
                  r ? r.toLocaleString() : r,
                ),
                K(
                  'span',
                  {
                    'aria-hidden': 'true',
                    class: 'handle__label handle__label--value transformed',
                  },
                  r ? r.toLocaleString() : r,
                ),
                K('div', { class: 'handle' }),
              ),
              c = K(
                'button',
                {
                  'aria-label': this.isRange ? this.maxLabel : this.minLabel,
                  'aria-orientation': 'horizontal',
                  'aria-valuemax': this.max,
                  'aria-valuemin': this.min,
                  'aria-valuenow': r,
                  class: {
                    thumb: !0,
                    'thumb--value': !0,
                    'thumb--active': 'minMaxValue' !== this.lastDragProp && this.dragProp === a,
                  },
                  disabled: this.disabled,
                  onBlur: () => (this.activeProp = null),
                  onFocus: () => (this.activeProp = a),
                  onMouseDown: () => this.dragStart(a),
                  onTouchStart: (t) => this.dragStart(a, t),
                  ref: (t) => (this.maxHandle = t),
                  role: 'slider',
                  style: { right: o },
                },
                K('div', { class: 'handle' }),
                K(
                  'span',
                  { 'aria-hidden': 'true', class: 'handle__label handle__label--value' },
                  r ? r.toLocaleString() : r,
                ),
                K(
                  'span',
                  { 'aria-hidden': 'true', class: 'handle__label handle__label--value static' },
                  r ? r.toLocaleString() : r,
                ),
                K(
                  'span',
                  {
                    'aria-hidden': 'true',
                    class: 'handle__label handle__label--value transformed',
                  },
                  r ? r.toLocaleString() : r,
                ),
              ),
              h = K(
                'button',
                {
                  'aria-label': this.isRange ? this.maxLabel : this.minLabel,
                  'aria-orientation': 'horizontal',
                  'aria-valuemax': this.max,
                  'aria-valuemin': this.min,
                  'aria-valuenow': r,
                  class: {
                    thumb: !0,
                    'thumb--value': !0,
                    'thumb--active': 'minMaxValue' !== this.lastDragProp && this.dragProp === a,
                    'thumb--precise': !0,
                  },
                  disabled: this.disabled,
                  onBlur: () => (this.activeProp = null),
                  onFocus: () => (this.activeProp = a),
                  onMouseDown: () => this.dragStart(a),
                  onTouchStart: (t) => this.dragStart(a, t),
                  ref: (t) => (this.maxHandle = t),
                  role: 'slider',
                  style: { right: o },
                },
                K('div', { class: 'handle' }),
                K('div', { class: 'handle-extension' }),
              ),
              u = K(
                'button',
                {
                  'aria-label': this.isRange ? this.maxLabel : this.minLabel,
                  'aria-orientation': 'horizontal',
                  'aria-valuemax': this.max,
                  'aria-valuemin': this.min,
                  'aria-valuenow': r,
                  class: {
                    thumb: !0,
                    'thumb--value': !0,
                    'thumb--active': 'minMaxValue' !== this.lastDragProp && this.dragProp === a,
                    'thumb--precise': !0,
                  },
                  disabled: this.disabled,
                  onBlur: () => (this.activeProp = null),
                  onFocus: () => (this.activeProp = a),
                  onMouseDown: () => this.dragStart(a),
                  onTouchStart: (t) => this.dragStart(a, t),
                  ref: (t) => (this.maxHandle = t),
                  role: 'slider',
                  style: { right: o },
                },
                K('div', { class: 'handle-extension' }),
                K('div', { class: 'handle' }),
              ),
              d = K(
                'button',
                {
                  'aria-label': this.isRange ? this.maxLabel : this.minLabel,
                  'aria-orientation': 'horizontal',
                  'aria-valuemax': this.max,
                  'aria-valuemin': this.min,
                  'aria-valuenow': r,
                  class: {
                    thumb: !0,
                    'thumb--value': !0,
                    'thumb--active': 'minMaxValue' !== this.lastDragProp && this.dragProp === a,
                    'thumb--precise': !0,
                  },
                  disabled: this.disabled,
                  onBlur: () => (this.activeProp = null),
                  onFocus: () => (this.activeProp = a),
                  onMouseDown: () => this.dragStart(a),
                  onTouchStart: (t) => this.dragStart(a, t),
                  ref: (t) => (this.maxHandle = t),
                  role: 'slider',
                  style: { right: o },
                },
                K(
                  'span',
                  { 'aria-hidden': 'true', class: 'handle__label handle__label--value' },
                  r ? r.toLocaleString() : r,
                ),
                K(
                  'span',
                  { 'aria-hidden': 'true', class: 'handle__label handle__label--value static' },
                  r ? r.toLocaleString() : r,
                ),
                K(
                  'span',
                  {
                    'aria-hidden': 'true',
                    class: 'handle__label handle__label--value transformed',
                  },
                  r ? r.toLocaleString() : r,
                ),
                K('div', { class: 'handle' }),
                K('div', { class: 'handle-extension' }),
              ),
              p = K(
                'button',
                {
                  'aria-label': this.isRange ? this.maxLabel : this.minLabel,
                  'aria-orientation': 'horizontal',
                  'aria-valuemax': this.max,
                  'aria-valuemin': this.min,
                  'aria-valuenow': r,
                  class: {
                    thumb: !0,
                    'thumb--value': !0,
                    'thumb--active': 'minMaxValue' !== this.lastDragProp && this.dragProp === a,
                    'thumb--precise': !0,
                  },
                  disabled: this.disabled,
                  onBlur: () => (this.activeProp = null),
                  onFocus: () => (this.activeProp = a),
                  onMouseDown: () => this.dragStart(a),
                  onTouchStart: (t) => this.dragStart(a, t),
                  ref: (t) => (this.maxHandle = t),
                  role: 'slider',
                  style: { right: o },
                },
                K('div', { class: 'handle-extension' }),
                K('div', { class: 'handle' }),
                K(
                  'span',
                  { 'aria-hidden': 'true', class: 'handle__label handle__label--value' },
                  r ? r.toLocaleString() : r,
                ),
                K(
                  'span',
                  { 'aria-hidden': 'true', class: 'handle__label handle__label--value static' },
                  r ? r.toLocaleString() : r,
                ),
                K(
                  'span',
                  {
                    'aria-hidden': 'true',
                    class: 'handle__label handle__label--value transformed',
                  },
                  r ? r.toLocaleString() : r,
                ),
              ),
              m = K(
                'button',
                {
                  'aria-label': this.minLabel,
                  'aria-orientation': 'horizontal',
                  'aria-valuemax': this.max,
                  'aria-valuemin': this.min,
                  'aria-valuenow': this.minValue,
                  class: {
                    thumb: !0,
                    'thumb--minValue': !0,
                    'thumb--active': 'minValue' === this.dragProp,
                  },
                  disabled: this.disabled,
                  onBlur: () => (this.activeProp = null),
                  onFocus: () => (this.activeProp = 'minValue'),
                  onMouseDown: () => this.dragStart('minValue'),
                  onTouchStart: (t) => this.dragStart('minValue', t),
                  ref: (t) => (this.minHandle = t),
                  role: 'slider',
                  style: { left: n },
                },
                K('div', { class: 'handle' }),
              ),
              f = K(
                'button',
                {
                  'aria-label': this.minLabel,
                  'aria-orientation': 'horizontal',
                  'aria-valuemax': this.max,
                  'aria-valuemin': this.min,
                  'aria-valuenow': this.minValue,
                  class: {
                    thumb: !0,
                    'thumb--minValue': !0,
                    'thumb--active': 'minValue' === this.dragProp,
                  },
                  disabled: this.disabled,
                  onBlur: () => (this.activeProp = null),
                  onFocus: () => (this.activeProp = 'minValue'),
                  onMouseDown: () => this.dragStart('minValue'),
                  onTouchStart: (t) => this.dragStart('minValue', t),
                  ref: (t) => (this.minHandle = t),
                  role: 'slider',
                  style: { left: n },
                },
                K(
                  'span',
                  { 'aria-hidden': 'true', class: 'handle__label handle__label--minValue' },
                  this.minValue && this.minValue.toLocaleString(),
                ),
                K(
                  'span',
                  { 'aria-hidden': 'true', class: 'handle__label handle__label--minValue static' },
                  this.minValue && this.minValue.toLocaleString(),
                ),
                K(
                  'span',
                  {
                    'aria-hidden': 'true',
                    class: 'handle__label handle__label--minValue transformed',
                  },
                  this.minValue && this.minValue.toLocaleString(),
                ),
                K('div', { class: 'handle' }),
              ),
              b = K(
                'button',
                {
                  'aria-label': this.minLabel,
                  'aria-orientation': 'horizontal',
                  'aria-valuemax': this.max,
                  'aria-valuemin': this.min,
                  'aria-valuenow': this.minValue,
                  class: {
                    thumb: !0,
                    'thumb--minValue': !0,
                    'thumb--active': 'minValue' === this.dragProp,
                  },
                  disabled: this.disabled,
                  onBlur: () => (this.activeProp = null),
                  onFocus: () => (this.activeProp = 'minValue'),
                  onMouseDown: () => this.dragStart('minValue'),
                  onTouchStart: (t) => this.dragStart('minValue', t),
                  ref: (t) => (this.minHandle = t),
                  role: 'slider',
                  style: { left: n },
                },
                K('div', { class: 'handle' }),
                K(
                  'span',
                  { 'aria-hidden': 'true', class: 'handle__label handle__label--minValue' },
                  this.minValue && this.minValue.toLocaleString(),
                ),
                K(
                  'span',
                  { 'aria-hidden': 'true', class: 'handle__label handle__label--minValue static' },
                  this.minValue && this.minValue.toLocaleString(),
                ),
                K(
                  'span',
                  {
                    'aria-hidden': 'true',
                    class: 'handle__label handle__label--minValue transformed',
                  },
                  this.minValue && this.minValue.toLocaleString(),
                ),
              ),
              g = K(
                'button',
                {
                  'aria-label': this.minLabel,
                  'aria-orientation': 'horizontal',
                  'aria-valuemax': this.max,
                  'aria-valuemin': this.min,
                  'aria-valuenow': this.minValue,
                  class: {
                    thumb: !0,
                    'thumb--minValue': !0,
                    'thumb--active': 'minValue' === this.dragProp,
                    'thumb--precise': !0,
                  },
                  disabled: this.disabled,
                  onBlur: () => (this.activeProp = null),
                  onFocus: () => (this.activeProp = 'minValue'),
                  onMouseDown: () => this.dragStart('minValue'),
                  onTouchStart: (t) => this.dragStart('minValue', t),
                  ref: (t) => (this.minHandle = t),
                  role: 'slider',
                  style: { left: n },
                },
                K('div', { class: 'handle-extension' }),
                K('div', { class: 'handle' }),
              ),
              v = K(
                'button',
                {
                  'aria-label': this.minLabel,
                  'aria-orientation': 'horizontal',
                  'aria-valuemax': this.max,
                  'aria-valuemin': this.min,
                  'aria-valuenow': this.minValue,
                  class: {
                    thumb: !0,
                    'thumb--minValue': !0,
                    'thumb--active': 'minValue' === this.dragProp,
                    'thumb--precise': !0,
                  },
                  disabled: this.disabled,
                  onBlur: () => (this.activeProp = null),
                  onFocus: () => (this.activeProp = 'minValue'),
                  onMouseDown: () => this.dragStart('minValue'),
                  onTouchStart: (t) => this.dragStart('minValue', t),
                  ref: (t) => (this.minHandle = t),
                  role: 'slider',
                  style: { left: n },
                },
                K('div', { class: 'handle-extension' }),
                K('div', { class: 'handle' }),
                K(
                  'span',
                  { 'aria-hidden': 'true', class: 'handle__label handle__label--minValue' },
                  this.minValue && this.minValue.toLocaleString(),
                ),
                K(
                  'span',
                  { 'aria-hidden': 'true', class: 'handle__label handle__label--minValue static' },
                  this.minValue && this.minValue.toLocaleString(),
                ),
                K(
                  'span',
                  {
                    'aria-hidden': 'true',
                    class: 'handle__label handle__label--minValue transformed',
                  },
                  this.minValue && this.minValue.toLocaleString(),
                ),
              );
            return K(
              J,
              { id: t },
              K(
                'div',
                { class: { container: !0, 'container--range': this.isRange } },
                this.renderGraph(),
                K(
                  'div',
                  { class: 'track' },
                  K('div', {
                    class: 'track__range',
                    onMouseDown: () => this.dragStart('minMaxValue'),
                    onTouchStart: (t) => this.dragStart('minMaxValue', t),
                    style: { left: n, right: o },
                  }),
                  K(
                    'div',
                    { class: 'ticks' },
                    this.tickValues.map((t) =>
                      K(
                        'span',
                        {
                          class: { tick: !0, 'tick--active': t >= e && t <= i },
                          style: { left: 100 * this.getUnitInterval(t) + '%' },
                        },
                        this.renderTickLabel(t),
                      ),
                    ),
                  ),
                ),
                !this.precise && !this.labelHandles && this.isRange && m,
                !this.hasHistogram && !this.precise && this.labelHandles && this.isRange && f,
                this.precise && !this.labelHandles && this.isRange && g,
                this.precise && this.labelHandles && this.isRange && v,
                this.hasHistogram && !this.precise && this.labelHandles && this.isRange && b,
                !this.precise && !this.labelHandles && s,
                !this.hasHistogram && !this.precise && this.labelHandles && l,
                !this.hasHistogram && this.precise && !this.labelHandles && h,
                this.hasHistogram && this.precise && !this.labelHandles && u,
                !this.hasHistogram && this.precise && this.labelHandles && d,
                this.hasHistogram && !this.precise && this.labelHandles && c,
                this.hasHistogram && this.precise && this.labelHandles && p,
              ),
            );
          }
          renderGraph() {
            return this.histogram
              ? K(
                  'div',
                  { class: 'graph' },
                  K('calcite-graph', {
                    data: this.histogram,
                    height: 48,
                    highlightMax: this.isRange ? this.maxValue : this.value,
                    highlightMin: this.isRange ? this.minValue : this.min,
                    width: 300,
                  }),
                )
              : null;
          }
          renderTickLabel(t) {
            const e = t === this.min,
              i = t === this.max,
              a = K(
                'span',
                { class: { tick__label: !0, 'tick__label--min': e, 'tick__label--max': i } },
                t.toLocaleString(),
              );
            return (this.labelTicks && !this.hasHistogram && !this.isRange) ||
              (this.labelTicks &&
                !this.hasHistogram &&
                this.isRange &&
                !this.precise &&
                !this.labelHandles) ||
              (this.labelTicks &&
                !this.hasHistogram &&
                this.isRange &&
                !this.precise &&
                this.labelHandles) ||
              (this.labelTicks && !this.hasHistogram && this.isRange && this.precise && (e || i)) ||
              (this.labelTicks && this.hasHistogram && !this.precise && !this.labelHandles) ||
              (this.labelTicks &&
                this.hasHistogram &&
                this.precise &&
                !this.labelHandles &&
                (e || i)) ||
              (this.labelTicks &&
                this.hasHistogram &&
                !this.precise &&
                this.labelHandles &&
                (e || i)) ||
              (this.labelTicks &&
                this.hasHistogram &&
                this.precise &&
                this.labelHandles &&
                (e || i))
              ? a
              : null;
          }
          handleLabelFocus(t) {
            t.detail.interactedEl !== this.el && ee(t.detail.labelEl, this.el) && this.setFocus();
          }
          keyDownHandler(t) {
            const e = this[this.activeProp];
            switch (qt(t.key)) {
              case 'ArrowUp':
              case 'ArrowRight':
                t.preventDefault(),
                  (this[this.activeProp] = this.bound(e + this.step, this.activeProp)),
                  this.emitChange();
                break;
              case 'ArrowDown':
              case 'ArrowLeft':
                t.preventDefault(),
                  (this[this.activeProp] = this.bound(e - this.step, this.activeProp)),
                  this.emitChange();
                break;
              case 'PageUp':
                this.pageStep &&
                  (t.preventDefault(),
                  (this[this.activeProp] = this.bound(e + this.pageStep, this.activeProp)),
                  this.emitChange());
                break;
              case 'PageDown':
                this.pageStep &&
                  (t.preventDefault(),
                  (this[this.activeProp] = this.bound(e - this.pageStep, this.activeProp)),
                  this.emitChange());
                break;
              case 'Home':
                t.preventDefault(),
                  (this[this.activeProp] = this.bound(this.min, this.activeProp)),
                  this.emitChange();
                break;
              case 'End':
                t.preventDefault(),
                  (this[this.activeProp] = this.bound(this.max, this.activeProp)),
                  this.emitChange();
            }
          }
          mouseHandler(t) {
            const e = t.clientX || t.pageX,
              i = this.translate(e);
            let a = 'value';
            if (
              (this.isRange &&
                (a =
                  i >= this.minValue && i <= this.maxValue && 'minMaxValue' === this.lastDragProp
                    ? 'minMaxValue'
                    : Math.abs(this.maxValue - i) < Math.abs(this.minValue - i)
                    ? 'maxValue'
                    : 'minValue'),
              (this[a] = this.bound(i, a)),
              this.dragStart(a),
              'click' === t.type)
            )
              switch ((this.dragEnd(), this.emitChange(), a)) {
                default:
                case 'maxValue':
                  this.maxHandle.focus();
                  break;
                case 'minValue':
                  this.minHandle.focus();
                  break;
                case 'minMaxValue':
              }
          }
          async setFocus() {
            (this.minHandle ? this.minHandle : this.maxHandle).focus();
          }
          generateTickValues() {
            const t = [];
            let e = this.min;
            for (; this.ticks && e < this.max + this.ticks; ) t.push(e), (e += this.ticks);
            return t;
          }
          dragStart(t, e) {
            e && e.preventDefault(),
              this.dragListener && this.dragEnd(),
              (this.dragProp = t),
              (this.lastDragProp = this.dragProp),
              (this.activeProp = t),
              (this.dragListener = this.dragListener || this.dragUpdate.bind(this)),
              document.addEventListener('mousemove', this.dragListener),
              document.addEventListener('touchmove', this.dragListener, { capture: !1 }),
              document.addEventListener('mouseup', this.dragEnd.bind(this)),
              document.addEventListener('touchend', this.dragEnd.bind(this), !1),
              document.addEventListener('touchcancel', this.dragEnd.bind(this));
          }
          dragUpdate(t) {
            if ((t.preventDefault(), t.stopPropagation(), this.dragProp)) {
              const e = this.translate(t.clientX || t.pageX);
              if (this.isRange && 'minMaxValue' === this.dragProp)
                if (this.minValueDragRange && this.maxValueDragRange && this.minMaxValueRange) {
                  const t = e - this.minValueDragRange,
                    i = e + this.maxValueDragRange;
                  i <= this.max &&
                    t >= this.min &&
                    i - t === this.minMaxValueRange &&
                    ((this.minValue = this.bound(t, 'minValue')),
                    (this.maxValue = this.bound(i, 'maxValue')));
                } else
                  (this.minValueDragRange = e - this.minValue),
                    (this.maxValueDragRange = this.maxValue - e),
                    (this.minMaxValueRange = this.maxValue - this.minValue);
              else this[this.dragProp] = this.bound(e, this.dragProp);
              this.emitChange();
            }
          }
          emitChange() {
            this.calciteSliderChange.emit(), this.calciteSliderUpdate.emit();
          }
          dragEnd() {
            (this.dragProp = null),
              document.removeEventListener('mousemove', this.dragListener),
              document.removeEventListener('touchmove', this.dragListener),
              (this.minValueDragRange = null),
              (this.maxValueDragRange = null),
              (this.minMaxValueRange = null);
          }
          bound(t, e) {
            return (
              (t = Math.min(t, this.max)),
              (t = Math.max(t, this.min)),
              'maxValue' === e && (t = Math.max(t, this.minValue)),
              'minValue' === e && (t = Math.min(t, this.maxValue)),
              t
            );
          }
          translate(t) {
            const e = this.max - this.min,
              { left: i, width: a } = this.el.getBoundingClientRect(),
              r = (t - i) / a;
            let n = this.bound(this.min + e * r);
            return this.snap && this.step && (n = this.getClosestStep(n)), n;
          }
          getClosestStep(t) {
            if (((t = this.bound(t)), this.step)) {
              const e = Math.round(t / this.step) * this.step;
              t = this.bound(e);
            }
            return t;
          }
          getFontSizeForElement(t) {
            return Number(window.getComputedStyle(t).getPropertyValue('font-size').match(/\d+/)[0]);
          }
          getUnitInterval(t) {
            t = this.bound(t);
            const e = this.max - this.min;
            return (t - this.min) / e;
          }
          adjustHostObscuredHandleLabel(t) {
            const e = this.el.shadowRoot.querySelector(`.handle__label--${t}`),
              i = this.el.shadowRoot.querySelector(`.handle__label--${t}.static`),
              a = this.el.shadowRoot.querySelector(`.handle__label--${t}.transformed`),
              r = this.getHostOffset(
                i.getBoundingClientRect().left,
                i.getBoundingClientRect().right,
              );
            (e.style.transform = `translateX(${r}px)`), (a.style.transform = `translateX(${r}px)`);
          }
          hyphenateCollidingRangeHandleLabels() {
            const t = this.el.shadowRoot.querySelector('.handle__label--minValue'),
              e = this.el.shadowRoot.querySelector('.handle__label--minValue.static'),
              i = this.el.shadowRoot.querySelector('.handle__label--minValue.transformed'),
              a = this.getHostOffset(
                e.getBoundingClientRect().left,
                e.getBoundingClientRect().right,
              ),
              r = this.el.shadowRoot.querySelector('.handle__label--value'),
              n = this.el.shadowRoot.querySelector('.handle__label--value.static'),
              o = this.el.shadowRoot.querySelector('.handle__label--value.transformed'),
              s = this.getHostOffset(
                n.getBoundingClientRect().left,
                n.getBoundingClientRect().right,
              ),
              l = this.getFontSizeForElement(t),
              c = this.getRangeLabelOverlap(i, o);
            if (c > 0)
              if ((t.classList.add('hyphen'), 0 === s && 0 === a)) {
                let e = c / 2 - l / 2;
                e = -1 === Math.sign(e) ? Math.abs(e) : -e;
                const a = this.getHostOffset(
                  i.getBoundingClientRect().left + e - l / 2,
                  i.getBoundingClientRect().right + e - l / 2,
                );
                let n = c / 2;
                const s = this.getHostOffset(
                  o.getBoundingClientRect().left + n,
                  o.getBoundingClientRect().right + n,
                );
                0 !== a && ((e += a), (n += a)),
                  0 !== s && ((e += s), (n += s)),
                  (t.style.transform = `translateX(${e}px)`),
                  (i.style.transform = `translateX(${e - l / 2}px)`),
                  (r.style.transform = `translateX(${n}px)`),
                  (o.style.transform = `translateX(${n}px)`);
              } else if (0 === a || (0 !== Math.sign(s) && 1 !== Math.sign(s))) {
                if (0 !== s) {
                  let e = Math.abs(a) + c - l / 2;
                  (e = -1 === Math.sign(e) ? Math.abs(e) : -e),
                    (t.style.transform = `translateX(${e}px)`),
                    (i.style.transform = `translateX(${e - l / 2}px)`);
                }
              } else
                (t.style.transform = `translateX(${a + l / 2}px)`),
                  (r.style.transform = `translateX(${c + s}px)`),
                  (o.style.transform = `translateX(${c + s}px)`);
            else
              t.classList.remove('hyphen'),
                (t.style.transform = `translateX(${a}px)`),
                (i.style.transform = `translateX(${a}px)`),
                (r.style.transform = `translateX(${s}px)`),
                (o.style.transform = `translateX(${s}px)`);
          }
          hideObscuredBoundingTickLabels() {
            if (!(this.hasHistogram || this.isRange || this.labelHandles || this.precise)) return;
            if (!this.hasHistogram && !this.isRange && this.labelHandles && !this.precise) return;
            if (!this.hasHistogram && !this.isRange && !this.labelHandles && this.precise) return;
            if (!this.hasHistogram && !this.isRange && this.labelHandles && this.precise) return;
            if (!this.hasHistogram && this.isRange && !this.precise) return;
            if (this.hasHistogram && !this.precise && !this.labelHandles) return;
            const t = this.el.shadowRoot.querySelector('.thumb--minValue'),
              e = this.el.shadowRoot.querySelector('.thumb--value'),
              i = this.el.shadowRoot.querySelector('.tick__label--min'),
              a = this.el.shadowRoot.querySelector('.tick__label--max');
            !t &&
              e &&
              i &&
              a &&
              (this.isMinTickLabelObscured(i, e)
                ? (i.style.opacity = '0')
                : (i.style.opacity = '1'),
              this.isMaxTickLabelObscured(a, e)
                ? (a.style.opacity = '0')
                : (a.style.opacity = '1')),
              t &&
                e &&
                i &&
                a &&
                (this.isMinTickLabelObscured(i, t) || this.isMinTickLabelObscured(i, e)
                  ? (i.style.opacity = '0')
                  : (i.style.opacity = '1'),
                this.isMaxTickLabelObscured(a, t) ||
                (this.isMaxTickLabelObscured(a, e) && this.hasHistogram)
                  ? (a.style.opacity = '0')
                  : (a.style.opacity = '1'));
          }
          getHostOffset(t, e) {
            const i = this.el.getBoundingClientRect();
            return t + 7 < i.left ? i.left - t - 7 : e - 7 > i.right ? 7 - (e - i.right) : 0;
          }
          getRangeLabelOverlap(t, e) {
            const i = t.getBoundingClientRect(),
              a = e.getBoundingClientRect(),
              r = this.getFontSizeForElement(t),
              n = i.right + r - a.left;
            return n > 0 ? n : 0;
          }
          isMinTickLabelObscured(t, e) {
            const i = t.getBoundingClientRect();
            return e.getBoundingClientRect().left < i.right;
          }
          isMaxTickLabelObscured(t, e) {
            const i = t.getBoundingClientRect();
            return e.getBoundingClientRect().right > i.left;
          }
          get el() {
            return this;
          }
          static get watchers() {
            return { histogram: ['histogramWatcher'] };
          }
          static get style() {
            return '@charset "UTF-8";@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host{display:block}.container{display:block;padding:7px 0;margin:7px 0;position:relative}:host([disabled]){opacity:var(--calcite-ui-opacity-disabled);pointer-events:none}:host([disabled]) .track__range,:host([disabled]) .tick--active{background-color:var(--calcite-ui-text-3)}:host([disabled]) .graph .graph-path--highlight{fill:var(--calcite-ui-text-3)}:host([label-handles]) .container,:host([precise]:not([precise=false])) .container{margin-top:21px}:host([label-ticks]),:host([precise]:not([precise=false])) .container--range{margin-bottom:21px}:host([precise]:not([precise=false])[label-handles]) .container{margin-top:35px}:host([precise]:not([precise=false])[label-handles]) .container--range{margin-bottom:35px}.thumb{position:absolute;border:none;background:transparent;cursor:pointer;font-family:inherit;z-index:2;outline:none;padding:0;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-webkit-transform:translate(7px, -8px);transform:translate(7px, -8px)}.thumb .handle__label{font-size:0.75rem;line-height:1.5;font-weight:500;line-height:1;color:var(--calcite-ui-text-2);margin-bottom:5px}.thumb .handle__label.static,.thumb .handle__label.transformed{opacity:0;position:absolute;top:0;bottom:0}.thumb .handle__label--minValue.hyphen::after{content:"—";display:inline-block;width:1em}.thumb .handle{outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;height:14px;width:14px;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:100%;background-color:var(--calcite-ui-foreground-1);-webkit-box-shadow:0 0 0 2px var(--calcite-ui-text-3) inset;box-shadow:0 0 0 2px var(--calcite-ui-text-3) inset;-webkit-transition:border 0.25s ease, background-color 0.25s ease, -webkit-box-shadow 0.25s ease;transition:border 0.25s ease, background-color 0.25s ease, -webkit-box-shadow 0.25s ease;transition:border 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;transition:border 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease, -webkit-box-shadow 0.25s ease}.thumb .handle-extension{width:2px;height:7px;background-color:var(--calcite-ui-text-3)}.thumb:hover .handle{-webkit-box-shadow:0 0 0 3px var(--calcite-ui-brand) inset;box-shadow:0 0 0 3px var(--calcite-ui-brand) inset}.thumb:hover .handle-extension{background-color:var(--calcite-ui-brand)}.thumb:focus .handle{outline:2px solid var(--calcite-ui-brand);outline-offset:2px;outline-offset:2px}.thumb:focus .handle-extension{background-color:var(--calcite-ui-brand)}.thumb--minValue{-webkit-transform:translate(-7px, -8px);transform:translate(-7px, -8px)}:host([label-handles]) .thumb{-webkit-transform:translate(50%, -25px);transform:translate(50%, -25px)}:host([label-handles]) .thumb--minValue{-webkit-transform:translate(-50%, -25px);transform:translate(-50%, -25px)}:host([has-histogram][label-handles]) .thumb{-webkit-transform:translate(50%, -8px);transform:translate(50%, -8px)}:host([has-histogram][label-handles]) .thumb .handle__label{margin-bottom:unset;margin-top:5px}:host([has-histogram][label-handles]) .thumb--minValue{-webkit-transform:translate(-50%, -8px);transform:translate(-50%, -8px)}:host([precise]:not([precise=false])) .thumb{-webkit-transform:translate(7px, -21px);transform:translate(7px, -21px)}:host([precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-7px, -2px);transform:translate(-7px, -2px)}:host([precise]:not([precise=false])) .thumb--minValue .handle__label{margin-bottom:unset;margin-top:5px}:host([has-histogram][precise]:not([precise=false])) .thumb{-webkit-transform:translate(7px, -2px);transform:translate(7px, -2px)}:host([has-histogram][precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-50%, -2px);transform:translate(-50%, -2px)}:host([ticks][precise]:not([precise=false])) .thumb{-webkit-transform:translate(7px, -20px);transform:translate(7px, -20px)}:host([ticks][precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-7px, -3px);transform:translate(-7px, -3px)}:host([has-histogram][ticks][precise]:not([precise=false])) .thumb{-webkit-transform:translate(7px, -3px);transform:translate(7px, -3px)}:host([has-histogram][ticks][precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-50%, -3px);transform:translate(-50%, -3px)}:host([label-handles][precise]:not([precise=false])) .thumb{-webkit-transform:translate(50%, -38px);transform:translate(50%, -38px)}:host([label-handles][precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-50%, -2px);transform:translate(-50%, -2px)}:host([has-histogram][label-handles][precise]:not([precise=false])) .thumb{-webkit-transform:translate(50%, -2px);transform:translate(50%, -2px)}:host([has-histogram][label-handles][precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-50%, -2px);transform:translate(-50%, -2px)}:host([ticks][label-handles][precise]:not([precise=false])) .thumb{-webkit-transform:translate(50%, -37px);transform:translate(50%, -37px)}:host([ticks][label-handles][precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-50%, -3px);transform:translate(-50%, -3px)}:host([has-histogram][ticks][label-handles][precise]:not([precise=false])) .thumb{-webkit-transform:translate(50%, -3px);transform:translate(50%, -3px)}:host([has-histogram][ticks][label-handles][precise]:not([precise=false])) .thumb--minValue{-webkit-transform:translate(-50%, -3px);transform:translate(-50%, -3px)}.thumb:focus,.thumb--active{z-index:3}.thumb:focus .handle,.thumb--active .handle{background-color:var(--calcite-ui-brand);-webkit-box-shadow:0 0 8px 0 rgba(0, 0, 0, 0.16);box-shadow:0 0 8px 0 rgba(0, 0, 0, 0.16)}.thumb:hover.thumb--precise:after,.thumb:focus.thumb--precise:after,.thumb--active.thumb--precise:after{background-color:var(--calcite-ui-brand)}.track{height:2px;border-radius:0;z-index:1;background-color:var(--calcite-ui-border-2);-webkit-transition:all 250ms ease-in;transition:all 250ms ease-in;position:relative}.track__range{position:absolute;top:0;height:2px;background-color:var(--calcite-ui-brand)}.container--range .track__range:hover{cursor:ew-resize}.container--range .track__range:after{content:"";position:absolute;top:-5px;width:100%;height:14px}.tick{position:absolute;top:-2px;width:2px;height:4px;left:var(--calcite-ui-border-1-offset);margin-left:-2px;border:1px solid var(--calcite-ui-foreground-1);background-color:var(--calcite-ui-border-1)}.tick--active{background-color:var(--calcite-ui-brand)}.tick__label{position:absolute;font-size:0.75rem;line-height:1.5;font-weight:500;color:var(--calcite-ui-text-2);width:4em;margin:14px -2em;text-align:center;display:block;pointer-events:none}.tick__label--min{left:0;margin:14px -3px;text-align:left;-webkit-transition:opacity 150ms;transition:opacity 150ms}.tick__label--max{left:unset;right:0;margin:14px -3px;text-align:right;-webkit-transition:opacity 50ms;transition:opacity 50ms}:host([has-histogram][label-handles]) .tick__label--min,:host([has-histogram][label-handles]) .tick__label--max{margin:6px -3px;font-weight:300;color:var(--calcite-ui-text-3)}:host([has-histogram][precise]:not([precise=false])) .tick__label--min,:host([has-histogram][precise]:not([precise=false])) .tick__label--max{margin:6px -3px;font-weight:300;color:var(--calcite-ui-text-3)}.graph{width:100%;height:48px;position:relative;color:var(--calcite-ui-foreground-2)}.graph svg{position:absolute;width:100%;height:48px}.graph .graph-path--highlight{fill:var(--calcite-ui-brand);opacity:0.25}';
          }
        };
      function ra(t) {
        return (ra =
          'function' == typeof Symbol && 'symbol' == typeof Symbol.iterator
            ? function (t) {
                return typeof t;
              }
            : function (t) {
                return t &&
                  'function' == typeof Symbol &&
                  t.constructor === Symbol &&
                  t !== Symbol.prototype
                  ? 'symbol'
                  : typeof t;
              })(t);
      }
      function na(t, e, i) {
        return (
          e in t
            ? Object.defineProperty(t, e, {
                value: i,
                enumerable: !0,
                configurable: !0,
                writable: !0,
              })
            : (t[e] = i),
          t
        );
      }
      function oa() {
        return (oa =
          Object.assign ||
          function (t) {
            for (var e = 1; e < arguments.length; e++) {
              var i = arguments[e];
              for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (t[a] = i[a]);
            }
            return t;
          }).apply(this, arguments);
      }
      function sa(t) {
        for (var e = 1; e < arguments.length; e++) {
          var i = null != arguments[e] ? arguments[e] : {},
            a = Object.keys(i);
          'function' == typeof Object.getOwnPropertySymbols &&
            (a = a.concat(
              Object.getOwnPropertySymbols(i).filter(function (t) {
                return Object.getOwnPropertyDescriptor(i, t).enumerable;
              }),
            )),
            a.forEach(function (e) {
              na(t, e, i[e]);
            });
        }
        return t;
      }
      function la(t, e) {
        if (null == t) return {};
        var i,
          a,
          r = (function (t, e) {
            if (null == t) return {};
            var i,
              a,
              r = {},
              n = Object.keys(t);
            for (a = 0; a < n.length; a++) (i = n[a]), e.indexOf(i) >= 0 || (r[i] = t[i]);
            return r;
          })(t, e);
        if (Object.getOwnPropertySymbols) {
          var n = Object.getOwnPropertySymbols(t);
          for (a = 0; a < n.length; a++)
            (i = n[a]),
              e.indexOf(i) >= 0 ||
                (Object.prototype.propertyIsEnumerable.call(t, i) && (r[i] = t[i]));
        }
        return r;
      }
      function ca(t) {
        if ('undefined' != typeof window && window.navigator) return !!navigator.userAgent.match(t);
      }
      var ha = ca(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),
        ua = ca(/Edge/i),
        da = ca(/firefox/i),
        pa = ca(/safari/i) && !ca(/chrome/i) && !ca(/android/i),
        ma = ca(/iP(ad|od|hone)/i),
        fa = ca(/chrome/i) && ca(/android/i),
        ba = { capture: !1, passive: !1 };
      function ga(t, e, i) {
        t.addEventListener(e, i, !ha && ba);
      }
      function va(t, e, i) {
        t.removeEventListener(e, i, !ha && ba);
      }
      function ya(t, e) {
        if (e) {
          if (('>' === e[0] && (e = e.substring(1)), t))
            try {
              if (t.matches) return t.matches(e);
              if (t.msMatchesSelector) return t.msMatchesSelector(e);
              if (t.webkitMatchesSelector) return t.webkitMatchesSelector(e);
            } catch (t) {
              return !1;
            }
          return !1;
        }
      }
      function wa(t) {
        return t.host && t !== document && t.host.nodeType ? t.host : t.parentNode;
      }
      function xa(t, e, i, a) {
        if (t) {
          i = i || document;
          do {
            if (
              (null != e && ('>' === e[0] ? t.parentNode === i && ya(t, e) : ya(t, e))) ||
              (a && t === i)
            )
              return t;
            if (t === i) break;
          } while ((t = wa(t)));
        }
        return null;
      }
      var ka,
        _a = /\s+/g;
      function Sa(t, e, i) {
        if (t && e)
          if (t.classList) t.classList[i ? 'add' : 'remove'](e);
          else {
            var a = (' ' + t.className + ' ').replace(_a, ' ').replace(' ' + e + ' ', ' ');
            t.className = (a + (i ? ' ' + e : '')).replace(_a, ' ');
          }
      }
      function Da(t, e, i) {
        var a = t && t.style;
        if (a) {
          if (void 0 === i)
            return (
              document.defaultView && document.defaultView.getComputedStyle
                ? (i = document.defaultView.getComputedStyle(t, ''))
                : t.currentStyle && (i = t.currentStyle),
              void 0 === e ? i : i[e]
            );
          e in a || -1 !== e.indexOf('webkit') || (e = '-webkit-' + e),
            (a[e] = i + ('string' == typeof i ? '' : 'px'));
        }
      }
      function Ca(t, e) {
        var i = '';
        if ('string' == typeof t) i = t;
        else
          do {
            var a = Da(t, 'transform');
            a && 'none' !== a && (i = a + ' ' + i);
          } while (!e && (t = t.parentNode));
        var r =
          window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
        return r && new r(i);
      }
      function Ta(t, e, i) {
        if (t) {
          var a = t.getElementsByTagName(e),
            r = 0,
            n = a.length;
          if (i) for (; r < n; r++) i(a[r], r);
          return a;
        }
        return [];
      }
      function $a() {
        return document.scrollingElement || document.documentElement;
      }
      function Ia(t, e, i, a, r) {
        if (t.getBoundingClientRect || t === window) {
          var n, o, s, l, c, h, u;
          if (
            (t !== window && t.parentNode && t !== $a()
              ? ((o = (n = t.getBoundingClientRect()).top),
                (s = n.left),
                (l = n.bottom),
                (c = n.right),
                (h = n.height),
                (u = n.width))
              : ((o = 0),
                (s = 0),
                (l = window.innerHeight),
                (c = window.innerWidth),
                (h = window.innerHeight),
                (u = window.innerWidth)),
            (e || i) && t !== window && ((r = r || t.parentNode), !ha))
          )
            do {
              if (
                r &&
                r.getBoundingClientRect &&
                ('none' !== Da(r, 'transform') || (i && 'static' !== Da(r, 'position')))
              ) {
                var d = r.getBoundingClientRect();
                (o -= d.top + parseInt(Da(r, 'border-top-width'))),
                  (s -= d.left + parseInt(Da(r, 'border-left-width'))),
                  (l = o + n.height),
                  (c = s + n.width);
                break;
              }
            } while ((r = r.parentNode));
          if (a && t !== window) {
            var p = Ca(r || t),
              m = p && p.a,
              f = p && p.d;
            p && ((l = (o /= f) + (h /= f)), (c = (s /= m) + (u /= m)));
          }
          return { top: o, left: s, bottom: l, right: c, width: u, height: h };
        }
      }
      function Aa(t, e, i) {
        for (var a = Ma(t, !0), r = Ia(t)[e]; a; ) {
          var n = Ia(a)[i];
          if (!('top' === i || 'left' === i ? r >= n : r <= n)) return a;
          if (a === $a()) break;
          a = Ma(a, !1);
        }
        return !1;
      }
      function Ea(t, e, i) {
        for (var a = 0, r = 0, n = t.children; r < n.length; ) {
          if (
            'none' !== n[r].style.display &&
            n[r] !== Pr.ghost &&
            n[r] !== Pr.dragged &&
            xa(n[r], i.draggable, t, !1)
          ) {
            if (a === e) return n[r];
            a++;
          }
          r++;
        }
        return null;
      }
      function Oa(t, e) {
        for (
          var i = t.lastElementChild;
          i && (i === Pr.ghost || 'none' === Da(i, 'display') || (e && !ya(i, e)));

        )
          i = i.previousElementSibling;
        return i || null;
      }
      function Ra(t, e) {
        var i = 0;
        if (!t || !t.parentNode) return -1;
        for (; (t = t.previousElementSibling); )
          'TEMPLATE' === t.nodeName.toUpperCase() || t === Pr.clone || (e && !ya(t, e)) || i++;
        return i;
      }
      function Na(t) {
        var e = 0,
          i = 0,
          a = $a();
        if (t)
          do {
            var r = Ca(t),
              n = r.a,
              o = r.d;
            (e += t.scrollLeft * n), (i += t.scrollTop * o);
          } while (t !== a && (t = t.parentNode));
        return [e, i];
      }
      function Ma(t, e) {
        if (!t || !t.getBoundingClientRect) return $a();
        var i = t,
          a = !1;
        do {
          if (i.clientWidth < i.scrollWidth || i.clientHeight < i.scrollHeight) {
            var r = Da(i);
            if (
              (i.clientWidth < i.scrollWidth &&
                ('auto' == r.overflowX || 'scroll' == r.overflowX)) ||
              (i.clientHeight < i.scrollHeight &&
                ('auto' == r.overflowY || 'scroll' == r.overflowY))
            ) {
              if (!i.getBoundingClientRect || i === document.body) return $a();
              if (a || e) return i;
              a = !0;
            }
          }
        } while ((i = i.parentNode));
        return $a();
      }
      function Pa(t, e) {
        return (
          Math.round(t.top) === Math.round(e.top) &&
          Math.round(t.left) === Math.round(e.left) &&
          Math.round(t.height) === Math.round(e.height) &&
          Math.round(t.width) === Math.round(e.width)
        );
      }
      function La(t, e) {
        return function () {
          if (!ka) {
            var i = arguments,
              a = this;
            1 === i.length ? t.call(a, i[0]) : t.apply(a, i),
              (ka = setTimeout(function () {
                ka = void 0;
              }, e));
          }
        };
      }
      function Ha(t, e, i) {
        (t.scrollLeft += e), (t.scrollTop += i);
      }
      function Fa(t) {
        var e = window.Polymer,
          i = window.jQuery || window.Zepto;
        return e && e.dom ? e.dom(t).cloneNode(!0) : i ? i(t).clone(!0)[0] : t.cloneNode(!0);
      }
      var za = 'Sortable' + new Date().getTime(),
        ja = [],
        Va = { initializeByDefault: !0 },
        Ua = {
          mount: function (t) {
            for (var e in Va) Va.hasOwnProperty(e) && !(e in t) && (t[e] = Va[e]);
            ja.forEach(function (e) {
              if (e.pluginName === t.pluginName)
                throw 'Sortable: Cannot mount plugin '.concat(t.pluginName, ' more than once');
            }),
              ja.push(t);
          },
          pluginEvent: function (t, e, i) {
            var a = this;
            (this.eventCanceled = !1),
              (i.cancel = function () {
                a.eventCanceled = !0;
              });
            var r = t + 'Global';
            ja.forEach(function (a) {
              e[a.pluginName] &&
                (e[a.pluginName][r] && e[a.pluginName][r](sa({ sortable: e }, i)),
                e.options[a.pluginName] &&
                  e[a.pluginName][t] &&
                  e[a.pluginName][t](sa({ sortable: e }, i)));
            });
          },
          initializePlugins: function (t, e, i, a) {
            for (var r in (ja.forEach(function (a) {
              var r = a.pluginName;
              if (t.options[r] || a.initializeByDefault) {
                var n = new a(t, e, t.options);
                (n.sortable = t), (n.options = t.options), (t[r] = n), oa(i, n.defaults);
              }
            }),
            t.options))
              if (t.options.hasOwnProperty(r)) {
                var n = this.modifyOption(t, r, t.options[r]);
                void 0 !== n && (t.options[r] = n);
              }
          },
          getEventProperties: function (t, e) {
            var i = {};
            return (
              ja.forEach(function (a) {
                'function' == typeof a.eventProperties &&
                  oa(i, a.eventProperties.call(e[a.pluginName], t));
              }),
              i
            );
          },
          modifyOption: function (t, e, i) {
            var a;
            return (
              ja.forEach(function (r) {
                t[r.pluginName] &&
                  r.optionListeners &&
                  'function' == typeof r.optionListeners[e] &&
                  (a = r.optionListeners[e].call(t[r.pluginName], i));
              }),
              a
            );
          },
        },
        Ba = function (t, e) {
          var i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {},
            a = i.evt,
            r = la(i, ['evt']);
          Ua.pluginEvent.bind(Pr)(
            t,
            e,
            sa(
              {
                dragEl: Wa,
                parentEl: Ga,
                ghostEl: Xa,
                rootEl: Ya,
                nextEl: Ka,
                lastDownEl: Za,
                cloneEl: Ja,
                cloneHidden: Qa,
                dragStarted: dr,
                putSortable: nr,
                activeSortable: Pr.active,
                originalEvent: a,
                oldIndex: tr,
                oldDraggableIndex: ir,
                newIndex: er,
                newDraggableIndex: ar,
                hideGhostForTarget: Or,
                unhideGhostForTarget: Rr,
                cloneNowHidden: function () {
                  Qa = !0;
                },
                cloneNowShown: function () {
                  Qa = !1;
                },
                dispatchSortableEvent: function (t) {
                  qa({ sortable: e, name: t, originalEvent: a });
                },
              },
              r,
            ),
          );
        };
      function qa(t) {
        !(function (t) {
          var e = t.sortable,
            i = t.rootEl,
            a = t.name,
            r = t.targetEl,
            n = t.cloneEl,
            o = t.toEl,
            s = t.fromEl,
            l = t.oldIndex,
            c = t.newIndex,
            h = t.oldDraggableIndex,
            u = t.newDraggableIndex,
            d = t.originalEvent,
            p = t.putSortable,
            m = t.extraEventProperties;
          if ((e = e || (i && i[za]))) {
            var f,
              b = e.options,
              g = 'on' + a.charAt(0).toUpperCase() + a.substr(1);
            !window.CustomEvent || ha || ua
              ? (f = document.createEvent('Event')).initEvent(a, !0, !0)
              : (f = new CustomEvent(a, { bubbles: !0, cancelable: !0 })),
              (f.to = o || i),
              (f.from = s || i),
              (f.item = r || i),
              (f.clone = n),
              (f.oldIndex = l),
              (f.newIndex = c),
              (f.oldDraggableIndex = h),
              (f.newDraggableIndex = u),
              (f.originalEvent = d),
              (f.pullMode = p ? p.lastPutMode : void 0);
            var v = sa({}, m, Ua.getEventProperties(a, e));
            for (var y in v) f[y] = v[y];
            i && i.dispatchEvent(f), b[g] && b[g].call(e, f);
          }
        })(
          sa(
            {
              putSortable: nr,
              cloneEl: Ja,
              targetEl: Wa,
              rootEl: Ya,
              oldIndex: tr,
              oldDraggableIndex: ir,
              newIndex: er,
              newDraggableIndex: ar,
            },
            t,
          ),
        );
      }
      var Wa,
        Ga,
        Xa,
        Ya,
        Ka,
        Za,
        Ja,
        Qa,
        tr,
        er,
        ir,
        ar,
        rr,
        nr,
        or,
        sr,
        lr,
        cr,
        hr,
        ur,
        dr,
        pr,
        mr,
        fr,
        br,
        gr = !1,
        vr = !1,
        yr = [],
        wr = !1,
        xr = !1,
        kr = [],
        _r = !1,
        Sr = [],
        Dr = 'undefined' != typeof document,
        Cr = ma,
        Tr = ua || ha ? 'cssFloat' : 'float',
        $r = Dr && !fa && !ma && 'draggable' in document.createElement('div'),
        Ir = (function () {
          if (Dr) {
            if (ha) return !1;
            var t = document.createElement('x');
            return (t.style.cssText = 'pointer-events:auto'), 'auto' === t.style.pointerEvents;
          }
        })(),
        Ar = function (t, e) {
          var i = Da(t),
            a =
              parseInt(i.width) -
              parseInt(i.paddingLeft) -
              parseInt(i.paddingRight) -
              parseInt(i.borderLeftWidth) -
              parseInt(i.borderRightWidth),
            r = Ea(t, 0, e),
            n = Ea(t, 1, e),
            o = r && Da(r),
            s = n && Da(n),
            l = o && parseInt(o.marginLeft) + parseInt(o.marginRight) + Ia(r).width,
            c = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + Ia(n).width;
          if ('flex' === i.display)
            return 'column' === i.flexDirection || 'column-reverse' === i.flexDirection
              ? 'vertical'
              : 'horizontal';
          if ('grid' === i.display)
            return i.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal';
          if (r && o.float && 'none' !== o.float) {
            var h = 'left' === o.float ? 'left' : 'right';
            return !n || ('both' !== s.clear && s.clear !== h) ? 'horizontal' : 'vertical';
          }
          return r &&
            ('block' === o.display ||
              'flex' === o.display ||
              'table' === o.display ||
              'grid' === o.display ||
              (l >= a && 'none' === i[Tr]) ||
              (n && 'none' === i[Tr] && l + c > a))
            ? 'vertical'
            : 'horizontal';
        },
        Er = function (t) {
          function e(t, i) {
            return function (a, r, n, o) {
              var s =
                a.options.group.name &&
                r.options.group.name &&
                a.options.group.name === r.options.group.name;
              if (null == t && (i || s)) return !0;
              if (null == t || !1 === t) return !1;
              if (i && 'clone' === t) return t;
              if ('function' == typeof t) return e(t(a, r, n, o), i)(a, r, n, o);
              var l = (i ? a : r).options.group.name;
              return !0 === t || ('string' == typeof t && t === l) || (t.join && t.indexOf(l) > -1);
            };
          }
          var i = {},
            a = t.group;
          (a && 'object' == ra(a)) || (a = { name: a }),
            (i.name = a.name),
            (i.checkPull = e(a.pull, !0)),
            (i.checkPut = e(a.put)),
            (i.revertClone = a.revertClone),
            (t.group = i);
        },
        Or = function () {
          !Ir && Xa && Da(Xa, 'display', 'none');
        },
        Rr = function () {
          !Ir && Xa && Da(Xa, 'display', '');
        };
      Dr &&
        document.addEventListener(
          'click',
          function (t) {
            if (vr)
              return (
                t.preventDefault(),
                t.stopPropagation && t.stopPropagation(),
                t.stopImmediatePropagation && t.stopImmediatePropagation(),
                (vr = !1),
                !1
              );
          },
          !0,
        );
      var Nr = function (t) {
          if (Wa) {
            t = t.touches ? t.touches[0] : t;
            var e =
              ((r = t.clientX),
              (n = t.clientY),
              yr.some(function (t) {
                if (!Oa(t)) {
                  var e = Ia(t),
                    i = t[za].options.emptyInsertThreshold,
                    a = r >= e.left - i && r <= e.right + i,
                    s = n >= e.top - i && n <= e.bottom + i;
                  return i && a && s ? (o = t) : void 0;
                }
              }),
              o);
            if (e) {
              var i = {};
              for (var a in t) t.hasOwnProperty(a) && (i[a] = t[a]);
              (i.target = i.rootEl = e),
                (i.preventDefault = void 0),
                (i.stopPropagation = void 0),
                e[za]._onDragOver(i);
            }
          }
          var r, n, o;
        },
        Mr = function (t) {
          Wa && Wa.parentNode[za]._isOutsideThisEl(t.target);
        };
      function Pr(t, e) {
        if (!t || !t.nodeType || 1 !== t.nodeType)
          throw 'Sortable: `el` must be an HTMLElement, not '.concat({}.toString.call(t));
        (this.el = t), (this.options = e = oa({}, e)), (t[za] = this);
        var i = {
          group: null,
          sort: !0,
          disabled: !1,
          store: null,
          handle: null,
          draggable: /^[uo]l$/i.test(t.nodeName) ? '>li' : '>*',
          swapThreshold: 1,
          invertSwap: !1,
          invertedSwapThreshold: null,
          removeCloneOnHide: !0,
          direction: function () {
            return Ar(t, this.options);
          },
          ghostClass: 'sortable-ghost',
          chosenClass: 'sortable-chosen',
          dragClass: 'sortable-drag',
          ignore: 'a, img',
          filter: null,
          preventOnFilter: !0,
          animation: 0,
          easing: null,
          setData: function (t, e) {
            t.setData('Text', e.textContent);
          },
          dropBubble: !1,
          dragoverBubble: !1,
          dataIdAttr: 'data-id',
          delay: 0,
          delayOnTouchOnly: !1,
          touchStartThreshold:
            (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
          forceFallback: !1,
          fallbackClass: 'sortable-fallback',
          fallbackOnBody: !1,
          fallbackTolerance: 0,
          fallbackOffset: { x: 0, y: 0 },
          supportPointer: !1 !== Pr.supportPointer && 'PointerEvent' in window && !pa,
          emptyInsertThreshold: 5,
        };
        for (var a in (Ua.initializePlugins(this, t, i), i)) !(a in e) && (e[a] = i[a]);
        for (var r in (Er(e), this))
          '_' === r.charAt(0) && 'function' == typeof this[r] && (this[r] = this[r].bind(this));
        (this.nativeDraggable = !e.forceFallback && $r),
          this.nativeDraggable && (this.options.touchStartThreshold = 1),
          e.supportPointer
            ? ga(t, 'pointerdown', this._onTapStart)
            : (ga(t, 'mousedown', this._onTapStart), ga(t, 'touchstart', this._onTapStart)),
          this.nativeDraggable && (ga(t, 'dragover', this), ga(t, 'dragenter', this)),
          yr.push(this.el),
          e.store && e.store.get && this.sort(e.store.get(this) || []),
          oa(
            this,
            (function () {
              var t,
                e = [];
              return {
                captureAnimationState: function () {
                  (e = []),
                    this.options.animation &&
                      [].slice.call(this.el.children).forEach(function (t) {
                        if ('none' !== Da(t, 'display') && t !== Pr.ghost) {
                          e.push({ target: t, rect: Ia(t) });
                          var i = sa({}, e[e.length - 1].rect);
                          if (t.thisAnimationDuration) {
                            var a = Ca(t, !0);
                            a && ((i.top -= a.f), (i.left -= a.e));
                          }
                          t.fromRect = i;
                        }
                      });
                },
                addAnimationState: function (t) {
                  e.push(t);
                },
                removeAnimationState: function (t) {
                  e.splice(
                    (function (t, e) {
                      for (var i in t)
                        if (t.hasOwnProperty(i))
                          for (var a in e)
                            if (e.hasOwnProperty(a) && e[a] === t[i][a]) return Number(i);
                      return -1;
                    })(e, { target: t }),
                    1,
                  );
                },
                animateAll: function (i) {
                  var a = this;
                  if (!this.options.animation)
                    return clearTimeout(t), void ('function' == typeof i && i());
                  var r = !1,
                    n = 0;
                  e.forEach(function (t) {
                    var e = 0,
                      i = t.target,
                      o = i.fromRect,
                      s = Ia(i),
                      l = i.prevFromRect,
                      c = i.prevToRect,
                      h = t.rect,
                      u = Ca(i, !0);
                    u && ((s.top -= u.f), (s.left -= u.e)),
                      (i.toRect = s),
                      i.thisAnimationDuration &&
                        Pa(l, s) &&
                        !Pa(o, s) &&
                        (h.top - s.top) / (h.left - s.left) ==
                          (o.top - s.top) / (o.left - s.left) &&
                        (e = (function (t, e, i, a) {
                          return (
                            (Math.sqrt(Math.pow(e.top - t.top, 2) + Math.pow(e.left - t.left, 2)) /
                              Math.sqrt(
                                Math.pow(e.top - i.top, 2) + Math.pow(e.left - i.left, 2),
                              )) *
                            a.animation
                          );
                        })(h, l, c, a.options)),
                      Pa(s, o) ||
                        ((i.prevFromRect = o),
                        (i.prevToRect = s),
                        e || (e = a.options.animation),
                        a.animate(i, h, s, e)),
                      e &&
                        ((r = !0),
                        (n = Math.max(n, e)),
                        clearTimeout(i.animationResetTimer),
                        (i.animationResetTimer = setTimeout(function () {
                          (i.animationTime = 0),
                            (i.prevFromRect = null),
                            (i.fromRect = null),
                            (i.prevToRect = null),
                            (i.thisAnimationDuration = null);
                        }, e)),
                        (i.thisAnimationDuration = e));
                  }),
                    clearTimeout(t),
                    r
                      ? (t = setTimeout(function () {
                          'function' == typeof i && i();
                        }, n))
                      : 'function' == typeof i && i(),
                    (e = []);
                },
                animate: function (t, e, i, a) {
                  if (a) {
                    Da(t, 'transition', ''), Da(t, 'transform', '');
                    var r = Ca(this.el),
                      n = r && r.a,
                      o = r && r.d,
                      s = (e.left - i.left) / (n || 1),
                      l = (e.top - i.top) / (o || 1);
                    (t.animatingX = !!s),
                      (t.animatingY = !!l),
                      Da(t, 'transform', 'translate3d(' + s + 'px,' + l + 'px,0)'),
                      (this.forRepaintDummy = (function (t) {
                        return t.offsetWidth;
                      })(t)),
                      Da(
                        t,
                        'transition',
                        'transform ' +
                          a +
                          'ms' +
                          (this.options.easing ? ' ' + this.options.easing : ''),
                      ),
                      Da(t, 'transform', 'translate3d(0,0,0)'),
                      'number' == typeof t.animated && clearTimeout(t.animated),
                      (t.animated = setTimeout(function () {
                        Da(t, 'transition', ''),
                          Da(t, 'transform', ''),
                          (t.animated = !1),
                          (t.animatingX = !1),
                          (t.animatingY = !1);
                      }, a));
                  }
                },
              };
            })(),
          );
      }
      function Lr(t, e, i, a, r, n, o, s) {
        var l,
          c,
          h = t[za],
          u = h.options.onMove;
        return (
          !window.CustomEvent || ha || ua
            ? (l = document.createEvent('Event')).initEvent('move', !0, !0)
            : (l = new CustomEvent('move', { bubbles: !0, cancelable: !0 })),
          (l.to = e),
          (l.from = t),
          (l.dragged = i),
          (l.draggedRect = a),
          (l.related = r || e),
          (l.relatedRect = n || Ia(e)),
          (l.willInsertAfter = s),
          (l.originalEvent = o),
          t.dispatchEvent(l),
          u && (c = u.call(h, l, o)),
          c
        );
      }
      function Hr(t) {
        t.draggable = !1;
      }
      function Fr() {
        _r = !1;
      }
      function zr(t) {
        for (
          var e = t.tagName + t.className + t.src + t.href + t.textContent, i = e.length, a = 0;
          i--;

        )
          a += e.charCodeAt(i);
        return a.toString(36);
      }
      function jr(t) {
        return setTimeout(t, 0);
      }
      function Vr(t) {
        return clearTimeout(t);
      }
      (Pr.prototype = {
        constructor: Pr,
        _isOutsideThisEl: function (t) {
          this.el.contains(t) || t === this.el || (pr = null);
        },
        _getDirection: function (t, e) {
          return 'function' == typeof this.options.direction
            ? this.options.direction.call(this, t, e, Wa)
            : this.options.direction;
        },
        _onTapStart: function (t) {
          if (t.cancelable) {
            var e = this,
              i = this.el,
              a = this.options,
              r = a.preventOnFilter,
              n = t.type,
              o = (t.touches && t.touches[0]) || (t.pointerType && 'touch' === t.pointerType && t),
              s = (o || t).target,
              l =
                (t.target.shadowRoot &&
                  ((t.path && t.path[0]) || (t.composedPath && t.composedPath()[0]))) ||
                s,
              c = a.filter;
            if (
              ((function (t) {
                Sr.length = 0;
                for (var e = t.getElementsByTagName('input'), i = e.length; i--; ) {
                  var a = e[i];
                  a.checked && Sr.push(a);
                }
              })(i),
              !Wa &&
                !((/mousedown|pointerdown/.test(n) && 0 !== t.button) || a.disabled) &&
                !l.isContentEditable &&
                (this.nativeDraggable || !pa || !s || 'SELECT' !== s.tagName.toUpperCase()) &&
                !(((s = xa(s, a.draggable, i, !1)) && s.animated) || Za === s))
            ) {
              if (((tr = Ra(s)), (ir = Ra(s, a.draggable)), 'function' == typeof c)) {
                if (c.call(this, t, s, this))
                  return (
                    qa({ sortable: e, rootEl: l, name: 'filter', targetEl: s, toEl: i, fromEl: i }),
                    Ba('filter', e, { evt: t }),
                    void (r && t.cancelable && t.preventDefault())
                  );
              } else if (
                c &&
                (c = c.split(',').some(function (a) {
                  if ((a = xa(l, a.trim(), i, !1)))
                    return (
                      qa({
                        sortable: e,
                        rootEl: a,
                        name: 'filter',
                        targetEl: s,
                        fromEl: i,
                        toEl: i,
                      }),
                      Ba('filter', e, { evt: t }),
                      !0
                    );
                }))
              )
                return void (r && t.cancelable && t.preventDefault());
              (a.handle && !xa(l, a.handle, i, !1)) || this._prepareDragStart(t, o, s);
            }
          }
        },
        _prepareDragStart: function (t, e, i) {
          var a,
            r = this,
            n = r.el,
            o = r.options,
            s = n.ownerDocument;
          if (i && !Wa && i.parentNode === n) {
            var l = Ia(i);
            if (
              ((Ya = n),
              (Ga = (Wa = i).parentNode),
              (Ka = Wa.nextSibling),
              (Za = i),
              (rr = o.group),
              (Pr.dragged = Wa),
              (or = { target: Wa, clientX: (e || t).clientX, clientY: (e || t).clientY }),
              (hr = or.clientX - l.left),
              (ur = or.clientY - l.top),
              (this._lastX = (e || t).clientX),
              (this._lastY = (e || t).clientY),
              (Wa.style['will-change'] = 'all'),
              (a = function () {
                Ba('delayEnded', r, { evt: t }),
                  Pr.eventCanceled
                    ? r._onDrop()
                    : (r._disableDelayedDragEvents(),
                      !da && r.nativeDraggable && (Wa.draggable = !0),
                      r._triggerDragStart(t, e),
                      qa({ sortable: r, name: 'choose', originalEvent: t }),
                      Sa(Wa, o.chosenClass, !0));
              }),
              o.ignore.split(',').forEach(function (t) {
                Ta(Wa, t.trim(), Hr);
              }),
              ga(s, 'dragover', Nr),
              ga(s, 'mousemove', Nr),
              ga(s, 'touchmove', Nr),
              ga(s, 'mouseup', r._onDrop),
              ga(s, 'touchend', r._onDrop),
              ga(s, 'touchcancel', r._onDrop),
              da &&
                this.nativeDraggable &&
                ((this.options.touchStartThreshold = 4), (Wa.draggable = !0)),
              Ba('delayStart', this, { evt: t }),
              !o.delay || (o.delayOnTouchOnly && !e) || (this.nativeDraggable && (ua || ha)))
            )
              a();
            else {
              if (Pr.eventCanceled) return void this._onDrop();
              ga(s, 'mouseup', r._disableDelayedDrag),
                ga(s, 'touchend', r._disableDelayedDrag),
                ga(s, 'touchcancel', r._disableDelayedDrag),
                ga(s, 'mousemove', r._delayedDragTouchMoveHandler),
                ga(s, 'touchmove', r._delayedDragTouchMoveHandler),
                o.supportPointer && ga(s, 'pointermove', r._delayedDragTouchMoveHandler),
                (r._dragStartTimer = setTimeout(a, o.delay));
            }
          }
        },
        _delayedDragTouchMoveHandler: function (t) {
          var e = t.touches ? t.touches[0] : t;
          Math.max(Math.abs(e.clientX - this._lastX), Math.abs(e.clientY - this._lastY)) >=
            Math.floor(
              this.options.touchStartThreshold /
                ((this.nativeDraggable && window.devicePixelRatio) || 1),
            ) && this._disableDelayedDrag();
        },
        _disableDelayedDrag: function () {
          Wa && Hr(Wa), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
        },
        _disableDelayedDragEvents: function () {
          var t = this.el.ownerDocument;
          va(t, 'mouseup', this._disableDelayedDrag),
            va(t, 'touchend', this._disableDelayedDrag),
            va(t, 'touchcancel', this._disableDelayedDrag),
            va(t, 'mousemove', this._delayedDragTouchMoveHandler),
            va(t, 'touchmove', this._delayedDragTouchMoveHandler),
            va(t, 'pointermove', this._delayedDragTouchMoveHandler);
        },
        _triggerDragStart: function (t, e) {
          (e = e || ('touch' == t.pointerType && t)),
            !this.nativeDraggable || e
              ? this.options.supportPointer
                ? ga(document, 'pointermove', this._onTouchMove)
                : ga(document, e ? 'touchmove' : 'mousemove', this._onTouchMove)
              : (ga(Wa, 'dragend', this), ga(Ya, 'dragstart', this._onDragStart));
          try {
            document.selection
              ? jr(function () {
                  document.selection.empty();
                })
              : window.getSelection().removeAllRanges();
          } catch (t) {}
        },
        _dragStarted: function (t, e) {
          if (((gr = !1), Ya && Wa)) {
            Ba('dragStarted', this, { evt: e }),
              this.nativeDraggable && ga(document, 'dragover', Mr);
            var i = this.options;
            !t && Sa(Wa, i.dragClass, !1),
              Sa(Wa, i.ghostClass, !0),
              (Pr.active = this),
              t && this._appendGhost(),
              qa({ sortable: this, name: 'start', originalEvent: e });
          } else this._nulling();
        },
        _emulateDragOver: function () {
          if (sr) {
            (this._lastX = sr.clientX), (this._lastY = sr.clientY), Or();
            for (
              var t = document.elementFromPoint(sr.clientX, sr.clientY), e = t;
              t &&
              t.shadowRoot &&
              (t = t.shadowRoot.elementFromPoint(sr.clientX, sr.clientY)) !== e;

            )
              e = t;
            if ((Wa.parentNode[za]._isOutsideThisEl(t), e))
              do {
                if (
                  e[za] &&
                  e[za]._onDragOver({
                    clientX: sr.clientX,
                    clientY: sr.clientY,
                    target: t,
                    rootEl: e,
                  }) &&
                  !this.options.dragoverBubble
                )
                  break;
                t = e;
              } while ((e = e.parentNode));
            Rr();
          }
        },
        _onTouchMove: function (t) {
          if (or) {
            var e = this.options,
              i = e.fallbackTolerance,
              a = e.fallbackOffset,
              r = t.touches ? t.touches[0] : t,
              n = Xa && Ca(Xa, !0),
              o = Xa && n && n.a,
              s = Xa && n && n.d,
              l = Cr && br && Na(br),
              c = (r.clientX - or.clientX + a.x) / (o || 1) + (l ? l[0] - kr[0] : 0) / (o || 1),
              h = (r.clientY - or.clientY + a.y) / (s || 1) + (l ? l[1] - kr[1] : 0) / (s || 1);
            if (!Pr.active && !gr) {
              if (
                i &&
                Math.max(Math.abs(r.clientX - this._lastX), Math.abs(r.clientY - this._lastY)) < i
              )
                return;
              this._onDragStart(t, !0);
            }
            if (Xa) {
              n
                ? ((n.e += c - (lr || 0)), (n.f += h - (cr || 0)))
                : (n = { a: 1, b: 0, c: 0, d: 1, e: c, f: h });
              var u = 'matrix('
                .concat(n.a, ',')
                .concat(n.b, ',')
                .concat(n.c, ',')
                .concat(n.d, ',')
                .concat(n.e, ',')
                .concat(n.f, ')');
              Da(Xa, 'webkitTransform', u),
                Da(Xa, 'mozTransform', u),
                Da(Xa, 'msTransform', u),
                Da(Xa, 'transform', u),
                (lr = c),
                (cr = h),
                (sr = r);
            }
            t.cancelable && t.preventDefault();
          }
        },
        _appendGhost: function () {
          if (!Xa) {
            var t = this.options.fallbackOnBody ? document.body : Ya,
              e = Ia(Wa, !0, Cr, !0, t),
              i = this.options;
            if (Cr) {
              for (
                br = t;
                'static' === Da(br, 'position') &&
                'none' === Da(br, 'transform') &&
                br !== document;

              )
                br = br.parentNode;
              br !== document.body && br !== document.documentElement
                ? (br === document && (br = $a()),
                  (e.top += br.scrollTop),
                  (e.left += br.scrollLeft))
                : (br = $a()),
                (kr = Na(br));
            }
            Sa((Xa = Wa.cloneNode(!0)), i.ghostClass, !1),
              Sa(Xa, i.fallbackClass, !0),
              Sa(Xa, i.dragClass, !0),
              Da(Xa, 'transition', ''),
              Da(Xa, 'transform', ''),
              Da(Xa, 'box-sizing', 'border-box'),
              Da(Xa, 'margin', 0),
              Da(Xa, 'top', e.top),
              Da(Xa, 'left', e.left),
              Da(Xa, 'width', e.width),
              Da(Xa, 'height', e.height),
              Da(Xa, 'opacity', '0.8'),
              Da(Xa, 'position', Cr ? 'absolute' : 'fixed'),
              Da(Xa, 'zIndex', '100000'),
              Da(Xa, 'pointerEvents', 'none'),
              (Pr.ghost = Xa),
              t.appendChild(Xa),
              Da(
                Xa,
                'transform-origin',
                (hr / parseInt(Xa.style.width)) * 100 +
                  '% ' +
                  (ur / parseInt(Xa.style.height)) * 100 +
                  '%',
              );
          }
        },
        _onDragStart: function (t, e) {
          var i = this,
            a = t.dataTransfer,
            r = i.options;
          Ba('dragStart', this, { evt: t }),
            Pr.eventCanceled
              ? this._onDrop()
              : (Ba('setupClone', this),
                Pr.eventCanceled ||
                  (((Ja = Fa(Wa)).draggable = !1),
                  (Ja.style['will-change'] = ''),
                  this._hideClone(),
                  Sa(Ja, this.options.chosenClass, !1),
                  (Pr.clone = Ja)),
                (i.cloneId = jr(function () {
                  Ba('clone', i),
                    Pr.eventCanceled ||
                      (i.options.removeCloneOnHide || Ya.insertBefore(Ja, Wa),
                      i._hideClone(),
                      qa({ sortable: i, name: 'clone' }));
                })),
                !e && Sa(Wa, r.dragClass, !0),
                e
                  ? ((vr = !0), (i._loopId = setInterval(i._emulateDragOver, 50)))
                  : (va(document, 'mouseup', i._onDrop),
                    va(document, 'touchend', i._onDrop),
                    va(document, 'touchcancel', i._onDrop),
                    a && ((a.effectAllowed = 'move'), r.setData && r.setData.call(i, a, Wa)),
                    ga(document, 'drop', i),
                    Da(Wa, 'transform', 'translateZ(0)')),
                (gr = !0),
                (i._dragStartId = jr(i._dragStarted.bind(i, e, t))),
                ga(document, 'selectstart', i),
                (dr = !0),
                pa && Da(document.body, 'user-select', 'none'));
        },
        _onDragOver: function (t) {
          var e,
            i,
            a,
            r,
            n = this.el,
            o = t.target,
            s = this.options,
            l = s.group,
            c = Pr.active,
            h = rr === l,
            u = s.sort,
            d = nr || c,
            p = this,
            m = !1;
          if (!_r) {
            if (
              (void 0 !== t.preventDefault && t.cancelable && t.preventDefault(),
              (o = xa(o, s.draggable, n, !0)),
              $('dragOver'),
              Pr.eventCanceled)
            )
              return m;
            if (
              Wa.contains(t.target) ||
              (o.animated && o.animatingX && o.animatingY) ||
              p._ignoreWhileAnimating === o
            )
              return A(!1);
            if (
              ((vr = !1),
              c &&
                !s.disabled &&
                (h
                  ? u || (a = !Ya.contains(Wa))
                  : nr === this ||
                    ((this.lastPutMode = rr.checkPull(this, c, Wa, t)) &&
                      l.checkPut(this, c, Wa, t))))
            ) {
              if (
                ((r = 'vertical' === this._getDirection(t, o)),
                (e = Ia(Wa)),
                $('dragOverValid'),
                Pr.eventCanceled)
              )
                return m;
              if (a)
                return (
                  (Ga = Ya),
                  I(),
                  this._hideClone(),
                  $('revert'),
                  Pr.eventCanceled || (Ka ? Ya.insertBefore(Wa, Ka) : Ya.appendChild(Wa)),
                  A(!0)
                );
              var f = Oa(n, s.draggable);
              if (
                !f ||
                ((function (t, e, i) {
                  var a = Ia(Oa(i.el, i.options.draggable));
                  return e
                    ? t.clientX > a.right + 10 ||
                        (t.clientX <= a.right && t.clientY > a.bottom && t.clientX >= a.left)
                    : (t.clientX > a.right && t.clientY > a.top) ||
                        (t.clientX <= a.right && t.clientY > a.bottom + 10);
                })(t, r, this) &&
                  !f.animated)
              ) {
                if (f === Wa) return A(!1);
                if (
                  (f && n === t.target && (o = f),
                  o && (i = Ia(o)),
                  !1 !== Lr(Ya, n, Wa, e, o, i, t, !!o))
                )
                  return I(), n.appendChild(Wa), (Ga = n), E(), A(!0);
              } else if (o.parentNode === n) {
                i = Ia(o);
                var b,
                  g,
                  v,
                  y = Wa.parentNode !== n,
                  w = !(function (t, e, i) {
                    var a = i ? t.left : t.top,
                      r = i ? t.right : t.bottom,
                      n = i ? t.width : t.height,
                      o = i ? e.left : e.top,
                      s = i ? e.right : e.bottom,
                      l = i ? e.width : e.height;
                    return a === o || r === s || a + n / 2 === o + l / 2;
                  })((Wa.animated && Wa.toRect) || e, (o.animated && o.toRect) || i, r),
                  x = r ? 'top' : 'left',
                  k = Aa(o, 'top', 'top') || Aa(Wa, 'top', 'top'),
                  _ = k ? k.scrollTop : void 0;
                if (
                  (pr !== o && ((g = i[x]), (wr = !1), (xr = (!w && s.invertSwap) || y)),
                  0 !==
                    (b = (function (t, e, i, a, r, n, o, s) {
                      var l = a ? t.clientY : t.clientX,
                        c = a ? i.height : i.width,
                        h = a ? i.top : i.left,
                        u = a ? i.bottom : i.right,
                        d = !1;
                      if (!o)
                        if (s && fr < c * r) {
                          if (
                            (!wr &&
                              (1 === mr ? l > h + (c * n) / 2 : l < u - (c * n) / 2) &&
                              (wr = !0),
                            wr)
                          )
                            d = !0;
                          else if (1 === mr ? l < h + fr : l > u - fr) return -mr;
                        } else if (l > h + (c * (1 - r)) / 2 && l < u - (c * (1 - r)) / 2)
                          return (function (t) {
                            return Ra(Wa) < Ra(t) ? 1 : -1;
                          })(e);
                      return (d = d || o) && (l < h + (c * n) / 2 || l > u - (c * n) / 2)
                        ? l > h + c / 2
                          ? 1
                          : -1
                        : 0;
                    })(
                      t,
                      o,
                      i,
                      r,
                      w ? 1 : s.swapThreshold,
                      null == s.invertedSwapThreshold ? s.swapThreshold : s.invertedSwapThreshold,
                      xr,
                      pr === o,
                    )))
                ) {
                  var S = Ra(Wa);
                  do {
                    (S -= b), (v = Ga.children[S]);
                  } while (v && ('none' === Da(v, 'display') || v === Xa));
                }
                if (0 === b || v === o) return A(!1);
                (pr = o), (mr = b);
                var D = o.nextElementSibling,
                  C = !1,
                  T = Lr(Ya, n, Wa, e, o, i, t, (C = 1 === b));
                if (!1 !== T)
                  return (
                    (1 !== T && -1 !== T) || (C = 1 === T),
                    (_r = !0),
                    setTimeout(Fr, 30),
                    I(),
                    C && !D ? n.appendChild(Wa) : o.parentNode.insertBefore(Wa, C ? D : o),
                    k && Ha(k, 0, _ - k.scrollTop),
                    (Ga = Wa.parentNode),
                    void 0 === g || xr || (fr = Math.abs(g - Ia(o)[x])),
                    E(),
                    A(!0)
                  );
              }
              if (n.contains(Wa)) return A(!1);
            }
            return !1;
          }
          function $(s, l) {
            Ba(
              s,
              p,
              sa(
                {
                  evt: t,
                  isOwner: h,
                  axis: r ? 'vertical' : 'horizontal',
                  revert: a,
                  dragRect: e,
                  targetRect: i,
                  canSort: u,
                  fromSortable: d,
                  target: o,
                  completed: A,
                  onMove: function (i, a) {
                    return Lr(Ya, n, Wa, e, i, Ia(i), t, a);
                  },
                  changed: E,
                },
                l,
              ),
            );
          }
          function I() {
            $('dragOverAnimationCapture'),
              p.captureAnimationState(),
              p !== d && d.captureAnimationState();
          }
          function A(e) {
            return (
              $('dragOverCompleted', { insertion: e }),
              e &&
                (h ? c._hideClone() : c._showClone(p),
                p !== d &&
                  (Sa(Wa, nr ? nr.options.ghostClass : c.options.ghostClass, !1),
                  Sa(Wa, s.ghostClass, !0)),
                nr !== p && p !== Pr.active ? (nr = p) : p === Pr.active && nr && (nr = null),
                d === p && (p._ignoreWhileAnimating = o),
                p.animateAll(function () {
                  $('dragOverAnimationComplete'), (p._ignoreWhileAnimating = null);
                }),
                p !== d && (d.animateAll(), (d._ignoreWhileAnimating = null))),
              ((o === Wa && !Wa.animated) || (o === n && !o.animated)) && (pr = null),
              s.dragoverBubble ||
                t.rootEl ||
                o === document ||
                (Wa.parentNode[za]._isOutsideThisEl(t.target), !e && Nr(t)),
              !s.dragoverBubble && t.stopPropagation && t.stopPropagation(),
              (m = !0)
            );
          }
          function E() {
            (er = Ra(Wa)),
              (ar = Ra(Wa, s.draggable)),
              qa({
                sortable: p,
                name: 'change',
                toEl: n,
                newIndex: er,
                newDraggableIndex: ar,
                originalEvent: t,
              });
          }
        },
        _ignoreWhileAnimating: null,
        _offMoveEvents: function () {
          va(document, 'mousemove', this._onTouchMove),
            va(document, 'touchmove', this._onTouchMove),
            va(document, 'pointermove', this._onTouchMove),
            va(document, 'dragover', Nr),
            va(document, 'mousemove', Nr),
            va(document, 'touchmove', Nr);
        },
        _offUpEvents: function () {
          var t = this.el.ownerDocument;
          va(t, 'mouseup', this._onDrop),
            va(t, 'touchend', this._onDrop),
            va(t, 'pointerup', this._onDrop),
            va(t, 'touchcancel', this._onDrop),
            va(document, 'selectstart', this);
        },
        _onDrop: function (t) {
          var e = this.el,
            i = this.options;
          (er = Ra(Wa)),
            (ar = Ra(Wa, i.draggable)),
            Ba('drop', this, { evt: t }),
            (Ga = Wa && Wa.parentNode),
            (er = Ra(Wa)),
            (ar = Ra(Wa, i.draggable)),
            Pr.eventCanceled ||
              ((gr = !1),
              (xr = !1),
              (wr = !1),
              clearInterval(this._loopId),
              clearTimeout(this._dragStartTimer),
              Vr(this.cloneId),
              Vr(this._dragStartId),
              this.nativeDraggable &&
                (va(document, 'drop', this), va(e, 'dragstart', this._onDragStart)),
              this._offMoveEvents(),
              this._offUpEvents(),
              pa && Da(document.body, 'user-select', ''),
              Da(Wa, 'transform', ''),
              t &&
                (dr && (t.cancelable && t.preventDefault(), !i.dropBubble && t.stopPropagation()),
                Xa && Xa.parentNode && Xa.parentNode.removeChild(Xa),
                (Ya === Ga || (nr && 'clone' !== nr.lastPutMode)) &&
                  Ja &&
                  Ja.parentNode &&
                  Ja.parentNode.removeChild(Ja),
                Wa &&
                  (this.nativeDraggable && va(Wa, 'dragend', this),
                  Hr(Wa),
                  (Wa.style['will-change'] = ''),
                  dr && !gr && Sa(Wa, nr ? nr.options.ghostClass : this.options.ghostClass, !1),
                  Sa(Wa, this.options.chosenClass, !1),
                  qa({
                    sortable: this,
                    name: 'unchoose',
                    toEl: Ga,
                    newIndex: null,
                    newDraggableIndex: null,
                    originalEvent: t,
                  }),
                  Ya !== Ga
                    ? (er >= 0 &&
                        (qa({ rootEl: Ga, name: 'add', toEl: Ga, fromEl: Ya, originalEvent: t }),
                        qa({ sortable: this, name: 'remove', toEl: Ga, originalEvent: t }),
                        qa({ rootEl: Ga, name: 'sort', toEl: Ga, fromEl: Ya, originalEvent: t }),
                        qa({ sortable: this, name: 'sort', toEl: Ga, originalEvent: t })),
                      nr && nr.save())
                    : er !== tr &&
                      er >= 0 &&
                      (qa({ sortable: this, name: 'update', toEl: Ga, originalEvent: t }),
                      qa({ sortable: this, name: 'sort', toEl: Ga, originalEvent: t })),
                  Pr.active &&
                    ((null != er && -1 !== er) || ((er = tr), (ar = ir)),
                    qa({ sortable: this, name: 'end', toEl: Ga, originalEvent: t }),
                    this.save())))),
            this._nulling();
        },
        _nulling: function () {
          Ba('nulling', this),
            (Ya = Wa = Ga = Xa = Ka = Ja = Za = Qa = or = sr = dr = er = ar = tr = ir = pr = mr = nr = rr = Pr.dragged = Pr.ghost = Pr.clone = Pr.active = null),
            Sr.forEach(function (t) {
              t.checked = !0;
            }),
            (Sr.length = lr = cr = 0);
        },
        handleEvent: function (t) {
          switch (t.type) {
            case 'drop':
            case 'dragend':
              this._onDrop(t);
              break;
            case 'dragenter':
            case 'dragover':
              Wa &&
                (this._onDragOver(t),
                (function (t) {
                  t.dataTransfer && (t.dataTransfer.dropEffect = 'move'),
                    t.cancelable && t.preventDefault();
                })(t));
              break;
            case 'selectstart':
              t.preventDefault();
          }
        },
        toArray: function () {
          for (
            var t, e = [], i = this.el.children, a = 0, r = i.length, n = this.options;
            a < r;
            a++
          )
            xa((t = i[a]), n.draggable, this.el, !1) &&
              e.push(t.getAttribute(n.dataIdAttr) || zr(t));
          return e;
        },
        sort: function (t, e) {
          var i = {},
            a = this.el;
          this.toArray().forEach(function (t, e) {
            var r = a.children[e];
            xa(r, this.options.draggable, a, !1) && (i[t] = r);
          }, this),
            e && this.captureAnimationState(),
            t.forEach(function (t) {
              i[t] && (a.removeChild(i[t]), a.appendChild(i[t]));
            }),
            e && this.animateAll();
        },
        save: function () {
          var t = this.options.store;
          t && t.set && t.set(this);
        },
        closest: function (t, e) {
          return xa(t, e || this.options.draggable, this.el, !1);
        },
        option: function (t, e) {
          var i = this.options;
          if (void 0 === e) return i[t];
          var a = Ua.modifyOption(this, t, e);
          (i[t] = void 0 !== a ? a : e), 'group' === t && Er(i);
        },
        destroy: function () {
          Ba('destroy', this);
          var t = this.el;
          (t[za] = null),
            va(t, 'mousedown', this._onTapStart),
            va(t, 'touchstart', this._onTapStart),
            va(t, 'pointerdown', this._onTapStart),
            this.nativeDraggable && (va(t, 'dragover', this), va(t, 'dragenter', this)),
            Array.prototype.forEach.call(t.querySelectorAll('[draggable]'), function (t) {
              t.removeAttribute('draggable');
            }),
            this._onDrop(),
            this._disableDelayedDragEvents(),
            yr.splice(yr.indexOf(this.el), 1),
            (this.el = t = null);
        },
        _hideClone: function () {
          if (!Qa) {
            if ((Ba('hideClone', this), Pr.eventCanceled)) return;
            Da(Ja, 'display', 'none'),
              this.options.removeCloneOnHide && Ja.parentNode && Ja.parentNode.removeChild(Ja),
              (Qa = !0);
          }
        },
        _showClone: function (t) {
          if ('clone' === t.lastPutMode) {
            if (Qa) {
              if ((Ba('showClone', this), Pr.eventCanceled)) return;
              Wa.parentNode != Ya || this.options.group.revertClone
                ? Ka
                  ? Ya.insertBefore(Ja, Ka)
                  : Ya.appendChild(Ja)
                : Ya.insertBefore(Ja, Wa),
                this.options.group.revertClone && this.animate(Wa, Ja),
                Da(Ja, 'display', ''),
                (Qa = !1);
            }
          } else this._hideClone();
        },
      }),
        Dr &&
          ga(document, 'touchmove', function (t) {
            (Pr.active || gr) && t.cancelable && t.preventDefault();
          }),
        (Pr.utils = {
          on: ga,
          off: va,
          css: Da,
          find: Ta,
          is: function (t, e) {
            return !!xa(t, e, t, !1);
          },
          extend: function (t, e) {
            if (t && e) for (var i in e) e.hasOwnProperty(i) && (t[i] = e[i]);
            return t;
          },
          throttle: La,
          closest: xa,
          toggleClass: Sa,
          clone: Fa,
          index: Ra,
          nextTick: jr,
          cancelNextTick: Vr,
          detectDirection: Ar,
          getChild: Ea,
        }),
        (Pr.get = function (t) {
          return t[za];
        }),
        (Pr.mount = function () {
          for (var t = arguments.length, e = new Array(t), i = 0; i < t; i++) e[i] = arguments[i];
          e[0].constructor === Array && (e = e[0]),
            e.forEach(function (t) {
              if (!t.prototype || !t.prototype.constructor)
                throw 'Sortable: Mounted plugin must be a constructor function, not '.concat(
                  {}.toString.call(t),
                );
              t.utils && (Pr.utils = sa({}, Pr.utils, t.utils)), Ua.mount(t);
            });
        }),
        (Pr.create = function (t, e) {
          return new Pr(t, e);
        }),
        (Pr.version = '1.13.0');
      var Ur,
        Br,
        qr,
        Wr,
        Gr,
        Xr,
        Yr = [],
        Kr = !1;
      function Zr() {
        Yr.forEach(function (t) {
          clearInterval(t.pid);
        }),
          (Yr = []);
      }
      function Jr() {
        clearInterval(Xr);
      }
      var Qr = La(function (t, e, i, a) {
          if (e.scroll) {
            var r,
              n = (t.touches ? t.touches[0] : t).clientX,
              o = (t.touches ? t.touches[0] : t).clientY,
              s = e.scrollSensitivity,
              l = e.scrollSpeed,
              c = $a(),
              h = !1;
            Br !== i &&
              ((Br = i), Zr(), (Ur = e.scroll), (r = e.scrollFn), !0 === Ur && (Ur = Ma(i, !0)));
            var u = 0,
              d = Ur;
            do {
              var p = d,
                m = Ia(p),
                f = m.top,
                b = m.bottom,
                g = m.left,
                v = m.right,
                y = m.width,
                w = m.height,
                x = void 0,
                k = void 0,
                _ = p.scrollWidth,
                S = p.scrollHeight,
                D = Da(p),
                C = p.scrollLeft,
                T = p.scrollTop;
              p === c
                ? ((x =
                    y < _ &&
                    ('auto' === D.overflowX ||
                      'scroll' === D.overflowX ||
                      'visible' === D.overflowX)),
                  (k =
                    w < S &&
                    ('auto' === D.overflowY ||
                      'scroll' === D.overflowY ||
                      'visible' === D.overflowY)))
                : ((x = y < _ && ('auto' === D.overflowX || 'scroll' === D.overflowX)),
                  (k = w < S && ('auto' === D.overflowY || 'scroll' === D.overflowY)));
              var $ = x && (Math.abs(v - n) <= s && C + y < _) - (Math.abs(g - n) <= s && !!C),
                I = k && (Math.abs(b - o) <= s && T + w < S) - (Math.abs(f - o) <= s && !!T);
              if (!Yr[u]) for (var A = 0; A <= u; A++) Yr[A] || (Yr[A] = {});
              (Yr[u].vx == $ && Yr[u].vy == I && Yr[u].el === p) ||
                ((Yr[u].el = p),
                (Yr[u].vx = $),
                (Yr[u].vy = I),
                clearInterval(Yr[u].pid),
                (0 == $ && 0 == I) ||
                  ((h = !0),
                  (Yr[u].pid = setInterval(
                    function () {
                      a && 0 === this.layer && Pr.active._onTouchMove(Gr);
                      var e = Yr[this.layer].vy ? Yr[this.layer].vy * l : 0,
                        i = Yr[this.layer].vx ? Yr[this.layer].vx * l : 0;
                      ('function' == typeof r &&
                        'continue' !==
                          r.call(Pr.dragged.parentNode[za], i, e, t, Gr, Yr[this.layer].el)) ||
                        Ha(Yr[this.layer].el, i, e);
                    }.bind({ layer: u }),
                    24,
                  )))),
                u++;
            } while (e.bubbleScroll && d !== c && (d = Ma(d, !1)));
            Kr = h;
          }
        }, 30),
        tn = function (t) {
          var e = t.originalEvent,
            i = t.putSortable,
            a = t.dragEl,
            r = t.activeSortable,
            n = t.dispatchSortableEvent,
            o = t.hideGhostForTarget,
            s = t.unhideGhostForTarget;
          if (e) {
            var l = i || r;
            o();
            var c = e.changedTouches && e.changedTouches.length ? e.changedTouches[0] : e,
              h = document.elementFromPoint(c.clientX, c.clientY);
            s(),
              l && !l.el.contains(h) && (n('spill'), this.onSpill({ dragEl: a, putSortable: i }));
          }
        };
      function en() {}
      function an() {}
      (en.prototype = {
        startIndex: null,
        dragStart: function (t) {
          var e = t.oldDraggableIndex;
          this.startIndex = e;
        },
        onSpill: function (t) {
          var e = t.dragEl,
            i = t.putSortable;
          this.sortable.captureAnimationState(), i && i.captureAnimationState();
          var a = Ea(this.sortable.el, this.startIndex, this.options);
          a ? this.sortable.el.insertBefore(e, a) : this.sortable.el.appendChild(e),
            this.sortable.animateAll(),
            i && i.animateAll();
        },
        drop: tn,
      }),
        oa(en, { pluginName: 'revertOnSpill' }),
        (an.prototype = {
          onSpill: function (t) {
            var e = t.dragEl,
              i = t.putSortable || this.sortable;
            i.captureAnimationState(), e.parentNode && e.parentNode.removeChild(e), i.animateAll();
          },
          drop: tn,
        }),
        oa(an, { pluginName: 'removeOnSpill' }),
        Pr.mount(
          new (function () {
            function t() {
              for (var t in ((this.defaults = {
                scroll: !0,
                scrollSensitivity: 30,
                scrollSpeed: 10,
                bubbleScroll: !0,
              }),
              this))
                '_' === t.charAt(0) &&
                  'function' == typeof this[t] &&
                  (this[t] = this[t].bind(this));
            }
            return (
              (t.prototype = {
                dragStarted: function (t) {
                  var e = t.originalEvent;
                  this.sortable.nativeDraggable
                    ? ga(document, 'dragover', this._handleAutoScroll)
                    : this.options.supportPointer
                    ? ga(document, 'pointermove', this._handleFallbackAutoScroll)
                    : e.touches
                    ? ga(document, 'touchmove', this._handleFallbackAutoScroll)
                    : ga(document, 'mousemove', this._handleFallbackAutoScroll);
                },
                dragOverCompleted: function (t) {
                  var e = t.originalEvent;
                  this.options.dragOverBubble || e.rootEl || this._handleAutoScroll(e);
                },
                drop: function () {
                  this.sortable.nativeDraggable
                    ? va(document, 'dragover', this._handleAutoScroll)
                    : (va(document, 'pointermove', this._handleFallbackAutoScroll),
                      va(document, 'touchmove', this._handleFallbackAutoScroll),
                      va(document, 'mousemove', this._handleFallbackAutoScroll)),
                    Jr(),
                    Zr(),
                    clearTimeout(ka),
                    (ka = void 0);
                },
                nulling: function () {
                  (Gr = Br = Ur = Kr = Xr = qr = Wr = null), (Yr.length = 0);
                },
                _handleFallbackAutoScroll: function (t) {
                  this._handleAutoScroll(t, !0);
                },
                _handleAutoScroll: function (t, e) {
                  var i = this,
                    a = (t.touches ? t.touches[0] : t).clientX,
                    r = (t.touches ? t.touches[0] : t).clientY,
                    n = document.elementFromPoint(a, r);
                  if (((Gr = t), e || ua || ha || pa)) {
                    Qr(t, this.options, n, e);
                    var o = Ma(n, !0);
                    !Kr ||
                      (Xr && a === qr && r === Wr) ||
                      (Xr && Jr(),
                      (Xr = setInterval(function () {
                        var n = Ma(document.elementFromPoint(a, r), !0);
                        n !== o && ((o = n), Zr()), Qr(t, i.options, n, e);
                      }, 10)),
                      (qr = a),
                      (Wr = r));
                  } else {
                    if (!this.options.bubbleScroll || Ma(n, !0) === $a()) return void Zr();
                    Qr(t, this.options, Ma(n, !1), !1);
                  }
                },
              }),
              oa(t, { pluginName: 'scroll', initializeByDefault: !0 })
            );
          })(),
        ),
        Pr.mount(an, en),
        JSON.stringify({
          display: 'flex',
          flexDirection: 'column',
          flexWrap: 'wrap',
          width: '100%',
          minWidth: '100%',
        })
          .replace(/([a-z0-9])([A-Z])/g, '$1-$2')
          .replace(/[,]/g, ';')
          .replace(/["{}]/g, '')
          .toLowerCase();
      const rn = class extends HTMLElement {
          constructor() {
            super(),
              this.__registerHost(),
              At(this),
              (this.calciteSwitchChange = yt(this, 'calciteSwitchChange', 7)),
              (this.disabled = !1),
              (this.scale = 'm'),
              (this.switched = !1),
              (this.inputEl = document.createElement('input'));
          }
          disabledWatcher(t) {
            (this.inputEl.disabled = t), (this.tabindex = t ? -1 : 0);
          }
          nameChanged(t) {
            this.inputEl.name = t;
          }
          switchedWatcher(t) {
            this.inputEl.checked = t;
          }
          async setFocus() {
            Qt(this.inputEl);
          }
          setupInput() {
            this.switched && this.inputEl.setAttribute('checked', ''),
              (this.inputEl.disabled = this.disabled),
              (this.inputEl.id = `${this.guid}-input`),
              (this.inputEl.name = this.name),
              (this.inputEl.style.cssText = ge),
              (this.inputEl.type = 'checkbox'),
              this.value && (this.inputEl.value = null != this.value ? this.value.toString() : ''),
              this.el.appendChild(this.inputEl);
          }
          toggle() {
            (this.switched = !this.switched),
              this.calciteSwitchChange.emit({ switched: this.switched });
          }
          handleLabelFocus(t) {
            this.disabled ||
              this.el.contains(t.detail.interactedEl) ||
              !ee(t.detail.labelEl, this.el) ||
              this.el.focus();
          }
          onClick(t) {
            ((!this.disabled && this.el.closest('label') && t.target === this.inputEl) ||
              (!this.el.closest('label') && t.target === this.el)) &&
              this.toggle();
          }
          keyDownHandler(t) {
            const e = qt(t.key);
            this.disabled || (' ' !== e && 'Enter' !== e) || this.toggle();
          }
          componentWillLoad() {
            (this.guid = this.el.id || `calcite-switch-${Xt()}`),
              (this.tabindex = this.el.getAttribute('tabindex') || this.disabled ? -1 : 0),
              this.setupInput();
          }
          render() {
            const t = Kt(this.el);
            return K(
              J,
              { tabindex: this.tabindex },
              K(
                'div',
                {
                  'aria-checked': this.switched.toString(),
                  class: { container: !0, [Gt]: 'rtl' === t },
                },
                K('div', { class: 'track' }, K('div', { class: 'handle' })),
              ),
            );
          }
          get el() {
            return this;
          }
          static get watchers() {
            return {
              disabled: ['disabledWatcher'],
              name: ['nameChanged'],
              switched: ['switchedWatcher'],
            };
          }
          static get style() {
            return '@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host([scale=s]) .track{width:1.5rem;height:0.75rem}:host([scale=s]) .handle{width:0.5rem;height:0.5rem}:host([scale=m]) .track{width:2rem;height:1rem}:host([scale=m]) .handle{width:0.75rem;height:0.75rem}:host([scale=l]) .track{width:3rem;height:1.5rem}:host([scale=l]) .handle{width:1.25rem;height:1.25rem}:host{display:inline-block;position:relative;width:auto;cursor:pointer;-webkit-user-select:none;-ms-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle;tap-highlight-color:transparent}:host([disabled]){opacity:0.5;pointer-events:none;cursor:default}:host{outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;width:auto}:host(:focus){outline:2px solid var(--calcite-ui-brand);outline-offset:2px}.track{position:relative;display:inline-block;vertical-align:top;background-color:var(--calcite-ui-foreground-2);border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-2);-webkit-box-sizing:border-box;box-sizing:border-box;pointer-events:none;-webkit-transition-property:all;transition-property:all;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);border-radius:9999px}.handle{position:absolute;display:block;right:auto;background-color:var(--calcite-ui-foreground-1);border-width:2px;border-style:solid;border-color:var(--calcite-ui-border-input);-webkit-transition-property:all;transition-property:all;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);border-radius:9999px;pointer-events:none;top:-1px;left:-1px}:host(:hover) .handle,:host(:focus) .handle{border-color:var(--calcite-ui-brand);-webkit-box-shadow:0 0 0 1px var(--calcite-ui-brand);box-shadow:0 0 0 1px var(--calcite-ui-brand);right:auto}:host([switched]) .track{background-color:var(--calcite-ui-brand);border-color:var(--calcite-ui-brand)}:host([switched]) .handle{left:auto;border-color:var(--calcite-ui-brand);right:-1px}:host([switched]:hover) .track{background-color:var(--calcite-ui-brand);border-color:var(--calcite-ui-brand)}:host([switched]:hover) .handle{border-color:var(--calcite-ui-brand);-webkit-box-shadow:0 0 0 1px var(--calcite-ui-brand);box-shadow:0 0 0 1px var(--calcite-ui-brand)}.calcite--rtl .handle{left:auto;right:-1px}:host([switched]) .calcite--rtl .handle{right:auto;left:-1px}:host([switched]:active) .calcite--rtl .handle{right:auto;left:-1px}:host([switched]:focus) .calcite--rtl .handle{right:auto;left:-1px}';
          }
        },
        nn = class extends HTMLElement {
          constructor() {
            super(),
              this.__registerHost(),
              At(this),
              (this.calciteTabRegister = yt(this, 'calciteTabRegister', 7)),
              (this.active = !1),
              (this.guid = `calcite-tab-title-${Xt()}`);
          }
          render() {
            const t = this.el.id || this.guid;
            return K(
              J,
              {
                'aria-expanded': this.active.toString(),
                'aria-labelledby': this.labeledBy,
                id: t,
                role: 'tabpanel',
              },
              K('section', null, K('slot', null)),
            );
          }
          componentDidLoad() {
            this.calciteTabRegister.emit();
          }
          disconnectedCallback() {
            var t;
            null === (t = document.body) ||
              void 0 === t ||
              t.dispatchEvent(new CustomEvent('calciteTabUnregister', { detail: this.el }));
          }
          tabChangeHandler(t) {
            t.target.closest('calcite-tabs') === this.el.closest('calcite-tabs') &&
              (this.tab
                ? (this.active = this.tab === t.detail.tab)
                : this.getTabIndex().then((e) => {
                    this.active = e === t.detail.tab;
                  }));
          }
          async getTabIndex() {
            return Array.prototype.indexOf.call(
              ((t = this.el.parentElement.children),
              Array.isArray(t) ? t : Array.from(t)).filter((t) => t.matches('calcite-tab')),
              this.el,
            );
            var t;
          }
          async updateAriaInfo(t = [], e = []) {
            this.labeledBy = e[t.indexOf(this.el.id)] || null;
          }
          get el() {
            return this;
          }
          static get style() {
            return '@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host([active]) section{display:block}:host{display:none;z-index:10}:host([active]){display:block}section{height:100%;width:100%;display:none}';
          }
        },
        on = class extends HTMLElement {
          constructor() {
            super(),
              this.__registerHost(),
              At(this),
              (this.calciteTabChange = yt(this, 'calciteTabChange', 7)),
              (this.layout = 'inline'),
              (this.position = 'below'),
              (this.animationActiveDuration = 0.3),
              (this.handleContainerScroll = () => {
                (this.activeIndicatorEl.style.transitionDuration = '0s'),
                  this.updateOffsetPosition();
              });
          }
          async selectedTabChanged() {
            localStorage &&
              this.storageId &&
              void 0 !== this.selectedTab &&
              null !== this.selectedTab &&
              localStorage.setItem(
                `calcite-tab-nav-${this.storageId}`,
                JSON.stringify(this.selectedTab),
              ),
              this.calciteTabChange.emit({ tab: this.selectedTab }),
              (this.selectedTabEl = await this.getTabTitleById(this.selectedTab));
          }
          selectedTabElChanged() {
            this.updateOffsetPosition(),
              this.updateActiveWidth(),
              (this.activeIndicatorEl.style.transitionDuration = `${this.animationActiveDuration}s`);
          }
          componentWillLoad() {
            const t = `calcite-tab-nav-${this.storageId}`;
            if (localStorage && this.storageId && localStorage.getItem(t)) {
              const e = JSON.parse(localStorage.getItem(t));
              (this.selectedTab = e), this.calciteTabChange.emit({ tab: this.selectedTab });
            }
          }
          componentWillRender() {
            var t, e;
            (this.layout =
              null === (t = this.el.closest('calcite-tabs')) || void 0 === t ? void 0 : t.layout),
              (this.position =
                null === (e = this.el.closest('calcite-tabs')) || void 0 === e
                  ? void 0
                  : e.position);
          }
          componentDidRender() {
            this.tabTitles.length &&
              this.tabTitles.every((t) => !t.active) &&
              !this.selectedTab &&
              this.tabTitles[0].getTabIdentifier().then((t) => {
                this.calciteTabChange.emit({ tab: t });
              });
          }
          render() {
            const t = Kt(this.el),
              e = `${this.indicatorWidth}px`,
              i = `${this.indicatorOffset}px`,
              a = 'rtl' !== t ? { width: e, left: i } : { width: e, right: i };
            return K(
              J,
              { role: 'tablist' },
              K(
                'div',
                {
                  class: 'tab-nav',
                  onScroll: this.handleContainerScroll,
                  ref: (t) => (this.tabNavEl = t),
                },
                K(
                  'div',
                  {
                    class: 'tab-nav-active-indicator-container',
                    ref: (t) => (this.activeIndicatorContainerEl = t),
                  },
                  K('div', {
                    class: 'tab-nav-active-indicator',
                    ref: (t) => (this.activeIndicatorEl = t),
                    style: a,
                  }),
                ),
                K('slot', null),
              ),
            );
          }
          resizeHandler() {
            (this.activeIndicatorEl.style.transitionDuration = '0s'),
              this.updateActiveWidth(),
              this.updateOffsetPosition();
          }
          focusPreviousTabHandler(t) {
            const e = this.getIndexOfTabTitle(t.target, this.enabledTabTitles);
            (
              this.enabledTabTitles[e - 1] ||
              this.enabledTabTitles[this.enabledTabTitles.length - 1]
            ).focus(),
              t.stopPropagation(),
              t.preventDefault();
          }
          focusNextTabHandler(t) {
            const e = this.getIndexOfTabTitle(t.target, this.enabledTabTitles);
            (this.enabledTabTitles[e + 1] || this.enabledTabTitles[0]).focus(),
              t.stopPropagation(),
              t.preventDefault();
          }
          activateTabHandler(t) {
            t.detail.tab
              ? (this.selectedTab = t.detail.tab)
              : (this.selectedTab = this.getIndexOfTabTitle(t.target)),
              t.stopPropagation(),
              t.preventDefault();
          }
          updateTabTitles(t) {
            t.target.active && (this.selectedTab = t.detail);
          }
          globalTabChangeHandler(t) {
            this.syncId &&
              t.target !== this.el &&
              t.target.syncId === this.syncId &&
              this.selectedTab !== t.detail.tab &&
              (this.selectedTab = t.detail.tab);
          }
          updateOffsetPosition() {
            var t, e, i, a, r;
            const n = Kt(this.el),
              o =
                null === (t = this.activeIndicatorContainerEl) || void 0 === t
                  ? void 0
                  : t.offsetWidth,
              s = null === (e = this.selectedTabEl) || void 0 === e ? void 0 : e.offsetLeft,
              l =
                o -
                (s + (null === (i = this.selectedTabEl) || void 0 === i ? void 0 : i.offsetWidth));
            this.indicatorOffset =
              'rtl' !== n
                ? s - (null === (a = this.tabNavEl) || void 0 === a ? void 0 : a.scrollLeft)
                : l + (null === (r = this.tabNavEl) || void 0 === r ? void 0 : r.scrollLeft);
          }
          updateActiveWidth() {
            var t;
            this.indicatorWidth =
              null === (t = this.selectedTabEl) || void 0 === t ? void 0 : t.offsetWidth;
          }
          getIndexOfTabTitle(t, e = this.tabTitles) {
            return e.indexOf(t);
          }
          async getTabTitleById(t) {
            return Promise.all(this.tabTitles.map((t) => t.getTabIdentifier())).then(
              (e) => this.tabTitles[e.indexOf(t)],
            );
          }
          get tabTitles() {
            return te(this.el, 'calcite-tab-title');
          }
          get enabledTabTitles() {
            return te(this.el, 'calcite-tab-title:not([disabled])');
          }
          get el() {
            return this;
          }
          static get watchers() {
            return { selectedTab: ['selectedTabChanged'], selectedTabEl: ['selectedTabElChanged'] };
          }
          static get style() {
            return '@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host{z-index:20;position:relative;display:-ms-flexbox;display:flex}.tab-nav{display:-ms-flexbox;display:flex;width:100%;overflow:auto;-ms-flex-pack:start;justify-content:flex-start;-webkit-overflow-scrolling:touch;padding:0.25rem;margin:-0.25rem}:host([layout=center]) .tab-nav{-ms-flex-pack:center;justify-content:center}.tab-nav-active-indicator-container{width:100%;right:0;left:0;bottom:0;position:absolute;overflow:hidden;height:0.125rem}.tab-nav-active-indicator{position:absolute;bottom:0;display:block;-webkit-transition-property:all;transition-property:all;-webkit-transition-timing-function:cubic-bezier(0, 0, 0.2, 1);transition-timing-function:cubic-bezier(0, 0, 0.2, 1);background-color:var(--calcite-ui-brand);height:0.125rem}:host([position=below]) .tab-nav-active-indicator{bottom:unset;top:0}:host([position=below]) .tab-nav-active-indicator-container{bottom:unset;top:0}';
          }
        },
        sn = class extends HTMLElement {
          constructor() {
            super(),
              this.__registerHost(),
              At(this),
              (this.calciteTabsActivate = yt(this, 'calciteTabsActivate', 7)),
              (this.calciteTabsFocusNext = yt(this, 'calciteTabsFocusNext', 7)),
              (this.calciteTabsFocusPrevious = yt(this, 'calciteTabsFocusPrevious', 7)),
              (this.calciteTabTitleRegister = yt(this, 'calciteTabTitleRegister', 7)),
              (this.active = !1),
              (this.disabled = !1),
              (this.hasText = !1),
              (this.guid = `calcite-tab-title-${Xt()}`);
          }
          connectedCallback() {
            this.setupTextContentObserver(),
              (this.parentTabNavEl = this.el.closest('calcite-tab-nav'));
          }
          disconnectedCallback() {
            var t;
            this.observer.disconnect(),
              null === (t = document.body) ||
                void 0 === t ||
                t.dispatchEvent(new CustomEvent('calciteTabTitleUnregister', { detail: this.el }));
          }
          componentWillLoad() {
            this.updateHasText(), this.tab && this.active && this.emitActiveTab();
          }
          componentWillRender() {
            var t, e;
            (this.layout =
              null === (t = this.el.closest('calcite-tabs')) || void 0 === t ? void 0 : t.layout),
              (this.position =
                null === (e = this.el.closest('calcite-tabs')) || void 0 === e
                  ? void 0
                  : e.position);
          }
          render() {
            const t = Kt(this.el),
              e = this.el.id || this.guid,
              i = this.disabled ? 'span' : 'a',
              a = K('calcite-icon', {
                class: 'calcite-tab-title--icon icon-start',
                dir: t,
                flipRtl: 'start' === this.iconFlipRtl || 'both' === this.iconFlipRtl,
                icon: this.iconStart,
                scale: 's',
              }),
              r = K('calcite-icon', {
                class: 'calcite-tab-title--icon icon-end',
                dir: t,
                flipRtl: 'end' === this.iconFlipRtl || 'both' === this.iconFlipRtl,
                icon: this.iconEnd,
                scale: 's',
              });
            return K(
              J,
              {
                'aria-controls': this.controls,
                'aria-expanded': this.active.toString(),
                id: e,
                role: 'tab',
                tabindex: this.disabled ? '-1' : '0',
              },
              K(
                i,
                { class: { container: !0, 'container--has-text': this.hasText, rtl: 'rtl' === t } },
                this.iconStart ? a : null,
                K('slot', null),
                this.iconEnd ? r : null,
              ),
            );
          }
          async componentDidLoad() {
            this.calciteTabTitleRegister.emit(await this.getTabIdentifier());
          }
          tabChangeHandler(t) {
            this.parentTabNavEl === t.target &&
              (this.tab
                ? (this.active = this.tab === t.detail.tab)
                : this.getTabIndex().then((e) => {
                    this.active = e === t.detail.tab;
                  }));
          }
          onClick() {
            this.emitActiveTab();
          }
          keyDownHandler(t) {
            switch (qt(t.key)) {
              case ' ':
              case 'Enter':
                this.emitActiveTab(), t.preventDefault();
                break;
              case 'ArrowRight':
                'ltr' === Kt(this.el)
                  ? this.calciteTabsFocusNext.emit()
                  : this.calciteTabsFocusPrevious.emit();
                break;
              case 'ArrowLeft':
                'ltr' === Kt(this.el)
                  ? this.calciteTabsFocusPrevious.emit()
                  : this.calciteTabsFocusNext.emit();
            }
          }
          async getTabIndex() {
            return Array.prototype.indexOf.call(
              this.el.parentElement.querySelectorAll('calcite-tab-title'),
              this.el,
            );
          }
          async getTabIdentifier() {
            return this.tab ? this.tab : this.getTabIndex();
          }
          async updateAriaInfo(t = [], e = []) {
            this.controls = t[e.indexOf(this.el.id)] || null;
          }
          updateHasText() {
            this.hasText = this.el.textContent.trim().length > 0;
          }
          setupTextContentObserver() {
            (this.observer = new MutationObserver(() => {
              this.updateHasText();
            })),
              this.observer.observe(this.el, { childList: !0, subtree: !0 });
          }
          emitActiveTab() {
            this.disabled || this.calciteTabsActivate.emit({ tab: this.tab });
          }
          get el() {
            return this;
          }
          static get style() {
            return '@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host{-ms-flex:0 1 auto;flex:0 1 auto;outline:2px solid transparent;outline-offset:2px;margin-right:1.25rem;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:1.25rem;margin-inline-end:1.25rem}:host([layout=center]){text-align:center;margin-top:0;margin-bottom:0;margin-left:1.25rem;margin-right:1.25rem;-ms-flex-preferred-size:12rem;flex-basis:12rem}:host([position=below]) a{border-bottom-width:0;border-top-width:2px;border-top-color:transparent;border-top-style:solid}:host a{outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out}:host(:focus) a{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}:host(:active) a,:host(:focus) a,:host(:hover) a{text-decoration:none;color:var(--calcite-ui-text-1);border-color:var(--calcite-ui-border-2)}:host([active]) a{color:var(--calcite-ui-text-1);border-color:transparent}:host([disabled]){pointer-events:none}:host([disabled]) span,:host([disabled]) a{pointer-events:none;opacity:0.5}a,span{-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-bottom-width:2px;border-bottom-color:transparent;width:100%;height:100%;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;color:var(--calcite-ui-text-3);font-size:var(--calcite-font-size--1);line-height:1rem;-webkit-transition-property:all;transition-property:all;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;-webkit-transition-delay:0s;transition-delay:0s;padding-left:0;padding-right:0;padding-top:0.5rem;padding-bottom:0.5rem;border-bottom-style:solid}span{cursor:default}.calcite-tab-title--icon{display:-ms-inline-flexbox;display:inline-flex;position:relative;margin:0;-ms-flex-item-align:center;align-self:center}.calcite-tab-title--icon svg{-webkit-transition-property:all;transition-property:all;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;-webkit-transition-delay:0s;transition-delay:0s}.container--has-text .calcite-tab-title--icon.icon-start{margin-right:0.5rem}.container--has-text .calcite-tab-title--icon.icon-end{margin-left:0.5rem}:host([icon-start][icon-end]) .calcite-tab-title--icon:first-child{margin-right:0.5rem}:host .rtl{margin-right:0;margin-left:1.25rem}.container--has-text.rtl .calcite-tab-title--icon.icon-end{margin-left:0;margin-right:0.5rem}.container--has-text.rtl .calcite-tab-title--icon.icon-start{margin-left:0.5rem;margin-right:0}:host([icon-start][icon-end]) .rtl .calcite-tab-title--icon:first-child{margin-left:0.5rem;margin-right:0}';
          }
        },
        ln = class extends HTMLElement {
          constructor() {
            super(),
              this.__registerHost(),
              At(this),
              (this.layout = 'inline'),
              (this.position = 'above'),
              (this.titles = []),
              (this.tabs = []);
          }
          render() {
            return K(Et, null, K('slot', { name: 'tab-nav' }), K('section', null, K('slot', null)));
          }
          calciteTabTitleRegister(t) {
            (this.titles = [...this.titles, t.target]), this.registryHandler(), t.stopPropagation();
          }
          calciteTabTitleUnregister(t) {
            (this.titles = this.titles.filter((e) => e !== t.detail)),
              this.registryHandler(),
              t.stopPropagation();
          }
          calciteTabRegister(t) {
            (this.tabs = [...this.tabs, t.target]), this.registryHandler(), t.stopPropagation();
          }
          calciteTabUnregister(t) {
            (this.tabs = this.tabs.filter((e) => e !== t.detail)),
              this.registryHandler(),
              t.stopPropagation();
          }
          async registryHandler() {
            let t, e;
            if (this.tabs.some((t) => t.tab) || this.titles.some((t) => t.tab))
              (t = this.tabs.sort((t, e) => t.tab.localeCompare(e.tab)).map((t) => t.id)),
                (e = this.titles.sort((t, e) => t.tab.localeCompare(e.tab)).map((t) => t.id));
            else {
              const i = await Promise.all(this.tabs.map((t) => t.getTabIndex())),
                a = await Promise.all(this.titles.map((t) => t.getTabIndex()));
              (t = i.reduce((t, e, i) => ((t[e] = this.tabs[i].id), t), [])),
                (e = a.reduce((t, e, i) => ((t[e] = this.titles[i].id), t), []));
            }
            this.tabs.forEach((i) => i.updateAriaInfo(t, e)),
              this.titles.forEach((i) => i.updateAriaInfo(t, e));
          }
          get el() {
            return this;
          }
          static get style() {
            return '@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host([position=below]){-ms-flex-direction:column-reverse;flex-direction:column-reverse}section{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;overflow:hidden;border-top-width:1px;border-top-color:var(--calcite-ui-border-1);border-top-style:solid}:host([position=below]) section{-ms-flex-direction:column-reverse;flex-direction:column-reverse;border-top-width:0;border-bottom-width:1px;border-bottom-color:var(--calcite-ui-border-1);border-bottom-style:solid}';
          }
        };
      var cn, hn;
      let un;
      !(function (t) {
        (t.Single = 'single'),
          (t.Multi = 'multi'),
          (t.Children = 'children'),
          (t.MultiChildren = 'multi-children'),
          (t.Ancestors = 'ancestors');
      })(cn || (cn = {})),
        (function (t) {
          t.grip = 'grip';
        })(hn || (hn = {})),
        It(be, [
          1,
          'calcite-button',
          {
            appearance: [513],
            color: [513],
            disabled: [516],
            href: [513],
            iconEnd: [513, 'icon-end'],
            iconFlipRtl: [513, 'icon-flip-rtl'],
            iconStart: [513, 'icon-start'],
            intlLoading: [1, 'intl-loading'],
            alignment: [513],
            loading: [516],
            round: [516],
            scale: [513],
            splitChild: [520, 'split-child'],
            width: [513],
            hasContent: [32],
          },
        ]),
        It(Ti, [
          1,
          'calcite-color-picker',
          {
            allowEmpty: [4, 'allow-empty'],
            appearance: [513],
            color: [1040],
            format: [1],
            hideHex: [4, 'hide-hex'],
            hideChannels: [4, 'hide-channels'],
            hideSaved: [4, 'hide-saved'],
            intlB: [1, 'intl-b'],
            intlBlue: [1, 'intl-blue'],
            intlDeleteColor: [1, 'intl-delete-color'],
            intlG: [1, 'intl-g'],
            intlGreen: [1, 'intl-green'],
            intlH: [1, 'intl-h'],
            intlHsv: [1, 'intl-hsv'],
            intlHex: [1, 'intl-hex'],
            intlHue: [1, 'intl-hue'],
            intlNoColor: [1, 'intl-no-color'],
            intlR: [1, 'intl-r'],
            intlRed: [1, 'intl-red'],
            intlRgb: [1, 'intl-rgb'],
            intlS: [1, 'intl-s'],
            intlSaturation: [1, 'intl-saturation'],
            intlSaveColor: [1, 'intl-save-color'],
            intlSaved: [1, 'intl-saved'],
            intlV: [1, 'intl-v'],
            intlValue: [1, 'intl-value'],
            scale: [513],
            storageId: [1, 'storage-id'],
            value: [1025],
            colorFieldAndSliderInteractive: [32],
            channelMode: [32],
            channels: [32],
            dimensions: [32],
            savedColors: [32],
            colorFieldScopeTop: [32],
            colorFieldScopeLeft: [32],
            scopeOrientation: [32],
            hueScopeLeft: [32],
            hueScopeTop: [32],
          },
          [
            [2, 'keydown', 'handleChannelKeyUpOrDown'],
            [2, 'keyup', 'handleChannelKeyUpOrDown'],
          ],
        ]),
        It(Ii, [
          1,
          'calcite-color-picker-hex-input',
          {
            allowEmpty: [4, 'allow-empty'],
            intlHex: [1, 'intl-hex'],
            intlNoColor: [1, 'intl-no-color'],
            scale: [513],
            value: [1537],
            internalColor: [32],
          },
          [[2, 'keydown', 'onInputKeyDown']],
        ]),
        It(Ai, [1, 'calcite-color-picker-swatch', { active: [516], color: [1], scale: [513] }]),
        It(zi, [
          0,
          'calcite-graph',
          {
            data: [16],
            width: [2],
            height: [2],
            highlightMin: [2, 'highlight-min'],
            highlightMax: [2, 'highlight-max'],
          },
        ]),
        It(Bi, [
          1,
          'calcite-icon',
          {
            icon: [513],
            flipRtl: [516, 'flip-rtl'],
            scale: [513],
            textLabel: [1, 'text-label'],
            pathData: [32],
            visible: [32],
          },
        ]),
        It(Gi, [
          6,
          'calcite-input',
          {
            alignment: [513],
            autofocus: [4],
            clearable: [516],
            disabled: [516],
            groupSeparator: [4, 'group-separator'],
            icon: [520],
            iconFlipRtl: [516, 'icon-flip-rtl'],
            loading: [516],
            locale: [1],
            localeFormat: [4, 'locale-format'],
            max: [514],
            min: [514],
            maxlength: [514],
            maxLength: [514, 'max-length'],
            minLength: [514, 'min-length'],
            name: [513],
            numberButtonType: [513, 'number-button-type'],
            placeholder: [1],
            prefixText: [1, 'prefix-text'],
            required: [4],
            scale: [1537],
            status: [1537],
            step: [1544],
            suffixText: [1, 'suffix-text'],
            type: [513],
            value: [1537],
            localizedValue: [32],
          },
          [[0, 'keydown', 'keyDownHandler']],
        ]),
        It(Yi, [
          6,
          'calcite-label',
          {
            alignment: [513],
            status: [513],
            for: [513],
            scale: [513],
            layout: [513],
            disableSpacing: [4, 'disable-spacing'],
            disabled: [516],
          },
          [[0, 'click', 'onClick']],
        ]),
        It(Ki, [
          1,
          'calcite-loader',
          {
            active: [516],
            inline: [516],
            label: [1],
            scale: [513],
            type: [513],
            value: [2],
            text: [1],
            noPadding: [4, 'no-padding'],
          },
        ]),
        It(Zi, [
          1,
          'calcite-option',
          { disabled: [516], label: [1025], selected: [516], value: [1032] },
        ]),
        It(Ji, [1, 'calcite-option-group', { disabled: [516], label: [1] }]),
        It(ta, [1, 'calcite-progress', { type: [1], value: [2], text: [1], reversed: [4] }]),
        It(ia, [
          1,
          'calcite-select',
          { disabled: [516], label: [1], scale: [513], selectedOption: [1040], width: [513] },
          [
            [0, 'calciteOptionChange', 'handleOptionOrGroupChange'],
            [0, 'calciteOptionGroupChange', 'handleOptionOrGroupChange'],
            [8, 'calciteLabelFocus', 'handleLabelFocus'],
          ],
        ]),
        It(aa, [
          1,
          'calcite-slider',
          {
            disabled: [516],
            min: [514],
            max: [514],
            value: [1538],
            minValue: [1026, 'min-value'],
            maxValue: [1026, 'max-value'],
            minLabel: [1, 'min-label'],
            maxLabel: [1, 'max-label'],
            snap: [4],
            step: [2],
            pageStep: [2, 'page-step'],
            ticks: [2],
            labelTicks: [516, 'label-ticks'],
            labelHandles: [516, 'label-handles'],
            precise: [4],
            histogram: [16],
            hasHistogram: [1540, 'has-histogram'],
            tickValues: [32],
            activeProp: [32],
            minMaxValueRange: [32],
            minValueDragRange: [32],
            maxValueDragRange: [32],
          },
          [
            [8, 'calciteLabelFocus', 'handleLabelFocus'],
            [0, 'keydown', 'keyDownHandler'],
            [1, 'mousedown', 'mouseHandler'],
            [0, 'click', 'mouseHandler'],
          ],
        ]),
        It(rn, [
          1,
          'calcite-switch',
          {
            disabled: [516],
            name: [513],
            scale: [513],
            switched: [1540],
            value: [520],
            guid: [32],
            tabindex: [32],
          },
          [
            [8, 'calciteLabelFocus', 'handleLabelFocus'],
            [0, 'click', 'onClick'],
            [0, 'keydown', 'keyDownHandler'],
          ],
        ]),
        It(nn, [
          1,
          'calcite-tab',
          { tab: [513], active: [1540], labeledBy: [32] },
          [[16, 'calciteTabChange', 'tabChangeHandler']],
        ]),
        It(on, [
          1,
          'calcite-tab-nav',
          {
            storageId: [1, 'storage-id'],
            syncId: [1, 'sync-id'],
            layout: [1537],
            position: [1537],
            indicatorOffset: [1026, 'indicator-offset'],
            indicatorWidth: [1026, 'indicator-width'],
            selectedTab: [32],
            selectedTabEl: [32],
          },
          [
            [9, 'resize', 'resizeHandler'],
            [0, 'calciteTabsFocusPrevious', 'focusPreviousTabHandler'],
            [0, 'calciteTabsFocusNext', 'focusNextTabHandler'],
            [0, 'calciteTabsActivate', 'activateTabHandler'],
            [0, 'calciteTabTitleRegister', 'updateTabTitles'],
            [16, 'calciteTabChange', 'globalTabChangeHandler'],
          ],
        ]),
        It(sn, [
          1,
          'calcite-tab-title',
          {
            active: [1540],
            disabled: [516],
            iconEnd: [513, 'icon-end'],
            iconFlipRtl: [513, 'icon-flip-rtl'],
            iconStart: [513, 'icon-start'],
            layout: [1537],
            position: [1537],
            tab: [513],
            controls: [32],
            hasText: [32],
          },
          [
            [16, 'calciteTabChange', 'tabChangeHandler'],
            [0, 'click', 'onClick'],
            [0, 'keydown', 'keyDownHandler'],
          ],
        ]),
        It(ln, [
          1,
          'calcite-tabs',
          { layout: [513], position: [513], titles: [32], tabs: [32] },
          [
            [0, 'calciteTabTitleRegister', 'calciteTabTitleRegister'],
            [16, 'calciteTabTitleUnregister', 'calciteTabTitleUnregister'],
            [0, 'calciteTabRegister', 'calciteTabRegister'],
            [16, 'calciteTabUnregister', 'calciteTabUnregister'],
          ],
        ]),
        (un = 'esri/widgets/support/components/assets');
      const dn = h.L.getLogger('esri.widgets.Widget');
      let pn = 0;
      function mn(t, e) {
        for (const i in e)
          null != t[i] &&
            ('object' == typeof t[i] && 'object' == typeof e[i] ? mn(t[i], e[i]) : (t[i] = e[i]));
        return t;
      }
      const fn = ((t) => {
        let e;
        const i = { ...D, ...t },
          a = ((t) => ({ ...C, ...t }))(i),
          r = a.performanceLogger;
        let n,
          o = !0,
          s = !1;
        const l = [],
          c = [],
          h = (t, n, o) => {
            let s;
            (a.eventHandlerInterceptor = (t, a, n, o) =>
              function (t) {
                let a;
                r('domEvent', t);
                const n = ((t, e) => {
                    const i = [];
                    for (; t && t !== e; ) i.push(t), (t = t.parentNode);
                    return i;
                  })(t.currentTarget, s.domNode),
                  o = n.some((t) => {
                    var e;
                    return customElements.get(
                      null == t || null == (e = t.tagName) ? void 0 : e.toLowerCase(),
                    );
                  });
                if (t.eventPhase !== Event.CAPTURING_PHASE && o) {
                  const e = t.composedPath(),
                    i = e
                      .slice(e.indexOf(t.currentTarget), e.indexOf(s.domNode))
                      .filter((t) => t.getRootNode() === t.ownerDocument)
                      .reverse();
                  a = T(s.getLastRender(), i, !0);
                } else n.reverse(), (a = T(s.getLastRender(), n));
                let l;
                return (
                  a && (l = i.handleInterceptedEvent(e, a, this, t)), r('domEventProcessed', t), l
                );
              }),
              null == i.postProcessProjectionOptions || i.postProcessProjectionOptions(a);
            const h = o();
            (s = t(n, h, a)),
              l.push(s),
              c.push(o),
              i.afterFirstVNodeRendered && i.afterFirstVNodeRendered(s, h);
          };
        let u = () => {
          if (((n = void 0), o)) {
            (o = !1), r('renderStart', void 0);
            for (let t = 0; t < l.length; t++) {
              const e = c[t]();
              r('rendered', void 0), l[t].update(e), r('patched', void 0);
            }
            r('renderDone', void 0), (o = !0);
          }
        };
        return (
          i.modifyDoRenderImplementation && (u = i.modifyDoRenderImplementation(u, l, c)),
          (e = {
            renderNow: u,
            scheduleRender: () => {
              n || s || (n = requestAnimationFrame(u));
            },
            stop: () => {
              n && (cancelAnimationFrame(n), (n = void 0)), (s = !0);
            },
            resume: () => {
              (s = !1), (o = !0), e.scheduleRender();
            },
            append: (t, e) => {
              h(y.d.append, t, e);
            },
            insertBefore: (t, e) => {
              h(y.d.insertBefore, t, e);
            },
            merge: (t, e) => {
              h(y.d.merge, t, e);
            },
            replace: (t, e) => {
              h(y.d.replace, t, e);
            },
            detach: (t) => {
              for (let e = 0; e < c.length; e++)
                if (c[e] === t) return c.splice(e, 1), l.splice(e, 1)[0];
              throw new Error('renderFunction was not found');
            },
          }),
          e
        );
      })({
        postProcessProjectionOptions(t) {
          const e = t.eventHandlerInterceptor,
            i = /capture$/i;
          t.eventHandlerInterceptor = (t, a, r, n) => {
            const o = e(t, a, r, n),
              s = i.test(t);
            if (!((t = t.replace(i, '')).toLowerCase() in r) || s) {
              const e = t[2].toLowerCase() + t.slice(3),
                i = (t) => o.call(r, t);
              r.addEventListener(e, i, s);
              const a = () => r.removeEventListener(e, i, s),
                l = n.afterRemoved;
              n.afterRemoved = (t) => {
                null == l || l(t), a();
              };
            }
            return o;
          };
        },
        handleInterceptedEvent(t, e, i, a) {
          const { eventPhase: r, type: n } = a,
            o = r === Event.CAPTURING_PHASE;
          let s = `on${n}${o ? 'capture' : ''}`;
          const l = e.properties;
          (s in l || ((s = `on${n[0].toUpperCase()}${n.slice(1)}${o ? 'Capture' : ''}`), s in l)) &&
            (t.scheduleRender(), l[s].call(l.bind || i, a));
        },
      });
      let bn = !1,
        gn = class extends (0, u.a)(s.E.EventedAccessor) {
          constructor(t, e) {
            super(t, e),
              (this._attached = !1),
              (this._internalHandles = new l.Z()),
              (this._projector = fn),
              (this.domNode = null),
              (this.iconClass = 'esri-icon-checkbox-unchecked'),
              (this.label = this.declaredClass.split('.').pop()),
              (this.visible = !0),
              (this.key = this),
              (this._loadLocale = (0, d.Ds)(async () => {
                if (this._messageBundleProps && this._messageBundleProps.length) {
                  const t = await (0, d.as)(
                    this._messageBundleProps.map(async ({ bundlePath: t, propertyName: e }) => {
                      let i = await (0, r.ME)(t);
                      this.localeStrings &&
                        Object.keys(this.localeStrings) &&
                        (i = mn((0, c.d9)(i), this.localeStrings)),
                        (this[e] = i);
                    }),
                  );
                  for (const e of t)
                    e.error && dn.error('widget-intl:locale-error', this.declaredClass, e.error);
                }
                await this.loadLocale();
              })),
              (function (t) {
                ((t) => {
                  F.$resourcesUrl$ = t;
                })(t);
              })((0, x.hF)((0, w.g)('esri/widgets/support/components/assets')));
            const i = (0, _.g)() || 'light';
            ['light', 'dark'].includes(i) ||
              (0, n.b)(
                dn,
                'The following themes are deprecated: light-blue, dark-blue, light-green, dark-green, light-purple, dark-purple, light-red, and dark-red.',
                {
                  version: '4.19',
                  warnOnce: !0,
                  see: 'https://developers.arcgis.com/javascript/latest/styling/',
                },
              );
            const a = 'esri-widget-uid-' + (0, p.g)(),
              o = this.render.bind(this);
            let s = !1;
            this._trackingTarget = new v.S(() => this.scheduleRender());
            const h = () => {
              var t;
              if (!s || this.destroyed) return null;
              if (!this.visible)
                return {
                  vnodeSelector: 'div',
                  properties: { key: a, class: '', styles: { display: 'none' } },
                  domNode: void 0,
                  children: void 0,
                  text: void 0,
                };
              const e = o();
              let { properties: i } = e;
              i || (e.properties = i = {});
              let { key: r, styles: n } = i;
              r || (i.key = a), n || (i.styles = n = {}), n.display || (n.display = '');
              let l = 0;
              return (
                null == (t = e.children) ||
                  t.forEach((t) => {
                    if ((0, k.i)(t.vnodeSelector)) return;
                    let { properties: e } = t;
                    e || (t.properties = e = {}), e.key || (e.key = `${this.id}--${l++}`);
                  }),
                (0, k.p)(this, e)
              );
            };
            (this.render = () => {
              if (bn) return h();
              let t;
              this._trackingTarget.clear(), (bn = !0);
              try {
                t = (0, g.r)(this._trackingTarget, h);
              } finally {
                bn = !1;
              }
              return t;
            }),
              this.addResolvingPromise(
                (this._resourcesFetch = this.beforeFirstRender().then(() => {
                  (s = !0), this._postInitialize();
                })),
              );
          }
          normalizeCtorArgs(t, e) {
            const i = { ...t };
            return e && (i.container = e), i;
          }
          postInitialize() {}
          beforeFirstRender() {
            return this._loadLocale().catch(d.H9);
          }
          async loadLocale() {}
          destroy() {
            this.destroyed ||
              (this._trackingTarget.destroy(),
              (this._trackingTarget = null),
              this.viewModel && (this.viewModel.destroy(), (this.viewModel = null)),
              this._detach(this.container),
              this._set('container', null),
              this._internalHandles.destroy(),
              this._emitter.clear(),
              (this.render = () => null),
              (this._projector = null));
          }
          set container(t) {
            this._get('container') || this._set('container', t);
          }
          castContainer(t) {
            return (0, o.b)(t);
          }
          get id() {
            return (
              this._get('id') ||
              this.get('container.id') ||
              Date.now().toString(16) + '-widget-' + pn++
            );
          }
          set id(t) {
            t && this._set('id', t);
          }
          get renderable() {
            return this._resourcesFetch;
          }
          get test() {
            return { projector: this._projector, handles: this._internalHandles };
          }
          render() {
            throw new Error('not implemented');
          }
          scheduleRender() {
            this.destroyed || this._projector.scheduleRender();
          }
          classes(...t) {
            return _.c.apply(this, t);
          }
          own(t) {
            arguments.length > 1 && (t = Array.prototype.slice.call(arguments)),
              this._internalHandles.add(t);
          }
          renderNow() {
            this._projector.renderNow();
          }
          _postInitialize() {
            var t;
            if (this.destroyed) return;
            this.scheduleRender(),
              null != (t = this._delegatedEventNames) &&
                t.length &&
                this._internalHandles.add(
                  (0, m.S1)(this, 'viewModel', (t, e) => {
                    e && this._internalHandles.remove('delegated-events'),
                      t &&
                        this._internalHandles.add(
                          this._delegatedEventNames.map((e) =>
                            t.on(e, (t) => {
                              this.emit(e, t);
                            }),
                          ),
                          'delegated-events',
                        );
                  }),
                ),
              this.postInitialize();
            const e = async () => {
              await this._loadLocale().catch(d.H9), this.scheduleRender();
            };
            this._internalHandles.add([
              (0, S.o)(e),
              this.watch('localeStrings', e),
              (0, m.N1)(this, 'container', async (t) => {
                this.destroyed || this._attach(t);
              }),
            ]);
          }
          _attach(t) {
            t && (this._projector.merge(t, this.render), (this._attached = !0));
          }
          _detach(t) {
            t &&
              this._attached &&
              (this._projector.detach(this.render),
              t.parentNode && t.parentNode.removeChild(t),
              (this._attached = !1));
          }
        };
      (gn[k.W] = !0),
        (0, a._)([(0, f.Cb)({ value: null })], gn.prototype, 'container', null),
        (0, a._)([(0, b.p)('container')], gn.prototype, 'castContainer', null),
        (0, a._)([(0, f.Cb)({ aliasOf: 'container' })], gn.prototype, 'domNode', void 0),
        (0, a._)([(0, f.Cb)()], gn.prototype, 'iconClass', void 0),
        (0, a._)([(0, f.Cb)()], gn.prototype, 'id', null),
        (0, a._)([(0, f.Cb)()], gn.prototype, 'label', void 0),
        (0, a._)([(0, f.Cb)()], gn.prototype, 'localeStrings', void 0),
        (0, a._)([(0, f.Cb)()], gn.prototype, 'renderable', null),
        (0, a._)([(0, f.Cb)()], gn.prototype, 'viewModel', void 0),
        (0, a._)([(0, f.Cb)()], gn.prototype, 'visible', void 0),
        (0, a._)([(0, f.Cb)()], gn.prototype, 'key', void 0),
        (0, a._)([(0, f.Cb)()], gn.prototype, 'afterCreate', void 0),
        (0, a._)([(0, f.Cb)()], gn.prototype, 'afterUpdate', void 0),
        (0, a._)([(0, f.Cb)()], gn.prototype, 'afterRemoved', void 0),
        (gn = (0, a._)([(0, g.j)('esri.widgets.Widget')], gn));
      const vn = gn;
    },
  },
]);
