!(function () {
  var e =
    "undefined" != typeof globalThis
      ? globalThis
      : "undefined" != typeof self
      ? self
      : "undefined" != typeof window
      ? window
      : "undefined" != typeof global
      ? global
      : {};
  function t(e) {
    return e && e.__esModule ? e.default : e;
  }
  function r(e, t, r) {
    Object.defineProperty(e, t, { get: r, enumerable: !0 });
  }
  let n;
  (() => {
    const e = "app",
      t = "production",
      r = !1;
    if (((n = globalThis.app), n)) return;
    const o = {
        name: e,
        env: t,
        get: (e) => (e in o ? o[e] : null),
        ...JSON.parse('{"version":"28.0.6","manifestVersion":3}'),
      },
      a = (function e(t) {
        const n = t === o,
          a = n && r,
          l = {},
          c = (e) => Object.assign(t, e);
        return new Proxy(t, {
          get: function (r, o) {
            if ("assign" === o) return c;
            if (n && !String(o).startsWith("$")) return t[o];
            if (!(o in t)) {
              if (((t[o] = {}), n)) {
                const e = i.bind(null, "log", o, !1),
                  r = i.bind(null, "log", o, !0),
                  n = i.bind(null, "warn", o, !1),
                  a = i.bind(null, "warn", o, !0),
                  l = i.bind(null, "error", o, !1),
                  c = i.bind(null, "error", o, !0),
                  u = s.bind(null, o);
                Object.defineProperties(t[o], {
                  log: { get: () => e },
                  logDev: { get: () => r },
                  warn: { get: () => n },
                  warnDev: { get: () => a },
                  error: { get: () => l },
                  errorDev: { get: () => c },
                  Error: { get: () => u },
                });
              }
              (l[o] = e(t[o])), a && (globalThis[o] = t[o]);
            }
            return o in l ? l[o] : t[o];
          },
          set: function (e, r, n) {
            return (t[r] = n), (l[r] = n), a && (globalThis[r] = t[r]), !0;
          },
        });
      })(o);
    function i(e, t, r, ...n) {
      if (r) return;
      const [o, a, i] = l(t);
      console[e](`%c[${t}]`, `color: rgb(${o}, ${a}, ${i})`, ...n);
    }
    function s(e, t, ...r) {
      return (
        r.length > 0 && i("error", e, !1, t, ...r), new Error(`[${e}] ${t}`)
      );
    }
    function l(e) {
      let t = 0;
      e.split("").forEach((r, n) => {
        t = e.charCodeAt(n) + ((t << 5) - t);
      });
      const r = (16711680 & t) >> 16,
        n = (65280 & t) >> 8,
        o = 255 & t;
      return r + n + o < 300 ? l(`$${e}`) : [r, n, o];
    }
    (globalThis.app = a), (n = a);
  })();
  var o = {},
    a = {},
    i = {},
    s = 1;
  i = {
    nextValue: function () {
      return (s = (9301 * s + 49297) % 233280) / 233280;
    },
    seed: function (e) {
      s = e;
    },
  };
  var l,
    c,
    u,
    d = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-";
  function h() {
    u = !1;
  }
  function p(e) {
    if (e) {
      if (e !== l) {
        if (e.length !== d.length)
          throw new Error(
            "Custom alphabet for shortid must be " +
              d.length +
              " unique characters. You submitted " +
              e.length +
              " characters: " +
              e
          );
        var t = e.split("").filter(function (e, t, r) {
          return t !== r.lastIndexOf(e);
        });
        if (t.length)
          throw new Error(
            "Custom alphabet for shortid must be " +
              d.length +
              " unique characters. These characters were not unique: " +
              t.join(", ")
          );
        (l = e), h();
      }
    } else l !== d && ((l = d), h());
  }
  function m() {
    return (
      u ||
      (u = (function () {
        l || p(d);
        for (var e, t = l.split(""), r = [], n = i.nextValue(); t.length > 0; )
          (n = i.nextValue()),
            (e = Math.floor(n * t.length)),
            r.push(t.splice(e, 1)[0]);
        return r.join("");
      })())
    );
  }
  a = {
    get: function () {
      return l || d;
    },
    characters: function (e) {
      return p(e), l;
    },
    seed: function (e) {
      i.seed(e), c !== e && (h(), (c = e));
    },
    lookup: function (e) {
      return m()[e];
    },
    shuffled: m,
  };
  var g = "object" == typeof window && (window.crypto || window.msCrypto),
    f =
      g && g.getRandomValues
        ? function (e) {
            return g.getRandomValues(new Uint8Array(e));
          }
        : function (e) {
            for (var t = [], r = 0; r < e; r++)
              t.push(Math.floor(256 * Math.random()));
            return t;
          },
    v = function (e, t, r) {
      for (
        var n = (2 << (Math.log(t.length - 1) / Math.LN2)) - 1,
          o = -~((1.6 * n * r) / t.length),
          a = "";
        ;

      )
        for (var i = e(o), s = o; s--; )
          if ((a += t[i[s] & n] || "").length === +r) return a;
    };
  var b,
    y,
    w = function (e) {
      for (var t, r = 0, n = ""; !t; )
        (n += v(f, a.get(), 1)), (t = e < Math.pow(16, r + 1)), r++;
      return n;
    };
  var C = function (e) {
    var t = "",
      r = Math.floor(0.001 * (Date.now() - 1567752802062));
    return (
      r === y ? b++ : ((b = 0), (y = r)),
      (t += w(7)),
      (t += w(e)),
      b > 0 && (t += w(b)),
      (t += w(r))
    );
  };
  var k,
    S = function (e) {
      return (
        !(!e || "string" != typeof e || e.length < 6) &&
        !new RegExp(
          "[^" + a.get().replace(/[|\\{}()[\]^$+*?.-]/g, "\\$&") + "]"
        ).test(e)
      );
    },
    E = !1;
  var x = (E || ((E = !0), (k = {}), (k = 0)), k || 0);
  function P() {
    return C(x);
  }
  var T = P;
  (o = P).generate = T;
  var I = function (e) {
    return a.seed(e), o;
  };
  o.seed = I;
  var G = function (e) {
    return (x = e), o;
  };
  o.worker = G;
  var D = function (e) {
    return void 0 !== e && a.characters(e), a.shuffled();
  };
  o.characters = D;
  var A = S;
  o.isValid = A;
  var M = t(o);
  function F(e) {
    return `Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `;
  }
  var R,
    L = (() =>
      ("function" == typeof Symbol && Symbol.observable) || "@@observable")(),
    B = () => Math.random().toString(36).substring(7).split("").join("."),
    O = {
      INIT: `@@redux/INIT${B()}`,
      REPLACE: `@@redux/REPLACE${B()}`,
      PROBE_UNKNOWN_ACTION: () => `@@redux/PROBE_UNKNOWN_ACTION${B()}`,
    };
  function $(e) {
    if ("object" != typeof e || null === e) return !1;
    let t = e;
    for (; null !== Object.getPrototypeOf(t); ) t = Object.getPrototypeOf(t);
    return Object.getPrototypeOf(e) === t || null === Object.getPrototypeOf(e);
  }
  function N(e, t, r) {
    if ("function" != typeof e) throw new Error(F(2));
    if (
      ("function" == typeof t && "function" == typeof r) ||
      ("function" == typeof r && "function" == typeof arguments[3])
    )
      throw new Error(F(0));
    if (
      ("function" == typeof t && void 0 === r && ((r = t), (t = void 0)),
      void 0 !== r)
    ) {
      if ("function" != typeof r) throw new Error(F(1));
      return r(N)(e, t);
    }
    let n = e,
      o = t,
      a = new Map(),
      i = a,
      s = 0,
      l = !1;
    function c() {
      i === a &&
        ((i = new Map()),
        a.forEach((e, t) => {
          i.set(t, e);
        }));
    }
    function u() {
      if (l) throw new Error(F(3));
      return o;
    }
    function d(e) {
      if ("function" != typeof e) throw new Error(F(4));
      if (l) throw new Error(F(5));
      let t = !0;
      c();
      const r = s++;
      return (
        i.set(r, e),
        function () {
          if (t) {
            if (l) throw new Error(F(6));
            (t = !1), c(), i.delete(r), (a = null);
          }
        }
      );
    }
    function h(e) {
      if (!$(e)) throw new Error(F(7));
      if (void 0 === e.type) throw new Error(F(8));
      if ("string" != typeof e.type) throw new Error(F(17));
      if (l) throw new Error(F(9));
      try {
        (l = !0), (o = n(o, e));
      } finally {
        l = !1;
      }
      return (
        (a = i).forEach((e) => {
          e();
        }),
        e
      );
    }
    function p(e) {
      if ("function" != typeof e) throw new Error(F(10));
      (n = e), h({ type: O.REPLACE });
    }
    function m() {
      const e = d;
      return {
        subscribe: function (t) {
          if ("object" != typeof t || null === t) throw new Error(F(11));
          function r() {
            const e = t;
            e.next && e.next(u());
          }
          r();
          return { unsubscribe: e(r) };
        },
        [L]: function () {
          return this;
        },
      };
    }
    h({ type: O.INIT });
    const g = {
      dispatch: h,
      subscribe: d,
      getState: u,
      replaceReducer: p,
      [L]: m,
    };
    return g;
  }
  var U,
    H,
    z,
    j,
    W,
    V,
    q,
    Z,
    Y,
    Q,
    K,
    X,
    J,
    ee,
    te,
    re,
    ne,
    oe,
    ae,
    ie,
    se,
    le,
    ce,
    ue,
    de,
    he,
    pe,
    me,
    ge,
    fe,
    ve,
    be,
    ye,
    we,
    Ce,
    ke,
    Se,
    Ee,
    _e,
    xe,
    Pe,
    Te,
    Ie,
    Ge,
    De,
    Ae,
    Me,
    Fe,
    Re,
    Le,
    Be,
    Oe,
    $e,
    Ne,
    Ue,
    He,
    ze,
    je,
    We,
    Ve = !1;
  function qe(e, t, r) {
    (this.props = e),
      (this.context = t),
      (this.refs = re),
      (this.updater = r || ee);
  }
  function Ze() {}
  function Ye(e, t, r) {
    (this.props = e),
      (this.context = t),
      (this.refs = re),
      (this.updater = r || ee);
  }
  function Qe(e, t, r) {
    var n,
      o = {},
      a = null,
      i = null;
    if (null != t)
      for (n in (void 0 !== t.ref && (i = t.ref),
      void 0 !== t.key && (a = "" + t.key),
      t))
        ae.call(t, n) && !se.hasOwnProperty(n) && (o[n] = t[n]);
    var s = arguments.length - 2;
    if (1 === s) o.children = r;
    else if (1 < s) {
      for (var l = Array(s), c = 0; c < s; c++) l[c] = arguments[c + 2];
      o.children = l;
    }
    if (e && e.defaultProps)
      for (n in (s = e.defaultProps)) void 0 === o[n] && (o[n] = s[n]);
    return {
      $$typeof: H,
      type: e,
      key: a,
      ref: i,
      props: o,
      _owner: ie.current,
    };
  }
  function Ke(e) {
    return "object" == typeof e && null !== e && e.$$typeof === H;
  }
  function Xe(e, t) {
    return "object" == typeof e && null !== e && null != e.key
      ? (function (e) {
          var t = { "=": "=0", ":": "=2" };
          return (
            "$" +
            e.replace(/[=:]/g, function (e) {
              return t[e];
            })
          );
        })("" + e.key)
      : t.toString(36);
  }
  function Je(e, t, r, n, o) {
    var a = typeof e;
    ("undefined" !== a && "boolean" !== a) || (e = null);
    var i = !1;
    if (null === e) i = !0;
    else
      switch (a) {
        case "string":
        case "number":
          i = !0;
          break;
        case "object":
          switch (e.$$typeof) {
            case H:
            case z:
              i = !0;
          }
      }
    if (i)
      return (
        (o = o((i = e))),
        (e = "" === n ? "." + Xe(i, 0) : n),
        oe(o)
          ? ((r = ""),
            null != e && (r = e.replace(le, "$&/") + "/"),
            Je(o, t, r, "", function (e) {
              return e;
            }))
          : null != o &&
            (Ke(o) &&
              (o = (function (e, t) {
                return {
                  $$typeof: H,
                  type: e.type,
                  key: t,
                  ref: e.ref,
                  props: e.props,
                  _owner: e._owner,
                };
              })(
                o,
                r +
                  (!o.key || (i && i.key === o.key)
                    ? ""
                    : ("" + o.key).replace(le, "$&/") + "/") +
                  e
              )),
            t.push(o)),
        1
      );
    if (((i = 0), (n = "" === n ? "." : n + ":"), oe(e)))
      for (var s = 0; s < e.length; s++) {
        var l = n + Xe((a = e[s]), s);
        i += Je(a, t, r, l, o);
      }
    else if (
      "function" ==
      typeof (l = (function (e) {
        return null === e || "object" != typeof e
          ? null
          : "function" == typeof (e = (J && e[J]) || e["@@iterator"])
          ? e
          : null;
      })(e))
    )
      for (e = l.call(e), s = 0; !(a = e.next()).done; )
        i += Je((a = a.value), t, r, (l = n + Xe(a, s++)), o);
    else if ("object" === a)
      throw (
        ((t = String(e)),
        Error(
          "Objects are not valid as a React child (found: " +
            ("[object Object]" === t
              ? "object with keys {" + Object.keys(e).join(", ") + "}"
              : t) +
            "). If you meant to render a collection of children, use an array instead."
        ))
      );
    return i;
  }
  function et(e, t, r) {
    if (null == e) return e;
    var n = [],
      o = 0;
    return (
      Je(e, n, "", "", function (e) {
        return t.call(r, e, o++);
      }),
      n
    );
  }
  function tt(e) {
    if (-1 === e._status) {
      var t = e._result;
      (t = t()).then(
        function (t) {
          (0 !== e._status && -1 !== e._status) ||
            ((e._status = 1), (e._result = t));
        },
        function (t) {
          (0 !== e._status && -1 !== e._status) ||
            ((e._status = 2), (e._result = t));
        }
      ),
        -1 === e._status && ((e._status = 0), (e._result = t));
    }
    if (1 === e._status) return e._result.default;
    throw e._result;
  }
  function rt() {
    return (
      Ve ||
        ((Ve = !0),
        (U = {}),
        (H = Symbol.for("react.element")),
        (z = Symbol.for("react.portal")),
        (j = Symbol.for("react.fragment")),
        (W = Symbol.for("react.strict_mode")),
        (V = Symbol.for("react.profiler")),
        (q = Symbol.for("react.provider")),
        (Z = Symbol.for("react.context")),
        (Y = Symbol.for("react.forward_ref")),
        (Q = Symbol.for("react.suspense")),
        (K = Symbol.for("react.memo")),
        (X = Symbol.for("react.lazy")),
        (J = Symbol.iterator),
        (ee = {
          isMounted: function () {
            return !1;
          },
          enqueueForceUpdate: function () {},
          enqueueReplaceState: function () {},
          enqueueSetState: function () {},
        }),
        (te = Object.assign),
        (re = {}),
        (qe.prototype.isReactComponent = {}),
        (qe.prototype.setState = function (e, t) {
          if ("object" != typeof e && "function" != typeof e && null != e)
            throw Error(
              "setState(...): takes an object of state variables to update or a function which returns an object of state variables."
            );
          this.updater.enqueueSetState(this, e, t, "setState");
        }),
        (qe.prototype.forceUpdate = function (e) {
          this.updater.enqueueForceUpdate(this, e, "forceUpdate");
        }),
        (Ze.prototype = qe.prototype),
        ((ne = Ye.prototype = new Ze()).constructor = Ye),
        te(ne, qe.prototype),
        (ne.isPureReactComponent = !0),
        (oe = Array.isArray),
        (ae = Object.prototype.hasOwnProperty),
        (se = { key: !0, ref: !0, __self: !0, __source: !0 }),
        (le = /\/+/g),
        (de = {
          ReactCurrentDispatcher: (ce = { current: null }),
          ReactCurrentBatchConfig: (ue = { transition: null }),
          ReactCurrentOwner: (ie = { current: null }),
        }),
        (he = {
          map: et,
          forEach: function (e, t, r) {
            et(
              e,
              function () {
                t.apply(this, arguments);
              },
              r
            );
          },
          count: function (e) {
            var t = 0;
            return (
              et(e, function () {
                t++;
              }),
              t
            );
          },
          toArray: function (e) {
            return (
              et(e, function (e) {
                return e;
              }) || []
            );
          },
          only: function (e) {
            if (!Ke(e))
              throw Error(
                "React.Children.only expected to receive a single React element child."
              );
            return e;
          },
        }),
        (U.Children = he),
        (pe = qe),
        (U.Component = pe),
        (me = j),
        (U.Fragment = me),
        (ge = V),
        (U.Profiler = ge),
        (fe = Ye),
        (U.PureComponent = fe),
        (ve = W),
        (U.StrictMode = ve),
        (be = Q),
        (U.Suspense = be),
        (ye = de),
        (U.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ye),
        (we = function (e, t, r) {
          if (null == e)
            throw Error(
              "React.cloneElement(...): The argument must be a React element, but you passed " +
                e +
                "."
            );
          var n = te({}, e.props),
            o = e.key,
            a = e.ref,
            i = e._owner;
          if (null != t) {
            if (
              (void 0 !== t.ref && ((a = t.ref), (i = ie.current)),
              void 0 !== t.key && (o = "" + t.key),
              e.type && e.type.defaultProps)
            )
              var s = e.type.defaultProps;
            for (l in t)
              ae.call(t, l) &&
                !se.hasOwnProperty(l) &&
                (n[l] = void 0 === t[l] && void 0 !== s ? s[l] : t[l]);
          }
          var l = arguments.length - 2;
          if (1 === l) n.children = r;
          else if (1 < l) {
            s = Array(l);
            for (var c = 0; c < l; c++) s[c] = arguments[c + 2];
            n.children = s;
          }
          return {
            $$typeof: H,
            type: e.type,
            key: o,
            ref: a,
            props: n,
            _owner: i,
          };
        }),
        (U.cloneElement = we),
        (Ce = function (e) {
          return (
            ((e = {
              $$typeof: Z,
              _currentValue: e,
              _currentValue2: e,
              _threadCount: 0,
              Provider: null,
              Consumer: null,
              _defaultValue: null,
              _globalName: null,
            }).Provider = { $$typeof: q, _context: e }),
            (e.Consumer = e)
          );
        }),
        (U.createContext = Ce),
        (ke = Qe),
        (U.createElement = ke),
        (Se = function (e) {
          var t = Qe.bind(null, e);
          return (t.type = e), t;
        }),
        (U.createFactory = Se),
        (Ee = function () {
          return { current: null };
        }),
        (U.createRef = Ee),
        (_e = function (e) {
          return { $$typeof: Y, render: e };
        }),
        (U.forwardRef = _e),
        (xe = Ke),
        (U.isValidElement = xe),
        (Pe = function (e) {
          return {
            $$typeof: X,
            _payload: { _status: -1, _result: e },
            _init: tt,
          };
        }),
        (U.lazy = Pe),
        (Te = function (e, t) {
          return { $$typeof: K, type: e, compare: void 0 === t ? null : t };
        }),
        (U.memo = Te),
        (Ie = function (e) {
          var t = ue.transition;
          ue.transition = {};
          try {
            e();
          } finally {
            ue.transition = t;
          }
        }),
        (U.startTransition = Ie),
        (Ge = function () {
          throw Error(
            "act(...) is not supported in production builds of React."
          );
        }),
        (U.unstable_act = Ge),
        (De = function (e, t) {
          return ce.current.useCallback(e, t);
        }),
        (U.useCallback = De),
        (Ae = function (e) {
          return ce.current.useContext(e);
        }),
        (U.useContext = Ae),
        (Me = function () {}),
        (U.useDebugValue = Me),
        (Fe = function (e) {
          return ce.current.useDeferredValue(e);
        }),
        (U.useDeferredValue = Fe),
        (Re = function (e, t) {
          return ce.current.useEffect(e, t);
        }),
        (U.useEffect = Re),
        (Le = function () {
          return ce.current.useId();
        }),
        (U.useId = Le),
        (Be = function (e, t, r) {
          return ce.current.useImperativeHandle(e, t, r);
        }),
        (U.useImperativeHandle = Be),
        (Oe = function (e, t) {
          return ce.current.useInsertionEffect(e, t);
        }),
        (U.useInsertionEffect = Oe),
        ($e = function (e, t) {
          return ce.current.useLayoutEffect(e, t);
        }),
        (U.useLayoutEffect = $e),
        (Ne = function (e, t) {
          return ce.current.useMemo(e, t);
        }),
        (U.useMemo = Ne),
        (Ue = function (e, t, r) {
          return ce.current.useReducer(e, t, r);
        }),
        (U.useReducer = Ue),
        (He = function (e) {
          return ce.current.useRef(e);
        }),
        (U.useRef = He),
        (ze = function (e) {
          return ce.current.useState(e);
        }),
        (U.useState = ze),
        (je = function (e, t, r) {
          return ce.current.useSyncExternalStore(e, t, r);
        }),
        (U.useSyncExternalStore = je),
        (We = function () {
          return ce.current.useTransition();
        }),
        (U.useTransition = We),
        "18.2.0",
        (U.version = "18.2.0")),
      U
    );
  }
  var nt,
    ot,
    at = !1;
  function it() {
    return at || ((at = !0), (nt = {}), (nt = rt()), (ot = t(nt))), nt;
  }
  var st,
    lt,
    ct,
    ut,
    dt,
    ht,
    pt,
    mt,
    gt,
    ft,
    vt,
    bt,
    yt,
    wt,
    Ct,
    kt,
    St,
    Et,
    _t,
    xt,
    Pt,
    Tt,
    It,
    Gt,
    Dt,
    At,
    Mt,
    Ft,
    Rt,
    Lt,
    Bt,
    Ot,
    $t,
    Nt,
    Ut,
    Ht,
    zt = !1;
  function jt(e, t) {
    var r = e.length;
    e.push(t);
    e: for (; 0 < r; ) {
      var n = (r - 1) >>> 1,
        o = e[n];
      if (!(0 < qt(o, t))) break e;
      (e[n] = t), (e[r] = o), (r = n);
    }
  }
  function Wt(e) {
    return 0 === e.length ? null : e[0];
  }
  function Vt(e) {
    if (0 === e.length) return null;
    var t = e[0],
      r = e.pop();
    if (r !== t) {
      e[0] = r;
      e: for (var n = 0, o = e.length, a = o >>> 1; n < a; ) {
        var i = 2 * (n + 1) - 1,
          s = e[i],
          l = i + 1,
          c = e[l];
        if (0 > qt(s, r))
          l < o && 0 > qt(c, s)
            ? ((e[n] = c), (e[l] = r), (n = l))
            : ((e[n] = s), (e[i] = r), (n = i));
        else {
          if (!(l < o && 0 > qt(c, r))) break e;
          (e[n] = c), (e[l] = r), (n = l);
        }
      }
    }
    return t;
  }
  function qt(e, t) {
    var r = e.sortIndex - t.sortIndex;
    return 0 !== r ? r : e.id - t.id;
  }
  function Zt(e) {
    for (var t = Wt(pt); null !== t; ) {
      if (null === t.callback) Vt(pt);
      else {
        if (!(t.startTime <= e)) break;
        Vt(pt), (t.sortIndex = t.expirationTime), jt(ht, t);
      }
      t = Wt(pt);
    }
  }
  function Yt(e) {
    if (((yt = !1), Zt(e), !bt))
      if (null !== Wt(ht)) (bt = !0), Jt(Qt);
      else {
        var t = Wt(pt);
        null !== t && er(Yt, t.startTime - e);
      }
  }
  function Qt(e, t) {
    (bt = !1), yt && ((yt = !1), Ct(_t), (_t = -1)), (vt = !0);
    var r = ft;
    try {
      for (
        Zt(t), gt = Wt(ht);
        null !== gt && (!(gt.expirationTime > t) || (e && !Kt()));

      ) {
        var n = gt.callback;
        if ("function" == typeof n) {
          (gt.callback = null), (ft = gt.priorityLevel);
          var o = n(gt.expirationTime <= t);
          (t = st()),
            "function" == typeof o
              ? (gt.callback = o)
              : gt === Wt(ht) && Vt(ht),
            Zt(t);
        } else Vt(ht);
        gt = Wt(ht);
      }
      if (null !== gt) var a = !0;
      else {
        var i = Wt(pt);
        null !== i && er(Yt, i.startTime - t), (a = !1);
      }
      return a;
    } finally {
      (gt = null), (ft = r), (vt = !1);
    }
  }
  function Kt() {
    return !(st() - Pt < xt);
  }
  function Xt() {
    if (null !== Et) {
      var e = st();
      Pt = e;
      var t = !0;
      try {
        t = Et(!0, e);
      } finally {
        t ? Tt() : ((St = !1), (Et = null));
      }
    } else St = !1;
  }
  function Jt(e) {
    (Et = e), St || ((St = !0), Tt());
  }
  function er(e, t) {
    _t = wt(function () {
      e(st());
    }, t);
  }
  function tr() {
    return (
      zt ||
        ((zt = !0),
        (lt = {}),
        "object" == typeof performance && "function" == typeof performance.now
          ? ((ct = performance),
            (st = function () {
              return ct.now();
            }),
            (lt.unstable_now = st))
          : ((ut = Date),
            (dt = ut.now()),
            (st = function () {
              return ut.now() - dt;
            }),
            (lt.unstable_now = st)),
        (ht = []),
        (pt = []),
        (mt = 1),
        (gt = null),
        (ft = 3),
        (vt = !1),
        (bt = !1),
        (yt = !1),
        (wt = "function" == typeof setTimeout ? setTimeout : null),
        (Ct = "function" == typeof clearTimeout ? clearTimeout : null),
        (kt = "undefined" != typeof setImmediate ? setImmediate : null),
        "undefined" != typeof navigator &&
          void 0 !== navigator.scheduling &&
          void 0 !== navigator.scheduling.isInputPending &&
          navigator.scheduling.isInputPending.bind(navigator.scheduling),
        (St = !1),
        (Et = null),
        (_t = -1),
        (xt = 5),
        (Pt = -1),
        "function" == typeof kt
          ? (Tt = function () {
              kt(Xt);
            })
          : "undefined" != typeof MessageChannel
          ? ((It = new MessageChannel()),
            (Gt = It.port2),
            (It.port1.onmessage = Xt),
            (Tt = function () {
              Gt.postMessage(null);
            }))
          : (Tt = function () {
              wt(Xt, 0);
            }),
        5,
        (lt.unstable_IdlePriority = 5),
        1,
        (lt.unstable_ImmediatePriority = 1),
        4,
        (lt.unstable_LowPriority = 4),
        3,
        (lt.unstable_NormalPriority = 3),
        null,
        (lt.unstable_Profiling = null),
        2,
        (lt.unstable_UserBlockingPriority = 2),
        (Dt = function (e) {
          e.callback = null;
        }),
        (lt.unstable_cancelCallback = Dt),
        (At = function () {
          bt || vt || ((bt = !0), Jt(Qt));
        }),
        (lt.unstable_continueExecution = At),
        (Mt = function (e) {
          0 > e || 125 < e
            ? console.error(
                "forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"
              )
            : (xt = 0 < e ? Math.floor(1e3 / e) : 5);
        }),
        (lt.unstable_forceFrameRate = Mt),
        (Ft = function () {
          return ft;
        }),
        (lt.unstable_getCurrentPriorityLevel = Ft),
        (Rt = function () {
          return Wt(ht);
        }),
        (lt.unstable_getFirstCallbackNode = Rt),
        (Lt = function (e) {
          switch (ft) {
            case 1:
            case 2:
            case 3:
              var t = 3;
              break;
            default:
              t = ft;
          }
          var r = ft;
          ft = t;
          try {
            return e();
          } finally {
            ft = r;
          }
        }),
        (lt.unstable_next = Lt),
        (Bt = function () {}),
        (lt.unstable_pauseExecution = Bt),
        (Ot = function () {}),
        (lt.unstable_requestPaint = Ot),
        ($t = function (e, t) {
          switch (e) {
            case 1:
            case 2:
            case 3:
            case 4:
            case 5:
              break;
            default:
              e = 3;
          }
          var r = ft;
          ft = e;
          try {
            return t();
          } finally {
            ft = r;
          }
        }),
        (lt.unstable_runWithPriority = $t),
        (Nt = function (e, t, r) {
          var n = st();
          switch (
            ((r =
              "object" == typeof r &&
              null !== r &&
              "number" == typeof (r = r.delay) &&
              0 < r
                ? n + r
                : n),
            e)
          ) {
            case 1:
              var o = -1;
              break;
            case 2:
              o = 250;
              break;
            case 5:
              o = 1073741823;
              break;
            case 4:
              o = 1e4;
              break;
            default:
              o = 5e3;
          }
          return (
            (e = {
              id: mt++,
              callback: t,
              priorityLevel: e,
              startTime: r,
              expirationTime: (o = r + o),
              sortIndex: -1,
            }),
            r > n
              ? ((e.sortIndex = r),
                jt(pt, e),
                null === Wt(ht) &&
                  e === Wt(pt) &&
                  (yt ? (Ct(_t), (_t = -1)) : (yt = !0), er(Yt, r - n)))
              : ((e.sortIndex = o), jt(ht, e), bt || vt || ((bt = !0), Jt(Qt))),
            e
          );
        }),
        (lt.unstable_scheduleCallback = Nt),
        (Ut = Kt),
        (lt.unstable_shouldYield = Ut),
        (Ht = function (e) {
          var t = ft;
          return function () {
            var r = ft;
            ft = t;
            try {
              return e.apply(this, arguments);
            } finally {
              ft = r;
            }
          };
        }),
        (lt.unstable_wrapCallback = Ht)),
      lt
    );
  }
  var rr,
    nr = !1;
  function or() {
    return nr || ((nr = !0), (rr = {}), (rr = tr())), rr;
  }
  var ar,
    ir,
    sr,
    lr,
    cr,
    ur,
    dr,
    hr,
    pr,
    mr,
    gr,
    fr,
    vr,
    br,
    yr,
    wr,
    Cr,
    kr,
    Sr,
    Er,
    _r,
    xr,
    Pr,
    Tr,
    Ir,
    Gr,
    Dr,
    Ar,
    Mr,
    Fr,
    Rr,
    Lr,
    Br,
    Or,
    $r,
    Nr,
    Ur,
    Hr,
    zr,
    jr,
    Wr,
    Vr,
    qr,
    Zr,
    Yr,
    Qr,
    Kr,
    Xr,
    Jr,
    en,
    tn,
    rn,
    nn,
    on,
    an,
    sn,
    ln,
    cn,
    un,
    dn,
    hn,
    pn,
    mn,
    gn,
    fn,
    vn,
    bn,
    yn,
    wn,
    Cn,
    kn,
    Sn,
    En,
    _n,
    xn,
    Pn,
    Tn,
    In,
    Gn,
    Dn,
    An,
    Mn,
    Fn,
    Rn,
    Ln,
    Bn,
    On,
    $n,
    Nn,
    Un,
    Hn,
    zn,
    jn,
    Wn,
    Vn,
    qn,
    Zn,
    Yn,
    Qn,
    Kn,
    Xn,
    Jn,
    eo,
    to,
    ro,
    no,
    oo,
    ao,
    io,
    so,
    lo,
    co,
    uo,
    ho,
    po,
    mo,
    go,
    fo,
    vo,
    bo,
    yo,
    wo,
    Co,
    ko,
    So,
    Eo,
    _o,
    xo,
    Po,
    To,
    Io,
    Go,
    Do,
    Ao,
    Mo,
    Fo,
    Ro,
    Lo,
    Bo,
    Oo,
    $o,
    No,
    Uo,
    Ho,
    zo,
    jo,
    Wo,
    Vo,
    qo,
    Zo,
    Yo,
    Qo,
    Ko,
    Xo,
    Jo,
    ea,
    ta,
    ra,
    na,
    oa,
    aa,
    ia,
    sa,
    la,
    ca,
    ua,
    da,
    ha,
    pa,
    ma,
    ga,
    fa,
    va,
    ba,
    ya,
    wa,
    Ca,
    ka,
    Sa,
    Ea,
    _a,
    xa,
    Pa,
    Ta,
    Ia,
    Ga,
    Da,
    Aa,
    Ma,
    Fa,
    Ra,
    La,
    Ba,
    Oa,
    $a,
    Na,
    Ua,
    Ha,
    za,
    ja,
    Wa,
    Va,
    qa,
    Za,
    Ya,
    Qa,
    Ka,
    Xa,
    Ja,
    ei,
    ti,
    ri,
    ni,
    oi,
    ai,
    ii,
    si,
    li,
    ci,
    ui,
    di,
    hi,
    pi,
    mi,
    gi,
    fi,
    vi,
    bi,
    yi,
    wi,
    Ci,
    ki,
    Si,
    Ei,
    _i,
    xi,
    Pi,
    Ti,
    Ii,
    Gi,
    Di,
    Ai,
    Mi,
    Fi,
    Ri,
    Li,
    Bi,
    Oi,
    $i,
    Ni,
    Ui,
    Hi,
    zi,
    ji,
    Wi,
    Vi,
    qi,
    Zi,
    Yi,
    Qi,
    Ki,
    Xi,
    Ji,
    es,
    ts,
    rs,
    ns,
    os,
    as,
    is,
    ss,
    ls,
    cs,
    us,
    ds,
    hs,
    ps,
    ms,
    gs,
    fs,
    vs,
    bs,
    ys,
    ws,
    Cs = !1;
  function ks(e) {
    for (
      var t = "https://reactjs.org/docs/error-decoder.html?invariant=" + e,
        r = 1;
      r < arguments.length;
      r++
    )
      t += "&args[]=" + encodeURIComponent(arguments[r]);
    return (
      "Minified React error #" +
      e +
      "; visit " +
      t +
      " for the full message or use the non-minified dev environment for full errors and additional helpful warnings."
    );
  }
  function Ss(e, t) {
    Es(e, t), Es(e + "Capture", t);
  }
  function Es(e, t) {
    for (sr[e] = t, e = 0; e < t.length; e++) ir.add(t[e]);
  }
  function _s(e, t, r, n, o, a, i) {
    (this.acceptsBooleans = 2 === t || 3 === t || 4 === t),
      (this.attributeName = n),
      (this.attributeNamespace = o),
      (this.mustUseProperty = r),
      (this.propertyName = e),
      (this.type = t),
      (this.sanitizeURL = a),
      (this.removeEmptyString = i);
  }
  function xs(e) {
    return e[1].toUpperCase();
  }
  function Ps(e, t, r, n) {
    var o = pr.hasOwnProperty(t) ? pr[t] : null;
    (null !== o
      ? 0 !== o.type
      : n ||
        !(2 < t.length) ||
        ("o" !== t[0] && "O" !== t[0]) ||
        ("n" !== t[1] && "N" !== t[1])) &&
      ((function (e, t, r, n) {
        if (
          null == t ||
          (function (e, t, r, n) {
            if (null !== r && 0 === r.type) return !1;
            switch (typeof t) {
              case "function":
              case "symbol":
                return !0;
              case "boolean":
                return (
                  !n &&
                  (null !== r
                    ? !r.acceptsBooleans
                    : "data-" !== (e = e.toLowerCase().slice(0, 5)) &&
                      "aria-" !== e)
                );
              default:
                return !1;
            }
          })(e, t, r, n)
        )
          return !0;
        if (n) return !1;
        if (null !== r)
          switch (r.type) {
            case 3:
              return !t;
            case 4:
              return !1 === t;
            case 5:
              return isNaN(t);
            case 6:
              return isNaN(t) || 1 > t;
          }
        return !1;
      })(t, r, o, n) && (r = null),
      n || null === o
        ? (function (e) {
            return (
              !!cr.call(hr, e) ||
              (!cr.call(dr, e) &&
                (ur.test(e) ? (hr[e] = !0) : ((dr[e] = !0), !1)))
            );
          })(t) &&
          (null === r ? e.removeAttribute(t) : e.setAttribute(t, "" + r))
        : o.mustUseProperty
        ? (e[o.propertyName] = null === r ? 3 !== o.type && "" : r)
        : ((t = o.attributeName),
          (n = o.attributeNamespace),
          null === r
            ? e.removeAttribute(t)
            : ((r = 3 === (o = o.type) || (4 === o && !0 === r) ? "" : "" + r),
              n ? e.setAttributeNS(n, t, r) : e.setAttribute(t, r))));
  }
  function Ts(e) {
    return null === e || "object" != typeof e
      ? null
      : "function" == typeof (e = (Ir && e[Ir]) || e["@@iterator"])
      ? e
      : null;
  }
  function Is(e) {
    if (void 0 === Dr)
      try {
        throw Error();
      } catch (e) {
        var t = e.stack.trim().match(/\n( *(at )?)/);
        Dr = (t && t[1]) || "";
      }
    return "\n" + Dr + e;
  }
  function Gs(e, t) {
    if (!e || Ar) return "";
    Ar = !0;
    var r = Error.prepareStackTrace;
    Error.prepareStackTrace = void 0;
    try {
      if (t)
        if (
          ((t = function () {
            throw Error();
          }),
          Object.defineProperty(t.prototype, "props", {
            set: function () {
              throw Error();
            },
          }),
          "object" == typeof Reflect && Reflect.construct)
        ) {
          try {
            Reflect.construct(t, []);
          } catch (e) {
            var n = e;
          }
          Reflect.construct(e, [], t);
        } else {
          try {
            t.call();
          } catch (e) {
            n = e;
          }
          e.call(t.prototype);
        }
      else {
        try {
          throw Error();
        } catch (e) {
          n = e;
        }
        e();
      }
    } catch (t) {
      if (t && n && "string" == typeof t.stack) {
        for (
          var o = t.stack.split("\n"),
            a = n.stack.split("\n"),
            i = o.length - 1,
            s = a.length - 1;
          1 <= i && 0 <= s && o[i] !== a[s];

        )
          s--;
        for (; 1 <= i && 0 <= s; i--, s--)
          if (o[i] !== a[s]) {
            if (1 !== i || 1 !== s)
              do {
                if ((i--, 0 > --s || o[i] !== a[s])) {
                  var l = "\n" + o[i].replace(" at new ", " at ");
                  return (
                    e.displayName &&
                      l.includes("<anonymous>") &&
                      (l = l.replace("<anonymous>", e.displayName)),
                    l
                  );
                }
              } while (1 <= i && 0 <= s);
            break;
          }
      }
    } finally {
      (Ar = !1), (Error.prepareStackTrace = r);
    }
    return (e = e ? e.displayName || e.name : "") ? Is(e) : "";
  }
  function Ds(e) {
    switch (e.tag) {
      case 5:
        return Is(e.type);
      case 16:
        return Is("Lazy");
      case 13:
        return Is("Suspense");
      case 19:
        return Is("SuspenseList");
      case 0:
      case 2:
      case 15:
        return (e = Gs(e.type, !1));
      case 11:
        return (e = Gs(e.type.render, !1));
      case 1:
        return (e = Gs(e.type, !0));
      default:
        return "";
    }
  }
  function As(e) {
    if (null == e) return null;
    if ("function" == typeof e) return e.displayName || e.name || null;
    if ("string" == typeof e) return e;
    switch (e) {
      case br:
        return "Fragment";
      case vr:
        return "Portal";
      case wr:
        return "Profiler";
      case yr:
        return "StrictMode";
      case Er:
        return "Suspense";
      case _r:
        return "SuspenseList";
    }
    if ("object" == typeof e)
      switch (e.$$typeof) {
        case kr:
          return (e.displayName || "Context") + ".Consumer";
        case Cr:
          return (e._context.displayName || "Context") + ".Provider";
        case Sr:
          var t = e.render;
          return (
            (e = e.displayName) ||
              (e =
                "" !== (e = t.displayName || t.name || "")
                  ? "ForwardRef(" + e + ")"
                  : "ForwardRef"),
            e
          );
        case xr:
          return null !== (t = e.displayName || null)
            ? t
            : As(e.type) || "Memo";
        case Pr:
          (t = e._payload), (e = e._init);
          try {
            return As(e(t));
          } catch (e) {}
      }
    return null;
  }
  function Ms(e) {
    var t = e.type;
    switch (e.tag) {
      case 24:
        return "Cache";
      case 9:
        return (t.displayName || "Context") + ".Consumer";
      case 10:
        return (t._context.displayName || "Context") + ".Provider";
      case 18:
        return "DehydratedFragment";
      case 11:
        return (
          (e = (e = t.render).displayName || e.name || ""),
          t.displayName || ("" !== e ? "ForwardRef(" + e + ")" : "ForwardRef")
        );
      case 7:
        return "Fragment";
      case 5:
        return t;
      case 4:
        return "Portal";
      case 3:
        return "Root";
      case 6:
        return "Text";
      case 16:
        return As(t);
      case 8:
        return t === yr ? "StrictMode" : "Mode";
      case 22:
        return "Offscreen";
      case 12:
        return "Profiler";
      case 21:
        return "Scope";
      case 13:
        return "Suspense";
      case 19:
        return "SuspenseList";
      case 25:
        return "TracingMarker";
      case 1:
      case 0:
      case 17:
      case 2:
      case 14:
      case 15:
        if ("function" == typeof t) return t.displayName || t.name || null;
        if ("string" == typeof t) return t;
    }
    return null;
  }
  function Fs(e) {
    switch (typeof e) {
      case "boolean":
      case "number":
      case "string":
      case "undefined":
      case "object":
        return e;
      default:
        return "";
    }
  }
  function Rs(e) {
    var t = e.type;
    return (
      (e = e.nodeName) &&
      "input" === e.toLowerCase() &&
      ("checkbox" === t || "radio" === t)
    );
  }
  function Ls(e) {
    e._valueTracker ||
      (e._valueTracker = (function (e) {
        var t = Rs(e) ? "checked" : "value",
          r = Object.getOwnPropertyDescriptor(e.constructor.prototype, t),
          n = "" + e[t];
        if (
          !e.hasOwnProperty(t) &&
          void 0 !== r &&
          "function" == typeof r.get &&
          "function" == typeof r.set
        ) {
          var o = r.get,
            a = r.set;
          return (
            Object.defineProperty(e, t, {
              configurable: !0,
              get: function () {
                return o.call(this);
              },
              set: function (e) {
                (n = "" + e), a.call(this, e);
              },
            }),
            Object.defineProperty(e, t, { enumerable: r.enumerable }),
            {
              getValue: function () {
                return n;
              },
              setValue: function (e) {
                n = "" + e;
              },
              stopTracking: function () {
                (e._valueTracker = null), delete e[t];
              },
            }
          );
        }
      })(e));
  }
  function Bs(e) {
    if (!e) return !1;
    var t = e._valueTracker;
    if (!t) return !0;
    var r = t.getValue(),
      n = "";
    return (
      e && (n = Rs(e) ? (e.checked ? "true" : "false") : e.value),
      (e = n) !== r && (t.setValue(e), !0)
    );
  }
  function Os(e) {
    if (
      void 0 === (e = e || ("undefined" != typeof document ? document : void 0))
    )
      return null;
    try {
      return e.activeElement || e.body;
    } catch (t) {
      return e.body;
    }
  }
  function $s(e, t) {
    var r = t.checked;
    return Gr({}, t, {
      defaultChecked: void 0,
      defaultValue: void 0,
      value: void 0,
      checked: null != r ? r : e._wrapperState.initialChecked,
    });
  }
  function Ns(e, t) {
    var r = null == t.defaultValue ? "" : t.defaultValue,
      n = null != t.checked ? t.checked : t.defaultChecked;
    (r = Fs(null != t.value ? t.value : r)),
      (e._wrapperState = {
        initialChecked: n,
        initialValue: r,
        controlled:
          "checkbox" === t.type || "radio" === t.type
            ? null != t.checked
            : null != t.value,
      });
  }
  function Us(e, t) {
    null != (t = t.checked) && Ps(e, "checked", t, !1);
  }
  function Hs(e, t) {
    Us(e, t);
    var r = Fs(t.value),
      n = t.type;
    if (null != r)
      "number" === n
        ? ((0 === r && "" === e.value) || e.value != r) && (e.value = "" + r)
        : e.value !== "" + r && (e.value = "" + r);
    else if ("submit" === n || "reset" === n)
      return void e.removeAttribute("value");
    t.hasOwnProperty("value")
      ? js(e, t.type, r)
      : t.hasOwnProperty("defaultValue") && js(e, t.type, Fs(t.defaultValue)),
      null == t.checked &&
        null != t.defaultChecked &&
        (e.defaultChecked = !!t.defaultChecked);
  }
  function zs(e, t, r) {
    if (t.hasOwnProperty("value") || t.hasOwnProperty("defaultValue")) {
      var n = t.type;
      if (
        !(
          ("submit" !== n && "reset" !== n) ||
          (void 0 !== t.value && null !== t.value)
        )
      )
        return;
      (t = "" + e._wrapperState.initialValue),
        r || t === e.value || (e.value = t),
        (e.defaultValue = t);
    }
    "" !== (r = e.name) && (e.name = ""),
      (e.defaultChecked = !!e._wrapperState.initialChecked),
      "" !== r && (e.name = r);
  }
  function js(e, t, r) {
    ("number" === t && Os(e.ownerDocument) === e) ||
      (null == r
        ? (e.defaultValue = "" + e._wrapperState.initialValue)
        : e.defaultValue !== "" + r && (e.defaultValue = "" + r));
  }
  function Ws(e, t, r, n) {
    if (((e = e.options), t)) {
      t = {};
      for (var o = 0; o < r.length; o++) t["$" + r[o]] = !0;
      for (r = 0; r < e.length; r++)
        (o = t.hasOwnProperty("$" + e[r].value)),
          e[r].selected !== o && (e[r].selected = o),
          o && n && (e[r].defaultSelected = !0);
    } else {
      for (r = "" + Fs(r), t = null, o = 0; o < e.length; o++) {
        if (e[o].value === r)
          return (e[o].selected = !0), void (n && (e[o].defaultSelected = !0));
        null !== t || e[o].disabled || (t = e[o]);
      }
      null !== t && (t.selected = !0);
    }
  }
  function Vs(e, t) {
    if (null != t.dangerouslySetInnerHTML) throw Error(ks(91));
    return Gr({}, t, {
      value: void 0,
      defaultValue: void 0,
      children: "" + e._wrapperState.initialValue,
    });
  }
  function qs(e, t) {
    var r = t.value;
    if (null == r) {
      if (((r = t.children), (t = t.defaultValue), null != r)) {
        if (null != t) throw Error(ks(92));
        if (Mr(r)) {
          if (1 < r.length) throw Error(ks(93));
          r = r[0];
        }
        t = r;
      }
      null == t && (t = ""), (r = t);
    }
    e._wrapperState = { initialValue: Fs(r) };
  }
  function Zs(e, t) {
    var r = Fs(t.value),
      n = Fs(t.defaultValue);
    null != r &&
      ((r = "" + r) !== e.value && (e.value = r),
      null == t.defaultValue && e.defaultValue !== r && (e.defaultValue = r)),
      null != n && (e.defaultValue = "" + n);
  }
  function Ys(e) {
    var t = e.textContent;
    t === e._wrapperState.initialValue &&
      "" !== t &&
      null !== t &&
      (e.value = t);
  }
  function Qs(e) {
    switch (e) {
      case "svg":
        return "http://www.w3.org/2000/svg";
      case "math":
        return "http://www.w3.org/1998/Math/MathML";
      default:
        return "http://www.w3.org/1999/xhtml";
    }
  }
  function Ks(e, t) {
    return null == e || "http://www.w3.org/1999/xhtml" === e
      ? Qs(t)
      : "http://www.w3.org/2000/svg" === e && "foreignObject" === t
      ? "http://www.w3.org/1999/xhtml"
      : e;
  }
  function Xs(e, t) {
    if (t) {
      var r = e.firstChild;
      if (r && r === e.lastChild && 3 === r.nodeType)
        return void (r.nodeValue = t);
    }
    e.textContent = t;
  }
  function Js(e, t, r) {
    return null == t || "boolean" == typeof t || "" === t
      ? ""
      : r || "number" != typeof t || 0 === t || (Lr.hasOwnProperty(e) && Lr[e])
      ? ("" + t).trim()
      : t + "px";
  }
  function el(e, t) {
    for (var r in ((e = e.style), t))
      if (t.hasOwnProperty(r)) {
        var n = 0 === r.indexOf("--"),
          o = Js(r, t[r], n);
        "float" === r && (r = "cssFloat"), n ? e.setProperty(r, o) : (e[r] = o);
      }
  }
  function tl(e, t) {
    if (t) {
      if (Or[e] && (null != t.children || null != t.dangerouslySetInnerHTML))
        throw Error(ks(137, e));
      if (null != t.dangerouslySetInnerHTML) {
        if (null != t.children) throw Error(ks(60));
        if (
          "object" != typeof t.dangerouslySetInnerHTML ||
          !("__html" in t.dangerouslySetInnerHTML)
        )
          throw Error(ks(61));
      }
      if (null != t.style && "object" != typeof t.style) throw Error(ks(62));
    }
  }
  function rl(e, t) {
    if (-1 === e.indexOf("-")) return "string" == typeof t.is;
    switch (e) {
      case "annotation-xml":
      case "color-profile":
      case "font-face":
      case "font-face-src":
      case "font-face-uri":
      case "font-face-format":
      case "font-face-name":
      case "missing-glyph":
        return !1;
      default:
        return !0;
    }
  }
  function nl(e) {
    return (
      (e = e.target || e.srcElement || window).correspondingUseElement &&
        (e = e.correspondingUseElement),
      3 === e.nodeType ? e.parentNode : e
    );
  }
  function ol(e) {
    if ((e = $c(e))) {
      if ("function" != typeof Nr) throw Error(ks(280));
      var t = e.stateNode;
      t && ((t = Uc(t)), Nr(e.stateNode, e.type, t));
    }
  }
  function al(e) {
    Ur ? (Hr ? Hr.push(e) : (Hr = [e])) : (Ur = e);
  }
  function il() {
    if (Ur) {
      var e = Ur,
        t = Hr;
      if (((Hr = Ur = null), ol(e), t)) for (e = 0; e < t.length; e++) ol(t[e]);
    }
  }
  function sl(e, t) {
    return e(t);
  }
  function ll() {}
  function cl(e, t, r) {
    if (zr) return e(t, r);
    zr = !0;
    try {
      return sl(e, t, r);
    } finally {
      (zr = !1), (null !== Ur || null !== Hr) && (ll(), il());
    }
  }
  function ul(e, t) {
    var r = e.stateNode;
    if (null === r) return null;
    var n = Uc(r);
    if (null === n) return null;
    r = n[t];
    e: switch (t) {
      case "onClick":
      case "onClickCapture":
      case "onDoubleClick":
      case "onDoubleClickCapture":
      case "onMouseDown":
      case "onMouseDownCapture":
      case "onMouseMove":
      case "onMouseMoveCapture":
      case "onMouseUp":
      case "onMouseUpCapture":
      case "onMouseEnter":
        (n = !n.disabled) ||
          (n = !(
            "button" === (e = e.type) ||
            "input" === e ||
            "select" === e ||
            "textarea" === e
          )),
          (e = !n);
        break e;
      default:
        e = !1;
    }
    if (e) return null;
    if (r && "function" != typeof r) throw Error(ks(231, t, typeof r));
    return r;
  }
  function dl(e, t, r, n, o, a, i, s, l) {
    var c = Array.prototype.slice.call(arguments, 3);
    try {
      t.apply(r, c);
    } catch (e) {
      this.onError(e);
    }
  }
  function hl(e, t, r, n, o, a, i, s, l) {
    (Vr = !1), (qr = null), dl.apply(Qr, arguments);
  }
  function pl(e) {
    var t = e,
      r = e;
    if (e.alternate) for (; t.return; ) t = t.return;
    else {
      e = t;
      do {
        0 != (4098 & (t = e).flags) && (r = t.return), (e = t.return);
      } while (e);
    }
    return 3 === t.tag ? r : null;
  }
  function ml(e) {
    if (13 === e.tag) {
      var t = e.memoizedState;
      if (
        (null === t && null !== (e = e.alternate) && (t = e.memoizedState),
        null !== t)
      )
        return t.dehydrated;
    }
    return null;
  }
  function gl(e) {
    if (pl(e) !== e) throw Error(ks(188));
  }
  function fl(e) {
    return null !==
      (e = (function (e) {
        var t = e.alternate;
        if (!t) {
          if (null === (t = pl(e))) throw Error(ks(188));
          return t !== e ? null : e;
        }
        for (var r = e, n = t; ; ) {
          var o = r.return;
          if (null === o) break;
          var a = o.alternate;
          if (null === a) {
            if (null !== (n = o.return)) {
              r = n;
              continue;
            }
            break;
          }
          if (o.child === a.child) {
            for (a = o.child; a; ) {
              if (a === r) return gl(o), e;
              if (a === n) return gl(o), t;
              a = a.sibling;
            }
            throw Error(ks(188));
          }
          if (r.return !== n.return) (r = o), (n = a);
          else {
            for (var i = !1, s = o.child; s; ) {
              if (s === r) {
                (i = !0), (r = o), (n = a);
                break;
              }
              if (s === n) {
                (i = !0), (n = o), (r = a);
                break;
              }
              s = s.sibling;
            }
            if (!i) {
              for (s = a.child; s; ) {
                if (s === r) {
                  (i = !0), (r = a), (n = o);
                  break;
                }
                if (s === n) {
                  (i = !0), (n = a), (r = o);
                  break;
                }
                s = s.sibling;
              }
              if (!i) throw Error(ks(189));
            }
          }
          if (r.alternate !== n) throw Error(ks(190));
        }
        if (3 !== r.tag) throw Error(ks(188));
        return r.stateNode.current === r ? e : t;
      })(e))
      ? vl(e)
      : null;
  }
  function vl(e) {
    if (5 === e.tag || 6 === e.tag) return e;
    for (e = e.child; null !== e; ) {
      var t = vl(e);
      if (null !== t) return t;
      e = e.sibling;
    }
    return null;
  }
  function bl(e) {
    return 0 === (e >>>= 0) ? 32 : (31 - ((hn(e) / pn) | 0)) | 0;
  }
  function yl(e) {
    switch (e & -e) {
      case 1:
        return 1;
      case 2:
        return 2;
      case 4:
        return 4;
      case 8:
        return 8;
      case 16:
        return 16;
      case 32:
        return 32;
      case 64:
      case 128:
      case 256:
      case 512:
      case 1024:
      case 2048:
      case 4096:
      case 8192:
      case 16384:
      case 32768:
      case 65536:
      case 131072:
      case 262144:
      case 524288:
      case 1048576:
      case 2097152:
        return 4194240 & e;
      case 4194304:
      case 8388608:
      case 16777216:
      case 33554432:
      case 67108864:
        return 130023424 & e;
      case 134217728:
        return 134217728;
      case 268435456:
        return 268435456;
      case 536870912:
        return 536870912;
      case 1073741824:
        return 1073741824;
      default:
        return e;
    }
  }
  function wl(e, t) {
    var r = e.pendingLanes;
    if (0 === r) return 0;
    var n = 0,
      o = e.suspendedLanes,
      a = e.pingedLanes,
      i = 268435455 & r;
    if (0 !== i) {
      var s = i & ~o;
      0 !== s ? (n = yl(s)) : 0 !== (a &= i) && (n = yl(a));
    } else 0 !== (i = r & ~o) ? (n = yl(i)) : 0 !== a && (n = yl(a));
    if (0 === n) return 0;
    if (
      0 !== t &&
      t !== n &&
      0 == (t & o) &&
      ((o = n & -n) >= (a = t & -t) || (16 === o && 0 != (4194240 & a)))
    )
      return t;
    if ((0 != (4 & n) && (n |= 16 & r), 0 !== (t = e.entangledLanes)))
      for (e = e.entanglements, t &= n; 0 < t; )
        (o = 1 << (r = 31 - dn(t))), (n |= e[r]), (t &= ~o);
    return n;
  }
  function Cl(e, t) {
    switch (e) {
      case 1:
      case 2:
      case 4:
        return t + 250;
      case 8:
      case 16:
      case 32:
      case 64:
      case 128:
      case 256:
      case 512:
      case 1024:
      case 2048:
      case 4096:
      case 8192:
      case 16384:
      case 32768:
      case 65536:
      case 131072:
      case 262144:
      case 524288:
      case 1048576:
      case 2097152:
        return t + 5e3;
      case 4194304:
      case 8388608:
      case 16777216:
      case 33554432:
      case 67108864:
        return -1;
      case 134217728:
      case 268435456:
      case 536870912:
      case 1073741824:
      default:
        return -1;
    }
  }
  function kl(e) {
    return 0 !== (e = -1073741825 & e.pendingLanes)
      ? e
      : 1073741824 & e
      ? 1073741824
      : 0;
  }
  function Sl() {
    var e = mn;
    return 0 == (4194240 & (mn <<= 1)) && (mn = 64), e;
  }
  function El(e) {
    for (var t = [], r = 0; 31 > r; r++) t.push(e);
    return t;
  }
  function _l(e, t, r) {
    (e.pendingLanes |= t),
      536870912 !== t && ((e.suspendedLanes = 0), (e.pingedLanes = 0)),
      ((e = e.eventTimes)[(t = 31 - dn(t))] = r);
  }
  function xl(e, t) {
    var r = (e.entangledLanes |= t);
    for (e = e.entanglements; r; ) {
      var n = 31 - dn(r),
        o = 1 << n;
      (o & t) | (e[n] & t) && (e[n] |= t), (r &= ~o);
    }
  }
  function Pl(e) {
    return 1 < (e &= -e)
      ? 4 < e
        ? 0 != (268435455 & e)
          ? 16
          : 536870912
        : 4
      : 1;
  }
  function Tl(e, t) {
    switch (e) {
      case "focusin":
      case "focusout":
        En = null;
        break;
      case "dragenter":
      case "dragleave":
        _n = null;
        break;
      case "mouseover":
      case "mouseout":
        xn = null;
        break;
      case "pointerover":
      case "pointerout":
        Pn.delete(t.pointerId);
        break;
      case "gotpointercapture":
      case "lostpointercapture":
        Tn.delete(t.pointerId);
    }
  }
  function Il(e, t, r, n, o, a) {
    return null === e || e.nativeEvent !== a
      ? ((e = {
          blockedOn: t,
          domEventName: r,
          eventSystemFlags: n,
          nativeEvent: a,
          targetContainers: [o],
        }),
        null !== t && null !== (t = $c(t)) && bn(t),
        e)
      : ((e.eventSystemFlags |= n),
        (t = e.targetContainers),
        null !== o && -1 === t.indexOf(o) && t.push(o),
        e);
  }
  function Gl(e) {
    var t = Oc(e.target);
    if (null !== t) {
      var r = pl(t);
      if (null !== r)
        if (13 === (t = r.tag)) {
          if (null !== (t = ml(r)))
            return (
              (e.blockedOn = t),
              void Cn(e.priority, function () {
                yn(r);
              })
            );
        } else if (3 === t && r.stateNode.current.memoizedState.isDehydrated)
          return void (e.blockedOn =
            3 === r.tag ? r.stateNode.containerInfo : null);
    }
    e.blockedOn = null;
  }
  function Dl(e) {
    if (null !== e.blockedOn) return !1;
    for (var t = e.targetContainers; 0 < t.length; ) {
      var r = $l(e.domEventName, e.eventSystemFlags, t[0], e.nativeEvent);
      if (null !== r)
        return null !== (t = $c(r)) && bn(t), (e.blockedOn = r), !1;
      var n = new (r = e.nativeEvent).constructor(r.type, r);
      ($r = n), r.target.dispatchEvent(n), ($r = null), t.shift();
    }
    return !0;
  }
  function Al(e, t, r) {
    Dl(e) && r.delete(t);
  }
  function Ml() {
    (kn = !1),
      null !== En && Dl(En) && (En = null),
      null !== _n && Dl(_n) && (_n = null),
      null !== xn && Dl(xn) && (xn = null),
      Pn.forEach(Al),
      Tn.forEach(Al);
  }
  function Fl(e, t) {
    e.blockedOn === t &&
      ((e.blockedOn = null),
      kn ||
        ((kn = !0),
        or().unstable_scheduleCallback(or().unstable_NormalPriority, Ml)));
  }
  function Rl(e) {
    function t(t) {
      return Fl(t, e);
    }
    if (0 < Sn.length) {
      Fl(Sn[0], e);
      for (var r = 1; r < Sn.length; r++) {
        var n = Sn[r];
        n.blockedOn === e && (n.blockedOn = null);
      }
    }
    for (
      null !== En && Fl(En, e),
        null !== _n && Fl(_n, e),
        null !== xn && Fl(xn, e),
        Pn.forEach(t),
        Tn.forEach(t),
        r = 0;
      r < In.length;
      r++
    )
      (n = In[r]).blockedOn === e && (n.blockedOn = null);
    for (; 0 < In.length && null === (r = In[0]).blockedOn; )
      Gl(r), null === r.blockedOn && In.shift();
  }
  function Ll(e, t, r, n) {
    var o = fn,
      a = Dn.transition;
    Dn.transition = null;
    try {
      (fn = 1), Ol(e, t, r, n);
    } finally {
      (fn = o), (Dn.transition = a);
    }
  }
  function Bl(e, t, r, n) {
    var o = fn,
      a = Dn.transition;
    Dn.transition = null;
    try {
      (fn = 4), Ol(e, t, r, n);
    } finally {
      (fn = o), (Dn.transition = a);
    }
  }
  function Ol(e, t, r, n) {
    if (An) {
      var o = $l(e, t, r, n);
      if (null === o) _c(e, t, n, Mn, r), Tl(e, n);
      else if (
        (function (e, t, r, n, o) {
          switch (t) {
            case "focusin":
              return (En = Il(En, e, t, r, n, o)), !0;
            case "dragenter":
              return (_n = Il(_n, e, t, r, n, o)), !0;
            case "mouseover":
              return (xn = Il(xn, e, t, r, n, o)), !0;
            case "pointerover":
              var a = o.pointerId;
              return Pn.set(a, Il(Pn.get(a) || null, e, t, r, n, o)), !0;
            case "gotpointercapture":
              return (
                (a = o.pointerId),
                Tn.set(a, Il(Tn.get(a) || null, e, t, r, n, o)),
                !0
              );
          }
          return !1;
        })(o, e, t, r, n)
      )
        n.stopPropagation();
      else if ((Tl(e, n), 4 & t && -1 < Gn.indexOf(e))) {
        for (; null !== o; ) {
          var a = $c(o);
          if (
            (null !== a && vn(a),
            null === (a = $l(e, t, r, n)) && _c(e, t, n, Mn, r),
            a === o)
          )
            break;
          o = a;
        }
        null !== o && n.stopPropagation();
      } else _c(e, t, n, null, r);
    }
  }
  function $l(e, t, r, n) {
    if (((Mn = null), null !== (e = Oc((e = nl(n))))))
      if (null === (t = pl(e))) e = null;
      else if (13 === (r = t.tag)) {
        if (null !== (e = ml(t))) return e;
        e = null;
      } else if (3 === r) {
        if (t.stateNode.current.memoizedState.isDehydrated)
          return 3 === t.tag ? t.stateNode.containerInfo : null;
        e = null;
      } else t !== e && (e = null);
    return (Mn = e), null;
  }
  function Nl(e) {
    switch (e) {
      case "cancel":
      case "click":
      case "close":
      case "contextmenu":
      case "copy":
      case "cut":
      case "auxclick":
      case "dblclick":
      case "dragend":
      case "dragstart":
      case "drop":
      case "focusin":
      case "focusout":
      case "input":
      case "invalid":
      case "keydown":
      case "keypress":
      case "keyup":
      case "mousedown":
      case "mouseup":
      case "paste":
      case "pause":
      case "play":
      case "pointercancel":
      case "pointerdown":
      case "pointerup":
      case "ratechange":
      case "reset":
      case "resize":
      case "seeked":
      case "submit":
      case "touchcancel":
      case "touchend":
      case "touchstart":
      case "volumechange":
      case "change":
      case "selectionchange":
      case "textInput":
      case "compositionstart":
      case "compositionend":
      case "compositionupdate":
      case "beforeblur":
      case "afterblur":
      case "beforeinput":
      case "blur":
      case "fullscreenchange":
      case "focus":
      case "hashchange":
      case "popstate":
      case "select":
      case "selectstart":
        return 1;
      case "drag":
      case "dragenter":
      case "dragexit":
      case "dragleave":
      case "dragover":
      case "mousemove":
      case "mouseout":
      case "mouseover":
      case "pointermove":
      case "pointerout":
      case "pointerover":
      case "scroll":
      case "toggle":
      case "touchmove":
      case "wheel":
      case "mouseenter":
      case "mouseleave":
      case "pointerenter":
      case "pointerleave":
        return 4;
      case "message":
        switch (rn()) {
          case nn:
            return 1;
          case on:
            return 4;
          case an:
          case sn:
            return 16;
          case ln:
            return 536870912;
          default:
            return 16;
        }
      default:
        return 16;
    }
  }
  function Ul() {
    if (Ln) return Ln;
    var e,
      t,
      r = Rn,
      n = r.length,
      o = "value" in Fn ? Fn.value : Fn.textContent,
      a = o.length;
    for (e = 0; e < n && r[e] === o[e]; e++);
    var i = n - e;
    for (t = 1; t <= i && r[n - t] === o[a - t]; t++);
    return (Ln = o.slice(e, 1 < t ? 1 - t : void 0));
  }
  function Hl(e) {
    var t = e.keyCode;
    return (
      "charCode" in e
        ? 0 === (e = e.charCode) && 13 === t && (e = 13)
        : (e = t),
      10 === e && (e = 13),
      32 <= e || 13 === e ? e : 0
    );
  }
  function zl() {
    return !0;
  }
  function jl() {
    return !1;
  }
  function Wl(e) {
    function t(t, r, n, o, a) {
      for (var i in ((this._reactName = t),
      (this._targetInst = n),
      (this.type = r),
      (this.nativeEvent = o),
      (this.target = a),
      (this.currentTarget = null),
      e))
        e.hasOwnProperty(i) && ((t = e[i]), (this[i] = t ? t(o) : o[i]));
      return (
        (this.isDefaultPrevented = (
          null != o.defaultPrevented ? o.defaultPrevented : !1 === o.returnValue
        )
          ? zl
          : jl),
        (this.isPropagationStopped = jl),
        this
      );
    }
    return (
      Gr(t.prototype, {
        preventDefault: function () {
          this.defaultPrevented = !0;
          var e = this.nativeEvent;
          e &&
            (e.preventDefault
              ? e.preventDefault()
              : "unknown" != typeof e.returnValue && (e.returnValue = !1),
            (this.isDefaultPrevented = zl));
        },
        stopPropagation: function () {
          var e = this.nativeEvent;
          e &&
            (e.stopPropagation
              ? e.stopPropagation()
              : "unknown" != typeof e.cancelBubble && (e.cancelBubble = !0),
            (this.isPropagationStopped = zl));
        },
        persist: function () {},
        isPersistent: zl,
      }),
      t
    );
  }
  function Vl(e) {
    var t = this.nativeEvent;
    return t.getModifierState ? t.getModifierState(e) : !!(e = oo[e]) && !!t[e];
  }
  function ql() {
    return Vl;
  }
  function Zl(e, t) {
    switch (e) {
      case "keyup":
        return -1 !== fo.indexOf(t.keyCode);
      case "keydown":
        return 229 !== t.keyCode;
      case "keypress":
      case "mousedown":
      case "focusout":
        return !0;
      default:
        return !1;
    }
  }
  function Yl(e) {
    return "object" == typeof (e = e.detail) && "data" in e ? e.data : null;
  }
  function Ql(e) {
    var t = e && e.nodeName && e.nodeName.toLowerCase();
    return "input" === t ? !!Eo[e.type] : "textarea" === t;
  }
  function Kl(e, t, r, n) {
    al(n),
      0 < (t = Pc(t, "onChange")).length &&
        ((r = new On("onChange", "change", null, r, n)),
        e.push({ event: r, listeners: t }));
  }
  function Xl(e) {
    wc(e, 0);
  }
  function Jl(e) {
    if (Bs(Nc(e))) return e;
  }
  function ec(e, t) {
    if ("change" === e) return t;
  }
  function tc() {
    _o && (_o.detachEvent("onpropertychange", rc), (xo = _o = null));
  }
  function rc(e) {
    if ("value" === e.propertyName && Jl(xo)) {
      var t = [];
      Kl(t, xo, e, nl(e)), cl(Xl, t);
    }
  }
  function nc(e, t, r) {
    "focusin" === e
      ? (tc(), (xo = r), (_o = t).attachEvent("onpropertychange", rc))
      : "focusout" === e && tc();
  }
  function oc(e) {
    if ("selectionchange" === e || "keyup" === e || "keydown" === e)
      return Jl(xo);
  }
  function ac(e, t) {
    if ("click" === e) return Jl(t);
  }
  function ic(e, t) {
    if ("input" === e || "change" === e) return Jl(t);
  }
  function sc(e, t) {
    return (e === t && (0 !== e || 1 / e == 1 / t)) || (e != e && t != t);
  }
  function lc(e, t) {
    if (Do(e, t)) return !0;
    if (
      "object" != typeof e ||
      null === e ||
      "object" != typeof t ||
      null === t
    )
      return !1;
    var r = Object.keys(e),
      n = Object.keys(t);
    if (r.length !== n.length) return !1;
    for (n = 0; n < r.length; n++) {
      var o = r[n];
      if (!cr.call(t, o) || !Do(e[o], t[o])) return !1;
    }
    return !0;
  }
  function cc(e) {
    for (; e && e.firstChild; ) e = e.firstChild;
    return e;
  }
  function uc(e, t) {
    var r,
      n = cc(e);
    for (e = 0; n; ) {
      if (3 === n.nodeType) {
        if (((r = e + n.textContent.length), e <= t && r >= t))
          return { node: n, offset: t - e };
        e = r;
      }
      e: {
        for (; n; ) {
          if (n.nextSibling) {
            n = n.nextSibling;
            break e;
          }
          n = n.parentNode;
        }
        n = void 0;
      }
      n = cc(n);
    }
  }
  function dc(e, t) {
    return (
      !(!e || !t) &&
      (e === t ||
        ((!e || 3 !== e.nodeType) &&
          (t && 3 === t.nodeType
            ? dc(e, t.parentNode)
            : "contains" in e
            ? e.contains(t)
            : !!e.compareDocumentPosition &&
              !!(16 & e.compareDocumentPosition(t)))))
    );
  }
  function hc() {
    for (var e = window, t = Os(); t instanceof e.HTMLIFrameElement; ) {
      try {
        var r = "string" == typeof t.contentWindow.location.href;
      } catch (e) {
        r = !1;
      }
      if (!r) break;
      t = Os((e = t.contentWindow).document);
    }
    return t;
  }
  function pc(e) {
    var t = e && e.nodeName && e.nodeName.toLowerCase();
    return (
      t &&
      (("input" === t &&
        ("text" === e.type ||
          "search" === e.type ||
          "tel" === e.type ||
          "url" === e.type ||
          "password" === e.type)) ||
        "textarea" === t ||
        "true" === e.contentEditable)
    );
  }
  function mc(e) {
    var t = hc(),
      r = e.focusedElem,
      n = e.selectionRange;
    if (
      t !== r &&
      r &&
      r.ownerDocument &&
      dc(r.ownerDocument.documentElement, r)
    ) {
      if (null !== n && pc(r))
        if (
          ((t = n.start),
          void 0 === (e = n.end) && (e = t),
          "selectionStart" in r)
        )
          (r.selectionStart = t),
            (r.selectionEnd = Math.min(e, r.value.length));
        else if (
          (e = ((t = r.ownerDocument || document) && t.defaultView) || window)
            .getSelection
        ) {
          e = e.getSelection();
          var o = r.textContent.length,
            a = Math.min(n.start, o);
          (n = void 0 === n.end ? a : Math.min(n.end, o)),
            !e.extend && a > n && ((o = n), (n = a), (a = o)),
            (o = uc(r, a));
          var i = uc(r, n);
          o &&
            i &&
            (1 !== e.rangeCount ||
              e.anchorNode !== o.node ||
              e.anchorOffset !== o.offset ||
              e.focusNode !== i.node ||
              e.focusOffset !== i.offset) &&
            ((t = t.createRange()).setStart(o.node, o.offset),
            e.removeAllRanges(),
            a > n
              ? (e.addRange(t), e.extend(i.node, i.offset))
              : (t.setEnd(i.node, i.offset), e.addRange(t)));
        }
      for (t = [], e = r; (e = e.parentNode); )
        1 === e.nodeType &&
          t.push({ element: e, left: e.scrollLeft, top: e.scrollTop });
      for ("function" == typeof r.focus && r.focus(), r = 0; r < t.length; r++)
        ((e = t[r]).element.scrollLeft = e.left), (e.element.scrollTop = e.top);
    }
  }
  function gc(e, t, r) {
    var n =
      r.window === r ? r.document : 9 === r.nodeType ? r : r.ownerDocument;
    Lo ||
      null == Mo ||
      Mo !== Os(n) ||
      ("selectionStart" in (n = Mo) && pc(n)
        ? (n = { start: n.selectionStart, end: n.selectionEnd })
        : (n = {
            anchorNode: (n = (
              (n.ownerDocument && n.ownerDocument.defaultView) ||
              window
            ).getSelection()).anchorNode,
            anchorOffset: n.anchorOffset,
            focusNode: n.focusNode,
            focusOffset: n.focusOffset,
          }),
      (Ro && lc(Ro, n)) ||
        ((Ro = n),
        0 < (n = Pc(Fo, "onSelect")).length &&
          ((t = new On("onSelect", "select", null, t, r)),
          e.push({ event: t, listeners: n }),
          (t.target = Mo))));
  }
  function fc(e, t) {
    var r = {};
    return (
      (r[e.toLowerCase()] = t.toLowerCase()),
      (r["Webkit" + e] = "webkit" + t),
      (r["Moz" + e] = "moz" + t),
      r
    );
  }
  function vc(e) {
    if (Oo[e]) return Oo[e];
    if (!Bo[e]) return e;
    var t,
      r = Bo[e];
    for (t in r) if (r.hasOwnProperty(t) && t in $o) return (Oo[e] = r[t]);
    return e;
  }
  function bc(e, t) {
    jo.set(e, t), Ss(t, [e]);
  }
  function yc(e, t, r) {
    var n = e.type || "unknown-event";
    (e.currentTarget = r),
      (function (e, t, r, n, o, a, i, s, l) {
        if ((hl.apply(this, arguments), Vr)) {
          if (!Vr) throw Error(ks(198));
          var c = qr;
          (Vr = !1), (qr = null), Zr || ((Zr = !0), (Yr = c));
        }
      })(n, t, void 0, e),
      (e.currentTarget = null);
  }
  function wc(e, t) {
    t = 0 != (4 & t);
    for (var r = 0; r < e.length; r++) {
      var n = e[r],
        o = n.event;
      n = n.listeners;
      e: {
        var a = void 0;
        if (t)
          for (var i = n.length - 1; 0 <= i; i--) {
            var s = n[i],
              l = s.instance,
              c = s.currentTarget;
            if (((s = s.listener), l !== a && o.isPropagationStopped()))
              break e;
            yc(o, s, c), (a = l);
          }
        else
          for (i = 0; i < n.length; i++) {
            if (
              ((l = (s = n[i]).instance),
              (c = s.currentTarget),
              (s = s.listener),
              l !== a && o.isPropagationStopped())
            )
              break e;
            yc(o, s, c), (a = l);
          }
      }
    }
    if (Zr) throw ((e = Yr), (Zr = !1), (Yr = null), e);
  }
  function Cc(e, t) {
    var r = t[da];
    void 0 === r && (r = t[da] = new Set());
    var n = e + "__bubble";
    r.has(n) || (Ec(t, e, 2, !1), r.add(n));
  }
  function kc(e, t, r) {
    var n = 0;
    t && (n |= 4), Ec(r, e, n, t);
  }
  function Sc(e) {
    if (!e[Xo]) {
      (e[Xo] = !0),
        ir.forEach(function (t) {
          "selectionchange" !== t && (Ko.has(t) || kc(t, !1, e), kc(t, !0, e));
        });
      var t = 9 === e.nodeType ? e : e.ownerDocument;
      null === t || t[Xo] || ((t[Xo] = !0), kc("selectionchange", !1, t));
    }
  }
  function Ec(e, t, r, n) {
    switch (Nl(t)) {
      case 1:
        var o = Ll;
        break;
      case 4:
        o = Bl;
        break;
      default:
        o = Ol;
    }
    (r = o.bind(null, t, r, e)),
      (o = void 0),
      !jr ||
        ("touchstart" !== t && "touchmove" !== t && "wheel" !== t) ||
        (o = !0),
      n
        ? void 0 !== o
          ? e.addEventListener(t, r, { capture: !0, passive: o })
          : e.addEventListener(t, r, !0)
        : void 0 !== o
        ? e.addEventListener(t, r, { passive: o })
        : e.addEventListener(t, r, !1);
  }
  function _c(e, t, r, n, o) {
    var a = n;
    if (0 == (1 & t) && 0 == (2 & t) && null !== n)
      e: for (;;) {
        if (null === n) return;
        var i = n.tag;
        if (3 === i || 4 === i) {
          var s = n.stateNode.containerInfo;
          if (s === o || (8 === s.nodeType && s.parentNode === o)) break;
          if (4 === i)
            for (i = n.return; null !== i; ) {
              var l = i.tag;
              if (
                (3 === l || 4 === l) &&
                ((l = i.stateNode.containerInfo) === o ||
                  (8 === l.nodeType && l.parentNode === o))
              )
                return;
              i = i.return;
            }
          for (; null !== s; ) {
            if (null === (i = Oc(s))) return;
            if (5 === (l = i.tag) || 6 === l) {
              n = a = i;
              continue e;
            }
            s = s.parentNode;
          }
        }
        n = n.return;
      }
    cl(function () {
      var n = a,
        o = nl(r),
        i = [];
      e: {
        var s = jo.get(e);
        if (void 0 !== s) {
          var l = On,
            c = e;
          switch (e) {
            case "keypress":
              if (0 === Hl(r)) break e;
            case "keydown":
            case "keyup":
              l = io;
              break;
            case "focusin":
              (c = "focus"), (l = Yn);
              break;
            case "focusout":
              (c = "blur"), (l = Yn);
              break;
            case "beforeblur":
            case "afterblur":
              l = Yn;
              break;
            case "click":
              if (2 === r.button) break e;
            case "auxclick":
            case "dblclick":
            case "mousedown":
            case "mousemove":
            case "mouseup":
            case "mouseout":
            case "mouseover":
            case "contextmenu":
              l = Wn;
              break;
            case "drag":
            case "dragend":
            case "dragenter":
            case "dragexit":
            case "dragleave":
            case "dragover":
            case "dragstart":
            case "drop":
              l = qn;
              break;
            case "touchcancel":
            case "touchend":
            case "touchmove":
            case "touchstart":
              l = uo;
              break;
            case No:
            case Uo:
            case Ho:
              l = Kn;
              break;
            case zo:
              l = po;
              break;
            case "scroll":
              l = Nn;
              break;
            case "wheel":
              l = go;
              break;
            case "copy":
            case "cut":
            case "paste":
              l = Jn;
              break;
            case "gotpointercapture":
            case "lostpointercapture":
            case "pointercancel":
            case "pointerdown":
            case "pointermove":
            case "pointerout":
            case "pointerover":
            case "pointerup":
              l = lo;
          }
          var u = 0 != (4 & t),
            d = !u && "scroll" === e,
            h = u ? (null !== s ? s + "Capture" : null) : s;
          u = [];
          for (var p, m = n; null !== m; ) {
            var g = (p = m).stateNode;
            if (
              (5 === p.tag &&
                null !== g &&
                ((p = g),
                null !== h && null != (g = ul(m, h)) && u.push(xc(m, g, p))),
              d)
            )
              break;
            m = m.return;
          }
          0 < u.length &&
            ((s = new l(s, c, null, r, o)), i.push({ event: s, listeners: u }));
        }
      }
      if (0 == (7 & t)) {
        if (
          ((l = "mouseout" === e || "pointerout" === e),
          (!(s = "mouseover" === e || "pointerover" === e) ||
            r === $r ||
            !(c = r.relatedTarget || r.fromElement) ||
            (!Oc(c) && !c[ua])) &&
            (l || s) &&
            ((s =
              o.window === o
                ? o
                : (s = o.ownerDocument)
                ? s.defaultView || s.parentWindow
                : window),
            l
              ? ((l = n),
                null !==
                  (c = (c = r.relatedTarget || r.toElement) ? Oc(c) : null) &&
                  (c !== (d = pl(c)) || (5 !== c.tag && 6 !== c.tag)) &&
                  (c = null))
              : ((l = null), (c = n)),
            l !== c))
        ) {
          if (
            ((u = Wn),
            (g = "onMouseLeave"),
            (h = "onMouseEnter"),
            (m = "mouse"),
            ("pointerout" !== e && "pointerover" !== e) ||
              ((u = lo),
              (g = "onPointerLeave"),
              (h = "onPointerEnter"),
              (m = "pointer")),
            (d = null == l ? s : Nc(l)),
            (p = null == c ? s : Nc(c)),
            ((s = new u(g, m + "leave", l, r, o)).target = d),
            (s.relatedTarget = p),
            (g = null),
            Oc(o) === n &&
              (((u = new u(h, m + "enter", c, r, o)).target = p),
              (u.relatedTarget = d),
              (g = u)),
            (d = g),
            l && c)
          )
            e: {
              for (h = c, m = 0, p = u = l; p; p = Tc(p)) m++;
              for (p = 0, g = h; g; g = Tc(g)) p++;
              for (; 0 < m - p; ) (u = Tc(u)), m--;
              for (; 0 < p - m; ) (h = Tc(h)), p--;
              for (; m--; ) {
                if (u === h || (null !== h && u === h.alternate)) break e;
                (u = Tc(u)), (h = Tc(h));
              }
              u = null;
            }
          else u = null;
          null !== l && Ic(i, s, l, u, !1),
            null !== c && null !== d && Ic(i, d, c, u, !0);
        }
        if (
          "select" ===
            (l =
              (s = n ? Nc(n) : window).nodeName && s.nodeName.toLowerCase()) ||
          ("input" === l && "file" === s.type)
        )
          var f = ec;
        else if (Ql(s))
          if (Po) f = ic;
          else {
            f = oc;
            var v = nc;
          }
        else
          (l = s.nodeName) &&
            "input" === l.toLowerCase() &&
            ("checkbox" === s.type || "radio" === s.type) &&
            (f = ac);
        switch (
          (f && (f = f(e, n))
            ? Kl(i, f, r, o)
            : (v && v(e, s, n),
              "focusout" === e &&
                (v = s._wrapperState) &&
                v.controlled &&
                "number" === s.type &&
                js(s, "number", s.value)),
          (v = n ? Nc(n) : window),
          e)
        ) {
          case "focusin":
            (Ql(v) || "true" === v.contentEditable) &&
              ((Mo = v), (Fo = n), (Ro = null));
            break;
          case "focusout":
            Ro = Fo = Mo = null;
            break;
          case "mousedown":
            Lo = !0;
            break;
          case "contextmenu":
          case "mouseup":
          case "dragend":
            (Lo = !1), gc(i, r, o);
            break;
          case "selectionchange":
            if (Ao) break;
          case "keydown":
          case "keyup":
            gc(i, r, o);
        }
        var b;
        if (vo)
          e: {
            switch (e) {
              case "compositionstart":
                var y = "onCompositionStart";
                break e;
              case "compositionend":
                y = "onCompositionEnd";
                break e;
              case "compositionupdate":
                y = "onCompositionUpdate";
                break e;
            }
            y = void 0;
          }
        else
          So
            ? Zl(e, r) && (y = "onCompositionEnd")
            : "keydown" === e &&
              229 === r.keyCode &&
              (y = "onCompositionStart");
        y &&
          (wo &&
            "ko" !== r.locale &&
            (So || "onCompositionStart" !== y
              ? "onCompositionEnd" === y && So && (b = Ul())
              : ((Rn = "value" in (Fn = o) ? Fn.value : Fn.textContent),
                (So = !0))),
          0 < (v = Pc(n, y)).length &&
            ((y = new to(y, e, null, r, o)),
            i.push({ event: y, listeners: v }),
            b ? (y.data = b) : null !== (b = Yl(r)) && (y.data = b))),
          (b = yo
            ? (function (e, t) {
                switch (e) {
                  case "compositionend":
                    return Yl(t);
                  case "keypress":
                    return 32 !== t.which ? null : ((ko = !0), Co);
                  case "textInput":
                    return (e = t.data) === Co && ko ? null : e;
                  default:
                    return null;
                }
              })(e, r)
            : (function (e, t) {
                if (So)
                  return "compositionend" === e || (!vo && Zl(e, t))
                    ? ((e = Ul()), (Ln = Rn = Fn = null), (So = !1), e)
                    : null;
                switch (e) {
                  case "paste":
                    return null;
                  case "keypress":
                    if (
                      !(t.ctrlKey || t.altKey || t.metaKey) ||
                      (t.ctrlKey && t.altKey)
                    ) {
                      if (t.char && 1 < t.char.length) return t.char;
                      if (t.which) return String.fromCharCode(t.which);
                    }
                    return null;
                  case "compositionend":
                    return wo && "ko" !== t.locale ? null : t.data;
                  default:
                    return null;
                }
              })(e, r)) &&
            0 < (n = Pc(n, "onBeforeInput")).length &&
            ((o = new to("onBeforeInput", "beforeinput", null, r, o)),
            i.push({ event: o, listeners: n }),
            (o.data = b));
      }
      wc(i, t);
    });
  }
  function xc(e, t, r) {
    return { instance: e, listener: t, currentTarget: r };
  }
  function Pc(e, t) {
    for (var r = t + "Capture", n = []; null !== e; ) {
      var o = e,
        a = o.stateNode;
      5 === o.tag &&
        null !== a &&
        ((o = a),
        null != (a = ul(e, r)) && n.unshift(xc(e, a, o)),
        null != (a = ul(e, t)) && n.push(xc(e, a, o))),
        (e = e.return);
    }
    return n;
  }
  function Tc(e) {
    if (null === e) return null;
    do {
      e = e.return;
    } while (e && 5 !== e.tag);
    return e || null;
  }
  function Ic(e, t, r, n, o) {
    for (var a = t._reactName, i = []; null !== r && r !== n; ) {
      var s = r,
        l = s.alternate,
        c = s.stateNode;
      if (null !== l && l === n) break;
      5 === s.tag &&
        null !== c &&
        ((s = c),
        o
          ? null != (l = ul(r, a)) && i.unshift(xc(r, l, s))
          : o || (null != (l = ul(r, a)) && i.push(xc(r, l, s)))),
        (r = r.return);
    }
    0 !== i.length && e.push({ event: t, listeners: i });
  }
  function Gc(e) {
    return ("string" == typeof e ? e : "" + e)
      .replace(Jo, "\n")
      .replace(ea, "");
  }
  function Dc(e, t, r) {
    if (((t = Gc(t)), Gc(e) !== t && r)) throw Error(ks(425));
  }
  function Ac() {}
  function Mc(e, t) {
    return (
      "textarea" === e ||
      "noscript" === e ||
      "string" == typeof t.children ||
      "number" == typeof t.children ||
      ("object" == typeof t.dangerouslySetInnerHTML &&
        null !== t.dangerouslySetInnerHTML &&
        null != t.dangerouslySetInnerHTML.__html)
    );
  }
  function Fc(e) {
    setTimeout(function () {
      throw e;
    });
  }
  function Rc(e, t) {
    var r = t,
      n = 0;
    do {
      var o = r.nextSibling;
      if ((e.removeChild(r), o && 8 === o.nodeType))
        if ("/$" === (r = o.data)) {
          if (0 === n) return e.removeChild(o), void Rl(t);
          n--;
        } else ("$" !== r && "$?" !== r && "$!" !== r) || n++;
      r = o;
    } while (r);
    Rl(t);
  }
  function Lc(e) {
    for (; null != e; e = e.nextSibling) {
      var t = e.nodeType;
      if (1 === t || 3 === t) break;
      if (8 === t) {
        if ("$" === (t = e.data) || "$!" === t || "$?" === t) break;
        if ("/$" === t) return null;
      }
    }
    return e;
  }
  function Bc(e) {
    e = e.previousSibling;
    for (var t = 0; e; ) {
      if (8 === e.nodeType) {
        var r = e.data;
        if ("$" === r || "$!" === r || "$?" === r) {
          if (0 === t) return e;
          t--;
        } else "/$" === r && t++;
      }
      e = e.previousSibling;
    }
    return null;
  }
  function Oc(e) {
    var t = e[la];
    if (t) return t;
    for (var r = e.parentNode; r; ) {
      if ((t = r[ua] || r[la])) {
        if (
          ((r = t.alternate),
          null !== t.child || (null !== r && null !== r.child))
        )
          for (e = Bc(e); null !== e; ) {
            if ((r = e[la])) return r;
            e = Bc(e);
          }
        return t;
      }
      r = (e = r).parentNode;
    }
    return null;
  }
  function $c(e) {
    return !(e = e[la] || e[ua]) ||
      (5 !== e.tag && 6 !== e.tag && 13 !== e.tag && 3 !== e.tag)
      ? null
      : e;
  }
  function Nc(e) {
    if (5 === e.tag || 6 === e.tag) return e.stateNode;
    throw Error(ks(33));
  }
  function Uc(e) {
    return e[ca] || null;
  }
  function Hc(e) {
    return { current: e };
  }
  function zc(e) {
    0 > ga || ((e.current = ma[ga]), (ma[ga] = null), ga--);
  }
  function jc(e, t) {
    ga++, (ma[ga] = e.current), (e.current = t);
  }
  function Wc(e, t) {
    var r = e.type.contextTypes;
    if (!r) return fa;
    var n = e.stateNode;
    if (n && n.__reactInternalMemoizedUnmaskedChildContext === t)
      return n.__reactInternalMemoizedMaskedChildContext;
    var o,
      a = {};
    for (o in r) a[o] = t[o];
    return (
      n &&
        (((e = e.stateNode).__reactInternalMemoizedUnmaskedChildContext = t),
        (e.__reactInternalMemoizedMaskedChildContext = a)),
      a
    );
  }
  function Vc(e) {
    return null != (e = e.childContextTypes);
  }
  function qc() {
    zc(ba), zc(va);
  }
  function Zc(e, t, r) {
    if (va.current !== fa) throw Error(ks(168));
    jc(va, t), jc(ba, r);
  }
  function Yc(e, t, r) {
    var n = e.stateNode;
    if (((t = t.childContextTypes), "function" != typeof n.getChildContext))
      return r;
    for (var o in (n = n.getChildContext()))
      if (!(o in t)) throw Error(ks(108, Ms(e) || "Unknown", o));
    return Gr({}, r, n);
  }
  function Qc(e) {
    return (
      (e =
        ((e = e.stateNode) && e.__reactInternalMemoizedMergedChildContext) ||
        fa),
      (ya = va.current),
      jc(va, e),
      jc(ba, ba.current),
      !0
    );
  }
  function Kc(e, t, r) {
    var n = e.stateNode;
    if (!n) throw Error(ks(169));
    r
      ? ((e = Yc(e, t, ya)),
        (n.__reactInternalMemoizedMergedChildContext = e),
        zc(ba),
        zc(va),
        jc(va, e))
      : zc(ba),
      jc(ba, r);
  }
  function Xc(e) {
    null === wa ? (wa = [e]) : wa.push(e);
  }
  function Jc() {
    if (!ka && null !== wa) {
      ka = !0;
      var e = 0,
        t = fn;
      try {
        var r = wa;
        for (fn = 1; e < r.length; e++) {
          var n = r[e];
          do {
            n = n(!0);
          } while (null !== n);
        }
        (wa = null), (Ca = !1);
      } catch (t) {
        throw (null !== wa && (wa = wa.slice(e + 1)), Kr(nn, Jc), t);
      } finally {
        (fn = t), (ka = !1);
      }
    }
    return null;
  }
  function eu(e, t) {
    (Sa[Ea++] = xa), (Sa[Ea++] = _a), (_a = e), (xa = t);
  }
  function tu(e, t, r) {
    (Pa[Ta++] = Ga), (Pa[Ta++] = Da), (Pa[Ta++] = Ia), (Ia = e);
    var n = Ga;
    e = Da;
    var o = 32 - dn(n) - 1;
    (n &= ~(1 << o)), (r += 1);
    var a = 32 - dn(t) + o;
    if (30 < a) {
      var i = o - (o % 5);
      (a = (n & ((1 << i) - 1)).toString(32)),
        (n >>= i),
        (o -= i),
        (Ga = (1 << (32 - dn(t) + o)) | (r << o) | n),
        (Da = a + e);
    } else (Ga = (1 << a) | (r << o) | n), (Da = e);
  }
  function ru(e) {
    null !== e.return && (eu(e, 1), tu(e, 1, 0));
  }
  function nu(e) {
    for (; e === _a; )
      (_a = Sa[--Ea]), (Sa[Ea] = null), (xa = Sa[--Ea]), (Sa[Ea] = null);
    for (; e === Ia; )
      (Ia = Pa[--Ta]),
        (Pa[Ta] = null),
        (Da = Pa[--Ta]),
        (Pa[Ta] = null),
        (Ga = Pa[--Ta]),
        (Pa[Ta] = null);
  }
  function ou(e, t) {
    var r = ip(5, null, null, 0);
    (r.elementType = "DELETED"),
      (r.stateNode = t),
      (r.return = e),
      null === (t = e.deletions)
        ? ((e.deletions = [r]), (e.flags |= 16))
        : t.push(r);
  }
  function au(e, t) {
    switch (e.tag) {
      case 5:
        var r = e.type;
        return (
          null !==
            (t =
              1 !== t.nodeType || r.toLowerCase() !== t.nodeName.toLowerCase()
                ? null
                : t) &&
          ((e.stateNode = t), (Aa = e), (Ma = Lc(t.firstChild)), !0)
        );
      case 6:
        return (
          null !== (t = "" === e.pendingProps || 3 !== t.nodeType ? null : t) &&
          ((e.stateNode = t), (Aa = e), (Ma = null), !0)
        );
      case 13:
        return (
          null !== (t = 8 !== t.nodeType ? null : t) &&
          ((r = null !== Ia ? { id: Ga, overflow: Da } : null),
          (e.memoizedState = {
            dehydrated: t,
            treeContext: r,
            retryLane: 1073741824,
          }),
          ((r = ip(18, null, null, 0)).stateNode = t),
          (r.return = e),
          (e.child = r),
          (Aa = e),
          (Ma = null),
          !0)
        );
      default:
        return !1;
    }
  }
  function iu(e) {
    return 0 != (1 & e.mode) && 0 == (128 & e.flags);
  }
  function su(e) {
    if (Fa) {
      var t = Ma;
      if (t) {
        var r = t;
        if (!au(e, t)) {
          if (iu(e)) throw Error(ks(418));
          t = Lc(r.nextSibling);
          var n = Aa;
          t && au(e, t)
            ? ou(n, r)
            : ((e.flags = (-4097 & e.flags) | 2), (Fa = !1), (Aa = e));
        }
      } else {
        if (iu(e)) throw Error(ks(418));
        (e.flags = (-4097 & e.flags) | 2), (Fa = !1), (Aa = e);
      }
    }
  }
  function lu(e) {
    for (
      e = e.return;
      null !== e && 5 !== e.tag && 3 !== e.tag && 13 !== e.tag;

    )
      e = e.return;
    Aa = e;
  }
  function cu(e) {
    if (e !== Aa) return !1;
    if (!Fa) return lu(e), (Fa = !0), !1;
    var t;
    if (
      ((t = 3 !== e.tag) &&
        !(t = 5 !== e.tag) &&
        (t =
          "head" !== (t = e.type) &&
          "body" !== t &&
          !Mc(e.type, e.memoizedProps)),
      t && (t = Ma))
    ) {
      if (iu(e)) throw (uu(), Error(ks(418)));
      for (; t; ) ou(e, t), (t = Lc(t.nextSibling));
    }
    if ((lu(e), 13 === e.tag)) {
      if (!(e = null !== (e = e.memoizedState) ? e.dehydrated : null))
        throw Error(ks(317));
      e: {
        for (e = e.nextSibling, t = 0; e; ) {
          if (8 === e.nodeType) {
            var r = e.data;
            if ("/$" === r) {
              if (0 === t) {
                Ma = Lc(e.nextSibling);
                break e;
              }
              t--;
            } else ("$" !== r && "$!" !== r && "$?" !== r) || t++;
          }
          e = e.nextSibling;
        }
        Ma = null;
      }
    } else Ma = Aa ? Lc(e.stateNode.nextSibling) : null;
    return !0;
  }
  function uu() {
    for (var e = Ma; e; ) e = Lc(e.nextSibling);
  }
  function du() {
    (Ma = Aa = null), (Fa = !1);
  }
  function hu(e) {
    null === Ra ? (Ra = [e]) : Ra.push(e);
  }
  function pu(e, t) {
    if (e && e.defaultProps) {
      for (var r in ((t = Gr({}, t)), (e = e.defaultProps)))
        void 0 === t[r] && (t[r] = e[r]);
      return t;
    }
    return t;
  }
  function mu() {
    Na = $a = Oa = null;
  }
  function gu(e) {
    var t = Ba.current;
    zc(Ba), (e._currentValue = t);
  }
  function fu(e, t, r) {
    for (; null !== e; ) {
      var n = e.alternate;
      if (
        ((e.childLanes & t) !== t
          ? ((e.childLanes |= t), null !== n && (n.childLanes |= t))
          : null !== n && (n.childLanes & t) !== t && (n.childLanes |= t),
        e === r)
      )
        break;
      e = e.return;
    }
  }
  function vu(e, t) {
    (Oa = e),
      (Na = $a = null),
      null !== (e = e.dependencies) &&
        null !== e.firstContext &&
        (0 != (e.lanes & t) && (gi = !0), (e.firstContext = null));
  }
  function bu(e) {
    var t = e._currentValue;
    if (Na !== e)
      if (((e = { context: e, memoizedValue: t, next: null }), null === $a)) {
        if (null === Oa) throw Error(ks(308));
        ($a = e), (Oa.dependencies = { lanes: 0, firstContext: e });
      } else $a = $a.next = e;
    return t;
  }
  function yu(e) {
    null === Ua ? (Ua = [e]) : Ua.push(e);
  }
  function wu(e, t, r, n) {
    var o = t.interleaved;
    return (
      null === o ? ((r.next = r), yu(t)) : ((r.next = o.next), (o.next = r)),
      (t.interleaved = r),
      Cu(e, n)
    );
  }
  function Cu(e, t) {
    e.lanes |= t;
    var r = e.alternate;
    for (null !== r && (r.lanes |= t), r = e, e = e.return; null !== e; )
      (e.childLanes |= t),
        null !== (r = e.alternate) && (r.childLanes |= t),
        (r = e),
        (e = e.return);
    return 3 === r.tag ? r.stateNode : null;
  }
  function ku(e) {
    e.updateQueue = {
      baseState: e.memoizedState,
      firstBaseUpdate: null,
      lastBaseUpdate: null,
      shared: { pending: null, interleaved: null, lanes: 0 },
      effects: null,
    };
  }
  function Su(e, t) {
    (e = e.updateQueue),
      t.updateQueue === e &&
        (t.updateQueue = {
          baseState: e.baseState,
          firstBaseUpdate: e.firstBaseUpdate,
          lastBaseUpdate: e.lastBaseUpdate,
          shared: e.shared,
          effects: e.effects,
        });
  }
  function Eu(e, t) {
    return {
      eventTime: e,
      lane: t,
      tag: 0,
      payload: null,
      callback: null,
      next: null,
    };
  }
  function _u(e, t, r) {
    var n = e.updateQueue;
    if (null === n) return null;
    if (((n = n.shared), 0 != (2 & Ai))) {
      var o = n.pending;
      return (
        null === o ? (t.next = t) : ((t.next = o.next), (o.next = t)),
        (n.pending = t),
        Cu(e, r)
      );
    }
    return (
      null === (o = n.interleaved)
        ? ((t.next = t), yu(n))
        : ((t.next = o.next), (o.next = t)),
      (n.interleaved = t),
      Cu(e, r)
    );
  }
  function xu(e, t, r) {
    if (null !== (t = t.updateQueue) && ((t = t.shared), 0 != (4194240 & r))) {
      var n = t.lanes;
      (r |= n &= e.pendingLanes), (t.lanes = r), xl(e, r);
    }
  }
  function Pu(e, t) {
    var r = e.updateQueue,
      n = e.alternate;
    if (null !== n && r === (n = n.updateQueue)) {
      var o = null,
        a = null;
      if (null !== (r = r.firstBaseUpdate)) {
        do {
          var i = {
            eventTime: r.eventTime,
            lane: r.lane,
            tag: r.tag,
            payload: r.payload,
            callback: r.callback,
            next: null,
          };
          null === a ? (o = a = i) : (a = a.next = i), (r = r.next);
        } while (null !== r);
        null === a ? (o = a = t) : (a = a.next = t);
      } else o = a = t;
      return (
        (r = {
          baseState: n.baseState,
          firstBaseUpdate: o,
          lastBaseUpdate: a,
          shared: n.shared,
          effects: n.effects,
        }),
        void (e.updateQueue = r)
      );
    }
    null === (e = r.lastBaseUpdate) ? (r.firstBaseUpdate = t) : (e.next = t),
      (r.lastBaseUpdate = t);
  }
  function Tu(e, t, r, n) {
    var o = e.updateQueue;
    Ha = !1;
    var a = o.firstBaseUpdate,
      i = o.lastBaseUpdate,
      s = o.shared.pending;
    if (null !== s) {
      o.shared.pending = null;
      var l = s,
        c = l.next;
      (l.next = null), null === i ? (a = c) : (i.next = c), (i = l);
      var u = e.alternate;
      null !== u &&
        (s = (u = u.updateQueue).lastBaseUpdate) !== i &&
        (null === s ? (u.firstBaseUpdate = c) : (s.next = c),
        (u.lastBaseUpdate = l));
    }
    if (null !== a) {
      var d = o.baseState;
      for (i = 0, u = c = l = null, s = a; ; ) {
        var h = s.lane,
          p = s.eventTime;
        if ((n & h) === h) {
          null !== u &&
            (u = u.next =
              {
                eventTime: p,
                lane: 0,
                tag: s.tag,
                payload: s.payload,
                callback: s.callback,
                next: null,
              });
          e: {
            var m = e,
              g = s;
            switch (((h = t), (p = r), g.tag)) {
              case 1:
                if ("function" == typeof (m = g.payload)) {
                  d = m.call(p, d, h);
                  break e;
                }
                d = m;
                break e;
              case 3:
                m.flags = (-65537 & m.flags) | 128;
              case 0:
                if (
                  null ==
                  (h =
                    "function" == typeof (m = g.payload) ? m.call(p, d, h) : m)
                )
                  break e;
                d = Gr({}, d, h);
                break e;
              case 2:
                Ha = !0;
            }
          }
          null !== s.callback &&
            0 !== s.lane &&
            ((e.flags |= 64),
            null === (h = o.effects) ? (o.effects = [s]) : h.push(s));
        } else
          (p = {
            eventTime: p,
            lane: h,
            tag: s.tag,
            payload: s.payload,
            callback: s.callback,
            next: null,
          }),
            null === u ? ((c = u = p), (l = d)) : (u = u.next = p),
            (i |= h);
        if (null === (s = s.next)) {
          if (null === (s = o.shared.pending)) break;
          (s = (h = s).next),
            (h.next = null),
            (o.lastBaseUpdate = h),
            (o.shared.pending = null);
        }
      }
      if (
        (null === u && (l = d),
        (o.baseState = l),
        (o.firstBaseUpdate = c),
        (o.lastBaseUpdate = u),
        null !== (t = o.shared.interleaved))
      ) {
        o = t;
        do {
          (i |= o.lane), (o = o.next);
        } while (o !== t);
      } else null === a && (o.shared.lanes = 0);
      (Ni |= i), (e.lanes = i), (e.memoizedState = d);
    }
  }
  function Iu(e, t, r) {
    if (((e = t.effects), (t.effects = null), null !== e))
      for (t = 0; t < e.length; t++) {
        var n = e[t],
          o = n.callback;
        if (null !== o) {
          if (((n.callback = null), (n = r), "function" != typeof o))
            throw Error(ks(191, o));
          o.call(n);
        }
      }
  }
  function Gu(e, t, r, n) {
    (r = null == (r = r(n, (t = e.memoizedState))) ? t : Gr({}, t, r)),
      (e.memoizedState = r),
      0 === e.lanes && (e.updateQueue.baseState = r);
  }
  function Du(e, t, r, n, o, a, i) {
    return "function" == typeof (e = e.stateNode).shouldComponentUpdate
      ? e.shouldComponentUpdate(n, a, i)
      : !t.prototype ||
          !t.prototype.isPureReactComponent ||
          !lc(r, n) ||
          !lc(o, a);
  }
  function Au(e, t, r) {
    var n = !1,
      o = fa,
      a = t.contextType;
    return (
      "object" == typeof a && null !== a
        ? (a = bu(a))
        : ((o = Vc(t) ? ya : va.current),
          (a = (n = null != (n = t.contextTypes)) ? Wc(e, o) : fa)),
      (t = new t(r, a)),
      (e.memoizedState =
        null !== t.state && void 0 !== t.state ? t.state : null),
      (t.updater = ja),
      (e.stateNode = t),
      (t._reactInternals = e),
      n &&
        (((e = e.stateNode).__reactInternalMemoizedUnmaskedChildContext = o),
        (e.__reactInternalMemoizedMaskedChildContext = a)),
      t
    );
  }
  function Mu(e, t, r, n) {
    (e = t.state),
      "function" == typeof t.componentWillReceiveProps &&
        t.componentWillReceiveProps(r, n),
      "function" == typeof t.UNSAFE_componentWillReceiveProps &&
        t.UNSAFE_componentWillReceiveProps(r, n),
      t.state !== e && ja.enqueueReplaceState(t, t.state, null);
  }
  function Fu(e, t, r, n) {
    var o = e.stateNode;
    (o.props = r), (o.state = e.memoizedState), (o.refs = za), ku(e);
    var a = t.contextType;
    "object" == typeof a && null !== a
      ? (o.context = bu(a))
      : ((a = Vc(t) ? ya : va.current), (o.context = Wc(e, a))),
      (o.state = e.memoizedState),
      "function" == typeof (a = t.getDerivedStateFromProps) &&
        (Gu(e, t, a, r), (o.state = e.memoizedState)),
      "function" == typeof t.getDerivedStateFromProps ||
        "function" == typeof o.getSnapshotBeforeUpdate ||
        ("function" != typeof o.UNSAFE_componentWillMount &&
          "function" != typeof o.componentWillMount) ||
        ((t = o.state),
        "function" == typeof o.componentWillMount && o.componentWillMount(),
        "function" == typeof o.UNSAFE_componentWillMount &&
          o.UNSAFE_componentWillMount(),
        t !== o.state && ja.enqueueReplaceState(o, o.state, null),
        Tu(e, r, o, n),
        (o.state = e.memoizedState)),
      "function" == typeof o.componentDidMount && (e.flags |= 4194308);
  }
  function Ru(e, t, r) {
    if (
      null !== (e = r.ref) &&
      "function" != typeof e &&
      "object" != typeof e
    ) {
      if (r._owner) {
        if ((r = r._owner)) {
          if (1 !== r.tag) throw Error(ks(309));
          var n = r.stateNode;
        }
        if (!n) throw Error(ks(147, e));
        var o = n,
          a = "" + e;
        return null !== t &&
          null !== t.ref &&
          "function" == typeof t.ref &&
          t.ref._stringRef === a
          ? t.ref
          : (((t = function (e) {
              var t = o.refs;
              t === za && (t = o.refs = {}),
                null === e ? delete t[a] : (t[a] = e);
            })._stringRef = a),
            t);
      }
      if ("string" != typeof e) throw Error(ks(284));
      if (!r._owner) throw Error(ks(290, e));
    }
    return e;
  }
  function Lu(e, t) {
    throw (
      ((e = Object.prototype.toString.call(t)),
      Error(
        ks(
          31,
          "[object Object]" === e
            ? "object with keys {" + Object.keys(t).join(", ") + "}"
            : e
        )
      ))
    );
  }
  function Bu(e) {
    return (0, e._init)(e._payload);
  }
  function Ou(e) {
    function t(t, r) {
      if (e) {
        var n = t.deletions;
        null === n ? ((t.deletions = [r]), (t.flags |= 16)) : n.push(r);
      }
    }
    function r(r, n) {
      if (!e) return null;
      for (; null !== n; ) t(r, n), (n = n.sibling);
      return null;
    }
    function n(e, t) {
      for (e = new Map(); null !== t; )
        null !== t.key ? e.set(t.key, t) : e.set(t.index, t), (t = t.sibling);
      return e;
    }
    function o(e, t) {
      return ((e = lp(e, t)).index = 0), (e.sibling = null), e;
    }
    function a(t, r, n) {
      return (
        (t.index = n),
        e
          ? null !== (n = t.alternate)
            ? (n = n.index) < r
              ? ((t.flags |= 2), r)
              : n
            : ((t.flags |= 2), r)
          : ((t.flags |= 1048576), r)
      );
    }
    function i(t) {
      return e && null === t.alternate && (t.flags |= 2), t;
    }
    function s(e, t, r, n) {
      return null === t || 6 !== t.tag
        ? (((t = hp(r, e.mode, n)).return = e), t)
        : (((t = o(t, r)).return = e), t);
    }
    function l(e, t, r, n) {
      var a = r.type;
      return a === br
        ? u(e, t, r.props.children, n, r.key)
        : null !== t &&
          (t.elementType === a ||
            ("object" == typeof a &&
              null !== a &&
              a.$$typeof === Pr &&
              Bu(a) === t.type))
        ? (((n = o(t, r.props)).ref = Ru(e, t, r)), (n.return = e), n)
        : (((n = cp(r.type, r.key, r.props, null, e.mode, n)).ref = Ru(
            e,
            t,
            r
          )),
          (n.return = e),
          n);
    }
    function c(e, t, r, n) {
      return null === t ||
        4 !== t.tag ||
        t.stateNode.containerInfo !== r.containerInfo ||
        t.stateNode.implementation !== r.implementation
        ? (((t = pp(r, e.mode, n)).return = e), t)
        : (((t = o(t, r.children || [])).return = e), t);
    }
    function u(e, t, r, n, a) {
      return null === t || 7 !== t.tag
        ? (((t = up(r, e.mode, n, a)).return = e), t)
        : (((t = o(t, r)).return = e), t);
    }
    function d(e, t, r) {
      if (("string" == typeof t && "" !== t) || "number" == typeof t)
        return ((t = hp("" + t, e.mode, r)).return = e), t;
      if ("object" == typeof t && null !== t) {
        switch (t.$$typeof) {
          case fr:
            return (
              ((r = cp(t.type, t.key, t.props, null, e.mode, r)).ref = Ru(
                e,
                null,
                t
              )),
              (r.return = e),
              r
            );
          case vr:
            return ((t = pp(t, e.mode, r)).return = e), t;
          case Pr:
            return d(e, (0, t._init)(t._payload), r);
        }
        if (Mr(t) || Ts(t)) return ((t = up(t, e.mode, r, null)).return = e), t;
        Lu(e, t);
      }
      return null;
    }
    function h(e, t, r, n) {
      var o = null !== t ? t.key : null;
      if (("string" == typeof r && "" !== r) || "number" == typeof r)
        return null !== o ? null : s(e, t, "" + r, n);
      if ("object" == typeof r && null !== r) {
        switch (r.$$typeof) {
          case fr:
            return r.key === o ? l(e, t, r, n) : null;
          case vr:
            return r.key === o ? c(e, t, r, n) : null;
          case Pr:
            return h(e, t, (o = r._init)(r._payload), n);
        }
        if (Mr(r) || Ts(r)) return null !== o ? null : u(e, t, r, n, null);
        Lu(e, r);
      }
      return null;
    }
    function p(e, t, r, n, o) {
      if (("string" == typeof n && "" !== n) || "number" == typeof n)
        return s(t, (e = e.get(r) || null), "" + n, o);
      if ("object" == typeof n && null !== n) {
        switch (n.$$typeof) {
          case fr:
            return l(t, (e = e.get(null === n.key ? r : n.key) || null), n, o);
          case vr:
            return c(t, (e = e.get(null === n.key ? r : n.key) || null), n, o);
          case Pr:
            return p(e, t, r, (0, n._init)(n._payload), o);
        }
        if (Mr(n) || Ts(n)) return u(t, (e = e.get(r) || null), n, o, null);
        Lu(t, n);
      }
      return null;
    }
    function m(o, i, s, l) {
      for (
        var c = null, u = null, m = i, g = (i = 0), f = null;
        null !== m && g < s.length;
        g++
      ) {
        m.index > g ? ((f = m), (m = null)) : (f = m.sibling);
        var v = h(o, m, s[g], l);
        if (null === v) {
          null === m && (m = f);
          break;
        }
        e && m && null === v.alternate && t(o, m),
          (i = a(v, i, g)),
          null === u ? (c = v) : (u.sibling = v),
          (u = v),
          (m = f);
      }
      if (g === s.length) return r(o, m), Fa && eu(o, g), c;
      if (null === m) {
        for (; g < s.length; g++)
          null !== (m = d(o, s[g], l)) &&
            ((i = a(m, i, g)), null === u ? (c = m) : (u.sibling = m), (u = m));
        return Fa && eu(o, g), c;
      }
      for (m = n(o, m); g < s.length; g++)
        null !== (f = p(m, o, g, s[g], l)) &&
          (e && null !== f.alternate && m.delete(null === f.key ? g : f.key),
          (i = a(f, i, g)),
          null === u ? (c = f) : (u.sibling = f),
          (u = f));
      return (
        e &&
          m.forEach(function (e) {
            return t(o, e);
          }),
        Fa && eu(o, g),
        c
      );
    }
    function g(o, i, s, l) {
      var c = Ts(s);
      if ("function" != typeof c) throw Error(ks(150));
      if (null == (s = c.call(s))) throw Error(ks(151));
      for (
        var u = (c = null), m = i, g = (i = 0), f = null, v = s.next();
        null !== m && !v.done;
        g++, v = s.next()
      ) {
        m.index > g ? ((f = m), (m = null)) : (f = m.sibling);
        var b = h(o, m, v.value, l);
        if (null === b) {
          null === m && (m = f);
          break;
        }
        e && m && null === b.alternate && t(o, m),
          (i = a(b, i, g)),
          null === u ? (c = b) : (u.sibling = b),
          (u = b),
          (m = f);
      }
      if (v.done) return r(o, m), Fa && eu(o, g), c;
      if (null === m) {
        for (; !v.done; g++, v = s.next())
          null !== (v = d(o, v.value, l)) &&
            ((i = a(v, i, g)), null === u ? (c = v) : (u.sibling = v), (u = v));
        return Fa && eu(o, g), c;
      }
      for (m = n(o, m); !v.done; g++, v = s.next())
        null !== (v = p(m, o, g, v.value, l)) &&
          (e && null !== v.alternate && m.delete(null === v.key ? g : v.key),
          (i = a(v, i, g)),
          null === u ? (c = v) : (u.sibling = v),
          (u = v));
      return (
        e &&
          m.forEach(function (e) {
            return t(o, e);
          }),
        Fa && eu(o, g),
        c
      );
    }
    return function e(n, a, s, l) {
      if (
        ("object" == typeof s &&
          null !== s &&
          s.type === br &&
          null === s.key &&
          (s = s.props.children),
        "object" == typeof s && null !== s)
      ) {
        switch (s.$$typeof) {
          case fr:
            e: {
              for (var c = s.key, u = a; null !== u; ) {
                if (u.key === c) {
                  if ((c = s.type) === br) {
                    if (7 === u.tag) {
                      r(n, u.sibling),
                        ((a = o(u, s.props.children)).return = n),
                        (n = a);
                      break e;
                    }
                  } else if (
                    u.elementType === c ||
                    ("object" == typeof c &&
                      null !== c &&
                      c.$$typeof === Pr &&
                      Bu(c) === u.type)
                  ) {
                    r(n, u.sibling),
                      ((a = o(u, s.props)).ref = Ru(n, u, s)),
                      (a.return = n),
                      (n = a);
                    break e;
                  }
                  r(n, u);
                  break;
                }
                t(n, u), (u = u.sibling);
              }
              s.type === br
                ? (((a = up(s.props.children, n.mode, l, s.key)).return = n),
                  (n = a))
                : (((l = cp(s.type, s.key, s.props, null, n.mode, l)).ref = Ru(
                    n,
                    a,
                    s
                  )),
                  (l.return = n),
                  (n = l));
            }
            return i(n);
          case vr:
            e: {
              for (u = s.key; null !== a; ) {
                if (a.key === u) {
                  if (
                    4 === a.tag &&
                    a.stateNode.containerInfo === s.containerInfo &&
                    a.stateNode.implementation === s.implementation
                  ) {
                    r(n, a.sibling),
                      ((a = o(a, s.children || [])).return = n),
                      (n = a);
                    break e;
                  }
                  r(n, a);
                  break;
                }
                t(n, a), (a = a.sibling);
              }
              ((a = pp(s, n.mode, l)).return = n), (n = a);
            }
            return i(n);
          case Pr:
            return e(n, a, (u = s._init)(s._payload), l);
        }
        if (Mr(s)) return m(n, a, s, l);
        if (Ts(s)) return g(n, a, s, l);
        Lu(n, s);
      }
      return ("string" == typeof s && "" !== s) || "number" == typeof s
        ? ((s = "" + s),
          null !== a && 6 === a.tag
            ? (r(n, a.sibling), ((a = o(a, s)).return = n), (n = a))
            : (r(n, a), ((a = hp(s, n.mode, l)).return = n), (n = a)),
          i(n))
        : r(n, a);
    };
  }
  function $u(e) {
    if (e === qa) throw Error(ks(174));
    return e;
  }
  function Nu(e, t) {
    switch ((jc(Qa, t), jc(Ya, e), jc(Za, qa), (e = t.nodeType))) {
      case 9:
      case 11:
        t = (t = t.documentElement) ? t.namespaceURI : Ks(null, "");
        break;
      default:
        t = Ks(
          (t = (e = 8 === e ? t.parentNode : t).namespaceURI || null),
          (e = e.tagName)
        );
    }
    zc(Za), jc(Za, t);
  }
  function Uu() {
    zc(Za), zc(Ya), zc(Qa);
  }
  function Hu(e) {
    $u(Qa.current);
    var t = $u(Za.current),
      r = Ks(t, e.type);
    t !== r && (jc(Ya, e), jc(Za, r));
  }
  function zu(e) {
    Ya.current === e && (zc(Za), zc(Ya));
  }
  function ju(e) {
    for (var t = e; null !== t; ) {
      if (13 === t.tag) {
        var r = t.memoizedState;
        if (
          null !== r &&
          (null === (r = r.dehydrated) || "$?" === r.data || "$!" === r.data)
        )
          return t;
      } else if (19 === t.tag && void 0 !== t.memoizedProps.revealOrder) {
        if (0 != (128 & t.flags)) return t;
      } else if (null !== t.child) {
        (t.child.return = t), (t = t.child);
        continue;
      }
      if (t === e) break;
      for (; null === t.sibling; ) {
        if (null === t.return || t.return === e) return null;
        t = t.return;
      }
      (t.sibling.return = t.return), (t = t.sibling);
    }
    return null;
  }
  function Wu() {
    for (var e = 0; e < Xa.length; e++)
      Xa[e]._workInProgressVersionPrimary = null;
    Xa.length = 0;
  }
  function Vu() {
    throw Error(ks(321));
  }
  function qu(e, t) {
    if (null === t) return !1;
    for (var r = 0; r < t.length && r < e.length; r++)
      if (!Do(e[r], t[r])) return !1;
    return !0;
  }
  function Zu(e, t, r, n, o, a) {
    if (
      ((ti = a),
      (ri = t),
      (t.memoizedState = null),
      (t.updateQueue = null),
      (t.lanes = 0),
      (Ja.current = null === e || null === e.memoizedState ? ui : di),
      (e = r(n, o)),
      ii)
    ) {
      a = 0;
      do {
        if (((ii = !1), (si = 0), 25 <= a)) throw Error(ks(301));
        (a += 1),
          (oi = ni = null),
          (t.updateQueue = null),
          (Ja.current = hi),
          (e = r(n, o));
      } while (ii);
    }
    if (
      ((Ja.current = ci),
      (t = null !== ni && null !== ni.next),
      (ti = 0),
      (oi = ni = ri = null),
      (ai = !1),
      t)
    )
      throw Error(ks(300));
    return e;
  }
  function Yu() {
    var e = 0 !== si;
    return (si = 0), e;
  }
  function Qu() {
    var e = {
      memoizedState: null,
      baseState: null,
      baseQueue: null,
      queue: null,
      next: null,
    };
    return null === oi ? (ri.memoizedState = oi = e) : (oi = oi.next = e), oi;
  }
  function Ku() {
    if (null === ni) {
      var e = ri.alternate;
      e = null !== e ? e.memoizedState : null;
    } else e = ni.next;
    var t = null === oi ? ri.memoizedState : oi.next;
    if (null !== t) (oi = t), (ni = e);
    else {
      if (null === e) throw Error(ks(310));
      (e = {
        memoizedState: (ni = e).memoizedState,
        baseState: ni.baseState,
        baseQueue: ni.baseQueue,
        queue: ni.queue,
        next: null,
      }),
        null === oi ? (ri.memoizedState = oi = e) : (oi = oi.next = e);
    }
    return oi;
  }
  function Xu(e, t) {
    return "function" == typeof t ? t(e) : t;
  }
  function Ju(e) {
    var t = Ku(),
      r = t.queue;
    if (null === r) throw Error(ks(311));
    r.lastRenderedReducer = e;
    var n = ni,
      o = n.baseQueue,
      a = r.pending;
    if (null !== a) {
      if (null !== o) {
        var i = o.next;
        (o.next = a.next), (a.next = i);
      }
      (n.baseQueue = o = a), (r.pending = null);
    }
    if (null !== o) {
      (a = o.next), (n = n.baseState);
      var s = (i = null),
        l = null,
        c = a;
      do {
        var u = c.lane;
        if ((ti & u) === u)
          null !== l &&
            (l = l.next =
              {
                lane: 0,
                action: c.action,
                hasEagerState: c.hasEagerState,
                eagerState: c.eagerState,
                next: null,
              }),
            (n = c.hasEagerState ? c.eagerState : e(n, c.action));
        else {
          var d = {
            lane: u,
            action: c.action,
            hasEagerState: c.hasEagerState,
            eagerState: c.eagerState,
            next: null,
          };
          null === l ? ((s = l = d), (i = n)) : (l = l.next = d),
            (ri.lanes |= u),
            (Ni |= u);
        }
        c = c.next;
      } while (null !== c && c !== a);
      null === l ? (i = n) : (l.next = s),
        Do(n, t.memoizedState) || (gi = !0),
        (t.memoizedState = n),
        (t.baseState = i),
        (t.baseQueue = l),
        (r.lastRenderedState = n);
    }
    if (null !== (e = r.interleaved)) {
      o = e;
      do {
        (a = o.lane), (ri.lanes |= a), (Ni |= a), (o = o.next);
      } while (o !== e);
    } else null === o && (r.lanes = 0);
    return [t.memoizedState, r.dispatch];
  }
  function ed(e) {
    var t = Ku(),
      r = t.queue;
    if (null === r) throw Error(ks(311));
    r.lastRenderedReducer = e;
    var n = r.dispatch,
      o = r.pending,
      a = t.memoizedState;
    if (null !== o) {
      r.pending = null;
      var i = (o = o.next);
      do {
        (a = e(a, i.action)), (i = i.next);
      } while (i !== o);
      Do(a, t.memoizedState) || (gi = !0),
        (t.memoizedState = a),
        null === t.baseQueue && (t.baseState = a),
        (r.lastRenderedState = a);
    }
    return [a, n];
  }
  function td() {}
  function rd(e, t) {
    var r = ri,
      n = Ku(),
      o = t(),
      a = !Do(n.memoizedState, o);
    if (
      (a && ((n.memoizedState = o), (gi = !0)),
      (n = n.queue),
      md(ad.bind(null, r, n, e), [e]),
      n.getSnapshot !== t || a || (null !== oi && 1 & oi.memoizedState.tag))
    ) {
      if (
        ((r.flags |= 2048),
        cd(9, od.bind(null, r, n, o, t), void 0, null),
        null === Mi)
      )
        throw Error(ks(349));
      0 != (30 & ti) || nd(r, t, o);
    }
    return o;
  }
  function nd(e, t, r) {
    (e.flags |= 16384),
      (e = { getSnapshot: t, value: r }),
      null === (t = ri.updateQueue)
        ? ((t = { lastEffect: null, stores: null }),
          (ri.updateQueue = t),
          (t.stores = [e]))
        : null === (r = t.stores)
        ? (t.stores = [e])
        : r.push(e);
  }
  function od(e, t, r, n) {
    (t.value = r), (t.getSnapshot = n), id(t) && sd(e);
  }
  function ad(e, t, r) {
    return r(function () {
      id(t) && sd(e);
    });
  }
  function id(e) {
    var t = e.getSnapshot;
    e = e.value;
    try {
      var r = t();
      return !Do(e, r);
    } catch (e) {
      return !0;
    }
  }
  function sd(e) {
    var t = Cu(e, 1);
    null !== t && Dh(t, e, 1, -1);
  }
  function ld(e) {
    var t = Qu();
    return (
      "function" == typeof e && (e = e()),
      (t.memoizedState = t.baseState = e),
      (e = {
        pending: null,
        interleaved: null,
        lanes: 0,
        dispatch: null,
        lastRenderedReducer: Xu,
        lastRenderedState: e,
      }),
      (t.queue = e),
      (e = e.dispatch = xd.bind(null, ri, e)),
      [t.memoizedState, e]
    );
  }
  function cd(e, t, r, n) {
    return (
      (e = { tag: e, create: t, destroy: r, deps: n, next: null }),
      null === (t = ri.updateQueue)
        ? ((t = { lastEffect: null, stores: null }),
          (ri.updateQueue = t),
          (t.lastEffect = e.next = e))
        : null === (r = t.lastEffect)
        ? (t.lastEffect = e.next = e)
        : ((n = r.next), (r.next = e), (e.next = n), (t.lastEffect = e)),
      e
    );
  }
  function ud() {
    return Ku().memoizedState;
  }
  function dd(e, t, r, n) {
    var o = Qu();
    (ri.flags |= e),
      (o.memoizedState = cd(1 | t, r, void 0, void 0 === n ? null : n));
  }
  function hd(e, t, r, n) {
    var o = Ku();
    n = void 0 === n ? null : n;
    var a = void 0;
    if (null !== ni) {
      var i = ni.memoizedState;
      if (((a = i.destroy), null !== n && qu(n, i.deps)))
        return void (o.memoizedState = cd(t, r, a, n));
    }
    (ri.flags |= e), (o.memoizedState = cd(1 | t, r, a, n));
  }
  function pd(e, t) {
    return dd(8390656, 8, e, t);
  }
  function md(e, t) {
    return hd(2048, 8, e, t);
  }
  function gd(e, t) {
    return hd(4, 2, e, t);
  }
  function fd(e, t) {
    return hd(4, 4, e, t);
  }
  function vd(e, t) {
    return "function" == typeof t
      ? ((e = e()),
        t(e),
        function () {
          t(null);
        })
      : null != t
      ? ((e = e()),
        (t.current = e),
        function () {
          t.current = null;
        })
      : void 0;
  }
  function bd(e, t, r) {
    return (
      (r = null != r ? r.concat([e]) : null), hd(4, 4, vd.bind(null, t, e), r)
    );
  }
  function yd() {}
  function wd(e, t) {
    var r = Ku();
    t = void 0 === t ? null : t;
    var n = r.memoizedState;
    return null !== n && null !== t && qu(t, n[1])
      ? n[0]
      : ((r.memoizedState = [e, t]), e);
  }
  function Cd(e, t) {
    var r = Ku();
    t = void 0 === t ? null : t;
    var n = r.memoizedState;
    return null !== n && null !== t && qu(t, n[1])
      ? n[0]
      : ((e = e()), (r.memoizedState = [e, t]), e);
  }
  function kd(e, t, r) {
    return 0 == (21 & ti)
      ? (e.baseState && ((e.baseState = !1), (gi = !0)), (e.memoizedState = r))
      : (Do(r, t) ||
          ((r = Sl()), (ri.lanes |= r), (Ni |= r), (e.baseState = !0)),
        t);
  }
  function Sd(e, t) {
    var r = fn;
    (fn = 0 !== r && 4 > r ? r : 4), e(!0);
    var n = ei.transition;
    ei.transition = {};
    try {
      e(!1), t();
    } finally {
      (fn = r), (ei.transition = n);
    }
  }
  function Ed() {
    return Ku().memoizedState;
  }
  function _d(e, t, r) {
    var n = Gh(e);
    if (
      ((r = {
        lane: n,
        action: r,
        hasEagerState: !1,
        eagerState: null,
        next: null,
      }),
      Pd(e))
    )
      Td(t, r);
    else if (null !== (r = wu(e, t, r, n))) {
      Dh(r, e, n, Ih()), Id(r, t, n);
    }
  }
  function xd(e, t, r) {
    var n = Gh(e),
      o = {
        lane: n,
        action: r,
        hasEagerState: !1,
        eagerState: null,
        next: null,
      };
    if (Pd(e)) Td(t, o);
    else {
      var a = e.alternate;
      if (
        0 === e.lanes &&
        (null === a || 0 === a.lanes) &&
        null !== (a = t.lastRenderedReducer)
      )
        try {
          var i = t.lastRenderedState,
            s = a(i, r);
          if (((o.hasEagerState = !0), (o.eagerState = s), Do(s, i))) {
            var l = t.interleaved;
            return (
              null === l
                ? ((o.next = o), yu(t))
                : ((o.next = l.next), (l.next = o)),
              void (t.interleaved = o)
            );
          }
        } catch (e) {}
      null !== (r = wu(e, t, o, n)) && (Dh(r, e, n, (o = Ih())), Id(r, t, n));
    }
  }
  function Pd(e) {
    var t = e.alternate;
    return e === ri || (null !== t && t === ri);
  }
  function Td(e, t) {
    ii = ai = !0;
    var r = e.pending;
    null === r ? (t.next = t) : ((t.next = r.next), (r.next = t)),
      (e.pending = t);
  }
  function Id(e, t, r) {
    if (0 != (4194240 & r)) {
      var n = t.lanes;
      (r |= n &= e.pendingLanes), (t.lanes = r), xl(e, r);
    }
  }
  function Gd(e, t) {
    try {
      var r = "",
        n = t;
      do {
        (r += Ds(n)), (n = n.return);
      } while (n);
      var o = r;
    } catch (e) {
      o = "\nError generating stack: " + e.message + "\n" + e.stack;
    }
    return { value: e, source: t, stack: o, digest: null };
  }
  function Dd(e, t, r) {
    return {
      value: e,
      source: null,
      stack: null != r ? r : null,
      digest: null != t ? t : null,
    };
  }
  function Ad(e, t) {
    try {
      console.error(t.value);
    } catch (e) {
      setTimeout(function () {
        throw e;
      });
    }
  }
  function Md(e, t, r) {
    ((r = Eu(-1, r)).tag = 3), (r.payload = { element: null });
    var n = t.value;
    return (
      (r.callback = function () {
        Zi || ((Zi = !0), (Yi = n)), Ad(0, t);
      }),
      r
    );
  }
  function Fd(e, t, r) {
    (r = Eu(-1, r)).tag = 3;
    var n = e.type.getDerivedStateFromError;
    if ("function" == typeof n) {
      var o = t.value;
      (r.payload = function () {
        return n(o);
      }),
        (r.callback = function () {
          Ad(0, t);
        });
    }
    var a = e.stateNode;
    return (
      null !== a &&
        "function" == typeof a.componentDidCatch &&
        (r.callback = function () {
          Ad(0, t),
            "function" != typeof n &&
              (null === Qi ? (Qi = new Set([this])) : Qi.add(this));
          var e = t.stack;
          this.componentDidCatch(t.value, {
            componentStack: null !== e ? e : "",
          });
        }),
      r
    );
  }
  function Rd(e, t, r) {
    var n = e.pingCache;
    if (null === n) {
      n = e.pingCache = new pi();
      var o = new Set();
      n.set(t, o);
    } else void 0 === (o = n.get(t)) && ((o = new Set()), n.set(t, o));
    o.has(r) || (o.add(r), (e = ep.bind(null, e, t, r)), t.then(e, e));
  }
  function Ld(e) {
    do {
      var t;
      if (
        ((t = 13 === e.tag) &&
          (t = null === (t = e.memoizedState) || null !== t.dehydrated),
        t)
      )
        return e;
      e = e.return;
    } while (null !== e);
    return null;
  }
  function Bd(e, t, r, n, o) {
    return 0 == (1 & e.mode)
      ? (e === t
          ? (e.flags |= 65536)
          : ((e.flags |= 128),
            (r.flags |= 131072),
            (r.flags &= -52805),
            1 === r.tag &&
              (null === r.alternate
                ? (r.tag = 17)
                : (((t = Eu(-1, 1)).tag = 2), _u(r, t, 1))),
            (r.lanes |= 1)),
        e)
      : ((e.flags |= 65536), (e.lanes = o), e);
  }
  function Od(e, t, r, n) {
    t.child = null === e ? Va(t, null, r, n) : Wa(t, e.child, r, n);
  }
  function $d(e, t, r, n, o) {
    r = r.render;
    var a = t.ref;
    return (
      vu(t, o),
      (n = Zu(e, t, r, n, a, o)),
      (r = Yu()),
      null === e || gi
        ? (Fa && r && ru(t), (t.flags |= 1), Od(e, t, n, o), t.child)
        : ((t.updateQueue = e.updateQueue),
          (t.flags &= -2053),
          (e.lanes &= ~o),
          nh(e, t, o))
    );
  }
  function Nd(e, t, r, n, o) {
    if (null === e) {
      var a = r.type;
      return "function" != typeof a ||
        sp(a) ||
        void 0 !== a.defaultProps ||
        null !== r.compare ||
        void 0 !== r.defaultProps
        ? (((e = cp(r.type, null, n, t, t.mode, o)).ref = t.ref),
          (e.return = t),
          (t.child = e))
        : ((t.tag = 15), (t.type = a), Ud(e, t, a, n, o));
    }
    if (((a = e.child), 0 == (e.lanes & o))) {
      var i = a.memoizedProps;
      if ((r = null !== (r = r.compare) ? r : lc)(i, n) && e.ref === t.ref)
        return nh(e, t, o);
    }
    return (
      (t.flags |= 1),
      ((e = lp(a, n)).ref = t.ref),
      (e.return = t),
      (t.child = e)
    );
  }
  function Ud(e, t, r, n, o) {
    if (null !== e) {
      var a = e.memoizedProps;
      if (lc(a, n) && e.ref === t.ref) {
        if (((gi = !1), (t.pendingProps = n = a), 0 == (e.lanes & o)))
          return (t.lanes = e.lanes), nh(e, t, o);
        0 != (131072 & e.flags) && (gi = !0);
      }
    }
    return jd(e, t, r, n, o);
  }
  function Hd(e, t, r) {
    var n = t.pendingProps,
      o = n.children,
      a = null !== e ? e.memoizedState : null;
    if ("hidden" === n.mode)
      if (0 == (1 & t.mode))
        (t.memoizedState = {
          baseLanes: 0,
          cachePool: null,
          transitions: null,
        }),
          jc(Bi, Li),
          (Li |= r);
      else {
        if (0 == (1073741824 & r))
          return (
            (e = null !== a ? a.baseLanes | r : r),
            (t.lanes = t.childLanes = 1073741824),
            (t.memoizedState = {
              baseLanes: e,
              cachePool: null,
              transitions: null,
            }),
            (t.updateQueue = null),
            jc(Bi, Li),
            (Li |= e),
            null
          );
        (t.memoizedState = {
          baseLanes: 0,
          cachePool: null,
          transitions: null,
        }),
          (n = null !== a ? a.baseLanes : r),
          jc(Bi, Li),
          (Li |= n);
      }
    else
      null !== a ? ((n = a.baseLanes | r), (t.memoizedState = null)) : (n = r),
        jc(Bi, Li),
        (Li |= n);
    return Od(e, t, o, r), t.child;
  }
  function zd(e, t) {
    var r = t.ref;
    ((null === e && null !== r) || (null !== e && e.ref !== r)) &&
      ((t.flags |= 512), (t.flags |= 2097152));
  }
  function jd(e, t, r, n, o) {
    var a = Vc(r) ? ya : va.current;
    return (
      (a = Wc(t, a)),
      vu(t, o),
      (r = Zu(e, t, r, n, a, o)),
      (n = Yu()),
      null === e || gi
        ? (Fa && n && ru(t), (t.flags |= 1), Od(e, t, r, o), t.child)
        : ((t.updateQueue = e.updateQueue),
          (t.flags &= -2053),
          (e.lanes &= ~o),
          nh(e, t, o))
    );
  }
  function Wd(e, t, r, n, o) {
    if (Vc(r)) {
      var a = !0;
      Qc(t);
    } else a = !1;
    if ((vu(t, o), null === t.stateNode))
      rh(e, t), Au(t, r, n), Fu(t, r, n, o), (n = !0);
    else if (null === e) {
      var i = t.stateNode,
        s = t.memoizedProps;
      i.props = s;
      var l = i.context,
        c = r.contextType;
      "object" == typeof c && null !== c
        ? (c = bu(c))
        : (c = Wc(t, (c = Vc(r) ? ya : va.current)));
      var u = r.getDerivedStateFromProps,
        d =
          "function" == typeof u ||
          "function" == typeof i.getSnapshotBeforeUpdate;
      d ||
        ("function" != typeof i.UNSAFE_componentWillReceiveProps &&
          "function" != typeof i.componentWillReceiveProps) ||
        ((s !== n || l !== c) && Mu(t, i, n, c)),
        (Ha = !1);
      var h = t.memoizedState;
      (i.state = h),
        Tu(t, n, i, o),
        (l = t.memoizedState),
        s !== n || h !== l || ba.current || Ha
          ? ("function" == typeof u && (Gu(t, r, u, n), (l = t.memoizedState)),
            (s = Ha || Du(t, r, s, n, h, l, c))
              ? (d ||
                  ("function" != typeof i.UNSAFE_componentWillMount &&
                    "function" != typeof i.componentWillMount) ||
                  ("function" == typeof i.componentWillMount &&
                    i.componentWillMount(),
                  "function" == typeof i.UNSAFE_componentWillMount &&
                    i.UNSAFE_componentWillMount()),
                "function" == typeof i.componentDidMount &&
                  (t.flags |= 4194308))
              : ("function" == typeof i.componentDidMount &&
                  (t.flags |= 4194308),
                (t.memoizedProps = n),
                (t.memoizedState = l)),
            (i.props = n),
            (i.state = l),
            (i.context = c),
            (n = s))
          : ("function" == typeof i.componentDidMount && (t.flags |= 4194308),
            (n = !1));
    } else {
      (i = t.stateNode),
        Su(e, t),
        (s = t.memoizedProps),
        (c = t.type === t.elementType ? s : pu(t.type, s)),
        (i.props = c),
        (d = t.pendingProps),
        (h = i.context),
        "object" == typeof (l = r.contextType) && null !== l
          ? (l = bu(l))
          : (l = Wc(t, (l = Vc(r) ? ya : va.current)));
      var p = r.getDerivedStateFromProps;
      (u =
        "function" == typeof p ||
        "function" == typeof i.getSnapshotBeforeUpdate) ||
        ("function" != typeof i.UNSAFE_componentWillReceiveProps &&
          "function" != typeof i.componentWillReceiveProps) ||
        ((s !== d || h !== l) && Mu(t, i, n, l)),
        (Ha = !1),
        (h = t.memoizedState),
        (i.state = h),
        Tu(t, n, i, o);
      var m = t.memoizedState;
      s !== d || h !== m || ba.current || Ha
        ? ("function" == typeof p && (Gu(t, r, p, n), (m = t.memoizedState)),
          (c = Ha || Du(t, r, c, n, h, m, l) || !1)
            ? (u ||
                ("function" != typeof i.UNSAFE_componentWillUpdate &&
                  "function" != typeof i.componentWillUpdate) ||
                ("function" == typeof i.componentWillUpdate &&
                  i.componentWillUpdate(n, m, l),
                "function" == typeof i.UNSAFE_componentWillUpdate &&
                  i.UNSAFE_componentWillUpdate(n, m, l)),
              "function" == typeof i.componentDidUpdate && (t.flags |= 4),
              "function" == typeof i.getSnapshotBeforeUpdate &&
                (t.flags |= 1024))
            : ("function" != typeof i.componentDidUpdate ||
                (s === e.memoizedProps && h === e.memoizedState) ||
                (t.flags |= 4),
              "function" != typeof i.getSnapshotBeforeUpdate ||
                (s === e.memoizedProps && h === e.memoizedState) ||
                (t.flags |= 1024),
              (t.memoizedProps = n),
              (t.memoizedState = m)),
          (i.props = n),
          (i.state = m),
          (i.context = l),
          (n = c))
        : ("function" != typeof i.componentDidUpdate ||
            (s === e.memoizedProps && h === e.memoizedState) ||
            (t.flags |= 4),
          "function" != typeof i.getSnapshotBeforeUpdate ||
            (s === e.memoizedProps && h === e.memoizedState) ||
            (t.flags |= 1024),
          (n = !1));
    }
    return Vd(e, t, r, n, a, o);
  }
  function Vd(e, t, r, n, o, a) {
    zd(e, t);
    var i = 0 != (128 & t.flags);
    if (!n && !i) return o && Kc(t, r, !1), nh(e, t, a);
    (n = t.stateNode), (mi.current = t);
    var s =
      i && "function" != typeof r.getDerivedStateFromError ? null : n.render();
    return (
      (t.flags |= 1),
      null !== e && i
        ? ((t.child = Wa(t, e.child, null, a)), (t.child = Wa(t, null, s, a)))
        : Od(e, t, s, a),
      (t.memoizedState = n.state),
      o && Kc(t, r, !0),
      t.child
    );
  }
  function qd(e) {
    var t = e.stateNode;
    t.pendingContext
      ? Zc(0, t.pendingContext, t.pendingContext !== t.context)
      : t.context && Zc(0, t.context, !1),
      Nu(e, t.containerInfo);
  }
  function Zd(e, t, r, n, o) {
    return du(), hu(o), (t.flags |= 256), Od(e, t, r, n), t.child;
  }
  function Yd(e) {
    return { baseLanes: e, cachePool: null, transitions: null };
  }
  function Qd(e, t, r) {
    var n,
      o = t.pendingProps,
      a = Ka.current,
      i = !1,
      s = 0 != (128 & t.flags);
    if (
      ((n = s) ||
        (n = (null === e || null !== e.memoizedState) && 0 != (2 & a)),
      n
        ? ((i = !0), (t.flags &= -129))
        : (null !== e && null === e.memoizedState) || (a |= 1),
      jc(Ka, 1 & a),
      null === e)
    )
      return (
        su(t),
        null !== (e = t.memoizedState) && null !== (e = e.dehydrated)
          ? (0 == (1 & t.mode)
              ? (t.lanes = 1)
              : "$!" === e.data
              ? (t.lanes = 8)
              : (t.lanes = 1073741824),
            null)
          : ((s = o.children),
            (e = o.fallback),
            i
              ? ((o = t.mode),
                (i = t.child),
                (s = { mode: "hidden", children: s }),
                0 == (1 & o) && null !== i
                  ? ((i.childLanes = 0), (i.pendingProps = s))
                  : (i = dp(s, o, 0, null)),
                (e = up(e, o, r, null)),
                (i.return = t),
                (e.return = t),
                (i.sibling = e),
                (t.child = i),
                (t.child.memoizedState = Yd(r)),
                (t.memoizedState = fi),
                e)
              : Kd(t, s))
      );
    if (null !== (a = e.memoizedState) && null !== (n = a.dehydrated))
      return (function (e, t, r, n, o, a, i) {
        if (r)
          return 256 & t.flags
            ? ((t.flags &= -257), Xd(e, t, i, (n = Dd(Error(ks(422))))))
            : null !== t.memoizedState
            ? ((t.child = e.child), (t.flags |= 128), null)
            : ((a = n.fallback),
              (o = t.mode),
              (n = dp({ mode: "visible", children: n.children }, o, 0, null)),
              ((a = up(a, o, i, null)).flags |= 2),
              (n.return = t),
              (a.return = t),
              (n.sibling = a),
              (t.child = n),
              0 != (1 & t.mode) && Wa(t, e.child, null, i),
              (t.child.memoizedState = Yd(i)),
              (t.memoizedState = fi),
              a);
        if (0 == (1 & t.mode)) return Xd(e, t, i, null);
        if ("$!" === o.data) {
          if ((n = o.nextSibling && o.nextSibling.dataset)) var s = n.dgst;
          return (
            (n = s), Xd(e, t, i, (n = Dd((a = Error(ks(419))), n, void 0)))
          );
        }
        if (((s = 0 != (i & e.childLanes)), gi || s)) {
          if (null !== (n = Mi)) {
            switch (i & -i) {
              case 4:
                o = 2;
                break;
              case 16:
                o = 8;
                break;
              case 64:
              case 128:
              case 256:
              case 512:
              case 1024:
              case 2048:
              case 4096:
              case 8192:
              case 16384:
              case 32768:
              case 65536:
              case 131072:
              case 262144:
              case 524288:
              case 1048576:
              case 2097152:
              case 4194304:
              case 8388608:
              case 16777216:
              case 33554432:
              case 67108864:
                o = 32;
                break;
              case 536870912:
                o = 268435456;
                break;
              default:
                o = 0;
            }
            0 !== (o = 0 != (o & (n.suspendedLanes | i)) ? 0 : o) &&
              o !== a.retryLane &&
              ((a.retryLane = o), Cu(e, o), Dh(n, e, o, -1));
          }
          return jh(), Xd(e, t, i, (n = Dd(Error(ks(421)))));
        }
        return "$?" === o.data
          ? ((t.flags |= 128),
            (t.child = e.child),
            (t = rp.bind(null, e)),
            (o._reactRetry = t),
            null)
          : ((e = a.treeContext),
            (Ma = Lc(o.nextSibling)),
            (Aa = t),
            (Fa = !0),
            (Ra = null),
            null !== e &&
              ((Pa[Ta++] = Ga),
              (Pa[Ta++] = Da),
              (Pa[Ta++] = Ia),
              (Ga = e.id),
              (Da = e.overflow),
              (Ia = t)),
            ((t = Kd(t, n.children)).flags |= 4096),
            t);
      })(e, t, s, o, n, a, r);
    if (i) {
      (i = o.fallback), (s = t.mode), (n = (a = e.child).sibling);
      var l = { mode: "hidden", children: o.children };
      return (
        0 == (1 & s) && t.child !== a
          ? (((o = t.child).childLanes = 0),
            (o.pendingProps = l),
            (t.deletions = null))
          : ((o = lp(a, l)).subtreeFlags = 14680064 & a.subtreeFlags),
        null !== n ? (i = lp(n, i)) : ((i = up(i, s, r, null)).flags |= 2),
        (i.return = t),
        (o.return = t),
        (o.sibling = i),
        (t.child = o),
        (o = i),
        (i = t.child),
        (s =
          null === (s = e.child.memoizedState)
            ? Yd(r)
            : {
                baseLanes: s.baseLanes | r,
                cachePool: null,
                transitions: s.transitions,
              }),
        (i.memoizedState = s),
        (i.childLanes = e.childLanes & ~r),
        (t.memoizedState = fi),
        o
      );
    }
    return (
      (e = (i = e.child).sibling),
      (o = lp(i, { mode: "visible", children: o.children })),
      0 == (1 & t.mode) && (o.lanes = r),
      (o.return = t),
      (o.sibling = null),
      null !== e &&
        (null === (r = t.deletions)
          ? ((t.deletions = [e]), (t.flags |= 16))
          : r.push(e)),
      (t.child = o),
      (t.memoizedState = null),
      o
    );
  }
  function Kd(e, t) {
    return (
      ((t = dp({ mode: "visible", children: t }, e.mode, 0, null)).return = e),
      (e.child = t)
    );
  }
  function Xd(e, t, r, n) {
    return (
      null !== n && hu(n),
      Wa(t, e.child, null, r),
      ((e = Kd(t, t.pendingProps.children)).flags |= 2),
      (t.memoizedState = null),
      e
    );
  }
  function Jd(e, t, r) {
    e.lanes |= t;
    var n = e.alternate;
    null !== n && (n.lanes |= t), fu(e.return, t, r);
  }
  function eh(e, t, r, n, o) {
    var a = e.memoizedState;
    null === a
      ? (e.memoizedState = {
          isBackwards: t,
          rendering: null,
          renderingStartTime: 0,
          last: n,
          tail: r,
          tailMode: o,
        })
      : ((a.isBackwards = t),
        (a.rendering = null),
        (a.renderingStartTime = 0),
        (a.last = n),
        (a.tail = r),
        (a.tailMode = o));
  }
  function th(e, t, r) {
    var n = t.pendingProps,
      o = n.revealOrder,
      a = n.tail;
    if ((Od(e, t, n.children, r), 0 != (2 & (n = Ka.current))))
      (n = (1 & n) | 2), (t.flags |= 128);
    else {
      if (null !== e && 0 != (128 & e.flags))
        e: for (e = t.child; null !== e; ) {
          if (13 === e.tag) null !== e.memoizedState && Jd(e, r, t);
          else if (19 === e.tag) Jd(e, r, t);
          else if (null !== e.child) {
            (e.child.return = e), (e = e.child);
            continue;
          }
          if (e === t) break e;
          for (; null === e.sibling; ) {
            if (null === e.return || e.return === t) break e;
            e = e.return;
          }
          (e.sibling.return = e.return), (e = e.sibling);
        }
      n &= 1;
    }
    if ((jc(Ka, n), 0 == (1 & t.mode))) t.memoizedState = null;
    else
      switch (o) {
        case "forwards":
          for (r = t.child, o = null; null !== r; )
            null !== (e = r.alternate) && null === ju(e) && (o = r),
              (r = r.sibling);
          null === (r = o)
            ? ((o = t.child), (t.child = null))
            : ((o = r.sibling), (r.sibling = null)),
            eh(t, !1, o, r, a);
          break;
        case "backwards":
          for (r = null, o = t.child, t.child = null; null !== o; ) {
            if (null !== (e = o.alternate) && null === ju(e)) {
              t.child = o;
              break;
            }
            (e = o.sibling), (o.sibling = r), (r = o), (o = e);
          }
          eh(t, !0, r, null, a);
          break;
        case "together":
          eh(t, !1, null, null, void 0);
          break;
        default:
          t.memoizedState = null;
      }
    return t.child;
  }
  function rh(e, t) {
    0 == (1 & t.mode) &&
      null !== e &&
      ((e.alternate = null), (t.alternate = null), (t.flags |= 2));
  }
  function nh(e, t, r) {
    if (
      (null !== e && (t.dependencies = e.dependencies),
      (Ni |= t.lanes),
      0 == (r & t.childLanes))
    )
      return null;
    if (null !== e && t.child !== e.child) throw Error(ks(153));
    if (null !== t.child) {
      for (
        r = lp((e = t.child), e.pendingProps), t.child = r, r.return = t;
        null !== e.sibling;

      )
        (e = e.sibling), ((r = r.sibling = lp(e, e.pendingProps)).return = t);
      r.sibling = null;
    }
    return t.child;
  }
  function oh(e, t) {
    if (!Fa)
      switch (e.tailMode) {
        case "hidden":
          t = e.tail;
          for (var r = null; null !== t; )
            null !== t.alternate && (r = t), (t = t.sibling);
          null === r ? (e.tail = null) : (r.sibling = null);
          break;
        case "collapsed":
          r = e.tail;
          for (var n = null; null !== r; )
            null !== r.alternate && (n = r), (r = r.sibling);
          null === n
            ? t || null === e.tail
              ? (e.tail = null)
              : (e.tail.sibling = null)
            : (n.sibling = null);
      }
  }
  function ah(e) {
    var t = null !== e.alternate && e.alternate.child === e.child,
      r = 0,
      n = 0;
    if (t)
      for (var o = e.child; null !== o; )
        (r |= o.lanes | o.childLanes),
          (n |= 14680064 & o.subtreeFlags),
          (n |= 14680064 & o.flags),
          (o.return = e),
          (o = o.sibling);
    else
      for (o = e.child; null !== o; )
        (r |= o.lanes | o.childLanes),
          (n |= o.subtreeFlags),
          (n |= o.flags),
          (o.return = e),
          (o = o.sibling);
    return (e.subtreeFlags |= n), (e.childLanes = r), t;
  }
  function ih(e, t, r) {
    var n = t.pendingProps;
    switch ((nu(t), t.tag)) {
      case 2:
      case 16:
      case 15:
      case 0:
      case 11:
      case 7:
      case 8:
      case 12:
      case 9:
      case 14:
        return ah(t), null;
      case 1:
        return Vc(t.type) && qc(), ah(t), null;
      case 3:
        return (
          (n = t.stateNode),
          Uu(),
          zc(ba),
          zc(va),
          Wu(),
          n.pendingContext &&
            ((n.context = n.pendingContext), (n.pendingContext = null)),
          (null !== e && null !== e.child) ||
            (cu(t)
              ? (t.flags |= 4)
              : null === e ||
                (e.memoizedState.isDehydrated && 0 == (256 & t.flags)) ||
                ((t.flags |= 1024), null !== Ra && (Rh(Ra), (Ra = null)))),
          bi(e, t),
          ah(t),
          null
        );
      case 5:
        zu(t);
        var o = $u(Qa.current);
        if (((r = t.type), null !== e && null != t.stateNode))
          yi(e, t, r, n, o),
            e.ref !== t.ref && ((t.flags |= 512), (t.flags |= 2097152));
        else {
          if (!n) {
            if (null === t.stateNode) throw Error(ks(166));
            return ah(t), null;
          }
          if (((e = $u(Za.current)), cu(t))) {
            (n = t.stateNode), (r = t.type);
            var a = t.memoizedProps;
            switch (((n[la] = t), (n[ca] = a), (e = 0 != (1 & t.mode)), r)) {
              case "dialog":
                Cc("cancel", n), Cc("close", n);
                break;
              case "iframe":
              case "object":
              case "embed":
                Cc("load", n);
                break;
              case "video":
              case "audio":
                for (o = 0; o < Qo.length; o++) Cc(Qo[o], n);
                break;
              case "source":
                Cc("error", n);
                break;
              case "img":
              case "image":
              case "link":
                Cc("error", n), Cc("load", n);
                break;
              case "details":
                Cc("toggle", n);
                break;
              case "input":
                Ns(n, a), Cc("invalid", n);
                break;
              case "select":
                (n._wrapperState = { wasMultiple: !!a.multiple }),
                  Cc("invalid", n);
                break;
              case "textarea":
                qs(n, a), Cc("invalid", n);
            }
            for (var i in (tl(r, a), (o = null), a))
              if (a.hasOwnProperty(i)) {
                var s = a[i];
                "children" === i
                  ? "string" == typeof s
                    ? n.textContent !== s &&
                      (!0 !== a.suppressHydrationWarning &&
                        Dc(n.textContent, s, e),
                      (o = ["children", s]))
                    : "number" == typeof s &&
                      n.textContent !== "" + s &&
                      (!0 !== a.suppressHydrationWarning &&
                        Dc(n.textContent, s, e),
                      (o = ["children", "" + s]))
                  : sr.hasOwnProperty(i) &&
                    null != s &&
                    "onScroll" === i &&
                    Cc("scroll", n);
              }
            switch (r) {
              case "input":
                Ls(n), zs(n, a, !0);
                break;
              case "textarea":
                Ls(n), Ys(n);
                break;
              case "select":
              case "option":
                break;
              default:
                "function" == typeof a.onClick && (n.onclick = Ac);
            }
            (n = o), (t.updateQueue = n), null !== n && (t.flags |= 4);
          } else {
            (i = 9 === o.nodeType ? o : o.ownerDocument),
              "http://www.w3.org/1999/xhtml" === e && (e = Qs(r)),
              "http://www.w3.org/1999/xhtml" === e
                ? "script" === r
                  ? (((e = i.createElement("div")).innerHTML =
                      "<script></script>"),
                    (e = e.removeChild(e.firstChild)))
                  : "string" == typeof n.is
                  ? (e = i.createElement(r, { is: n.is }))
                  : ((e = i.createElement(r)),
                    "select" === r &&
                      ((i = e),
                      n.multiple
                        ? (i.multiple = !0)
                        : n.size && (i.size = n.size)))
                : (e = i.createElementNS(e, r)),
              (e[la] = t),
              (e[ca] = n),
              vi(e, t, !1, !1),
              (t.stateNode = e);
            e: {
              switch (((i = rl(r, n)), r)) {
                case "dialog":
                  Cc("cancel", e), Cc("close", e), (o = n);
                  break;
                case "iframe":
                case "object":
                case "embed":
                  Cc("load", e), (o = n);
                  break;
                case "video":
                case "audio":
                  for (o = 0; o < Qo.length; o++) Cc(Qo[o], e);
                  o = n;
                  break;
                case "source":
                  Cc("error", e), (o = n);
                  break;
                case "img":
                case "image":
                case "link":
                  Cc("error", e), Cc("load", e), (o = n);
                  break;
                case "details":
                  Cc("toggle", e), (o = n);
                  break;
                case "input":
                  Ns(e, n), (o = $s(e, n)), Cc("invalid", e);
                  break;
                case "option":
                  o = n;
                  break;
                case "select":
                  (e._wrapperState = { wasMultiple: !!n.multiple }),
                    (o = Gr({}, n, { value: void 0 })),
                    Cc("invalid", e);
                  break;
                case "textarea":
                  qs(e, n), (o = Vs(e, n)), Cc("invalid", e);
                  break;
                default:
                  o = n;
              }
              for (a in (tl(r, o), (s = o)))
                if (s.hasOwnProperty(a)) {
                  var l = s[a];
                  "style" === a
                    ? el(e, l)
                    : "dangerouslySetInnerHTML" === a
                    ? null != (l = l ? l.__html : void 0) && Rr(e, l)
                    : "children" === a
                    ? "string" == typeof l
                      ? ("textarea" !== r || "" !== l) && Xs(e, l)
                      : "number" == typeof l && Xs(e, "" + l)
                    : "suppressContentEditableWarning" !== a &&
                      "suppressHydrationWarning" !== a &&
                      "autoFocus" !== a &&
                      (sr.hasOwnProperty(a)
                        ? null != l && "onScroll" === a && Cc("scroll", e)
                        : null != l && Ps(e, a, l, i));
                }
              switch (r) {
                case "input":
                  Ls(e), zs(e, n, !1);
                  break;
                case "textarea":
                  Ls(e), Ys(e);
                  break;
                case "option":
                  null != n.value && e.setAttribute("value", "" + Fs(n.value));
                  break;
                case "select":
                  (e.multiple = !!n.multiple),
                    null != (a = n.value)
                      ? Ws(e, !!n.multiple, a, !1)
                      : null != n.defaultValue &&
                        Ws(e, !!n.multiple, n.defaultValue, !0);
                  break;
                default:
                  "function" == typeof o.onClick && (e.onclick = Ac);
              }
              switch (r) {
                case "button":
                case "input":
                case "select":
                case "textarea":
                  n = !!n.autoFocus;
                  break e;
                case "img":
                  n = !0;
                  break e;
                default:
                  n = !1;
              }
            }
            n && (t.flags |= 4);
          }
          null !== t.ref && ((t.flags |= 512), (t.flags |= 2097152));
        }
        return ah(t), null;
      case 6:
        if (e && null != t.stateNode) wi(e, t, e.memoizedProps, n);
        else {
          if ("string" != typeof n && null === t.stateNode)
            throw Error(ks(166));
          if (((r = $u(Qa.current)), $u(Za.current), cu(t))) {
            if (
              ((n = t.stateNode),
              (r = t.memoizedProps),
              (n[la] = t),
              (a = n.nodeValue !== r) && null !== (e = Aa))
            )
              switch (e.tag) {
                case 3:
                  Dc(n.nodeValue, r, 0 != (1 & e.mode));
                  break;
                case 5:
                  !0 !== e.memoizedProps.suppressHydrationWarning &&
                    Dc(n.nodeValue, r, 0 != (1 & e.mode));
              }
            a && (t.flags |= 4);
          } else
            ((n = (9 === r.nodeType ? r : r.ownerDocument).createTextNode(n))[
              la
            ] = t),
              (t.stateNode = n);
        }
        return ah(t), null;
      case 13:
        if (
          (zc(Ka),
          (n = t.memoizedState),
          null === e ||
            (null !== e.memoizedState && null !== e.memoizedState.dehydrated))
        ) {
          if (Fa && null !== Ma && 0 != (1 & t.mode) && 0 == (128 & t.flags))
            uu(), du(), (t.flags |= 98560), (a = !1);
          else if (((a = cu(t)), null !== n && null !== n.dehydrated)) {
            if (null === e) {
              if (!a) throw Error(ks(318));
              if (!(a = null !== (a = t.memoizedState) ? a.dehydrated : null))
                throw Error(ks(317));
              a[la] = t;
            } else
              du(),
                0 == (128 & t.flags) && (t.memoizedState = null),
                (t.flags |= 4);
            ah(t), (a = !1);
          } else null !== Ra && (Rh(Ra), (Ra = null)), (a = !0);
          if (!a) return 65536 & t.flags ? t : null;
        }
        return 0 != (128 & t.flags)
          ? ((t.lanes = r), t)
          : ((n = null !== n) !== (null !== e && null !== e.memoizedState) &&
              n &&
              ((t.child.flags |= 8192),
              0 != (1 & t.mode) &&
                (null === e || 0 != (1 & Ka.current)
                  ? 0 === Oi && (Oi = 3)
                  : jh())),
            null !== t.updateQueue && (t.flags |= 4),
            ah(t),
            null);
      case 4:
        return (
          Uu(),
          bi(e, t),
          null === e && Sc(t.stateNode.containerInfo),
          ah(t),
          null
        );
      case 10:
        return gu(t.type._context), ah(t), null;
      case 17:
        return Vc(t.type) && qc(), ah(t), null;
      case 19:
        if ((zc(Ka), null === (a = t.memoizedState))) return ah(t), null;
        if (((n = 0 != (128 & t.flags)), null === (i = a.rendering)))
          if (n) oh(a, !1);
          else {
            if (0 !== Oi || (null !== e && 0 != (128 & e.flags)))
              for (e = t.child; null !== e; ) {
                if (null !== (i = ju(e))) {
                  for (
                    t.flags |= 128,
                      oh(a, !1),
                      null !== (n = i.updateQueue) &&
                        ((t.updateQueue = n), (t.flags |= 4)),
                      t.subtreeFlags = 0,
                      n = r,
                      r = t.child;
                    null !== r;

                  )
                    (e = n),
                      ((a = r).flags &= 14680066),
                      null === (i = a.alternate)
                        ? ((a.childLanes = 0),
                          (a.lanes = e),
                          (a.child = null),
                          (a.subtreeFlags = 0),
                          (a.memoizedProps = null),
                          (a.memoizedState = null),
                          (a.updateQueue = null),
                          (a.dependencies = null),
                          (a.stateNode = null))
                        : ((a.childLanes = i.childLanes),
                          (a.lanes = i.lanes),
                          (a.child = i.child),
                          (a.subtreeFlags = 0),
                          (a.deletions = null),
                          (a.memoizedProps = i.memoizedProps),
                          (a.memoizedState = i.memoizedState),
                          (a.updateQueue = i.updateQueue),
                          (a.type = i.type),
                          (e = i.dependencies),
                          (a.dependencies =
                            null === e
                              ? null
                              : {
                                  lanes: e.lanes,
                                  firstContext: e.firstContext,
                                })),
                      (r = r.sibling);
                  return jc(Ka, (1 & Ka.current) | 2), t.child;
                }
                e = e.sibling;
              }
            null !== a.tail &&
              tn() > Vi &&
              ((t.flags |= 128), (n = !0), oh(a, !1), (t.lanes = 4194304));
          }
        else {
          if (!n)
            if (null !== (e = ju(i))) {
              if (
                ((t.flags |= 128),
                (n = !0),
                null !== (r = e.updateQueue) &&
                  ((t.updateQueue = r), (t.flags |= 4)),
                oh(a, !0),
                null === a.tail &&
                  "hidden" === a.tailMode &&
                  !i.alternate &&
                  !Fa)
              )
                return ah(t), null;
            } else
              2 * tn() - a.renderingStartTime > Vi &&
                1073741824 !== r &&
                ((t.flags |= 128), (n = !0), oh(a, !1), (t.lanes = 4194304));
          a.isBackwards
            ? ((i.sibling = t.child), (t.child = i))
            : (null !== (r = a.last) ? (r.sibling = i) : (t.child = i),
              (a.last = i));
        }
        return null !== a.tail
          ? ((t = a.tail),
            (a.rendering = t),
            (a.tail = t.sibling),
            (a.renderingStartTime = tn()),
            (t.sibling = null),
            (r = Ka.current),
            jc(Ka, n ? (1 & r) | 2 : 1 & r),
            t)
          : (ah(t), null);
      case 22:
      case 23:
        return (
          Nh(),
          (n = null !== t.memoizedState),
          null !== e && (null !== e.memoizedState) !== n && (t.flags |= 8192),
          n && 0 != (1 & t.mode)
            ? 0 != (1073741824 & Li) &&
              (ah(t), 6 & t.subtreeFlags && (t.flags |= 8192))
            : ah(t),
          null
        );
      case 24:
      case 25:
        return null;
    }
    throw Error(ks(156, t.tag));
  }
  function sh(e, t) {
    switch ((nu(t), t.tag)) {
      case 1:
        return (
          Vc(t.type) && qc(),
          65536 & (e = t.flags) ? ((t.flags = (-65537 & e) | 128), t) : null
        );
      case 3:
        return (
          Uu(),
          zc(ba),
          zc(va),
          Wu(),
          0 != (65536 & (e = t.flags)) && 0 == (128 & e)
            ? ((t.flags = (-65537 & e) | 128), t)
            : null
        );
      case 5:
        return zu(t), null;
      case 13:
        if ((zc(Ka), null !== (e = t.memoizedState) && null !== e.dehydrated)) {
          if (null === t.alternate) throw Error(ks(340));
          du();
        }
        return 65536 & (e = t.flags)
          ? ((t.flags = (-65537 & e) | 128), t)
          : null;
      case 19:
        return zc(Ka), null;
      case 4:
        return Uu(), null;
      case 10:
        return gu(t.type._context), null;
      case 22:
      case 23:
        return Nh(), null;
      case 24:
      default:
        return null;
    }
  }
  function lh(e, t) {
    var r = e.ref;
    if (null !== r)
      if ("function" == typeof r)
        try {
          r(null);
        } catch (r) {
          Jh(e, t, r);
        }
      else r.current = null;
  }
  function ch(e, t, r) {
    try {
      r();
    } catch (r) {
      Jh(e, t, r);
    }
  }
  function uh(e, t, r) {
    var n = t.updateQueue;
    if (null !== (n = null !== n ? n.lastEffect : null)) {
      var o = (n = n.next);
      do {
        if ((o.tag & e) === e) {
          var a = o.destroy;
          (o.destroy = void 0), void 0 !== a && ch(t, r, a);
        }
        o = o.next;
      } while (o !== n);
    }
  }
  function dh(e, t) {
    if (null !== (t = null !== (t = t.updateQueue) ? t.lastEffect : null)) {
      var r = (t = t.next);
      do {
        if ((r.tag & e) === e) {
          var n = r.create;
          r.destroy = n();
        }
        r = r.next;
      } while (r !== t);
    }
  }
  function hh(e) {
    var t = e.ref;
    if (null !== t) {
      var r = e.stateNode;
      switch (e.tag) {
        case 5:
          e = r;
          break;
        default:
          e = r;
      }
      "function" == typeof t ? t(e) : (t.current = e);
    }
  }
  function ph(e) {
    var t = e.alternate;
    null !== t && ((e.alternate = null), ph(t)),
      (e.child = null),
      (e.deletions = null),
      (e.sibling = null),
      5 === e.tag &&
        null !== (t = e.stateNode) &&
        (delete t[la], delete t[ca], delete t[da], delete t[ha], delete t[pa]),
      (e.stateNode = null),
      (e.return = null),
      (e.dependencies = null),
      (e.memoizedProps = null),
      (e.memoizedState = null),
      (e.pendingProps = null),
      (e.stateNode = null),
      (e.updateQueue = null);
  }
  function mh(e) {
    return 5 === e.tag || 3 === e.tag || 4 === e.tag;
  }
  function gh(e) {
    e: for (;;) {
      for (; null === e.sibling; ) {
        if (null === e.return || mh(e.return)) return null;
        e = e.return;
      }
      for (
        e.sibling.return = e.return, e = e.sibling;
        5 !== e.tag && 6 !== e.tag && 18 !== e.tag;

      ) {
        if (2 & e.flags) continue e;
        if (null === e.child || 4 === e.tag) continue e;
        (e.child.return = e), (e = e.child);
      }
      if (!(2 & e.flags)) return e.stateNode;
    }
  }
  function fh(e, t, r) {
    var n = e.tag;
    if (5 === n || 6 === n)
      (e = e.stateNode),
        t
          ? 8 === r.nodeType
            ? r.parentNode.insertBefore(e, t)
            : r.insertBefore(e, t)
          : (8 === r.nodeType
              ? (t = r.parentNode).insertBefore(e, r)
              : (t = r).appendChild(e),
            null != (r = r._reactRootContainer) ||
              null !== t.onclick ||
              (t.onclick = Ac));
    else if (4 !== n && null !== (e = e.child))
      for (fh(e, t, r), e = e.sibling; null !== e; )
        fh(e, t, r), (e = e.sibling);
  }
  function vh(e, t, r) {
    var n = e.tag;
    if (5 === n || 6 === n)
      (e = e.stateNode), t ? r.insertBefore(e, t) : r.appendChild(e);
    else if (4 !== n && null !== (e = e.child))
      for (vh(e, t, r), e = e.sibling; null !== e; )
        vh(e, t, r), (e = e.sibling);
  }
  function bh(e, t, r) {
    for (r = r.child; null !== r; ) yh(e, t, r), (r = r.sibling);
  }
  function yh(e, t, r) {
    if (un && "function" == typeof un.onCommitFiberUnmount)
      try {
        un.onCommitFiberUnmount(cn, r);
      } catch (e) {}
    switch (r.tag) {
      case 5:
        ki || lh(r, t);
      case 6:
        var n = xi,
          o = Pi;
        (xi = null),
          bh(e, t, r),
          (Pi = o),
          null !== (xi = n) &&
            (Pi
              ? ((e = xi),
                (r = r.stateNode),
                8 === e.nodeType
                  ? e.parentNode.removeChild(r)
                  : e.removeChild(r))
              : xi.removeChild(r.stateNode));
        break;
      case 18:
        null !== xi &&
          (Pi
            ? ((e = xi),
              (r = r.stateNode),
              8 === e.nodeType
                ? Rc(e.parentNode, r)
                : 1 === e.nodeType && Rc(e, r),
              Rl(e))
            : Rc(xi, r.stateNode));
        break;
      case 4:
        (n = xi),
          (o = Pi),
          (xi = r.stateNode.containerInfo),
          (Pi = !0),
          bh(e, t, r),
          (xi = n),
          (Pi = o);
        break;
      case 0:
      case 11:
      case 14:
      case 15:
        if (
          !ki &&
          null !== (n = r.updateQueue) &&
          null !== (n = n.lastEffect)
        ) {
          o = n = n.next;
          do {
            var a = o,
              i = a.destroy;
            (a = a.tag),
              void 0 !== i && (0 != (2 & a) || 0 != (4 & a)) && ch(r, t, i),
              (o = o.next);
          } while (o !== n);
        }
        bh(e, t, r);
        break;
      case 1:
        if (
          !ki &&
          (lh(r, t),
          "function" == typeof (n = r.stateNode).componentWillUnmount)
        )
          try {
            (n.props = r.memoizedProps),
              (n.state = r.memoizedState),
              n.componentWillUnmount();
          } catch (e) {
            Jh(r, t, e);
          }
        bh(e, t, r);
        break;
      case 21:
        bh(e, t, r);
        break;
      case 22:
        1 & r.mode
          ? ((ki = (n = ki) || null !== r.memoizedState), bh(e, t, r), (ki = n))
          : bh(e, t, r);
        break;
      default:
        bh(e, t, r);
    }
  }
  function wh(e) {
    var t = e.updateQueue;
    if (null !== t) {
      e.updateQueue = null;
      var r = e.stateNode;
      null === r && (r = e.stateNode = new Si()),
        t.forEach(function (t) {
          var n = np.bind(null, e, t);
          r.has(t) || (r.add(t), t.then(n, n));
        });
    }
  }
  function Ch(e, t) {
    var r = t.deletions;
    if (null !== r)
      for (var n = 0; n < r.length; n++) {
        var o = r[n];
        try {
          var a = e,
            i = t,
            s = i;
          e: for (; null !== s; ) {
            switch (s.tag) {
              case 5:
                (xi = s.stateNode), (Pi = !1);
                break e;
              case 3:
              case 4:
                (xi = s.stateNode.containerInfo), (Pi = !0);
                break e;
            }
            s = s.return;
          }
          if (null === xi) throw Error(ks(160));
          yh(a, i, o), (xi = null), (Pi = !1);
          var l = o.alternate;
          null !== l && (l.return = null), (o.return = null);
        } catch (e) {
          Jh(o, t, e);
        }
      }
    if (12854 & t.subtreeFlags)
      for (t = t.child; null !== t; ) kh(t, e), (t = t.sibling);
  }
  function kh(e, t) {
    var r = e.alternate,
      n = e.flags;
    switch (e.tag) {
      case 0:
      case 11:
      case 14:
      case 15:
        if ((Ch(t, e), Sh(e), 4 & n)) {
          try {
            uh(3, e, e.return), dh(3, e);
          } catch (t) {
            Jh(e, e.return, t);
          }
          try {
            uh(5, e, e.return);
          } catch (t) {
            Jh(e, e.return, t);
          }
        }
        break;
      case 1:
        Ch(t, e), Sh(e), 512 & n && null !== r && lh(r, r.return);
        break;
      case 5:
        if (
          (Ch(t, e),
          Sh(e),
          512 & n && null !== r && lh(r, r.return),
          32 & e.flags)
        ) {
          var o = e.stateNode;
          try {
            Xs(o, "");
          } catch (t) {
            Jh(e, e.return, t);
          }
        }
        if (4 & n && null != (o = e.stateNode)) {
          var a = e.memoizedProps,
            i = null !== r ? r.memoizedProps : a,
            s = e.type,
            l = e.updateQueue;
          if (((e.updateQueue = null), null !== l))
            try {
              "input" === s && "radio" === a.type && null != a.name && Us(o, a),
                rl(s, i);
              var c = rl(s, a);
              for (i = 0; i < l.length; i += 2) {
                var u = l[i],
                  d = l[i + 1];
                "style" === u
                  ? el(o, d)
                  : "dangerouslySetInnerHTML" === u
                  ? Rr(o, d)
                  : "children" === u
                  ? Xs(o, d)
                  : Ps(o, u, d, c);
              }
              switch (s) {
                case "input":
                  Hs(o, a);
                  break;
                case "textarea":
                  Zs(o, a);
                  break;
                case "select":
                  var h = o._wrapperState.wasMultiple;
                  o._wrapperState.wasMultiple = !!a.multiple;
                  var p = a.value;
                  null != p
                    ? Ws(o, !!a.multiple, p, !1)
                    : h !== !!a.multiple &&
                      (null != a.defaultValue
                        ? Ws(o, !!a.multiple, a.defaultValue, !0)
                        : Ws(o, !!a.multiple, a.multiple ? [] : "", !1));
              }
              o[ca] = a;
            } catch (t) {
              Jh(e, e.return, t);
            }
        }
        break;
      case 6:
        if ((Ch(t, e), Sh(e), 4 & n)) {
          if (null === e.stateNode) throw Error(ks(162));
          (o = e.stateNode), (a = e.memoizedProps);
          try {
            o.nodeValue = a;
          } catch (t) {
            Jh(e, e.return, t);
          }
        }
        break;
      case 3:
        if (
          (Ch(t, e), Sh(e), 4 & n && null !== r && r.memoizedState.isDehydrated)
        )
          try {
            Rl(t.containerInfo);
          } catch (t) {
            Jh(e, e.return, t);
          }
        break;
      case 4:
        Ch(t, e), Sh(e);
        break;
      case 13:
        Ch(t, e),
          Sh(e),
          8192 & (o = e.child).flags &&
            ((a = null !== o.memoizedState),
            (o.stateNode.isHidden = a),
            !a ||
              (null !== o.alternate && null !== o.alternate.memoizedState) ||
              (Wi = tn())),
          4 & n && wh(e);
        break;
      case 22:
        if (
          ((u = null !== r && null !== r.memoizedState),
          1 & e.mode ? ((ki = (c = ki) || u), Ch(t, e), (ki = c)) : Ch(t, e),
          Sh(e),
          8192 & n)
        ) {
          if (
            ((c = null !== e.memoizedState),
            (e.stateNode.isHidden = c) && !u && 0 != (1 & e.mode))
          )
            for (Ei = e, u = e.child; null !== u; ) {
              for (d = Ei = u; null !== Ei; ) {
                switch (((p = (h = Ei).child), h.tag)) {
                  case 0:
                  case 11:
                  case 14:
                  case 15:
                    uh(4, h, h.return);
                    break;
                  case 1:
                    lh(h, h.return);
                    var m = h.stateNode;
                    if ("function" == typeof m.componentWillUnmount) {
                      (n = h), (r = h.return);
                      try {
                        (t = n),
                          (m.props = t.memoizedProps),
                          (m.state = t.memoizedState),
                          m.componentWillUnmount();
                      } catch (e) {
                        Jh(n, r, e);
                      }
                    }
                    break;
                  case 5:
                    lh(h, h.return);
                    break;
                  case 22:
                    if (null !== h.memoizedState) {
                      Ph(d);
                      continue;
                    }
                }
                null !== p ? ((p.return = h), (Ei = p)) : Ph(d);
              }
              u = u.sibling;
            }
          e: for (u = null, d = e; ; ) {
            if (5 === d.tag) {
              if (null === u) {
                u = d;
                try {
                  (o = d.stateNode),
                    c
                      ? "function" == typeof (a = o.style).setProperty
                        ? a.setProperty("display", "none", "important")
                        : (a.display = "none")
                      : ((s = d.stateNode),
                        (i =
                          null != (l = d.memoizedProps.style) &&
                          l.hasOwnProperty("display")
                            ? l.display
                            : null),
                        (s.style.display = Js("display", i)));
                } catch (t) {
                  Jh(e, e.return, t);
                }
              }
            } else if (6 === d.tag) {
              if (null === u)
                try {
                  d.stateNode.nodeValue = c ? "" : d.memoizedProps;
                } catch (t) {
                  Jh(e, e.return, t);
                }
            } else if (
              ((22 !== d.tag && 23 !== d.tag) ||
                null === d.memoizedState ||
                d === e) &&
              null !== d.child
            ) {
              (d.child.return = d), (d = d.child);
              continue;
            }
            if (d === e) break e;
            for (; null === d.sibling; ) {
              if (null === d.return || d.return === e) break e;
              u === d && (u = null), (d = d.return);
            }
            u === d && (u = null),
              (d.sibling.return = d.return),
              (d = d.sibling);
          }
        }
        break;
      case 19:
        Ch(t, e), Sh(e), 4 & n && wh(e);
        break;
      case 21:
        break;
      default:
        Ch(t, e), Sh(e);
    }
  }
  function Sh(e) {
    var t = e.flags;
    if (2 & t) {
      try {
        e: {
          for (var r = e.return; null !== r; ) {
            if (mh(r)) {
              var n = r;
              break e;
            }
            r = r.return;
          }
          throw Error(ks(160));
        }
        switch (n.tag) {
          case 5:
            var o = n.stateNode;
            32 & n.flags && (Xs(o, ""), (n.flags &= -33)), vh(e, gh(e), o);
            break;
          case 3:
          case 4:
            var a = n.stateNode.containerInfo;
            fh(e, gh(e), a);
            break;
          default:
            throw Error(ks(161));
        }
      } catch (t) {
        Jh(e, e.return, t);
      }
      e.flags &= -3;
    }
    4096 & t && (e.flags &= -4097);
  }
  function Eh(e, t, r) {
    (Ei = e), _h(e, t, r);
  }
  function _h(e, t, r) {
    for (var n = 0 != (1 & e.mode); null !== Ei; ) {
      var o = Ei,
        a = o.child;
      if (22 === o.tag && n) {
        var i = null !== o.memoizedState || Ci;
        if (!i) {
          var s = o.alternate,
            l = (null !== s && null !== s.memoizedState) || ki;
          s = Ci;
          var c = ki;
          if (((Ci = i), (ki = l) && !c))
            for (Ei = o; null !== Ei; )
              (l = (i = Ei).child),
                22 === i.tag && null !== i.memoizedState
                  ? Th(o)
                  : null !== l
                  ? ((l.return = i), (Ei = l))
                  : Th(o);
          for (; null !== a; ) (Ei = a), _h(a, t, r), (a = a.sibling);
          (Ei = o), (Ci = s), (ki = c);
        }
        xh(e);
      } else
        0 != (8772 & o.subtreeFlags) && null !== a
          ? ((a.return = o), (Ei = a))
          : xh(e);
    }
  }
  function xh(e) {
    for (; null !== Ei; ) {
      var t = Ei;
      if (0 != (8772 & t.flags)) {
        var r = t.alternate;
        try {
          if (0 != (8772 & t.flags))
            switch (t.tag) {
              case 0:
              case 11:
              case 15:
                ki || dh(5, t);
                break;
              case 1:
                var n = t.stateNode;
                if (4 & t.flags && !ki)
                  if (null === r) n.componentDidMount();
                  else {
                    var o =
                      t.elementType === t.type
                        ? r.memoizedProps
                        : pu(t.type, r.memoizedProps);
                    n.componentDidUpdate(
                      o,
                      r.memoizedState,
                      n.__reactInternalSnapshotBeforeUpdate
                    );
                  }
                var a = t.updateQueue;
                null !== a && Iu(t, a, n);
                break;
              case 3:
                var i = t.updateQueue;
                if (null !== i) {
                  if (((r = null), null !== t.child))
                    switch (t.child.tag) {
                      case 5:
                        r = t.child.stateNode;
                        break;
                      case 1:
                        r = t.child.stateNode;
                    }
                  Iu(t, i, r);
                }
                break;
              case 5:
                var s = t.stateNode;
                if (null === r && 4 & t.flags) {
                  r = s;
                  var l = t.memoizedProps;
                  switch (t.type) {
                    case "button":
                    case "input":
                    case "select":
                    case "textarea":
                      l.autoFocus && r.focus();
                      break;
                    case "img":
                      l.src && (r.src = l.src);
                  }
                }
                break;
              case 6:
              case 4:
              case 12:
                break;
              case 13:
                if (null === t.memoizedState) {
                  var c = t.alternate;
                  if (null !== c) {
                    var u = c.memoizedState;
                    if (null !== u) {
                      var d = u.dehydrated;
                      null !== d && Rl(d);
                    }
                  }
                }
                break;
              case 19:
              case 17:
              case 21:
              case 22:
              case 23:
              case 25:
                break;
              default:
                throw Error(ks(163));
            }
          ki || (512 & t.flags && hh(t));
        } catch (e) {
          Jh(t, t.return, e);
        }
      }
      if (t === e) {
        Ei = null;
        break;
      }
      if (null !== (r = t.sibling)) {
        (r.return = t.return), (Ei = r);
        break;
      }
      Ei = t.return;
    }
  }
  function Ph(e) {
    for (; null !== Ei; ) {
      var t = Ei;
      if (t === e) {
        Ei = null;
        break;
      }
      var r = t.sibling;
      if (null !== r) {
        (r.return = t.return), (Ei = r);
        break;
      }
      Ei = t.return;
    }
  }
  function Th(e) {
    for (; null !== Ei; ) {
      var t = Ei;
      try {
        switch (t.tag) {
          case 0:
          case 11:
          case 15:
            var r = t.return;
            try {
              dh(4, t);
            } catch (e) {
              Jh(t, r, e);
            }
            break;
          case 1:
            var n = t.stateNode;
            if ("function" == typeof n.componentDidMount) {
              var o = t.return;
              try {
                n.componentDidMount();
              } catch (e) {
                Jh(t, o, e);
              }
            }
            var a = t.return;
            try {
              hh(t);
            } catch (e) {
              Jh(t, a, e);
            }
            break;
          case 5:
            var i = t.return;
            try {
              hh(t);
            } catch (e) {
              Jh(t, i, e);
            }
        }
      } catch (e) {
        Jh(t, t.return, e);
      }
      if (t === e) {
        Ei = null;
        break;
      }
      var s = t.sibling;
      if (null !== s) {
        (s.return = t.return), (Ei = s);
        break;
      }
      Ei = t.return;
    }
  }
  function Ih() {
    return 0 != (6 & Ai) ? tn() : -1 !== rs ? rs : (rs = tn());
  }
  function Gh(e) {
    return 0 == (1 & e.mode)
      ? 1
      : 0 != (2 & Ai) && 0 !== Ri
      ? Ri & -Ri
      : null !== La.transition
      ? (0 === ns && (ns = Sl()), ns)
      : 0 !== (e = fn)
      ? e
      : (e = void 0 === (e = window.event) ? 16 : Nl(e.type));
  }
  function Dh(e, t, r, n) {
    if (50 < es) throw ((es = 0), (ts = null), Error(ks(185)));
    _l(e, r, n),
      (0 != (2 & Ai) && e === Mi) ||
        (e === Mi && (0 == (2 & Ai) && (Ui |= r), 4 === Oi && Lh(e, Ri)),
        Ah(e, n),
        1 === r &&
          0 === Ai &&
          0 == (1 & t.mode) &&
          ((Vi = tn() + 500), Ca && Jc()));
  }
  function Ah(e, t) {
    var r = e.callbackNode;
    !(function (e, t) {
      for (
        var r = e.suspendedLanes,
          n = e.pingedLanes,
          o = e.expirationTimes,
          a = e.pendingLanes;
        0 < a;

      ) {
        var i = 31 - dn(a),
          s = 1 << i,
          l = o[i];
        -1 === l
          ? (0 != (s & r) && 0 == (s & n)) || (o[i] = Cl(s, t))
          : l <= t && (e.expiredLanes |= s),
          (a &= ~s);
      }
    })(e, t);
    var n = wl(e, e === Mi ? Ri : 0);
    if (0 === n)
      null !== r && Xr(r), (e.callbackNode = null), (e.callbackPriority = 0);
    else if (((t = n & -n), e.callbackPriority !== t)) {
      if ((null != r && Xr(r), 1 === t))
        0 === e.tag
          ? (function (e) {
              (Ca = !0), Xc(e);
            })(Bh.bind(null, e))
          : Xc(Bh.bind(null, e)),
          ia(function () {
            0 == (6 & Ai) && Jc();
          }),
          (r = null);
      else {
        switch (Pl(n)) {
          case 1:
            r = nn;
            break;
          case 4:
            r = on;
            break;
          case 16:
            r = an;
            break;
          case 536870912:
            r = ln;
            break;
          default:
            r = an;
        }
        r = op(r, Mh.bind(null, e));
      }
      (e.callbackPriority = t), (e.callbackNode = r);
    }
  }
  function Mh(e, t) {
    if (((rs = -1), (ns = 0), 0 != (6 & Ai))) throw Error(ks(327));
    var r = e.callbackNode;
    if (Kh() && e.callbackNode !== r) return null;
    var n = wl(e, e === Mi ? Ri : 0);
    if (0 === n) return null;
    if (0 != (30 & n) || 0 != (n & e.expiredLanes) || t) t = Wh(e, n);
    else {
      t = n;
      var o = Ai;
      Ai |= 2;
      var a = zh();
      for (
        (Mi === e && Ri === t) || ((qi = null), (Vi = tn() + 500), Uh(e, t));
        ;

      )
        try {
          qh();
          break;
        } catch (t) {
          Hh(e, t);
        }
      mu(),
        (Ii.current = a),
        (Ai = o),
        null !== Fi ? (t = 0) : ((Mi = null), (Ri = 0), (t = Oi));
    }
    if (0 !== t) {
      if ((2 === t && 0 !== (o = kl(e)) && ((n = o), (t = Fh(e, o))), 1 === t))
        throw ((r = $i), Uh(e, 0), Lh(e, n), Ah(e, tn()), r);
      if (6 === t) Lh(e, n);
      else {
        if (
          ((o = e.current.alternate),
          0 == (30 & n) &&
            !(function (e) {
              for (var t = e; ; ) {
                if (16384 & t.flags) {
                  var r = t.updateQueue;
                  if (null !== r && null !== (r = r.stores))
                    for (var n = 0; n < r.length; n++) {
                      var o = r[n],
                        a = o.getSnapshot;
                      o = o.value;
                      try {
                        if (!Do(a(), o)) return !1;
                      } catch (e) {
                        return !1;
                      }
                    }
                }
                if (((r = t.child), 16384 & t.subtreeFlags && null !== r))
                  (r.return = t), (t = r);
                else {
                  if (t === e) break;
                  for (; null === t.sibling; ) {
                    if (null === t.return || t.return === e) return !0;
                    t = t.return;
                  }
                  (t.sibling.return = t.return), (t = t.sibling);
                }
              }
              return !0;
            })(o) &&
            (2 === (t = Wh(e, n)) &&
              0 !== (a = kl(e)) &&
              ((n = a), (t = Fh(e, a))),
            1 === t))
        )
          throw ((r = $i), Uh(e, 0), Lh(e, n), Ah(e, tn()), r);
        switch (((e.finishedWork = o), (e.finishedLanes = n), t)) {
          case 0:
          case 1:
            throw Error(ks(345));
          case 2:
            Qh(e, ji, qi);
            break;
          case 3:
            if (
              (Lh(e, n), (130023424 & n) === n && 10 < (t = Wi + 500 - tn()))
            ) {
              if (0 !== wl(e, 0)) break;
              if (((o = e.suspendedLanes) & n) !== n) {
                Ih(), (e.pingedLanes |= e.suspendedLanes & o);
                break;
              }
              e.timeoutHandle = na(Qh.bind(null, e, ji, qi), t);
              break;
            }
            Qh(e, ji, qi);
            break;
          case 4:
            if ((Lh(e, n), (4194240 & n) === n)) break;
            for (t = e.eventTimes, o = -1; 0 < n; ) {
              var i = 31 - dn(n);
              (a = 1 << i), (i = t[i]) > o && (o = i), (n &= ~a);
            }
            if (
              ((n = o),
              10 <
                (n =
                  (120 > (n = tn() - n)
                    ? 120
                    : 480 > n
                    ? 480
                    : 1080 > n
                    ? 1080
                    : 1920 > n
                    ? 1920
                    : 3e3 > n
                    ? 3e3
                    : 4320 > n
                    ? 4320
                    : 1960 * Ti(n / 1960)) - n))
            ) {
              e.timeoutHandle = na(Qh.bind(null, e, ji, qi), n);
              break;
            }
            Qh(e, ji, qi);
            break;
          case 5:
            Qh(e, ji, qi);
            break;
          default:
            throw Error(ks(329));
        }
      }
    }
    return Ah(e, tn()), e.callbackNode === r ? Mh.bind(null, e) : null;
  }
  function Fh(e, t) {
    var r = zi;
    return (
      e.current.memoizedState.isDehydrated && (Uh(e, t).flags |= 256),
      2 !== (e = Wh(e, t)) && ((t = ji), (ji = r), null !== t && Rh(t)),
      e
    );
  }
  function Rh(e) {
    null === ji ? (ji = e) : ji.push.apply(ji, e);
  }
  function Lh(e, t) {
    for (
      t &= ~Hi,
        t &= ~Ui,
        e.suspendedLanes |= t,
        e.pingedLanes &= ~t,
        e = e.expirationTimes;
      0 < t;

    ) {
      var r = 31 - dn(t),
        n = 1 << r;
      (e[r] = -1), (t &= ~n);
    }
  }
  function Bh(e) {
    if (0 != (6 & Ai)) throw Error(ks(327));
    Kh();
    var t = wl(e, 0);
    if (0 == (1 & t)) return Ah(e, tn()), null;
    var r = Wh(e, t);
    if (0 !== e.tag && 2 === r) {
      var n = kl(e);
      0 !== n && ((t = n), (r = Fh(e, n)));
    }
    if (1 === r) throw ((r = $i), Uh(e, 0), Lh(e, t), Ah(e, tn()), r);
    if (6 === r) throw Error(ks(345));
    return (
      (e.finishedWork = e.current.alternate),
      (e.finishedLanes = t),
      Qh(e, ji, qi),
      Ah(e, tn()),
      null
    );
  }
  function Oh(e, t) {
    var r = Ai;
    Ai |= 1;
    try {
      return e(t);
    } finally {
      0 === (Ai = r) && ((Vi = tn() + 500), Ca && Jc());
    }
  }
  function $h(e) {
    null !== Xi && 0 === Xi.tag && 0 == (6 & Ai) && Kh();
    var t = Ai;
    Ai |= 1;
    var r = Di.transition,
      n = fn;
    try {
      if (((Di.transition = null), (fn = 1), e)) return e();
    } finally {
      (fn = n), (Di.transition = r), 0 == (6 & (Ai = t)) && Jc();
    }
  }
  function Nh() {
    (Li = Bi.current), zc(Bi);
  }
  function Uh(e, t) {
    (e.finishedWork = null), (e.finishedLanes = 0);
    var r = e.timeoutHandle;
    if ((-1 !== r && ((e.timeoutHandle = -1), oa(r)), null !== Fi))
      for (r = Fi.return; null !== r; ) {
        var n = r;
        switch ((nu(n), n.tag)) {
          case 1:
            null != (n = n.type.childContextTypes) && qc();
            break;
          case 3:
            Uu(), zc(ba), zc(va), Wu();
            break;
          case 5:
            zu(n);
            break;
          case 4:
            Uu();
            break;
          case 13:
          case 19:
            zc(Ka);
            break;
          case 10:
            gu(n.type._context);
            break;
          case 22:
          case 23:
            Nh();
        }
        r = r.return;
      }
    if (
      ((Mi = e),
      (Fi = e = lp(e.current, null)),
      (Ri = Li = t),
      (Oi = 0),
      ($i = null),
      (Hi = Ui = Ni = 0),
      (ji = zi = null),
      null !== Ua)
    ) {
      for (t = 0; t < Ua.length; t++)
        if (null !== (n = (r = Ua[t]).interleaved)) {
          r.interleaved = null;
          var o = n.next,
            a = r.pending;
          if (null !== a) {
            var i = a.next;
            (a.next = o), (n.next = i);
          }
          r.pending = n;
        }
      Ua = null;
    }
    return e;
  }
  function Hh(e, t) {
    for (;;) {
      var r = Fi;
      try {
        if ((mu(), (Ja.current = ci), ai)) {
          for (var n = ri.memoizedState; null !== n; ) {
            var o = n.queue;
            null !== o && (o.pending = null), (n = n.next);
          }
          ai = !1;
        }
        if (
          ((ti = 0),
          (oi = ni = ri = null),
          (ii = !1),
          (si = 0),
          (Gi.current = null),
          null === r || null === r.return)
        ) {
          (Oi = 1), ($i = t), (Fi = null);
          break;
        }
        e: {
          var a = e,
            i = r.return,
            s = r,
            l = t;
          if (
            ((t = Ri),
            (s.flags |= 32768),
            null !== l && "object" == typeof l && "function" == typeof l.then)
          ) {
            var c = l,
              u = s,
              d = u.tag;
            if (0 == (1 & u.mode) && (0 === d || 11 === d || 15 === d)) {
              var h = u.alternate;
              h
                ? ((u.updateQueue = h.updateQueue),
                  (u.memoizedState = h.memoizedState),
                  (u.lanes = h.lanes))
                : ((u.updateQueue = null), (u.memoizedState = null));
            }
            var p = Ld(i);
            if (null !== p) {
              (p.flags &= -257),
                Bd(p, i, s, 0, t),
                1 & p.mode && Rd(a, c, t),
                (l = c);
              var m = (t = p).updateQueue;
              if (null === m) {
                var g = new Set();
                g.add(l), (t.updateQueue = g);
              } else m.add(l);
              break e;
            }
            if (0 == (1 & t)) {
              Rd(a, c, t), jh();
              break e;
            }
            l = Error(ks(426));
          } else if (Fa && 1 & s.mode) {
            var f = Ld(i);
            if (null !== f) {
              0 == (65536 & f.flags) && (f.flags |= 256),
                Bd(f, i, s, 0, t),
                hu(Gd(l, s));
              break e;
            }
          }
          (a = l = Gd(l, s)),
            4 !== Oi && (Oi = 2),
            null === zi ? (zi = [a]) : zi.push(a),
            (a = i);
          do {
            switch (a.tag) {
              case 3:
                (a.flags |= 65536),
                  (t &= -t),
                  (a.lanes |= t),
                  Pu(a, Md(0, l, t));
                break e;
              case 1:
                s = l;
                var v = a.type,
                  b = a.stateNode;
                if (
                  0 == (128 & a.flags) &&
                  ("function" == typeof v.getDerivedStateFromError ||
                    (null !== b &&
                      "function" == typeof b.componentDidCatch &&
                      (null === Qi || !Qi.has(b))))
                ) {
                  (a.flags |= 65536),
                    (t &= -t),
                    (a.lanes |= t),
                    Pu(a, Fd(a, s, t));
                  break e;
                }
            }
            a = a.return;
          } while (null !== a);
        }
        Yh(r);
      } catch (e) {
        (t = e), Fi === r && null !== r && (Fi = r = r.return);
        continue;
      }
      break;
    }
  }
  function zh() {
    var e = Ii.current;
    return (Ii.current = ci), null === e ? ci : e;
  }
  function jh() {
    (0 !== Oi && 3 !== Oi && 2 !== Oi) || (Oi = 4),
      null === Mi ||
        (0 == (268435455 & Ni) && 0 == (268435455 & Ui)) ||
        Lh(Mi, Ri);
  }
  function Wh(e, t) {
    var r = Ai;
    Ai |= 2;
    var n = zh();
    for ((Mi === e && Ri === t) || ((qi = null), Uh(e, t)); ; )
      try {
        Vh();
        break;
      } catch (t) {
        Hh(e, t);
      }
    if ((mu(), (Ai = r), (Ii.current = n), null !== Fi)) throw Error(ks(261));
    return (Mi = null), (Ri = 0), Oi;
  }
  function Vh() {
    for (; null !== Fi; ) Zh(Fi);
  }
  function qh() {
    for (; null !== Fi && !Jr(); ) Zh(Fi);
  }
  function Zh(e) {
    var t = os(e.alternate, e, Li);
    (e.memoizedProps = e.pendingProps),
      null === t ? Yh(e) : (Fi = t),
      (Gi.current = null);
  }
  function Yh(e) {
    var t = e;
    do {
      var r = t.alternate;
      if (((e = t.return), 0 == (32768 & t.flags))) {
        if (null !== (r = ih(r, t, Li))) return void (Fi = r);
      } else {
        if (null !== (r = sh(r, t))) return (r.flags &= 32767), void (Fi = r);
        if (null === e) return (Oi = 6), void (Fi = null);
        (e.flags |= 32768), (e.subtreeFlags = 0), (e.deletions = null);
      }
      if (null !== (t = t.sibling)) return void (Fi = t);
      Fi = t = e;
    } while (null !== t);
    0 === Oi && (Oi = 5);
  }
  function Qh(e, t, r) {
    var n = fn,
      o = Di.transition;
    try {
      (Di.transition = null),
        (fn = 1),
        (function (e, t, r, n) {
          do {
            Kh();
          } while (null !== Xi);
          if (0 != (6 & Ai)) throw Error(ks(327));
          r = e.finishedWork;
          var o = e.finishedLanes;
          if (null === r) return null;
          if (((e.finishedWork = null), (e.finishedLanes = 0), r === e.current))
            throw Error(ks(177));
          (e.callbackNode = null), (e.callbackPriority = 0);
          var a = r.lanes | r.childLanes;
          if (
            ((function (e, t) {
              var r = e.pendingLanes & ~t;
              (e.pendingLanes = t),
                (e.suspendedLanes = 0),
                (e.pingedLanes = 0),
                (e.expiredLanes &= t),
                (e.mutableReadLanes &= t),
                (e.entangledLanes &= t),
                (t = e.entanglements);
              var n = e.eventTimes;
              for (e = e.expirationTimes; 0 < r; ) {
                var o = 31 - dn(r),
                  a = 1 << o;
                (t[o] = 0), (n[o] = -1), (e[o] = -1), (r &= ~a);
              }
            })(e, a),
            e === Mi && ((Fi = Mi = null), (Ri = 0)),
            (0 == (2064 & r.subtreeFlags) && 0 == (2064 & r.flags)) ||
              Ki ||
              ((Ki = !0),
              op(an, function () {
                return Kh(), null;
              })),
            (a = 0 != (15990 & r.flags)),
            0 != (15990 & r.subtreeFlags) || a)
          ) {
            (a = Di.transition), (Di.transition = null);
            var i = fn;
            fn = 1;
            var s = Ai;
            (Ai |= 4),
              (Gi.current = null),
              (function (e, t) {
                if (((ta = An), pc((e = hc())))) {
                  if ("selectionStart" in e)
                    var r = { start: e.selectionStart, end: e.selectionEnd };
                  else
                    e: {
                      var n =
                        (r = ((r = e.ownerDocument) && r.defaultView) || window)
                          .getSelection && r.getSelection();
                      if (n && 0 !== n.rangeCount) {
                        r = n.anchorNode;
                        var o = n.anchorOffset,
                          a = n.focusNode;
                        n = n.focusOffset;
                        try {
                          r.nodeType, a.nodeType;
                        } catch (e) {
                          r = null;
                          break e;
                        }
                        var i = 0,
                          s = -1,
                          l = -1,
                          c = 0,
                          u = 0,
                          d = e,
                          h = null;
                        t: for (;;) {
                          for (
                            var p;
                            d !== r ||
                              (0 !== o && 3 !== d.nodeType) ||
                              (s = i + o),
                              d !== a ||
                                (0 !== n && 3 !== d.nodeType) ||
                                (l = i + n),
                              3 === d.nodeType && (i += d.nodeValue.length),
                              null !== (p = d.firstChild);

                          )
                            (h = d), (d = p);
                          for (;;) {
                            if (d === e) break t;
                            if (
                              (h === r && ++c === o && (s = i),
                              h === a && ++u === n && (l = i),
                              null !== (p = d.nextSibling))
                            )
                              break;
                            h = (d = h).parentNode;
                          }
                          d = p;
                        }
                        r = -1 === s || -1 === l ? null : { start: s, end: l };
                      } else r = null;
                    }
                  r = r || { start: 0, end: 0 };
                } else r = null;
                for (
                  ra = { focusedElem: e, selectionRange: r }, An = !1, Ei = t;
                  null !== Ei;

                )
                  if (
                    ((e = (t = Ei).child),
                    0 != (1028 & t.subtreeFlags) && null !== e)
                  )
                    (e.return = t), (Ei = e);
                  else
                    for (; null !== Ei; ) {
                      t = Ei;
                      try {
                        var m = t.alternate;
                        if (0 != (1024 & t.flags))
                          switch (t.tag) {
                            case 0:
                            case 11:
                            case 15:
                              break;
                            case 1:
                              if (null !== m) {
                                var g = m.memoizedProps,
                                  f = m.memoizedState,
                                  v = t.stateNode,
                                  b = v.getSnapshotBeforeUpdate(
                                    t.elementType === t.type
                                      ? g
                                      : pu(t.type, g),
                                    f
                                  );
                                v.__reactInternalSnapshotBeforeUpdate = b;
                              }
                              break;
                            case 3:
                              var y = t.stateNode.containerInfo;
                              1 === y.nodeType
                                ? (y.textContent = "")
                                : 9 === y.nodeType &&
                                  y.documentElement &&
                                  y.removeChild(y.documentElement);
                              break;
                            case 5:
                            case 6:
                            case 4:
                            case 17:
                              break;
                            default:
                              throw Error(ks(163));
                          }
                      } catch (e) {
                        Jh(t, t.return, e);
                      }
                      if (null !== (e = t.sibling)) {
                        (e.return = t.return), (Ei = e);
                        break;
                      }
                      Ei = t.return;
                    }
                (m = _i), (_i = !1);
              })(e, r),
              kh(r, e),
              mc(ra),
              (An = !!ta),
              (ra = ta = null),
              (e.current = r),
              Eh(r, e, o),
              en(),
              (Ai = s),
              (fn = i),
              (Di.transition = a);
          } else e.current = r;
          if (
            (Ki && ((Ki = !1), (Xi = e), (Ji = o)),
            0 === (a = e.pendingLanes) && (Qi = null),
            (function (e) {
              if (un && "function" == typeof un.onCommitFiberRoot)
                try {
                  un.onCommitFiberRoot(
                    cn,
                    e,
                    void 0,
                    128 == (128 & e.current.flags)
                  );
                } catch (e) {}
            })(r.stateNode),
            Ah(e, tn()),
            null !== t)
          )
            for (n = e.onRecoverableError, r = 0; r < t.length; r++)
              (o = t[r]),
                n(o.value, { componentStack: o.stack, digest: o.digest });
          if (Zi) throw ((Zi = !1), (e = Yi), (Yi = null), e);
          0 != (1 & Ji) && 0 !== e.tag && Kh(),
            0 != (1 & (a = e.pendingLanes))
              ? e === ts
                ? es++
                : ((es = 0), (ts = e))
              : (es = 0),
            Jc();
        })(e, t, r, n);
    } finally {
      (Di.transition = o), (fn = n);
    }
    return null;
  }
  function Kh() {
    if (null !== Xi) {
      var e = Pl(Ji),
        t = Di.transition,
        r = fn;
      try {
        if (((Di.transition = null), (fn = 16 > e ? 16 : e), null === Xi))
          var n = !1;
        else {
          if (((e = Xi), (Xi = null), (Ji = 0), 0 != (6 & Ai)))
            throw Error(ks(331));
          var o = Ai;
          for (Ai |= 4, Ei = e.current; null !== Ei; ) {
            var a = Ei,
              i = a.child;
            if (0 != (16 & Ei.flags)) {
              var s = a.deletions;
              if (null !== s) {
                for (var l = 0; l < s.length; l++) {
                  var c = s[l];
                  for (Ei = c; null !== Ei; ) {
                    var u = Ei;
                    switch (u.tag) {
                      case 0:
                      case 11:
                      case 15:
                        uh(8, u, a);
                    }
                    var d = u.child;
                    if (null !== d) (d.return = u), (Ei = d);
                    else
                      for (; null !== Ei; ) {
                        var h = (u = Ei).sibling,
                          p = u.return;
                        if ((ph(u), u === c)) {
                          Ei = null;
                          break;
                        }
                        if (null !== h) {
                          (h.return = p), (Ei = h);
                          break;
                        }
                        Ei = p;
                      }
                  }
                }
                var m = a.alternate;
                if (null !== m) {
                  var g = m.child;
                  if (null !== g) {
                    m.child = null;
                    do {
                      var f = g.sibling;
                      (g.sibling = null), (g = f);
                    } while (null !== g);
                  }
                }
                Ei = a;
              }
            }
            if (0 != (2064 & a.subtreeFlags) && null !== i)
              (i.return = a), (Ei = i);
            else
              e: for (; null !== Ei; ) {
                if (0 != (2048 & (a = Ei).flags))
                  switch (a.tag) {
                    case 0:
                    case 11:
                    case 15:
                      uh(9, a, a.return);
                  }
                var v = a.sibling;
                if (null !== v) {
                  (v.return = a.return), (Ei = v);
                  break e;
                }
                Ei = a.return;
              }
          }
          var b = e.current;
          for (Ei = b; null !== Ei; ) {
            var y = (i = Ei).child;
            if (0 != (2064 & i.subtreeFlags) && null !== y)
              (y.return = i), (Ei = y);
            else
              e: for (i = b; null !== Ei; ) {
                if (0 != (2048 & (s = Ei).flags))
                  try {
                    switch (s.tag) {
                      case 0:
                      case 11:
                      case 15:
                        dh(9, s);
                    }
                  } catch (e) {
                    Jh(s, s.return, e);
                  }
                if (s === i) {
                  Ei = null;
                  break e;
                }
                var w = s.sibling;
                if (null !== w) {
                  (w.return = s.return), (Ei = w);
                  break e;
                }
                Ei = s.return;
              }
          }
          if (
            ((Ai = o),
            Jc(),
            un && "function" == typeof un.onPostCommitFiberRoot)
          )
            try {
              un.onPostCommitFiberRoot(cn, e);
            } catch (e) {}
          n = !0;
        }
        return n;
      } finally {
        (fn = r), (Di.transition = t);
      }
    }
    return !1;
  }
  function Xh(e, t, r) {
    (e = _u(e, (t = Md(0, (t = Gd(r, t)), 1)), 1)),
      (t = Ih()),
      null !== e && (_l(e, 1, t), Ah(e, t));
  }
  function Jh(e, t, r) {
    if (3 === e.tag) Xh(e, e, r);
    else
      for (; null !== t; ) {
        if (3 === t.tag) {
          Xh(t, e, r);
          break;
        }
        if (1 === t.tag) {
          var n = t.stateNode;
          if (
            "function" == typeof t.type.getDerivedStateFromError ||
            ("function" == typeof n.componentDidCatch &&
              (null === Qi || !Qi.has(n)))
          ) {
            (t = _u(t, (e = Fd(t, (e = Gd(r, e)), 1)), 1)),
              (e = Ih()),
              null !== t && (_l(t, 1, e), Ah(t, e));
            break;
          }
        }
        t = t.return;
      }
  }
  function ep(e, t, r) {
    var n = e.pingCache;
    null !== n && n.delete(t),
      (t = Ih()),
      (e.pingedLanes |= e.suspendedLanes & r),
      Mi === e &&
        (Ri & r) === r &&
        (4 === Oi || (3 === Oi && (130023424 & Ri) === Ri && 500 > tn() - Wi)
          ? Uh(e, 0)
          : (Hi |= r)),
      Ah(e, t);
  }
  function tp(e, t) {
    0 === t &&
      (0 == (1 & e.mode)
        ? (t = 1)
        : ((t = gn), 0 == (130023424 & (gn <<= 1)) && (gn = 4194304)));
    var r = Ih();
    null !== (e = Cu(e, t)) && (_l(e, t, r), Ah(e, r));
  }
  function rp(e) {
    var t = e.memoizedState,
      r = 0;
    null !== t && (r = t.retryLane), tp(e, r);
  }
  function np(e, t) {
    var r = 0;
    switch (e.tag) {
      case 13:
        var n = e.stateNode,
          o = e.memoizedState;
        null !== o && (r = o.retryLane);
        break;
      case 19:
        n = e.stateNode;
        break;
      default:
        throw Error(ks(314));
    }
    null !== n && n.delete(t), tp(e, r);
  }
  function op(e, t) {
    return Kr(e, t);
  }
  function ap(e, t, r, n) {
    (this.tag = e),
      (this.key = r),
      (this.sibling =
        this.child =
        this.return =
        this.stateNode =
        this.type =
        this.elementType =
          null),
      (this.index = 0),
      (this.ref = null),
      (this.pendingProps = t),
      (this.dependencies =
        this.memoizedState =
        this.updateQueue =
        this.memoizedProps =
          null),
      (this.mode = n),
      (this.subtreeFlags = this.flags = 0),
      (this.deletions = null),
      (this.childLanes = this.lanes = 0),
      (this.alternate = null);
  }
  function ip(e, t, r, n) {
    return new ap(e, t, r, n);
  }
  function sp(e) {
    return !(!(e = e.prototype) || !e.isReactComponent);
  }
  function lp(e, t) {
    var r = e.alternate;
    return (
      null === r
        ? (((r = ip(e.tag, t, e.key, e.mode)).elementType = e.elementType),
          (r.type = e.type),
          (r.stateNode = e.stateNode),
          (r.alternate = e),
          (e.alternate = r))
        : ((r.pendingProps = t),
          (r.type = e.type),
          (r.flags = 0),
          (r.subtreeFlags = 0),
          (r.deletions = null)),
      (r.flags = 14680064 & e.flags),
      (r.childLanes = e.childLanes),
      (r.lanes = e.lanes),
      (r.child = e.child),
      (r.memoizedProps = e.memoizedProps),
      (r.memoizedState = e.memoizedState),
      (r.updateQueue = e.updateQueue),
      (t = e.dependencies),
      (r.dependencies =
        null === t ? null : { lanes: t.lanes, firstContext: t.firstContext }),
      (r.sibling = e.sibling),
      (r.index = e.index),
      (r.ref = e.ref),
      r
    );
  }
  function cp(e, t, r, n, o, a) {
    var i = 2;
    if (((n = e), "function" == typeof e)) sp(e) && (i = 1);
    else if ("string" == typeof e) i = 5;
    else
      e: switch (e) {
        case br:
          return up(r.children, o, a, t);
        case yr:
          (i = 8), (o |= 8);
          break;
        case wr:
          return ((e = ip(12, r, t, 2 | o)).elementType = wr), (e.lanes = a), e;
        case Er:
          return ((e = ip(13, r, t, o)).elementType = Er), (e.lanes = a), e;
        case _r:
          return ((e = ip(19, r, t, o)).elementType = _r), (e.lanes = a), e;
        case Tr:
          return dp(r, o, a, t);
        default:
          if ("object" == typeof e && null !== e)
            switch (e.$$typeof) {
              case Cr:
                i = 10;
                break e;
              case kr:
                i = 9;
                break e;
              case Sr:
                i = 11;
                break e;
              case xr:
                i = 14;
                break e;
              case Pr:
                (i = 16), (n = null);
                break e;
            }
          throw Error(ks(130, null == e ? e : typeof e, ""));
      }
    return (
      ((t = ip(i, r, t, o)).elementType = e), (t.type = n), (t.lanes = a), t
    );
  }
  function up(e, t, r, n) {
    return ((e = ip(7, e, n, t)).lanes = r), e;
  }
  function dp(e, t, r, n) {
    return (
      ((e = ip(22, e, n, t)).elementType = Tr),
      (e.lanes = r),
      (e.stateNode = { isHidden: !1 }),
      e
    );
  }
  function hp(e, t, r) {
    return ((e = ip(6, e, null, t)).lanes = r), e;
  }
  function pp(e, t, r) {
    return (
      ((t = ip(4, null !== e.children ? e.children : [], e.key, t)).lanes = r),
      (t.stateNode = {
        containerInfo: e.containerInfo,
        pendingChildren: null,
        implementation: e.implementation,
      }),
      t
    );
  }
  function mp(e, t, r, n, o) {
    (this.tag = t),
      (this.containerInfo = e),
      (this.finishedWork =
        this.pingCache =
        this.current =
        this.pendingChildren =
          null),
      (this.timeoutHandle = -1),
      (this.callbackNode = this.pendingContext = this.context = null),
      (this.callbackPriority = 0),
      (this.eventTimes = El(0)),
      (this.expirationTimes = El(-1)),
      (this.entangledLanes =
        this.finishedLanes =
        this.mutableReadLanes =
        this.expiredLanes =
        this.pingedLanes =
        this.suspendedLanes =
        this.pendingLanes =
          0),
      (this.entanglements = El(0)),
      (this.identifierPrefix = n),
      (this.onRecoverableError = o),
      (this.mutableSourceEagerHydrationData = null);
  }
  function gp(e, t, r, n, o, a, i, s, l) {
    return (
      (e = new mp(e, t, r, s, l)),
      1 === t ? ((t = 1), !0 === a && (t |= 8)) : (t = 0),
      (a = ip(3, null, null, t)),
      (e.current = a),
      (a.stateNode = e),
      (a.memoizedState = {
        element: n,
        isDehydrated: r,
        cache: null,
        transitions: null,
        pendingSuspenseBoundaries: null,
      }),
      ku(a),
      e
    );
  }
  function fp(e, t, r) {
    var n =
      3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
    return {
      $$typeof: vr,
      key: null == n ? null : "" + n,
      children: e,
      containerInfo: t,
      implementation: r,
    };
  }
  function vp(e) {
    if (!e) return fa;
    e: {
      if (pl((e = e._reactInternals)) !== e || 1 !== e.tag)
        throw Error(ks(170));
      var t = e;
      do {
        switch (t.tag) {
          case 3:
            t = t.stateNode.context;
            break e;
          case 1:
            if (Vc(t.type)) {
              t = t.stateNode.__reactInternalMemoizedMergedChildContext;
              break e;
            }
        }
        t = t.return;
      } while (null !== t);
      throw Error(ks(171));
    }
    if (1 === e.tag) {
      var r = e.type;
      if (Vc(r)) return Yc(e, r, t);
    }
    return t;
  }
  function bp(e, t, r, n, o, a, i, s, l) {
    return (
      ((e = gp(r, n, !0, e, 0, a, 0, s, l)).context = vp(null)),
      (r = e.current),
      ((a = Eu((n = Ih()), (o = Gh(r)))).callback = null != t ? t : null),
      _u(r, a, o),
      (e.current.lanes = o),
      _l(e, o, n),
      Ah(e, n),
      e
    );
  }
  function yp(e, t, r, n) {
    var o = t.current,
      a = Ih(),
      i = Gh(o);
    return (
      (r = vp(r)),
      null === t.context ? (t.context = r) : (t.pendingContext = r),
      ((t = Eu(a, i)).payload = { element: e }),
      null !== (n = void 0 === n ? null : n) && (t.callback = n),
      null !== (e = _u(o, t, i)) && (Dh(e, o, i, a), xu(e, o, i)),
      i
    );
  }
  function wp(e) {
    if (!(e = e.current).child) return null;
    switch (e.child.tag) {
      case 5:
      default:
        return e.child.stateNode;
    }
  }
  function Cp(e, t) {
    if (null !== (e = e.memoizedState) && null !== e.dehydrated) {
      var r = e.retryLane;
      e.retryLane = 0 !== r && r < t ? r : t;
    }
  }
  function kp(e, t) {
    Cp(e, t), (e = e.alternate) && Cp(e, t);
  }
  function Sp() {
    return null;
  }
  function Ep(e) {
    this._internalRoot = e;
  }
  function _p(e) {
    this._internalRoot = e;
  }
  function xp(e) {
    return !(!e || (1 !== e.nodeType && 9 !== e.nodeType && 11 !== e.nodeType));
  }
  function Pp(e) {
    return !(
      !e ||
      (1 !== e.nodeType &&
        9 !== e.nodeType &&
        11 !== e.nodeType &&
        (8 !== e.nodeType || " react-mount-point-unstable " !== e.nodeValue))
    );
  }
  function Tp() {}
  function Ip(e, t, r, n, o) {
    var a = r._reactRootContainer;
    if (a) {
      var i = a;
      if ("function" == typeof o) {
        var s = o;
        o = function () {
          var e = wp(i);
          s.call(e);
        };
      }
      yp(t, i, e, o);
    } else
      i = (function (e, t, r, n, o) {
        if (o) {
          if ("function" == typeof n) {
            var a = n;
            n = function () {
              var e = wp(i);
              a.call(e);
            };
          }
          var i = bp(t, n, e, 0, null, !1, 0, "", Tp);
          return (
            (e._reactRootContainer = i),
            (e[ua] = i.current),
            Sc(8 === e.nodeType ? e.parentNode : e),
            $h(),
            i
          );
        }
        for (; (o = e.lastChild); ) e.removeChild(o);
        if ("function" == typeof n) {
          var s = n;
          n = function () {
            var e = wp(l);
            s.call(e);
          };
        }
        var l = gp(e, 0, !1, null, 0, !1, 0, "", Tp);
        return (
          (e._reactRootContainer = l),
          (e[ua] = l.current),
          Sc(8 === e.nodeType ? e.parentNode : e),
          $h(function () {
            yp(t, l, r, n);
          }),
          l
        );
      })(r, t, e, o, n);
    return wp(i);
  }
  function Gp() {
    var e;
    if (
      ((ar = {}),
      it(),
      or(),
      (ir = new Set()),
      (sr = {}),
      (lr = !(
        "undefined" == typeof window ||
        void 0 === window.document ||
        void 0 === window.document.createElement
      )),
      (cr = Object.prototype.hasOwnProperty),
      (ur =
        /^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/),
      (dr = {}),
      (hr = {}),
      (pr = {}),
      "children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style"
        .split(" ")
        .forEach(function (e) {
          pr[e] = new _s(e, 0, !1, e, null, !1, !1);
        }),
      [
        ["acceptCharset", "accept-charset"],
        ["className", "class"],
        ["htmlFor", "for"],
        ["httpEquiv", "http-equiv"],
      ].forEach(function (e) {
        var t = e[0];
        pr[t] = new _s(t, 1, !1, e[1], null, !1, !1);
      }),
      ["contentEditable", "draggable", "spellCheck", "value"].forEach(function (
        e
      ) {
        pr[e] = new _s(e, 2, !1, e.toLowerCase(), null, !1, !1);
      }),
      [
        "autoReverse",
        "externalResourcesRequired",
        "focusable",
        "preserveAlpha",
      ].forEach(function (e) {
        pr[e] = new _s(e, 2, !1, e, null, !1, !1);
      }),
      "allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope"
        .split(" ")
        .forEach(function (e) {
          pr[e] = new _s(e, 3, !1, e.toLowerCase(), null, !1, !1);
        }),
      ["checked", "multiple", "muted", "selected"].forEach(function (e) {
        pr[e] = new _s(e, 3, !0, e, null, !1, !1);
      }),
      ["capture", "download"].forEach(function (e) {
        pr[e] = new _s(e, 4, !1, e, null, !1, !1);
      }),
      ["cols", "rows", "size", "span"].forEach(function (e) {
        pr[e] = new _s(e, 6, !1, e, null, !1, !1);
      }),
      ["rowSpan", "start"].forEach(function (e) {
        pr[e] = new _s(e, 5, !1, e.toLowerCase(), null, !1, !1);
      }),
      (mr = /[\-:]([a-z])/g),
      "accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height"
        .split(" ")
        .forEach(function (e) {
          var t = e.replace(mr, xs);
          pr[t] = new _s(t, 1, !1, e, null, !1, !1);
        }),
      "xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type"
        .split(" ")
        .forEach(function (e) {
          var t = e.replace(mr, xs);
          pr[t] = new _s(t, 1, !1, e, "http://www.w3.org/1999/xlink", !1, !1);
        }),
      ["xml:base", "xml:lang", "xml:space"].forEach(function (e) {
        var t = e.replace(mr, xs);
        pr[t] = new _s(
          t,
          1,
          !1,
          e,
          "http://www.w3.org/XML/1998/namespace",
          !1,
          !1
        );
      }),
      ["tabIndex", "crossOrigin"].forEach(function (e) {
        pr[e] = new _s(e, 1, !1, e.toLowerCase(), null, !1, !1);
      }),
      (pr.xlinkHref = new _s(
        "xlinkHref",
        1,
        !1,
        "xlink:href",
        "http://www.w3.org/1999/xlink",
        !0,
        !1
      )),
      ["src", "href", "action", "formAction"].forEach(function (e) {
        pr[e] = new _s(e, 1, !1, e.toLowerCase(), null, !0, !0);
      }),
      (gr = it().__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED),
      (fr = Symbol.for("react.element")),
      (vr = Symbol.for("react.portal")),
      (br = Symbol.for("react.fragment")),
      (yr = Symbol.for("react.strict_mode")),
      (wr = Symbol.for("react.profiler")),
      (Cr = Symbol.for("react.provider")),
      (kr = Symbol.for("react.context")),
      (Sr = Symbol.for("react.forward_ref")),
      (Er = Symbol.for("react.suspense")),
      (_r = Symbol.for("react.suspense_list")),
      (xr = Symbol.for("react.memo")),
      (Pr = Symbol.for("react.lazy")),
      Symbol.for("react.scope"),
      Symbol.for("react.debug_trace_mode"),
      (Tr = Symbol.for("react.offscreen")),
      Symbol.for("react.legacy_hidden"),
      Symbol.for("react.cache"),
      Symbol.for("react.tracing_marker"),
      (Ir = Symbol.iterator),
      (Gr = Object.assign),
      (Ar = !1),
      (Mr = Array.isArray),
      (e = function (e, t) {
        if ("http://www.w3.org/2000/svg" !== e.namespaceURI || "innerHTML" in e)
          e.innerHTML = t;
        else {
          for (
            (Fr = Fr || document.createElement("div")).innerHTML =
              "<svg>" + t.valueOf().toString() + "</svg>",
              t = Fr.firstChild;
            e.firstChild;

          )
            e.removeChild(e.firstChild);
          for (; t.firstChild; ) e.appendChild(t.firstChild);
        }
      }),
      (Rr =
        "undefined" != typeof MSApp && MSApp.execUnsafeLocalFunction
          ? function (t, r, n, o) {
              MSApp.execUnsafeLocalFunction(function () {
                return e(t, r);
              });
            }
          : e),
      (Lr = {
        animationIterationCount: !0,
        aspectRatio: !0,
        borderImageOutset: !0,
        borderImageSlice: !0,
        borderImageWidth: !0,
        boxFlex: !0,
        boxFlexGroup: !0,
        boxOrdinalGroup: !0,
        columnCount: !0,
        columns: !0,
        flex: !0,
        flexGrow: !0,
        flexPositive: !0,
        flexShrink: !0,
        flexNegative: !0,
        flexOrder: !0,
        gridArea: !0,
        gridRow: !0,
        gridRowEnd: !0,
        gridRowSpan: !0,
        gridRowStart: !0,
        gridColumn: !0,
        gridColumnEnd: !0,
        gridColumnSpan: !0,
        gridColumnStart: !0,
        fontWeight: !0,
        lineClamp: !0,
        lineHeight: !0,
        opacity: !0,
        order: !0,
        orphans: !0,
        tabSize: !0,
        widows: !0,
        zIndex: !0,
        zoom: !0,
        fillOpacity: !0,
        floodOpacity: !0,
        stopOpacity: !0,
        strokeDasharray: !0,
        strokeDashoffset: !0,
        strokeMiterlimit: !0,
        strokeOpacity: !0,
        strokeWidth: !0,
      }),
      (Br = ["Webkit", "ms", "Moz", "O"]),
      Object.keys(Lr).forEach(function (e) {
        Br.forEach(function (t) {
          (t = t + e.charAt(0).toUpperCase() + e.substring(1)), (Lr[t] = Lr[e]);
        });
      }),
      (Or = Gr(
        { menuitem: !0 },
        {
          area: !0,
          base: !0,
          br: !0,
          col: !0,
          embed: !0,
          hr: !0,
          img: !0,
          input: !0,
          keygen: !0,
          link: !0,
          meta: !0,
          param: !0,
          source: !0,
          track: !0,
          wbr: !0,
        }
      )),
      ($r = null),
      (Nr = null),
      (Ur = null),
      (Hr = null),
      (zr = !1),
      (jr = !1),
      lr)
    )
      try {
        (Wr = {}),
          Object.defineProperty(Wr, "passive", {
            get: function () {
              jr = !0;
            },
          }),
          window.addEventListener("test", Wr, Wr),
          window.removeEventListener("test", Wr, Wr);
      } catch (e) {
        jr = !1;
      }
    (Vr = !1),
      (qr = null),
      (Zr = !1),
      (Yr = null),
      (Qr = {
        onError: function (e) {
          (Vr = !0), (qr = e);
        },
      }),
      (Kr = or().unstable_scheduleCallback),
      (Xr = or().unstable_cancelCallback),
      (Jr = or().unstable_shouldYield),
      (en = or().unstable_requestPaint),
      (tn = or().unstable_now),
      (rn = or().unstable_getCurrentPriorityLevel),
      (nn = or().unstable_ImmediatePriority),
      (on = or().unstable_UserBlockingPriority),
      (an = or().unstable_NormalPriority),
      (sn = or().unstable_LowPriority),
      (ln = or().unstable_IdlePriority),
      (cn = null),
      (un = null),
      (dn = Math.clz32 ? Math.clz32 : bl),
      (hn = Math.log),
      (pn = Math.LN2),
      (mn = 64),
      (gn = 4194304),
      (fn = 0),
      (kn = !1),
      (Sn = []),
      (En = null),
      (_n = null),
      (xn = null),
      (Pn = new Map()),
      (Tn = new Map()),
      (In = []),
      (Gn =
        "mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(
          " "
        )),
      (Dn = gr.ReactCurrentBatchConfig),
      (An = !0),
      (Mn = null),
      (Fn = null),
      (Rn = null),
      (Ln = null),
      (On = Wl(
        (Bn = {
          eventPhase: 0,
          bubbles: 0,
          cancelable: 0,
          timeStamp: function (e) {
            return e.timeStamp || Date.now();
          },
          defaultPrevented: 0,
          isTrusted: 0,
        })
      )),
      ($n = Gr({}, Bn, { view: 0, detail: 0 })),
      (Nn = Wl($n)),
      (jn = Gr({}, $n, {
        screenX: 0,
        screenY: 0,
        clientX: 0,
        clientY: 0,
        pageX: 0,
        pageY: 0,
        ctrlKey: 0,
        shiftKey: 0,
        altKey: 0,
        metaKey: 0,
        getModifierState: ql,
        button: 0,
        buttons: 0,
        relatedTarget: function (e) {
          return void 0 === e.relatedTarget
            ? e.fromElement === e.srcElement
              ? e.toElement
              : e.fromElement
            : e.relatedTarget;
        },
        movementX: function (e) {
          return "movementX" in e
            ? e.movementX
            : (e !== zn &&
                (zn && "mousemove" === e.type
                  ? ((Un = e.screenX - zn.screenX),
                    (Hn = e.screenY - zn.screenY))
                  : (Hn = Un = 0),
                (zn = e)),
              Un);
        },
        movementY: function (e) {
          return "movementY" in e ? e.movementY : Hn;
        },
      })),
      (Wn = Wl(jn)),
      (Vn = Gr({}, jn, { dataTransfer: 0 })),
      (qn = Wl(Vn)),
      (Zn = Gr({}, $n, { relatedTarget: 0 })),
      (Yn = Wl(Zn)),
      (Qn = Gr({}, Bn, { animationName: 0, elapsedTime: 0, pseudoElement: 0 })),
      (Kn = Wl(Qn)),
      (Xn = Gr({}, Bn, {
        clipboardData: function (e) {
          return "clipboardData" in e ? e.clipboardData : window.clipboardData;
        },
      })),
      (Jn = Wl(Xn)),
      (eo = Gr({}, Bn, { data: 0 })),
      (to = Wl(eo)),
      (ro = {
        Esc: "Escape",
        Spacebar: " ",
        Left: "ArrowLeft",
        Up: "ArrowUp",
        Right: "ArrowRight",
        Down: "ArrowDown",
        Del: "Delete",
        Win: "OS",
        Menu: "ContextMenu",
        Apps: "ContextMenu",
        Scroll: "ScrollLock",
        MozPrintableKey: "Unidentified",
      }),
      (no = {
        8: "Backspace",
        9: "Tab",
        12: "Clear",
        13: "Enter",
        16: "Shift",
        17: "Control",
        18: "Alt",
        19: "Pause",
        20: "CapsLock",
        27: "Escape",
        32: " ",
        33: "PageUp",
        34: "PageDown",
        35: "End",
        36: "Home",
        37: "ArrowLeft",
        38: "ArrowUp",
        39: "ArrowRight",
        40: "ArrowDown",
        45: "Insert",
        46: "Delete",
        112: "F1",
        113: "F2",
        114: "F3",
        115: "F4",
        116: "F5",
        117: "F6",
        118: "F7",
        119: "F8",
        120: "F9",
        121: "F10",
        122: "F11",
        123: "F12",
        144: "NumLock",
        145: "ScrollLock",
        224: "Meta",
      }),
      (oo = {
        Alt: "altKey",
        Control: "ctrlKey",
        Meta: "metaKey",
        Shift: "shiftKey",
      }),
      (ao = Gr({}, $n, {
        key: function (e) {
          if (e.key) {
            var t = ro[e.key] || e.key;
            if ("Unidentified" !== t) return t;
          }
          return "keypress" === e.type
            ? 13 === (e = Hl(e))
              ? "Enter"
              : String.fromCharCode(e)
            : "keydown" === e.type || "keyup" === e.type
            ? no[e.keyCode] || "Unidentified"
            : "";
        },
        code: 0,
        location: 0,
        ctrlKey: 0,
        shiftKey: 0,
        altKey: 0,
        metaKey: 0,
        repeat: 0,
        locale: 0,
        getModifierState: ql,
        charCode: function (e) {
          return "keypress" === e.type ? Hl(e) : 0;
        },
        keyCode: function (e) {
          return "keydown" === e.type || "keyup" === e.type ? e.keyCode : 0;
        },
        which: function (e) {
          return "keypress" === e.type
            ? Hl(e)
            : "keydown" === e.type || "keyup" === e.type
            ? e.keyCode
            : 0;
        },
      })),
      (io = Wl(ao)),
      (so = Gr({}, jn, {
        pointerId: 0,
        width: 0,
        height: 0,
        pressure: 0,
        tangentialPressure: 0,
        tiltX: 0,
        tiltY: 0,
        twist: 0,
        pointerType: 0,
        isPrimary: 0,
      })),
      (lo = Wl(so)),
      (co = Gr({}, $n, {
        touches: 0,
        targetTouches: 0,
        changedTouches: 0,
        altKey: 0,
        metaKey: 0,
        ctrlKey: 0,
        shiftKey: 0,
        getModifierState: ql,
      })),
      (uo = Wl(co)),
      (ho = Gr({}, Bn, { propertyName: 0, elapsedTime: 0, pseudoElement: 0 })),
      (po = Wl(ho)),
      (mo = Gr({}, jn, {
        deltaX: function (e) {
          return "deltaX" in e
            ? e.deltaX
            : "wheelDeltaX" in e
            ? -e.wheelDeltaX
            : 0;
        },
        deltaY: function (e) {
          return "deltaY" in e
            ? e.deltaY
            : "wheelDeltaY" in e
            ? -e.wheelDeltaY
            : "wheelDelta" in e
            ? -e.wheelDelta
            : 0;
        },
        deltaZ: 0,
        deltaMode: 0,
      })),
      (go = Wl(mo)),
      (fo = [9, 13, 27, 32]),
      (vo = lr && "CompositionEvent" in window),
      (bo = null),
      lr && "documentMode" in document && (bo = document.documentMode),
      (yo = lr && "TextEvent" in window && !bo),
      (wo = lr && (!vo || (bo && 8 < bo && 11 >= bo))),
      (Co = String.fromCharCode(32)),
      (ko = !1),
      (So = !1),
      (Eo = {
        color: !0,
        date: !0,
        datetime: !0,
        "datetime-local": !0,
        email: !0,
        month: !0,
        number: !0,
        password: !0,
        range: !0,
        search: !0,
        tel: !0,
        text: !0,
        time: !0,
        url: !0,
        week: !0,
      }),
      (_o = null),
      (xo = null),
      (Po = !1),
      lr &&
        (lr
          ? ((Io = "oninput" in document) ||
              ((Go = document.createElement("div")).setAttribute(
                "oninput",
                "return;"
              ),
              (Io = "function" == typeof Go.oninput)),
            (To = Io))
          : (To = !1),
        (Po = To && (!document.documentMode || 9 < document.documentMode))),
      (Do = "function" == typeof Object.is ? Object.is : sc),
      (Ao = lr && "documentMode" in document && 11 >= document.documentMode),
      (Mo = null),
      (Fo = null),
      (Ro = null),
      (Lo = !1),
      (Bo = {
        animationend: fc("Animation", "AnimationEnd"),
        animationiteration: fc("Animation", "AnimationIteration"),
        animationstart: fc("Animation", "AnimationStart"),
        transitionend: fc("Transition", "TransitionEnd"),
      }),
      (Oo = {}),
      ($o = {}),
      lr &&
        (($o = document.createElement("div").style),
        "AnimationEvent" in window ||
          (delete Bo.animationend.animation,
          delete Bo.animationiteration.animation,
          delete Bo.animationstart.animation),
        "TransitionEvent" in window || delete Bo.transitionend.transition),
      (No = vc("animationend")),
      (Uo = vc("animationiteration")),
      (Ho = vc("animationstart")),
      (zo = vc("transitionend")),
      (jo = new Map()),
      (Wo =
        "abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(
          " "
        ));
    for (Vo = 0; Vo < Wo.length; Vo++)
      (qo = Wo[Vo]),
        (Zo = qo.toLowerCase()),
        (Yo = qo[0].toUpperCase() + qo.slice(1)),
        bc(Zo, "on" + Yo);
    if (
      (bc(No, "onAnimationEnd"),
      bc(Uo, "onAnimationIteration"),
      bc(Ho, "onAnimationStart"),
      bc("dblclick", "onDoubleClick"),
      bc("focusin", "onFocus"),
      bc("focusout", "onBlur"),
      bc(zo, "onTransitionEnd"),
      Es("onMouseEnter", ["mouseout", "mouseover"]),
      Es("onMouseLeave", ["mouseout", "mouseover"]),
      Es("onPointerEnter", ["pointerout", "pointerover"]),
      Es("onPointerLeave", ["pointerout", "pointerover"]),
      Ss(
        "onChange",
        "change click focusin focusout input keydown keyup selectionchange".split(
          " "
        )
      ),
      Ss(
        "onSelect",
        "focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(
          " "
        )
      ),
      Ss("onBeforeInput", ["compositionend", "keypress", "textInput", "paste"]),
      Ss(
        "onCompositionEnd",
        "compositionend focusout keydown keypress keyup mousedown".split(" ")
      ),
      Ss(
        "onCompositionStart",
        "compositionstart focusout keydown keypress keyup mousedown".split(" ")
      ),
      Ss(
        "onCompositionUpdate",
        "compositionupdate focusout keydown keypress keyup mousedown".split(" ")
      ),
      (Qo =
        "abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(
          " "
        )),
      (Ko = new Set(
        "cancel close invalid load scroll toggle".split(" ").concat(Qo)
      )),
      (Xo = "_reactListening" + Math.random().toString(36).slice(2)),
      (Jo = /\r\n?/g),
      (ea = /\u0000|\uFFFD/g),
      (ta = null),
      (ra = null),
      (na = "function" == typeof setTimeout ? setTimeout : void 0),
      (oa = "function" == typeof clearTimeout ? clearTimeout : void 0),
      (aa = "function" == typeof Promise ? Promise : void 0),
      (ia =
        "function" == typeof queueMicrotask
          ? queueMicrotask
          : void 0 !== aa
          ? function (e) {
              return aa.resolve(null).then(e).catch(Fc);
            }
          : na),
      (sa = Math.random().toString(36).slice(2)),
      (la = "__reactFiber$" + sa),
      (ca = "__reactProps$" + sa),
      (ua = "__reactContainer$" + sa),
      (da = "__reactEvents$" + sa),
      (ha = "__reactListeners$" + sa),
      (pa = "__reactHandles$" + sa),
      (ma = []),
      (ga = -1),
      (va = Hc((fa = {}))),
      (ba = Hc(!1)),
      (ya = fa),
      (wa = null),
      (Ca = !1),
      (ka = !1),
      (Sa = []),
      (Ea = 0),
      (_a = null),
      (xa = 0),
      (Pa = []),
      (Ta = 0),
      (Ia = null),
      (Ga = 1),
      (Da = ""),
      (Aa = null),
      (Ma = null),
      (Fa = !1),
      (Ra = null),
      (La = gr.ReactCurrentBatchConfig),
      (Ba = Hc(null)),
      (Oa = null),
      ($a = null),
      (Na = null),
      (Ua = null),
      (Ha = !1),
      (za = new (it().Component)().refs),
      (ja = {
        isMounted: function (e) {
          return !!(e = e._reactInternals) && pl(e) === e;
        },
        enqueueSetState: function (e, t, r) {
          e = e._reactInternals;
          var n = Ih(),
            o = Gh(e),
            a = Eu(n, o);
          (a.payload = t),
            null != r && (a.callback = r),
            null !== (t = _u(e, a, o)) && (Dh(t, e, o, n), xu(t, e, o));
        },
        enqueueReplaceState: function (e, t, r) {
          e = e._reactInternals;
          var n = Ih(),
            o = Gh(e),
            a = Eu(n, o);
          (a.tag = 1),
            (a.payload = t),
            null != r && (a.callback = r),
            null !== (t = _u(e, a, o)) && (Dh(t, e, o, n), xu(t, e, o));
        },
        enqueueForceUpdate: function (e, t) {
          e = e._reactInternals;
          var r = Ih(),
            n = Gh(e),
            o = Eu(r, n);
          (o.tag = 2),
            null != t && (o.callback = t),
            null !== (t = _u(e, o, n)) && (Dh(t, e, n, r), xu(t, e, n));
        },
      }),
      (Wa = Ou(!0)),
      (Va = Ou(!1)),
      (Za = Hc((qa = {}))),
      (Ya = Hc(qa)),
      (Qa = Hc(qa)),
      (Ka = Hc(0)),
      (Xa = []),
      (Ja = gr.ReactCurrentDispatcher),
      (ei = gr.ReactCurrentBatchConfig),
      (ti = 0),
      (ri = null),
      (ni = null),
      (oi = null),
      (ai = !1),
      (ii = !1),
      (si = 0),
      (li = 0),
      (ci = {
        readContext: bu,
        useCallback: Vu,
        useContext: Vu,
        useEffect: Vu,
        useImperativeHandle: Vu,
        useInsertionEffect: Vu,
        useLayoutEffect: Vu,
        useMemo: Vu,
        useReducer: Vu,
        useRef: Vu,
        useState: Vu,
        useDebugValue: Vu,
        useDeferredValue: Vu,
        useTransition: Vu,
        useMutableSource: Vu,
        useSyncExternalStore: Vu,
        useId: Vu,
        unstable_isNewReconciler: !1,
      }),
      (ui = {
        readContext: bu,
        useCallback: function (e, t) {
          return (Qu().memoizedState = [e, void 0 === t ? null : t]), e;
        },
        useContext: bu,
        useEffect: pd,
        useImperativeHandle: function (e, t, r) {
          return (
            (r = null != r ? r.concat([e]) : null),
            dd(4194308, 4, vd.bind(null, t, e), r)
          );
        },
        useLayoutEffect: function (e, t) {
          return dd(4194308, 4, e, t);
        },
        useInsertionEffect: function (e, t) {
          return dd(4, 2, e, t);
        },
        useMemo: function (e, t) {
          var r = Qu();
          return (
            (t = void 0 === t ? null : t),
            (e = e()),
            (r.memoizedState = [e, t]),
            e
          );
        },
        useReducer: function (e, t, r) {
          var n = Qu();
          return (
            (t = void 0 !== r ? r(t) : t),
            (n.memoizedState = n.baseState = t),
            (e = {
              pending: null,
              interleaved: null,
              lanes: 0,
              dispatch: null,
              lastRenderedReducer: e,
              lastRenderedState: t,
            }),
            (n.queue = e),
            (e = e.dispatch = _d.bind(null, ri, e)),
            [n.memoizedState, e]
          );
        },
        useRef: function (e) {
          return (e = { current: e }), (Qu().memoizedState = e);
        },
        useState: ld,
        useDebugValue: yd,
        useDeferredValue: function (e) {
          return (Qu().memoizedState = e);
        },
        useTransition: function () {
          var e = ld(!1),
            t = e[0];
          return (e = Sd.bind(null, e[1])), (Qu().memoizedState = e), [t, e];
        },
        useMutableSource: function () {},
        useSyncExternalStore: function (e, t, r) {
          var n = ri,
            o = Qu();
          if (Fa) {
            if (void 0 === r) throw Error(ks(407));
            r = r();
          } else {
            if (((r = t()), null === Mi)) throw Error(ks(349));
            0 != (30 & ti) || nd(n, t, r);
          }
          o.memoizedState = r;
          var a = { value: r, getSnapshot: t };
          return (
            (o.queue = a),
            pd(ad.bind(null, n, a, e), [e]),
            (n.flags |= 2048),
            cd(9, od.bind(null, n, a, r, t), void 0, null),
            r
          );
        },
        useId: function () {
          var e = Qu(),
            t = Mi.identifierPrefix;
          if (Fa) {
            var r = Da;
            (t =
              ":" +
              t +
              "R" +
              (r = (Ga & ~(1 << (32 - dn(Ga) - 1))).toString(32) + r)),
              0 < (r = si++) && (t += "H" + r.toString(32)),
              (t += ":");
          } else t = ":" + t + "r" + (r = li++).toString(32) + ":";
          return (e.memoizedState = t);
        },
        unstable_isNewReconciler: !1,
      }),
      (di = {
        readContext: bu,
        useCallback: wd,
        useContext: bu,
        useEffect: md,
        useImperativeHandle: bd,
        useInsertionEffect: gd,
        useLayoutEffect: fd,
        useMemo: Cd,
        useReducer: Ju,
        useRef: ud,
        useState: function () {
          return Ju(Xu);
        },
        useDebugValue: yd,
        useDeferredValue: function (e) {
          return kd(Ku(), ni.memoizedState, e);
        },
        useTransition: function () {
          return [Ju(Xu)[0], Ku().memoizedState];
        },
        useMutableSource: td,
        useSyncExternalStore: rd,
        useId: Ed,
        unstable_isNewReconciler: !1,
      }),
      (hi = {
        readContext: bu,
        useCallback: wd,
        useContext: bu,
        useEffect: md,
        useImperativeHandle: bd,
        useInsertionEffect: gd,
        useLayoutEffect: fd,
        useMemo: Cd,
        useReducer: ed,
        useRef: ud,
        useState: function () {
          return ed(Xu);
        },
        useDebugValue: yd,
        useDeferredValue: function (e) {
          var t = Ku();
          return null === ni
            ? (t.memoizedState = e)
            : kd(t, ni.memoizedState, e);
        },
        useTransition: function () {
          return [ed(Xu)[0], Ku().memoizedState];
        },
        useMutableSource: td,
        useSyncExternalStore: rd,
        useId: Ed,
        unstable_isNewReconciler: !1,
      }),
      (pi = "function" == typeof WeakMap ? WeakMap : Map),
      (mi = gr.ReactCurrentOwner),
      (gi = !1),
      (fi = { dehydrated: null, treeContext: null, retryLane: 0 }),
      (vi = function (e, t) {
        for (var r = t.child; null !== r; ) {
          if (5 === r.tag || 6 === r.tag) e.appendChild(r.stateNode);
          else if (4 !== r.tag && null !== r.child) {
            (r.child.return = r), (r = r.child);
            continue;
          }
          if (r === t) break;
          for (; null === r.sibling; ) {
            if (null === r.return || r.return === t) return;
            r = r.return;
          }
          (r.sibling.return = r.return), (r = r.sibling);
        }
      }),
      (bi = function () {}),
      (yi = function (e, t, r, n) {
        var o = e.memoizedProps;
        if (o !== n) {
          (e = t.stateNode), $u(Za.current);
          var a,
            i = null;
          switch (r) {
            case "input":
              (o = $s(e, o)), (n = $s(e, n)), (i = []);
              break;
            case "select":
              (o = Gr({}, o, { value: void 0 })),
                (n = Gr({}, n, { value: void 0 })),
                (i = []);
              break;
            case "textarea":
              (o = Vs(e, o)), (n = Vs(e, n)), (i = []);
              break;
            default:
              "function" != typeof o.onClick &&
                "function" == typeof n.onClick &&
                (e.onclick = Ac);
          }
          for (c in (tl(r, n), (r = null), o))
            if (!n.hasOwnProperty(c) && o.hasOwnProperty(c) && null != o[c])
              if ("style" === c) {
                var s = o[c];
                for (a in s)
                  s.hasOwnProperty(a) && (r || (r = {}), (r[a] = ""));
              } else
                "dangerouslySetInnerHTML" !== c &&
                  "children" !== c &&
                  "suppressContentEditableWarning" !== c &&
                  "suppressHydrationWarning" !== c &&
                  "autoFocus" !== c &&
                  (sr.hasOwnProperty(c)
                    ? i || (i = [])
                    : (i = i || []).push(c, null));
          for (c in n) {
            var l = n[c];
            if (
              ((s = null != o ? o[c] : void 0),
              n.hasOwnProperty(c) && l !== s && (null != l || null != s))
            )
              if ("style" === c)
                if (s) {
                  for (a in s)
                    !s.hasOwnProperty(a) ||
                      (l && l.hasOwnProperty(a)) ||
                      (r || (r = {}), (r[a] = ""));
                  for (a in l)
                    l.hasOwnProperty(a) &&
                      s[a] !== l[a] &&
                      (r || (r = {}), (r[a] = l[a]));
                } else r || (i || (i = []), i.push(c, r)), (r = l);
              else
                "dangerouslySetInnerHTML" === c
                  ? ((l = l ? l.__html : void 0),
                    (s = s ? s.__html : void 0),
                    null != l && s !== l && (i = i || []).push(c, l))
                  : "children" === c
                  ? ("string" != typeof l && "number" != typeof l) ||
                    (i = i || []).push(c, "" + l)
                  : "suppressContentEditableWarning" !== c &&
                    "suppressHydrationWarning" !== c &&
                    (sr.hasOwnProperty(c)
                      ? (null != l && "onScroll" === c && Cc("scroll", e),
                        i || s === l || (i = []))
                      : (i = i || []).push(c, l));
          }
          r && (i = i || []).push("style", r);
          var c = i;
          (t.updateQueue = c) && (t.flags |= 4);
        }
      }),
      (wi = function (e, t, r, n) {
        r !== n && (t.flags |= 4);
      }),
      (Ci = !1),
      (ki = !1),
      (Si = "function" == typeof WeakSet ? WeakSet : Set),
      (Ei = null),
      (_i = !1),
      (xi = null),
      (Pi = !1),
      (Ti = Math.ceil),
      (Ii = gr.ReactCurrentDispatcher),
      (Gi = gr.ReactCurrentOwner),
      (Di = gr.ReactCurrentBatchConfig),
      (Ai = 0),
      (Mi = null),
      (Fi = null),
      (Ri = 0),
      (Li = 0),
      (Bi = Hc(0)),
      (Oi = 0),
      ($i = null),
      (Ni = 0),
      (Ui = 0),
      (Hi = 0),
      (zi = null),
      (ji = null),
      (Wi = 0),
      (Vi = 1 / 0),
      (qi = null),
      (Zi = !1),
      (Yi = null),
      (Qi = null),
      (Ki = !1),
      (Xi = null),
      (Ji = 0),
      (es = 0),
      (ts = null),
      (rs = -1),
      (ns = 0),
      (os = function (e, t, r) {
        if (null !== e)
          if (e.memoizedProps !== t.pendingProps || ba.current) gi = !0;
          else {
            if (0 == (e.lanes & r) && 0 == (128 & t.flags))
              return (
                (gi = !1),
                (function (e, t, r) {
                  switch (t.tag) {
                    case 3:
                      qd(t), du();
                      break;
                    case 5:
                      Hu(t);
                      break;
                    case 1:
                      Vc(t.type) && Qc(t);
                      break;
                    case 4:
                      Nu(t, t.stateNode.containerInfo);
                      break;
                    case 10:
                      var n = t.type._context,
                        o = t.memoizedProps.value;
                      jc(Ba, n._currentValue), (n._currentValue = o);
                      break;
                    case 13:
                      if (null !== (n = t.memoizedState))
                        return null !== n.dehydrated
                          ? (jc(Ka, 1 & Ka.current), (t.flags |= 128), null)
                          : 0 != (r & t.child.childLanes)
                          ? Qd(e, t, r)
                          : (jc(Ka, 1 & Ka.current),
                            null !== (e = nh(e, t, r)) ? e.sibling : null);
                      jc(Ka, 1 & Ka.current);
                      break;
                    case 19:
                      if (
                        ((n = 0 != (r & t.childLanes)), 0 != (128 & e.flags))
                      ) {
                        if (n) return th(e, t, r);
                        t.flags |= 128;
                      }
                      if (
                        (null !== (o = t.memoizedState) &&
                          ((o.rendering = null),
                          (o.tail = null),
                          (o.lastEffect = null)),
                        jc(Ka, Ka.current),
                        n)
                      )
                        break;
                      return null;
                    case 22:
                    case 23:
                      return (t.lanes = 0), Hd(e, t, r);
                  }
                  return nh(e, t, r);
                })(e, t, r)
              );
            gi = 0 != (131072 & e.flags);
          }
        else (gi = !1), Fa && 0 != (1048576 & t.flags) && tu(t, xa, t.index);
        switch (((t.lanes = 0), t.tag)) {
          case 2:
            var n = t.type;
            rh(e, t), (e = t.pendingProps);
            var o = Wc(t, va.current);
            vu(t, r), (o = Zu(null, t, n, e, o, r));
            var a = Yu();
            return (
              (t.flags |= 1),
              "object" == typeof o &&
              null !== o &&
              "function" == typeof o.render &&
              void 0 === o.$$typeof
                ? ((t.tag = 1),
                  (t.memoizedState = null),
                  (t.updateQueue = null),
                  Vc(n) ? ((a = !0), Qc(t)) : (a = !1),
                  (t.memoizedState =
                    null !== o.state && void 0 !== o.state ? o.state : null),
                  ku(t),
                  (o.updater = ja),
                  (t.stateNode = o),
                  (o._reactInternals = t),
                  Fu(t, n, e, r),
                  (t = Vd(null, t, n, !0, a, r)))
                : ((t.tag = 0),
                  Fa && a && ru(t),
                  Od(null, t, o, r),
                  (t = t.child)),
              t
            );
          case 16:
            n = t.elementType;
            e: {
              switch (
                (rh(e, t),
                (e = t.pendingProps),
                (n = (o = n._init)(n._payload)),
                (t.type = n),
                (o = t.tag =
                  (function (e) {
                    if ("function" == typeof e) return sp(e) ? 1 : 0;
                    if (null != e) {
                      if ((e = e.$$typeof) === Sr) return 11;
                      if (e === xr) return 14;
                    }
                    return 2;
                  })(n)),
                (e = pu(n, e)),
                o)
              ) {
                case 0:
                  t = jd(null, t, n, e, r);
                  break e;
                case 1:
                  t = Wd(null, t, n, e, r);
                  break e;
                case 11:
                  t = $d(null, t, n, e, r);
                  break e;
                case 14:
                  t = Nd(null, t, n, pu(n.type, e), r);
                  break e;
              }
              throw Error(ks(306, n, ""));
            }
            return t;
          case 0:
            return (
              (n = t.type),
              (o = t.pendingProps),
              jd(e, t, n, (o = t.elementType === n ? o : pu(n, o)), r)
            );
          case 1:
            return (
              (n = t.type),
              (o = t.pendingProps),
              Wd(e, t, n, (o = t.elementType === n ? o : pu(n, o)), r)
            );
          case 3:
            e: {
              if ((qd(t), null === e)) throw Error(ks(387));
              (n = t.pendingProps),
                (o = (a = t.memoizedState).element),
                Su(e, t),
                Tu(t, n, null, r);
              var i = t.memoizedState;
              if (((n = i.element), a.isDehydrated)) {
                if (
                  ((a = {
                    element: n,
                    isDehydrated: !1,
                    cache: i.cache,
                    pendingSuspenseBoundaries: i.pendingSuspenseBoundaries,
                    transitions: i.transitions,
                  }),
                  (t.updateQueue.baseState = a),
                  (t.memoizedState = a),
                  256 & t.flags)
                ) {
                  t = Zd(e, t, n, r, (o = Gd(Error(ks(423)), t)));
                  break e;
                }
                if (n !== o) {
                  t = Zd(e, t, n, r, (o = Gd(Error(ks(424)), t)));
                  break e;
                }
                for (
                  Ma = Lc(t.stateNode.containerInfo.firstChild),
                    Aa = t,
                    Fa = !0,
                    Ra = null,
                    r = Va(t, null, n, r),
                    t.child = r;
                  r;

                )
                  (r.flags = (-3 & r.flags) | 4096), (r = r.sibling);
              } else {
                if ((du(), n === o)) {
                  t = nh(e, t, r);
                  break e;
                }
                Od(e, t, n, r);
              }
              t = t.child;
            }
            return t;
          case 5:
            return (
              Hu(t),
              null === e && su(t),
              (n = t.type),
              (o = t.pendingProps),
              (a = null !== e ? e.memoizedProps : null),
              (i = o.children),
              Mc(n, o) ? (i = null) : null !== a && Mc(n, a) && (t.flags |= 32),
              zd(e, t),
              Od(e, t, i, r),
              t.child
            );
          case 6:
            return null === e && su(t), null;
          case 13:
            return Qd(e, t, r);
          case 4:
            return (
              Nu(t, t.stateNode.containerInfo),
              (n = t.pendingProps),
              null === e ? (t.child = Wa(t, null, n, r)) : Od(e, t, n, r),
              t.child
            );
          case 11:
            return (
              (n = t.type),
              (o = t.pendingProps),
              $d(e, t, n, (o = t.elementType === n ? o : pu(n, o)), r)
            );
          case 7:
            return Od(e, t, t.pendingProps, r), t.child;
          case 8:
          case 12:
            return Od(e, t, t.pendingProps.children, r), t.child;
          case 10:
            e: {
              if (
                ((n = t.type._context),
                (o = t.pendingProps),
                (a = t.memoizedProps),
                (i = o.value),
                jc(Ba, n._currentValue),
                (n._currentValue = i),
                null !== a)
              )
                if (Do(a.value, i)) {
                  if (a.children === o.children && !ba.current) {
                    t = nh(e, t, r);
                    break e;
                  }
                } else
                  for (null !== (a = t.child) && (a.return = t); null !== a; ) {
                    var s = a.dependencies;
                    if (null !== s) {
                      i = a.child;
                      for (var l = s.firstContext; null !== l; ) {
                        if (l.context === n) {
                          if (1 === a.tag) {
                            (l = Eu(-1, r & -r)).tag = 2;
                            var c = a.updateQueue;
                            if (null !== c) {
                              var u = (c = c.shared).pending;
                              null === u
                                ? (l.next = l)
                                : ((l.next = u.next), (u.next = l)),
                                (c.pending = l);
                            }
                          }
                          (a.lanes |= r),
                            null !== (l = a.alternate) && (l.lanes |= r),
                            fu(a.return, r, t),
                            (s.lanes |= r);
                          break;
                        }
                        l = l.next;
                      }
                    } else if (10 === a.tag)
                      i = a.type === t.type ? null : a.child;
                    else if (18 === a.tag) {
                      if (null === (i = a.return)) throw Error(ks(341));
                      (i.lanes |= r),
                        null !== (s = i.alternate) && (s.lanes |= r),
                        fu(i, r, t),
                        (i = a.sibling);
                    } else i = a.child;
                    if (null !== i) i.return = a;
                    else
                      for (i = a; null !== i; ) {
                        if (i === t) {
                          i = null;
                          break;
                        }
                        if (null !== (a = i.sibling)) {
                          (a.return = i.return), (i = a);
                          break;
                        }
                        i = i.return;
                      }
                    a = i;
                  }
              Od(e, t, o.children, r), (t = t.child);
            }
            return t;
          case 9:
            return (
              (o = t.type),
              (n = t.pendingProps.children),
              vu(t, r),
              (n = n((o = bu(o)))),
              (t.flags |= 1),
              Od(e, t, n, r),
              t.child
            );
          case 14:
            return (
              (o = pu((n = t.type), t.pendingProps)),
              Nd(e, t, n, (o = pu(n.type, o)), r)
            );
          case 15:
            return Ud(e, t, t.type, t.pendingProps, r);
          case 17:
            return (
              (n = t.type),
              (o = t.pendingProps),
              (o = t.elementType === n ? o : pu(n, o)),
              rh(e, t),
              (t.tag = 1),
              Vc(n) ? ((e = !0), Qc(t)) : (e = !1),
              vu(t, r),
              Au(t, n, o),
              Fu(t, n, o, r),
              Vd(null, t, n, !0, e, r)
            );
          case 19:
            return th(e, t, r);
          case 22:
            return Hd(e, t, r);
        }
        throw Error(ks(156, t.tag));
      }),
      (as =
        "function" == typeof reportError
          ? reportError
          : function (e) {
              console.error(e);
            }),
      (_p.prototype.render = Ep.prototype.render =
        function (e) {
          var t = this._internalRoot;
          if (null === t) throw Error(ks(409));
          yp(e, t, null, null);
        }),
      (_p.prototype.unmount = Ep.prototype.unmount =
        function () {
          var e = this._internalRoot;
          if (null !== e) {
            this._internalRoot = null;
            var t = e.containerInfo;
            $h(function () {
              yp(null, e, null, null);
            }),
              (t[ua] = null);
          }
        }),
      (_p.prototype.unstable_scheduleHydration = function (e) {
        if (e) {
          var t = wn();
          e = { blockedOn: null, target: e, priority: t };
          for (var r = 0; r < In.length && 0 !== t && t < In[r].priority; r++);
          In.splice(r, 0, e), 0 === r && Gl(e);
        }
      }),
      (vn = function (e) {
        switch (e.tag) {
          case 3:
            var t = e.stateNode;
            if (t.current.memoizedState.isDehydrated) {
              var r = yl(t.pendingLanes);
              0 !== r &&
                (xl(t, 1 | r),
                Ah(t, tn()),
                0 == (6 & Ai) && ((Vi = tn() + 500), Jc()));
            }
            break;
          case 13:
            $h(function () {
              var t = Cu(e, 1);
              if (null !== t) {
                var r = Ih();
                Dh(t, e, 1, r);
              }
            }),
              kp(e, 1);
        }
      }),
      (bn = function (e) {
        if (13 === e.tag) {
          var t = Cu(e, 134217728);
          if (null !== t) Dh(t, e, 134217728, Ih());
          kp(e, 134217728);
        }
      }),
      (yn = function (e) {
        if (13 === e.tag) {
          var t = Gh(e),
            r = Cu(e, t);
          if (null !== r) Dh(r, e, t, Ih());
          kp(e, t);
        }
      }),
      (wn = function () {
        return fn;
      }),
      (Cn = function (e, t) {
        var r = fn;
        try {
          return (fn = e), t();
        } finally {
          fn = r;
        }
      }),
      (Nr = function (e, t, r) {
        switch (t) {
          case "input":
            if ((Hs(e, r), (t = r.name), "radio" === r.type && null != t)) {
              for (r = e; r.parentNode; ) r = r.parentNode;
              for (
                r = r.querySelectorAll(
                  "input[name=" + JSON.stringify("" + t) + '][type="radio"]'
                ),
                  t = 0;
                t < r.length;
                t++
              ) {
                var n = r[t];
                if (n !== e && n.form === e.form) {
                  var o = Uc(n);
                  if (!o) throw Error(ks(90));
                  Bs(n), Hs(n, o);
                }
              }
            }
            break;
          case "textarea":
            Zs(e, r);
            break;
          case "select":
            null != (t = r.value) && Ws(e, !!r.multiple, t, !1);
        }
      }),
      (sl = Oh),
      (ll = $h),
      (is = { usingClientEntryPoint: !1, Events: [$c, Nc, Uc, al, il, Oh] }),
      (ls = {
        bundleType: (ss = {
          findFiberByHostInstance: Oc,
          bundleType: 0,
          version: "18.2.0",
          rendererPackageName: "react-dom",
        }).bundleType,
        version: ss.version,
        rendererPackageName: ss.rendererPackageName,
        rendererConfig: ss.rendererConfig,
        overrideHookState: null,
        overrideHookStateDeletePath: null,
        overrideHookStateRenamePath: null,
        overrideProps: null,
        overridePropsDeletePath: null,
        overridePropsRenamePath: null,
        setErrorHandler: null,
        setSuspenseHandler: null,
        scheduleUpdate: null,
        currentDispatcherRef: gr.ReactCurrentDispatcher,
        findHostInstanceByFiber: function (e) {
          return null === (e = fl(e)) ? null : e.stateNode;
        },
        findFiberByHostInstance: ss.findFiberByHostInstance || Sp,
        findHostInstancesForRefresh: null,
        scheduleRefresh: null,
        scheduleRoot: null,
        setRefreshHandler: null,
        getCurrentFiber: null,
        reconcilerVersion: "18.2.0-next-9e3b772b8-20220608",
      }),
      "undefined" != typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
        !(cs = __REACT_DEVTOOLS_GLOBAL_HOOK__).isDisabled &&
        cs.supportsFiber)
    )
      try {
        (cn = cs.inject(ls)), (un = cs);
      } catch (e) {}
    (us = is),
      (ar.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = us),
      (ds = function (e, t) {
        var r =
          2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;
        if (!xp(t)) throw Error(ks(200));
        return fp(e, t, null, r);
      }),
      (ar.createPortal = ds),
      (hs = function (e, t) {
        if (!xp(e)) throw Error(ks(299));
        var r = !1,
          n = "",
          o = as;
        return (
          null != t &&
            (!0 === t.unstable_strictMode && (r = !0),
            void 0 !== t.identifierPrefix && (n = t.identifierPrefix),
            void 0 !== t.onRecoverableError && (o = t.onRecoverableError)),
          (t = gp(e, 1, !1, null, 0, r, 0, n, o)),
          (e[ua] = t.current),
          Sc(8 === e.nodeType ? e.parentNode : e),
          new Ep(t)
        );
      }),
      (ar.createRoot = hs),
      (ps = function (e) {
        if (null == e) return null;
        if (1 === e.nodeType) return e;
        var t = e._reactInternals;
        if (void 0 === t) {
          if ("function" == typeof e.render) throw Error(ks(188));
          throw ((e = Object.keys(e).join(",")), Error(ks(268, e)));
        }
        return (e = null === (e = fl(t)) ? null : e.stateNode);
      }),
      (ar.findDOMNode = ps),
      (ms = function (e) {
        return $h(e);
      }),
      (ar.flushSync = ms),
      (gs = function (e, t, r) {
        if (!Pp(t)) throw Error(ks(200));
        return Ip(null, e, t, !0, r);
      }),
      (ar.hydrate = gs),
      (fs = function (e, t, r) {
        if (!xp(e)) throw Error(ks(405));
        var n = (null != r && r.hydratedSources) || null,
          o = !1,
          a = "",
          i = as;
        if (
          (null != r &&
            (!0 === r.unstable_strictMode && (o = !0),
            void 0 !== r.identifierPrefix && (a = r.identifierPrefix),
            void 0 !== r.onRecoverableError && (i = r.onRecoverableError)),
          (t = bp(t, null, e, 1, null != r ? r : null, o, 0, a, i)),
          (e[ua] = t.current),
          Sc(e),
          n)
        )
          for (e = 0; e < n.length; e++)
            (o = (o = (r = n[e])._getVersion)(r._source)),
              null == t.mutableSourceEagerHydrationData
                ? (t.mutableSourceEagerHydrationData = [r, o])
                : t.mutableSourceEagerHydrationData.push(r, o);
        return new _p(t);
      }),
      (ar.hydrateRoot = fs),
      (vs = function (e, t, r) {
        if (!Pp(t)) throw Error(ks(200));
        return Ip(null, e, t, !1, r);
      }),
      (ar.render = vs),
      (bs = function (e) {
        if (!Pp(e)) throw Error(ks(40));
        return (
          !!e._reactRootContainer &&
          ($h(function () {
            Ip(null, null, e, !1, function () {
              (e._reactRootContainer = null), (e[ua] = null);
            });
          }),
          !0)
        );
      }),
      (ar.unmountComponentAtNode = bs),
      (ys = Oh),
      (ar.unstable_batchedUpdates = ys),
      (ws = function (e, t, r, n) {
        if (!Pp(r)) throw Error(ks(200));
        if (null == e || void 0 === e._reactInternals) throw Error(ks(38));
        return Ip(e, t, r, !1, n);
      }),
      (ar.unstable_renderSubtreeIntoContainer = ws),
      "18.2.0-next-9e3b772b8-20220608",
      (ar.version = "18.2.0-next-9e3b772b8-20220608");
  }
  var Dp = {};
  !(function e() {
    if (
      "undefined" != typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
      "function" == typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE
    )
      try {
        __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e);
      } catch (e) {
        console.error(e);
      }
  })(),
    Cs || ((Cs = !0), Gp()),
    (R = (Dp = ar).createRoot),
    Dp.hydrateRoot,
    it();
  var Ap,
    Mp,
    Fp,
    Rp,
    Lp,
    Bp,
    Op,
    $p,
    Np = !1;
  function Up(e, t) {
    return (e === t && (0 !== e || 1 / e == 1 / t)) || (e != e && t != t);
  }
  var Hp = {};
  Np ||
    ((Np = !0),
    (Ap = {}),
    it(),
    (Mp = "function" == typeof Object.is ? Object.is : Up),
    (Fp = it().useSyncExternalStore),
    (Rp = it().useRef),
    (Lp = it().useEffect),
    (Bp = it().useMemo),
    (Op = it().useDebugValue),
    ($p = function (e, t, r, n, o) {
      var a = Rp(null);
      if (null === a.current) {
        var i = { hasValue: !1, value: null };
        a.current = i;
      } else i = a.current;
      a = Bp(
        function () {
          function e(e) {
            if (!l) {
              if (((l = !0), (a = e), (e = n(e)), void 0 !== o && i.hasValue)) {
                var t = i.value;
                if (o(t, e)) return (s = t);
              }
              return (s = e);
            }
            if (((t = s), Mp(a, e))) return t;
            var r = n(e);
            return void 0 !== o && o(t, r) ? t : ((a = e), (s = r));
          }
          var a,
            s,
            l = !1,
            c = void 0 === r ? null : r;
          return [
            function () {
              return e(t());
            },
            null === c
              ? void 0
              : function () {
                  return e(c());
                },
          ];
        },
        [t, r, n, o]
      );
      var s = Fp(e, a[0], a[1]);
      return (
        Lp(
          function () {
            (i.hasValue = !0), (i.value = s);
          },
          [s]
        ),
        Op(s),
        s
      );
    }),
    (Ap.useSyncExternalStoreWithSelector = $p)),
    (Hp = Ap),
    it();
  var zp = Object.defineProperty,
    jp = Object.defineProperties,
    Wp = Object.getOwnPropertyDescriptors,
    Vp = Object.getOwnPropertySymbols,
    qp = Object.prototype.hasOwnProperty,
    Zp = Object.prototype.propertyIsEnumerable,
    Yp = (e, t, r) =>
      t in e
        ? zp(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r })
        : (e[t] = r),
    Qp = (e, t) => {
      for (var r in t || (t = {})) qp.call(t, r) && Yp(e, r, t[r]);
      if (Vp) for (var r of Vp(t)) Zp.call(t, r) && Yp(e, r, t[r]);
      return e;
    },
    Kp = (e, t) => jp(e, Wp(t)),
    Xp = (e, t) => {
      var r = {};
      for (var n in e) qp.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
      if (null != e && Vp)
        for (var n of Vp(e)) t.indexOf(n) < 0 && Zp.call(e, n) && (r[n] = e[n]);
      return r;
    },
    Jp = "default" in it() ? ot : it(),
    em = Symbol.for("react-redux-context"),
    tm = "undefined" != typeof globalThis ? globalThis : {};
  function rm() {
    var e;
    if (!Jp.createContext) return {};
    const t = null != (e = tm[em]) ? e : (tm[em] = new Map());
    let r = t.get(Jp.createContext);
    return r || ((r = Jp.createContext(null)), t.set(Jp.createContext, r)), r;
  }
  var nm = rm(),
    om = () => {
      throw new Error("uSES not initialized!");
    };
  var am = Symbol.for("react.element"),
    im = Symbol.for("react.portal"),
    sm = Symbol.for("react.fragment"),
    lm = Symbol.for("react.strict_mode"),
    cm = Symbol.for("react.profiler"),
    um = Symbol.for("react.provider"),
    dm = Symbol.for("react.context"),
    hm = Symbol.for("react.server_context"),
    pm = Symbol.for("react.forward_ref"),
    mm = Symbol.for("react.suspense"),
    gm = Symbol.for("react.suspense_list"),
    fm = Symbol.for("react.memo"),
    vm = Symbol.for("react.lazy"),
    bm =
      (Symbol.for("react.offscreen"), Symbol.for("react.client.reference"), pm),
    ym = fm;
  function wm(e) {
    if ("object" == typeof e && null !== e) {
      const t = e.$$typeof;
      switch (t) {
        case am: {
          const r = e.type;
          switch (r) {
            case sm:
            case cm:
            case lm:
            case mm:
            case gm:
              return r;
            default: {
              const e = r && r.$$typeof;
              switch (e) {
                case hm:
                case dm:
                case pm:
                case vm:
                case fm:
                case um:
                  return e;
                default:
                  return t;
              }
            }
          }
        }
        case im:
          return t;
      }
    }
  }
  function Cm(
    e,
    t,
    r,
    n,
    { areStatesEqual: o, areOwnPropsEqual: a, areStatePropsEqual: i }
  ) {
    let s,
      l,
      c,
      u,
      d,
      h = !1;
    function p(h, p) {
      const m = !a(p, l),
        g = !o(h, s, p, l);
      return (
        (s = h),
        (l = p),
        m && g
          ? ((c = e(s, l)),
            t.dependsOnOwnProps && (u = t(n, l)),
            (d = r(c, u, l)),
            d)
          : m
          ? (e.dependsOnOwnProps && (c = e(s, l)),
            t.dependsOnOwnProps && (u = t(n, l)),
            (d = r(c, u, l)),
            d)
          : g
          ? (function () {
              const t = e(s, l),
                n = !i(t, c);
              return (c = t), n && (d = r(c, u, l)), d;
            })()
          : d
      );
    }
    return function (o, a) {
      return h
        ? p(o, a)
        : ((s = o),
          (l = a),
          (c = e(s, l)),
          (u = t(n, l)),
          (d = r(c, u, l)),
          (h = !0),
          d);
    };
  }
  function km(e, t) {
    var r = t,
      {
        initMapStateToProps: n,
        initMapDispatchToProps: o,
        initMergeProps: a,
      } = r,
      i = Xp(r, [
        "initMapStateToProps",
        "initMapDispatchToProps",
        "initMergeProps",
      ]);
    const s = n(e, i),
      l = o(e, i),
      c = a(e, i);
    return Cm(s, l, c, e, i);
  }
  function Sm(e) {
    return function (t) {
      const r = e(t);
      function n() {
        return r;
      }
      return (n.dependsOnOwnProps = !1), n;
    };
  }
  function Em(e) {
    return e.dependsOnOwnProps ? Boolean(e.dependsOnOwnProps) : 1 !== e.length;
  }
  function _m(e, t) {
    return function (t, { displayName: r }) {
      const n = function (e, t) {
        return n.dependsOnOwnProps
          ? n.mapToProps(e, t)
          : n.mapToProps(e, void 0);
      };
      return (
        (n.dependsOnOwnProps = !0),
        (n.mapToProps = function (t, r) {
          (n.mapToProps = e), (n.dependsOnOwnProps = Em(e));
          let o = n(t, r);
          return (
            "function" == typeof o &&
              ((n.mapToProps = o),
              (n.dependsOnOwnProps = Em(o)),
              (o = n(t, r))),
            o
          );
        }),
        n
      );
    };
  }
  function xm(e, t) {
    return (r, n) => {
      throw new Error(
        `Invalid value of type ${typeof e} for ${t} argument when connecting component ${
          n.wrappedComponentName
        }.`
      );
    };
  }
  function Pm(e, t, r) {
    return Qp(Qp(Qp({}, r), e), t);
  }
  function Tm(e) {
    e();
  }
  var Im = { notify: function () {}, get: () => [] };
  function Gm(e, t) {
    let r,
      n = Im,
      o = 0,
      a = !1;
    function i() {
      c.onStateChange && c.onStateChange();
    }
    function s() {
      o++,
        r ||
          ((r = t ? t.addNestedSub(i) : e.subscribe(i)),
          (n = (function () {
            let e = null,
              t = null;
            return {
              clear: function () {
                (e = null), (t = null);
              },
              notify: function () {
                Tm(() => {
                  let t = e;
                  for (; t; ) t.callback(), (t = t.next);
                });
              },
              get: function () {
                const t = [];
                let r = e;
                for (; r; ) t.push(r), (r = r.next);
                return t;
              },
              subscribe: function (r) {
                let n = !0;
                const o = (t = { callback: r, next: null, prev: t });
                return (
                  o.prev ? (o.prev.next = o) : (e = o),
                  function () {
                    n &&
                      null !== e &&
                      ((n = !1),
                      o.next ? (o.next.prev = o.prev) : (t = o.prev),
                      o.prev ? (o.prev.next = o.next) : (e = o.next));
                  }
                );
              },
            };
          })()));
    }
    function l() {
      o--, r && 0 === o && (r(), (r = void 0), n.clear(), (n = Im));
    }
    const c = {
      addNestedSub: function (e) {
        s();
        const t = n.subscribe(e);
        let r = !1;
        return () => {
          r || ((r = !0), t(), l());
        };
      },
      notifyNestedSubs: function () {
        n.notify();
      },
      handleChangeWrapper: i,
      isSubscribed: function () {
        return a;
      },
      trySubscribe: function () {
        a || ((a = !0), s());
      },
      tryUnsubscribe: function () {
        a && ((a = !1), l());
      },
      getListeners: () => n,
    };
    return c;
  }
  var Dm = !(
      "undefined" == typeof window ||
      void 0 === window.document ||
      void 0 === window.document.createElement
    ),
    Am = "undefined" != typeof navigator && "ReactNative" === navigator.product,
    Mm = Dm || Am ? Jp.useLayoutEffect : Jp.useEffect;
  function Fm(e, t) {
    return e === t ? 0 !== e || 0 !== t || 1 / e == 1 / t : e != e && t != t;
  }
  function Rm(e, t) {
    if (Fm(e, t)) return !0;
    if (
      "object" != typeof e ||
      null === e ||
      "object" != typeof t ||
      null === t
    )
      return !1;
    const r = Object.keys(e),
      n = Object.keys(t);
    if (r.length !== n.length) return !1;
    for (let n = 0; n < r.length; n++)
      if (
        !Object.prototype.hasOwnProperty.call(t, r[n]) ||
        !Fm(e[r[n]], t[r[n]])
      )
        return !1;
    return !0;
  }
  var Lm = {
      childContextTypes: !0,
      contextType: !0,
      contextTypes: !0,
      defaultProps: !0,
      displayName: !0,
      getDefaultProps: !0,
      getDerivedStateFromError: !0,
      getDerivedStateFromProps: !0,
      mixins: !0,
      propTypes: !0,
      type: !0,
    },
    Bm = {
      name: !0,
      length: !0,
      prototype: !0,
      caller: !0,
      callee: !0,
      arguments: !0,
      arity: !0,
    },
    Om = {
      $$typeof: !0,
      compare: !0,
      defaultProps: !0,
      displayName: !0,
      propTypes: !0,
      type: !0,
    },
    $m = {
      [bm]: {
        $$typeof: !0,
        render: !0,
        defaultProps: !0,
        displayName: !0,
        propTypes: !0,
      },
      [ym]: Om,
    };
  function Nm(e) {
    return wm(e) === fm ? Om : $m[e.$$typeof] || Lm;
  }
  var Um = Object.defineProperty,
    Hm = Object.getOwnPropertyNames,
    zm = Object.getOwnPropertySymbols,
    jm = Object.getOwnPropertyDescriptor,
    Wm = Object.getPrototypeOf,
    Vm = Object.prototype;
  function qm(e, t) {
    if ("string" != typeof t) {
      if (Vm) {
        const r = Wm(t);
        r && r !== Vm && qm(e, r);
      }
      let r = Hm(t);
      zm && (r = r.concat(zm(t)));
      const n = Nm(e),
        o = Nm(t);
      for (let a = 0; a < r.length; ++a) {
        const i = r[a];
        if (!(Bm[i] || (o && o[i]) || (n && n[i]))) {
          const r = jm(t, i);
          try {
            Um(e, i, r);
          } catch (e) {}
        }
      }
    }
    return e;
  }
  var Zm = om,
    Ym = [null, null];
  function Qm(e, t, r, n, o, a) {
    (e.current = n), (r.current = !1), o.current && ((o.current = null), a());
  }
  function Km(e, t) {
    return e === t;
  }
  var Xm = function (
    e,
    t,
    r,
    {
      pure: n,
      areStatesEqual: o = Km,
      areOwnPropsEqual: a = Rm,
      areStatePropsEqual: i = Rm,
      areMergedPropsEqual: s = Rm,
      forwardRef: l = !1,
      context: c = nm,
    } = {}
  ) {
    const u = c,
      d = (function (e) {
        return e
          ? "function" == typeof e
            ? _m(e)
            : xm(e, "mapStateToProps")
          : Sm(() => ({}));
      })(e),
      h = (function (e) {
        return e && "object" == typeof e
          ? Sm((t) =>
              (function (e, t) {
                const r = {};
                for (const n in e) {
                  const o = e[n];
                  "function" == typeof o && (r[n] = (...e) => t(o(...e)));
                }
                return r;
              })(e, t)
            )
          : e
          ? "function" == typeof e
            ? _m(e)
            : xm(e, "mapDispatchToProps")
          : Sm((e) => ({ dispatch: e }));
      })(t),
      p = (function (e) {
        return e
          ? "function" == typeof e
            ? (function (e) {
                return function (
                  t,
                  { displayName: r, areMergedPropsEqual: n }
                ) {
                  let o,
                    a = !1;
                  return function (t, r, i) {
                    const s = e(t, r, i);
                    return a ? n(s, o) || (o = s) : ((a = !0), (o = s)), o;
                  };
                };
              })(e)
            : xm(e, "mergeProps")
          : () => Pm;
      })(r),
      m = Boolean(e);
    return (e) => {
      const t = e.displayName || e.name || "Component",
        r = `Connect(${t})`,
        n = {
          shouldHandleStateChanges: m,
          displayName: r,
          wrappedComponentName: t,
          WrappedComponent: e,
          initMapStateToProps: d,
          initMapDispatchToProps: h,
          initMergeProps: p,
          areStatesEqual: o,
          areStatePropsEqual: i,
          areOwnPropsEqual: a,
          areMergedPropsEqual: s,
        };
      function c(t) {
        const [r, o, a] = Jp.useMemo(() => {
            const e = t,
              { reactReduxForwardedRef: r } = e,
              n = Xp(e, ["reactReduxForwardedRef"]);
            return [t.context, r, n];
          }, [t]),
          i = Jp.useMemo(() => {
            let e = u;
            return null == r || r.Consumer, e;
          }, [r, u]),
          s = Jp.useContext(i),
          l =
            Boolean(t.store) &&
            Boolean(t.store.getState) &&
            Boolean(t.store.dispatch),
          c = Boolean(s) && Boolean(s.store);
        const d = l ? t.store : s.store,
          h = c ? s.getServerState : d.getState,
          p = Jp.useMemo(() => km(d.dispatch, n), [d]),
          [g, f] = Jp.useMemo(() => {
            if (!m) return Ym;
            const e = Gm(d, l ? void 0 : s.subscription),
              t = e.notifyNestedSubs.bind(e);
            return [e, t];
          }, [d, l, s]),
          v = Jp.useMemo(
            () => (l ? s : Kp(Qp({}, s), { subscription: g })),
            [l, s, g]
          ),
          b = Jp.useRef(void 0),
          y = Jp.useRef(a),
          w = Jp.useRef(void 0),
          C = Jp.useRef(!1),
          k = Jp.useRef(!1),
          S = Jp.useRef(void 0);
        Mm(
          () => (
            (k.current = !0),
            () => {
              k.current = !1;
            }
          ),
          []
        );
        const E = Jp.useMemo(
            () => () =>
              w.current && a === y.current ? w.current : p(d.getState(), a),
            [d, a]
          ),
          _ = Jp.useMemo(
            () => (e) =>
              g
                ? (function (e, t, r, n, o, a, i, s, l, c, u) {
                    if (!e) return () => {};
                    let d = !1,
                      h = null;
                    const p = () => {
                      if (d || !s.current) return;
                      const e = t.getState();
                      let r, p;
                      try {
                        r = n(e, o.current);
                      } catch (e) {
                        (p = e), (h = e);
                      }
                      p || (h = null),
                        r === a.current
                          ? i.current || c()
                          : ((a.current = r),
                            (l.current = r),
                            (i.current = !0),
                            u());
                    };
                    return (
                      (r.onStateChange = p),
                      r.trySubscribe(),
                      p(),
                      () => {
                        if (
                          ((d = !0),
                          r.tryUnsubscribe(),
                          (r.onStateChange = null),
                          h)
                        )
                          throw h;
                      }
                    );
                  })(m, d, g, p, y, b, C, k, w, f, e)
                : () => {},
            [g]
          );
        var x, P, T;
        let I;
        (x = Qm), (P = [y, b, C, a, w, f]), Mm(() => x(...P), T);
        try {
          I = Zm(_, E, h ? () => p(h(), a) : E);
        } catch (e) {
          throw (
            (S.current &&
              (e.message += `\nThe error may be correlated with this previous error:\n${S.current.stack}\n\n`),
            e)
          );
        }
        Mm(() => {
          (S.current = void 0), (w.current = void 0), (b.current = I);
        });
        const G = Jp.useMemo(
          () => Jp.createElement(e, Kp(Qp({}, I), { ref: o })),
          [o, e, I]
        );
        return Jp.useMemo(
          () => (m ? Jp.createElement(i.Provider, { value: v }, G) : G),
          [i, G, v]
        );
      }
      const g = Jp.memo(c);
      if (((g.WrappedComponent = e), (g.displayName = c.displayName = r), l)) {
        const t = Jp.forwardRef(function (e, t) {
          return Jp.createElement(
            g,
            Kp(Qp({}, e), { reactReduxForwardedRef: t })
          );
        });
        return (t.displayName = r), (t.WrappedComponent = e), qm(t, e);
      }
      return qm(g, e);
    };
  };
  var Jm = function ({
    store: e,
    context: t,
    children: r,
    serverState: n,
    stabilityCheck: o = "once",
    identityFunctionCheck: a = "once",
  }) {
    const i = Jp.useMemo(() => {
        const t = Gm(e);
        return {
          store: e,
          subscription: t,
          getServerState: n ? () => n : void 0,
          stabilityCheck: o,
          identityFunctionCheck: a,
        };
      }, [e, n, o, a]),
      s = Jp.useMemo(() => e.getState(), [e]);
    Mm(() => {
      const { subscription: t } = i;
      return (
        (t.onStateChange = t.notifyNestedSubs),
        t.trySubscribe(),
        s !== e.getState() && t.notifyNestedSubs(),
        () => {
          t.tryUnsubscribe(), (t.onStateChange = void 0);
        }
      );
    }, [i, s]);
    const l = t || nm;
    return Jp.createElement(l.Provider, { value: i }, r);
  };
  var eg;
  (eg = Hp.useSyncExternalStoreWithSelector),
    ((e) => {
      Zm = e;
    })(it().useSyncExternalStore);
  var tg,
    rg,
    ng,
    og = {},
    ag = (tg = {});
  function ig() {
    throw new Error("setTimeout has not been defined");
  }
  function sg() {
    throw new Error("clearTimeout has not been defined");
  }
  function lg(e) {
    if (rg === setTimeout) return setTimeout(e, 0);
    if ((rg === ig || !rg) && setTimeout)
      return (rg = setTimeout), setTimeout(e, 0);
    try {
      return rg(e, 0);
    } catch (t) {
      try {
        return rg.call(null, e, 0);
      } catch (t) {
        return rg.call(this, e, 0);
      }
    }
  }
  !(function () {
    try {
      rg = "function" == typeof setTimeout ? setTimeout : ig;
    } catch (e) {
      rg = ig;
    }
    try {
      ng = "function" == typeof clearTimeout ? clearTimeout : sg;
    } catch (e) {
      ng = sg;
    }
  })();
  var cg,
    ug = [],
    dg = !1,
    hg = -1;
  function pg() {
    dg &&
      cg &&
      ((dg = !1),
      cg.length ? (ug = cg.concat(ug)) : (hg = -1),
      ug.length && mg());
  }
  function mg() {
    if (!dg) {
      var e = lg(pg);
      dg = !0;
      for (var t = ug.length; t; ) {
        for (cg = ug, ug = []; ++hg < t; ) cg && cg[hg].run();
        (hg = -1), (t = ug.length);
      }
      (cg = null),
        (dg = !1),
        (function (e) {
          if (ng === clearTimeout) return clearTimeout(e);
          if ((ng === sg || !ng) && clearTimeout)
            return (ng = clearTimeout), clearTimeout(e);
          try {
            ng(e);
          } catch (t) {
            try {
              return ng.call(null, e);
            } catch (t) {
              return ng.call(this, e);
            }
          }
        })(e);
    }
  }
  function gg(e, t) {
    (this.fun = e), (this.array = t);
  }
  function fg() {}
  (ag.nextTick = function (e) {
    var t = new Array(arguments.length - 1);
    if (arguments.length > 1)
      for (var r = 1; r < arguments.length; r++) t[r - 1] = arguments[r];
    ug.push(new gg(e, t)), 1 !== ug.length || dg || lg(mg);
  }),
    (gg.prototype.run = function () {
      this.fun.apply(null, this.array);
    }),
    (ag.title = "browser"),
    (ag.browser = !0),
    (ag.env = {}),
    (ag.argv = []),
    (ag.version = ""),
    (ag.versions = {}),
    (ag.on = fg),
    (ag.addListener = fg),
    (ag.once = fg),
    (ag.off = fg),
    (ag.removeListener = fg),
    (ag.removeAllListeners = fg),
    (ag.emit = fg),
    (ag.prependListener = fg),
    (ag.prependOnceListener = fg),
    (ag.listeners = function (e) {
      return [];
    }),
    (ag.binding = function (e) {
      throw new Error("process.binding is not supported");
    }),
    (ag.cwd = function () {
      return "/";
    }),
    (ag.chdir = function (e) {
      throw new Error("process.chdir is not supported");
    }),
    (ag.umask = function () {
      return 0;
    });
  var vg = tg;
  !(function () {
    var t = "input is invalid type",
      r = "object" == typeof window,
      n = r ? window : {};
    n.JS_SHA256_NO_WINDOW && (r = !1);
    var o = !r && "object" == typeof self,
      a =
        !n.JS_SHA256_NO_NODE_JS &&
        "object" == typeof vg &&
        vg.versions &&
        vg.versions.node;
    a ? (n = e) : o && (n = self);
    var i = !n.JS_SHA256_NO_COMMON_JS && og,
      s = !n.JS_SHA256_NO_ARRAY_BUFFER && "undefined" != typeof ArrayBuffer,
      l = "0123456789abcdef".split(""),
      c = [-2147483648, 8388608, 32768, 128],
      u = [24, 16, 8, 0],
      d = [
        1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993,
        2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987,
        1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774,
        264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986,
        2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711,
        113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291,
        1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411,
        3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344,
        430227734, 506948616, 659060556, 883997877, 958139571, 1322822218,
        1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424,
        2428436474, 2756734187, 3204031479, 3329325298,
      ],
      h = ["hex", "array", "digest", "arrayBuffer"],
      p = [];
    (!n.JS_SHA256_NO_NODE_JS && Array.isArray) ||
      (Array.isArray = function (e) {
        return "[object Array]" === Object.prototype.toString.call(e);
      }),
      !s ||
        (!n.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW && ArrayBuffer.isView) ||
        (ArrayBuffer.isView = function (e) {
          return (
            "object" == typeof e &&
            e.buffer &&
            e.buffer.constructor === ArrayBuffer
          );
        });
    var m = function (e, t) {
        return function (r) {
          return new y(t, !0).update(r)[e]();
        };
      },
      g = function (e) {
        var t = m("hex", e);
        a && (t = f(t, e)),
          (t.create = function () {
            return new y(e);
          }),
          (t.update = function (e) {
            return t.create().update(e);
          });
        for (var r = 0; r < h.length; ++r) {
          var n = h[r];
          t[n] = m(n, e);
        }
        return t;
      },
      f = function (e, t) {},
      v = function (e, t) {
        return function (r, n) {
          return new w(r, t, !0).update(n)[e]();
        };
      },
      b = function (e) {
        var t = v("hex", e);
        (t.create = function (t) {
          return new w(t, e);
        }),
          (t.update = function (e, r) {
            return t.create(e).update(r);
          });
        for (var r = 0; r < h.length; ++r) {
          var n = h[r];
          t[n] = v(n, e);
        }
        return t;
      };
    function y(e, t) {
      t
        ? ((p[0] =
            p[16] =
            p[1] =
            p[2] =
            p[3] =
            p[4] =
            p[5] =
            p[6] =
            p[7] =
            p[8] =
            p[9] =
            p[10] =
            p[11] =
            p[12] =
            p[13] =
            p[14] =
            p[15] =
              0),
          (this.blocks = p))
        : (this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]),
        e
          ? ((this.h0 = 3238371032),
            (this.h1 = 914150663),
            (this.h2 = 812702999),
            (this.h3 = 4144912697),
            (this.h4 = 4290775857),
            (this.h5 = 1750603025),
            (this.h6 = 1694076839),
            (this.h7 = 3204075428))
          : ((this.h0 = 1779033703),
            (this.h1 = 3144134277),
            (this.h2 = 1013904242),
            (this.h3 = 2773480762),
            (this.h4 = 1359893119),
            (this.h5 = 2600822924),
            (this.h6 = 528734635),
            (this.h7 = 1541459225)),
        (this.block = this.start = this.bytes = this.hBytes = 0),
        (this.finalized = this.hashed = !1),
        (this.first = !0),
        (this.is224 = e);
    }
    function w(e, r, n) {
      var o,
        a = typeof e;
      if ("string" === a) {
        var i,
          l = [],
          c = e.length,
          u = 0;
        for (o = 0; o < c; ++o)
          (i = e.charCodeAt(o)) < 128
            ? (l[u++] = i)
            : i < 2048
            ? ((l[u++] = 192 | (i >> 6)), (l[u++] = 128 | (63 & i)))
            : i < 55296 || i >= 57344
            ? ((l[u++] = 224 | (i >> 12)),
              (l[u++] = 128 | ((i >> 6) & 63)),
              (l[u++] = 128 | (63 & i)))
            : ((i = 65536 + (((1023 & i) << 10) | (1023 & e.charCodeAt(++o)))),
              (l[u++] = 240 | (i >> 18)),
              (l[u++] = 128 | ((i >> 12) & 63)),
              (l[u++] = 128 | ((i >> 6) & 63)),
              (l[u++] = 128 | (63 & i)));
        e = l;
      } else {
        if ("object" !== a) throw new Error(t);
        if (null === e) throw new Error(t);
        if (s && e.constructor === ArrayBuffer) e = new Uint8Array(e);
        else if (!(Array.isArray(e) || (s && ArrayBuffer.isView(e))))
          throw new Error(t);
      }
      e.length > 64 && (e = new y(r, !0).update(e).array());
      var d = [],
        h = [];
      for (o = 0; o < 64; ++o) {
        var p = e[o] || 0;
        (d[o] = 92 ^ p), (h[o] = 54 ^ p);
      }
      y.call(this, r, n),
        this.update(h),
        (this.oKeyPad = d),
        (this.inner = !0),
        (this.sharedMemory = n);
    }
    (y.prototype.update = function (e) {
      if (!this.finalized) {
        var r,
          n = typeof e;
        if ("string" !== n) {
          if ("object" !== n) throw new Error(t);
          if (null === e) throw new Error(t);
          if (s && e.constructor === ArrayBuffer) e = new Uint8Array(e);
          else if (!(Array.isArray(e) || (s && ArrayBuffer.isView(e))))
            throw new Error(t);
          r = !0;
        }
        for (var o, a, i = 0, l = e.length, c = this.blocks; i < l; ) {
          if (
            (this.hashed &&
              ((this.hashed = !1),
              (c[0] = this.block),
              (c[16] =
                c[1] =
                c[2] =
                c[3] =
                c[4] =
                c[5] =
                c[6] =
                c[7] =
                c[8] =
                c[9] =
                c[10] =
                c[11] =
                c[12] =
                c[13] =
                c[14] =
                c[15] =
                  0)),
            r)
          )
            for (a = this.start; i < l && a < 64; ++i)
              c[a >> 2] |= e[i] << u[3 & a++];
          else
            for (a = this.start; i < l && a < 64; ++i)
              (o = e.charCodeAt(i)) < 128
                ? (c[a >> 2] |= o << u[3 & a++])
                : o < 2048
                ? ((c[a >> 2] |= (192 | (o >> 6)) << u[3 & a++]),
                  (c[a >> 2] |= (128 | (63 & o)) << u[3 & a++]))
                : o < 55296 || o >= 57344
                ? ((c[a >> 2] |= (224 | (o >> 12)) << u[3 & a++]),
                  (c[a >> 2] |= (128 | ((o >> 6) & 63)) << u[3 & a++]),
                  (c[a >> 2] |= (128 | (63 & o)) << u[3 & a++]))
                : ((o =
                    65536 + (((1023 & o) << 10) | (1023 & e.charCodeAt(++i)))),
                  (c[a >> 2] |= (240 | (o >> 18)) << u[3 & a++]),
                  (c[a >> 2] |= (128 | ((o >> 12) & 63)) << u[3 & a++]),
                  (c[a >> 2] |= (128 | ((o >> 6) & 63)) << u[3 & a++]),
                  (c[a >> 2] |= (128 | (63 & o)) << u[3 & a++]));
          (this.lastByteIndex = a),
            (this.bytes += a - this.start),
            a >= 64
              ? ((this.block = c[16]),
                (this.start = a - 64),
                this.hash(),
                (this.hashed = !0))
              : (this.start = a);
        }
        return (
          this.bytes > 4294967295 &&
            ((this.hBytes += (this.bytes / 4294967296) << 0),
            (this.bytes = this.bytes % 4294967296)),
          this
        );
      }
    }),
      (y.prototype.finalize = function () {
        if (!this.finalized) {
          this.finalized = !0;
          var e = this.blocks,
            t = this.lastByteIndex;
          (e[16] = this.block),
            (e[t >> 2] |= c[3 & t]),
            (this.block = e[16]),
            t >= 56 &&
              (this.hashed || this.hash(),
              (e[0] = this.block),
              (e[16] =
                e[1] =
                e[2] =
                e[3] =
                e[4] =
                e[5] =
                e[6] =
                e[7] =
                e[8] =
                e[9] =
                e[10] =
                e[11] =
                e[12] =
                e[13] =
                e[14] =
                e[15] =
                  0)),
            (e[14] = (this.hBytes << 3) | (this.bytes >>> 29)),
            (e[15] = this.bytes << 3),
            this.hash();
        }
      }),
      (y.prototype.hash = function () {
        var e,
          t,
          r,
          n,
          o,
          a,
          i,
          s,
          l,
          c = this.h0,
          u = this.h1,
          h = this.h2,
          p = this.h3,
          m = this.h4,
          g = this.h5,
          f = this.h6,
          v = this.h7,
          b = this.blocks;
        for (e = 16; e < 64; ++e)
          (t =
            (((o = b[e - 15]) >>> 7) | (o << 25)) ^
            ((o >>> 18) | (o << 14)) ^
            (o >>> 3)),
            (r =
              (((o = b[e - 2]) >>> 17) | (o << 15)) ^
              ((o >>> 19) | (o << 13)) ^
              (o >>> 10)),
            (b[e] = (b[e - 16] + t + b[e - 7] + r) << 0);
        for (l = u & h, e = 0; e < 64; e += 4)
          this.first
            ? (this.is224
                ? ((a = 300032),
                  (v = ((o = b[0] - 1413257819) - 150054599) << 0),
                  (p = (o + 24177077) << 0))
                : ((a = 704751109),
                  (v = ((o = b[0] - 210244248) - 1521486534) << 0),
                  (p = (o + 143694565) << 0)),
              (this.first = !1))
            : ((t =
                ((c >>> 2) | (c << 30)) ^
                ((c >>> 13) | (c << 19)) ^
                ((c >>> 22) | (c << 10))),
              (n = (a = c & u) ^ (c & h) ^ l),
              (v =
                (p +
                  (o =
                    v +
                    (r =
                      ((m >>> 6) | (m << 26)) ^
                      ((m >>> 11) | (m << 21)) ^
                      ((m >>> 25) | (m << 7))) +
                    ((m & g) ^ (~m & f)) +
                    d[e] +
                    b[e])) <<
                0),
              (p = (o + (t + n)) << 0)),
            (t =
              ((p >>> 2) | (p << 30)) ^
              ((p >>> 13) | (p << 19)) ^
              ((p >>> 22) | (p << 10))),
            (n = (i = p & c) ^ (p & u) ^ a),
            (f =
              (h +
                (o =
                  f +
                  (r =
                    ((v >>> 6) | (v << 26)) ^
                    ((v >>> 11) | (v << 21)) ^
                    ((v >>> 25) | (v << 7))) +
                  ((v & m) ^ (~v & g)) +
                  d[e + 1] +
                  b[e + 1])) <<
              0),
            (t =
              (((h = (o + (t + n)) << 0) >>> 2) | (h << 30)) ^
              ((h >>> 13) | (h << 19)) ^
              ((h >>> 22) | (h << 10))),
            (n = (s = h & p) ^ (h & c) ^ i),
            (g =
              (u +
                (o =
                  g +
                  (r =
                    ((f >>> 6) | (f << 26)) ^
                    ((f >>> 11) | (f << 21)) ^
                    ((f >>> 25) | (f << 7))) +
                  ((f & v) ^ (~f & m)) +
                  d[e + 2] +
                  b[e + 2])) <<
              0),
            (t =
              (((u = (o + (t + n)) << 0) >>> 2) | (u << 30)) ^
              ((u >>> 13) | (u << 19)) ^
              ((u >>> 22) | (u << 10))),
            (n = (l = u & h) ^ (u & p) ^ s),
            (m =
              (c +
                (o =
                  m +
                  (r =
                    ((g >>> 6) | (g << 26)) ^
                    ((g >>> 11) | (g << 21)) ^
                    ((g >>> 25) | (g << 7))) +
                  ((g & f) ^ (~g & v)) +
                  d[e + 3] +
                  b[e + 3])) <<
              0),
            (c = (o + (t + n)) << 0);
        (this.h0 = (this.h0 + c) << 0),
          (this.h1 = (this.h1 + u) << 0),
          (this.h2 = (this.h2 + h) << 0),
          (this.h3 = (this.h3 + p) << 0),
          (this.h4 = (this.h4 + m) << 0),
          (this.h5 = (this.h5 + g) << 0),
          (this.h6 = (this.h6 + f) << 0),
          (this.h7 = (this.h7 + v) << 0);
      }),
      (y.prototype.hex = function () {
        this.finalize();
        var e = this.h0,
          t = this.h1,
          r = this.h2,
          n = this.h3,
          o = this.h4,
          a = this.h5,
          i = this.h6,
          s = this.h7,
          c =
            l[(e >> 28) & 15] +
            l[(e >> 24) & 15] +
            l[(e >> 20) & 15] +
            l[(e >> 16) & 15] +
            l[(e >> 12) & 15] +
            l[(e >> 8) & 15] +
            l[(e >> 4) & 15] +
            l[15 & e] +
            l[(t >> 28) & 15] +
            l[(t >> 24) & 15] +
            l[(t >> 20) & 15] +
            l[(t >> 16) & 15] +
            l[(t >> 12) & 15] +
            l[(t >> 8) & 15] +
            l[(t >> 4) & 15] +
            l[15 & t] +
            l[(r >> 28) & 15] +
            l[(r >> 24) & 15] +
            l[(r >> 20) & 15] +
            l[(r >> 16) & 15] +
            l[(r >> 12) & 15] +
            l[(r >> 8) & 15] +
            l[(r >> 4) & 15] +
            l[15 & r] +
            l[(n >> 28) & 15] +
            l[(n >> 24) & 15] +
            l[(n >> 20) & 15] +
            l[(n >> 16) & 15] +
            l[(n >> 12) & 15] +
            l[(n >> 8) & 15] +
            l[(n >> 4) & 15] +
            l[15 & n] +
            l[(o >> 28) & 15] +
            l[(o >> 24) & 15] +
            l[(o >> 20) & 15] +
            l[(o >> 16) & 15] +
            l[(o >> 12) & 15] +
            l[(o >> 8) & 15] +
            l[(o >> 4) & 15] +
            l[15 & o] +
            l[(a >> 28) & 15] +
            l[(a >> 24) & 15] +
            l[(a >> 20) & 15] +
            l[(a >> 16) & 15] +
            l[(a >> 12) & 15] +
            l[(a >> 8) & 15] +
            l[(a >> 4) & 15] +
            l[15 & a] +
            l[(i >> 28) & 15] +
            l[(i >> 24) & 15] +
            l[(i >> 20) & 15] +
            l[(i >> 16) & 15] +
            l[(i >> 12) & 15] +
            l[(i >> 8) & 15] +
            l[(i >> 4) & 15] +
            l[15 & i];
        return (
          this.is224 ||
            (c +=
              l[(s >> 28) & 15] +
              l[(s >> 24) & 15] +
              l[(s >> 20) & 15] +
              l[(s >> 16) & 15] +
              l[(s >> 12) & 15] +
              l[(s >> 8) & 15] +
              l[(s >> 4) & 15] +
              l[15 & s]),
          c
        );
      }),
      (y.prototype.toString = y.prototype.hex),
      (y.prototype.digest = function () {
        this.finalize();
        var e = this.h0,
          t = this.h1,
          r = this.h2,
          n = this.h3,
          o = this.h4,
          a = this.h5,
          i = this.h6,
          s = this.h7,
          l = [
            (e >> 24) & 255,
            (e >> 16) & 255,
            (e >> 8) & 255,
            255 & e,
            (t >> 24) & 255,
            (t >> 16) & 255,
            (t >> 8) & 255,
            255 & t,
            (r >> 24) & 255,
            (r >> 16) & 255,
            (r >> 8) & 255,
            255 & r,
            (n >> 24) & 255,
            (n >> 16) & 255,
            (n >> 8) & 255,
            255 & n,
            (o >> 24) & 255,
            (o >> 16) & 255,
            (o >> 8) & 255,
            255 & o,
            (a >> 24) & 255,
            (a >> 16) & 255,
            (a >> 8) & 255,
            255 & a,
            (i >> 24) & 255,
            (i >> 16) & 255,
            (i >> 8) & 255,
            255 & i,
          ];
        return (
          this.is224 ||
            l.push((s >> 24) & 255, (s >> 16) & 255, (s >> 8) & 255, 255 & s),
          l
        );
      }),
      (y.prototype.array = y.prototype.digest),
      (y.prototype.arrayBuffer = function () {
        this.finalize();
        var e = new ArrayBuffer(this.is224 ? 28 : 32),
          t = new DataView(e);
        return (
          t.setUint32(0, this.h0),
          t.setUint32(4, this.h1),
          t.setUint32(8, this.h2),
          t.setUint32(12, this.h3),
          t.setUint32(16, this.h4),
          t.setUint32(20, this.h5),
          t.setUint32(24, this.h6),
          this.is224 || t.setUint32(28, this.h7),
          e
        );
      }),
      (w.prototype = new y()),
      (w.prototype.finalize = function () {
        if ((y.prototype.finalize.call(this), this.inner)) {
          this.inner = !1;
          var e = this.array();
          y.call(this, this.is224, this.sharedMemory),
            this.update(this.oKeyPad),
            this.update(e),
            y.prototype.finalize.call(this);
        }
      });
    var C = g();
    (C.sha256 = C),
      (C.sha224 = g(!0)),
      (C.sha256.hmac = b()),
      (C.sha224.hmac = b(!0)),
      i ? (og = C) : ((n.sha256 = C.sha256), (n.sha224 = C.sha224));
  })();
  var bg = t(og);
  function yg(e) {
    if (null === e || !0 === e || !1 === e) return NaN;
    var t = Number(e);
    return isNaN(t) ? t : t < 0 ? Math.ceil(t) : Math.floor(t);
  }
  function wg(e, t) {
    if (t.length < e)
      throw new TypeError(
        e +
          " argument" +
          (e > 1 ? "s" : "") +
          " required, but only " +
          t.length +
          " present"
      );
  }
  function Cg(e) {
    wg(1, arguments);
    var t = Object.prototype.toString.call(e);
    return e instanceof Date || ("object" == typeof e && "[object Date]" === t)
      ? new Date(e.getTime())
      : "number" == typeof e || "[object Number]" === t
      ? new Date(e)
      : (("string" != typeof e && "[object String]" !== t) ||
          "undefined" == typeof console ||
          (console.warn(
            "Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"
          ),
          console.warn(new Error().stack)),
        new Date(NaN));
  }
  function kg(e, t) {
    wg(2, arguments);
    var r = Cg(e),
      n = yg(t);
    return isNaN(n) ? new Date(NaN) : n ? (r.setDate(r.getDate() + n), r) : r;
  }
  var Sg = 6e4;
  function Eg(e) {
    return e.getTime() % Sg;
  }
  function _g(e) {
    var t = new Date(e.getTime()),
      r = Math.ceil(t.getTimezoneOffset());
    t.setSeconds(0, 0);
    var n = r > 0 ? (Sg + Eg(t)) % Sg : Eg(t);
    return r * Sg + n;
  }
  function xg(e) {
    wg(1, arguments);
    var t = Cg(e);
    return t.setHours(0, 0, 0, 0), t;
  }
  var Pg = 864e5;
  function Tg(e) {
    wg(1, arguments);
    var t = Cg(e);
    return !isNaN(t);
  }
  var Ig = {
    lessThanXSeconds: {
      one: "less than a second",
      other: "less than {{count}} seconds",
    },
    xSeconds: { one: "1 second", other: "{{count}} seconds" },
    halfAMinute: "half a minute",
    lessThanXMinutes: {
      one: "less than a minute",
      other: "less than {{count}} minutes",
    },
    xMinutes: { one: "1 minute", other: "{{count}} minutes" },
    aboutXHours: { one: "about 1 hour", other: "about {{count}} hours" },
    xHours: { one: "1 hour", other: "{{count}} hours" },
    xDays: { one: "1 day", other: "{{count}} days" },
    aboutXWeeks: { one: "about 1 week", other: "about {{count}} weeks" },
    xWeeks: { one: "1 week", other: "{{count}} weeks" },
    aboutXMonths: { one: "about 1 month", other: "about {{count}} months" },
    xMonths: { one: "1 month", other: "{{count}} months" },
    aboutXYears: { one: "about 1 year", other: "about {{count}} years" },
    xYears: { one: "1 year", other: "{{count}} years" },
    overXYears: { one: "over 1 year", other: "over {{count}} years" },
    almostXYears: { one: "almost 1 year", other: "almost {{count}} years" },
  };
  function Gg(e) {
    return function (t) {
      var r = t || {},
        n = r.width ? String(r.width) : e.defaultWidth;
      return e.formats[n] || e.formats[e.defaultWidth];
    };
  }
  var Dg = {
      date: Gg({
        formats: {
          full: "EEEE, MMMM do, y",
          long: "MMMM do, y",
          medium: "MMM d, y",
          short: "MM/dd/yyyy",
        },
        defaultWidth: "full",
      }),
      time: Gg({
        formats: {
          full: "h:mm:ss a zzzz",
          long: "h:mm:ss a z",
          medium: "h:mm:ss a",
          short: "h:mm a",
        },
        defaultWidth: "full",
      }),
      dateTime: Gg({
        formats: {
          full: "{{date}} 'at' {{time}}",
          long: "{{date}} 'at' {{time}}",
          medium: "{{date}}, {{time}}",
          short: "{{date}}, {{time}}",
        },
        defaultWidth: "full",
      }),
    },
    Ag = {
      lastWeek: "'last' eeee 'at' p",
      yesterday: "'yesterday at' p",
      today: "'today at' p",
      tomorrow: "'tomorrow at' p",
      nextWeek: "eeee 'at' p",
      other: "P",
    };
  function Mg(e) {
    return function (t, r) {
      var n,
        o = r || {};
      if (
        "formatting" === (o.context ? String(o.context) : "standalone") &&
        e.formattingValues
      ) {
        var a = e.defaultFormattingWidth || e.defaultWidth,
          i = o.width ? String(o.width) : a;
        n = e.formattingValues[i] || e.formattingValues[a];
      } else {
        var s = e.defaultWidth,
          l = o.width ? String(o.width) : e.defaultWidth;
        n = e.values[l] || e.values[s];
      }
      return n[e.argumentCallback ? e.argumentCallback(t) : t];
    };
  }
  function Fg(e) {
    return function (t, r) {
      var n = String(t),
        o = r || {},
        a = o.width,
        i = (a && e.matchPatterns[a]) || e.matchPatterns[e.defaultMatchWidth],
        s = n.match(i);
      if (!s) return null;
      var l,
        c = s[0],
        u = (a && e.parsePatterns[a]) || e.parsePatterns[e.defaultParseWidth];
      return (
        (l =
          "[object Array]" === Object.prototype.toString.call(u)
            ? (function (e, t) {
                for (var r = 0; r < e.length; r++) if (t(e[r])) return r;
              })(u, function (e) {
                return e.test(c);
              })
            : (function (e, t) {
                for (var r in e) if (e.hasOwnProperty(r) && t(e[r])) return r;
              })(u, function (e) {
                return e.test(c);
              })),
        (l = e.valueCallback ? e.valueCallback(l) : l),
        {
          value: (l = o.valueCallback ? o.valueCallback(l) : l),
          rest: n.slice(c.length),
        }
      );
    };
  }
  var Rg,
    Lg = {
      code: "en-US",
      formatDistance: function (e, t, r) {
        var n;
        return (
          (r = r || {}),
          (n =
            "string" == typeof Ig[e]
              ? Ig[e]
              : 1 === t
              ? Ig[e].one
              : Ig[e].other.replace("{{count}}", t)),
          r.addSuffix ? (r.comparison > 0 ? "in " + n : n + " ago") : n
        );
      },
      formatLong: Dg,
      formatRelative: function (e, t, r, n) {
        return Ag[e];
      },
      localize: {
        ordinalNumber: function (e, t) {
          var r = Number(e),
            n = r % 100;
          if (n > 20 || n < 10)
            switch (n % 10) {
              case 1:
                return r + "st";
              case 2:
                return r + "nd";
              case 3:
                return r + "rd";
            }
          return r + "th";
        },
        era: Mg({
          values: {
            narrow: ["B", "A"],
            abbreviated: ["BC", "AD"],
            wide: ["Before Christ", "Anno Domini"],
          },
          defaultWidth: "wide",
        }),
        quarter: Mg({
          values: {
            narrow: ["1", "2", "3", "4"],
            abbreviated: ["Q1", "Q2", "Q3", "Q4"],
            wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"],
          },
          defaultWidth: "wide",
          argumentCallback: function (e) {
            return Number(e) - 1;
          },
        }),
        month: Mg({
          values: {
            narrow: [
              "J",
              "F",
              "M",
              "A",
              "M",
              "J",
              "J",
              "A",
              "S",
              "O",
              "N",
              "D",
            ],
            abbreviated: [
              "Jan",
              "Feb",
              "Mar",
              "Apr",
              "May",
              "Jun",
              "Jul",
              "Aug",
              "Sep",
              "Oct",
              "Nov",
              "Dec",
            ],
            wide: [
              "January",
              "February",
              "March",
              "April",
              "May",
              "June",
              "July",
              "August",
              "September",
              "October",
              "November",
              "December",
            ],
          },
          defaultWidth: "wide",
        }),
        day: Mg({
          values: {
            narrow: ["S", "M", "T", "W", "T", "F", "S"],
            short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
            abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
            wide: [
              "Sunday",
              "Monday",
              "Tuesday",
              "Wednesday",
              "Thursday",
              "Friday",
              "Saturday",
            ],
          },
          defaultWidth: "wide",
        }),
        dayPeriod: Mg({
          values: {
            narrow: {
              am: "a",
              pm: "p",
              midnight: "mi",
              noon: "n",
              morning: "morning",
              afternoon: "afternoon",
              evening: "evening",
              night: "night",
            },
            abbreviated: {
              am: "AM",
              pm: "PM",
              midnight: "midnight",
              noon: "noon",
              morning: "morning",
              afternoon: "afternoon",
              evening: "evening",
              night: "night",
            },
            wide: {
              am: "a.m.",
              pm: "p.m.",
              midnight: "midnight",
              noon: "noon",
              morning: "morning",
              afternoon: "afternoon",
              evening: "evening",
              night: "night",
            },
          },
          defaultWidth: "wide",
          formattingValues: {
            narrow: {
              am: "a",
              pm: "p",
              midnight: "mi",
              noon: "n",
              morning: "in the morning",
              afternoon: "in the afternoon",
              evening: "in the evening",
              night: "at night",
            },
            abbreviated: {
              am: "AM",
              pm: "PM",
              midnight: "midnight",
              noon: "noon",
              morning: "in the morning",
              afternoon: "in the afternoon",
              evening: "in the evening",
              night: "at night",
            },
            wide: {
              am: "a.m.",
              pm: "p.m.",
              midnight: "midnight",
              noon: "noon",
              morning: "in the morning",
              afternoon: "in the afternoon",
              evening: "in the evening",
              night: "at night",
            },
          },
          defaultFormattingWidth: "wide",
        }),
      },
      match: {
        ordinalNumber:
          ((Rg = {
            matchPattern: /^(\d+)(th|st|nd|rd)?/i,
            parsePattern: /\d+/i,
            valueCallback: function (e) {
              return parseInt(e, 10);
            },
          }),
          function (e, t) {
            var r = String(e),
              n = t || {},
              o = r.match(Rg.matchPattern);
            if (!o) return null;
            var a = o[0],
              i = r.match(Rg.parsePattern);
            if (!i) return null;
            var s = Rg.valueCallback ? Rg.valueCallback(i[0]) : i[0];
            return {
              value: (s = n.valueCallback ? n.valueCallback(s) : s),
              rest: r.slice(a.length),
            };
          }),
        era: Fg({
          matchPatterns: {
            narrow: /^(b|a)/i,
            abbreviated:
              /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
            wide: /^(before christ|before common era|anno domini|common era)/i,
          },
          defaultMatchWidth: "wide",
          parsePatterns: { any: [/^b/i, /^(a|c)/i] },
          defaultParseWidth: "any",
        }),
        quarter: Fg({
          matchPatterns: {
            narrow: /^[1234]/i,
            abbreviated: /^q[1234]/i,
            wide: /^[1234](th|st|nd|rd)? quarter/i,
          },
          defaultMatchWidth: "wide",
          parsePatterns: { any: [/1/i, /2/i, /3/i, /4/i] },
          defaultParseWidth: "any",
          valueCallback: function (e) {
            return e + 1;
          },
        }),
        month: Fg({
          matchPatterns: {
            narrow: /^[jfmasond]/i,
            abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
            wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i,
          },
          defaultMatchWidth: "wide",
          parsePatterns: {
            narrow: [
              /^j/i,
              /^f/i,
              /^m/i,
              /^a/i,
              /^m/i,
              /^j/i,
              /^j/i,
              /^a/i,
              /^s/i,
              /^o/i,
              /^n/i,
              /^d/i,
            ],
            any: [
              /^ja/i,
              /^f/i,
              /^mar/i,
              /^ap/i,
              /^may/i,
              /^jun/i,
              /^jul/i,
              /^au/i,
              /^s/i,
              /^o/i,
              /^n/i,
              /^d/i,
            ],
          },
          defaultParseWidth: "any",
        }),
        day: Fg({
          matchPatterns: {
            narrow: /^[smtwf]/i,
            short: /^(su|mo|tu|we|th|fr|sa)/i,
            abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
            wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i,
          },
          defaultMatchWidth: "wide",
          parsePatterns: {
            narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
            any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i],
          },
          defaultParseWidth: "any",
        }),
        dayPeriod: Fg({
          matchPatterns: {
            narrow:
              /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
            any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i,
          },
          defaultMatchWidth: "any",
          parsePatterns: {
            any: {
              am: /^a/i,
              pm: /^p/i,
              midnight: /^mi/i,
              noon: /^no/i,
              morning: /morning/i,
              afternoon: /afternoon/i,
              evening: /evening/i,
              night: /night/i,
            },
          },
          defaultParseWidth: "any",
        }),
      },
      options: { weekStartsOn: 0, firstWeekContainsDate: 1 },
    };
  function Bg(e, t) {
    wg(2, arguments);
    var r = Cg(e).getTime(),
      n = yg(t);
    return new Date(r + n);
  }
  function Og(e, t) {
    wg(2, arguments);
    var r = yg(t);
    return Bg(e, -r);
  }
  function $g(e, t) {
    for (var r = e < 0 ? "-" : "", n = Math.abs(e).toString(); n.length < t; )
      n = "0" + n;
    return r + n;
  }
  var Ng = function (e, t) {
      var r = e.getUTCFullYear(),
        n = r > 0 ? r : 1 - r;
      return $g("yy" === t ? n % 100 : n, t.length);
    },
    Ug = function (e, t) {
      var r = e.getUTCMonth();
      return "M" === t ? String(r + 1) : $g(r + 1, 2);
    },
    Hg = function (e, t) {
      return $g(e.getUTCDate(), t.length);
    },
    zg = function (e, t) {
      return $g(e.getUTCHours() % 12 || 12, t.length);
    },
    jg = function (e, t) {
      return $g(e.getUTCHours(), t.length);
    },
    Wg = function (e, t) {
      return $g(e.getUTCMinutes(), t.length);
    },
    Vg = function (e, t) {
      return $g(e.getUTCSeconds(), t.length);
    },
    qg = function (e, t) {
      var r = t.length,
        n = e.getUTCMilliseconds();
      return $g(Math.floor(n * Math.pow(10, r - 3)), t.length);
    },
    Zg = 864e5;
  function Yg(e) {
    wg(1, arguments);
    var t = 1,
      r = Cg(e),
      n = r.getUTCDay(),
      o = (n < t ? 7 : 0) + n - t;
    return r.setUTCDate(r.getUTCDate() - o), r.setUTCHours(0, 0, 0, 0), r;
  }
  function Qg(e) {
    wg(1, arguments);
    var t = Cg(e),
      r = t.getUTCFullYear(),
      n = new Date(0);
    n.setUTCFullYear(r + 1, 0, 4), n.setUTCHours(0, 0, 0, 0);
    var o = Yg(n),
      a = new Date(0);
    a.setUTCFullYear(r, 0, 4), a.setUTCHours(0, 0, 0, 0);
    var i = Yg(a);
    return t.getTime() >= o.getTime()
      ? r + 1
      : t.getTime() >= i.getTime()
      ? r
      : r - 1;
  }
  function Kg(e) {
    wg(1, arguments);
    var t = Qg(e),
      r = new Date(0);
    r.setUTCFullYear(t, 0, 4), r.setUTCHours(0, 0, 0, 0);
    var n = Yg(r);
    return n;
  }
  var Xg = 6048e5;
  function Jg(e) {
    wg(1, arguments);
    var t = Cg(e),
      r = Yg(t).getTime() - Kg(t).getTime();
    return Math.round(r / Xg) + 1;
  }
  function ef(e, t) {
    wg(1, arguments);
    var r = t || {},
      n = r.locale,
      o = n && n.options && n.options.weekStartsOn,
      a = null == o ? 0 : yg(o),
      i = null == r.weekStartsOn ? a : yg(r.weekStartsOn);
    if (!(i >= 0 && i <= 6))
      throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
    var s = Cg(e),
      l = s.getUTCDay(),
      c = (l < i ? 7 : 0) + l - i;
    return s.setUTCDate(s.getUTCDate() - c), s.setUTCHours(0, 0, 0, 0), s;
  }
  function tf(e, t) {
    wg(1, arguments);
    var r = Cg(e, t),
      n = r.getUTCFullYear(),
      o = t || {},
      a = o.locale,
      i = a && a.options && a.options.firstWeekContainsDate,
      s = null == i ? 1 : yg(i),
      l = null == o.firstWeekContainsDate ? s : yg(o.firstWeekContainsDate);
    if (!(l >= 1 && l <= 7))
      throw new RangeError(
        "firstWeekContainsDate must be between 1 and 7 inclusively"
      );
    var c = new Date(0);
    c.setUTCFullYear(n + 1, 0, l), c.setUTCHours(0, 0, 0, 0);
    var u = ef(c, t),
      d = new Date(0);
    d.setUTCFullYear(n, 0, l), d.setUTCHours(0, 0, 0, 0);
    var h = ef(d, t);
    return r.getTime() >= u.getTime()
      ? n + 1
      : r.getTime() >= h.getTime()
      ? n
      : n - 1;
  }
  function rf(e, t) {
    wg(1, arguments);
    var r = t || {},
      n = r.locale,
      o = n && n.options && n.options.firstWeekContainsDate,
      a = null == o ? 1 : yg(o),
      i = null == r.firstWeekContainsDate ? a : yg(r.firstWeekContainsDate),
      s = tf(e, t),
      l = new Date(0);
    l.setUTCFullYear(s, 0, i), l.setUTCHours(0, 0, 0, 0);
    var c = ef(l, t);
    return c;
  }
  var nf = 6048e5;
  function of(e, t) {
    wg(1, arguments);
    var r = Cg(e),
      n = ef(r, t).getTime() - rf(r, t).getTime();
    return Math.round(n / nf) + 1;
  }
  var af = "midnight",
    sf = "noon",
    lf = "morning",
    cf = "afternoon",
    uf = "evening",
    df = "night",
    hf = {
      G: function (e, t, r) {
        var n = e.getUTCFullYear() > 0 ? 1 : 0;
        switch (t) {
          case "G":
          case "GG":
          case "GGG":
            return r.era(n, { width: "abbreviated" });
          case "GGGGG":
            return r.era(n, { width: "narrow" });
          case "GGGG":
          default:
            return r.era(n, { width: "wide" });
        }
      },
      y: function (e, t, r) {
        if ("yo" === t) {
          var n = e.getUTCFullYear(),
            o = n > 0 ? n : 1 - n;
          return r.ordinalNumber(o, { unit: "year" });
        }
        return Ng(e, t);
      },
      Y: function (e, t, r, n) {
        var o = tf(e, n),
          a = o > 0 ? o : 1 - o;
        return "YY" === t
          ? $g(a % 100, 2)
          : "Yo" === t
          ? r.ordinalNumber(a, { unit: "year" })
          : $g(a, t.length);
      },
      R: function (e, t) {
        return $g(Qg(e), t.length);
      },
      u: function (e, t) {
        return $g(e.getUTCFullYear(), t.length);
      },
      Q: function (e, t, r) {
        var n = Math.ceil((e.getUTCMonth() + 1) / 3);
        switch (t) {
          case "Q":
            return String(n);
          case "QQ":
            return $g(n, 2);
          case "Qo":
            return r.ordinalNumber(n, { unit: "quarter" });
          case "QQQ":
            return r.quarter(n, {
              width: "abbreviated",
              context: "formatting",
            });
          case "QQQQQ":
            return r.quarter(n, { width: "narrow", context: "formatting" });
          case "QQQQ":
          default:
            return r.quarter(n, { width: "wide", context: "formatting" });
        }
      },
      q: function (e, t, r) {
        var n = Math.ceil((e.getUTCMonth() + 1) / 3);
        switch (t) {
          case "q":
            return String(n);
          case "qq":
            return $g(n, 2);
          case "qo":
            return r.ordinalNumber(n, { unit: "quarter" });
          case "qqq":
            return r.quarter(n, {
              width: "abbreviated",
              context: "standalone",
            });
          case "qqqqq":
            return r.quarter(n, { width: "narrow", context: "standalone" });
          case "qqqq":
          default:
            return r.quarter(n, { width: "wide", context: "standalone" });
        }
      },
      M: function (e, t, r) {
        var n = e.getUTCMonth();
        switch (t) {
          case "M":
          case "MM":
            return Ug(e, t);
          case "Mo":
            return r.ordinalNumber(n + 1, { unit: "month" });
          case "MMM":
            return r.month(n, { width: "abbreviated", context: "formatting" });
          case "MMMMM":
            return r.month(n, { width: "narrow", context: "formatting" });
          case "MMMM":
          default:
            return r.month(n, { width: "wide", context: "formatting" });
        }
      },
      L: function (e, t, r) {
        var n = e.getUTCMonth();
        switch (t) {
          case "L":
            return String(n + 1);
          case "LL":
            return $g(n + 1, 2);
          case "Lo":
            return r.ordinalNumber(n + 1, { unit: "month" });
          case "LLL":
            return r.month(n, { width: "abbreviated", context: "standalone" });
          case "LLLLL":
            return r.month(n, { width: "narrow", context: "standalone" });
          case "LLLL":
          default:
            return r.month(n, { width: "wide", context: "standalone" });
        }
      },
      w: function (e, t, r, n) {
        var o = of(e, n);
        return "wo" === t
          ? r.ordinalNumber(o, { unit: "week" })
          : $g(o, t.length);
      },
      I: function (e, t, r) {
        var n = Jg(e);
        return "Io" === t
          ? r.ordinalNumber(n, { unit: "week" })
          : $g(n, t.length);
      },
      d: function (e, t, r) {
        return "do" === t
          ? r.ordinalNumber(e.getUTCDate(), { unit: "date" })
          : Hg(e, t);
      },
      D: function (e, t, r) {
        var n = (function (e) {
          wg(1, arguments);
          var t = Cg(e),
            r = t.getTime();
          t.setUTCMonth(0, 1), t.setUTCHours(0, 0, 0, 0);
          var n = t.getTime(),
            o = r - n;
          return Math.floor(o / Zg) + 1;
        })(e);
        return "Do" === t
          ? r.ordinalNumber(n, { unit: "dayOfYear" })
          : $g(n, t.length);
      },
      E: function (e, t, r) {
        var n = e.getUTCDay();
        switch (t) {
          case "E":
          case "EE":
          case "EEE":
            return r.day(n, { width: "abbreviated", context: "formatting" });
          case "EEEEE":
            return r.day(n, { width: "narrow", context: "formatting" });
          case "EEEEEE":
            return r.day(n, { width: "short", context: "formatting" });
          case "EEEE":
          default:
            return r.day(n, { width: "wide", context: "formatting" });
        }
      },
      e: function (e, t, r, n) {
        var o = e.getUTCDay(),
          a = (o - n.weekStartsOn + 8) % 7 || 7;
        switch (t) {
          case "e":
            return String(a);
          case "ee":
            return $g(a, 2);
          case "eo":
            return r.ordinalNumber(a, { unit: "day" });
          case "eee":
            return r.day(o, { width: "abbreviated", context: "formatting" });
          case "eeeee":
            return r.day(o, { width: "narrow", context: "formatting" });
          case "eeeeee":
            return r.day(o, { width: "short", context: "formatting" });
          case "eeee":
          default:
            return r.day(o, { width: "wide", context: "formatting" });
        }
      },
      c: function (e, t, r, n) {
        var o = e.getUTCDay(),
          a = (o - n.weekStartsOn + 8) % 7 || 7;
        switch (t) {
          case "c":
            return String(a);
          case "cc":
            return $g(a, t.length);
          case "co":
            return r.ordinalNumber(a, { unit: "day" });
          case "ccc":
            return r.day(o, { width: "abbreviated", context: "standalone" });
          case "ccccc":
            return r.day(o, { width: "narrow", context: "standalone" });
          case "cccccc":
            return r.day(o, { width: "short", context: "standalone" });
          case "cccc":
          default:
            return r.day(o, { width: "wide", context: "standalone" });
        }
      },
      i: function (e, t, r) {
        var n = e.getUTCDay(),
          o = 0 === n ? 7 : n;
        switch (t) {
          case "i":
            return String(o);
          case "ii":
            return $g(o, t.length);
          case "io":
            return r.ordinalNumber(o, { unit: "day" });
          case "iii":
            return r.day(n, { width: "abbreviated", context: "formatting" });
          case "iiiii":
            return r.day(n, { width: "narrow", context: "formatting" });
          case "iiiiii":
            return r.day(n, { width: "short", context: "formatting" });
          case "iiii":
          default:
            return r.day(n, { width: "wide", context: "formatting" });
        }
      },
      a: function (e, t, r) {
        var n = e.getUTCHours() / 12 >= 1 ? "pm" : "am";
        switch (t) {
          case "a":
          case "aa":
          case "aaa":
            return r.dayPeriod(n, {
              width: "abbreviated",
              context: "formatting",
            });
          case "aaaaa":
            return r.dayPeriod(n, { width: "narrow", context: "formatting" });
          case "aaaa":
          default:
            return r.dayPeriod(n, { width: "wide", context: "formatting" });
        }
      },
      b: function (e, t, r) {
        var n,
          o = e.getUTCHours();
        switch (
          ((n = 12 === o ? sf : 0 === o ? af : o / 12 >= 1 ? "pm" : "am"), t)
        ) {
          case "b":
          case "bb":
          case "bbb":
            return r.dayPeriod(n, {
              width: "abbreviated",
              context: "formatting",
            });
          case "bbbbb":
            return r.dayPeriod(n, { width: "narrow", context: "formatting" });
          case "bbbb":
          default:
            return r.dayPeriod(n, { width: "wide", context: "formatting" });
        }
      },
      B: function (e, t, r) {
        var n,
          o = e.getUTCHours();
        switch (((n = o >= 17 ? uf : o >= 12 ? cf : o >= 4 ? lf : df), t)) {
          case "B":
          case "BB":
          case "BBB":
            return r.dayPeriod(n, {
              width: "abbreviated",
              context: "formatting",
            });
          case "BBBBB":
            return r.dayPeriod(n, { width: "narrow", context: "formatting" });
          case "BBBB":
          default:
            return r.dayPeriod(n, { width: "wide", context: "formatting" });
        }
      },
      h: function (e, t, r) {
        if ("ho" === t) {
          var n = e.getUTCHours() % 12;
          return 0 === n && (n = 12), r.ordinalNumber(n, { unit: "hour" });
        }
        return zg(e, t);
      },
      H: function (e, t, r) {
        return "Ho" === t
          ? r.ordinalNumber(e.getUTCHours(), { unit: "hour" })
          : jg(e, t);
      },
      K: function (e, t, r) {
        var n = e.getUTCHours() % 12;
        return "Ko" === t
          ? r.ordinalNumber(n, { unit: "hour" })
          : $g(n, t.length);
      },
      k: function (e, t, r) {
        var n = e.getUTCHours();
        return (
          0 === n && (n = 24),
          "ko" === t ? r.ordinalNumber(n, { unit: "hour" }) : $g(n, t.length)
        );
      },
      m: function (e, t, r) {
        return "mo" === t
          ? r.ordinalNumber(e.getUTCMinutes(), { unit: "minute" })
          : Wg(e, t);
      },
      s: function (e, t, r) {
        return "so" === t
          ? r.ordinalNumber(e.getUTCSeconds(), { unit: "second" })
          : Vg(e, t);
      },
      S: function (e, t) {
        return qg(e, t);
      },
      X: function (e, t, r, n) {
        var o = (n._originalDate || e).getTimezoneOffset();
        if (0 === o) return "Z";
        switch (t) {
          case "X":
            return mf(o);
          case "XXXX":
          case "XX":
            return gf(o);
          case "XXXXX":
          case "XXX":
          default:
            return gf(o, ":");
        }
      },
      x: function (e, t, r, n) {
        var o = (n._originalDate || e).getTimezoneOffset();
        switch (t) {
          case "x":
            return mf(o);
          case "xxxx":
          case "xx":
            return gf(o);
          case "xxxxx":
          case "xxx":
          default:
            return gf(o, ":");
        }
      },
      O: function (e, t, r, n) {
        var o = (n._originalDate || e).getTimezoneOffset();
        switch (t) {
          case "O":
          case "OO":
          case "OOO":
            return "GMT" + pf(o, ":");
          case "OOOO":
          default:
            return "GMT" + gf(o, ":");
        }
      },
      z: function (e, t, r, n) {
        var o = (n._originalDate || e).getTimezoneOffset();
        switch (t) {
          case "z":
          case "zz":
          case "zzz":
            return "GMT" + pf(o, ":");
          case "zzzz":
          default:
            return "GMT" + gf(o, ":");
        }
      },
      t: function (e, t, r, n) {
        var o = n._originalDate || e;
        return $g(Math.floor(o.getTime() / 1e3), t.length);
      },
      T: function (e, t, r, n) {
        return $g((n._originalDate || e).getTime(), t.length);
      },
    };
  function pf(e, t) {
    var r = e > 0 ? "-" : "+",
      n = Math.abs(e),
      o = Math.floor(n / 60),
      a = n % 60;
    if (0 === a) return r + String(o);
    var i = t || "";
    return r + String(o) + i + $g(a, 2);
  }
  function mf(e, t) {
    return e % 60 == 0
      ? (e > 0 ? "-" : "+") + $g(Math.abs(e) / 60, 2)
      : gf(e, t);
  }
  function gf(e, t) {
    var r = t || "",
      n = e > 0 ? "-" : "+",
      o = Math.abs(e);
    return n + $g(Math.floor(o / 60), 2) + r + $g(o % 60, 2);
  }
  function ff(e, t) {
    switch (e) {
      case "P":
        return t.date({ width: "short" });
      case "PP":
        return t.date({ width: "medium" });
      case "PPP":
        return t.date({ width: "long" });
      case "PPPP":
      default:
        return t.date({ width: "full" });
    }
  }
  function vf(e, t) {
    switch (e) {
      case "p":
        return t.time({ width: "short" });
      case "pp":
        return t.time({ width: "medium" });
      case "ppp":
        return t.time({ width: "long" });
      case "pppp":
      default:
        return t.time({ width: "full" });
    }
  }
  var bf = {
      p: vf,
      P: function (e, t) {
        var r,
          n = e.match(/(P+)(p+)?/),
          o = n[1],
          a = n[2];
        if (!a) return ff(e, t);
        switch (o) {
          case "P":
            r = t.dateTime({ width: "short" });
            break;
          case "PP":
            r = t.dateTime({ width: "medium" });
            break;
          case "PPP":
            r = t.dateTime({ width: "long" });
            break;
          case "PPPP":
          default:
            r = t.dateTime({ width: "full" });
        }
        return r.replace("{{date}}", ff(o, t)).replace("{{time}}", vf(a, t));
      },
    },
    yf = ["D", "DD"],
    wf = ["YY", "YYYY"];
  function Cf(e) {
    return -1 !== yf.indexOf(e);
  }
  function kf(e) {
    return -1 !== wf.indexOf(e);
  }
  function Sf(e, t, r) {
    if ("YYYY" === e)
      throw new RangeError(
        "Use `yyyy` instead of `YYYY` (in `"
          .concat(t, "`) for formatting years to the input `")
          .concat(r, "`; see: https://git.io/fxCyr")
      );
    if ("YY" === e)
      throw new RangeError(
        "Use `yy` instead of `YY` (in `"
          .concat(t, "`) for formatting years to the input `")
          .concat(r, "`; see: https://git.io/fxCyr")
      );
    if ("D" === e)
      throw new RangeError(
        "Use `d` instead of `D` (in `"
          .concat(t, "`) for formatting days of the month to the input `")
          .concat(r, "`; see: https://git.io/fxCyr")
      );
    if ("DD" === e)
      throw new RangeError(
        "Use `dd` instead of `DD` (in `"
          .concat(t, "`) for formatting days of the month to the input `")
          .concat(r, "`; see: https://git.io/fxCyr")
      );
  }
  var Ef = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,
    _f = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,
    xf = /^'([^]*?)'?$/,
    Pf = /''/g,
    Tf = /[a-zA-Z]/;
  function If(e) {
    return e.match(xf)[1].replace(Pf, "'");
  }
  function Gf(e, t) {
    wg(1, arguments);
    var r = t || {},
      n = r.locale,
      o = n && n.options && n.options.weekStartsOn,
      a = null == o ? 0 : yg(o),
      i = null == r.weekStartsOn ? a : yg(r.weekStartsOn);
    if (!(i >= 0 && i <= 6))
      throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
    var s = Cg(e),
      l = s.getDay(),
      c = (l < i ? 7 : 0) + l - i;
    return s.setDate(s.getDate() - c), s.setHours(0, 0, 0, 0), s;
  }
  function Df(e, t) {
    wg(1, arguments);
    var r = Cg(e),
      n = r.getFullYear(),
      o = t || {},
      a = o.locale,
      i = a && a.options && a.options.firstWeekContainsDate,
      s = null == i ? 1 : yg(i),
      l = null == o.firstWeekContainsDate ? s : yg(o.firstWeekContainsDate);
    if (!(l >= 1 && l <= 7))
      throw new RangeError(
        "firstWeekContainsDate must be between 1 and 7 inclusively"
      );
    var c = new Date(0);
    c.setFullYear(n + 1, 0, l), c.setHours(0, 0, 0, 0);
    var u = Gf(c, t),
      d = new Date(0);
    d.setFullYear(n, 0, l), d.setHours(0, 0, 0, 0);
    var h = Gf(d, t);
    return r.getTime() >= u.getTime()
      ? n + 1
      : r.getTime() >= h.getTime()
      ? n
      : n - 1;
  }
  function Af(e, t) {
    wg(1, arguments);
    var r = t || {},
      n = r.locale,
      o = n && n.options && n.options.firstWeekContainsDate,
      a = null == o ? 1 : yg(o),
      i = null == r.firstWeekContainsDate ? a : yg(r.firstWeekContainsDate),
      s = Df(e, t),
      l = new Date(0);
    l.setFullYear(s, 0, i), l.setHours(0, 0, 0, 0);
    var c = Gf(l, t);
    return c;
  }
  var Mf = 6048e5;
  function Ff(e, t) {
    wg(2, arguments);
    var r = xg(e),
      n = xg(t);
    return r.getTime() === n.getTime();
  }
  function Rf(e, t) {
    wg(2, arguments);
    var r = Cg(e),
      n = Cg(t);
    return r.getFullYear() === n.getFullYear();
  }
  function Lf(e, t) {
    wg(2, arguments);
    var r = yg(t);
    return kg(e, -r);
  }
  function Bf(e, t) {
    if (null == e)
      throw new TypeError(
        "assign requires that input parameter not be null or undefined"
      );
    for (var r in (t = t || {})) t.hasOwnProperty(r) && (e[r] = t[r]);
    return e;
  }
  function Of(e, t, r) {
    wg(2, arguments);
    var n = r || {},
      o = n.locale,
      a = o && o.options && o.options.weekStartsOn,
      i = null == a ? 0 : yg(a),
      s = null == n.weekStartsOn ? i : yg(n.weekStartsOn);
    if (!(s >= 0 && s <= 6))
      throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
    var l = Cg(e),
      c = yg(t),
      u = l.getUTCDay(),
      d = c % 7,
      h = (d + 7) % 7,
      p = (h < s ? 7 : 0) + c - u;
    return l.setUTCDate(l.getUTCDate() + p), l;
  }
  var $f = /^(1[0-2]|0?\d)/,
    Nf = /^(3[0-1]|[0-2]?\d)/,
    Uf = /^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,
    Hf = /^(5[0-3]|[0-4]?\d)/,
    zf = /^(2[0-3]|[0-1]?\d)/,
    jf = /^(2[0-4]|[0-1]?\d)/,
    Wf = /^(1[0-1]|0?\d)/,
    Vf = /^(1[0-2]|0?\d)/,
    qf = /^[0-5]?\d/,
    Zf = /^[0-5]?\d/,
    Yf = /^\d/,
    Qf = /^\d{1,2}/,
    Kf = /^\d{1,3}/,
    Xf = /^\d{1,4}/,
    Jf = /^-?\d+/,
    ev = /^-?\d/,
    tv = /^-?\d{1,2}/,
    rv = /^-?\d{1,3}/,
    nv = /^-?\d{1,4}/,
    ov = /^([+-])(\d{2})(\d{2})?|Z/,
    av = /^([+-])(\d{2})(\d{2})|Z/,
    iv = /^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,
    sv = /^([+-])(\d{2}):(\d{2})|Z/,
    lv = /^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;
  function cv(e, t, r) {
    var n = t.match(e);
    if (!n) return null;
    var o = parseInt(n[0], 10);
    return { value: r ? r(o) : o, rest: t.slice(n[0].length) };
  }
  function uv(e, t) {
    var r = t.match(e);
    return r
      ? "Z" === r[0]
        ? { value: 0, rest: t.slice(1) }
        : {
            value:
              ("+" === r[1] ? 1 : -1) *
              (36e5 * (r[2] ? parseInt(r[2], 10) : 0) +
                6e4 * (r[3] ? parseInt(r[3], 10) : 0) +
                1e3 * (r[5] ? parseInt(r[5], 10) : 0)),
            rest: t.slice(r[0].length),
          }
      : null;
  }
  function dv(e, t) {
    return cv(Jf, e, t);
  }
  function hv(e, t, r) {
    switch (e) {
      case 1:
        return cv(Yf, t, r);
      case 2:
        return cv(Qf, t, r);
      case 3:
        return cv(Kf, t, r);
      case 4:
        return cv(Xf, t, r);
      default:
        return cv(new RegExp("^\\d{1," + e + "}"), t, r);
    }
  }
  function pv(e, t, r) {
    switch (e) {
      case 1:
        return cv(ev, t, r);
      case 2:
        return cv(tv, t, r);
      case 3:
        return cv(rv, t, r);
      case 4:
        return cv(nv, t, r);
      default:
        return cv(new RegExp("^-?\\d{1," + e + "}"), t, r);
    }
  }
  function mv(e) {
    switch (e) {
      case "morning":
        return 4;
      case "evening":
        return 17;
      case "pm":
      case "noon":
      case "afternoon":
        return 12;
      case "am":
      case "midnight":
      case "night":
      default:
        return 0;
    }
  }
  function gv(e, t) {
    var r,
      n = t > 0,
      o = n ? t : 1 - t;
    if (o <= 50) r = e || 100;
    else {
      var a = o + 50;
      r = e + 100 * Math.floor(a / 100) - (e >= a % 100 ? 100 : 0);
    }
    return n ? r : 1 - r;
  }
  var fv = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
    vv = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
  function bv(e) {
    return e % 400 == 0 || (e % 4 == 0 && e % 100 != 0);
  }
  var yv = {
      G: {
        priority: 140,
        parse: function (e, t, r, n) {
          switch (t) {
            case "G":
            case "GG":
            case "GGG":
              return (
                r.era(e, { width: "abbreviated" }) ||
                r.era(e, { width: "narrow" })
              );
            case "GGGGG":
              return r.era(e, { width: "narrow" });
            case "GGGG":
            default:
              return (
                r.era(e, { width: "wide" }) ||
                r.era(e, { width: "abbreviated" }) ||
                r.era(e, { width: "narrow" })
              );
          }
        },
        set: function (e, t, r, n) {
          return (
            (t.era = r), e.setUTCFullYear(r, 0, 1), e.setUTCHours(0, 0, 0, 0), e
          );
        },
        incompatibleTokens: ["R", "u", "t", "T"],
      },
      y: {
        priority: 130,
        parse: function (e, t, r, n) {
          var o = function (e) {
            return { year: e, isTwoDigitYear: "yy" === t };
          };
          switch (t) {
            case "y":
              return hv(4, e, o);
            case "yo":
              return r.ordinalNumber(e, { unit: "year", valueCallback: o });
            default:
              return hv(t.length, e, o);
          }
        },
        validate: function (e, t, r) {
          return t.isTwoDigitYear || t.year > 0;
        },
        set: function (e, t, r, n) {
          var o = e.getUTCFullYear();
          if (r.isTwoDigitYear) {
            var a = gv(r.year, o);
            return e.setUTCFullYear(a, 0, 1), e.setUTCHours(0, 0, 0, 0), e;
          }
          var i = "era" in t && 1 !== t.era ? 1 - r.year : r.year;
          return e.setUTCFullYear(i, 0, 1), e.setUTCHours(0, 0, 0, 0), e;
        },
        incompatibleTokens: ["Y", "R", "u", "w", "I", "i", "e", "c", "t", "T"],
      },
      Y: {
        priority: 130,
        parse: function (e, t, r, n) {
          var o = function (e) {
            return { year: e, isTwoDigitYear: "YY" === t };
          };
          switch (t) {
            case "Y":
              return hv(4, e, o);
            case "Yo":
              return r.ordinalNumber(e, { unit: "year", valueCallback: o });
            default:
              return hv(t.length, e, o);
          }
        },
        validate: function (e, t, r) {
          return t.isTwoDigitYear || t.year > 0;
        },
        set: function (e, t, r, n) {
          var o = tf(e, n);
          if (r.isTwoDigitYear) {
            var a = gv(r.year, o);
            return (
              e.setUTCFullYear(a, 0, n.firstWeekContainsDate),
              e.setUTCHours(0, 0, 0, 0),
              ef(e, n)
            );
          }
          var i = "era" in t && 1 !== t.era ? 1 - r.year : r.year;
          return (
            e.setUTCFullYear(i, 0, n.firstWeekContainsDate),
            e.setUTCHours(0, 0, 0, 0),
            ef(e, n)
          );
        },
        incompatibleTokens: [
          "y",
          "R",
          "u",
          "Q",
          "q",
          "M",
          "L",
          "I",
          "d",
          "D",
          "i",
          "t",
          "T",
        ],
      },
      R: {
        priority: 130,
        parse: function (e, t, r, n) {
          return pv("R" === t ? 4 : t.length, e);
        },
        set: function (e, t, r, n) {
          var o = new Date(0);
          return o.setUTCFullYear(r, 0, 4), o.setUTCHours(0, 0, 0, 0), Yg(o);
        },
        incompatibleTokens: [
          "G",
          "y",
          "Y",
          "u",
          "Q",
          "q",
          "M",
          "L",
          "w",
          "d",
          "D",
          "e",
          "c",
          "t",
          "T",
        ],
      },
      u: {
        priority: 130,
        parse: function (e, t, r, n) {
          return pv("u" === t ? 4 : t.length, e);
        },
        set: function (e, t, r, n) {
          return e.setUTCFullYear(r, 0, 1), e.setUTCHours(0, 0, 0, 0), e;
        },
        incompatibleTokens: [
          "G",
          "y",
          "Y",
          "R",
          "w",
          "I",
          "i",
          "e",
          "c",
          "t",
          "T",
        ],
      },
      Q: {
        priority: 120,
        parse: function (e, t, r, n) {
          switch (t) {
            case "Q":
            case "QQ":
              return hv(t.length, e);
            case "Qo":
              return r.ordinalNumber(e, { unit: "quarter" });
            case "QQQ":
              return (
                r.quarter(e, { width: "abbreviated", context: "formatting" }) ||
                r.quarter(e, { width: "narrow", context: "formatting" })
              );
            case "QQQQQ":
              return r.quarter(e, { width: "narrow", context: "formatting" });
            case "QQQQ":
            default:
              return (
                r.quarter(e, { width: "wide", context: "formatting" }) ||
                r.quarter(e, { width: "abbreviated", context: "formatting" }) ||
                r.quarter(e, { width: "narrow", context: "formatting" })
              );
          }
        },
        validate: function (e, t, r) {
          return t >= 1 && t <= 4;
        },
        set: function (e, t, r, n) {
          return e.setUTCMonth(3 * (r - 1), 1), e.setUTCHours(0, 0, 0, 0), e;
        },
        incompatibleTokens: [
          "Y",
          "R",
          "q",
          "M",
          "L",
          "w",
          "I",
          "d",
          "D",
          "i",
          "e",
          "c",
          "t",
          "T",
        ],
      },
      q: {
        priority: 120,
        parse: function (e, t, r, n) {
          switch (t) {
            case "q":
            case "qq":
              return hv(t.length, e);
            case "qo":
              return r.ordinalNumber(e, { unit: "quarter" });
            case "qqq":
              return (
                r.quarter(e, { width: "abbreviated", context: "standalone" }) ||
                r.quarter(e, { width: "narrow", context: "standalone" })
              );
            case "qqqqq":
              return r.quarter(e, { width: "narrow", context: "standalone" });
            case "qqqq":
            default:
              return (
                r.quarter(e, { width: "wide", context: "standalone" }) ||
                r.quarter(e, { width: "abbreviated", context: "standalone" }) ||
                r.quarter(e, { width: "narrow", context: "standalone" })
              );
          }
        },
        validate: function (e, t, r) {
          return t >= 1 && t <= 4;
        },
        set: function (e, t, r, n) {
          return e.setUTCMonth(3 * (r - 1), 1), e.setUTCHours(0, 0, 0, 0), e;
        },
        incompatibleTokens: [
          "Y",
          "R",
          "Q",
          "M",
          "L",
          "w",
          "I",
          "d",
          "D",
          "i",
          "e",
          "c",
          "t",
          "T",
        ],
      },
      M: {
        priority: 110,
        parse: function (e, t, r, n) {
          var o = function (e) {
            return e - 1;
          };
          switch (t) {
            case "M":
              return cv($f, e, o);
            case "MM":
              return hv(2, e, o);
            case "Mo":
              return r.ordinalNumber(e, { unit: "month", valueCallback: o });
            case "MMM":
              return (
                r.month(e, { width: "abbreviated", context: "formatting" }) ||
                r.month(e, { width: "narrow", context: "formatting" })
              );
            case "MMMMM":
              return r.month(e, { width: "narrow", context: "formatting" });
            case "MMMM":
            default:
              return (
                r.month(e, { width: "wide", context: "formatting" }) ||
                r.month(e, { width: "abbreviated", context: "formatting" }) ||
                r.month(e, { width: "narrow", context: "formatting" })
              );
          }
        },
        validate: function (e, t, r) {
          return t >= 0 && t <= 11;
        },
        set: function (e, t, r, n) {
          return e.setUTCMonth(r, 1), e.setUTCHours(0, 0, 0, 0), e;
        },
        incompatibleTokens: [
          "Y",
          "R",
          "q",
          "Q",
          "L",
          "w",
          "I",
          "D",
          "i",
          "e",
          "c",
          "t",
          "T",
        ],
      },
      L: {
        priority: 110,
        parse: function (e, t, r, n) {
          var o = function (e) {
            return e - 1;
          };
          switch (t) {
            case "L":
              return cv($f, e, o);
            case "LL":
              return hv(2, e, o);
            case "Lo":
              return r.ordinalNumber(e, { unit: "month", valueCallback: o });
            case "LLL":
              return (
                r.month(e, { width: "abbreviated", context: "standalone" }) ||
                r.month(e, { width: "narrow", context: "standalone" })
              );
            case "LLLLL":
              return r.month(e, { width: "narrow", context: "standalone" });
            case "LLLL":
            default:
              return (
                r.month(e, { width: "wide", context: "standalone" }) ||
                r.month(e, { width: "abbreviated", context: "standalone" }) ||
                r.month(e, { width: "narrow", context: "standalone" })
              );
          }
        },
        validate: function (e, t, r) {
          return t >= 0 && t <= 11;
        },
        set: function (e, t, r, n) {
          return e.setUTCMonth(r, 1), e.setUTCHours(0, 0, 0, 0), e;
        },
        incompatibleTokens: [
          "Y",
          "R",
          "q",
          "Q",
          "M",
          "w",
          "I",
          "D",
          "i",
          "e",
          "c",
          "t",
          "T",
        ],
      },
      w: {
        priority: 100,
        parse: function (e, t, r, n) {
          switch (t) {
            case "w":
              return cv(Hf, e);
            case "wo":
              return r.ordinalNumber(e, { unit: "week" });
            default:
              return hv(t.length, e);
          }
        },
        validate: function (e, t, r) {
          return t >= 1 && t <= 53;
        },
        set: function (e, t, r, n) {
          return ef(
            (function (e, t, r) {
              wg(2, arguments);
              var n = Cg(e),
                o = yg(t),
                a = of(n, r) - o;
              return n.setUTCDate(n.getUTCDate() - 7 * a), n;
            })(e, r, n),
            n
          );
        },
        incompatibleTokens: [
          "y",
          "R",
          "u",
          "q",
          "Q",
          "M",
          "L",
          "I",
          "d",
          "D",
          "i",
          "t",
          "T",
        ],
      },
      I: {
        priority: 100,
        parse: function (e, t, r, n) {
          switch (t) {
            case "I":
              return cv(Hf, e);
            case "Io":
              return r.ordinalNumber(e, { unit: "week" });
            default:
              return hv(t.length, e);
          }
        },
        validate: function (e, t, r) {
          return t >= 1 && t <= 53;
        },
        set: function (e, t, r, n) {
          return Yg(
            (function (e, t) {
              wg(2, arguments);
              var r = Cg(e),
                n = yg(t),
                o = Jg(r) - n;
              return r.setUTCDate(r.getUTCDate() - 7 * o), r;
            })(e, r, n),
            n
          );
        },
        incompatibleTokens: [
          "y",
          "Y",
          "u",
          "q",
          "Q",
          "M",
          "L",
          "w",
          "d",
          "D",
          "e",
          "c",
          "t",
          "T",
        ],
      },
      d: {
        priority: 90,
        subPriority: 1,
        parse: function (e, t, r, n) {
          switch (t) {
            case "d":
              return cv(Nf, e);
            case "do":
              return r.ordinalNumber(e, { unit: "date" });
            default:
              return hv(t.length, e);
          }
        },
        validate: function (e, t, r) {
          var n = bv(e.getUTCFullYear()),
            o = e.getUTCMonth();
          return n ? t >= 1 && t <= vv[o] : t >= 1 && t <= fv[o];
        },
        set: function (e, t, r, n) {
          return e.setUTCDate(r), e.setUTCHours(0, 0, 0, 0), e;
        },
        incompatibleTokens: [
          "Y",
          "R",
          "q",
          "Q",
          "w",
          "I",
          "D",
          "i",
          "e",
          "c",
          "t",
          "T",
        ],
      },
      D: {
        priority: 90,
        subPriority: 1,
        parse: function (e, t, r, n) {
          switch (t) {
            case "D":
            case "DD":
              return cv(Uf, e);
            case "Do":
              return r.ordinalNumber(e, { unit: "date" });
            default:
              return hv(t.length, e);
          }
        },
        validate: function (e, t, r) {
          return bv(e.getUTCFullYear())
            ? t >= 1 && t <= 366
            : t >= 1 && t <= 365;
        },
        set: function (e, t, r, n) {
          return e.setUTCMonth(0, r), e.setUTCHours(0, 0, 0, 0), e;
        },
        incompatibleTokens: [
          "Y",
          "R",
          "q",
          "Q",
          "M",
          "L",
          "w",
          "I",
          "d",
          "E",
          "i",
          "e",
          "c",
          "t",
          "T",
        ],
      },
      E: {
        priority: 90,
        parse: function (e, t, r, n) {
          switch (t) {
            case "E":
            case "EE":
            case "EEE":
              return (
                r.day(e, { width: "abbreviated", context: "formatting" }) ||
                r.day(e, { width: "short", context: "formatting" }) ||
                r.day(e, { width: "narrow", context: "formatting" })
              );
            case "EEEEE":
              return r.day(e, { width: "narrow", context: "formatting" });
            case "EEEEEE":
              return (
                r.day(e, { width: "short", context: "formatting" }) ||
                r.day(e, { width: "narrow", context: "formatting" })
              );
            case "EEEE":
            default:
              return (
                r.day(e, { width: "wide", context: "formatting" }) ||
                r.day(e, { width: "abbreviated", context: "formatting" }) ||
                r.day(e, { width: "short", context: "formatting" }) ||
                r.day(e, { width: "narrow", context: "formatting" })
              );
          }
        },
        validate: function (e, t, r) {
          return t >= 0 && t <= 6;
        },
        set: function (e, t, r, n) {
          return (e = Of(e, r, n)).setUTCHours(0, 0, 0, 0), e;
        },
        incompatibleTokens: ["D", "i", "e", "c", "t", "T"],
      },
      e: {
        priority: 90,
        parse: function (e, t, r, n) {
          var o = function (e) {
            var t = 7 * Math.floor((e - 1) / 7);
            return ((e + n.weekStartsOn + 6) % 7) + t;
          };
          switch (t) {
            case "e":
            case "ee":
              return hv(t.length, e, o);
            case "eo":
              return r.ordinalNumber(e, { unit: "day", valueCallback: o });
            case "eee":
              return (
                r.day(e, { width: "abbreviated", context: "formatting" }) ||
                r.day(e, { width: "short", context: "formatting" }) ||
                r.day(e, { width: "narrow", context: "formatting" })
              );
            case "eeeee":
              return r.day(e, { width: "narrow", context: "formatting" });
            case "eeeeee":
              return (
                r.day(e, { width: "short", context: "formatting" }) ||
                r.day(e, { width: "narrow", context: "formatting" })
              );
            case "eeee":
            default:
              return (
                r.day(e, { width: "wide", context: "formatting" }) ||
                r.day(e, { width: "abbreviated", context: "formatting" }) ||
                r.day(e, { width: "short", context: "formatting" }) ||
                r.day(e, { width: "narrow", context: "formatting" })
              );
          }
        },
        validate: function (e, t, r) {
          return t >= 0 && t <= 6;
        },
        set: function (e, t, r, n) {
          return (e = Of(e, r, n)).setUTCHours(0, 0, 0, 0), e;
        },
        incompatibleTokens: [
          "y",
          "R",
          "u",
          "q",
          "Q",
          "M",
          "L",
          "I",
          "d",
          "D",
          "E",
          "i",
          "c",
          "t",
          "T",
        ],
      },
      c: {
        priority: 90,
        parse: function (e, t, r, n) {
          var o = function (e) {
            var t = 7 * Math.floor((e - 1) / 7);
            return ((e + n.weekStartsOn + 6) % 7) + t;
          };
          switch (t) {
            case "c":
            case "cc":
              return hv(t.length, e, o);
            case "co":
              return r.ordinalNumber(e, { unit: "day", valueCallback: o });
            case "ccc":
              return (
                r.day(e, { width: "abbreviated", context: "standalone" }) ||
                r.day(e, { width: "short", context: "standalone" }) ||
                r.day(e, { width: "narrow", context: "standalone" })
              );
            case "ccccc":
              return r.day(e, { width: "narrow", context: "standalone" });
            case "cccccc":
              return (
                r.day(e, { width: "short", context: "standalone" }) ||
                r.day(e, { width: "narrow", context: "standalone" })
              );
            case "cccc":
            default:
              return (
                r.day(e, { width: "wide", context: "standalone" }) ||
                r.day(e, { width: "abbreviated", context: "standalone" }) ||
                r.day(e, { width: "short", context: "standalone" }) ||
                r.day(e, { width: "narrow", context: "standalone" })
              );
          }
        },
        validate: function (e, t, r) {
          return t >= 0 && t <= 6;
        },
        set: function (e, t, r, n) {
          return (e = Of(e, r, n)).setUTCHours(0, 0, 0, 0), e;
        },
        incompatibleTokens: [
          "y",
          "R",
          "u",
          "q",
          "Q",
          "M",
          "L",
          "I",
          "d",
          "D",
          "E",
          "i",
          "e",
          "t",
          "T",
        ],
      },
      i: {
        priority: 90,
        parse: function (e, t, r, n) {
          var o = function (e) {
            return 0 === e ? 7 : e;
          };
          switch (t) {
            case "i":
            case "ii":
              return hv(t.length, e);
            case "io":
              return r.ordinalNumber(e, { unit: "day" });
            case "iii":
              return (
                r.day(e, {
                  width: "abbreviated",
                  context: "formatting",
                  valueCallback: o,
                }) ||
                r.day(e, {
                  width: "short",
                  context: "formatting",
                  valueCallback: o,
                }) ||
                r.day(e, {
                  width: "narrow",
                  context: "formatting",
                  valueCallback: o,
                })
              );
            case "iiiii":
              return r.day(e, {
                width: "narrow",
                context: "formatting",
                valueCallback: o,
              });
            case "iiiiii":
              return (
                r.day(e, {
                  width: "short",
                  context: "formatting",
                  valueCallback: o,
                }) ||
                r.day(e, {
                  width: "narrow",
                  context: "formatting",
                  valueCallback: o,
                })
              );
            case "iiii":
            default:
              return (
                r.day(e, {
                  width: "wide",
                  context: "formatting",
                  valueCallback: o,
                }) ||
                r.day(e, {
                  width: "abbreviated",
                  context: "formatting",
                  valueCallback: o,
                }) ||
                r.day(e, {
                  width: "short",
                  context: "formatting",
                  valueCallback: o,
                }) ||
                r.day(e, {
                  width: "narrow",
                  context: "formatting",
                  valueCallback: o,
                })
              );
          }
        },
        validate: function (e, t, r) {
          return t >= 1 && t <= 7;
        },
        set: function (e, t, r, n) {
          return (
            (e = (function (e, t) {
              wg(2, arguments);
              var r = yg(t);
              r % 7 == 0 && (r -= 7);
              var n = 1,
                o = Cg(e),
                a = o.getUTCDay(),
                i = (((r % 7) + 7) % 7 < n ? 7 : 0) + r - a;
              return o.setUTCDate(o.getUTCDate() + i), o;
            })(e, r, n)).setUTCHours(0, 0, 0, 0),
            e
          );
        },
        incompatibleTokens: [
          "y",
          "Y",
          "u",
          "q",
          "Q",
          "M",
          "L",
          "w",
          "d",
          "D",
          "E",
          "e",
          "c",
          "t",
          "T",
        ],
      },
      a: {
        priority: 80,
        parse: function (e, t, r, n) {
          switch (t) {
            case "a":
            case "aa":
            case "aaa":
              return (
                r.dayPeriod(e, {
                  width: "abbreviated",
                  context: "formatting",
                }) || r.dayPeriod(e, { width: "narrow", context: "formatting" })
              );
            case "aaaaa":
              return r.dayPeriod(e, { width: "narrow", context: "formatting" });
            case "aaaa":
            default:
              return (
                r.dayPeriod(e, { width: "wide", context: "formatting" }) ||
                r.dayPeriod(e, {
                  width: "abbreviated",
                  context: "formatting",
                }) ||
                r.dayPeriod(e, { width: "narrow", context: "formatting" })
              );
          }
        },
        set: function (e, t, r, n) {
          return e.setUTCHours(mv(r), 0, 0, 0), e;
        },
        incompatibleTokens: ["b", "B", "H", "K", "k", "t", "T"],
      },
      b: {
        priority: 80,
        parse: function (e, t, r, n) {
          switch (t) {
            case "b":
            case "bb":
            case "bbb":
              return (
                r.dayPeriod(e, {
                  width: "abbreviated",
                  context: "formatting",
                }) || r.dayPeriod(e, { width: "narrow", context: "formatting" })
              );
            case "bbbbb":
              return r.dayPeriod(e, { width: "narrow", context: "formatting" });
            case "bbbb":
            default:
              return (
                r.dayPeriod(e, { width: "wide", context: "formatting" }) ||
                r.dayPeriod(e, {
                  width: "abbreviated",
                  context: "formatting",
                }) ||
                r.dayPeriod(e, { width: "narrow", context: "formatting" })
              );
          }
        },
        set: function (e, t, r, n) {
          return e.setUTCHours(mv(r), 0, 0, 0), e;
        },
        incompatibleTokens: ["a", "B", "H", "K", "k", "t", "T"],
      },
      B: {
        priority: 80,
        parse: function (e, t, r, n) {
          switch (t) {
            case "B":
            case "BB":
            case "BBB":
              return (
                r.dayPeriod(e, {
                  width: "abbreviated",
                  context: "formatting",
                }) || r.dayPeriod(e, { width: "narrow", context: "formatting" })
              );
            case "BBBBB":
              return r.dayPeriod(e, { width: "narrow", context: "formatting" });
            case "BBBB":
            default:
              return (
                r.dayPeriod(e, { width: "wide", context: "formatting" }) ||
                r.dayPeriod(e, {
                  width: "abbreviated",
                  context: "formatting",
                }) ||
                r.dayPeriod(e, { width: "narrow", context: "formatting" })
              );
          }
        },
        set: function (e, t, r, n) {
          return e.setUTCHours(mv(r), 0, 0, 0), e;
        },
        incompatibleTokens: ["a", "b", "t", "T"],
      },
      h: {
        priority: 70,
        parse: function (e, t, r, n) {
          switch (t) {
            case "h":
              return cv(Vf, e);
            case "ho":
              return r.ordinalNumber(e, { unit: "hour" });
            default:
              return hv(t.length, e);
          }
        },
        validate: function (e, t, r) {
          return t >= 1 && t <= 12;
        },
        set: function (e, t, r, n) {
          var o = e.getUTCHours() >= 12;
          return (
            o && r < 12
              ? e.setUTCHours(r + 12, 0, 0, 0)
              : o || 12 !== r
              ? e.setUTCHours(r, 0, 0, 0)
              : e.setUTCHours(0, 0, 0, 0),
            e
          );
        },
        incompatibleTokens: ["H", "K", "k", "t", "T"],
      },
      H: {
        priority: 70,
        parse: function (e, t, r, n) {
          switch (t) {
            case "H":
              return cv(zf, e);
            case "Ho":
              return r.ordinalNumber(e, { unit: "hour" });
            default:
              return hv(t.length, e);
          }
        },
        validate: function (e, t, r) {
          return t >= 0 && t <= 23;
        },
        set: function (e, t, r, n) {
          return e.setUTCHours(r, 0, 0, 0), e;
        },
        incompatibleTokens: ["a", "b", "h", "K", "k", "t", "T"],
      },
      K: {
        priority: 70,
        parse: function (e, t, r, n) {
          switch (t) {
            case "K":
              return cv(Wf, e);
            case "Ko":
              return r.ordinalNumber(e, { unit: "hour" });
            default:
              return hv(t.length, e);
          }
        },
        validate: function (e, t, r) {
          return t >= 0 && t <= 11;
        },
        set: function (e, t, r, n) {
          return (
            e.getUTCHours() >= 12 && r < 12
              ? e.setUTCHours(r + 12, 0, 0, 0)
              : e.setUTCHours(r, 0, 0, 0),
            e
          );
        },
        incompatibleTokens: ["a", "b", "h", "H", "k", "t", "T"],
      },
      k: {
        priority: 70,
        parse: function (e, t, r, n) {
          switch (t) {
            case "k":
              return cv(jf, e);
            case "ko":
              return r.ordinalNumber(e, { unit: "hour" });
            default:
              return hv(t.length, e);
          }
        },
        validate: function (e, t, r) {
          return t >= 1 && t <= 24;
        },
        set: function (e, t, r, n) {
          var o = r <= 24 ? r % 24 : r;
          return e.setUTCHours(o, 0, 0, 0), e;
        },
        incompatibleTokens: ["a", "b", "h", "H", "K", "t", "T"],
      },
      m: {
        priority: 60,
        parse: function (e, t, r, n) {
          switch (t) {
            case "m":
              return cv(qf, e);
            case "mo":
              return r.ordinalNumber(e, { unit: "minute" });
            default:
              return hv(t.length, e);
          }
        },
        validate: function (e, t, r) {
          return t >= 0 && t <= 59;
        },
        set: function (e, t, r, n) {
          return e.setUTCMinutes(r, 0, 0), e;
        },
        incompatibleTokens: ["t", "T"],
      },
      s: {
        priority: 50,
        parse: function (e, t, r, n) {
          switch (t) {
            case "s":
              return cv(Zf, e);
            case "so":
              return r.ordinalNumber(e, { unit: "second" });
            default:
              return hv(t.length, e);
          }
        },
        validate: function (e, t, r) {
          return t >= 0 && t <= 59;
        },
        set: function (e, t, r, n) {
          return e.setUTCSeconds(r, 0), e;
        },
        incompatibleTokens: ["t", "T"],
      },
      S: {
        priority: 30,
        parse: function (e, t, r, n) {
          return hv(t.length, e, function (e) {
            return Math.floor(e * Math.pow(10, 3 - t.length));
          });
        },
        set: function (e, t, r, n) {
          return e.setUTCMilliseconds(r), e;
        },
        incompatibleTokens: ["t", "T"],
      },
      X: {
        priority: 10,
        parse: function (e, t, r, n) {
          switch (t) {
            case "X":
              return uv(ov, e);
            case "XX":
              return uv(av, e);
            case "XXXX":
              return uv(iv, e);
            case "XXXXX":
              return uv(lv, e);
            case "XXX":
            default:
              return uv(sv, e);
          }
        },
        set: function (e, t, r, n) {
          return t.timestampIsSet ? e : new Date(e.getTime() - r);
        },
        incompatibleTokens: ["t", "T", "x"],
      },
      x: {
        priority: 10,
        parse: function (e, t, r, n) {
          switch (t) {
            case "x":
              return uv(ov, e);
            case "xx":
              return uv(av, e);
            case "xxxx":
              return uv(iv, e);
            case "xxxxx":
              return uv(lv, e);
            case "xxx":
            default:
              return uv(sv, e);
          }
        },
        set: function (e, t, r, n) {
          return t.timestampIsSet ? e : new Date(e.getTime() - r);
        },
        incompatibleTokens: ["t", "T", "X"],
      },
      t: {
        priority: 40,
        parse: function (e, t, r, n) {
          return dv(e);
        },
        set: function (e, t, r, n) {
          return [new Date(1e3 * r), { timestampIsSet: !0 }];
        },
        incompatibleTokens: "*",
      },
      T: {
        priority: 20,
        parse: function (e, t, r, n) {
          return dv(e);
        },
        set: function (e, t, r, n) {
          return [new Date(r), { timestampIsSet: !0 }];
        },
        incompatibleTokens: "*",
      },
    },
    wv = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,
    Cv = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,
    kv = /^'([^]*?)'?$/,
    Sv = /''/g,
    Ev = /\S/,
    _v = /[a-zA-Z]/;
  function xv(e, t) {
    if (t.timestampIsSet) return e;
    var r = new Date(0);
    return (
      r.setFullYear(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate()),
      r.setHours(
        e.getUTCHours(),
        e.getUTCMinutes(),
        e.getUTCSeconds(),
        e.getUTCMilliseconds()
      ),
      r
    );
  }
  function Pv(e) {
    return e.match(kv)[1].replace(Sv, "'");
  }
  (function () {
    var t = this,
      r = { exports: this };
    return (
      function () {
        function n(e, t) {
          for (var r = -1, n = t.length, o = e.length; ++r < n; )
            e[o + r] = t[r];
          return e;
        }
        function o(e, t) {
          for (var r = -1, n = null == e ? 0 : e.length; ++r < n; )
            if (t(e[r], r, e)) return !0;
          return !1;
        }
        function a(e) {
          return function (t) {
            return e(t);
          };
        }
        function i(e) {
          var t = -1,
            r = Array(e.size);
          return (
            e.forEach(function (e, n) {
              r[++t] = [n, e];
            }),
            r
          );
        }
        function s(e) {
          var t = Object;
          return function (r) {
            return e(t(r));
          };
        }
        function l(e) {
          var t = -1,
            r = Array(e.size);
          return (
            e.forEach(function (e) {
              r[++t] = e;
            }),
            r
          );
        }
        function c() {}
        function u(e) {
          var t = -1,
            r = null == e ? 0 : e.length;
          for (this.clear(); ++t < r; ) {
            var n = e[t];
            this.set(n[0], n[1]);
          }
        }
        function d(e) {
          var t = -1,
            r = null == e ? 0 : e.length;
          for (this.clear(); ++t < r; ) {
            var n = e[t];
            this.set(n[0], n[1]);
          }
        }
        function h(e) {
          var t = -1,
            r = null == e ? 0 : e.length;
          for (this.clear(); ++t < r; ) {
            var n = e[t];
            this.set(n[0], n[1]);
          }
        }
        function p(e) {
          var t = -1,
            r = null == e ? 0 : e.length;
          for (this.__data__ = new h(); ++t < r; ) this.add(e[t]);
        }
        function m(e) {
          this.size = (this.__data__ = new d(e)).size;
        }
        function g(e, t) {
          var r = Ve(e),
            n = !r && We(e),
            o = !r && !n && qe(e),
            a = !r && !n && !o && Qe(e);
          if ((r = r || n || o || a)) {
            n = e.length;
            for (var i = String, s = -1, l = Array(n); ++s < n; ) l[s] = i(s);
            n = l;
          } else n = [];
          var c;
          i = n.length;
          for (c in e) {
            if (
              !(s = !t && !de.call(e, c)) &&
              (s = r) &&
              !(s =
                "length" == c ||
                (o && ("offset" == c || "parent" == c)) ||
                (a &&
                  ("buffer" == c || "byteLength" == c || "byteOffset" == c)))
            ) {
              var u = typeof (s = c);
              s =
                !!(l = null == (l = i) ? 9007199254740991 : l) &&
                ("number" == u || ("symbol" != u && q.test(s))) &&
                -1 < s &&
                0 == s % 1 &&
                s < l;
            }
            s || n.push(c);
          }
          return n;
        }
        function f(e, t, r) {
          var n = e[t];
          (de.call(e, t) && F(n, r) && (r !== j || t in e)) || b(e, t, r);
        }
        function v(e, t) {
          for (var r = e.length; r--; ) if (F(e[r][0], t)) return r;
          return -1;
        }
        function b(e, t, r) {
          "__proto__" == t && Ee
            ? Ee(e, t, {
                configurable: !0,
                enumerable: !0,
                value: r,
                writable: !0,
              })
            : (e[t] = r);
        }
        function y(e, t, r, n, o, a) {
          var i,
            s = 1 & t,
            l = 2 & t,
            c = 4 & t;
          if ((r && (i = o ? r(e, n, o, a) : r(e)), i !== j)) return i;
          if (!O(e)) return e;
          if ((n = Ve(e))) {
            if (
              ((i = (function (e) {
                var t = e.length,
                  r = new e.constructor(t);
                return (
                  t &&
                    "string" == typeof e[0] &&
                    de.call(e, "index") &&
                    ((r.index = e.index), (r.input = e.input)),
                  r
                );
              })(e)),
              !s)
            )
              return (function (e, t) {
                var r = -1,
                  n = e.length;
                for (t || (t = Array(n)); ++r < n; ) t[r] = e[r];
                return t;
              })(e, i);
          } else {
            var u = je(e),
              d = "[object Function]" == u || "[object GeneratorFunction]" == u;
            if (qe(e))
              return (function (e, t) {
                if (t) return e.slice();
                var r = e.length;
                r = be ? be(r) : new e.constructor(r);
                return e.copy(r), r;
              })(e, s);
            if (
              "[object Object]" == u ||
              "[object Arguments]" == u ||
              (d && !o)
            ) {
              if (
                ((i =
                  l || d || "function" != typeof e.constructor || A(e)
                    ? {}
                    : Ue(ye(e))),
                !s)
              )
                return l
                  ? (function (e, t) {
                      return _(e, ze(e), t);
                    })(
                      e,
                      (function (e, t) {
                        return e && _(t, U(t), e);
                      })(i, e)
                    )
                  : (function (e, t) {
                      return _(e, He(e), t);
                    })(
                      e,
                      (function (e, t) {
                        return e && _(t, N(t), e);
                      })(i, e)
                    );
            } else {
              if (!Y[u]) return o ? e : {};
              i = (function (e, t, r) {
                var n = e.constructor;
                switch (t) {
                  case "[object ArrayBuffer]":
                    return E(e);
                  case "[object Boolean]":
                  case "[object Date]":
                    return new n(+e);
                  case "[object DataView]":
                    return (
                      (t = r ? E(e.buffer) : e.buffer),
                      new e.constructor(t, e.byteOffset, e.byteLength)
                    );
                  case "[object Float32Array]":
                  case "[object Float64Array]":
                  case "[object Int8Array]":
                  case "[object Int16Array]":
                  case "[object Int32Array]":
                  case "[object Uint8Array]":
                  case "[object Uint8ClampedArray]":
                  case "[object Uint16Array]":
                  case "[object Uint32Array]":
                    return (
                      (t = r ? E(e.buffer) : e.buffer),
                      new e.constructor(t, e.byteOffset, e.length)
                    );
                  case "[object Map]":
                    return new n();
                  case "[object Number]":
                  case "[object String]":
                    return new n(e);
                  case "[object RegExp]":
                    return (
                      ((t = new e.constructor(e.source, W.exec(e))).lastIndex =
                        e.lastIndex),
                      t
                    );
                  case "[object Set]":
                    return new n();
                  case "[object Symbol]":
                    return Ne ? Object(Ne.call(e)) : {};
                }
              })(e, u, s);
            }
          }
          if ((a || (a = new m()), (o = a.get(e)))) return o;
          if ((a.set(e, i), Ye(e)))
            return (
              e.forEach(function (n) {
                i.add(y(n, t, r, n, e, a));
              }),
              i
            );
          if (Ze(e))
            return (
              e.forEach(function (n, o) {
                i.set(o, y(n, t, r, o, e, a));
              }),
              i
            );
          l = c ? (l ? I : T) : l ? U : N;
          var h = n ? j : l(e);
          return (
            (function (e, t) {
              for (
                var r = -1, n = null == e ? 0 : e.length;
                ++r < n && !1 !== t(e[r], r, e);

              );
            })(h || e, function (n, o) {
              h && (n = e[(o = n)]), f(i, o, y(n, t, r, o, e, a));
            }),
            i
          );
        }
        function w(e, t, r) {
          return (t = t(e)), Ve(e) ? t : n(t, r(e));
        }
        function C(e) {
          if (null == e) e = e === j ? "[object Undefined]" : "[object Null]";
          else if (Se && Se in Object(e)) {
            var t = de.call(e, Se),
              r = e[Se];
            try {
              e[Se] = j;
              var n = !0;
            } catch (e) {}
            var o = pe.call(e);
            n && (t ? (e[Se] = r) : delete e[Se]), (e = o);
          } else e = pe.call(e);
          return e;
        }
        function k(e) {
          return $(e) && "[object Arguments]" == C(e);
        }
        function S(e, t, r, n, o) {
          if (e === t) t = !0;
          else if (null == e || null == t || (!$(e) && !$(t)))
            t = e != e && t != t;
          else
            e: {
              var a,
                i,
                s = Ve(e),
                l = Ve(t),
                c =
                  "[object Object]" ==
                  (a =
                    "[object Arguments]" == (a = s ? "[object Array]" : je(e))
                      ? "[object Object]"
                      : a);
              l =
                "[object Object]" ==
                (i =
                  "[object Arguments]" == (i = l ? "[object Array]" : je(t))
                    ? "[object Object]"
                    : i);
              if ((i = a == i) && qe(e)) {
                if (!qe(t)) {
                  t = !1;
                  break e;
                }
                (s = !0), (c = !1);
              }
              if (i && !c)
                o || (o = new m()),
                  (t =
                    s || Qe(e) ? x(e, t, r, n, S, o) : P(e, t, a, r, n, S, o));
              else {
                if (
                  !(1 & r) &&
                  ((s = c && de.call(e, "__wrapped__")),
                  (a = l && de.call(t, "__wrapped__")),
                  s || a)
                ) {
                  (e = s ? e.value() : e),
                    (t = a ? t.value() : t),
                    o || (o = new m()),
                    (t = S(e, t, r, n, o));
                  break e;
                }
                if (i)
                  t: if (
                    (o || (o = new m()),
                    (s = 1 & r),
                    (a = T(e)),
                    (l = a.length),
                    (i = T(t).length),
                    l == i || s)
                  ) {
                    for (c = l; c--; ) {
                      var u = a[c];
                      if (!(s ? u in t : de.call(t, u))) {
                        t = !1;
                        break t;
                      }
                    }
                    if ((i = o.get(e)) && o.get(t)) t = i == t;
                    else {
                      (i = !0), o.set(e, t), o.set(t, e);
                      for (var d = s; ++c < l; ) {
                        var h = e[(u = a[c])],
                          p = t[u];
                        if (n)
                          var g = s ? n(p, h, u, t, e, o) : n(h, p, u, e, t, o);
                        if (g === j ? h !== p && !S(h, p, r, n, o) : !g) {
                          i = !1;
                          break;
                        }
                        d || (d = "constructor" == u);
                      }
                      i &&
                        !d &&
                        (r = e.constructor) != (n = t.constructor) &&
                        "constructor" in e &&
                        "constructor" in t &&
                        !(
                          "function" == typeof r &&
                          r instanceof r &&
                          "function" == typeof n &&
                          n instanceof n
                        ) &&
                        (i = !1),
                        o.delete(e),
                        o.delete(t),
                        (t = i);
                    }
                  } else t = !1;
                else t = !1;
              }
            }
          return t;
        }
        function E(e) {
          var t = new e.constructor(e.byteLength);
          return new ve(t).set(new ve(e)), t;
        }
        function _(e, t, r) {
          var n = !r;
          r || (r = {});
          for (var o = -1, a = t.length; ++o < a; ) {
            var i = t[o],
              s = j;
            s === j && (s = e[i]), n ? b(r, i, s) : f(r, i, s);
          }
          return r;
        }
        function x(e, t, r, n, a, i) {
          var s = 1 & r,
            l = e.length;
          if (l != (c = t.length) && !(s && c > l)) return !1;
          if ((c = i.get(e)) && i.get(t)) return c == t;
          var c = -1,
            u = !0,
            d = 2 & r ? new p() : j;
          for (i.set(e, t), i.set(t, e); ++c < l; ) {
            var h = e[c],
              m = t[c];
            if (n) var g = s ? n(m, h, c, t, e, i) : n(h, m, c, e, t, i);
            if (g !== j) {
              if (g) continue;
              u = !1;
              break;
            }
            if (d) {
              if (
                !o(t, function (e, t) {
                  if (!d.has(t) && (h === e || a(h, e, r, n, i)))
                    return d.push(t);
                })
              ) {
                u = !1;
                break;
              }
            } else if (h !== m && !a(h, m, r, n, i)) {
              u = !1;
              break;
            }
          }
          return i.delete(e), i.delete(t), u;
        }
        function P(e, t, r, n, o, a, s) {
          switch (r) {
            case "[object DataView]":
              if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset)
                break;
              (e = e.buffer), (t = t.buffer);
            case "[object ArrayBuffer]":
              if (e.byteLength != t.byteLength || !a(new ve(e), new ve(t)))
                break;
              return !0;
            case "[object Boolean]":
            case "[object Date]":
            case "[object Number]":
              return F(+e, +t);
            case "[object Error]":
              return e.name == t.name && e.message == t.message;
            case "[object RegExp]":
            case "[object String]":
              return e == t + "";
            case "[object Map]":
              var c = i;
            case "[object Set]":
              if ((c || (c = l), e.size != t.size && !(1 & n))) break;
              return (r = s.get(e))
                ? r == t
                : ((n |= 2),
                  s.set(e, t),
                  (t = x(c(e), c(t), n, o, a, s)),
                  s.delete(e),
                  t);
            case "[object Symbol]":
              if (Ne) return Ne.call(e) == Ne.call(t);
          }
          return !1;
        }
        function T(e) {
          return w(e, N, He);
        }
        function I(e) {
          return w(e, U, ze);
        }
        function G(e, t) {
          var r = e.__data__,
            n = typeof t;
          return (
            "string" == n || "number" == n || "symbol" == n || "boolean" == n
              ? "__proto__" !== t
              : null === t
          )
            ? r["string" == typeof t ? "string" : "hash"]
            : r.map;
        }
        function D(e, t) {
          var r = null == e ? j : e[t];
          return !O(r) || (he && he in r) || !(L(r) ? me : V).test(M(r))
            ? j
            : r;
        }
        function A(e) {
          var t = e && e.constructor;
          return e === (("function" == typeof t && t.prototype) || le);
        }
        function M(e) {
          if (null != e) {
            try {
              return ue.call(e);
            } catch (e) {}
            return e + "";
          }
          return "";
        }
        function F(e, t) {
          return e === t || (e != e && t != t);
        }
        function R(e) {
          return null != e && B(e.length) && !L(e);
        }
        function L(e) {
          return (
            !!O(e) &&
            ("[object Function]" == (e = C(e)) ||
              "[object GeneratorFunction]" == e ||
              "[object AsyncFunction]" == e ||
              "[object Proxy]" == e)
          );
        }
        function B(e) {
          return (
            "number" == typeof e &&
            -1 < e &&
            0 == e % 1 &&
            9007199254740991 >= e
          );
        }
        function O(e) {
          var t = typeof e;
          return null != e && ("object" == t || "function" == t);
        }
        function $(e) {
          return null != e && "object" == typeof e;
        }
        function N(e) {
          if (R(e)) e = g(e);
          else if (A(e)) {
            var t,
              r = [];
            for (t in Object(e))
              de.call(e, t) && "constructor" != t && r.push(t);
            e = r;
          } else e = Pe(e);
          return e;
        }
        function U(e) {
          if (R(e)) e = g(e, !0);
          else if (O(e)) {
            var t,
              r = A(e),
              n = [];
            for (t in e)
              ("constructor" != t || (!r && de.call(e, t))) && n.push(t);
            e = n;
          } else {
            if (((t = []), null != e)) for (r in Object(e)) t.push(r);
            e = t;
          }
          return e;
        }
        function H() {
          return [];
        }
        function z() {
          return !1;
        }
        var j,
          W = /\w*$/,
          V = /^\[object .+?Constructor\]$/,
          q = /^(?:0|[1-9]\d*)$/,
          Z = {};
        (Z["[object Float32Array]"] =
          Z["[object Float64Array]"] =
          Z["[object Int8Array]"] =
          Z["[object Int16Array]"] =
          Z["[object Int32Array]"] =
          Z["[object Uint8Array]"] =
          Z["[object Uint8ClampedArray]"] =
          Z["[object Uint16Array]"] =
          Z["[object Uint32Array]"] =
            !0),
          (Z["[object Arguments]"] =
            Z["[object Array]"] =
            Z["[object ArrayBuffer]"] =
            Z["[object Boolean]"] =
            Z["[object DataView]"] =
            Z["[object Date]"] =
            Z["[object Error]"] =
            Z["[object Function]"] =
            Z["[object Map]"] =
            Z["[object Number]"] =
            Z["[object Object]"] =
            Z["[object RegExp]"] =
            Z["[object Set]"] =
            Z["[object String]"] =
            Z["[object WeakMap]"] =
              !1);
        var Y = {};
        (Y["[object Arguments]"] =
          Y["[object Array]"] =
          Y["[object ArrayBuffer]"] =
          Y["[object DataView]"] =
          Y["[object Boolean]"] =
          Y["[object Date]"] =
          Y["[object Float32Array]"] =
          Y["[object Float64Array]"] =
          Y["[object Int8Array]"] =
          Y["[object Int16Array]"] =
          Y["[object Int32Array]"] =
          Y["[object Map]"] =
          Y["[object Number]"] =
          Y["[object Object]"] =
          Y["[object RegExp]"] =
          Y["[object Set]"] =
          Y["[object String]"] =
          Y["[object Symbol]"] =
          Y["[object Uint8Array]"] =
          Y["[object Uint8ClampedArray]"] =
          Y["[object Uint16Array]"] =
          Y["[object Uint32Array]"] =
            !0),
          (Y["[object Error]"] =
            Y["[object Function]"] =
            Y["[object WeakMap]"] =
              !1);
        var Q,
          K = "object" == typeof e && e && e.Object === Object && e,
          X = "object" == typeof self && self && self.Object === Object && self,
          J = K || X || Function("return this")(),
          ee = "object" == typeof t && t && !t.nodeType && t,
          te = ee && "object" == typeof r && r && !r.nodeType && r,
          re = te && te.exports === ee,
          ne = re && K.process;
        e: {
          try {
            Q = ne && ne.binding && ne.binding("util");
            break e;
          } catch (e) {}
          Q = void 0;
        }
        var oe = Q && Q.isMap,
          ae = Q && Q.isSet,
          ie = Q && Q.isTypedArray,
          se = Array.prototype,
          le = Object.prototype,
          ce = J["__core-js_shared__"],
          ue = Function.prototype.toString,
          de = le.hasOwnProperty,
          he = (function () {
            var e = /[^.]+$/.exec((ce && ce.keys && ce.keys.IE_PROTO) || "");
            return e ? "Symbol(src)_1." + e : "";
          })(),
          pe = le.toString,
          me = RegExp(
            "^" +
              ue
                .call(de)
                .replace(/[\\^$.*+?()[\]{}|]/g, "\\$&")
                .replace(
                  /hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,
                  "$1.*?"
                ) +
              "$"
          ),
          ge = re ? J.Buffer : j,
          fe = J.Symbol,
          ve = J.Uint8Array,
          be = ge ? ge.a : j,
          ye = s(Object.getPrototypeOf),
          we = Object.create,
          Ce = le.propertyIsEnumerable,
          ke = se.splice,
          Se = fe ? fe.toStringTag : j,
          Ee = (function () {
            try {
              var e = D(Object, "defineProperty");
              return e({}, "", {}), e;
            } catch (e) {}
          })(),
          _e = Object.getOwnPropertySymbols,
          xe = ge ? ge.isBuffer : j,
          Pe = s(Object.keys),
          Te = D(J, "DataView"),
          Ie = D(J, "Map"),
          Ge = D(J, "Promise"),
          De = D(J, "Set"),
          Ae = D(J, "WeakMap"),
          Me = D(Object, "create"),
          Fe = M(Te),
          Re = M(Ie),
          Le = M(Ge),
          Be = M(De),
          Oe = M(Ae),
          $e = fe ? fe.prototype : j,
          Ne = $e ? $e.valueOf : j,
          Ue = (function () {
            function e() {}
            return function (t) {
              return O(t)
                ? we
                  ? we(t)
                  : ((e.prototype = t), (t = new e()), (e.prototype = j), t)
                : {};
            };
          })();
        (u.prototype.clear = function () {
          (this.__data__ = Me ? Me(null) : {}), (this.size = 0);
        }),
          (u.prototype.delete = function (e) {
            return (
              (e = this.has(e) && delete this.__data__[e]),
              (this.size -= e ? 1 : 0),
              e
            );
          }),
          (u.prototype.get = function (e) {
            var t = this.__data__;
            return Me
              ? "__lodash_hash_undefined__" === (e = t[e])
                ? j
                : e
              : de.call(t, e)
              ? t[e]
              : j;
          }),
          (u.prototype.has = function (e) {
            var t = this.__data__;
            return Me ? t[e] !== j : de.call(t, e);
          }),
          (u.prototype.set = function (e, t) {
            var r = this.__data__;
            return (
              (this.size += this.has(e) ? 0 : 1),
              (r[e] = Me && t === j ? "__lodash_hash_undefined__" : t),
              this
            );
          }),
          (d.prototype.clear = function () {
            (this.__data__ = []), (this.size = 0);
          }),
          (d.prototype.delete = function (e) {
            var t = this.__data__;
            return !(
              0 > (e = v(t, e)) ||
              (e == t.length - 1 ? t.pop() : ke.call(t, e, 1), --this.size, 0)
            );
          }),
          (d.prototype.get = function (e) {
            var t = this.__data__;
            return 0 > (e = v(t, e)) ? j : t[e][1];
          }),
          (d.prototype.has = function (e) {
            return -1 < v(this.__data__, e);
          }),
          (d.prototype.set = function (e, t) {
            var r = this.__data__,
              n = v(r, e);
            return 0 > n ? (++this.size, r.push([e, t])) : (r[n][1] = t), this;
          }),
          (h.prototype.clear = function () {
            (this.size = 0),
              (this.__data__ = {
                hash: new u(),
                map: new (Ie || d)(),
                string: new u(),
              });
          }),
          (h.prototype.delete = function (e) {
            return (e = G(this, e).delete(e)), (this.size -= e ? 1 : 0), e;
          }),
          (h.prototype.get = function (e) {
            return G(this, e).get(e);
          }),
          (h.prototype.has = function (e) {
            return G(this, e).has(e);
          }),
          (h.prototype.set = function (e, t) {
            var r = G(this, e),
              n = r.size;
            return r.set(e, t), (this.size += r.size == n ? 0 : 1), this;
          }),
          (p.prototype.add = p.prototype.push =
            function (e) {
              return this.__data__.set(e, "__lodash_hash_undefined__"), this;
            }),
          (p.prototype.has = function (e) {
            return this.__data__.has(e);
          }),
          (m.prototype.clear = function () {
            (this.__data__ = new d()), (this.size = 0);
          }),
          (m.prototype.delete = function (e) {
            var t = this.__data__;
            return (e = t.delete(e)), (this.size = t.size), e;
          }),
          (m.prototype.get = function (e) {
            return this.__data__.get(e);
          }),
          (m.prototype.has = function (e) {
            return this.__data__.has(e);
          }),
          (m.prototype.set = function (e, t) {
            var r = this.__data__;
            if (r instanceof d) {
              var n = r.__data__;
              if (!Ie || 199 > n.length)
                return n.push([e, t]), (this.size = ++r.size), this;
              r = this.__data__ = new h(n);
            }
            return r.set(e, t), (this.size = r.size), this;
          });
        var He = _e
            ? function (e) {
                return null == e
                  ? []
                  : ((e = Object(e)),
                    (function (e, t) {
                      for (
                        var r = -1, n = null == e ? 0 : e.length, o = 0, a = [];
                        ++r < n;

                      ) {
                        var i = e[r];
                        t(i, r, e) && (a[o++] = i);
                      }
                      return a;
                    })(_e(e), function (t) {
                      return Ce.call(e, t);
                    }));
              }
            : H,
          ze = _e
            ? function (e) {
                for (var t = []; e; ) n(t, He(e)), (e = ye(e));
                return t;
              }
            : H,
          je = C;
        ((Te && "[object DataView]" != je(new Te(new ArrayBuffer(1)))) ||
          (Ie && "[object Map]" != je(new Ie())) ||
          (Ge && "[object Promise]" != je(Ge.resolve())) ||
          (De && "[object Set]" != je(new De())) ||
          (Ae && "[object WeakMap]" != je(new Ae()))) &&
          (je = function (e) {
            var t = C(e);
            if (
              (e = (e = "[object Object]" == t ? e.constructor : j) ? M(e) : "")
            )
              switch (e) {
                case Fe:
                  return "[object DataView]";
                case Re:
                  return "[object Map]";
                case Le:
                  return "[object Promise]";
                case Be:
                  return "[object Set]";
                case Oe:
                  return "[object WeakMap]";
              }
            return t;
          });
        var We = k(
            (function () {
              return arguments;
            })()
          )
            ? k
            : function (e) {
                return $(e) && de.call(e, "callee") && !Ce.call(e, "callee");
              },
          Ve = Array.isArray,
          qe = xe || z,
          Ze = oe
            ? a(oe)
            : function (e) {
                return $(e) && "[object Map]" == je(e);
              },
          Ye = ae
            ? a(ae)
            : function (e) {
                return $(e) && "[object Set]" == je(e);
              },
          Qe = ie
            ? a(ie)
            : function (e) {
                return $(e) && B(e.length) && !!Z[C(e)];
              };
        (c.keys = N),
          (c.keysIn = U),
          (c.cloneDeep = function (e) {
            return y(e, 5);
          }),
          (c.eq = F),
          (c.isArguments = We),
          (c.isArray = Ve),
          (c.isArrayLike = R),
          (c.isBuffer = qe),
          (c.isEqual = function (e, t) {
            return S(e, t);
          }),
          (c.isFunction = L),
          (c.isLength = B),
          (c.isMap = Ze),
          (c.isNil = function (e) {
            return null == e;
          }),
          (c.isObject = O),
          (c.isObjectLike = $),
          (c.isSet = Ye),
          (c.isTypedArray = Qe),
          (c.stubArray = H),
          (c.stubFalse = z),
          (c.VERSION = "4.17.5"),
          (J._ = c);
      }.call(this),
      r.exports
    );
  }).call({});
  const Tv = globalThis._;
  delete globalThis._,
    (app.$lodash = Tv),
    (app.$shortid = M),
    (app.$sha256 = { calc: bg }),
    (app.$redux = { createStore: N }),
    (app.$reactDom = { createRoot: R }),
    (app.$reactRedux = { connect: Xm, Provider: Jm }),
    (app.$dateFns = {
      addDays: kg,
      addMonths: function (e, t) {
        wg(2, arguments);
        var r = Cg(e),
          n = yg(t);
        if (isNaN(n)) return new Date(NaN);
        if (!n) return r;
        var o = r.getDate(),
          a = new Date(r.getTime());
        a.setMonth(r.getMonth() + n + 1, 0);
        var i = a.getDate();
        return o >= i
          ? a
          : (r.setFullYear(a.getFullYear(), a.getMonth(), o), r);
      },
      addWeeks: function (e, t) {
        wg(2, arguments);
        var r = yg(t),
          n = 7 * r;
        return kg(e, n);
      },
      differenceInCalendarDays: function (e, t) {
        wg(2, arguments);
        var r = xg(e),
          n = xg(t),
          o = r.getTime() - _g(r),
          a = n.getTime() - _g(n);
        return Math.round((o - a) / Pg);
      },
      endOfDay: function (e) {
        wg(1, arguments);
        var t = Cg(e);
        return t.setHours(23, 59, 59, 999), t;
      },
      endOfMonth: function (e) {
        wg(1, arguments);
        var t = Cg(e),
          r = t.getMonth();
        return (
          t.setFullYear(t.getFullYear(), r + 1, 0),
          t.setHours(23, 59, 59, 999),
          t
        );
      },
      endOfWeek: function (e, t) {
        wg(1, arguments);
        var r = t || {},
          n = r.locale,
          o = n && n.options && n.options.weekStartsOn,
          a = null == o ? 0 : yg(o),
          i = null == r.weekStartsOn ? a : yg(r.weekStartsOn);
        if (!(i >= 0 && i <= 6))
          throw new RangeError(
            "weekStartsOn must be between 0 and 6 inclusively"
          );
        var s = Cg(e),
          l = s.getDay(),
          c = 6 + (l < i ? -7 : 0) - (l - i);
        return s.setDate(s.getDate() + c), s.setHours(23, 59, 59, 999), s;
      },
      format: function (e, t, r) {
        wg(2, arguments);
        var n = String(t),
          o = r || {},
          a = o.locale || Lg,
          i = a.options && a.options.firstWeekContainsDate,
          s = null == i ? 1 : yg(i),
          l = null == o.firstWeekContainsDate ? s : yg(o.firstWeekContainsDate);
        if (!(l >= 1 && l <= 7))
          throw new RangeError(
            "firstWeekContainsDate must be between 1 and 7 inclusively"
          );
        var c = a.options && a.options.weekStartsOn,
          u = null == c ? 0 : yg(c),
          d = null == o.weekStartsOn ? u : yg(o.weekStartsOn);
        if (!(d >= 0 && d <= 6))
          throw new RangeError(
            "weekStartsOn must be between 0 and 6 inclusively"
          );
        if (!a.localize)
          throw new RangeError("locale must contain localize property");
        if (!a.formatLong)
          throw new RangeError("locale must contain formatLong property");
        var h = Cg(e);
        if (!Tg(h)) throw new RangeError("Invalid time value");
        var p = _g(h),
          m = Og(h, p),
          g = {
            firstWeekContainsDate: l,
            weekStartsOn: d,
            locale: a,
            _originalDate: h,
          },
          f = n
            .match(_f)
            .map(function (e) {
              var t = e[0];
              return "p" === t || "P" === t
                ? (0, bf[t])(e, a.formatLong, g)
                : e;
            })
            .join("")
            .match(Ef)
            .map(function (r) {
              if ("''" === r) return "'";
              var n = r[0];
              if ("'" === n) return If(r);
              var i = hf[n];
              if (i)
                return (
                  !o.useAdditionalWeekYearTokens && kf(r) && Sf(r, t, e),
                  !o.useAdditionalDayOfYearTokens && Cf(r) && Sf(r, t, e),
                  i(m, r, a.localize, g)
                );
              if (n.match(Tf))
                throw new RangeError(
                  "Format string contains an unescaped latin alphabet character `" +
                    n +
                    "`"
                );
              return r;
            })
            .join("");
        return f;
      },
      getDate: function (e) {
        wg(1, arguments);
        var t = Cg(e),
          r = t.getDate();
        return r;
      },
      getMonth: function (e) {
        wg(1, arguments);
        var t = Cg(e),
          r = t.getMonth();
        return r;
      },
      getWeek: function (e, t) {
        wg(1, arguments);
        var r = Cg(e),
          n = Gf(r, t).getTime() - Af(r, t).getTime();
        return Math.round(n / Mf) + 1;
      },
      getYear: function (e) {
        wg(1, arguments);
        var t = Cg(e),
          r = t.getFullYear();
        return r;
      },
      isSameDay: Ff,
      isSameMonth: function (e, t) {
        wg(2, arguments);
        var r = Cg(e),
          n = Cg(t);
        return (
          r.getFullYear() === n.getFullYear() && r.getMonth() === n.getMonth()
        );
      },
      isThisYear: function (e) {
        return wg(1, arguments), Rf(e, Date.now());
      },
      isToday: function (e) {
        return wg(1, arguments), Ff(e, Date.now());
      },
      isTomorrow: function (e) {
        return wg(1, arguments), Ff(e, kg(Date.now(), 1));
      },
      isYesterday: function (e) {
        return wg(1, arguments), Ff(e, Lf(Date.now(), 1));
      },
      parse: function (e, t, r, n) {
        wg(3, arguments);
        var o = String(e),
          a = String(t),
          i = n || {},
          s = i.locale || Lg;
        if (!s.match)
          throw new RangeError("locale must contain match property");
        var l = s.options && s.options.firstWeekContainsDate,
          c = null == l ? 1 : yg(l),
          u = null == i.firstWeekContainsDate ? c : yg(i.firstWeekContainsDate);
        if (!(u >= 1 && u <= 7))
          throw new RangeError(
            "firstWeekContainsDate must be between 1 and 7 inclusively"
          );
        var d = s.options && s.options.weekStartsOn,
          h = null == d ? 0 : yg(d),
          p = null == i.weekStartsOn ? h : yg(i.weekStartsOn);
        if (!(p >= 0 && p <= 6))
          throw new RangeError(
            "weekStartsOn must be between 0 and 6 inclusively"
          );
        if ("" === a) return "" === o ? Cg(r) : new Date(NaN);
        var m,
          g = { firstWeekContainsDate: u, weekStartsOn: p, locale: s },
          f = [{ priority: 10, subPriority: -1, set: xv, index: 0 }],
          v = a
            .match(Cv)
            .map(function (e) {
              var t = e[0];
              return "p" === t || "P" === t
                ? (0, bf[t])(e, s.formatLong, g)
                : e;
            })
            .join("")
            .match(wv),
          b = [];
        for (m = 0; m < v.length; m++) {
          var y = v[m];
          !i.useAdditionalWeekYearTokens && kf(y) && Sf(y, a, e),
            !i.useAdditionalDayOfYearTokens && Cf(y) && Sf(y, a, e);
          var w = y[0],
            C = yv[w];
          if (C) {
            var k = C.incompatibleTokens;
            if (Array.isArray(k)) {
              for (var S = void 0, E = 0; E < b.length; E++) {
                var _ = b[E].token;
                if (-1 !== k.indexOf(_) || _ === w) {
                  S = b[E];
                  break;
                }
              }
              if (S)
                throw new RangeError(
                  "The format string mustn't contain `"
                    .concat(S.fullToken, "` and `")
                    .concat(y, "` at the same time")
                );
            } else if ("*" === C.incompatibleTokens && b.length)
              throw new RangeError(
                "The format string mustn't contain `".concat(
                  y,
                  "` and any other token at the same time"
                )
              );
            b.push({ token: w, fullToken: y });
            var x = C.parse(o, y, s.match, g);
            if (!x) return new Date(NaN);
            f.push({
              priority: C.priority,
              subPriority: C.subPriority || 0,
              set: C.set,
              validate: C.validate,
              value: x.value,
              index: f.length,
            }),
              (o = x.rest);
          } else {
            if (w.match(_v))
              throw new RangeError(
                "Format string contains an unescaped latin alphabet character `" +
                  w +
                  "`"
              );
            if (
              ("''" === y ? (y = "'") : "'" === w && (y = Pv(y)),
              0 !== o.indexOf(y))
            )
              return new Date(NaN);
            o = o.slice(y.length);
          }
        }
        if (o.length > 0 && Ev.test(o)) return new Date(NaN);
        var P = f
            .map(function (e) {
              return e.priority;
            })
            .sort(function (e, t) {
              return t - e;
            })
            .filter(function (e, t, r) {
              return r.indexOf(e) === t;
            })
            .map(function (e) {
              return f
                .filter(function (t) {
                  return t.priority === e;
                })
                .sort(function (e, t) {
                  return t.subPriority - e.subPriority;
                });
            })
            .map(function (e) {
              return e[0];
            }),
          T = Cg(r);
        if (isNaN(T)) return new Date(NaN);
        var I = Og(T, _g(T)),
          G = {};
        for (m = 0; m < P.length; m++) {
          var D = P[m];
          if (D.validate && !D.validate(I, D.value, g)) return new Date(NaN);
          var A = D.set(I, G, D.value, g);
          A[0] ? ((I = A[0]), Bf(G, A[1])) : (I = A);
        }
        return I;
      },
      startOfDay: xg,
      startOfMonth: function (e) {
        wg(1, arguments);
        var t = Cg(e);
        return t.setDate(1), t.setHours(0, 0, 0, 0), t;
      },
      startOfWeek: Gf,
    });
  const { $utils: Iv } = app;
  Iv.calcEngagement = (e, t) => (e || 0) + 10 * (t || 0);
  const { $utils: Gv } = app;
  Gv.callAsync = async (e, ...t) =>
    new Promise((r) => {
      e(...t, r);
    });
  const { $utils: Dv } = app;
  Dv.canvasToBlob = async (
    e,
    { type: t = "image/jpeg", quality: r = 0.8 } = {}
  ) =>
    await new Promise((n, o) => {
      e.toBlob(
        (e) => {
          e ? n(e) : o("canvas.toBlob failed");
        },
        t,
        r
      );
    });
  const { $utils: Av } = app;
  Av.createAlarm = (e, { delay: t, period: r, when: n }, o) => {
    const a = {};
    "number" == typeof t && (a.delayInMinutes = t / Av.time.MINUTE),
      "number" == typeof r && (a.periodInMinutes = r / Av.time.MINUTE),
      "number" == typeof n && (a.when = n),
      chrome.alarms.create(e, a),
      chrome.alarms.onAlarm.addListener((t) => {
        t.name === e && o();
      });
  };
  const { $utils: Mv } = app;
  Mv.createEmitter = () => {
    const e = [];
    return Object.assign(t, {
      handle: function (e) {
        if ("function" != typeof e)
          return void console.error("function is expected");
        t(e);
      },
      clear: function () {
        e.length = 0;
      },
      off: function (t) {
        const r = e.indexOf(t);
        -1 !== r && e.splice(r, 1);
      },
      isEmpty: function () {
        return 0 === e.length;
      },
    });
    function t(...t) {
      "function" == typeof t[0] ? e.push(t[0]) : e.forEach((e) => e(...t));
    }
  };
  const { $utils: Fv } = app;
  function Rv(e, t) {
    return (
      Lv(t) || (t = JSON.stringify(t)),
      `${encodeURIComponent(e)}=${encodeURIComponent(t)}`
    );
  }
  function Lv(e) {
    return (
      "string" == typeof e || "number" == typeof e || "boolean" == typeof e
    );
  }
  Fv.createQueryString = (e) =>
    Object.keys(e)
      .map((t) => {
        const r = e[t];
        return Lv(r)
          ? Rv(t, r)
          : Array.isArray(r)
          ? r.map((e) => Rv(t, e)).join("&")
          : null;
      })
      .filter(Boolean)
      .join("&")
      .replace(/%5B/g, "[")
      .replace(/%5D/g, "]");
  const { $utils: Bv } = app;
  Bv.createResolvablePromise = () => {
    let e = null,
      t = null;
    const r = new Promise((r, n) => {
      (e = r), (t = n);
    });
    return (
      r.__defineGetter__("resolve", () => e),
      r.__defineGetter__("reject", () => t),
      r
    );
  };
  const { $utils: Ov } = app;
  Ov.createUrl = (e, t = {}) => {
    const r = Ov.createQueryString(t);
    return r ? `${e}?${r}` : e;
  };
  const { $utils: $v } = app;
  $v.docElem = document.documentElement;
  const { $utils: Nv } = app;
  (Nv.$ = (e, t = document) => {
    e = Nv.ensureArray(e);
    for (const r of e) {
      const e = t.querySelector(r);
      if (e) return e;
    }
    return null;
  }),
    (Nv.$$ = (e, t = document) => {
      e = Nv.ensureArray(e);
      const r = [];
      for (const n of e) {
        const e = t.querySelectorAll(n);
        for (const t of e) r.includes(t) || r.push(t);
      }
      return r;
    });
  const { $utils: Uv } = app;
  Uv.ensureArray = (e) => (Array.isArray(e) ? e : [e]);
  const { $utils: Hv, $bus: zv } = app;
  Hv.extractFrame = async (e, t = 0) => {
    if ("undefined" == typeof document)
      return await zv.send("utils.extractFrame", e, t);
    const r = await Hv.objectUrl.create(e),
      n = document.createElement("video");
    (n.src = r),
      (n.muted = !0),
      await new Promise((e) => n.addEventListener("loadedmetadata", e)),
      (n.currentTime = t * n.duration),
      await new Promise((e) => n.addEventListener("timeupdate", e));
    const o = document.createElement("canvas"),
      a = o.getContext("2d");
    (o.width = n.videoWidth), (o.height = n.videoHeight), a.drawImage(n, 0, 0);
    return await new Promise((e) => o.toBlob(e, "image/jpeg"));
  };
  const { $utils: jv } = app;
  jv.file = {
    isCsv: function (e) {
      return "text/csv" === e.type;
    },
    isImage: function (e) {
      return e.type.startsWith("image/");
    },
    isVideo: function (e) {
      return e.type.startsWith("video/");
    },
  };
  const { $utils: Wv } = app;
  async function Vv() {
    await new Promise((e) => {
      requestIdleCallback(() => e(), { timeout: 3 * Wv.time.SECOND });
    });
  }
  Wv.generateSquarePreview = async (
    e,
    { size: t = 260, mimeType: r = "image/jpeg", quality: n = 0.8 } = {}
  ) => {
    let o, a, i;
    if (e.type.startsWith("image/"))
      try {
        await new Promise(async (t, r) => {
          const n = document.createElement("img");
          (n.src = await Wv.objectUrl.create(e)),
            n.addEventListener("load", () => {
              (o = n), (a = n.width), (i = n.height), t();
            }),
            n.addEventListener("error", () => {
              r(null);
            });
        });
      } catch (t) {
        return (
          console.error("failed to read image", { fileOrBlob: e, details: t }),
          null
        );
      }
    else {
      if (!e.type.startsWith("video/")) return null;
      try {
        await new Promise(async (t, r) => {
          const n = document.createElement("video");
          (n.src = await Wv.objectUrl.create(e)),
            n.addEventListener("loadedmetadata", () => {
              (n.currentTime = n.duration / 2),
                n.addEventListener("timeupdate", () => {
                  (o = n), (a = n.videoWidth), (i = n.videoHeight), t();
                });
            }),
            n.addEventListener("error", () => {
              r(n.error);
            });
        });
      } catch (t) {
        return (
          console.error("failed to read video", { fileOrBlob: e, details: t }),
          null
        );
      }
    }
    const s = document.createElement("canvas"),
      l = a / i,
      c = l > 1 ? l * t : t,
      u = c / l,
      d = s.getContext("2d");
    (s.width = c),
      (s.height = u),
      d.drawImage(o, 0, 0, a, i, 0, 0, c, u),
      await Vv();
    const h = s.toDataURL(r, n),
      p = atob(h.split(",")[1]),
      m = new ArrayBuffer(p.length),
      g = new Uint8Array(m);
    for (let e = 0; e < p.length; e += 1) g[e] = p.charCodeAt(e);
    const f = new Blob([m], { type: r });
    await Vv();
    const v = { r: 220, g: 220, b: 220 },
      b = [];
    try {
      const e = d.getImageData(0, 0, c, u).data,
        t = 5;
      let r = 0;
      for (let n = 0; n < e.length; n += 4 * t)
        (r += 1),
          (v.r += e[n]),
          (v.g += e[n + 1]),
          (v.b += e[n + 2]),
          b.push(`${e[n]},${e[n + 1]},${e[n + 2]}`);
      (v.r = Math.floor(v.r / r)),
        (v.g = Math.floor(v.g / r)),
        (v.b = Math.floor(v.b / r)),
        (v.r += 20),
        (v.g += 20),
        (v.b += 20),
        (v.r = Math.min(220, v.r)),
        (v.g = Math.min(220, v.g)),
        (v.b = Math.min(220, v.b));
    } catch (e) {
      console.error("failed to calculate average color", e);
    }
    return {
      blob: f,
      averageColor: `rgb(${v.r}, ${v.g}, ${v.b})`,
      colorDiversity: new Set(b).size,
    };
  };
  const { $utils: qv } = app;
  let Zv, Yv;
  qv.getHashtagRegex = ({ hashOptional: e = !1 } = {}) => (
    Zv ||
      ((Zv =
        /()([#\uFF03])((?:[A-Za-z¬™¬µ¬∫√Ä-√ñ√ò-√∂√∏-…Å…ê-ÀÅÀÜ-ÀëÀ†-À§ÀÆÕ∫ŒÜŒà-ŒäŒåŒé-Œ°Œ£-œéœê-œµœ∑-“Å“ä-”é-”π‘Ä-‘è‘±-’ñ’ô’°-÷á◊ê-◊™◊∞-◊≤ÿ°-ÿ∫ŸÄ-ŸäŸÆ-ŸØŸ±-€ì€ï€•-€¶€Æ-€Ø€∫-€º€ø‹ê‹í-‹Ø›ç-›≠ﬁÄ-ﬁ•ﬁ±‡§Ñ-‡§π‡§Ω‡•ê‡•ò-‡•°‡•Ω‡¶Ö-‡¶å‡¶è-‡¶ê‡¶ì-‡¶®‡¶™-‡¶∞‡¶≤‡¶∂-‡¶π‡¶Ω‡ßé‡ßú-‡ßù‡ßü-‡ß°‡ß∞-‡ß±‡®Ö-‡®ä‡®è-‡®ê‡®ì-‡®®‡®™-‡®∞‡®≤-‡®≥‡®µ-‡®∂‡®∏-‡®π‡©ô-‡©ú‡©û‡©≤-‡©¥‡™Ö-‡™ç‡™è-‡™ë‡™ì-‡™®‡™™-‡™∞‡™≤-‡™≥‡™µ-‡™π‡™Ω‡´ê‡´†-‡´°‡¨Ö-‡¨å‡¨è-‡¨ê‡¨ì-‡¨®‡¨™-‡¨∞‡¨≤-‡¨≥‡¨µ-‡¨π‡¨Ω‡≠ú-‡≠ù‡≠ü-‡≠°‡≠±‡ÆÉ‡ÆÖ-‡Æä‡Æé-‡Æê‡Æí-‡Æï‡Æô-‡Æö‡Æú‡Æû-‡Æü‡Æ£-‡Æ§‡Æ®-‡Æ™‡ÆÆ-‡Æπ‡∞Ö-‡∞å‡∞é-‡∞ê‡∞í-‡∞®‡∞™-‡∞≥‡∞µ-‡∞π‡±†-‡±°‡≤Ö-‡≤å‡≤é-‡≤ê‡≤í-‡≤®‡≤™-‡≤≥‡≤µ-‡≤π‡≤Ω‡≥û‡≥†-‡≥°‡¥Ö-‡¥å‡¥é-‡¥ê‡¥í-‡¥®‡¥™-‡¥π‡µ†-‡µ°‡∂Ö-‡∂ñ‡∂ö-‡∂±‡∂≥-‡∂ª‡∂Ω‡∑Ä-‡∑Ü‡∏Å-‡∏∞‡∏≤-‡∏≥‡πÄ-‡πÜ‡∫Å-‡∫Ç‡∫Ñ‡∫á-‡∫à‡∫ä‡∫ç‡∫î-‡∫ó‡∫ô-‡∫ü‡∫°-‡∫£‡∫•‡∫ß‡∫™-‡∫´‡∫≠-‡∫∞‡∫≤-‡∫≥‡∫Ω‡ªÄ-‡ªÑ‡ªÜ‡ªú-‡ªù‡ºÄ‡ΩÄ-‡Ωá‡Ωâ-‡Ω™‡æà-‡æã·ÄÄ-·Ä°·Ä£-·Äß·Ä©-·Ä™·Åê-·Åï·Ç†-·ÉÖ·Éê-·É∫·Éº·ÑÄ-·Öô·Öü-·Ü¢·Ü®-·áπ·àÄ-·âà·âä-·âç·âê-·âñ·âò·âö-·âù·â†-·äà·ää-·äç-·ä∞·ä≤-·äµ·ä∏-·äæ·ãÄ·ãÇ-·ãÖ·ãà-·ãñ·ãò-·åê·åí-·åï·åò-·çö·éÄ-·éè-·è¥·êÅ-·ô¨·ôØ-·ô∂·öÅ-·öö·ö†-·õ™·úÄ-·úå·úé-·úë·ú†-·ú±·ùÄ-·ùë·ù†-·ù¨·ùÆ-·ù∞·ûÄ-·û≥·üó·üú·††-·°∑·¢Ä-·¢®·§Ä-·§ú·•ê-·•≠·•∞-·•¥·¶Ä-·¶©·ßÅ-·ßá·®Ä-·®ñ·¥Ä-·∂ø·∏Ä-·∫õ·∫†-·ªπ·ºÄ-·ºï·ºò-·ºù·º†-·ΩÖ·Ωà-·Ωç·Ωê-·Ωó·Ωô·Ωõ·Ωù·Ωü-·ΩΩ·æÄ-·æ¥·æ∂-·æº·ææ·øÇ-·øÑ·øÜ-·øå·øê-·øì·øñ-·øõ·ø†-·ø¨·ø≤-·ø¥·ø∂-·øº‚Å±‚Åø‚Çê-‚Çî‚ÑÇ‚Ñá‚Ñä-‚Ñì‚Ñï‚Ñô-‚Ñù‚Ñ§‚Ñ¶‚Ñ®‚Ñ™-‚Ñ≠‚ÑØ-‚Ñ±‚Ñ≥-‚Ñπ‚Ñº-‚Ñø‚ÖÖ-‚Öâ‚∞Ä-‚∞Æ‚∞∞-‚±û‚≤Ä-‚≥§‚µ•‚µØ‚∂Ä-‚∂ñ‚∂†-‚∂¶‚∂®-‚∂Æ‚∂∞-‚∂∂‚∂∏-‚∂æ‚∑Ä-‚∑Ü‚∑à-‚∑é‚∑ê-‚∑ñ‚∑ò-‚∑û„ÄÖ-„ÄÜ„Ä±-„Äµ„Äª-„Äº„ÅÅ-„Çñ„Çù-„Çü„Ç°-„É∫„Éº-„Éø„ÑÖ-„Ñ¨„Ñ±-„Üé„Ü†-„Ü∑„á∞-„áø-‰∂µ‰∏Ä-ÈæªÍÄÄ-ÍíåÍ†Ä-Í†ÅÍ†É-Í†ÖÍ†á-Í†äÍ†å-Í†¢Í∞Ä-Ìû£Ô§Ä-Ô®≠Ô®∞-Ô©™Ô©∞-Ô´ôÔ¨Ä-Ô¨ÜÔ¨ì-Ô¨óÔ¨ùÔ¨ü-Ô¨®Ô¨™-Ô¨∂-Ô¨ºÔ¨æÔ≠Ä-Ô≠ÅÔ≠É-Ô≠ÑÔ≠Ü-ÔÆ±ÔØì-Ô¥ΩÔµê-Ô∂èÔ∂í-Ô∑áÔ∑∞-Ô∑ªÔπ∞-Ôπ¥Ôπ∂-ÔªºÔº°-Ôº∫ÔΩÅ-ÔΩöÔΩ¶-ÔææÔøÇ-ÔøáÔøä-ÔøèÔøí-ÔøóÔøö-ÔøúÃÄÔæ°-Ôøú„Ç°-„É∫„Éº-„ÉæÔΩ¶-ÔæüÔºê-ÔºôÔº°-Ôº∫ÔΩÅ-ÔΩö„ÅÅ-„Çñ„Çô-„Çû„êÄ-‰∂ø‰∏Ä-ÈøøÍúÄ-ÎúøÎùÄ-Î†ü-Ô®ü„ÄÉ„ÄÖ„Äª0-9Ÿ†-Ÿ©€∞-€π‡•¶-‡•Ø‡ß¶-‡ßØ‡©¶-‡©Ø‡´¶-‡´Ø‡≠¶-‡≠Ø‡Ø¶-‡ØØ‡±¶-‡±Ø‡≥¶-‡≥Ø‡µ¶-‡µØ‡πê-‡πô‡ªê-‡ªô‡º†-‡º©·ÅÄ-·Åâ·ü†-·ü©·†ê-·†ô·•Ü-·•è·ßê-·ßôÔºê-Ôºô_]|(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267B\u267F\u2692-\u2694\u2696\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD79\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED0\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3]|\uD83E[\uDD10-\uDD18\uDD80-\uDD84\uDDC0]|(?:0\u20E3|1\u20E3|2\u20E3|3\u20E3|4\u20E3|5\u20E3|6\u20E3|7\u20E3|8\u20E3|9\u20E3|#\u20E3|\\*\u20E3|\uD83C(?:\uDDE6\uD83C(?:\uDDEB|\uDDFD|\uDDF1|\uDDF8|\uDDE9|\uDDF4|\uDDEE|\uDDF6|\uDDEC|\uDDF7|\uDDF2|\uDDFC|\uDDE8|\uDDFA|\uDDF9|\uDDFF|\uDDEA)|\uDDE7\uD83C(?:\uDDF8|\uDDED|\uDDE9|\uDDE7|\uDDFE|\uDDEA|\uDDFF|\uDDEF|\uDDF2|\uDDF9|\uDDF4|\uDDE6|\uDDFC|\uDDFB|\uDDF7|\uDDF3|\uDDEC|\uDDEB|\uDDEE|\uDDF6|\uDDF1)|\uDDE8\uD83C(?:\uDDF2|\uDDE6|\uDDFB|\uDDEB|\uDDF1|\uDDF3|\uDDFD|\uDDF5|\uDDE8|\uDDF4|\uDDEC|\uDDE9|\uDDF0|\uDDF7|\uDDEE|\uDDFA|\uDDFC|\uDDFE|\uDDFF|\uDDED)|\uDDE9\uD83C(?:\uDDFF|\uDDF0|\uDDEC|\uDDEF|\uDDF2|\uDDF4|\uDDEA)|\uDDEA\uD83C(?:\uDDE6|\uDDE8|\uDDEC|\uDDF7|\uDDEA|\uDDF9|\uDDFA|\uDDF8|\uDDED)|\uDDEB\uD83C(?:\uDDF0|\uDDF4|\uDDEF|\uDDEE|\uDDF7|\uDDF2)|\uDDEC\uD83C(?:\uDDF6|\uDDEB|\uDDE6|\uDDF2|\uDDEA|\uDDED|\uDDEE|\uDDF7|\uDDF1|\uDDE9|\uDDF5|\uDDFA|\uDDF9|\uDDEC|\uDDF3|\uDDFC|\uDDFE|\uDDF8|\uDDE7)|\uDDED\uD83C(?:\uDDF7|\uDDF9|\uDDF2|\uDDF3|\uDDF0|\uDDFA)|\uDDEE\uD83C(?:\uDDF4|\uDDE8|\uDDF8|\uDDF3|\uDDE9|\uDDF7|\uDDF6|\uDDEA|\uDDF2|\uDDF1|\uDDF9)|\uDDEF\uD83C(?:\uDDF2|\uDDF5|\uDDEA|\uDDF4)|\uDDF0\uD83C(?:\uDDED|\uDDFE|\uDDF2|\uDDFF|\uDDEA|\uDDEE|\uDDFC|\uDDEC|\uDDF5|\uDDF7|\uDDF3)|\uDDF1\uD83C(?:\uDDE6|\uDDFB|\uDDE7|\uDDF8|\uDDF7|\uDDFE|\uDDEE|\uDDF9|\uDDFA|\uDDF0|\uDDE8)|\uDDF2\uD83C(?:\uDDF4|\uDDF0|\uDDEC|\uDDFC|\uDDFE|\uDDFB|\uDDF1|\uDDF9|\uDDED|\uDDF6|\uDDF7|\uDDFA|\uDDFD|\uDDE9|\uDDE8|\uDDF3|\uDDEA|\uDDF8|\uDDE6|\uDDFF|\uDDF2|\uDDF5|\uDDEB)|\uDDF3\uD83C(?:\uDDE6|\uDDF7|\uDDF5|\uDDF1|\uDDE8|\uDDFF|\uDDEE|\uDDEA|\uDDEC|\uDDFA|\uDDEB|\uDDF4)|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C(?:\uDDEB|\uDDF0|\uDDFC|\uDDF8|\uDDE6|\uDDEC|\uDDFE|\uDDEA|\uDDED|\uDDF3|\uDDF1|\uDDF9|\uDDF7|\uDDF2)|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C(?:\uDDEA|\uDDF4|\uDDFA|\uDDFC|\uDDF8)|\uDDF8\uD83C(?:\uDDFB|\uDDF2|\uDDF9|\uDDE6|\uDDF3|\uDDE8|\uDDF1|\uDDEC|\uDDFD|\uDDF0|\uDDEE|\uDDE7|\uDDF4|\uDDF8|\uDDED|\uDDE9|\uDDF7|\uDDEF|\uDDFF|\uDDEA|\uDDFE)|\uDDF9\uD83C(?:\uDDE9|\uDDEB|\uDDFC|\uDDEF|\uDDFF|\uDDED|\uDDF1|\uDDEC|\uDDF0|\uDDF4|\uDDF9|\uDDE6|\uDDF3|\uDDF7|\uDDF2|\uDDE8|\uDDFB)|\uDDFA\uD83C(?:\uDDEC|\uDDE6|\uDDF8|\uDDFE|\uDDF2|\uDDFF)|\uDDFB\uD83C(?:\uDDEC|\uDDE8|\uDDEE|\uDDFA|\uDDE6|\uDDEA|\uDDF3)|\uDDFC\uD83C(?:\uDDF8|\uDDEB)|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C(?:\uDDF9|\uDDEA)|\uDDFF\uD83C(?:\uDDE6|\uDDF2|\uDDFC))))[\uFE00-\uFE0F\u200D]*)+)/gi),
      (Yv = new RegExp(
        Zv.toString()
          .replace("/", "")
          .replace("/gi", "")
          .replace("[#\\uFF03]", "[#\\uFF03]?"),
        "gi"
      ))),
    e ? Yv : Zv
  );
  const { $utils: Qv } = app;
  function Kv() {
    return window.self.name.split("|")[0] || null;
  }
  Qv.iframe = {
    createName: function (e, t) {
      return `${e}|${JSON.stringify(t)}`;
    },
    getName: Kv,
    getParams: function () {
      const e = window.self.name.split("|")[1];
      return Qv.safeJsonParse(e) || {};
    },
    isIframe: function (e = null) {
      return window.self !== parent && (!e || Kv() === e);
    },
  };
  const { $utils: Xv } = app;
  Xv.is = {
    null: (e) => null === e,
    defined: (e) => void 0 !== e,
    undefined: (e) => void 0 === e,
    nil: (e) => null == e,
    boolean: (e) => "boolean" == typeof e,
    number: (e) => "number" == typeof e,
    string: (e) => "string" == typeof e,
    symbol: (e) => "symbol" == typeof e,
    function: (e) => "function" == typeof e,
    map: (e) => e instanceof Map,
    set: (e) => e instanceof Set,
    url: (e) => e instanceof URL,
    blob: (e) => e instanceof Blob,
    file: (e) => e instanceof File,
    error: (e) => e instanceof Error,
    regexp: (e) => e instanceof RegExp,
    array: (e) => Array.isArray(e),
    object: (e) => "[object Object]" === Object.prototype.toString.call(e),
    nan: (e) => Number.isNaN(e),
    nonPrimitive: (e) => Xv.is.object(e) || Xv.is.array(e),
    numeric: (e) => !Xv.is.nan(Number(e)),
    empty: (e) =>
      !!Xv.is.nil(e) ||
      (Xv.is.array(e)
        ? 0 === e.length
        : Xv.is.object(e)
        ? 0 === Object.keys(e).length
        : !!Xv.is.string(e) && 0 === e.trim().length),
  };
  const { $utils: Jv, $bus: eb } = app;
  Jv.loadImage = async (e) => {
    if ("undefined" == typeof document)
      return await eb.send("utils.loadImage", e);
    const t = await Jv.objectUrl.create(e),
      r = document.createElement("img");
    return (
      await new Promise((e, n) => {
        (r.onload = e), (r.onerror = n), (r.src = t);
      }),
      { img: r, width: r.width, height: r.height, ratio: r.width / r.height }
    );
  };
  const { $utils: tb, $bus: rb } = app;
  tb.loadVideoMetadata = async (e) => {
    if ("undefined" == typeof document)
      return await rb.send("utils.loadVideoMetadata", e);
    const t = "string" == typeof e ? e : await tb.objectUrl.create(e),
      r = document.createElement("video");
    (r.src = t),
      (r.muted = !0),
      (r.volume = 0),
      (r.preload = "metadata"),
      r.play();
    const n = {};
    return (
      await new Promise((e, t) => {
        r.addEventListener("loadedmetadata", async () => {
          await tb.waitFor(() => r.webkitAudioDecodedByteCount, 100),
            (n.width = r.videoWidth),
            (n.height = r.videoHeight),
            (n.ratio = r.videoWidth / r.videoHeight),
            (n.duration = r.duration),
            (n.hasAudio = r.webkitAudioDecodedByteCount > 0),
            e();
        }),
          r.addEventListener("error", () => {
            t(r.error);
          });
      }),
      r.remove(),
      n
    );
  };
  const { $utils: nb, $bus: ob } = app;
  nb.ls = {
    get: function (e, t) {
      if (!this._supported()) return ob.send("utils.ls.get", e, t);
      const r = localStorage.getItem(e);
      if (null == r) return t;
      if ("true" === r) return !0;
      if ("false" === r) return !1;
      if (r.startsWith("[") || r.startsWith("{")) return JSON.parse(r);
      const n = Number(r);
      return Number.isNaN(n) ? r : n;
    },
    set: function (e, t) {
      if (!this._supported()) return ob.send("utils.ls.set", e, t);
      try {
        "string" == typeof t
          ? localStorage.setItem(e, t)
          : localStorage.setItem(e, JSON.stringify(t));
      } catch (r) {
        nb.error("ls.set failed", { key: e, value: t, details: r });
      }
    },
    has: function (e) {
      return this._supported() ? e in localStorage : ob.send("utils.ls.has", e);
    },
    remove: function (e) {
      if (!this._supported()) return ob.send("utils.ls.remove", e);
      localStorage.removeItem(e);
    },
    _supported: function () {
      return !!globalThis.localStorage;
    },
  };
  const { $utils: ab, $bus: ib } = app;
  ab.objectUrl = {
    create: function (e, t = !1) {
      if (!URL.createObjectURL) return ib.send("utils.objectUrl.create", e, t);
      const r = URL.createObjectURL(e);
      if (t) {
        const e = ab.is.number(t) ? t : 6e4;
        setTimeout(() => URL.revokeObjectURL(r), e);
      }
      return r;
    },
    revoke: function (e) {
      if (!URL.revokeObjectURL) return ib.send("utils.objectUrl.revoke", e);
      URL.revokeObjectURL(e);
    },
  };
  const { $utils: sb } = app;
  sb.onDocMutations = Object.assign(
    function (e, t = !1) {
      0 === lb.length &&
        ((cb = new MutationObserver((e) => {
          for (const t of lb) {
            cb.disconnect();
            try {
              t(e);
            } catch (e) {
              console.error("onDocMutations", e);
            }
            if (!cb) return;
            cb.observe(document.documentElement, {
              attributes: !0,
              childList: !0,
              subtree: !0,
            });
          }
        })),
        cb.observe(document.documentElement, {
          attributes: !0,
          childList: !0,
          subtree: !0,
        }));
      lb.push(e), t && e();
    },
    {
      off: function (e) {
        const t = lb.indexOf(e);
        if (-1 === t) return;
        lb.splice(t, 1), 0 === lb.length && (cb.disconnect(), (cb = null));
      },
    }
  );
  const lb = [];
  let cb;
  const { $utils: ub } = app;
  ub.pickRandom = (...e) => e[Math.floor(Math.random() * e.length)];
  const { $utils: db } = app;
  db.removeFromArray = (e, t) => {
    let r;
    (r = "function" == typeof t ? e.findIndex(t) : e.indexOf(t)),
      -1 !== r && e.splice(r, 1);
  };
  const { $utils: hb } = app;
  hb.safe = (e, t = null) => {
    try {
      const r = e();
      return r instanceof Promise
        ? new Promise((e, n) => {
            r.then(e).catch((r) => {
              r && console.error(r), e(t);
            });
          })
        : r;
    } catch (e) {
      return console.error(e), t;
    }
  };
  const { $utils: pb } = app;
  pb.safeJsonParse = (e) => {
    try {
      return JSON.parse(e);
    } catch (e) {
      return null;
    }
  };
  const { $utils: mb, $bus: gb } = app;
  mb.scaler = {
    scaleToFitSize: async function (
      e,
      t,
      r,
      { type: n = "image/jpeg", quality: o = 0.8 } = {}
    ) {
      if ("undefined" == typeof document)
        return await gb.send("utils.scaler.scaleToFitRatio", ...arguments);
      const { img: a, width: i, height: s } = await mb.loadImage(e),
        l = t / i,
        c = r / s,
        u = Math.min(l, c),
        d = document.createElement("canvas");
      (d.width = i * u), (d.height = s * u);
      const h = d.getContext("2d");
      return (
        h.drawImage(a, 0, 0, i, s, 0, 0, d.width, d.height),
        await mb.canvasToBlob(d, { type: n, quality: o })
      );
    },
    scaleToFitRatio: async function (
      e,
      t,
      { type: r = "image/jpeg", quality: n = 0.8 } = {}
    ) {
      if ("undefined" == typeof document)
        return await gb.send("utils.scaler.scaleToFitRatio", ...arguments);
      const { img: o, width: a, height: i, ratio: s } = await mb.loadImage(e),
        l = document.createElement("canvas");
      s > t
        ? ((l.width = a), (l.height = a / t))
        : ((l.height = i), (l.width = i * t));
      const c = l.getContext("2d"),
        u = (l.width - a) / 2,
        d = (l.height - i) / 2;
      return (
        c.drawImage(o, u, d, a, i),
        await mb.canvasToBlob(l, { type: r, quality: n })
      );
    },
  };
  const { $utils: fb } = app;
  fb.shuffle = (e) => {
    for (let t = 0; t < e.length; t++) {
      const r = Math.floor(Math.random() * e.length),
        n = e[t];
      (e[t] = e[r]), (e[r] = n);
    }
    return e;
  };
  const { $utils: vb } = app;
  vb.sleep = async (e) => {
    if ("number" == typeof e && Number.isFinite(e)) {
      const t = e;
      await new Promise((e) => setTimeout(e, t));
    } else {
      if (!e || "object" != typeof e || e.constructor !== Object)
        throw new Error(
          "unexpected sleep function argument: number or object expected, got",
          e
        );
      {
        const { min: t, max: r } =
            e.longBreak &&
            Math.random() < 1 - Math.pow(0.5, 1 / e.longBreak.every)
              ? { min: 0, max: 0, ...e.longBreak }
              : { min: 0, max: 0, ...e },
          n =
            t +
            (function (e, t) {
              return Math.round(
                e +
                  (function () {
                    let e = 0;
                    for (let t = 0; t < 6; t += 1) e += Math.random();
                    return e / 6;
                  })() *
                    (t - e)
              );
            })(0, r - t);
        if (0 === n) return;
        await new Promise((e) => setTimeout(e, n));
      }
    }
  };
  const { $utils: bb } = app,
    yb = 36e5,
    wb = 864e5;
  bb.time = {
    SECOND: 1e3,
    MINUTE: 6e4,
    HOUR: yb,
    DAY: wb,
    WEEK: 6048e5,
    MONTH: 26784e5,
    weekdays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
    months: [
      "January",
      "February",
      "March",
      "April",
      "May",
      "June",
      "July",
      "August",
      "September",
      "October",
      "November",
      "December",
    ],
  };
  const { $utils: Cb } = app;
  Cb.unique = (e, t, r) => r.indexOf(e) === t;
  const { $utils: kb } = app;
  kb.waitFor = async (e, t = null) => {
    let r, n;
    return (
      "number" == typeof t
        ? ((r = t), (n = 100))
        : t
        ? ((r = t.timeout || 3e4), (n = t.frequency || 100))
        : ((r = 3e4), (n = 100)),
      new Promise((t, o) => {
        const a = e();
        if (a) return void t(a);
        const i = setInterval(() => {
          const r = e();
          r && (clearInterval(i), t(r));
        }, n);
        setTimeout(() => {
          clearInterval(i), t(null);
        }, r);
      })
    );
  };
  const { $utils: Sb } = app;
  Sb.waitForIdle = async (e) => {
    await new Promise((t) => requestIdleCallback(t, { timeout: e }));
  };
  const { $env: Eb } = app;
  Eb.getLocus = () =>
    "chrome-extension:" !== location.protocol && chrome.runtime
      ? "cs"
      : "chrome-extension:" !== location.protocol
      ? "nj"
      : "/inssist.html" === location.pathname
      ? "pp"
      : "/offscreen.html" === location.pathname
      ? "os"
      : "bg";
  const { $env: _b, $utils: xb } = app;
  _b.controller = {
    init: async function () {
      const e = _b.getLocus(),
        t = (await xb.ls.get("env.is")) || app.env;
      (this._production = "production" === t),
        (this._development = "development" === t),
        Object.assign(_b, {
          version: app.version,
          backup: this._getBackup(),
          features: await this._getFeatures(),
          options: await this._getOptions(),
          locus: e,
          is: {
            pp: "pp" === e,
            bg: "bg" === e,
            cs: "cs" === e,
            nj: "nj" === e,
            production: this._production,
            development: this._development,
          },
        });
    },
    _getBackup: function () {
      return { url: "https://inssist.com/backup" };
    },
    _getFeatures: async function () {
      return {
        fspring: await xb.ls.get("env.features.fspring", !0),
        iframes: await xb.ls.get("env.features.iframes", !0),
        trial: !0,
        log: await xb.ls.get("env.features.log", this._development),
      };
    },
    _getOptions: async function () {
      return {
        apiUrl: await xb.ls.get(
          "env.options.apiUrl",
          "https://api.inssist.com/api/v1"
        ),
        collectBillingStats: await xb.ls.get(
          "env.options.collectBillingStats",
          !1
        ),
        domain: await xb.ls.get("env.options.domain", "inssist.com"),
        storefront: await xb.ls.get(
          "env.options.storefront",
          this._production
            ? "slashed.onfastspring.com"
            : "slashed.test.onfastspring.com"
        ),
        checkoutContainer: await xb.ls.get(
          "env.options.checkoutContainer",
          "https://inssist.com"
        ),
        billingPlans: this._getBillingPlans(),
        billingProFeaturesList: this._getBillingProFeaturesList(),
        billingProFeaturesTable: this._getBillingProFeaturesTable(),
        trialFeaturesLimits: this._getTrialFeaturesLimits(),
        tagAssist: await this._getTagAssist(),
      };
    },
    _getBillingPlans: function () {
      return {
        "inssist-pro-monthly": {
          type: "subscription",
          pricing: { US: { currency: "USD", price: 4.99 } },
        },
        "inssist-pro-lifetime": {
          type: "product",
          pricing: { US: { currency: "USD", price: 45 } },
          isActive: (e) => {
            const { billing: t, auth: r } = e;
            return (t.orders || []).some((e) => {
              var t, n;
              return (
                "inssist-pro-lifetime" === e.product &&
                (null === (t = e.tags) ||
                void 0 === t ||
                null === (n = t.accounts) ||
                void 0 === n
                  ? void 0
                  : n.some(
                      (e) =>
                        e.id === (null == r ? void 0 : r.userId) ||
                        e.name === (null == r ? void 0 : r.username)
                    ))
              );
            });
          },
        },
        "inssist-pro-infinite": {
          type: "product",
          pricing: { US: { currency: "USD", price: 240 } },
        },
      };
    },
    _getBillingProFeaturesList: function () {
      return [
        {
          id: "schedule",
          icon: "sidebar-mediator.later",
          title: "Post Later",
          description:
            "\n          Schedule photos, videos, carousels, stories and reels.\n          Use Time Slots to schedule content rapidly.\n        ",
        },
        {
          id: "hashtags",
          icon: "sidebar-mediator.hashtags",
          title: "Hashtag Assistant",
          description:
            "\n          Find effective hashtags to increase your posts engagement.\n          Create hashtag collections.\n        ",
        },
        {
          id: "reels",
          icon: "sidebar-mediator.covers",
          title: "Reels and Video Stories",
          description:
            "\n          Publish Video Reels and Instagram Video Stories from your desktop PC / Mac.\n        ",
        },
        {
          id: "music",
          icon: "sidebar-mediator.music",
          title: "Music, Covers, Ghost View",
          description:
            "\n          Add music to your videos. Select or upload custom covers.\n          View stories anonymously.\n        ",
        },
      ];
    },
    _getBillingProFeaturesTable: function () {
      return [
        { title: "Post Photos and Videos", isFree: !0, isPro: !0 },
        { title: "Post Photo Stories", isFree: !0, isPro: !0 },
        { title: "Multiaccount Support", isFree: !0, isPro: !0 },
        { title: "Relevant Hashtags", isFree: !0, isPro: !0 },
        { title: "Direct Messages", isFree: !0, isPro: !0 },
        { title: "Inspirations", isFree: !0, isPro: !0 },
        { title: "Dark Mode", isFree: !0, isPro: !0, isPaddedBottom: !0 },
        {
          title: "Post Reels",
          isPro: !0,
          icons: [
            "sidebar-mediator.later",
            "sidebar-mediator.covers",
            "sidebar-mediator.hashtags",
          ],
        },
        { title: "Post Video Stories", isPro: !0 },
        { title: "Schedule Posts", isPro: !0 },
        { title: "Schedule Reels", isPro: !0 },
        { title: "Schedule Stories", isPro: !0 },
        {
          title: "Ghost Story View",
          isPro: !0,
          tooltip: { text: "Stay anonymous while viewing Instagram stories" },
        },
        { title: "Add Music to Videos", isPro: !0 },
        { title: "Custom Video Covers", isPro: !0 },
        { title: "Hashtags Metrics & Collections", isPro: !0 },
      ];
    },
    _getTagAssist: async function () {
      return {
        apiUrl: await xb.ls.get(
          "env.options.tagAssist.apiUrl",
          (this._production, "https://fc.inssist.com/api/v1/hashtag")
        ),
        collectionsTagDataTtl: 1 * xb.time.MONTH,
        userTagScanTtl: 1 * xb.time.WEEK,
        userTagScanPeriod: 3 * xb.time.DAY,
        userTagScanCount: 30,
        sendCollectedTagsTimeout: 10 * xb.time.MINUTE,
        maxTagsToQuery: 5,
        maxRelevantTagsToKeep: 100,
        accountStatsTtl: 1 * xb.time.DAY,
      };
    },
    _getTrialFeaturesLimits: function () {
      return {
        dmAdvanced: (e) => e.dmAdvanced >= 50,
        insights: (e) => e.insights >= 2,
        analytics: (e) => e.analytics >= 5,
        coverAssist: (e) => e.coverAssist >= 2,
        musicAssist: (e) => e.musicAssist >= 2,
        storyAssist: (e) => e.storyAssist >= 5,
        tagAssist: (e) => e.tagAssist >= 4,
        addLinkToStory: (e) => e.addLinkToStory >= 2,
        repost: (e) => e.repost >= 3,
        reels: (e) => e.reels >= 2,
        ghostStoryView: (e) => e.ghostStoryView >= 3,
        later: (e) => e.later >= 5,
      };
    },
  };
  const { $bus: Pb, $env: Tb, $utils: Ib } = app;
  {
    var Gb;
    const e =
      null === (Gb = app.get("$bus").controller) || void 0 === Gb
        ? void 0
        : Gb._njOnMsg;
    e && window.removeEventListener("message", e);
  }
  Pb.controller = {
    init: function () {
      (Pb.on = this.on.bind(this)),
        (Pb.off = this.off.bind(this)),
        (Pb.once = this.once.bind(this)),
        (Pb.send = this._wrapThrowIfError(this.send)),
        (Pb.call = this._wrapThrowIfError(this.call)),
        (Pb.poll = this.poll.bind(this)),
        (Pb.getTabId = this.getTabId.bind(this)),
        (Pb.getWindowId = this.getWindowId.bind(this)),
        (this._locus = Tb.getLocus()),
        (this._serialize = this._serialize.bind(this)),
        (this._handlers = {}),
        this._is("pp")
          ? this._setupPp()
          : this._is("bg")
          ? ((this._blobs = {}),
            (this._channel = new BroadcastChannel("bus.channel")),
            this._setupBg())
          : this._is("cs")
          ? this._setupCs()
          : this._is("nj")
          ? this._setupNj()
          : this._is("os")
          ? ((Pb.setIframe = (e) => (this._iframe = e)),
            (this._iframe = null),
            (this._channel = new BroadcastChannel("bus.channel")),
            this._setupOs())
          : this._is("oi") && this._setupOi();
    },
    on: function (e, t, r = null) {
      this._on(e, null, t, r);
    },
    off: function (e, t = null) {
      this._off(e, null, t);
    },
    once: function (e, t) {
      const r = async (...n) => (this.off(e, r), await t(...n));
      this.on(e, r);
    },
    send: async function (e, ...t) {
      if (!Ib.is.nan(Number(e))) {
        const r = Number(e);
        return (e = t[0]), (t = t.slice(1)), await this._sendToTab(r, e, ...t);
      }
      if (this._is("pp")) return await this._sendToExt(e, ...t);
      if (this._is("nj")) return await this._sendToPage(e, ...t);
      if (this._is("oi")) return await this._sendToParent(e, ...t);
      if (this._is("bg", "cs", "os"))
        return await this._pick([
          this._sendToExt(e, ...t),
          this._callHandlers({ name: e, args: t }, (e) => e.proxy),
        ]);
      if (this._is("fg")) {
        if ("store.actions" === e) return;
        if ("idb.change" === e) return;
        Pb.log(e, ...t);
      }
    },
    call: async function (e, ...t) {
      return this._callHandlers({ name: e, args: t }, (e) => !e.proxy);
    },
    poll: async function (e, ...t) {
      return await Ib.waitFor(() => this.send(e, ...t));
    },
    getTabId: async function () {
      if (this._is("bg")) return null;
      const { tabId: e } = await this.send("bus.getTabData");
      return e;
    },
    getWindowId: async function () {
      if (this._is("bg")) return null;
      const { windowId: e } = await this.send("bus.getTabData");
      return e;
    },
    _on: function (e, t, r, n = null) {
      this._handlers[e] || (this._handlers[e] = []),
        this._is("cs", "nj", "oi") &&
          0 === this._handlers[e].length &&
          this._sendToProxier("bus.proxy", e, !0);
      const o = { fn: r, name: e };
      t && (o.proxy = t), n && (o.this = n), this._handlers[e].push(o);
    },
    _off: function (e, t = null, r = null) {
      this._handlers[e] &&
        ((this._handlers[e] = this._handlers[e].filter((e) => {
          const n = !r || r === e.fn,
            o = t === (e.proxy || null);
          return !n || !o;
        })),
        this._is("cs", "nj", "oi") &&
          0 === this._handlers[e].length &&
          this._sendToProxier("bus.proxy", e, !1));
    },
    _setupPp: function () {
      chrome.runtime.onMessage.addListener((e, t, r) => {
        if (!(null == e ? void 0 : e.$bus)) return;
        const n = this._callHandlers(e);
        return n ? (n.then(this._serialize).then(r), !0) : void 0;
      });
    },
    _setupBg: function () {
      chrome.runtime.onMessage.addListener((e, t, r) => {
        var n;
        if (!(null == e ? void 0 : e.$bus)) return;
        const o =
          (null === (n = t.tab) || void 0 === n ? void 0 : n.id) || null;
        if ("bus.proxy" === e.name)
          return void (async () => {
            const [t, r] = await this._deserialize(e.argsStr);
            o &&
              (r
                ? this._on(t, o, (...e) => this._sendToTab(o, t, ...e))
                : this._off(t, o));
          })();
        if ("bus.getTabData" === e.name) {
          var a;
          const e =
            (null === (a = t.tab) || void 0 === a ? void 0 : a.windowId) ||
            null;
          return r(this._serialize({ tabId: o, windowId: e })), !0;
        }
        if ("bus.sendToTab" === e.name)
          return (
            (async () => {
              const t = await this._deserialize(e.argsStr),
                n = await this._sendToTab(...t);
              r(this._serialize(n));
            })(),
            !0
          );
        if ("bus.blobIdToObjectUrl" === e.name)
          return (
            (async () => {
              const [t] = await this._deserialize(e.argsStr),
                n = await this._blobIdToObjectUrl(t);
              r(this._serialize(n));
            })(),
            !0
          );
        const i = this._callHandlers(e, (e) => e.proxy !== o);
        return i ? (i.then(this._serialize).then(r), !0) : void 0;
      }),
        chrome.tabs.onRemoved.addListener((e) => {
          for (const t in this._handlers)
            this._handlers[t] = this._handlers[t].filter((t) => t.proxy !== e);
        });
    },
    _setupCs: function () {
      chrome.runtime.onMessage.addListener((e, t, r) => {
        if (!e.$bus) return;
        const n = this._callHandlers(e);
        return n ? (n.then(this._serialize).then(r), !0) : void 0;
      }),
        window.addEventListener("message", async ({ data: e }) => {
          if (!(null == e ? void 0 : e.$bus)) return;
          if ("nj" !== e.locus) return;
          if ("bus.proxy" === e.name) {
            const [t, r] = e.args;
            return void (r
              ? this._on(t, "nj", (...e) => this._sendToPage(t, ...e))
              : this._off(t, "nj"));
          }
          const t = await this._pick([
            this._sendToExt(e.name, ...e.args),
            this._callHandlers(e, (e) => !e.proxy),
          ]);
          window.postMessage({ resId: e.reqId, result: t }, "*");
        });
    },
    _setupNj: function () {
      (this._njOnMsg = async ({ data: e }) => {
        if (!(null == e ? void 0 : e.$bus)) return;
        if ("cs" !== e.locus) return;
        const t = await this._callHandlers(e);
        window.postMessage({ resId: e.reqId, result: t }, "*");
      }),
        window.addEventListener("message", this._njOnMsg);
    },
    _setupOs: function () {
      chrome.runtime.onMessage.addListener((e, t, r) => {
        if (!(null == e ? void 0 : e.$bus)) return;
        const n = this._callHandlers(e);
        return n ? (n.then(this._serialize).then(r), !0) : void 0;
      }),
        window.addEventListener("message", async ({ data: e }) => {
          if (!(null == e ? void 0 : e.$bus)) return;
          if ("bus.proxy" === e.name) {
            const [t, r] = e.args;
            return void (r
              ? this._on(t, "oi", (...e) => this._sendToIframe(t, ...e))
              : this._off(t, "oi"));
          }
          const t = await this._pick([
            this._sendToExt(e.name, ...e.args),
            this._callHandlers(e, (e) => !e.proxy),
          ]);
          this._iframe.contentWindow.postMessage(
            { resId: e.reqId, result: t },
            "*"
          );
        }),
        this._channel.addEventListener("message", ({ data: e }) => {
          const { blob: t, reqId: r } = e,
            n = Ib.objectUrl.create(t, !0);
          this._channel.postMessage({ resId: r, objectUrl: n });
        });
    },
    _setupOi: function () {
      window.addEventListener("message", async ({ data: e }) => {
        if (!(null == e ? void 0 : e.$bus)) return;
        const t = await this._callHandlers(e);
        window.parent.postMessage({ resId: e.reqId, result: t }, "*");
      });
    },
    _sendToExt: async function (e, ...t) {
      const r = { $bus: !0, name: e, argsStr: this._serialize(t) },
        n = await new Promise((e) => {
          try {
            chrome.runtime.sendMessage(r, (t) => {
              chrome.runtime.lastError ? e(null) : e(t);
            });
          } catch (t) {
            if ("Extension context invalidated." === t.message) return;
            Pb.error(t), e(null);
          }
        });
      return await this._deserialize(n);
    },
    _sendToTab: async function (e, t, ...r) {
      var n;
      if (
        !(null === (n = chrome.tabs) || void 0 === n ? void 0 : n.sendMessage)
      )
        return await this.send("bus.sendToTab", e, t, ...r);
      const o = { $bus: !0, name: t, argsStr: this._serialize(r) },
        a = await new Promise((t) => {
          chrome.tabs.sendMessage(e, o, (e) => {
            chrome.runtime.lastError ? t(null) : t(e);
          });
        });
      return await this._deserialize(a);
    },
    _sendToPage: async function (e, ...t) {
      const r = this._generateId(),
        n = { $bus: !0, name: e, args: t, reqId: r, locus: this._locus };
      return window.postMessage(n, "*"), await this._waitForResponseMessage(r);
    },
    _sendToIframe: async function (e, ...t) {
      if (!this._iframe) return null;
      const r = this._generateId(),
        n = { $bus: !0, name: e, args: t, reqId: r };
      return (
        this._iframe.contentWindow.postMessage(n, "*"),
        await this._waitForResponseMessage(r)
      );
    },
    _sendToParent: async function (e, ...t) {
      const r = this._generateId(),
        n = { $bus: !0, name: e, args: t, reqId: r };
      return parent.postMessage(n, "*"), await this._waitForResponseMessage(r);
    },
    _sendToProxier: async function (e, ...t) {
      return this._is("cs")
        ? await this._sendToExt(e, ...t)
        : this._is("nj")
        ? await this._sendToPage(e, ...t)
        : this._is("oi")
        ? await this._sendToParent(e, ...t)
        : void 0;
    },
    _waitForResponseMessage: async function (e) {
      return await new Promise((t) => {
        const r = ({ data: n }) => {
          !(!n || n.resId !== e) &&
            (window.removeEventListener("message", r), t(n.result));
        };
        window.addEventListener("message", r);
      });
    },
    _callHandlers: function ({ name: e, args: t, argsStr: r }, n = null) {
      let o = this._handlers[e];
      return o
        ? (n && (o = o.filter(n)),
          0 === o.length
            ? null
            : new Promise(async (e) => {
                r && (t = await this._deserialize(r));
                e(
                  await this._pick(
                    o.map(async (e) => {
                      try {
                        return await e.fn.call(e.this, ...t);
                      } catch (t) {
                        return Pb.error(`failed to handle "${e.name}".`, t), t;
                      }
                    })
                  )
                );
              }))
        : null;
    },
    _serialize: function (e) {
      return Ib.is.nil(e)
        ? null
        : JSON.stringify(e, (e, t) => {
            if (Ib.is.blob(t)) {
              if (this._is("bg")) {
                const e = this._generateId();
                return (this._blobs[e] = t), `bus.blob.${e}`;
              }
              return `bus.blob.${Ib.objectUrl.create(t, !0)}`;
            }
            return Ib.is.error(t) ? `bus.error.${t.message}` : t;
          });
    },
    _deserialize: async function (e) {
      if (!Ib.is.string(e)) return null;
      const t = new Map(),
        r = JSON.parse(e, (e, r) => {
          const n = Ib.is.string(r);
          return n && r.startsWith("bus.blob.")
            ? (t.set(r, r.slice("bus.blob.".length)), r)
            : n && r.startsWith("bus.error.")
            ? new Error(r.slice("bus.error.".length))
            : r;
        });
      return (
        await Promise.all(
          [...t.keys()].map(async (e) => {
            let r;
            const n = t.get(e);
            r = n.startsWith("blob:")
              ? n
              : await this._sendToExt("bus.blobIdToObjectUrl", n);
            const o = await fetch(r).then((e) => e.blob());
            t.set(e, o);
          })
        ),
        this._applyBlobs(r, t)
      );
    },
    _applyBlobs: function (e, t) {
      if (t.has(e)) return t.get(e);
      if (Ib.is.array(e) || Ib.is.object(e))
        for (const r in e) e[r] = this._applyBlobs(e[r], t);
      return e;
    },
    _blobIdToObjectUrl: async function (e) {
      const t = this._blobs[e];
      let r;
      return (
        Ib.is.string(t)
          ? (r = t)
          : ((r = await this._blobToObjectUrl(t)), (this._blobs[e] = r)),
        setTimeout(() => delete this._blobs[e], 6e4),
        r
      );
    },
    _blobToObjectUrl: async function (e) {
      const t = this._generateId();
      return (
        this._channel.postMessage({ reqId: t, blob: e }),
        await new Promise((e) => {
          const r = ({ data: n }) => {
            !(!n || n.resId !== t) &&
              (this._channel.removeEventListener("message", r), e(n.objectUrl));
          };
          this._channel.addEventListener("message", r);
        })
      );
    },
    _is: function (...e) {
      return e.includes(this._locus);
    },
    _generateId: function () {
      return `bus-${Date.now()}-${Math.random().toString(36).slice(2)}`;
    },
    _wrapThrowIfError: function (e) {
      return async (...t) => {
        const r = await e.call(this, ...t);
        if (Ib.is.error(r)) throw r;
        return r;
      };
    },
    _pick: async function (e = []) {
      return 0 === e.length
        ? null
        : await new Promise((t) => {
            let r = 0;
            e.forEach(async (n) => {
              const o = await n;
              return Ib.is.nil(o)
                ? r === e.length - 1
                  ? t(null)
                  : void r++
                : t(o);
            });
          });
    },
  };
  const { $ui: Db } = app;
  (Db.dnd = {
    init: function () {
      "undefined" != typeof window && this._manageDraggingClass();
    },
    setDragImage: function (e, t = 50) {
      e.dataTransfer.effectAllowed = "move";
      const r = (e) => e.preventDefault();
      document.addEventListener("dragover", r),
        this.onDrop(() => document.removeEventListener("dragover", r));
      const n =
        e.currentTarget.querySelector("img") ||
        e.currentTarget.querySelector('[style*="background-image"]');
      if (!n) return;
      let o;
      if ("IMG" === n.tagName) o = n.src;
      else {
        o = n.style.backgroundImage.split('url("')[1].split('")')[0];
      }
      const a = document.createElement("img");
      (a.src = o),
        (a.width = t),
        (a.height = t),
        (a.style.position = "fixed"),
        (a.style.left = "-10000px"),
        (a.style.objectFit = "cover"),
        document.body.appendChild(a),
        (a.onload = () => {
          setTimeout(() => {
            document.body.removeChild(a);
          }, 1e3);
        }),
        e.dataTransfer.setDragImage(a, t / 2, t / 2);
    },
    onDrop: function (e = () => {}) {
      document.addEventListener("drop", e, { once: !0 });
    },
    shouldIgnoreDragLeave: function (e) {
      return e.currentTarget.contains(e.relatedTarget);
    },
    _manageDraggingClass: function () {
      document.addEventListener("dragstart", () => {
        document.documentElement.classList.add("dragging");
      }),
        document.addEventListener("drop", () => {
          document.documentElement.classList.remove("dragging");
        });
    },
  }),
    Db.dnd.init();
  const { $ui: Ab } = app;
  Ab.flip = {
    add: function (e, { flipHeight: t = !1, flipWidth: r = !1 } = {}) {
      if (!e) return;
      const n = e[Fb] || (e[Fb] = {});
      (n.mods = {}),
        n.hideTimer && (clearTimeout(n.hideTimer), (e.hideTimer = null));
      Lb(e, () => {
        const o = getComputedStyle(e);
        (n.rect1 = e.getBoundingClientRect()),
          (n.matrix1 = Ob(o.transform)),
          (n.opacity1 = o.opacity),
          (n.flipWidth = r),
          (n.flipHeight = t);
      }),
        Mb.push(e);
    },
    run: function () {
      Mb.forEach(Rb), (Mb.length = 0);
    },
  };
  const Mb = [],
    Fb = Symbol("ctx");
  function Rb(e) {
    const t = e[Fb];
    if (!t) return;
    (t.mods.transition = "none"),
      $b(e),
      Lb(e, () => {
        const r = getComputedStyle(e);
        (t.rect2 = e.getBoundingClientRect()), (t.matrix2 = Ob(r.transform));
      }),
      (t.mods.opacity = t.opacity1),
      t.flipWidth && (t.mods.width = `${t.rect1.width}px`),
      t.flipHeight && (t.mods.height = `${t.rect1.height}px`),
      (t.mods.transform = `matrix(${[
        t.matrix1[0],
        t.matrix1[1],
        t.matrix1[2],
        t.matrix1[3],
        t.matrix2[4] - (t.rect2.left - t.rect1.left),
        t.matrix2[5] - (t.rect2.top - t.rect1.top),
      ].join(", ")})`),
      $b(e);
    if (
      ("none" === getComputedStyle(e).display &&
        ((t.isHidden = !0),
        (t.mods.display = Bb(e)),
        (t.mods.position = "fixed"),
        (t.mods.top = t.rect2.top - t.matrix2[5] + "px"),
        (t.mods.left = t.rect2.left - t.matrix2[4] + "px"),
        (t.mods.right = "auto"),
        (t.mods.bottom = "auto"),
        (t.mods.width = `${t.rect2.width}px`),
        (t.mods.height = `${t.rect2.height}px`),
        $b(e)),
      document.body.getBoundingClientRect(),
      (t.mods.transform = null),
      (t.mods.opacity = null),
      (t.mods.transition = null),
      t.flipWidth && (t.mods.width = `${t.rect2.width}px`),
      t.flipHeight && (t.mods.height = `${t.rect2.height}px`),
      $b(e),
      t.isHidden ||
        t.rect1.width !== t.rect2.width ||
        t.rect1.height !== t.rect2.height)
    ) {
      const r = getComputedStyle(e)
          .transitionDuration.split(", ")
          .map((e) => Number(e.replace("s", ""))),
        n = Math.max(...r);
      t.hideTimer = setTimeout(() => {
        (t.mods = { transition: "none" }),
          $b(e),
          document.body.getBoundingClientRect(),
          Nb(e);
      }, 1e3 * n);
    } else Nb(e);
  }
  function Lb(e, t) {
    const r = "none" === getComputedStyle(e).display;
    r && (e.style.display = Bb(e)), t(r), r && (e.style.display = "none");
  }
  function Bb(e) {
    const t = getComputedStyle(e);
    return "normal" === t.alignItems && "normal" === t.justifyContent
      ? "block"
      : "flex";
  }
  function Ob(e) {
    if (!e || "none" === e) return [1, 0, 0, 1, 0, 0];
    return e.split("(")[1].split(")")[0].split(", ").map(Number);
  }
  function $b(e) {
    const t = e[Fb];
    if (!t) return;
    const r = t.mods,
      n = Object.keys(r)
        .filter((e) => !!r[e])
        .map((e) => `${e}: ${r[e]}`);
    0 === n.length
      ? e.removeAttribute("style")
      : e.setAttribute("style", `${n.join("; ")};`);
  }
  function Nb(e) {
    const t = e[Fb];
    t && ((t.mods = {}), $b(e), delete e[Fb]);
  }
  const { $ui: Ub } = app;
  function Hb() {
    if ("undefined" == typeof window) return "day";
    const e = Array.from(document.documentElement.classList).find((e) =>
      e.startsWith("theme-")
    );
    return e ? e.replace("theme-", "") : "day";
  }
  function zb(e = "day") {
    "undefined" != typeof window &&
      (document.documentElement.classList.remove("theme-day"),
      document.documentElement.classList.remove("theme-night"),
      document.documentElement.classList.add(`theme-${e}`));
  }
  let jb = [],
    Wb = null,
    Vb = Hb();
  function qb(e, t = !1) {
    e &&
      (jb.includes(e) ||
        (jb.push(e),
        t && Vb && e(Vb),
        "undefined" != typeof window &&
          (Wb ||
            ((Wb = new MutationObserver((e) => {
              if (!e.some((e) => "class" === e.attributeName)) return;
              const t = Hb();
              Vb !== t && ((Vb = t), jb.forEach((e) => e(Vb)));
            })),
            Wb.observe(document.documentElement, { attributes: !0 })))));
  }
  function Zb(e) {
    jb = jb.filter((t) => t !== e);
  }
  Ub.theme = {
    valueOf: function (e, t) {
      return t
        ? 0 !== t.indexOf("var(--")
          ? t
          : "var(--" + e + "-" + t.substr(6)
        : t;
    },
    getTheme: Hb,
    setTheme: zb,
    toggleTheme: function () {
      if ("undefined" == typeof window) return;
      zb("day" === Hb() ? "night" : "day");
    },
    onThemeChange: qb,
    offThemeChange: Zb,
    getSystemPreferredTheme: function () {
      return "undefined" == typeof window
        ? "day"
        : window.matchMedia("(prefers-color-scheme: dark)").matches
        ? "night"
        : "day";
    },
    ThemeAware: (e) =>
      class extends e {
        constructor(e) {
          super(e),
            (this._onThemeChange = (e) => {
              this.setState({ theme: e });
            }),
            (this.state = { ...this.state, theme: Hb() }),
            qb(this._onThemeChange, !1);
        }
        componentWillUnmount() {
          Zb(this._onThemeChange),
            super.componentWillUnmount && super.componentWillUnmount();
        }
      },
  };
  const { $ui: Yb } = app,
    Qb = Symbol("smartScroll");
  Yb.smartScroll = {
    register: function (e) {
      if (e[Qb]) return;
      const t = new Kb(e);
      t.register(), (e[Qb] = t);
    },
    unregister: function (e) {
      e[Qb] && (e[Qb].unregister(), delete e[Qb]);
    },
  };
  class Kb {
    constructor(e) {
      e && ((this._element = e), (this._onUnregisterFns = []));
    }
    register() {
      this._registerXScroll(), this._registerDragScroll();
    }
    unregister() {
      this._onUnregisterFns.forEach((e) => e());
    }
    _registerXScroll() {
      if (!(this._element.scrollWidth !== this._element.offsetWidth)) return;
      let e = !1;
      this._addListener(this._element, "mousewheel", (t) => {
        t.deltaX && (e = !0),
          e || (t.preventDefault(), (this._element.scrollLeft += t.deltaY));
      }),
        this._addListener(this._element, "mouseleave", () => {
          e = !1;
        });
    }
    _registerDragScroll() {
      let e = -1,
        t = -1,
        r = 0,
        n = 0,
        o = 0,
        a = 0,
        i = !1;
      const s = () => Math.abs(r) > 1 || Math.abs(n) > 1,
        l = () => {
          i &&
            !s() &&
            ((i = !1), this._removeListener(this._element, "click", d, !0)),
            (r = 0),
            (n = 0);
        },
        c = (r) => {
          r.preventDefault(),
            r.stopPropagation(),
            (o = e - r.clientX),
            (a = t - r.clientY),
            (e = r.clientX),
            (t = r.clientY),
            !i &&
              (Math.abs(o) > 2 || Math.abs(a) > 2) &&
              ((i = !0), this._addListener(this._element, "click", d, !0)),
            (this._element.scrollTop += a),
            (this._element.scrollLeft += o);
        },
        u = (e) => {
          e.preventDefault(), e.stopPropagation(), (r = o), (n = a);
          const t = () => {
            s() &&
              ((this._element.scrollTop += n),
              (this._element.scrollLeft += r),
              (r *= 0.95),
              (n *= 0.95),
              requestAnimationFrame(t));
          };
          t(),
            this._removeListener(document, "mouseup", u, !0),
            this._removeListener(document, "mousemove", c, !0);
        },
        d = (e) => {
          e.preventDefault(), e.stopPropagation();
        };
      this._addListener(this._element, "mousewheel", () => {
        l();
      }),
        this._addListener(this._element, "mousedown", (r) => {
          l(),
            (e = r.clientX),
            (t = r.clientY),
            this._addListener(document, "mouseup", u, !0),
            this._addListener(document, "mousemove", c, !0);
        });
    }
    _addListener(e, t, r, n = !1) {
      e.addEventListener(t, r, n),
        this._onUnregisterFns.push(() => {
          this._removeListener(e, t, r, n);
        });
    }
    _removeListener(e, t, r, n = !1) {
      e.removeEventListener(t, r, n);
    }
  }
  const { $ui: Xb } = app;
  Xb.toShortNumber = (e) => {
    let t = "";
    if ((e < 0 && ((t = "-"), (e = -e)), e < 1))
      return t + String(Number.isInteger(e) ? e : e.toFixed(3));
    if (e < 10) return t + String(Number.isInteger(e) ? e : e.toFixed(2));
    if (e < 100) return t + String(Number.isInteger(e) ? e : e.toFixed(1));
    if (e < 1e3) return t + String(Number.isInteger(e) ? e : e.toFixed(1));
    const r = ["k", "m", "b", "t"];
    let n = null,
      o = null;
    for (let t = 0; t < r.length; t++)
      if (e < Math.pow(1e3, t + 2)) {
        if (
          ((o = r[t]),
          (n = e / Math.pow(1e3, t + 1)),
          (n =
            n < 10
              ? Math.round(100 * n) / 100
              : n < 100
              ? Math.round(10 * n) / 10
              : Math.round(n)),
          n >= 1e3)
        )
          continue;
        break;
      }
    return n ? t + String(n) + o : t + "999t+";
  };
  const { $ui: Jb } = app;
  function ey(e, t, r) {
    if (((r = { minLength: 2, ...r }), t.length <= r.minLength)) return "";
    if (e.includes(t)) return "";
    for (let r = 1; r < t.length; r++) {
      const n = t.substring(0, r),
        o = t.substring(r),
        a = new RegExp(`${n}.${o.substring(1)}`);
      if (a.test(e)) return e.replace(a, t);
      const i = new RegExp(`${n}.${o}`);
      if (i.test(e)) return e.replace(i, t);
      if ("mail" !== o) {
        const r = new RegExp(`${n}{0}${o}`);
        if (r.test(e)) return e.replace(r, t);
      }
      const s = [
        t.substring(0, r - 1),
        t.charAt(r),
        t.charAt(r - 1),
        t.substring(r + 1),
      ].join("");
      if (e.includes(s)) return e.replace(s, t);
    }
    return "";
  }
  function ty(e, t) {
    const [r, n] = e.split("@"),
      o = ey(r, t, { minLength: 3 });
    return o ? `${o}@${n}` : "";
  }
  (Jb.emailTypoChecker = (e) => {
    const t = e.email.trim().toLowerCase();
    return (
      (function (e) {
        const t = [
          { pattern: /,com$/, fix: (e) => e.replace(/,com$/, ".com") },
          {
            pattern: /,co\.\w{2}$/,
            fix: (e) => e.replace(/,(co\.\w{2}$)/, ".$1"),
          },
          { pattern: /@\w*$/, fix: (e) => e + ".com" },
        ].find((t) => t.pattern.test(e));
        if (t) return t.fix(e);
        return "";
      })(t) ||
      (function (e) {
        const t = [
            "gmail",
            "hotmail",
            "outlook",
            "yahoo",
            "icloud",
            "zoho",
            "yandex",
            "mail",
            "msn",
          ],
          [r, n] = e.split("@");
        for (let e = 0; e < t.length; e++) {
          const o = ey(n, t[e], { minLength: 0 });
          if (o) return `${r}@${o}`;
        }
        return "";
      })(t) ||
      ty(t, e.firstName.trim().toLowerCase()) ||
      ty(t, e.lastName.trim().toLowerCase())
    );
  }),
    it();
  var ry = {},
    ny = {};
  Object.defineProperty(ny, "__esModule", { value: !0 });
  var oy = void 0;
  ny.dom = oy;
  var ay,
    iy,
    sy,
    ly,
    cy,
    uy,
    dy,
    hy,
    py,
    my,
    gy =
      Object.assign ||
      function (e) {
        for (var t = 1; t < arguments.length; t++) {
          var r = arguments[t];
          for (var n in r)
            Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
        }
        return e;
      },
    fy = (function () {
      function e(e, t) {
        for (var r = 0; r < t.length; r++) {
          var n = t[r];
          (n.enumerable = n.enumerable || !1),
            (n.configurable = !0),
            "value" in n && (n.writable = !0),
            Object.defineProperty(e, n.key, n);
        }
      }
      return function (t, r, n) {
        return r && e(t.prototype, r), n && e(t, n), t;
      };
    })(),
    vy = {};
  Object.defineProperty(vy, "__esModule", { value: !0 });
  var by =
    ((ay = void 0),
    (iy = vy.styleSheet = ay),
    (sy = vy.plugins = iy),
    (ly = vy.insertRule = sy),
    (cy = vy.insertGlobal = ly),
    (uy = vy.fontFace = cy),
    (dy = vy.keyframes = uy),
    (hy = vy.presets = dy),
    (py = vy.style = hy),
    (my = vy.$ = py),
    (vy.merge = my));
  vy.compose = by;
  var yy = function (e) {
    return SS.speedy(e);
  };
  vy.speedy = yy;
  var wy = function () {
    var e = !(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0];
    PS = !!e;
  };
  vy.simulations = wy;
  var Cy = function () {
    for (var e = arguments.length, t = Array(e), r = 0; r < e; r++)
      t[r] = arguments[r];
    if (!(t = (0, kC.default)(t))) return {};
    if (!PS)
      return (
        TS ||
          (console.warn(
            "can't simulate without once calling simulations(true)"
          ),
          (TS = !0)),
        IS || (console.warn("don't use simulation outside dev"), (IS = !0)),
        {}
      );
    return t.reduce(function (e, t) {
      return (e["data-simulate-" + DS(t)] = ""), e;
    }, {});
  };
  vy.simulate = Cy;
  var ky = function (e) {
    GS = !!e;
  };
  vy.cssLabels = ky;
  var Sy = MS;
  vy.isLikeRule = Sy;
  var Ey = FS;
  vy.idFor = Ey;
  var _y = rE;
  vy.css = _y;
  var xy = function (e) {
    (0, Aw.default)(
      US,
      e.reduce(function (e, t) {
        return (e[t] = !0), e;
      }, {})
    );
  };
  vy.rehydrate = xy;
  var Py = function () {
    (US = SS.inserted = {}),
      (HS = SS.registered = {}),
      (jS = {}),
      SS.flush(),
      SS.inject();
  };
  vy.flush = Py;
  var Ty = oE;
  vy.select = Ty;
  var Iy = function (e) {
    for (
      var t = arguments.length, r = Array(t > 1 ? t - 1 : 0), n = 1;
      n < t;
      n++
    )
      r[n - 1] = arguments[n];
    return rE(kS({}, e + " &", r));
  };
  vy.parent = Iy;
  var Gy = function (e) {
    for (
      var t = arguments.length, r = Array(t > 1 ? t - 1 : 0), n = 1;
      n < t;
      n++
    )
      r[n - 1] = arguments[n];
    return rE(kS({}, "@media " + e, r));
  };
  vy.media = Gy;
  var Dy = aE;
  vy.pseudo = Dy;
  var Ay = function (e) {
    return aE(":active", e);
  };
  vy.active = Ay;
  var My = function (e) {
    return aE(":any", e);
  };
  vy.any = My;
  var Fy = function (e) {
    return aE(":checked", e);
  };
  vy.checked = Fy;
  var Ry = function (e) {
    return aE(":disabled", e);
  };
  vy.disabled = Ry;
  var Ly = function (e) {
    return aE(":empty", e);
  };
  vy.empty = Ly;
  var By = function (e) {
    return aE(":enabled", e);
  };
  vy.enabled = By;
  var Oy = function (e) {
    return aE(":default", e);
  };
  vy._default = Oy;
  var $y = function (e) {
    return aE(":first", e);
  };
  vy.first = $y;
  var Ny = function (e) {
    return aE(":first-child", e);
  };
  vy.firstChild = Ny;
  var Uy = function (e) {
    return aE(":first-of-type", e);
  };
  vy.firstOfType = Uy;
  var Hy = function (e) {
    return aE(":fullscreen", e);
  };
  vy.fullscreen = Hy;
  var zy = function (e) {
    return aE(":focus", e);
  };
  vy.focus = zy;
  var jy = function (e) {
    return aE(":hover", e);
  };
  vy.hover = jy;
  var Wy = function (e) {
    return aE(":indeterminate", e);
  };
  vy.indeterminate = Wy;
  var Vy = function (e) {
    return aE(":in-range", e);
  };
  vy.inRange = Vy;
  var qy = function (e) {
    return aE(":invalid", e);
  };
  vy.invalid = qy;
  var Zy = function (e) {
    return aE(":last-child", e);
  };
  vy.lastChild = Zy;
  var Yy = function (e) {
    return aE(":last-of-type", e);
  };
  vy.lastOfType = Yy;
  var Qy = function (e) {
    return aE(":left", e);
  };
  vy.left = Qy;
  var Ky = function (e) {
    return aE(":link", e);
  };
  vy.link = Ky;
  var Xy = function (e) {
    return aE(":only-child", e);
  };
  vy.onlyChild = Xy;
  var Jy = function (e) {
    return aE(":only-of-type", e);
  };
  vy.onlyOfType = Jy;
  var ew = function (e) {
    return aE(":optional", e);
  };
  vy.optional = ew;
  var tw = function (e) {
    return aE(":out-of-range", e);
  };
  vy.outOfRange = tw;
  var rw = function (e) {
    return aE(":read-only", e);
  };
  vy.readOnly = rw;
  var nw = function (e) {
    return aE(":read-write", e);
  };
  vy.readWrite = nw;
  var ow = function (e) {
    return aE(":required", e);
  };
  vy.required = ow;
  var aw = function (e) {
    return aE(":right", e);
  };
  vy.right = aw;
  var iw = function (e) {
    return aE(":root", e);
  };
  vy.root = iw;
  var sw = function (e) {
    return aE(":scope", e);
  };
  vy.scope = sw;
  var lw = function (e) {
    return aE(":target", e);
  };
  vy.target = lw;
  var cw = function (e) {
    return aE(":valid", e);
  };
  vy.valid = cw;
  var uw = function (e) {
    return aE(":visited", e);
  };
  vy.visited = uw;
  var dw = function (e, t) {
    return aE(":dir(" + e + ")", t);
  };
  vy.dir = dw;
  var hw = function (e, t) {
    return aE(":lang(" + e + ")", t);
  };
  vy.lang = hw;
  var pw = function (e, t) {
    var r = e
      .split(",")
      .map(function (e) {
        return e.trim();
      })
      .map(function (e) {
        return ":not(" + e + ")";
      });
    if (1 === r.length) return aE(":not(" + e + ")", t);
    return oE(r.join(""), t);
  };
  vy.not = pw;
  var mw = function (e, t) {
    return aE(":nth-child(" + e + ")", t);
  };
  vy.nthChild = mw;
  var gw = function (e, t) {
    return aE(":nth-last-child(" + e + ")", t);
  };
  vy.nthLastChild = gw;
  var fw = function (e, t) {
    return aE(":nth-last-of-type(" + e + ")", t);
  };
  vy.nthLastOfType = fw;
  var vw = function (e, t) {
    return aE(":nth-of-type(" + e + ")", t);
  };
  vy.nthOfType = vw;
  var bw = function (e) {
    return aE("::after", e);
  };
  vy.after = bw;
  var yw = function (e) {
    return aE("::before", e);
  };
  vy.before = yw;
  var ww = function (e) {
    return aE("::first-letter", e);
  };
  vy.firstLetter = ww;
  var Cw = function (e) {
    return aE("::first-line", e);
  };
  vy.firstLine = Cw;
  var kw = function (e) {
    return aE("::selection", e);
  };
  vy.selection = kw;
  var Sw = function (e) {
    return aE("::backdrop", e);
  };
  vy.backdrop = Sw;
  var Ew = function (e) {
    return rE({ "::placeholder": e });
  };
  vy.placeholder = Ew;
  var _w = function () {
    for (var e = arguments.length, t = Array(e), r = 0; r < e; r++)
      t[r] = arguments[r];
    return (t = (0, kC.default)(t))
      ? t
          .map(function (e) {
            var t = { label: [] };
            return KS(t, { src: e }), NS(AS(t), $S(t)).join("");
          })
          .join("")
      : "";
  };
  vy.cssFor = _w;
  var xw = function () {
    for (var e = arguments.length, t = Array(e), r = 0; r < e; r++)
      t[r] = arguments[r];
    var n = (t = (0, kC.default)(t))
      ? t
          .map(function (e) {
            FS(e);
            var t = Object.keys(e)[0];
            return t + '="' + (e[t] || "") + '"';
          })
          .join(" ")
      : "";
    return n;
  };
  vy.attribsFor = xw;
  var Pw,
    Tw = Object.getOwnPropertySymbols,
    Iw = Object.prototype.hasOwnProperty,
    Gw = Object.prototype.propertyIsEnumerable;
  function Dw(e) {
    if (null == e)
      throw new TypeError(
        "Object.assign cannot be called with null or undefined"
      );
    return Object(e);
  }
  var Aw = CS(
      (Pw = (function () {
        try {
          if (!Object.assign) return !1;
          var e = new String("abc");
          if (((e[5] = "de"), "5" === Object.getOwnPropertyNames(e)[0]))
            return !1;
          for (var t = {}, r = 0; r < 10; r++)
            t["_" + String.fromCharCode(r)] = r;
          if (
            "0123456789" !==
            Object.getOwnPropertyNames(t)
              .map(function (e) {
                return t[e];
              })
              .join("")
          )
            return !1;
          var n = {};
          return (
            "abcdefghijklmnopqrst".split("").forEach(function (e) {
              n[e] = e;
            }),
            "abcdefghijklmnopqrst" ===
              Object.keys(Object.assign({}, n)).join("")
          );
        } catch (e) {
          return !1;
        }
      })()
        ? Object.assign
        : function (e, t) {
            for (var r, n, o = Dw(e), a = 1; a < arguments.length; a++) {
              for (var i in (r = Object(arguments[a])))
                Iw.call(r, i) && (o[i] = r[i]);
              if (Tw) {
                n = Tw(r);
                for (var s = 0; s < n.length; s++)
                  Gw.call(r, n[s]) && (o[n[s]] = r[n[s]]);
              }
            }
            return o;
          })
    ),
    Mw = {};
  Object.defineProperty(Mw, "__esModule", { value: !0 });
  var Fw = zw;
  Mw.StyleSheet = Fw;
  var Rw,
    Lw = (Rw = Pw) && Rw.__esModule ? Rw : { default: Rw };
  function Bw(e) {
    return e[e.length - 1];
  }
  function Ow(e) {
    if (e.sheet) return e.sheet;
    for (var t = 0; t < document.styleSheets.length; t++)
      if (document.styleSheets[t].ownerNode === e)
        return document.styleSheets[t];
  }
  var $w = "undefined" != typeof window,
    Nw = !1,
    Uw = (function () {
      if ($w) {
        var e = document.createElement("div");
        return (
          (e.innerHTML = "\x3c!--[if lt IE 10]><i></i><![endif]--\x3e"),
          1 === e.getElementsByTagName("i").length
        );
      }
    })();
  function Hw() {
    var e = document.createElement("style");
    return (
      (e.type = "text/css"),
      e.setAttribute("data-glamor", ""),
      e.appendChild(document.createTextNode("")),
      (document.head || document.getElementsByTagName("head")[0]).appendChild(
        e
      ),
      e
    );
  }
  function zw() {
    var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
      t = e.speedy,
      r = void 0 === t || t,
      n = e.maxLength,
      o = void 0 === n ? ($w && Uw ? 4e3 : 65e3) : n;
    (this.isSpeedy = r),
      (this.sheet = void 0),
      (this.tags = []),
      (this.maxLength = o),
      (this.ctr = 0);
  }
  (0, Lw.default)(zw.prototype, {
    getSheet: function () {
      return Ow(Bw(this.tags));
    },
    inject: function () {
      var e = this;
      if (this.injected) throw new Error("already injected stylesheet!");
      $w
        ? (this.tags[0] = Hw())
        : (this.sheet = {
            cssRules: [],
            insertRule: function (t) {
              e.sheet.cssRules.push({ cssText: t });
            },
          }),
        (this.injected = !0);
    },
    speedy: function (e) {
      if (0 !== this.ctr)
        throw new Error(
          "cannot change speedy mode after inserting any rule to sheet. Either call speedy(" +
            e +
            ") earlier in your app, or call flush() before speedy(" +
            e +
            ")"
        );
      this.isSpeedy = !!e;
    },
    _insert: function (e) {
      try {
        var t = this.getSheet();
        t.insertRule(e, -1 !== e.indexOf("@import") ? 0 : t.cssRules.length);
      } catch (e) {
        Nw;
      }
    },
    insert: function (e) {
      if ($w)
        if (this.isSpeedy && this.getSheet().insertRule) this._insert(e);
        else if (-1 !== e.indexOf("@import")) {
          var t = Bw(this.tags);
          t.insertBefore(document.createTextNode(e), t.firstChild);
        } else Bw(this.tags).appendChild(document.createTextNode(e));
      else
        this.sheet.insertRule(
          e,
          -1 !== e.indexOf("@import") ? 0 : this.sheet.cssRules.length
        );
      return (
        this.ctr++,
        $w && this.ctr % this.maxLength == 0 && this.tags.push(Hw()),
        this.ctr - 1
      );
    },
    delete: function (e) {
      return this.replace(e, "");
    },
    flush: function () {
      $w
        ? (this.tags.forEach(function (e) {
            return e.parentNode.removeChild(e);
          }),
          (this.tags = []),
          (this.sheet = null),
          (this.ctr = 0))
        : (this.sheet.cssRules = []),
        (this.injected = !1);
    },
    rules: function () {
      if (!$w) return this.sheet.cssRules;
      var e = [];
      return (
        this.tags.forEach(function (t) {
          return e.splice.apply(
            e,
            [e.length, 0].concat(
              (function (e) {
                if (Array.isArray(e)) {
                  for (var t = 0, r = Array(e.length); t < e.length; t++)
                    r[t] = e[t];
                  return r;
                }
                return Array.from(e);
              })(Array.from(Ow(t).cssRules))
            )
          );
        }),
        e
      );
    },
  });
  var jw = {};
  Object.defineProperty(jw, "__esModule", { value: !0 });
  var Ww = void 0;
  jw.processStyleName = Ww;
  var Vw = function (e, t) {
    var r = "";
    for (var n in e) {
      var o = 0 === n.indexOf("--");
      if (e.hasOwnProperty(n) && "label" !== n) {
        var a = e[n];
        0,
          null != a &&
            (o
              ? (r += n + ":" + a + ";")
              : ((r += fC(n) + ":"), (r += (0, cC.default)(n, a, t) + ";")));
      }
    }
    return r || null;
  };
  jw.createMarkupForStyles = Vw;
  var qw = /-(.)/g;
  var Zw = function (e) {
      return e.replace(qw, function (e, t) {
        return t.toUpperCase();
      });
    },
    Yw = /^-ms-/;
  gC(function (e) {
    return Zw(e.replace(Yw, "ms-"));
  });
  var Qw = {};
  Object.defineProperty(Qw, "__esModule", { value: !0 });
  var Kw = {};
  Object.defineProperty(Kw, "__esModule", { value: !0 });
  var Xw = {
    animationIterationCount: !0,
    borderImageOutset: !0,
    borderImageSlice: !0,
    borderImageWidth: !0,
    boxFlex: !0,
    boxFlexGroup: !0,
    boxOrdinalGroup: !0,
    columnCount: !0,
    flex: !0,
    flexGrow: !0,
    flexPositive: !0,
    flexShrink: !0,
    flexNegative: !0,
    flexOrder: !0,
    gridRow: !0,
    gridRowStart: !0,
    gridRowEnd: !0,
    gridColumn: !0,
    gridColumnStart: !0,
    gridColumnEnd: !0,
    fontWeight: !0,
    lineClamp: !0,
    lineHeight: !0,
    opacity: !0,
    order: !0,
    orphans: !0,
    tabSize: !0,
    widows: !0,
    zIndex: !0,
    zoom: !0,
    fillOpacity: !0,
    floodOpacity: !0,
    stopOpacity: !0,
    strokeDasharray: !0,
    strokeDashoffset: !0,
    strokeMiterlimit: !0,
    strokeOpacity: !0,
    strokeWidth: !0,
  };
  var Jw = ["Webkit", "ms", "Moz", "O"];
  Object.keys(Xw).forEach(function (e) {
    Jw.forEach(function (t) {
      Xw[
        (function (e, t) {
          return e + t.charAt(0).toUpperCase() + t.substring(1);
        })(t, e)
      ] = Xw[e];
    });
  });
  var eC = {
    isUnitlessNumber: Xw,
    shorthandPropertyExpansions: {
      background: {
        backgroundAttachment: !0,
        backgroundColor: !0,
        backgroundImage: !0,
        backgroundPositionX: !0,
        backgroundPositionY: !0,
        backgroundRepeat: !0,
      },
      backgroundPosition: { backgroundPositionX: !0, backgroundPositionY: !0 },
      border: { borderWidth: !0, borderStyle: !0, borderColor: !0 },
      borderBottom: {
        borderBottomWidth: !0,
        borderBottomStyle: !0,
        borderBottomColor: !0,
      },
      borderLeft: {
        borderLeftWidth: !0,
        borderLeftStyle: !0,
        borderLeftColor: !0,
      },
      borderRight: {
        borderRightWidth: !0,
        borderRightStyle: !0,
        borderRightColor: !0,
      },
      borderTop: { borderTopWidth: !0, borderTopStyle: !0, borderTopColor: !0 },
      font: {
        fontStyle: !0,
        fontVariant: !0,
        fontWeight: !0,
        fontSize: !0,
        lineHeight: !0,
        fontFamily: !0,
      },
      outline: { outlineWidth: !0, outlineStyle: !0, outlineColor: !0 },
    },
  };
  Kw.default = eC;
  var tC,
    rC = iC(Kw);
  function nC(e) {
    return function () {
      return e;
    };
  }
  var oC = function () {};
  (oC.thatReturns = nC),
    (oC.thatReturnsFalse = nC(!1)),
    (oC.thatReturnsTrue = nC(!0)),
    (oC.thatReturnsNull = nC(null)),
    (oC.thatReturnsThis = function () {
      return this;
    }),
    (oC.thatReturnsArgument = function (e) {
      return e;
    });
  var aC = oC;
  iC((tC = aC));
  function iC(e) {
    return e && e.__esModule ? e : { default: e };
  }
  var sC = rC.default.isUnitlessNumber;
  var lC = function (e, t, r) {
    return null == t || "boolean" == typeof t || "" === t
      ? ""
      : isNaN(t) || 0 === t || (sC.hasOwnProperty(e) && sC[e])
      ? "" + t
      : ("string" == typeof t && (t = t.trim()), t + "px");
  };
  Qw.default = lC;
  var cC = gC(Qw),
    uC = /([A-Z])/g;
  var dC = function (e) {
      return e.replace(uC, "-$1").toLowerCase();
    },
    hC = /^ms-/;
  var pC = gC(function (e) {
    return dC(e).replace(hC, "-ms-");
  });
  var mC = gC(function (e) {
    var t = {};
    return function (r) {
      return t.hasOwnProperty(r) || (t[r] = e.call(this, r)), t[r];
    };
  });
  gC(tC);
  function gC(e) {
    return e && e.__esModule ? e : { default: e };
  }
  var fC = ((Ww = (0, mC.default)(pC.default)), (jw.processStyleName = Ww));
  var vC = {};
  Object.defineProperty(vC, "__esModule", { value: !0 });
  var bC =
      "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
        ? function (e) {
            return typeof e;
          }
        : function (e) {
            return e &&
              "function" == typeof Symbol &&
              e.constructor === Symbol &&
              e !== Symbol.prototype
              ? "symbol"
              : typeof e;
          },
    yC = CC;
  function wC(e) {
    if (
      (function (e) {
        return (
          null == e ||
          !1 === e ||
          ("object" === (void 0 === e ? "undefined" : bC(e)) &&
            0 === Object.keys(e).length)
        );
      })(e)
    )
      return null;
    if ("object" !== (void 0 === e ? "undefined" : bC(e))) return e;
    for (var t = {}, r = Object.keys(e), n = !1, o = 0; o < r.length; o++) {
      var a = e[r[o]],
        i = CC(a);
      (null !== i && i === a) || (n = !0), null !== i && (t[r[o]] = i);
    }
    return 0 === Object.keys(t).length ? null : n ? t : e;
  }
  function CC(e) {
    return Array.isArray(e)
      ? ((r = !1),
        (n = []),
        (t = e).forEach(function (e) {
          var t = CC(e);
          (null !== t && t === e) || (r = !0), null !== t && n.push(t);
        }),
        0 == n.length ? null : r ? n : t)
      : wC(e);
    var t, r, n;
  }
  vC.default = yC;
  var kC = CS(vC),
    SC = {};
  Object.defineProperty(SC, "__esModule", { value: !0 });
  var EC =
      Object.assign ||
      function (e) {
        for (var t = 1; t < arguments.length; t++) {
          var r = arguments[t];
          for (var n in r)
            Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
        }
        return e;
      },
    _C = pS;
  SC.PluginSet = _C;
  var xC = function (e) {
    if (
      Object.keys(e.style)
        .map(function (t) {
          return Array.isArray(e.style[t]);
        })
        .indexOf(!0) >= 0
    ) {
      var t = e.style,
        r = Object.keys(t).reduce(function (e, r) {
          return (
            (e[r] = Array.isArray(t[r])
              ? t[r].join("; " + (0, jw.processStyleName)(r) + ": ")
              : t[r]),
            e
          );
        }, {});
      return (0, IC.default)({}, e, { style: r });
    }
    return e;
  };
  SC.fallbacks = xC;
  var PC = function (e) {
    if (e.style.content) {
      var t = e.style.content;
      return mS.indexOf(t) >= 0 || /^(attr|calc|counters?|url)\(/.test(t)
        ? e
        : t.charAt(0) !== t.charAt(t.length - 1) ||
          ('"' !== t.charAt(0) && "'" !== t.charAt(0))
        ? EC({}, e, { style: EC({}, e.style, { content: '"' + t + '"' }) })
        : e;
    }
    return e;
  };
  SC.contentWrap = PC;
  var TC = function (e) {
    return (0, IC.default)({}, e, { style: (0, dS.default)(EC({}, e.style)) });
  };
  SC.prefixes = TC;
  var IC = hS(Pw),
    GC = {};
  Object.defineProperty(GC, "__esModule", { value: !0 });
  var DC = function (e) {
    for (var t in e) {
      var r = e[t],
        n = (0, YC.default)(cS, t, r, e, uS);
      n && (e[t] = n), (0, VC.default)(uS, t, e);
    }
    return e;
  };
  GC.default = DC;
  var AC = {};
  Object.defineProperty(AC, "__esModule", { value: !0 });
  var MC = ["Webkit"],
    FC = ["Moz"],
    RC = ["ms"],
    LC = ["Webkit", "Moz"],
    BC = ["Webkit", "ms"],
    OC = ["Webkit", "Moz", "ms"],
    $C = {
      plugins: [],
      prefixMap: {
        appearance: LC,
        userSelect: OC,
        textEmphasisPosition: MC,
        textEmphasis: MC,
        textEmphasisStyle: MC,
        textEmphasisColor: MC,
        boxDecorationBreak: MC,
        clipPath: MC,
        maskImage: MC,
        maskMode: MC,
        maskRepeat: MC,
        maskPosition: MC,
        maskClip: MC,
        maskOrigin: MC,
        maskSize: MC,
        maskComposite: MC,
        mask: MC,
        maskBorderSource: MC,
        maskBorderMode: MC,
        maskBorderSlice: MC,
        maskBorderWidth: MC,
        maskBorderOutset: MC,
        maskBorderRepeat: MC,
        maskBorder: MC,
        maskType: MC,
        textDecorationStyle: MC,
        textDecorationSkip: MC,
        textDecorationLine: MC,
        textDecorationColor: MC,
        filter: MC,
        fontFeatureSettings: MC,
        breakAfter: OC,
        breakBefore: OC,
        breakInside: OC,
        columnCount: LC,
        columnFill: LC,
        columnGap: LC,
        columnRule: LC,
        columnRuleColor: LC,
        columnRuleStyle: LC,
        columnRuleWidth: LC,
        columns: LC,
        columnSpan: LC,
        columnWidth: LC,
        writingMode: BC,
        flex: MC,
        flexBasis: MC,
        flexDirection: MC,
        flexGrow: MC,
        flexFlow: MC,
        flexShrink: MC,
        flexWrap: MC,
        alignContent: MC,
        alignItems: MC,
        alignSelf: MC,
        justifyContent: MC,
        order: MC,
        transform: MC,
        transformOrigin: MC,
        transformOriginX: MC,
        transformOriginY: MC,
        backfaceVisibility: MC,
        perspective: MC,
        perspectiveOrigin: MC,
        transformStyle: MC,
        transformOriginZ: MC,
        animation: MC,
        animationDelay: MC,
        animationDirection: MC,
        animationFillMode: MC,
        animationDuration: MC,
        animationIterationCount: MC,
        animationName: MC,
        animationPlayState: MC,
        animationTimingFunction: MC,
        backdropFilter: MC,
        fontKerning: MC,
        scrollSnapType: BC,
        scrollSnapPointsX: BC,
        scrollSnapPointsY: BC,
        scrollSnapDestination: BC,
        scrollSnapCoordinate: BC,
        shapeImageThreshold: MC,
        shapeImageMargin: MC,
        shapeImageOutside: MC,
        hyphens: OC,
        flowInto: BC,
        flowFrom: BC,
        regionFragment: BC,
        textAlignLast: FC,
        tabSize: FC,
        wrapFlow: RC,
        wrapThrough: RC,
        wrapMargin: RC,
        gridTemplateColumns: RC,
        gridTemplateRows: RC,
        gridTemplateAreas: RC,
        gridTemplate: RC,
        gridAutoColumns: RC,
        gridAutoRows: RC,
        gridAutoFlow: RC,
        grid: RC,
        gridRowStart: RC,
        gridColumnStart: RC,
        gridRowEnd: RC,
        gridRow: RC,
        gridColumn: RC,
        gridColumnEnd: RC,
        gridColumnGap: RC,
        gridRowGap: RC,
        gridArea: RC,
        gridGap: RC,
        textSizeAdjust: BC,
        borderImage: MC,
        borderImageOutset: MC,
        borderImageRepeat: MC,
        borderImageSlice: MC,
        borderImageSource: MC,
        borderImageWidth: MC,
        transitionDelay: MC,
        transitionDuration: MC,
        transitionProperty: MC,
        transitionTimingFunction: MC,
      },
    };
  AC.default = $C;
  var NC = lS((AC = AC.default)),
    UC = {};
  Object.defineProperty(UC, "__esModule", { value: !0 });
  var HC = function (e, t, r) {
    if (e.hasOwnProperty(t))
      for (var n = e[t], o = 0, a = n.length; o < a; ++o)
        r[n[o] + (0, WC.default)(t)] = r[t];
  };
  UC.default = HC;
  var zC = {};
  Object.defineProperty(zC, "__esModule", { value: !0 });
  var jC = function (e) {
    return e.charAt(0).toUpperCase() + e.slice(1);
  };
  zC.default = jC;
  var WC = (function (e) {
    return e && e.__esModule ? e : { default: e };
  })((zC = zC.default));
  var VC = lS((UC = UC.default)),
    qC = {};
  Object.defineProperty(qC, "__esModule", { value: !0 });
  var ZC = function (e, t, r, n, o) {
    for (var a = 0, i = e.length; a < i; ++a) {
      var s = e[a](t, r, n, o);
      if (s) return s;
    }
  };
  qC.default = ZC;
  var YC = lS((qC = qC.default)),
    QC = {};
  Object.defineProperty(QC, "__esModule", { value: !0 });
  var KC = function (e, t) {
    if ("cursor" === e && JC.hasOwnProperty(t))
      return XC.map(function (e) {
        return e + t;
      });
  };
  QC.default = KC;
  var XC = ["-webkit-", "-moz-", ""],
    JC = { "zoom-in": !0, "zoom-out": !0, grab: !0, grabbing: !0 };
  var ek = lS((QC = QC.default)),
    tk = {};
  Object.defineProperty(tk, "__esModule", { value: !0 });
  var rk = function (e, t) {
    if (
      "string" == typeof t &&
      !(0, ik.default)(t) &&
      t.indexOf("cross-fade(") > -1
    )
      return sk.map(function (e) {
        return t.replace(/cross-fade\(/g, e + "cross-fade(");
      });
  };
  tk.default = rk;
  var nk = {};
  Object.defineProperty(nk, "__esModule", { value: !0 });
  var ok = function (e) {
    return "string" == typeof e && ak.test(e);
  };
  nk.default = ok;
  var ak = /-webkit-|-moz-|-ms-/;
  var ik = (function (e) {
    return e && e.__esModule ? e : { default: e };
  })((nk = nk.default));
  var sk = ["-webkit-", ""];
  var lk = lS((tk = tk.default)),
    ck = {};
  Object.defineProperty(ck, "__esModule", { value: !0 });
  var uk = function (e, t) {
    if (
      "string" == typeof t &&
      !(0, dk.default)(t) &&
      t.indexOf("filter(") > -1
    )
      return hk.map(function (e) {
        return t.replace(/filter\(/g, e + "filter(");
      });
  };
  ck.default = uk;
  var dk = (function (e) {
    return e && e.__esModule ? e : { default: e };
  })(nk);
  var hk = ["-webkit-", ""];
  var pk = lS((ck = ck.default)),
    mk = {};
  Object.defineProperty(mk, "__esModule", { value: !0 });
  var gk = function (e, t) {
    if ("display" === e && fk.hasOwnProperty(t)) return fk[t];
  };
  mk.default = gk;
  var fk = {
    flex: ["-webkit-box", "-moz-box", "-ms-flexbox", "-webkit-flex", "flex"],
    "inline-flex": [
      "-webkit-inline-box",
      "-moz-inline-box",
      "-ms-inline-flexbox",
      "-webkit-inline-flex",
      "inline-flex",
    ],
  };
  var vk = lS((mk = mk.default)),
    bk = {};
  Object.defineProperty(bk, "__esModule", { value: !0 });
  var yk = function (e, t, r) {
    "flexDirection" === e &&
      "string" == typeof t &&
      (t.indexOf("column") > -1
        ? (r.WebkitBoxOrient = "vertical")
        : (r.WebkitBoxOrient = "horizontal"),
      t.indexOf("reverse") > -1
        ? (r.WebkitBoxDirection = "reverse")
        : (r.WebkitBoxDirection = "normal"));
    Ck.hasOwnProperty(e) && (r[Ck[e]] = wk[t] || t);
  };
  bk.default = yk;
  var wk = {
      "space-around": "justify",
      "space-between": "justify",
      "flex-start": "start",
      "flex-end": "end",
      "wrap-reverse": "multiple",
      wrap: "multiple",
    },
    Ck = {
      alignItems: "WebkitBoxAlign",
      justifyContent: "WebkitBoxPack",
      flexWrap: "WebkitBoxLines",
    };
  var kk = lS((bk = bk.default)),
    Sk = {};
  Object.defineProperty(Sk, "__esModule", { value: !0 });
  var Ek = function (e, t) {
    if ("string" == typeof t && !(0, _k.default)(t) && Pk.test(t))
      return xk.map(function (e) {
        return e + t;
      });
  };
  Sk.default = Ek;
  var _k = (function (e) {
    return e && e.__esModule ? e : { default: e };
  })(nk);
  var xk = ["-webkit-", "-moz-", ""],
    Pk =
      /linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/;
  var Tk = lS((Sk = Sk.default)),
    Ik = {};
  Object.defineProperty(Ik, "__esModule", { value: !0 });
  var Gk = function (e, t) {
    if (
      "string" == typeof t &&
      !(0, Dk.default)(t) &&
      t.indexOf("image-set(") > -1
    )
      return Ak.map(function (e) {
        return t.replace(/image-set\(/g, e + "image-set(");
      });
  };
  Ik.default = Gk;
  var Dk = (function (e) {
    return e && e.__esModule ? e : { default: e };
  })(nk);
  var Ak = ["-webkit-", ""];
  var Mk = lS((Ik = Ik.default)),
    Fk = {};
  Object.defineProperty(Fk, "__esModule", { value: !0 });
  var Rk = function (e, t) {
    if ("position" === e && "sticky" === t) return ["-webkit-sticky", "sticky"];
  };
  Fk.default = Rk;
  var Lk = lS((Fk = Fk.default)),
    Bk = {};
  Object.defineProperty(Bk, "__esModule", { value: !0 });
  var Ok = function (e, t) {
    if (Nk.hasOwnProperty(e) && Uk.hasOwnProperty(t))
      return $k.map(function (e) {
        return e + t;
      });
  };
  Bk.default = Ok;
  var $k = ["-webkit-", "-moz-", ""],
    Nk = {
      maxHeight: !0,
      maxWidth: !0,
      width: !0,
      height: !0,
      columnWidth: !0,
      minWidth: !0,
      minHeight: !0,
    },
    Uk = {
      "min-content": !0,
      "max-content": !0,
      "fill-available": !0,
      "fit-content": !0,
      "contain-floats": !0,
    };
  var Hk = lS((Bk = Bk.default)),
    zk = {};
  Object.defineProperty(zk, "__esModule", { value: !0 });
  var jk = function (e, t, r, n) {
    if ("string" == typeof t && aS.hasOwnProperty(e)) {
      var o = (function (e, t) {
          if ((0, rS.default)(e)) return e;
          for (
            var r = e.split(/,(?![^()]*(?:\([^()]*\))?\))/g),
              n = 0,
              o = r.length;
            n < o;
            ++n
          ) {
            var a = r[n],
              i = [a];
            for (var s in t) {
              var l = (0, tS.default)(s);
              if (a.indexOf(l) > -1 && "order" !== l)
                for (var c = t[s], u = 0, d = c.length; u < d; ++u)
                  i.unshift(a.replace(l, iS[c[u]] + l));
            }
            r[n] = i.join(",");
          }
          return r.join(",");
        })(t, n),
        a = o
          .split(/,(?![^()]*(?:\([^()]*\))?\))/g)
          .filter(function (e) {
            return !/-moz-|-ms-/.test(e);
          })
          .join(",");
      if (e.indexOf("Webkit") > -1) return a;
      var i = o
        .split(/,(?![^()]*(?:\([^()]*\))?\))/g)
        .filter(function (e) {
          return !/-webkit-|-ms-/.test(e);
        })
        .join(",");
      return e.indexOf("Moz") > -1
        ? i
        : ((r["Webkit" + (0, nS.default)(e)] = a),
          (r["Moz" + (0, nS.default)(e)] = i),
          o);
    }
  };
  zk.default = jk;
  var Wk = {};
  Object.defineProperty(Wk, "__esModule", { value: !0 });
  var Vk = function (e) {
    return (0, eS.default)(e);
  };
  Wk.default = Vk;
  var qk,
    Zk = {},
    Yk = /[A-Z]/g,
    Qk = /^ms-/,
    Kk = {};
  function Xk(e) {
    return "-" + e.toLowerCase();
  }
  function Jk(e) {
    if (Kk.hasOwnProperty(e)) return Kk[e];
    var t = e.replace(Yk, Xk);
    return (Kk[e] = Qk.test(t) ? "-" + t : t);
  }
  r(Zk, "default", function () {
    return Jk;
  }),
    (qk = Zk),
    Object.defineProperty(qk, "__esModule", { value: !0 });
  var eS = (function (e) {
    return e && e.__esModule ? e : { default: e };
  })(Zk);
  var tS = oS((Wk = Wk.default)),
    rS = oS(nk),
    nS = oS(zC);
  function oS(e) {
    return e && e.__esModule ? e : { default: e };
  }
  var aS = {
      transition: !0,
      transitionProperty: !0,
      WebkitTransition: !0,
      WebkitTransitionProperty: !0,
      MozTransition: !0,
      MozTransitionProperty: !0,
    },
    iS = { Webkit: "-webkit-", Moz: "-moz-", ms: "-ms-" };
  var sS = lS((zk = zk.default));
  function lS(e) {
    return e && e.__esModule ? e : { default: e };
  }
  var cS = [
      lk.default,
      ek.default,
      pk.default,
      kk.default,
      Tk.default,
      Mk.default,
      Lk.default,
      Hk.default,
      sS.default,
      vk.default,
    ],
    uS = NC.default.prefixMap;
  var dS = hS(GC);
  function hS(e) {
    return e && e.__esModule ? e : { default: e };
  }
  function pS(e) {
    this.fns = e || [];
  }
  (0, IC.default)(pS.prototype, {
    add: function () {
      for (var e = this, t = arguments.length, r = Array(t), n = 0; n < t; n++)
        r[n] = arguments[n];
      r.forEach(function (t) {
        e.fns.indexOf(t) >= 0 || (e.fns = [t].concat(e.fns));
      });
    },
    remove: function (e) {
      this.fns = this.fns.filter(function (t) {
        return t !== e;
      });
    },
    clear: function () {
      this.fns = [];
    },
    transform: function (e) {
      return this.fns.reduce(function (e, t) {
        return t(e);
      }, e);
    },
  });
  var mS = [
    "normal",
    "none",
    "counter",
    "open-quote",
    "close-quote",
    "no-open-quote",
    "no-close-quote",
    "initial",
    "inherit",
  ];
  var gS = {};
  Object.defineProperty(gS, "__esModule", { value: !0 });
  var fS = function (e, t) {
    var r = 1540483477,
      n = t ^ e.length,
      o = e.length,
      a = 0;
    for (; o >= 4; ) {
      var i = vS(e, a);
      (i = yS(i, r)),
        (i = yS((i ^= i >>> 24), r)),
        (n = yS(n, r)),
        (n ^= i),
        (a += 4),
        (o -= 4);
    }
    switch (o) {
      case 3:
        (n ^= bS(e, a)), (n = yS((n ^= e.charCodeAt(a + 2) << 16), r));
        break;
      case 2:
        n = yS((n ^= bS(e, a)), r);
        break;
      case 1:
        n = yS((n ^= e.charCodeAt(a)), r);
    }
    return (n = yS((n ^= n >>> 13), r)), (n ^= n >>> 15) >>> 0;
  };
  function vS(e, t) {
    return (
      e.charCodeAt(t++) +
      (e.charCodeAt(t++) << 8) +
      (e.charCodeAt(t++) << 16) +
      (e.charCodeAt(t) << 24)
    );
  }
  function bS(e, t) {
    return e.charCodeAt(t++) + (e.charCodeAt(t++) << 8);
  }
  function yS(e, t) {
    return (
      ((65535 & (e |= 0)) * (t |= 0) + ((((e >>> 16) * t) & 65535) << 16)) | 0
    );
  }
  gS.default = fS;
  var wS = CS(gS);
  function CS(e) {
    return e && e.__esModule ? e : { default: e };
  }
  function kS(e, t, r) {
    return (
      t in e
        ? Object.defineProperty(e, t, {
            value: r,
            enumerable: !0,
            configurable: !0,
            writable: !0,
          })
        : (e[t] = r),
      e
    );
  }
  var SS = ((ay = new Mw.StyleSheet()), (vy.styleSheet = ay));
  SS.inject();
  var ES =
    ((iy = SS.plugins =
      new SC.PluginSet([SC.prefixes, SC.contentWrap, SC.fallbacks])),
    (vy.plugins = iy));
  (ES.media = new SC.PluginSet()),
    (ES.fontFace = new SC.PluginSet()),
    (ES.keyframes = new SC.PluginSet([SC.prefixes, SC.fallbacks]));
  var _S = !1,
    xS = "undefined" != typeof window,
    PS = _S,
    TS = !1,
    IS = !1;
  var GS = _S;
  function DS(e) {
    var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "";
    return e.toLowerCase().replace(/[^a-z0-9]/g, t);
  }
  function AS(e) {
    var t = JSON.stringify(e),
      r = (0, wS.default)(t).toString(36);
    return e.label && e.label.length, r;
  }
  function MS(e) {
    var t = Object.keys(e).filter(function (e) {
      return "toString" !== e;
    });
    return 1 === t.length && !!/data\-css\-([a-zA-Z0-9\-_]+)/.exec(t[0]);
  }
  function FS(e) {
    var t = Object.keys(e).filter(function (e) {
      return "toString" !== e;
    });
    if (1 !== t.length) throw new Error("not a rule");
    var r = /data\-css\-([a-zA-Z0-9\-_]+)/.exec(t[0]);
    if (!r) throw new Error("not a rule");
    return r[1];
  }
  var RS = /[(),]|"(?:\\.|[^"\n])*"|'(?:\\.|[^'\n])*'|\/\*[\s\S]*?\*\//g;
  function LS(e) {
    if (-1 === e.indexOf(",")) return [e];
    for (var t, r = [], n = [], o = 0; (t = RS.exec(e)); )
      switch (t[0]) {
        case "(":
          o++;
          break;
        case ")":
          o--;
          break;
        case ",":
          if (o) break;
          r.push(t.index);
      }
    for (t = r.length; t--; )
      n.unshift(e.slice(r[t] + 1)), (e = e.slice(0, r[t]));
    return n.unshift(e), n;
  }
  function BS(e, t) {
    if (!e) return t.replace(/\&/g, "");
    if (!t) return ".css-" + e + ",[data-css-" + e + "]";
    var r = LS(t)
      .map(function (t) {
        return t.indexOf("&") >= 0
          ? [
              t.replace(/\&/gm, ".css-" + e),
              t.replace(/\&/gm, "[data-css-" + e + "]"),
            ].join(",")
          : ".css-" + e + t + ",[data-css-" + e + "]" + t;
      })
      .join(",");
    return (
      PS &&
        /^\&\:/.exec(t) &&
        !/\s/.exec(t) &&
        (r +=
          ",.css-" +
          e +
          "[data-simulate-" +
          DS(t) +
          "],[data-css-" +
          e +
          "][data-simulate-" +
          DS(t) +
          "]"),
      r
    );
  }
  function OS(e) {
    var t = e.selector,
      r = e.style,
      n = ES.transform({ selector: t, style: r });
    return n.selector + "{" + (0, jw.createMarkupForStyles)(n.style) + "}";
  }
  function $S(e) {
    var t = void 0,
      r = void 0,
      n = void 0,
      o = void 0;
    return (
      Object.keys(e).forEach(function (a) {
        a.indexOf("&") >= 0
          ? ((r = r || {})[a] = e[a])
          : 0 === a.indexOf("@media")
          ? ((n = n || {})[a] = $S(e[a]))
          : 0 === a.indexOf("@supports")
          ? ((o = o || {})[a] = $S(e[a]))
          : "label" === a
          ? e.label.length > 0 &&
            ((t = t || {}).label = GS ? e.label.join(".") : "")
          : ((t = t || {})[a] = e[a]);
      }),
      { plain: t, selects: r, medias: n, supports: o }
    );
  }
  function NS(e, t) {
    var r = [],
      n = t.plain,
      o = t.selects,
      a = t.medias,
      i = t.supports;
    return (
      n && r.push(OS({ style: n, selector: BS(e) })),
      o &&
        Object.keys(o).forEach(function (t) {
          return r.push(OS({ style: o[t], selector: BS(e, t) }));
        }),
      a &&
        Object.keys(a).forEach(function (t) {
          return r.push(t + "{" + NS(e, a[t]).join("") + "}");
        }),
      i &&
        Object.keys(i).forEach(function (t) {
          return r.push(t + "{" + NS(e, i[t]).join("") + "}");
        }),
      r
    );
  }
  var US = (SS.inserted = {});
  var HS = (SS.registered = {});
  function zS(e) {
    HS[e.id] || (HS[e.id] = e);
  }
  var jS = {};
  function WS(e) {
    if (
      (zS(e),
      (function (e) {
        if (!US[e.id]) {
          US[e.id] = !0;
          var t = $S(e.style),
            r = NS(e.id, t);
          (US[e.id] = !!xS || r),
            r.forEach(function (e) {
              return SS.insert(e);
            });
        }
      })(e),
      jS[e.id])
    )
      return jS[e.id];
    var t = kS({}, "data-css-" + e.id, (GS && e.label) || "");
    return (
      Object.defineProperty(t, "toString", {
        enumerable: !1,
        value: function () {
          return "css-" + e.id;
        },
      }),
      (jS[e.id] = t),
      t
    );
  }
  function VS(e, t) {
    var r = LS(e).map(function (e) {
      return e.indexOf("&") >= 0 ? e : "&" + e;
    });
    return LS(t)
      .map(function (e) {
        return e.indexOf("&") >= 0 ? e : "&" + e;
      })
      .reduce(function (e, t) {
        return e.concat(
          r.map(function (e) {
            return t.replace(/\&/g, e);
          })
        );
      }, [])
      .join(",");
  }
  function qS(e, t) {
    return e ? "@media " + e.substring(6) + " and " + t.substring(6) : t;
  }
  function ZS(e, t) {
    return e ? "@supports " + e.substring(9) + " and " + t.substring(9) : t;
  }
  function YS(e) {
    for (var t = [], r = 0; r < e.length; r++)
      t = Array.isArray(e[r]) ? t.concat(YS(e[r])) : t.concat(e[r]);
    return t;
  }
  var QS = {
    "::placeholder": [
      "::-webkit-input-placeholder",
      "::-moz-placeholder",
      "::-ms-input-placeholder",
    ],
    ":fullscreen": [
      ":-webkit-full-screen",
      ":-moz-full-screen",
      ":-ms-fullscreen",
    ],
  };
  function KS(e, t) {
    var r = t.selector,
      n = void 0 === r ? "" : r,
      o = t.mq,
      a = void 0 === o ? "" : o,
      i = t.supp,
      s = void 0 === i ? "" : i,
      l = t.src,
      c = void 0 === l ? {} : l;
    Array.isArray(c) || (c = [c]),
      (c = YS(c)).forEach(function (t) {
        if (MS(t)) {
          var r = (function (e) {
            if (MS(e)) {
              var t = HS[FS(e)];
              if (null == t)
                throw new Error(
                  "[glamor] an unexpected rule cache miss occurred. This is probably a sign of multiple glamor instances in your app. See https://github.com/threepointone/glamor/issues/79"
                );
              return t;
            }
            return e;
          })(t);
          if ("css" !== r.type) throw new Error("cannot merge this rule");
          t = r.style;
        }
        (t = (0, kC.default)(t)) &&
          t.composes &&
          KS(e, { selector: n, mq: a, supp: s, src: t.composes }),
          Object.keys(t || {}).forEach(function (r) {
            if (
              (function (e) {
                for (
                  var t = [":", ".", "[", ">", " "],
                    r = !1,
                    n = e.charAt(0),
                    o = 0;
                  o < t.length;
                  o++
                )
                  if (n === t[o]) {
                    r = !0;
                    break;
                  }
                return r || e.indexOf("&") >= 0;
              })(r)
            )
              QS[r] &&
                QS[r].forEach(function (o) {
                  return KS(e, {
                    selector: VS(n, o),
                    mq: a,
                    supp: s,
                    src: t[r],
                  });
                }),
                KS(e, { selector: VS(n, r), mq: a, supp: s, src: t[r] });
            else if (
              (function (e) {
                return 0 === e.indexOf("@media");
              })(r)
            )
              KS(e, { selector: n, mq: qS(a, r), supp: s, src: t[r] });
            else if (
              (function (e) {
                return 0 === e.indexOf("@supports");
              })(r)
            )
              KS(e, { selector: n, mq: a, supp: ZS(s, r), src: t[r] });
            else if ("composes" === r);
            else {
              var o = e;
              s && ((o[s] = o[s] || {}), (o = o[s])),
                a && ((o[a] = o[a] || {}), (o = o[a])),
                n && ((o[n] = o[n] || {}), (o = o[n])),
                "label" === r
                  ? GS && (e.label = e.label.concat(t.label))
                  : (o[r] = t[r]);
            }
          });
      });
  }
  function XS(e) {
    var t = { label: [] };
    return (
      KS(t, { src: e }),
      WS({
        id: AS(t),
        style: t,
        label: GS ? t.label.join(".") : "",
        type: "css",
      })
    );
  }
  var JS = {};
  Object.defineProperty(JS, "toString", {
    enumerable: !1,
    value: function () {
      return "css-nil";
    },
  });
  var eE =
    "undefined" != typeof WeakMap
      ? [JS, new WeakMap(), new WeakMap(), new WeakMap()]
      : [JS];
  var tE =
    "undefined" != typeof WeakMap
      ? (function (e) {
          return function (t) {
            if (eE[t.length]) {
              for (var r = eE[t.length], n = 0; n < t.length - 1; )
                r.has(t[n]) || r.set(t[n], new WeakMap()),
                  (r = r.get(t[n])),
                  n++;
              if (r.has(t[t.length - 1])) {
                var o = r.get(t[n]);
                if (HS[o.toString().substring(4)]) return o;
              }
            }
            var a = e(t);
            if (eE[t.length]) {
              for (var i = 0, s = eE[t.length]; i < t.length - 1; )
                (s = s.get(t[i])), i++;
              try {
                s.set(t[i], a);
              } catch (e) {}
            }
            return a;
          };
        })(XS)
      : XS;
  function rE() {
    for (var e = arguments.length, t = Array(e), r = 0; r < e; r++)
      t[r] = arguments[r];
    if (t[0] && t[0].length && t[0].raw)
      throw new Error(
        "you forgot to include glamor/babel in your babel plugins."
      );
    return (t = (0, kC.default)(t)) ? tE(t) : JS;
  }
  rE.insert = function (e) {
    var t = { id: AS(e), css: e, type: "raw" };
    zS(t), US[t.id] || (SS.insert(t.css), (US[t.id] = !!xS || [t.css]));
  };
  (sy = rE.insert), (vy.insertRule = sy);
  rE.global = function (e, t) {
    if ((t = (0, kC.default)(t)))
      return rE.insert(OS({ selector: e, style: t }));
  };
  (ly = rE.global), (vy.insertGlobal = ly);
  (rE.keyframes = function (e, t) {
    t || ((t = e), (e = "animation"));
    var r = {
      id: AS({ name: e, kfs: (t = (0, kC.default)(t) || {}) }),
      type: "keyframes",
      name: e,
      keyframes: t,
    };
    return (
      zS(r),
      (function (e) {
        if (!US[e.id]) {
          var t = Object.keys(e.keyframes)
              .map(function (t) {
                var r = ES.keyframes.transform({
                  id: e.id,
                  name: t,
                  style: e.keyframes[t],
                });
                return (
                  r.name + "{" + (0, jw.createMarkupForStyles)(r.style) + "}"
                );
              })
              .join(""),
            r = ["-webkit-", "-moz-", "-o-", ""].map(function (r) {
              return (
                "@" + r + "keyframes " + e.name + "_" + e.id + "{" + t + "}"
              );
            });
          r.forEach(function (e) {
            return SS.insert(e);
          }),
            (US[e.id] = !!xS || r);
        }
      })(r),
      e + "_" + r.id
    );
  }),
    (rE.fontFace = function (e) {
      var t = { id: AS((e = (0, kC.default)(e))), type: "font-face", font: e };
      return (
        zS(t),
        (function (e) {
          if (!US[e.id]) {
            var t = "@font-face{" + (0, jw.createMarkupForStyles)(e.font) + "}";
            SS.insert(t), (US[e.id] = !!xS || [t]);
          }
        })(t),
        e.fontFamily
      );
    });
  (cy = rE.fontFace),
    (vy.fontFace = cy),
    (uy = rE.keyframes),
    (vy.keyframes = uy);
  (dy = {
    mobile: "(min-width: 400px)",
    Mobile: "@media (min-width: 400px)",
    phablet: "(min-width: 550px)",
    Phablet: "@media (min-width: 550px)",
    tablet: "(min-width: 750px)",
    Tablet: "@media (min-width: 750px)",
    desktop: "(min-width: 1000px)",
    Desktop: "@media (min-width: 1000px)",
    hd: "(min-width: 1200px)",
    Hd: "@media (min-width: 1200px)",
  }),
    (vy.presets = dy);
  var nE = ((hy = rE), (vy.style = hy));
  function oE(e) {
    for (
      var t = arguments.length, r = Array(t > 1 ? t - 1 : 0), n = 1;
      n < t;
      n++
    )
      r[n - 1] = arguments[n];
    return e ? rE(kS({}, e, r)) : nE(r);
  }
  (py = oE), (vy.$ = py);
  (my = rE), (vy.merge = my), (by = rE), (vy.compose = by);
  function aE(e) {
    for (
      var t = arguments.length, r = Array(t > 1 ? t - 1 : 0), n = 1;
      n < t;
      n++
    )
      r[n - 1] = arguments[n];
    return rE(kS({}, e, r));
  }
  var iE = vy;
  Object.keys(iE).forEach(function (e) {
    "default" !== e &&
      "__esModule" !== e &&
      Object.defineProperty(ny, e, {
        enumerable: !0,
        get: function () {
          return iE[e];
        },
      });
  });
  var sE = IE;
  ny.createElement = sE;
  var lE = function () {
    var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
    return function (t) {
      var r, n;
      return (
        (n = r =
          (function (r) {
            function n() {
              return (
                EE(this, n),
                _E(
                  this,
                  (n.__proto__ || Object.getPrototypeOf(n)).apply(
                    this,
                    arguments
                  )
                )
              );
            }
            return (
              xE(n, r),
              fy(n, [
                {
                  key: "getChildContext",
                  value: function () {
                    return {
                      glamorCssVars: gy(
                        {},
                        this.context.glamorCssVars,
                        "function" == typeof e ? e(this.props) : e
                      ),
                    };
                  },
                },
                {
                  key: "render",
                  value: function () {
                    return CE.default.createElement(
                      t,
                      gy({}, this.props, {
                        vars:
                          this.context.glamorCssVars ||
                          ("function" == typeof e ? e(this.props) : e),
                      }),
                      this.props.children
                    );
                  },
                },
              ]),
              n
            );
          })(CE.default.Component)),
        (r.childContextTypes = { glamorCssVars: wE.default.object }),
        (r.contextTypes = { glamorCssVars: wE.default.object }),
        n
      );
    };
  };
  ny.vars = lE;
  var cE = function () {
    var e = "data-glamor-theme-" + GE++,
      t = function (t) {
        return function (r) {
          var n, o;
          return (
            (o = n =
              (function (n) {
                function o() {
                  return (
                    EE(this, o),
                    _E(
                      this,
                      (o.__proto__ || Object.getPrototypeOf(o)).apply(
                        this,
                        arguments
                      )
                    )
                  );
                }
                return (
                  xE(o, n),
                  fy(o, [
                    {
                      key: "render",
                      value: function () {
                        return CE.default.createElement(
                          r,
                          gy(
                            {},
                            this.props,
                            SE(
                              {},
                              e,
                              iE.merge.apply(
                                void 0,
                                [
                                  "function" == typeof t ? t(this.props) : t,
                                ].concat(PE(this.context[e] || []))
                              )
                            )
                          )
                        );
                      },
                    },
                  ]),
                  o
                );
              })(CE.default.Component)),
            (n.contextTypes = SE({}, e, wE.default.arrayOf(wE.default.object))),
            o
          );
        };
      };
    return (
      (t.key = e),
      (t.add = function (t) {
        return function (r) {
          var n, o;
          return (
            (o = n =
              (function (n) {
                function o() {
                  return (
                    EE(this, o),
                    _E(
                      this,
                      (o.__proto__ || Object.getPrototypeOf(o)).apply(
                        this,
                        arguments
                      )
                    )
                  );
                }
                return (
                  xE(o, n),
                  fy(o, [
                    {
                      key: "getChildContext",
                      value: function () {
                        return SE(
                          {},
                          e,
                          ["function" == typeof t ? t(this.props) : t].concat(
                            PE(this.context[e] || [])
                          )
                        );
                      },
                    },
                    {
                      key: "render",
                      value: function () {
                        return CE.default.createElement(r, this.props);
                      },
                    },
                  ]),
                  o
                );
              })(CE.default.Component)),
            (n.contextTypes = SE({}, e, wE.default.arrayOf(wE.default.object))),
            (n.childContextTypes = SE(
              {},
              e,
              wE.default.arrayOf(wE.default.object)
            )),
            o
          );
        };
      }),
      t
    );
  };
  ny.makeTheme = cE;
  var uE = function (e, t) {
    var r = Object.keys(t).filter(function (e) {
      return !!/data\-css\-([a-zA-Z0-9\-_]+)/.exec(e);
    });
    if (0 === r.length) return gy({}, t, DE(e));
    if (r.length > 1)
      return (
        console.warn(
          "[glamor] detected multiple data attributes on an element. This may lead to unexpected style because of css insertion order."
        ),
        gy({}, t, DE(e))
      );
    var n = r[0],
      o = t[n],
      a = (0, iE.merge)(e, SE({}, n, o)),
      i = (0, hE.default)({}, t);
    return delete i[n], gy({}, i, a);
  };
  ny.propMerge = uE;
  var dE,
    hE = kE(Pw),
    pE = !1;
  function mE() {
    return (
      pE ||
        ((pE = !0),
        (dE = {}),
        "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",
        (dE = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")),
      dE
    );
  }
  var gE,
    fE,
    vE = !1;
  function bE() {}
  function yE() {}
  var wE = kE(
      (vE ||
        ((vE = !0),
        (gE = {}),
        (fE = mE()),
        (yE.resetWarningCache = bE),
        (gE = function () {
          function e(e, t, r, n, o, a) {
            if (a !== fE) {
              var i = new Error(
                "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
              );
              throw ((i.name = "Invariant Violation"), i);
            }
          }
          function t() {
            return e;
          }
          e.isRequired = e;
          var r = {
            array: e,
            bool: e,
            func: e,
            number: e,
            object: e,
            string: e,
            symbol: e,
            any: e,
            arrayOf: t,
            element: e,
            elementType: e,
            instanceOf: t,
            node: e,
            objectOf: t,
            oneOf: t,
            oneOfType: t,
            shape: t,
            exact: t,
            checkPropTypes: yE,
            resetWarningCache: bE,
          };
          return (r.PropTypes = r), r;
        })),
      gE)()
    ),
    CE = kE(it());
  function kE(e) {
    return e && e.__esModule ? e : { default: e };
  }
  function SE(e, t, r) {
    return (
      t in e
        ? Object.defineProperty(e, t, {
            value: r,
            enumerable: !0,
            configurable: !0,
            writable: !0,
          })
        : (e[t] = r),
      e
    );
  }
  function EE(e, t) {
    if (!(e instanceof t))
      throw new TypeError("Cannot call a class as a function");
  }
  function _E(e, t) {
    if (!e)
      throw new ReferenceError(
        "this hasn't been initialised - super() hasn't been called"
      );
    return !t || ("object" != typeof t && "function" != typeof t) ? e : t;
  }
  function xE(e, t) {
    if ("function" != typeof t && null !== t)
      throw new TypeError(
        "Super expression must either be null or a function, not " + typeof t
      );
    (e.prototype = Object.create(t && t.prototype, {
      constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 },
    })),
      t &&
        (Object.setPrototypeOf
          ? Object.setPrototypeOf(e, t)
          : (e.__proto__ = t));
  }
  function PE(e) {
    if (Array.isArray(e)) {
      for (var t = 0, r = Array(e.length); t < e.length; t++) r[t] = e[t];
      return r;
    }
    return Array.from(e);
  }
  function TE(e, t) {
    var r = {};
    for (var n in e)
      t.indexOf(n) >= 0 ||
        (Object.prototype.hasOwnProperty.call(e, n) && (r[n] = e[n]));
    return r;
  }
  function IE(e, t) {
    for (
      var r = arguments.length, n = Array(r > 2 ? r - 2 : 0), o = 2;
      o < r;
      o++
    )
      n[o - 2] = arguments[o];
    if (t && t.css) {
      var a = t.css,
        i = t.className,
        s = TE(t, ["css", "className"]),
        l = Array.isArray(a)
          ? iE.merge.apply(void 0, PE(a))
          : (0, iE.isLikeRule)(a)
          ? a
          : (0, iE.style)(a);
      return (
        (i = i ? i + " " + l : l),
        (s.className = i),
        CE.default.createElement.apply(CE.default, [e, s].concat(n))
      );
    }
    return CE.default.createElement.apply(CE.default, [e, t].concat(n));
  }
  (oy = IE), (ny.dom = oy);
  var GE = 0;
  function DE(e) {
    return null != e && (0, iE.isLikeRule)(e) ? e : (0, iE.style)(e);
  }
  ry = ny;
  const { $ui: AE } = app;
  class ME extends ot.Component {
    constructor(...e) {
      var t;
      return (
        (t = super(...e)),
        (this.scuIgnoreFields = []),
        (this.unmountFns = new Set()),
        t
      );
    }
    shouldComponentUpdate(e, t) {
      const r = Date.now(),
        n =
          !FE(this.props, e, this.scuIgnoreFields) ||
          !FE(this.state, t, this.scuIgnoreFields),
        o = Date.now() - r;
      return (
        o > 1e3 &&
          console.warn(
            `shouldComponentUpdate took too much time (${o}ms).`,
            this
          ),
        n
      );
    }
    componentWillUnmount() {
      for (const e of this.unmountFns) e();
    }
    setTimeout(e, t) {
      const r = setTimeout(e, t);
      return (
        this.unmountFns.add(() => {
          clearTimeout(r);
        }),
        r
      );
    }
    addEventListener(e, t, r, n = {}) {
      e.addEventListener(t, r, n),
        this.unmountFns.add(() => {
          e.removeEventListener(t, r, n);
        });
    }
  }
  const FE = (e, t, r = []) => {
      const n = "[object Object]" === Object.prototype.toString.call(e),
        o = "[object Object]" === Object.prototype.toString.call(t);
      if ((n && !o) || (!n && o)) return !1;
      const a = Array.isArray(e),
        i = Array.isArray(t);
      if ((a && !i) || (!a && i)) return !1;
      if (!a && !n) return _.isEqual(e, t);
      if (a) {
        if (e.length !== t.length) return !1;
        for (let r = 0; r < e.length; r += 1) {
          const n = e[r],
            o = t[r];
          if (!FE(n, o)) return !1;
        }
        return !0;
      }
      if (e.$$typeof || t.$$typeof) return e === t;
      for (const n in e) {
        if (!(n in t)) return !1;
        if (r.includes(n)) continue;
        const o = e[n],
          a = t[n];
        if (!FE(o, a)) return !1;
      }
      for (const r in t) if (!(r in e)) return !1;
      return !0;
    },
    RE = (e) =>
      e
        .split(" ")
        .map((e) => ("." === e ? "0" : AE.space[e] || `${e}px`))
        .join(" "),
    LE = (e) => {
      e = e || "";
      const [t, r, n, o, a] = e.split(" "),
        i = {},
        s = (e, t) => {
          void 0 !== t &&
            "" !== t &&
            "." !== t &&
            (t.endsWith("%")
              ? (i[e] = t)
              : t.startsWith("-") && AE.space[t.slice(1)]
              ? (i[e] = -1 * AE.space[t.slice(1)])
              : (i[e] = AE.space[t] || `${t}px`));
        };
      return (
        s("top", t),
        s("left", o),
        s("right", r),
        s("bottom", n),
        void 0 !== a && "" !== a && "." !== a && (i.zIndex = parseInt(a, 10)),
        i
      );
    };
  var BE, OE;
  AE.assign({
    Component: ME,
    Fragment: ot.Fragment,
    createRef: ot.createRef,
    keyframes: ry.keyframes,
    raf: (...e) => {
      const t = 1 === e.length ? 1 : e[0],
        r = 1 === e.length ? e[0] : e[1];
      let n = 0;
      const o = () => {
        requestAnimationFrame(() => {
          (n += 1), n < t ? o() : r();
        });
      };
      o();
    },
    pickStyles: (e, t) => {
      const r = [];
      for (const n in t) {
        t[n] && r.push(e[n]);
      }
      return r;
    },
    space: {
      g0: "var(--g0)",
      g0h: "var(--g0h)",
      g1: "var(--g1)",
      g1h: "var(--g1h)",
      g2: "var(--g2)",
      g3: "var(--g3)",
      g4: "var(--g4)",
      g5: "var(--g5)",
    },
    class: (e, t = {}) => {
      const r = [e];
      for (const n in t) {
        const o = t[n];
        null !== o &&
          !1 !== o &&
          void 0 !== o &&
          (!0 === o ? r.push(`${e}_${n}`) : r.push(`${e}_${n}_${o}`));
      }
      return r.join(" ");
    },
    padding: (e) => ({ padding: RE(e) }),
    margin: (e) => ({ margin: RE(e) }),
    fixed: (e) => ({ position: "fixed", ...LE(e) }),
    relative: (e) => ({ position: "relative", ...LE(e) }),
    absolute: (e) => ({ position: "absolute", ...LE(e) }),
    sticky: (e) => ({ position: "sticky", ...LE(e) }),
    fullWidth: { width: "100%" },
    shadow: {
      sh4: { boxShadow: "var(--sh4)" },
      sh6: { boxShadow: "var(--sh6)" },
      sh10: { boxShadow: "var(--sh10)" },
      sh12: { boxShadow: "var(--sh12)" },
    },
    font: {
      primary: "var(--font-primary)",
      secondary: "var(--font-secondary)",
      monospace: "var(--font-monospace)",
    },
    borderRadius: { r4: { borderRadius: "var(--r4)" } },
    triangle: {
      up: ({ size: e, color: t } = {}) => ({
        width: 0,
        height: 0,
        borderTop: "none",
        borderLeft: `${e || 7}px solid transparent`,
        borderRight: `${e || 7}px solid transparent`,
        borderBottom: `${e || 7}px solid ${t || AE.color.borderDark}`,
      }),
      right: ({ size: e, color: t } = {}) => ({
        width: 0,
        height: 0,
        borderTop: `${e || 7}px solid transparent`,
        borderRight: "none",
        borderBottom: `${e || 7}px solid transparent`,
        borderLeft: `${e || 7}px solid ${t || AE.color.borderDark}`,
      }),
      down: ({ size: e, color: t } = {}) => ({
        width: 0,
        height: 0,
        borderTop: `${e || 7}px solid ${t || AE.color.borderDark}`,
        borderLeft: `${e || 7}px solid transparent`,
        borderRight: `${e || 7}px solid transparent`,
        borderBottom: "none",
      }),
      left: ({ size: e, color: t } = {}) => ({
        width: 0,
        height: 0,
        borderTop: `${e || 7}px solid transparent`,
        borderLeft: "none",
        borderRight: `${e || 7}px solid ${t || AE.color.borderDark}`,
        borderBottom: `${e || 7}px solid transparent`,
      }),
    },
    color: {
      link: "var(--color-link)",
      linkShadow: "var(--color-link-shadow)",
      textNormal: "var(--color-text-normal)",
      textBleak: "var(--color-text-bleak)",
      textInversed: "var(--color-text-inversed)",
      textPassive: "var(--color-text-passive)",
      iconPassive: "var(--color-icon-passive)",
      textActionable: "var(--color-text-actionable)",
      iconActionable: "var(--color-icon-actionable)",
      borderLight: "var(--color-border-light)",
      borderDark: "var(--color-border-dark)",
      bgLight3: "var(--color-bg-light-3)",
      bgLight2: "var(--color-bg-light-2)",
      bgLight1: "var(--color-bg-light-1)",
      bgNeutral: "var(--color-bg-neutral)",
      positive: "var(--color-positive)",
      error: "var(--color-error)",
      attention: "var(--color-attention)",
      primary: "var(--color-primary)",
      dark: "var(--color-dark)",
      appBackground: "var(--color-app-background)",
    },
    gradient: {
      brand: "linear-gradient(15deg, #8B2386, #F27021)",
      fromBlackToTransparent: (e = "to top") =>
        `\n      linear-gradient(\n        ${e},\n        hsl(0, 0%, 0%) 0%,\n        hsla(0, 0%, 0%, 0.738) 19%,\n        hsla(0, 0%, 0%, 0.541) 34%,\n        hsla(0, 0%, 0%, 0.382) 47%,\n        hsla(0, 0%, 0%, 0.278) 56.5%,\n        hsla(0, 0%, 0%, 0.194) 65%,\n        hsla(0, 0%, 0%, 0.126) 73%,\n        hsla(0, 0%, 0%, 0.075) 80.2%,\n        hsla(0, 0%, 0%, 0.042) 86.1%,\n        hsla(0, 0%, 0%, 0.021) 91%,\n        hsla(0, 0%, 0%, 0.008) 95.2%,\n        hsla(0, 0%, 0%, 0.002) 98.2%,\n        hsla(0, 0%, 0%, 0) 100%\n      )\n    `,
    },
    palette: {
      intensity: [
        "#771E83",
        "#8B2386",
        "#A82C77",
        "#BA326E",
        "#CE3864",
        "#E33E5A",
        "#E74650",
        "#E94F45",
        "#EC593B",
        "#EE6131",
        "#F06A26",
        "#F16E24",
      ],
      getIntensity: (e, t, r = !1) => {
        if (null == e) return null;
        if (0 === e && r) return null;
        if (0 === t && r) return null;
        if (0 === t) return AE.palette.intensity[0];
        const n = Math.round(((AE.palette.intensity.length - 1) * e) / t);
        return AE.palette.intensity[n];
      },
    },
    border: {
      light: "1px solid var(--color-border-light)",
      dark: "1px solid var(--color-border-dark)",
    },
    transition: {
      superslow: {
        transition: "all var(--transition-800)",
        willChange: "transform, opacity",
      },
      slow: {
        transition: "all var(--transition-450)",
        willChange: "transform, opacity",
      },
      fast: {
        transition: "all var(--transition-300)",
        willChange: "transform, opacity",
      },
      superfast: {
        transition: "all var(--transition-150)",
        willChange: "transform, opacity",
      },
    },
    grid: { display: "grid" },
    column: { display: "flex", flexDirection: "column" },
    row: { display: "flex", flexDirection: "row" },
    columnReverse: { display: "flex", flexDirection: "column-reverse" },
    rowReverse: { display: "flex", flexDirection: "row-reverse" },
    flex: {
      nowrap: { flexWrap: "nowrap" },
      wrap: { flexWrap: "wrap" },
      reverse: { flexWrap: "wrap-reverse" },
    },
    justifyContent: {
      start: { justifyContent: "flex-start" },
      end: { justifyContent: "flex-end" },
      center: { justifyContent: "center" },
      between: { justifyContent: "space-between" },
      around: { justifyContent: "space-around" },
      evenly: { justifyContent: "space-evenly" },
    },
    alignItems: {
      start: { alignItems: "flex-start" },
      end: { alignItems: "flex-end" },
      center: { alignItems: "center" },
      stretch: { alignItems: "stretch" },
      baseline: { alignItems: "baseline" },
    },
    alignContent: {
      start: { alignContent: "flex-start" },
      end: { alignContent: "flex-end" },
      center: { alignContent: "center" },
      stretch: { alignContent: "stretch" },
      between: { alignContent: "space-between" },
      around: { alignContent: "space-around" },
    },
    alignSelf: {
      auto: { alignSelf: "auto" },
      start: { alignSelf: "start" },
      end: { alignSelf: "end" },
      center: { alignSelf: "center" },
      baseline: { alignSelf: "baseline" },
      stretch: { alignSelf: "stretch" },
    },
    grow: { flexGrow: 1 },
    center: { alignItems: "center", justifyContent: "center" },
    text: {
      of: ({
        family: e,
        size: t,
        height: r,
        weight: n,
        color: o,
        opacity: a,
      }) => ({
        fontFamily: e || AE.font.primary,
        fontSize: t || 14,
        lineHeight: r || "18px",
        fontWeight: n || 400,
        color: o || AE.color.textNormal,
        opacity: a || 1,
      }),
      capitalize: { textTransform: "capitalize" },
      lowercase: { textTransform: "lowercase" },
      uppercase: { textTransform: "uppercase" },
      nowrap: { whiteSpace: "nowrap" },
      label: {
        fontSize: 9,
        fontWeight: 600,
        lineHeight: "11px",
        color: "var(--color-text-passive)",
      },
      ellipsis: {
        overflow: "hidden",
        textOverflow: "ellipsis",
        whiteSpace: "nowrap",
        minWidth: "1px",
      },
      mainTitle: {
        fontFamily: "var(--font-primary)",
        fontSize: "42px",
        fontWeight: "700",
        lineHeight: "62px",
      },
      mainText: {
        fontFamily: "var(--font-secondary)",
        fontSize: "18px",
        fontWeight: "400",
        lineHeight: "28px",
      },
      contentTitle: {
        fontFamily: "var(--font-primary)",
        fontSize: "18px",
        fontWeight: "600",
        lineHeight: "24px",
      },
      contentText: {
        fontFamily: "var(--font-secondary)",
        fontSize: "16px",
        fontWeight: "400",
        lineHeight: "24px",
      },
      tooltipTitle: {
        fontFamily: "var(--font-primary)",
        fontSize: "14px",
        fontWeight: "600",
        lineHeight: "18px",
        color: "var(--color-text-inversed)",
      },
      tooltipText: {
        fontFamily: "var(--font-primary)",
        fontSize: "12px",
        fontWeight: "500",
        lineHeight: "18px",
        color: "var(--color-text-inversed)",
      },
      bleak: {
        fontFamily: "var(--font-primary)",
        fontSize: "12px",
        fontWeight: "500",
        lineHeight: "18px",
        color: "var(--color-text-bleak)",
      },
      bleakSemiBold: {
        fontFamily: "var(--font-primary)",
        fontSize: "12px",
        fontWeight: "600",
        lineHeight: "18px",
        color: "var(--color-text-bleak)",
      },
      group1: {
        fontFamily: "var(--font-primary)",
        fontSize: "16px",
        lineHeight: "19px",
        fontWeight: "600",
      },
      group2: {
        fontFamily: "var(--font-primary)",
        fontSize: "14px",
        lineHeight: "18px",
        fontWeight: "600",
      },
      numberValue: {
        fontFamily: "var(--font-primary)",
        fontSize: "30px",
        lineHeight: "37px",
        fontWeight: "400",
      },
      numberSuffix: {
        fontFamily: "var(--font-primary)",
        fontSize: "18px",
        lineHeight: "22px",
        fontWeight: "300",
      },
      elementNormal: {
        fontFamily: "var(--font-primary)",
        fontSize: "14px",
        fontWeight: "500",
        lineHeight: "20px",
      },
      hashtag: {
        fontFamily: "var(--font-primary)",
        fontSize: "12px",
        fontWeight: "500",
        lineHeight: "1.25em",
        color: "var(--color-text-passive)",
      },
    },
    animation: {
      of: ({ name: e, timing: t, duration: r, iteractionCount: n }) => ({
        animationName: AE.animation[e] || e,
        animationTimingFunction: t || "var(--timing-function)",
        animationDuration: r || "800ms",
        animationIterationCount: n || "1",
      }),
      spin: ry.keyframes({
        "0%": { transform: "rotate(0deg)" },
        "100%": { transform: "rotate(360deg)" },
      }),
      shake: ry.keyframes({
        "0%": { transform: "rotate(0deg)" },
        "25%": { transform: "rotate(-8deg)" },
        "75%": { transform: "rotate(8deg)" },
        "100%": { transform: "rotate(0deg)" },
      }),
      popup: ry.keyframes({
        "0%": { transform: "translateY(20px)", opacity: 0 },
        "100%": { transform: "translateY(0)", opacity: 1 },
      }),
    },
    noselect: { userSelect: "none" },
    clickable: {
      cursor: "pointer",
      transition: "filter var(--transition-300)",
      ":hover": { filter: "var(--filter-for-hover)" },
      ":active": { filter: "var(--filter-for-active)" },
    },
    clickableInversed: {
      cursor: "pointer",
      transition: "filter var(--transition-300)",
      ":hover": { filter: "var(--filter-for-hover-inversed)" },
      ":active": { filter: "var(--filter-for-active-inversed)" },
    },
    disabled: {
      cursor: "default !important",
      opacity: "0.5 !important",
      transition: "none !important",
      ":hover": { filter: "none !important" },
      ":active": { filter: "none !important" },
    },
    disabledWithoutTransparency: {
      cursor: "default !important",
      transition: "none !important",
      ":hover": { filter: "none !important" },
      ":active": { filter: "none !important" },
    },
    noDataGradient: {
      borderRadius: "var(--r4)",
      background: "var(--no-data-gradient)",
    },
    hitbox: (e) => ({ ...AE.absolute(`-${e} -${e} -${e} -${e}`) }),
    hitboxBefore: (e) => ({
      "&::before": { content: '""', ...AE.absolute(`-${e} -${e} -${e} -${e}`) },
    }),
    hoverState: function (e, t) {
      return {
        onMouseEnter: function () {
          e.setState({ [t]: !0 });
        },
        onMouseLeave: function () {
          e.setState({ [t]: !1 });
        },
      };
    },
    onLongPress: function (e, t = 3e3) {
      if (!e) return {};
      let r = null;
      return {
        onMouseDown: function () {
          r = setTimeout(e, t);
        },
        onMouseUp: function () {
          clearTimeout(r);
        },
        onMouseLeave: function () {
          clearTimeout(r);
        },
      };
    },
    activeState: function (e, t) {
      return {
        onMouseDown: function () {
          e.setState({ [t]: !0 }),
            document.addEventListener(
              "mouseup",
              () => {
                e.setState({ [t]: !1 });
              },
              { once: !0 }
            );
        },
      };
    },
    box: ({ width: e = "100%", height: t = 300, ...r } = {}) => ({
      ...AE.row,
      ...AE.center,
      width: e,
      height: t,
      fontSize: 16,
      fontWeight: 600,
      color: AE.color.textBleak,
      background: "rgba(0, 0, 0, 0.1)",
      "&[href]": { color: AE.color.link },
      ...r,
    }),
  });
  const { $ui: $E } = app;
  var NE, UE;
  $E.Image =
    ((OE = BE =
      class extends $E.Component {
        static registerImages(e) {
          $E.Image.images = { ...($E.Image.images || {}), ...e };
        }
        render() {
          if (!$E.Image.images) return null;
          let e = $E.Image.images[this.props.src];
          if (
            (e || (e = this.props.src),
            (e = `${$E.Image.pathPrefix}${e}`),
            e.endsWith("g"))
          )
            return Glamor.createElement("img", {
              src: e,
              css: this.props.style,
            });
          const [t, r, n] = e.split(":"),
            o = {
              width: `${this.props.width || r}px`,
              height: `${this.props.height || n}px`,
            };
          return Glamor.createElement("img", {
            src: t,
            css: [o, this.props.style],
            onClick: this.props.onClick,
          });
        }
      }),
    (BE.pathPrefix = ""),
    (BE.images = null),
    OE);
  const { $ui: HE } = app,
    zE = ({ props: e }) => ({
      color: "inherit",
      width: "100%",
      height: "100%",
      ...(e.onClick && { ...HE.clickable }),
    });
  var jE, WE;
  function VE() {
    return (VE =
      Object.assign ||
      function (e) {
        for (var t = 1; t < arguments.length; t++) {
          var r = arguments[t];
          for (var n in r)
            Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
        }
        return e;
      }).apply(this, arguments);
  }
  HE.SvgIcon =
    ((UE = NE =
      class extends HE.Component {
        constructor(...e) {
          var t;
          return (
            (t = super(...e)),
            (this._onClick = () => {
              this.props.onClick && this.props.onClick(this.props);
            }),
            t
          );
        }
        render() {
          return Glamor.createElement(
            "svg",
            {
              css: [
                zE(this),
                HE.SvgIcon.styles[this.props.name],
                this.props.style,
              ],
              className: ["SvgIcon", this.props.className]
                .filter(Boolean)
                .join(" "),
              onClick: this._onClick,
            },
            Glamor.createElement("use", { href: `#${this.props.name}` })
          );
        }
        static registerSvgIcons(e) {
          for (const t of e) {
            const e = t.split('id="')[1].split('"')[0];
            if (
              ((HE.SvgIcon.icons[e] = t),
              (HE.SvgIcon.styles[e] = {}),
              !t.includes(" _stretch "))
            ) {
              const [r, n] = t
                .split('viewBox="')[1]
                .split('"')[0]
                .split(" ")
                .slice(2);
              (HE.SvgIcon.styles[e].width = r),
                (HE.SvgIcon.styles[e].height = n);
            }
            const r = t.includes("_dx") ? t.split('_dx="')[1].split('"')[0] : 0,
              n = t.includes("_dy") ? t.split('_dy="')[1].split('"')[0] : 0;
            (r || n) &&
              (HE.SvgIcon.styles[e].transform = `translate(${r}, ${n})`);
          }
          HE.SvgIcon._addHtml(e.join(""));
        }
        static registerDefs(e) {
          HE.SvgIcon._addHtml(`<defs>${e}</defs>`);
        }
        static async _addHtml(e) {
          "undefined" != typeof document &&
            (document.body
              ? (HE.SvgIcon.svgElement ||
                  ((HE.SvgIcon.svgElement = document.createElementNS(
                    "http://www.w3.org/2000/svg",
                    "svg"
                  )),
                  (HE.SvgIcon.svgElement.style.position = "fixed"),
                  (HE.SvgIcon.svgElement.style.left = "-100000px"),
                  document.body.appendChild(HE.SvgIcon.svgElement)),
                HE.SvgIcon.svgElement.insertAdjacentHTML("beforeend", e))
              : setTimeout(() => {
                  HE.SvgIcon._addHtml(e);
                }, 100));
        }
      }),
    (NE.svgElement = null),
    (NE.icons = {}),
    (NE.styles = {}),
    UE);
  const { $ui: qE } = app,
    ZE = (e) => ({
      ...(e.onClick ? qE.clickable : { cursor: "default" }),
      padding: 1,
    }),
    YE = (e) => ({
      fontSize: e.mini ? 8 : 9,
      fontWeight: 700,
      fontFamily: qE.font.primary,
      width: e.mini ? 12 : 14,
      height: e.mini ? 12 : 14,
      padding: 1,
      borderRadius: "50%",
      background: e.color ? e.color : qE.color.link,
      color: qE.theme.valueOf("day", qE.color.textInversed),
      ...qE.relative(),
      ...qE.hitboxBefore(7),
    }),
    QE = (e) => ({
      height: e.mini ? 9 : 10,
      lineHeight: e.mini ? "9px" : "10px",
    });
  function KE() {
    return (KE =
      Object.assign ||
      function (e) {
        for (var t = 1; t < arguments.length; t++) {
          var r = arguments[t];
          for (var n in r)
            Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
        }
        return e;
      }).apply(this, arguments);
  }
  qE.InfoCircle =
    ((WE = jE =
      class extends qE.Component {
        constructor(e) {
          super(e),
            (this._onClick = () => {
              this.props.onClick && this.props.onClick();
            }),
            (this.state = { hovered: !1 });
        }
        render() {
          return Glamor.createElement(
            "div",
            { css: [qE.row, ZE(this.props)], onClick: this._onClick },
            this._renderLabel(),
            this._renderTooltip()
          );
        }
        _renderLabel() {
          return Glamor.createElement(
            "div",
            VE(
              {
                className: "info-circle",
                css: [qE.row, qE.center, YE(this.props), this.props.style],
              },
              qE.hoverState(this, "hovered")
            ),
            Glamor.createElement(
              "span",
              { css: QE(this.props) },
              this.props.label || "?"
            )
          );
        }
        _renderTooltip() {
          if (!this.props.tooltip) return null;
          const e = {
            background: this.props.color || qE.color.link,
            ...this.props.tooltip,
          };
          return Glamor.createElement(
            qE.Tooltip,
            VE({ shown: this.state.hovered }, e)
          );
        }
      }),
    (jE.cssShowOnHover = {
      "& .info-circle": { opacity: 0 },
      "&:hover .info-circle": { opacity: 1 },
    }),
    WE);
  const { $ui: XE } = app,
    JE = {
      root: (e) => ({
        ...XE.text.nowrap,
        ...(e.isLightBackground || e.cancel
          ? XE.clickableInversed
          : XE.clickable),
        ...(e.small ? XE.text.hashtag : XE.text.group1),
        fontWeight: 600,
        ...(e.disabled ? XE.disabledWithoutTransparency : {}),
        ...(e.small ? XE.padding("4 g1 4 g1") : XE.padding("g1 g3 g1 g3")),
        ...XE.borderRadius.r4,
        color:
          e.color ||
          (e.cancel
            ? XE.color.link
            : XE.theme.valueOf("day", XE.color.textInversed)),
        backgroundColor: e.disabled
          ? XE.color.iconPassive
          : e.background || (e.cancel ? XE.color.bgLight3 : XE.color.link),
        border: "none",
        transition: "all var(--transition-300)",
        transitionProperty: "box-shadow, border-color, background-color, color",
        boxShadow: e.shadow && `0 3px 6px ${e.shadow}`,
        "&:hover": { boxShadow: e.shadow && `0 5px 10px ${e.shadow}` },
        "&:active": { boxShadow: e.shadow && `0 1px 2px ${e.shadow}` },
        ...XE.relative(),
        ...(e.isIconAtRight && { ...XE.rowReverse }),
        ...(e.borderColor && {
          "&::before": {
            content: '""',
            ...XE.absolute("0 0 0 0"),
            borderRadius: "inherit",
            border: `1px solid ${e.borderColor}`,
          },
        }),
      }),
      icon: (e) => ({
        marginRight: e.label ? (e.small ? XE.space.g1 : XE.space.g1h) : 0,
        ...(e.isIconAtRight && { marginRight: "0", marginLeft: XE.space.g2 }),
      }),
      label: { ...XE.relative() },
      fill: {
        ...XE.absolute("0 0 0 0"),
        borderRadius: "inherit",
        overflow: "hidden",
      },
      fillProgress: (e) => ({
        width: "100%",
        height: "100%",
        background: XE.color.link,
        transformOrigin: "top left",
        transform: `scaleX(${e.fill.value || 0})`,
        ...XE.transition.fast,
        ...e.fill.style,
      }),
      progress: { marginLeft: 12, marginRight: -8 },
    };
  XE.ActionButton = class extends XE.Component {
    constructor(e) {
      super(e),
        (this._onClick = () => {
          this.props.disabled ||
            (this.props.onClick && this.props.onClick(this.props));
        }),
        (this.state = { hovered: !1 });
    }
    render() {
      if (!this.props.label && !this.props.icon) return null;
      const e =
          this.props.icon &&
          Glamor.createElement(
            "div",
            {
              css: [
                XE.row,
                XE.alignItems.center,
                JE.icon(this.props),
                this.props.iconStyle,
              ],
            },
            Glamor.createElement(XE.SvgIcon, { name: this.props.icon })
          ),
        t = Glamor.createElement("div", { css: JE.label }, this.props.label),
        r =
          this.props.fill &&
          Glamor.createElement(
            "div",
            { css: JE.fill },
            Glamor.createElement("div", { css: JE.fillProgress(this.props) })
          );
      return Glamor.createElement(
        "button",
        KE(
          {
            css: [
              XE.row,
              XE.alignItems.center,
              JE.root(this.props),
              this.props.style,
            ],
            className: this.props.className,
            tabIndex: this.props.tabIndex,
            onClick: this._onClick,
          },
          XE.hoverState(this, "hovered")
        ),
        r,
        e,
        t,
        this._renderProgress(),
        this._renderTooltip()
      );
    }
    _renderProgress() {
      return this.props.progress
        ? Glamor.createElement(
            XE.ProgressRing,
            KE({}, this.props.progress, {
              style: [JE.progress, this.props.progress.style],
            })
          )
        : null;
    }
    _renderTooltip() {
      return this.props.tooltip
        ? Glamor.createElement(
            XE.Tooltip,
            KE({}, this.props.tooltip, {
              style: this.props.tooltip.style,
              shown: this.state.hovered,
            })
          )
        : null;
    }
  };
  const { $ui: e_ } = app,
    t_ = ({ props: e }) => ({
      ...e_.text.nowrap,
      ...e_.text.hashtag,
      ...e_.padding("2 6"),
      ...e_.borderRadius.r4,
      ...e_.text.uppercase,
      border: "2px solid",
      color: e.color || e_.color.textPassive,
      fontWeight: 600,
      width: "min-content",
    });
  e_.Badge = class extends e_.Component {
    render() {
      return this.props.text
        ? Glamor.createElement(
            "div",
            { css: [e_.row, e_.alignItems.center, t_(this)] },
            this.props.text,
            this._renderInfoCircle()
          )
        : null;
    }
    _renderInfoCircle() {
      if (!this.props.info) return null;
      const e = {
        color: e_.theme.valueOf("day", e_.color.textPassive),
        ...this.props.info,
      };
      return Glamor.createElement(
        e_.Fragment,
        null,
        Glamor.createElement(e_.Spacer, { width: "g1" }),
        Glamor.createElement(e_.InfoCircle, e)
      );
    }
  };
  const { $ui: r_ } = app,
    n_ = {
      root: (e, t) => ({
        ...r_.relative(),
        ...("day" === t.theme ? r_.shadow.sh4 : { border: r_.border.dark }),
        ...r_.borderRadius.r4,
        ...r_.padding("g1 0"),
        backgroundColor: r_.color.bgLight1,
        flex: "1 0 auto",
        minHeight: e.hexImage ? 84 : 0,
      }),
      header: (e) => ({
        ...(e.subheader || e.hexImage || e.content
          ? r_.padding("0 g2 g1 g2")
          : r_.padding("0 g2 0 g2")),
        ...r_.text.contentTitle,
        borderBottom:
          e.subheader || e.hexImage || e.content ? r_.border.dark : null,
        wordBreak: "break-word",
        ...(e.hexImage && { paddingRight: 50 }),
      }),
      marker: (e) => ({
        flexShrink: 0,
        backgroundColor: e.marker,
        width: 8,
        height: 8,
        marginRight: 8,
        borderRadius: 4,
      }),
      subheader: {
        ...r_.padding("g1 g2"),
        ...r_.text.tooltipText,
        color: r_.color.textPassive,
      },
      hexImage: { ...r_.absolute("12 -11 . .") },
      hexImagePart: { ...r_.absolute("-8 -35 . .") },
      content: { ...r_.padding("0 g2 g1 g2"), ...r_.text.contentText },
      contentParagraph: (e, t) => ({ paddingBottom: t < e.length - 1 ? 4 : 0 }),
    },
    o_ = {
      "hex-part-day": "ui-core/hex-part-day.png:100:100",
      "hex-part-night": "ui-core/hex-part-night.png:100:100",
    };
  r_.Image.registerImages(o_),
    (r_.Card = r_.theme.ThemeAware(
      class extends r_.Component {
        render() {
          return Glamor.createElement(
            "div",
            {
              css: [
                r_.column,
                n_.root(this.props, this.state),
                this.props.style,
              ],
            },
            this._renderHeader(),
            this._renderHexImage(),
            this._renderSubheader(),
            this._renderContent()
          );
        }
        _renderHeader() {
          if (!this.props.header && !this.props.marker) return null;
          const e =
              this.props.marker &&
              Glamor.createElement("div", { css: n_.marker(this.props) }),
            t = this.props.header;
          return Glamor.createElement(
            "div",
            { css: [r_.row, r_.alignItems.center, n_.header(this.props)] },
            e,
            t
          );
        }
        _renderSubheader() {
          return this.props.subheader
            ? Glamor.createElement(
                "div",
                { css: n_.subheader },
                this.props.subheader
              )
            : null;
        }
        _renderHexImage() {
          if (!this.props.hexImage) return null;
          const e = o_[`hex-part-${this.state.theme}`] || o_["hex-part-day"];
          return Glamor.createElement(
            "div",
            null,
            Glamor.createElement(
              "div",
              { css: n_.hexImagePart },
              Glamor.createElement(r_.Image, { src: e })
            ),
            Glamor.createElement(
              "div",
              { css: n_.hexImage },
              Glamor.createElement(r_.Image, { src: this.props.hexImage })
            )
          );
        }
        _renderContent() {
          if (!this.props.content) return null;
          const e = Array.isArray(this.props.content)
            ? this.props.content.map((e, t) =>
                Glamor.createElement(
                  "p",
                  { key: t, css: n_.contentParagraph(this.props.content, t) },
                  e
                )
              )
            : this.props.content;
          return Glamor.createElement("div", { css: n_.content }, e);
        }
      }
    ));
  const { $ui: a_ } = app,
    i_ = {
      root: (e) => ({
        ...a_.clickable,
        ...a_.noselect,
        ...(e.disabled ? a_.disabled : {}),
        ...a_.InfoCircle.cssShowOnHover,
      }),
      icon: (e) => ({
        ...a_.padding("0 g1 0 0"),
        color: e.value ? a_.color.link : a_.color.bgNeutral,
      }),
      label: {
        ...a_.text.elementNormal,
        color: a_.color.textNormal,
        paddingTop: 2,
      },
    };
  a_.SvgIcon.registerSvgIcons([
    '<symbol id="checkbox-on" viewBox="0 0 24 24"><rect width="24" height="24" fill="none"/><path d="M19,3H5A2.006,2.006,0,0,0,3,5V19a2.006,2.006,0,0,0,2,2H19a2.006,2.006,0,0,0,2-2V5a2.006,2.006,0,0,0-2-2ZM10,17,5,12l1-1,4,3,8-7,1,1-9,9Z" fill="currentColor" fill-rule="evenodd"/></symbol>',
    '<symbol id="checkbox-off" viewBox="0 0 24 24"><g transform="translate(8192 4666)"><rect width="24" height="24" transform="translate(-8192 -4666)" fill="none"/><path d="M16,18H2a2,2,0,0,1-2-2V2A2,2,0,0,1,2,0H16a2,2,0,0,1,2,2V16A2,2,0,0,1,16,18ZM2,2V16H16V2Z" transform="translate(-8189 -4663)" fill="currentColor"/></g></symbol>',
  ]),
    (a_.Checkbox = class extends a_.Component {
      constructor(...e) {
        var t;
        return (
          (t = super(...e)),
          (this._onClick = () => {
            this.props.disabled ||
              (this.props.onChange && this.props.onChange(this.props));
          }),
          t
        );
      }
      render() {
        const e = this.props,
          t = Glamor.createElement(
            "div",
            { css: i_.icon(e) },
            Glamor.createElement(a_.SvgIcon, {
              name: e.value ? "checkbox-on" : "checkbox-off",
            })
          ),
          r =
            e.label && Glamor.createElement("div", { css: i_.label }, e.label),
          n =
            e.info &&
            Glamor.createElement(
              a_.Fragment,
              null,
              Glamor.createElement(a_.Spacer, { width: "g2" }),
              Glamor.createElement(a_.InfoCircle, e.info)
            );
        return Glamor.createElement(
          "div",
          {
            css: [
              a_.row,
              a_.justifyContent.between,
              a_.alignItems.center,
              i_.root(this.props),
              this.props.style,
            ],
            onClick: this._onClick,
          },
          Glamor.createElement(
            "div",
            { css: [a_.row, a_.alignItems.start] },
            t,
            r
          ),
          n
        );
      }
    });
  const { $ui: s_ } = app,
    l_ = {
      root: ({ props: e }) => ({
        ...s_.transition.fast,
        color: s_.color.textPassive,
        width: 40,
        height: 40,
        cursor: "pointer",
        position: "relative",
        opacity: 0.5,
        ...(e.small && { width: 24, height: 24 }),
        "&:hover": { opacity: 0.7 },
        "&:active": { opacity: 1 },
        "&::before": { content: '""', ...s_.absolute("-4 -4 -4 -4") },
      }),
      icon: { width: "100%", height: "100%" },
    },
    c_ = "close-button.close";
  s_.SvgIcon.registerSvgIcons([
    `<symbol id="${c_}" viewBox="0 0 40 40"><path d="M0 0h40v40H0z" fill="transparent"/><path d="M12.626 25.797l6.062-6.061-6.062-6.061 1.313-1.313L20 18.424l6.061-6.062 1.313 1.313-6.06 6.062 6.06 6.06-1.313 1.313-6.062-6.06-6.06 6.06z" fill="currentColor"/></symbol>`,
  ]),
    (s_.CloseButton = class extends s_.Component {
      constructor(...e) {
        var t;
        return (
          (t = super(...e)),
          (this._onClick = () => {
            this.props.onClick && this.props.onClick(this.props);
          }),
          t
        );
      }
      render() {
        return Glamor.createElement(
          "button",
          {
            css: [l_.root(this), this.props.style],
            tabIndex: "-1",
            onClick: this._onClick,
          },
          Glamor.createElement(s_.SvgIcon, { style: l_.icon, name: c_ })
        );
      }
    });
  const { $ui: u_ } = app,
    d_ = {
      root: (e) => ({
        width: e.graphStyle && e.graphStyle.columnWidth ? null : "100%",
        height: e.graphStyle && e.graphStyle.columnMaxHeight ? null : "100%",
      }),
      graph: { width: "100%", height: "100%" },
      columnWrapper: { ...u_.relative(), width: "100%" },
      column: { ...u_.absolute(". 0 0 0") },
      cap: { ...u_.absolute("0 0 . 0"), height: 3, maxHeight: "100%" },
      gap: {},
      labelsContainer: {
        width: "100%",
        borderTop: "1px solid var(--color-icon-passive)",
        marginTop: 4,
      },
      label: {
        ...u_.text.hashtag,
        fontSize: 12,
        color: u_.color.textPassive,
        paddingTop: 4,
      },
    };
  u_.ColumnGraph = class extends u_.Component {
    constructor(e) {
      super(e),
        (this._onItemEnter = (e) => {
          if (
            !(
              e &&
              e.currentTarget &&
              e.currentTarget.dataset &&
              e.currentTarget.dataset.index
            )
          )
            return;
          const t = Number(e.currentTarget.dataset.index);
          if ((this.setState({ hoveredIndex: t }), this.props.onItemHover)) {
            const e = this._computeItemsList();
            this.props.onItemHover(e[t], t);
          }
        }),
        (this._onItemClick = (e) => {
          if (!this.props.onItemClick) return null;
          if (
            !(
              e &&
              e.currentTarget &&
              e.currentTarget.dataset &&
              e.currentTarget.dataset.index
            )
          )
            return;
          const t = Number(e.currentTarget.dataset.index),
            r = this._computeItemsList();
          this.props.onItemClick(r[t], t);
        }),
        (this._onMouseLeave = () => {
          this.setState({ hoveredIndex: -1 }),
            this.props.onItemHover && this.props.onItemHover(null);
        }),
        (this.state = { hoveredIndex: -1 });
    }
    render() {
      const e = this._computeItemsList(),
        t =
          this.props.maxValue ||
          e.reduce((e, t) => Math.max(e, t.value || 0), 0),
        r = {
          columnWidth: null,
          columnGapWidth: 2,
          columnMaxHeight: null,
          color: u_.color.iconPassive,
          fixCapOnHover: !1,
          ...this.props.graphStyle,
        },
        n = this._renderGraph({ graphStyle: r, items: e, maxValue: t }),
        o = this._renderLabels({ graphStyle: r, items: e, maxValue: t });
      return Glamor.createElement(
        "div",
        { css: [u_.column, u_.alignItems.stretch, d_.root(this.props)] },
        n,
        o
      );
    }
    _renderGraph({ items: e, graphStyle: t, maxValue: r }) {
      const n = {
          height: t.columnMaxHeight,
          width:
            null === t.columnWidth
              ? null
              : t.columnWidth * e.length +
                Math.max(0, e.length - 1) * t.columnGapWidth,
          cursor: this.props.onItemClick ? "pointer" : "initial",
        },
        o = {
          maxWidth: null === t.columnWidth ? null : t.columnWidth,
          height: "100%",
        },
        a = { minWidth: t.columnGapWidth, width: t.columnGapWidth };
      return Glamor.createElement(
        "div",
        {
          css: [u_.row, u_.alignItems.end, d_.graph, n, this.props.style],
          onMouseLeave: this._onMouseLeave,
        },
        e.map((n, i) => {
          const s = {
              height:
                null === n.value || void 0 === n.value || 0 === r
                  ? 0
                  : (n.value / r) * 100 + "%",
              minHeight:
                null === n.value || void 0 === n.value || 0 === r ? 0 : 1,
              backgroundColor:
                this.state.hoveredIndex === i && n.color && !t.fixCapOnHover
                  ? n.color
                  : t.color,
            },
            l = { backgroundColor: n.color || null };
          return Glamor.createElement(
            u_.Fragment,
            { key: i },
            Glamor.createElement(
              "div",
              {
                css: [d_.columnWrapper, o],
                "data-index": i,
                onMouseEnter: this._onItemEnter,
                onClick: this._onItemClick,
              },
              Glamor.createElement(
                "div",
                { css: [d_.column, s] },
                Glamor.createElement("div", { css: [d_.cap, l] })
              )
            ),
            i !== e.length - 1 &&
              Glamor.createElement("div", { css: [d_.gap, a], "data-index": i })
          );
        })
      );
    }
    _renderLabels({ graphStyle: e, items: t }) {
      if (!this._hasLabels()) return null;
      const r =
          -1 !== this.state.hoveredIndex &&
          this.props.items &&
          this.props.items[this.state.hoveredIndex] &&
          this.props.items[this.state.hoveredIndex].labels
            ? this.props.items[this.state.hoveredIndex].labels
            : this.props.labels,
        n = {
          ...u_.justifyContent.between,
          ...u_.alignItems.center,
          ...d_.labelsContainer,
          minHeight: 20,
          maxWidth:
            null === e.columnWidth
              ? null
              : e.columnWidth * t.length +
                Math.max(0, t.length - 1) * e.columnGapWidth,
        };
      return Glamor.createElement(
        "div",
        { css: [u_.row, n] },
        (r || []).map((e, t) =>
          Glamor.createElement("div", { key: t, css: d_.label }, e)
        )
      );
    }
    _hasLabels() {
      const e = this.props.itemTemplate;
      return (
        this.props.labels ||
        (this.props.items || []).some((t) => ({ ...e, ...t }.labels))
      );
    }
    _computeItemsList() {
      const e = this.props.itemTemplate;
      return (this.props.items || [])
        .map((t) =>
          "number" == typeof t
            ? { ...e, value: t }
            : { ...e, value: null, ...t }
        )
        .map((e) => (e.value < 0 ? { ...e, value: null } : e));
    }
  };
  const { $ui: h_ } = app,
    p_ = {
      root: { width: "100%", ...h_.noselect },
      mainContainer: { position: "relative" },
      valueContainer: (e) => ({
        overflow: "hidden",
        outline: "none",
        ...h_.alignItems.center,
        ...h_.justifyContent.between,
        ...(e.inline ? { ...h_.clickable } : { ...h_.grow }),
        minHeight: e.inline ? 24 : 35,
        cursor: e.disabled ? "default" : "pointer",
        ...(e.disabled ? h_.disabled : {}),
        ...(e.inline
          ? {}
          : {
              border: `1px solid ${h_.color.borderDark}`,
              background: h_.color.bgLight1,
              borderRadius: 4,
              padding: "6px 11px",
            }),
      }),
      iconAndValue: { ...h_.row, ...h_.alignItems.center, minWidth: 1 },
      label: (e) => ({
        fontFamily: h_.font.primary,
        fontSize: 9,
        fontWeight: 600,
        lineHeight: "11px",
        color:
          e.error && e.error.hasError ? h_.color.error : h_.color.textPassive,
        marginBottom: 4,
        ...h_.transition.superfast,
      }),
      value: (e) => ({
        ...h_.text.elementNormal,
        ...h_.text.ellipsis,
        padding: e.inline ? "1px 0 0 0" : "0 0 1px 0",
        color: h_.color.textNormal,
      }),
      triangleWrap: ({ props: e }) => ({
        ...h_.row,
        ...h_.center,
        width: 14,
        height: 14,
        borderRadius: "50%",
        color: h_.color.link,
        marginLeft: h_.space.g1,
        ...(e.highlightTriangle && {
          background: h_.color.link,
          color: "#FFF",
        }),
      }),
      triangle: {
        ...h_.relative(),
        flexShrink: 0,
        transform: "translateY(0.5px)",
      },
      menu: (e, t) => ({
        ...h_.transition.fast,
        position: "absolute",
        zIndex: 9999,
        top: e.inline ? 32 : 43,
        left: e.icon ? (e.inline ? 24 : 35) : 0,
        pointerEvents: "all",
        ...(!t.open && {
          opacity: 0,
          pointerEvents: "none",
          transform: "translateY(-10px)",
        }),
        ...(e.isMenuAtTheTop && {
          top: "auto",
          bottom: "100%",
          marginBottom: 10,
          ...(!t.open && { transform: "translateY(10px)" }),
        }),
      }),
      error: {
        fontFamily: h_.font.primary,
        fontSize: 9,
        fontWeight: 500,
        lineHeight: "11px",
        color: h_.color.error,
        marginTop: 2,
      },
    };
  h_.SvgIcon.registerSvgIcons([
    '<symbol id="dropdown-triangle" viewBox="0 0 8.005 4.002"><path d="M0,0,4,4l-4,4Z" transform="translate(8.005) rotate(90)" fill="currentColor"/></symbol>',
  ]),
    (h_.Dropdown = class extends h_.Component {
      constructor(...e) {
        var t;
        return (
          (t = super(...e)),
          (this.timer = null),
          (this.state = { open: !1 }),
          (this._onChange = (e) => {
            this.props.onChange && this.props.onChange(e),
              (this.timer = setTimeout(() => {
                this.setState({ open: !1 });
              }, 0));
          }),
          (this._onClick = () => {
            this.props.disabled ||
              (clearTimeout(this.timer),
              this.setState({ open: !this.state.open }));
          }),
          (this._onBlur = () => {
            this.timer = setTimeout(() => {
              this.setState({ open: !1 });
            }, 0);
          }),
          (this._onFocus = () => {
            clearTimeout(this.timer);
          }),
          (this._onKeyDown = (e) => {
            27 === e.which && this.setState({ open: !1 });
          }),
          t
        );
      }
      render() {
        const e =
          this.props.icon &&
          Glamor.createElement(
            React.Fragment,
            null,
            Glamor.createElement(h_.SvgIcon, this.props.icon),
            Glamor.createElement(h_.Spacer, { width: "g1h" })
          );
        let t = "";
        if ("value" in this.props) t = this.props.value;
        else {
          const e = (this.props.items || []).filter((e) => e.selected);
          e.length > 0 &&
            ((t = e[0].label), e.length > 1 && (t += ", +" + (e.length - 1)));
        }
        const r =
            null !== t &&
            Glamor.createElement("div", { css: [p_.value(this.props)] }, t),
          n =
            this.props.items &&
            this.props.items.length > 0 &&
            Glamor.createElement(
              "div",
              { css: [p_.triangleWrap(this), this.props.triangleStyle] },
              Glamor.createElement(h_.SvgIcon, {
                style: p_.triangle,
                name: "dropdown-triangle",
              })
            ),
          o = Glamor.createElement(
            "div",
            { css: [p_.menu(this.props, this.state), this.props.menuStyle] },
            Glamor.createElement(h_.Menu, {
              items: this.props.items,
              maxHeight: this.props.maxHeight,
              renderer: this.props.renderer,
              onChange: this._onChange,
            })
          ),
          a =
            this.props.label &&
            !this.props.inline &&
            Glamor.createElement(
              "div",
              { css: p_.label(this.props) },
              this.props.label
            );
        return Glamor.createElement(
          "div",
          { css: [h_.column, p_.root] },
          a,
          Glamor.createElement(
            "button",
            {
              css: [h_.row, p_.mainContainer, this.props.style],
              onBlur: this._onBlur,
              onFocus: this._onFocus,
              onKeyDown: this._onKeyDown,
            },
            Glamor.createElement(
              "div",
              {
                className: "Dropdown__toggler",
                css: [
                  h_.row,
                  p_.valueContainer(this.props),
                  this.props.togglerStyle,
                ],
                onClick: this._onClick,
              },
              !(!e && !r) &&
                Glamor.createElement("div", { css: p_.iconAndValue }, e, r),
              n
            ),
            o
          ),
          this._renderError()
        );
      }
      close() {
        this.setState({ open: !1 });
      }
      _renderError() {
        return (
          this.props.error &&
          this.props.error.hasError &&
          this.props.error.message &&
          Glamor.createElement(
            "div",
            { css: [h_.row, h_.justifyContent.end, p_.error] },
            this.props.error.message
          )
        );
      }
    });
  const { $ui: m_ } = app,
    g_ =
      "\n    hsla(0, 0%, 100%, 1) 0%,\n    hsla(0, 0%, 100%, 0.738) 19%,\n    hsla(0, 0%, 100%, 0.541) 34%,\n    hsla(0, 0%, 100%, 0.382) 47%,\n    hsla(0, 0%, 100%, 0.278) 56.5%,\n    hsla(0, 0%, 100%, 0.194) 65%,\n    hsla(0, 0%, 100%, 0.126) 73%,\n    hsla(0, 0%, 100%, 0.075) 80.2%,\n    hsla(0, 0%, 100%, 0.042) 86.1%,\n    hsla(0, 0%, 100%, 0.021) 91%,\n    hsla(0, 0%, 100%, 0.008) 95.2%,\n    hsla(0, 0%, 100%, 0.002) 98.2%,\n    hsla(0, 0%, 100%, 0) 100%\n  ",
    f_ =
      "\n    hsla(225deg, 4%, 20%, 1) 0%,\n    hsla(225deg, 4%, 20%, 0.738) 19%,\n    hsla(225deg, 4%, 20%, 0.541) 34%,\n    hsla(225deg, 4%, 20%, 0.382) 47%,\n    hsla(225deg, 4%, 20%, 0.278) 56.5%,\n    hsla(225deg, 4%, 20%, 0.194) 65%,\n    hsla(225deg, 4%, 20%, 0.126) 73%,\n    hsla(225deg, 4%, 20%, 0.075) 80.2%,\n    hsla(225deg, 4%, 20%, 0.042) 86.1%,\n    hsla(225deg, 4%, 20%, 0.021) 91%,\n    hsla(225deg, 4%, 20%, 0.008) 95.2%,\n    hsla(225deg, 4%, 20%, 0.002) 98.2%,\n    hsla(225deg, 4%, 20%, 0) 100%\n  ",
    v_ = {
      root: { height: "100%", ...m_.relative() },
      fade: {
        height: "min(60px, 18%)",
        ...m_.absolute(". 0 . 0 1"),
        ...m_.transition.fast,
      },
      fadeTop: {
        top: 0,
        background: `linear-gradient(to bottom, ${g_})`,
        "html.theme-night &": {
          background: `linear-gradient(to bottom, ${f_})`,
        },
        ".FadedScroller_atTop > &": { opacity: 0, pointerEvents: "none" },
      },
      fadeBottom: {
        bottom: 0,
        background: `linear-gradient(to top, ${g_})`,
        "html.theme-night &": { background: `linear-gradient(to top, ${f_})` },
        ".FadedScroller_atBottom > &": { opacity: 0, pointerEvents: "none" },
      },
      content: {
        ...m_.absolute("0 0 0 0"),
        padding: "inherit",
        overflow: "auto",
        contentVisibility: "auto",
      },
    };
  function b_() {
    return (b_ =
      Object.assign ||
      function (e) {
        for (var t = 1; t < arguments.length; t++) {
          var r = arguments[t];
          for (var n in r)
            Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
        }
        return e;
      }).apply(this, arguments);
  }
  m_.FadedScroller = class extends m_.Component {
    constructor(e) {
      super(e),
        (this._updateState = () => {
          const e = this._contentRef.current,
            t = 0 === Math.floor(e.scrollTop),
            r = Math.ceil(e.scrollTop) === e.scrollHeight - e.offsetHeight,
            n = e.closest(".FadedScroller");
          n.classList.toggle("FadedScroller_atTop", t),
            n.classList.toggle("FadedScroller_atBottom", r);
        }),
        (this._onFadeMouseEnter = (e) => {
          const t = e.target,
            r = t.getBoundingClientRect();
          (t.style.opacity = 0),
            (t.style.pointerEvents = "none"),
            document.addEventListener("mousemove", function e(n) {
              (n.clientX > r.x &&
                n.clientX < r.x + r.width &&
                n.clientY > r.y &&
                n.clientY < r.y + r.height) ||
                ((t.style.opacity = null),
                (t.style.pointerEvents = null),
                document.removeEventListener("mousemove", e));
            });
        }),
        (this._contentRef = m_.createRef()),
        (this._resizeObserver = null);
    }
    componentDidMount() {
      this._updateState(), setTimeout(() => this._updateState());
      const e = this._contentRef.current;
      (this._resizeObserver = new ResizeObserver(this._updateState)),
        this._resizeObserver.observe(e);
    }
    componentWillUnmount() {
      this._resizeObserver.disconnect();
    }
    componentDidUpdate() {
      this._updateState();
    }
    render() {
      return Glamor.createElement(
        "div",
        { className: "FadedScroller", css: [v_.root, this.props.style] },
        Glamor.createElement("div", {
          css: [v_.fade, v_.fadeTop],
          onMouseEnter: this._onFadeMouseEnter,
        }),
        Glamor.createElement(
          "div",
          {
            css: v_.content,
            ref: this._contentRef,
            onScroll: this._updateState,
          },
          this.props.children
        ),
        Glamor.createElement("div", {
          css: [v_.fade, v_.fadeBottom],
          onMouseEnter: this._onFadeMouseEnter,
        })
      );
    }
    scrollTop(e) {
      this._contentRef.current.scrollTop = e;
    }
  };
  const { $ui: y_ } = app,
    w_ = {
      root: {
        background: y_.color.bgLight2,
        maxWidth: 406,
        ...y_.borderRadius.r4,
        ...y_.shadow.sh10,
        "& a": { color: y_.color.textNormal },
      },
      title: {
        ...y_.row,
        ...y_.text.group2,
        paddingBottom: 8,
        paddingRight: y_.space.g3,
      },
      icon: ({ props: e }) => ({
        flexShrink: 0,
        marginRight: y_.space.g1,
        ...e.iconStyle,
      }),
      content: {
        ...y_.relative(),
        ...y_.padding("g2 g2 g1h g2"),
        ...y_.text.tooltipText,
        color: y_.color.textNormal,
        borderBottom: "1px solid var(--color-border-dark)",
      },
      contentItem: { paddingBottom: 8 },
      inner: { width: "100%" },
      marker: (e) => ({
        ...y_.absolute("0 . . 16"),
        width: 80,
        height: 4,
        backgroundColor: e.markerColor || y_.color.link,
      }),
      closeButtonWrapper: { ...y_.absolute("0 0 . .") },
      closeButton: { transform: "scale(0.8)" },
      action: (e) => ({
        ":not(:last-child)": { marginRight: y_.space.g2 },
        ...(!e && { flexGrow: 1 }),
      }),
      subcontent: {
        ...y_.padding("g1h g2 g1h g2"),
        ...y_.text.tooltipText,
        color: y_.color.textNormal,
        opacity: 0.5,
      },
    };
  function C_() {
    return (C_ =
      Object.assign ||
      function (e) {
        for (var t = 1; t < arguments.length; t++) {
          var r = arguments[t];
          for (var n in r)
            Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
        }
        return e;
      }).apply(this, arguments);
  }
  y_.InfoCard = class extends y_.Component {
    constructor(...e) {
      var t;
      return (
        (t = super(...e)),
        (this._onClose = () => {
          this.props.onClose && this.props.onClose();
        }),
        t
      );
    }
    render() {
      return Glamor.createElement(
        "div",
        { css: w_.root },
        Glamor.createElement(
          "div",
          { css: [y_.row, w_.content] },
          Glamor.createElement("div", { css: w_.marker(this.props) }),
          Glamor.createElement(
            "div",
            { css: w_.closeButtonWrapper },
            Glamor.createElement(y_.CloseButton, {
              onClick: this._onClose,
              style: w_.closeButton,
            })
          ),
          Glamor.createElement(
            "div",
            { css: w_.inner },
            this._renderTitle(),
            this._renderContent(),
            this._renderActions()
          )
        ),
        this._renderSubcontent()
      );
    }
    _renderTitle() {
      const e = this.props.title;
      if (e)
        return Glamor.createElement(
          "div",
          { css: w_.title },
          this._renderIcon(),
          e
        );
    }
    _renderIcon() {
      const e = this.props.icon;
      return e
        ? Glamor.createElement(y_.SvgIcon, { style: w_.icon(this), name: e })
        : null;
    }
    _renderContent() {
      const e = [].concat(this.props.content || []);
      return 0 === e.length
        ? null
        : Glamor.createElement(
            "div",
            null,
            e.map((e, t) =>
              Glamor.createElement("div", { key: t, css: w_.contentItem }, e)
            )
          );
    }
    _renderActions() {
      const e = this.props.actions || [];
      return 0 === e.length
        ? null
        : Glamor.createElement(
            "div",
            { css: y_.row },
            e.map((e, t) =>
              Glamor.createElement(
                "div",
                { css: w_.action(e), key: t },
                !!e && Glamor.createElement(y_.LinkButton, b_({ small: !0 }, e))
              )
            )
          );
    }
    _renderSubcontent() {
      const e = this.props.subcontent;
      return e
        ? Glamor.createElement(
            "div",
            { css: w_.subcontent },
            Glamor.createElement(y_.Spacer, { width: 30 }),
            e
          )
        : null;
    }
  };
  const { $ui: k_ } = app,
    S_ = {
      root: { width: "100%" },
      label: (e) => ({
        fontFamily: k_.font.primary,
        fontSize: 9,
        fontWeight: 600,
        lineHeight: "11px",
        color:
          e.error && e.error.hasError ? k_.color.error : k_.color.textPassive,
        marginBottom: 4,
        ...k_.transition.superfast,
        transitionProperty: "color",
      }),
      controls: { ...k_.relative() },
      leftControls: { ...k_.relative(), zIndex: 2 },
      marker: (e, t) => ({
        ...k_.absolute("0 . 0 0 10"),
        ...k_.transition.superfast,
        transitionProperty: "background-color",
        backgroundColor:
          e.error && e.error.hasError ? k_.color.error : k_.color.link,
        width: 0,
        ...((t.focus || (e.error && e.error.hasError)) && {
          width: 4,
          left: -4,
        }),
      }),
      input: (e) => ({
        ...k_.text.elementNormal,
        ...k_.padding("6 11"),
        color: k_.color.textNormal,
        lineHeight:
          e.lines && e.lines > 1 ? "22px" : k_.text.elementNormal.lineHeight,
        width: "100%",
        border: "none",
        background: "none",
        outline: "none",
        "::placeholder": { color: k_.color.textNormal, opacity: 0.5 },
        zIndex: 1,
        "\n      &[type=number]::-webkit-inner-spin-button,\n      &[type=number]::-webkit-outer-spin-button\n    ":
          { WebkitAppearance: "none", margin: 0 },
        ...e.inputStyle,
      }),
      icon: { paddingLeft: 4 },
      background: (e) => ({
        ...k_.absolute("0 0 0 0"),
        border: `1px solid ${k_.color.borderDark}`,
        background: k_.color.bgLight1,
        borderRadius: e.focus ? "0 4px 4px 0" : "4px 4px 4px 4px",
      }),
      rightControls: { ...k_.absolute(". 0 0 . 3") },
      button: (e, t) => ({
        ...k_.margin("0 1 1 0"),
        ...k_.padding("6 7 6 24"),
        ...k_.transition.superfast,
        transitionProperty: "opacity",
        borderRadius: "0 4px 4px 0",
        background: `linear-gradient(\n      to right,\n      transparent,\n      ${k_.color.bgLight1} 20px,\n      ${k_.color.bgLight1}\n    )`,
        opacity: 0,
        pointerEvents: "none",
        ...(t.hovered ? { opacity: 1, pointerEvents: "inherit" } : {}),
        ...e.buttonStyle,
      }),
      progress: {
        ...k_.margin("0 1 1 0"),
        ...k_.padding("7 8 7 10"),
        pointerEvents: "none",
        borderRadius: "0 4px 4px 0",
        background: `linear-gradient(\n      to right,\n      transparent,\n      ${k_.color.bgLight1} 20px,\n      ${k_.color.bgLight1}\n    )`,
      },
      info: (e, t) => ({
        ...k_.padding("g1 g1 g1 0"),
        visibility: t.hovered || !e.info.showOnHover ? "visible" : "hidden",
      }),
      error: {
        fontFamily: k_.font.primary,
        fontSize: 9,
        fontWeight: 500,
        lineHeight: "11px",
        color: k_.color.error,
        marginTop: 2,
      },
    };
  k_.Input = class extends k_.Component {
    constructor(e) {
      super(e),
        (this._onElementFocus = (e) => {
          this.setState({ focus: !0 }),
            this.props.onFocus && this.props.onFocus(e);
        }),
        (this._onElementChange = (e) => {
          let t = e.target.value;
          (this.props.regex && !this.props.regex.test(t)) ||
            ("number" === this.props.type && t.length && (t = Number(t)),
            this.props.onInput && this.props.onInput(t, e));
        }),
        (this._onElementBlur = (e) => {
          this.setState({ focus: !1 });
          let t = this.props.value;
          "number" === this.props.type && t.length && (t = Number(t)),
            this.props.onChange && this.props.onChange(t, e),
            this.props.onBlur && this.props.onBlur(e);
        }),
        (this._onKeyDown = (e) => {
          this.input &&
            this.input.current &&
            (("Enter" === e.key && !this.props.lines) || "Escape" === e.key) &&
            (this.input.current.blur(),
            this.props.onEnter && this.props.onEnter(e));
        }),
        (this.input = k_.createRef()),
        (this.state = { hovered: !1, focus: !1 });
    }
    render() {
      return Glamor.createElement(
        "label",
        C_(
          { css: [k_.column, S_.root, this.props.style] },
          k_.hoverState(this, "hovered")
        ),
        this._renderLabel(),
        Glamor.createElement(
          "div",
          {
            css: [
              S_.controls,
              this.props.disabled && k_.disabled,
              this.props.fixed && k_.disabledWithoutTransparency,
            ],
          },
          Glamor.createElement(
            "div",
            { css: [k_.row, k_.alignItems.center, S_.leftControls] },
            this._renderBackground(),
            this._renderMarker(),
            this._renderIcon(),
            this._renderInput()
          ),
          Glamor.createElement(
            "div",
            { css: [k_.row, k_.alignItems.end, S_.rightControls] },
            this._renderButton(),
            this._renderProgress(),
            this._renderInfo()
          )
        ),
        this._renderError()
      );
    }
    _renderMarker() {
      return Glamor.createElement("div", {
        css: S_.marker(this.props, this.state),
      });
    }
    _renderIcon() {
      return (
        this.props.icon &&
        Glamor.createElement(
          "div",
          { css: S_.icon },
          Glamor.createElement(k_.SvgIcon, this.props.icon)
        )
      );
    }
    _renderLabel() {
      return (
        this.props.label &&
        Glamor.createElement(
          "div",
          { css: S_.label(this.props) },
          this.props.label
        )
      );
    }
    _renderError() {
      return (
        this.props.error &&
        this.props.error.hasError &&
        this.props.error.message &&
        Glamor.createElement(
          "div",
          { css: [k_.row, k_.justifyContent.end, S_.error] },
          this.props.error.message
        )
      );
    }
    _renderInput() {
      return !this.props.lines || this.props.lines < 2
        ? Glamor.createElement(
            "input",
            C_(
              {
                ref: this.input,
                css: S_.input(this.props),
                placeholder: this.props.placeholder,
                value: this.props.value,
                onKeyDown: this._onKeyDown,
                onFocus: this._onElementFocus,
                onChange: this._onElementChange,
                onBlur: this._onElementBlur,
              },
              this._prepareInputAttributes()
            )
          )
        : Glamor.createElement(
            "textarea",
            C_(
              {
                ref: this.input,
                css: S_.input(this.props),
                rows: this.props.lines,
                placeholder: this.props.placeholder,
                value: this.props.value,
                onKeyDown: this._onKeyDown,
                onFocus: this._onElementFocus,
                onChange: this._onElementChange,
                onBlur: this._onElementBlur,
              },
              this._prepareInputAttributes()
            )
          );
    }
    _renderButton() {
      let { button: e } = this.props;
      return e && 0 !== e.length
        ? ((e = Array.isArray(e) ? e : [e]),
          Glamor.createElement(
            "div",
            {
              css: [
                k_.row,
                k_.alignItems.center,
                S_.button(this.props, this.state),
              ],
            },
            e.map((e, t) =>
              Glamor.createElement(
                k_.LinkButton,
                C_({ key: t }, e, { tabIndex: "-1" })
              )
            )
          ))
        : null;
    }
    _renderProgress() {
      if (!this.props.progress) return null;
      const e = { size: 16, thickness: 1, value: 60, ...this.props.progress };
      return (
        this.props.progress &&
        Glamor.createElement(
          "div",
          { css: S_.progress },
          Glamor.createElement(k_.ProgressRing, e)
        )
      );
    }
    _renderInfo() {
      return (
        this.props.info &&
        Glamor.createElement(
          "div",
          { css: S_.info(this.props, this.state) },
          Glamor.createElement(k_.InfoCircle, this.props.info)
        )
      );
    }
    _renderBackground() {
      return Glamor.createElement("div", { css: S_.background(this.state) });
    }
    _prepareInputAttributes() {
      const e = { ...this.props };
      return (
        (e.disabled = e.disabled || e.fixed),
        delete e.label,
        delete e.value,
        delete e.button,
        delete e.buttonStyle,
        delete e.progress,
        delete e.fixed,
        delete e.regex,
        delete e.icon,
        delete e.placeholder,
        delete e.lines,
        delete e.error,
        delete e.inputStyle,
        delete e.tooltip,
        delete e.onInput,
        delete e.onChange,
        delete e.onFocus,
        delete e.onBlur,
        delete e.onEnter,
        e
      );
    }
  };
  const { $ui: E_ } = app,
    __ = {
      root: {
        fontSize: 9,
        fontWeight: 600,
        lineHeight: "11px",
        color: E_.color.textPassive,
        marginBottom: E_.space.g0h,
      },
      rootNoMargin: { marginBottom: 0 },
    };
  function x_() {
    return (x_ =
      Object.assign ||
      function (e) {
        for (var t = 1; t < arguments.length; t++) {
          var r = arguments[t];
          for (var n in r)
            Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
        }
        return e;
      }).apply(this, arguments);
  }
  E_.Label = class extends E_.Component {
    render() {
      return Glamor.createElement(
        "div",
        {
          css: [
            __.root,
            this.props.noMargin && __.rootNoMargin,
            this.props.style,
          ],
        },
        this.props.children
      );
    }
  };
  const { $ui: P_ } = app,
    T_ = {
      root: { ...P_.InfoCircle.cssShowOnHover, ...P_.relative() },
      button: (e) => ({
        position: "relative",
        ...P_.text.group2,
        ...(e.disabled ? P_.disabled : {}),
        ...(e.small ? { fontSize: 12 } : {}),
        height: 18,
        lineHeight: "17px",
        color:
          e.color ||
          (e.cancel
            ? P_.color.textPassive
            : e.disabled
            ? P_.color.bgNeutral
            : P_.color.link),
        background: "none",
        border: "none",
        ...(e.onClick && { ...P_.clickable }),
      }),
      hitbox: (e) => ({
        ...P_.absolute("-8 -8 -8 -8"),
        ...(e.small && { ...P_.absolute("-4 -4 -4 -4") }),
        ...e.hitboxStyle,
      }),
      icon: (e) => ({
        marginRight: P_.space.g1,
        ...(e.label ? {} : { margin: 0 }),
      }),
    };
  P_.LinkButton = class extends P_.Component {
    constructor(e) {
      super(e),
        (this._onClick = (e) => {
          this.props.disabled ||
            (this.props.onClick && this.props.onClick(this.props, e));
        }),
        (this.state = { hovered: !1 });
    }
    render() {
      return this.props.label || this.props.icon
        ? Glamor.createElement(
            "div",
            x_(
              {
                css: [P_.row, P_.alignItems.center, T_.root, this.props.style],
                className: this.props.className,
              },
              P_.hoverState(this, "hovered")
            ),
            Glamor.createElement(
              "button",
              x_(
                {
                  type: "button",
                  css: [
                    P_.row,
                    P_.alignItems.center,
                    T_.button(this.props),
                    this.props.buttonStyle,
                  ],
                  tabIndex: this.props.tabIndex,
                  onClick: this._onClick,
                },
                P_.onLongPress(this.props.onLongPress, 2e3)
              ),
              this._renderHitbox(),
              this._renderIcon(),
              this._renderLabel()
            ),
            this._renderTooltip(),
            this._renderInfo()
          )
        : null;
    }
    _renderIcon() {
      return (
        this.props.icon &&
        Glamor.createElement(P_.SvgIcon, {
          style: T_.icon(this.props),
          name: this.props.icon,
        })
      );
    }
    _renderHitbox() {
      return Glamor.createElement("div", { css: T_.hitbox(this.props) });
    }
    _renderLabel() {
      return this.props.label;
    }
    _renderTooltip() {
      return this.props.tooltip
        ? Glamor.createElement(
            P_.Tooltip,
            x_({}, this.props.tooltip, { shown: this.state.hovered })
          )
        : null;
    }
    _renderInfo() {
      return this.props.info
        ? Glamor.createElement(
            P_.Fragment,
            null,
            Glamor.createElement(P_.Spacer, { width: "g2" }),
            Glamor.createElement(P_.InfoCircle, this.props.info)
          )
        : null;
    }
  };
  const { $ui: I_ } = app,
    G_ = {
      root: (e) => ({
        padding: "6px 0",
        backgroundColor: I_.color.bgLight3,
        maxHeight: e || null,
        overflowY: "auto",
        ...I_.shadow.sh6,
        ...I_.borderRadius.r4,
      }),
      item: { ...I_.relative() },
      itemEnabled: {
        cursor: "pointer",
        transition: "none",
        color: I_.color.textNormal,
        ":hover": {
          color: I_.color.textInversed,
          backgroundColor: I_.color.link,
        },
        ":active": {
          color: I_.color.textInversed,
          backgroundColor: I_.color.link,
        },
      },
      itemDisabled: {
        cursor: "default",
        filter: "none",
        color: I_.color.textNormal,
        backgroundColor: "initial",
        ...I_.disabled,
      },
      selectionIndicator: {
        ...I_.absolute("0 . 0 0"),
        width: 4,
        backgroundColor: I_.color.link,
      },
      label: { ...I_.padding("g0h g1h") },
    };
  (I_.Menu = class extends I_.Component {
    constructor(...e) {
      var t;
      return (
        (t = super(...e)),
        (this._onItemClick = (e) => {
          this.props.onChange && this.props.onChange(e);
        }),
        t
      );
    }
    render() {
      const e = this.props.items || [];
      if (0 === e.length) return null;
      const t = this._normalizeMaxHeight();
      return Glamor.createElement(
        "div",
        { css: [I_.column, G_.root(t)] },
        e.map((e, t) =>
          this.props.renderer
            ? this.props.renderer(e, t, this.props)
            : Glamor.createElement(I_.Menu.Item, {
                key: t,
                item: e,
                onClick: this._onItemClick,
              })
        )
      );
    }
    _normalizeMaxHeight() {
      let e = this.props.maxHeight;
      return (
        e &&
          ("string" == typeof e && e.endsWith("i")
            ? ((e = Number(e.substring(0, e.length - 1))), (e = 28 * e + 12))
            : (e = Number(e) || null)),
        e
      );
    }
  }),
    (I_.Menu.Item = class extends I_.Component {
      constructor(...e) {
        var t;
        return (
          (t = super(...e)),
          (this._onClick = () => {
            this.props.item.disabled || this.props.onClick(this.props.item);
          }),
          t
        );
      }
      render() {
        const e = this.props.item,
          t = e.disabled ? G_.itemDisabled : G_.itemEnabled,
          r =
            e.selected &&
            Glamor.createElement("div", { css: G_.selectionIndicator }),
          n = Glamor.createElement(
            "div",
            { css: [G_.label, I_.text.elementNormal, I_.text.nowrap] },
            e.label
          );
        return Glamor.createElement(
          "div",
          {
            css: [t, I_.row, I_.alignItems.stretch, G_.item],
            onClick: this._onClick,
          },
          r,
          n
        );
      }
    });
  const { $ui: D_ } = app,
    A_ = {
      thinSpace: { minWidth: "0.2em", height: "1px", display: "inline-block" },
    };
  var M_, F_;
  function R_() {
    return (R_ =
      Object.assign ||
      function (e) {
        for (var t = 1; t < arguments.length; t++) {
          var r = arguments[t];
          for (var n in r)
            Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
        }
        return e;
      }).apply(this, arguments);
  }
  D_.NumberRenderer = class extends D_.Component {
    render() {
      return "number" != typeof this.props.value
        ? null
        : this.props.short
        ? this._renderAsShortNumber()
        : this._renderWithThinSpaces();
    }
    _renderAsShortNumber() {
      return D_.toShortNumber(this.props.value);
    }
    _renderWithThinSpaces() {
      const e = this.props.value,
        t = Math.abs(e)
          .toString()
          .split("")
          .reverse()
          .join("")
          .replace(/(\d{3})(?!$)/g, "$1:")
          .split("")
          .reverse()
          .join("")
          .split(":");
      return Glamor.createElement(
        D_.Fragment,
        null,
        e < 0 ? "-" : "",
        t.map((e, t) =>
          Glamor.createElement(
            D_.Fragment,
            { key: t },
            t > 0 && Glamor.createElement("span", { css: A_.thinSpace }),
            e
          )
        )
      );
    }
  };
  const { $ui: L_ } = app,
    B_ = (e) => ({
      ...L_.text.nowrap,
      ...L_.text.hashtag,
      fontWeight: 600,
      ...(e.disabled ? L_.disabledWithoutTransparency : {}),
      ...L_.padding("4 g1 4 g1"),
      ...L_.borderRadius.r4,
      color: L_.theme.valueOf("day", L_.color.textInversed),
      backgroundColor: e.value
        ? e.selectColor
        : e.disabled
        ? L_.color.iconPassive
        : L_.color.bgNeutral,
      border: "none",
      ...(!e.disabled && !!e.onChange && { ...L_.clickable }),
    });
  L_.Pill =
    ((F_ = M_ =
      class extends L_.Component {
        constructor(e) {
          super(e),
            (this._onClick = () => {
              this.props.disabled ||
                (this.props.onChange && this.props.onChange(this.props));
            }),
            (this.state = { hovered: !1 });
        }
        render() {
          const { icon: e, label: t, style: r } = this.props,
            n = !!e,
            o = !!t;
          if (!n && !o) return null;
          const a = e && Glamor.createElement(L_.SvgIcon, { name: e }),
            i = n && o && Glamor.createElement(L_.Spacer, { width: "g1" });
          return Glamor.createElement(
            "button",
            R_(
              { css: [L_.row, L_.alignItems.center, B_(this.props), r] },
              L_.hoverState(this, "hovered"),
              { tabIndex: this.props.tabIndex, onClick: this._onClick }
            ),
            a,
            i,
            t,
            this._renderTooltip()
          );
        }
        _renderTooltip() {
          const e = this.props;
          return e.tooltip
            ? Glamor.createElement(
                L_.Tooltip,
                R_(
                  {
                    shown: this.state.hovered,
                    background: e.value ? e.selectColor : L_.color.iconPassive,
                  },
                  e.tooltip
                )
              )
            : null;
        }
      }),
    (M_.defaultProps = { selectColor: L_.color.link }),
    F_);
  const { $ui: O_ } = app,
    $_ = {
      root: (e) => ({
        ...O_.noselect,
        ...O_.shadow.sh6,
        ...O_.text.uppercase,
        ...O_.transition.fast,
        ...O_.padding("14 70 13 41"),
        ...O_.text.group1,
        ...(e.disabled ? O_.disabledWithoutTransparency : {}),
        transitionProperty: "box-shadow",
        color: O_.color.textNormal,
        background: O_.color.bgLight3,
        border: "none",
        borderRadius: 23,
        cursor: "pointer",
        position: "relative",
        "&:hover": { ...(e.disabled ? {} : O_.shadow.sh10) },
        "&:active": { ...(e.disabled ? {} : O_.shadow.sh4) },
      }),
      label: { flexGrow: 1 },
      goIcon: { ...O_.absolute("14 15"), color: O_.color.link },
    };
  var N_, U_;
  O_.SvgIcon.registerSvgIcons([
    '<symbol id="primary-button-go-icon" viewBox="0 0 18 18"><path d="M9,18a9,9,0,1,1,9-9A9.01,9.01,0,0,1,9,18ZM7.667,4h0L6,5.667,9.334,9,6,12.334,7.667,14l5-5-5-5Z" fill="currentColor"/></symbol>',
  ]),
    (O_.PrimaryButton = class extends O_.Component {
      constructor(...e) {
        var t;
        return (
          (t = super(...e)),
          (this._onClick = () => {
            this.props.onClick && this.props.onClick(this.props);
          }),
          t
        );
      }
      render() {
        const e = this.props;
        return Glamor.createElement(
          "button",
          {
            css: [O_.row, O_.alignItems.center, $_.root(e), e.style],
            tabIndex: e.tabIndex,
            onClick: this._onClick,
          },
          Glamor.createElement(
            "div",
            { css: [O_.row, O_.justifyContent.center, $_.label] },
            e.label
          ),
          Glamor.createElement(
            "div",
            { css: [$_.goIcon, e.iconStyle] },
            Glamor.createElement(O_.SvgIcon, { name: "primary-button-go-icon" })
          )
        );
      }
    });
  const { $ui: H_ } = app,
    z_ = {
      root: (e) => ({
        ...H_.relative(""),
        height: e.size,
        width: e.size,
        pointerEvents: "none",
      }),
      valueRing: (e) => ({
        ...H_.absolute("0 0 0 0"),
        ...(e.spinning && {
          animationName: H_.animation.spin,
          animationDuration: "1s",
          animationTimingFunction: "linear",
          animationIterationCount: "infinite",
        }),
      }),
      backgroundRing: {},
      circle: {
        transition: "stroke-dashoffset 0.3s",
        transform: "rotate(-90deg)",
        transformOrigin: "50% 50%",
      },
    };
  H_.ProgressRing =
    ((U_ = N_ =
      class extends H_.Component {
        render() {
          const {
            size: e,
            thickness: t,
            value: r,
            color: n,
            background: o,
            style: a,
          } = this.props;
          return Glamor.createElement(
            "div",
            { css: [z_.root(this.props), a] },
            Glamor.createElement(
              "div",
              { css: z_.backgroundRing },
              Glamor.createElement(j_, {
                color: o,
                size: e,
                thickness: t,
                value: 100,
              })
            ),
            Glamor.createElement(
              "div",
              { css: z_.valueRing(this.props) },
              Glamor.createElement(j_, {
                color: n,
                size: e,
                thickness: t,
                value: r,
              })
            )
          );
        }
      }),
    (N_.defaultProps = {
      size: 40,
      thickness: 2,
      value: 0,
      color: H_.theme.valueOf("day", H_.color.link),
      background: H_.color.borderDark,
      spinning: !1,
    }),
    U_);
  const j_ = ({ size: e, thickness: t, value: r, color: n }) => {
      const o = e / 2 - t / 2,
        a = 2 * o * Math.PI,
        i = a - (r / 100) * a;
      return Glamor.createElement(
        "svg",
        { height: e, width: e },
        Glamor.createElement("circle", {
          css: z_.circle,
          stroke: n,
          fill: "transparent",
          strokeWidth: t,
          strokeDasharray: a + " " + a,
          style: { strokeDashoffset: i },
          r: o,
          cx: e / 2,
          cy: e / 2,
        })
      );
    },
    { $ui: W_ } = app,
    V_ = {
      root: (e) => ({
        ...W_.clickable,
        ...W_.noselect,
        ...(e.disabled ? W_.disabledWithoutTransparency : {}),
        ...W_.InfoCircle.cssShowOnHover,
      }),
      label: { marginLeft: W_.space.g1, ...W_.text.elementNormal },
      icon: (e) => ({
        color: e.disabled ? W_.color.iconPassive : W_.color.link,
      }),
    };
  function q_() {
    return (q_ =
      Object.assign ||
      function (e) {
        for (var t = 1; t < arguments.length; t++) {
          var r = arguments[t];
          for (var n in r)
            Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
        }
        return e;
      }).apply(this, arguments);
  }
  W_.SvgIcon.registerSvgIcons([
    '<symbol id="radio-on" viewBox="0 0 24 24"><rect width="24" height="24" fill="none"/><path d="M12,7a5,5,0,1,0,5,5,4.951,4.951,0,0,0-5-5Zm0-5A10,10,0,1,0,22,12,10.029,10.029,0,0,0,12,2Zm0,18a8,8,0,1,1,8-8,8.024,8.024,0,0,1-8,8Z" fill="currentColor" fill-rule="evenodd"/></symbol>',
    '<symbol id="radio-off" viewBox="0 0 24 24"><rect width="24" height="24" fill="none"/><path d="M12,2A10,10,0,1,0,22,12,10.029,10.029,0,0,0,12,2Zm0,18a8,8,0,1,1,8-8,8.024,8.024,0,0,1-8,8Z" fill="currentColor" fill-rule="evenodd"/></symbol>',
  ]),
    (W_.Radio = class extends W_.Component {
      constructor(...e) {
        var t;
        return (
          (t = super(...e)),
          (this._onClick = () => {
            this.props.disabled ||
              (this.props.onChange && this.props.onChange(this.props));
          }),
          t
        );
      }
      render() {
        const e = this.props,
          t = Glamor.createElement(
            "div",
            { css: V_.icon(this.props) },
            Glamor.createElement(W_.SvgIcon, {
              name: e.value ? "radio-on" : "radio-off",
            })
          ),
          r =
            e.label && Glamor.createElement("div", { css: V_.label }, e.label),
          n =
            e.info &&
            Glamor.createElement(
              W_.Fragment,
              null,
              Glamor.createElement(W_.Spacer, { width: "g2" }),
              Glamor.createElement(W_.InfoCircle, e.info)
            );
        return Glamor.createElement(
          "div",
          {
            css: [
              W_.row,
              W_.justifyContent.between,
              W_.alignItems.center,
              V_.root(this.props),
              this.props.style,
            ],
            onClick: this._onClick,
          },
          Glamor.createElement(
            "div",
            { css: [W_.row, W_.alignItems.center] },
            t,
            r
          ),
          n
        );
      }
    });
  const { $ui: Z_ } = app,
    Y_ = { root: { "> div:not(:last-child)": { marginBottom: Z_.space.g1 } } };
  Z_.RadioGroup = class extends Z_.Component {
    render() {
      if (!this.props.items || 0 === this.props.items.length) return null;
      const e = this.props.items.map((e) => {
        const t = e.hasOwnProperty("id")
          ? e.id
          : e.hasOwnProperty("key")
          ? e.key
          : e.hasOwnProperty("name")
          ? e.name
          : e.hasOwnProperty("label")
          ? e.label
          : e;
        return {
          ...e,
          onChange: () => {
            this.props.onChange(e);
          },
          value: this.props.value === t,
        };
      });
      return Glamor.createElement(
        "div",
        { css: [Z_.column, Y_.root] },
        e.map((e, t) => Glamor.createElement(Z_.Radio, q_({ key: t }, e)))
      );
    }
  };
  const { $ui: Q_ } = app,
    K_ = {
      root: { width: "100%" },
      label: {
        textAlign: "right",
        marginBottom: Q_.space.g0h,
        ...Q_.text.label,
      },
    };
  Q_.RangeSelect = class extends Q_.Component {
    constructor(...e) {
      var t;
      return (
        (t = super(...e)),
        (this._onChange = (e) => {
          const t = this.props.options[e].value;
          this.props.onChange && this.props.onChange(t);
        }),
        t
      );
    }
    render() {
      return Glamor.createElement(
        "div",
        { css: K_.root },
        Glamor.createElement("div", { css: K_.label }, this._getLabel()),
        Glamor.createElement(Q_.Range, {
          value: this._getInputValue(),
          min: 0,
          max: this.props.options.length - 1,
          step: 1,
          onChange: this._onChange,
        })
      );
    }
    _getLabel() {
      return this.props.options.find(
        (e) => e.value === this.props.selectedOption
      ).label;
    }
    _getInputValue() {
      return this.props.options.findIndex(
        (e) => e.value === this.props.selectedOption
      );
    }
  };
  const { $ui: X_ } = app,
    J_ = {
      root: {
        width: "100%",
        height: 14,
        color: X_.color.link,
        ...X_.relative(),
      },
      track: { ...X_.absolute("5 0 . 0"), height: 4, borderRadius: 1 },
      extraValue: {
        ...X_.absolute("5 0 . 0"),
        opacity: 0.5,
        height: 4,
        background: "currentColor",
        borderRadius: "0 1px 1px 0",
      },
      input: {
        width: "100%",
        height: 4,
        appearance: "none",
        background: "transparent",
        cursor: "pointer",
        color: "currentColor",
        ...X_.absolute("5 0 . 0"),
        "&::-webkit-slider-thumb": {
          appearance: "none",
          width: 14,
          height: 14,
          background: "currentColor",
          borderRadius: "50%",
        },
      },
    };
  function ex() {
    return (ex =
      Object.assign ||
      function (e) {
        for (var t = 1; t < arguments.length; t++) {
          var r = arguments[t];
          for (var n in r)
            Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
        }
        return e;
      }).apply(this, arguments);
  }
  X_.Range = class extends X_.Component {
    constructor(...e) {
      var t;
      return (
        (t = super(...e)),
        (this.onChange = (e) => {
          if (!this.props.onChange) return;
          const t = e.target.valueAsNumber;
          this.props.onChange(t);
        }),
        t
      );
    }
    render() {
      return Glamor.createElement(
        "div",
        { css: [J_.root, this.props.style] },
        this.renderTrack(),
        this.renderExtraValue(),
        this.renderInput()
      );
    }
    renderTrack() {
      const e =
        ((this.props.value - this.props.min) /
          (this.props.max - this.props.min)) *
        100;
      return Glamor.createElement("div", {
        css: J_.track,
        style: {
          background: `linear-gradient(\n            to right,\n            currentColor ${e}%,\n            ${X_.color.iconPassive} ${e}%\n          )`,
        },
      });
    }
    renderExtraValue() {
      if (!this.props.extraValue) return null;
      if (this.props.extraValue < this.props.value) return null;
      const e = (this.props.max - this.props.min) / this.props.step,
        t = `calc((100% - ${e + 1} * 14px) / ${e} + 14px)`,
        r = this.props.value / this.props.step,
        n = Math.min(this.props.max, this.props.extraValue) / this.props.step,
        o = Math.ceil(n) === e;
      return Glamor.createElement("div", {
        css: J_.extraValue,
        style: {
          left: `calc(7px + ${r} * ${t})`,
          width: `calc(\n            ${n - r} * ${t} +\n            ${
            o ? 7 : 0
          }px\n          )`,
        },
      });
    }
    renderInput() {
      return Glamor.createElement("input", {
        css: J_.input,
        type: "range",
        value: this.props.value,
        min: this.props.min,
        max: this.props.max,
        step: this.props.step,
        onChange: this.onChange,
      });
    }
  };
  const { $ui: tx } = app,
    rx = ({ props: e }) => ({
      ...tx.alignItems.center,
      ...tx.justifyContent.center,
      ...tx.shadow.sh6,
      ...tx.transition.fast,
      width: e.size || tx.space.g5,
      height: e.size || tx.space.g5,
      color: e.color || tx.color.dark,
      background: tx.color.bgLight3,
      border: "none",
      borderRadius: "50%",
      cursor: "pointer",
      transitionProperty: "transform, box-shadow",
      position: "relative",
      zIndex: 1,
      "&:hover": { ...tx.shadow.sh10 },
      "&:active": { ...tx.shadow.sh4 },
      ...(e.flat && {
        boxShadow: "none !important",
        transformOrigin: "center",
        background: "transparent",
        "&:hover": { transform: "scale(1.1)" },
        "&:active": { transform: "scale(0.95)" },
      }),
    });
  var nx, ox;
  tx.RoundButton = class extends tx.Component {
    constructor(...e) {
      var t;
      return (
        (t = super(...e)),
        (this._onClick = () => {
          this.props.onClick && this.props.onClick(this.props);
        }),
        t
      );
    }
    render() {
      return Glamor.createElement(
        "button",
        ex(
          { css: [tx.row, rx(this), this.props.style], onClick: this._onClick },
          tx.onLongPress(this.props.onLongPress)
        ),
        this._renderIcon()
      );
    }
    _renderIcon() {
      return this.props.icon
        ? Glamor.createElement(tx.SvgIcon, { name: this.props.icon })
        : this.props.image
        ? Glamor.createElement(tx.Image, { src: this.props.image })
        : null;
    }
  };
  const { $ui: ax } = app,
    ix = (e) => {
      if ("string" == typeof e) {
        if (e.startsWith("g")) {
          if ("g0" === e) return "var(--g0)";
          if ("g0h" === e) return "var(--g0h)";
          if ("g1" === e) return "var(--g1)";
          if ("g1h" === e) return "var(--g1h)";
          if ("g2" === e) return "var(--g2)";
          if ("g3" === e) return "var(--g3)";
          if ("g5" === e) return "var(--g5)";
        }
        return e;
      }
      return `${e || 0}px`;
    },
    sx = (e) => ({
      flex: "0 0 auto",
      minWidth: 1,
      minHeight: 1,
      visibility: "hidden",
      width: ix(e.width),
      height: ix(e.height),
      ...(e.grow ? { flexGrow: 1 } : {}),
      ...e.style,
    });
  var lx, cx;
  ax.Spacer =
    ((ox = nx =
      class extends ax.Component {
        render() {
          return Glamor.createElement("div", { css: sx(this.props) });
        }
      }),
    (nx.defaultProps = { width: 0, height: 0 }),
    ox);
  const { $ui: ux } = app,
    dx = {
      root: { ...ux.row, maxWidth: 490, color: ux.color.textNormal },
      icon: ({ props: e }) => ({
        ...ux.row,
        ...ux.justifyContent.center,
        flexShrink: 0,
        marginRight: ux.space.g2,
        color: e.iconColor,
        ...(e.label &&
          !e.narrow && {
            marginTop: 15,
            ...(!!e.progress && { marginTop: 17 }),
          }),
      }),
      svgIcon: { height: 32, width: 32 },
      content: {},
      header: ({ props: e }) => ({
        ...ux.row,
        ...ux.alignItems.center,
        marginBottom: ux.space.g1h,
        ...(!e.title && { display: "none" }),
      }),
      headerText: {},
      body: {},
      label: {
        marginBottom: 4,
        ...ux.text.of({
          size: 9,
          height: "11px",
          weight: 600,
          color: ux.color.textPassive,
        }),
      },
      title: { ...ux.text.group1 },
      text: {
        ...ux.text.contentText,
        "&:not(:last-child)": { marginBottom: ux.space.g2 },
      },
      paragraph: { "&:not(:last-child)": { marginBottom: ux.space.g1 } },
      buttons: { ...ux.row, ...ux.text.nowrap },
      button: { "&:not(:last-child)": { marginRight: ux.space.g3 } },
    };
  ux.StatusPanel =
    ((cx = lx =
      class extends ux.Component {
        render() {
          return Glamor.createElement(
            "div",
            { css: [dx.root, this.props.style] },
            !this.props.narrow && this._renderIcon(),
            this._renderContent()
          );
        }
        _renderIcon() {
          const e = this.props.icon,
            t = this.props.progress;
          return Glamor.createElement(
            "div",
            { css: dx.icon(this) },
            !(!e || t) &&
              Glamor.createElement(ux.SvgIcon, { style: dx.svgIcon, name: e }),
            !!t && Glamor.createElement(ux.ProgressRing, { size: 32, ...t })
          );
        }
        _renderContent() {
          const e = this.props.text ? [].concat(this.props.text) : [],
            t = this.props.buttons || [];
          return Glamor.createElement(
            "div",
            { css: dx.content },
            Glamor.createElement(
              "div",
              { css: dx.header(this) },
              this.props.narrow && this._renderIcon(),
              Glamor.createElement(
                "div",
                { css: dx.headerText },
                !!this.props.label &&
                  Glamor.createElement(
                    "div",
                    { css: [dx.label, this.props.labelStyle] },
                    this.props.label
                  ),
                !!this.props.title &&
                  Glamor.createElement(
                    "div",
                    { css: [dx.title, this.props.titleStyle] },
                    this.props.title
                  )
              )
            ),
            Glamor.createElement(
              "div",
              { css: dx.body },
              e.length > 0 &&
                Glamor.createElement(
                  "div",
                  { css: [dx.text, this.props.textStyle] },
                  e.map(this._renderParagraph)
                ),
              t.length > 0 &&
                Glamor.createElement(
                  "div",
                  { css: dx.buttons },
                  this.props.buttons.map(this._renderButton)
                )
            )
          );
        }
        _renderParagraph(e, t) {
          return Glamor.createElement("div", { css: dx.paragraph, key: t }, e);
        }
        _renderButton(e, t) {
          return Glamor.createElement(
            "div",
            { css: dx.button, key: t },
            Glamor.createElement(ux.LinkButton, e)
          );
        }
      }),
    (lx.defaultProps = {
      icon: "warning-triangle-large",
      iconColor: ux.color.attention,
    }),
    cx);
  const { $ui: hx } = app,
    px = {
      root: (e) => ({
        ...hx.relative(),
        ...(e.disabled ? hx.disabled : hx.clickable),
        ...hx.noselect,
      }),
      thumb: (e) => ({
        ...hx.row,
        ...hx.alignItems.center,
        ...hx.justifyContent.center,
        ...hx.absolute(`. . . ${e.value ? 28 : 9} 1`),
        ...hx.transition.superfast,
        transitionProperty: "left, background-color",
        width: 20,
        height: 20,
        boxShadow: "0 2px 2px rgba(0, 0, 0, 0.24)",
        borderRadius: "50%",
        backgroundColor: e.value ? hx.color.link : hx.color.bgNeutral,
      }),
      track: {
        ...hx.margin("8 10 8 12"),
        backgroundColor: hx.color.iconActionable,
        opacity: 0.3,
        width: 34,
        height: 14,
        borderRadius: 7,
      },
      label: { ...hx.text.elementNormal },
    };
  hx.Switch = class extends hx.Component {
    constructor(...e) {
      var t;
      return (
        (t = super(...e)),
        (this._onClick = () => {
          this.props.disabled ||
            (this.props.onChange && this.props.onChange(this.props));
        }),
        t
      );
    }
    render() {
      return Glamor.createElement(
        "div",
        {
          css: [hx.row, hx.alignItems.center, px.root(this.props)],
          onClick: this._onClick,
        },
        Glamor.createElement("div", { css: px.track }),
        Glamor.createElement(
          "div",
          { css: px.thumb(this.props) },
          this.props.icon || null
        ),
        Glamor.createElement("div", { css: px.label }, this.props.label)
      );
    }
  };
  const { $ui: mx } = app,
    gx = {
      root: {},
      tab: ({ selectedTabId: e }, t, r) => ({
        ...mx.row,
        ...mx.alignItems.center,
        ...mx.margin(". g3 . ."),
        ...mx.padding(". . 10 ."),
        ...mx.text.group2,
        ...(!r && mx.clickable),
        ...(r && mx.disabled),
        ...mx.noselect,
        ...mx.relative(),
        "&:last-child": { marginRight: 0 },
        ...(e === t && {
          "&::before": {
            content: '""',
            ...mx.absolute(". . 0 0"),
            width: 48,
            height: 2,
            background: mx.color.link,
          },
        }),
      }),
    };
  var fx, vx, bx;
  function yx() {
    return (yx =
      Object.assign ||
      function (e) {
        for (var t = 1; t < arguments.length; t++) {
          var r = arguments[t];
          for (var n in r)
            Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
        }
        return e;
      }).apply(this, arguments);
  }
  mx.TabBar = class extends mx.Component {
    constructor(...e) {
      var t;
      return (
        (t = super(...e)),
        (this._onTabClick = (e) => {
          const { onTabClick: t, tabs: r } = this.props;
          if (!t) return;
          let n = r[e.currentTarget.dataset.index];
          "string" == typeof n && (n = { id: n, label: n.toUpperCase() }),
            this.props.onTabClick(n);
        }),
        t
      );
    }
    render() {
      const { tabs: e, style: t } = this.props;
      return e
        ? Glamor.createElement(
            "div",
            { css: [mx.row, gx.root, t] },
            e.map((e, t) => {
              let r = e,
                n = e,
                o = null,
                a = !1;
              return (
                "string" != typeof e &&
                  ((r = e.id),
                  (n = e.label || e.id.toUpperCase() || ""),
                  (a = e.disabled),
                  (o = e.tooltip || null)),
                Glamor.createElement(
                  "div",
                  {
                    key: r,
                    css: gx.tab(this.props, r, a),
                    "data-index": t,
                    onClick: a ? null : this._onTabClick,
                  },
                  n,
                  !!o &&
                    Glamor.createElement(
                      mx.Fragment,
                      null,
                      Glamor.createElement(mx.Spacer, { width: "g1" }),
                      Glamor.createElement(mx.InfoCircle, {
                        mini: !0,
                        tooltip: o,
                      })
                    )
                )
              );
            })
          )
        : null;
    }
  };
  const { $ui: wx } = app,
    Cx = {
      root: { width: "100%", ...wx.relative() },
      table: { width: "100%", borderCollapse: "collapse" },
      head: (e) => ({ visibility: e.noHead ? "collapse" : "visible" }),
      headCell: (e, t) => ({
        ...wx.padding("0 g5 g1 0"),
        ...wx.text.nowrap,
        ...wx.noselect,
        fontFamily: wx.font.primary,
        fontSize: 10,
        lineHeight: "13px",
        fontWeight: "500",
        textAlign: "left",
        color: wx.color.textPassive,
        ...("width" in e ? { width: e.width } : {}),
        ...("minWidth" in e ? { minWidth: e.minWidth } : {}),
        ...(e.info && !e.info.fixed ? wx.InfoCircle.cssShowOnHover : {}),
        ...(e.onSortClick ? wx.clickable : {}),
        ...t.headCellStyle,
      }),
      headCellContent: { ...wx.relative(), minHeight: 14 },
      sortArrow: (e) => ({
        ...wx.absolute("5 . . -12"),
        width: 0,
        height: 0,
        borderLeft: "4px solid transparent",
        borderRight: "4px solid transparent",
        borderTop:
          "descending" === e ? `4px solid ${wx.color.textPassive}` : null,
        borderBottom:
          "ascending" === e ? `4px solid ${wx.color.textPassive}` : null,
      }),
      info: { marginLeft: wx.space.g1 },
      bodyRow: (e) => ({
        borderBottom: `1px solid ${wx.color.borderDark}`,
        "&:first-child": { borderTop: "1px solid transparent" },
        ...(e.minRowHeight ? { height: e.minRowHeight } : {}),
        ...e.rowStyle,
      }),
      emptyRow: (e) => ({ height: e.minRowHeight || 45 }),
      bodyCell: (e) => ({
        ...wx.padding("g1h g5 g1h 0"),
        ...wx.text.elementNormal,
        ...e.bodyCellStyle,
      }),
      pagination: {
        ...wx.row,
        ...wx.alignItems.center,
        ...wx.justifyContent.end,
        ...wx.text.tooltipText,
        marginTop: wx.space.g1h,
        color: wx.color.textNormal,
        height: 18,
      },
      paginationButton: {
        width: 18,
        height: 18,
        position: "relative",
        border: "none",
        color: wx.color.link,
        background: "transparent",
        cursor: "pointer",
        "&:disabled": { cursor: "default", color: wx.color.iconPassive },
        "&::after": {
          content: "''",
          borderRadius: "50%",
          background: wx.color.link,
          opacity: 0,
          ...wx.absolute("1 1 1 1"),
        },
        "&:hover:not(:disabled)::after": { opacity: 0.07 },
        "&:active:not(:disabled)::after": { opacity: 0.14 },
        "&::before": { content: "''", ...wx.absolute("-4 -4 -4 -4") },
      },
      paginationButtonPrev: { transform: "scaleX(-1)" },
      noDataOverlay: {
        ...wx.row,
        ...wx.center,
        ...wx.absolute("25 0 0 0"),
        ...wx.noDataGradient,
        fontSize: 14,
      },
    },
    kx = "table.next",
    Sx = "table.forward";
  wx.SvgIcon.registerSvgIcons([
    `<symbol id="${kx}" viewBox="0 0 18 18"><g transform="translate(.75 .75)" fill="none" stroke="currentColor"><circle cx="8.25" cy="8.25" r="8.25" stroke="none"/><circle cx="8.25" cy="8.25" r="7.75" fill="none"/></g><path d="M7.5 4.5L6.45 5.55 9.9 9l-3.45 3.45L7.5 13.5 12 9z" fill="currentColor"/><path d="M0 0h18v18H0z" fill="none"/></symbol>`,
    `<symbol id="${Sx}" viewBox="0 0 18 18"><g transform="translate(.75 .75)" fill="none" stroke="currentColor"><circle cx="8.25" cy="8.25" r="8.25" stroke="none"/><circle cx="8.25" cy="8.25" r="7.75" fill="none"/></g><path d="M5.5 4.5L4.45 5.55 7.9 9l-3.45 3.45L5.5 13.5 10 9z" fill="currentColor"/><path d="M9.5 4.5L8.45 5.55 11.9 9l-3.45 3.45L9.5 13.5 14 9z" fill="currentColor"/><path d="M0 0h18v18H0z" fill="none"/></symbol>`,
  ]),
    (wx.Table =
      ((vx = fx =
        class extends wx.Component {
          constructor(e) {
            super(e),
              bx.call(this),
              (this._clickPrevented = !1),
              (this.state = {});
          }
          static getDerivedStateFromProps(e, t) {
            const r = !(!("skip" in e) && !e.onSkipChange);
            let n = r ? e.skip || 0 : t.skip || 0,
              o = "pageSize" in e ? e.pageSize : wx.Table.defaultPageSize;
            o = Math.min(Math.max(1, o), e.data.length);
            const a = e.data.length - 1;
            let i = n,
              s = Math.min(n + o - 1, a);
            !r && i > s && ((n -= o), (i = n), (s = Math.min(n + o - 1, a)));
            return {
              isControlled: r,
              skip: n,
              pageSize: o,
              pageData: e.data.slice(i, s + 1),
              lastIndex: a,
              viewStartIndex: i,
              viewEndIndex: s,
            };
          }
          shouldComponentUpdate(e, t) {
            return !_.isEqual(
              { state: this.state, ...this.props, data: null },
              { state: t, ...e, data: null }
            );
          }
          render() {
            return Glamor.createElement(
              "div",
              {
                css: [Cx.root, this.props.style],
                className: this.props.className,
              },
              Glamor.createElement(
                "table",
                { css: Cx.table },
                this._renderHead(),
                this._renderBody()
              ),
              this._renderPagination(),
              this._renderNoDataOverlay()
            );
          }
          _renderHead() {
            return Glamor.createElement(
              "thead",
              { css: Cx.head(this.props) },
              Glamor.createElement(
                "tr",
                null,
                this.props.columns.map((e, t) =>
                  Glamor.createElement(
                    "th",
                    {
                      key: e.id || t,
                      "data-index": t,
                      css: Cx.headCell(e, this.props),
                      onClick: this._onSortClick,
                    },
                    Glamor.createElement(
                      "div",
                      {
                        css: [wx.row, wx.alignItems.center, Cx.headCellContent],
                      },
                      e.sort &&
                        Glamor.createElement("div", {
                          css: Cx.sortArrow(e.sort),
                        }),
                      e.label,
                      e.info &&
                        Glamor.createElement(
                          "div",
                          { css: [wx.row, Cx.info] },
                          Glamor.createElement(
                            wx.InfoCircle,
                            yx({ mini: !0 }, e.info)
                          )
                        )
                    )
                  )
                )
              )
            );
          }
          _renderBody() {
            const e = this.props,
              t = this.state,
              r = e.minRowCount || 0,
              n = Math.max(r, t.pageSize) - t.pageData.length,
              o = Array.from(new Array(n)),
              a = { ...this.props, data: null };
            return Glamor.createElement(
              "tbody",
              { onMouseLeave: e.onRowHover ? this._onMouseLeave : null },
              t.pageData.map((e, r) =>
                Glamor.createElement(Ex, {
                  rowIndex: r,
                  dataItem: e,
                  tableProps: a,
                  tableState: this.state,
                  key: e.id || t.viewStartIndex + r,
                })
              ),
              o.map((r, n) =>
                Glamor.createElement(
                  "tr",
                  {
                    css: [Cx.bodyRow(e), Cx.emptyRow(e)],
                    key: t.viewStartIndex + n,
                    onMouseEnter: e.onRowHover ? this._onMouseLeave : null,
                  },
                  Glamor.createElement("td", { colSpan: e.columns.length })
                )
              )
            );
          }
          _renderPagination() {
            const e = this.props,
              t = this.state;
            if (t.pageSize >= e.data.length)
              return Glamor.createElement("div", {
                css: [Cx.pagination, e.paginatorStyle],
              });
            const r = Math.ceil(e.data.length / t.pageSize);
            return Glamor.createElement(
              "div",
              { css: [Cx.pagination, e.paginatorStyle] },
              t.viewStartIndex + 1,
              "-",
              t.viewEndIndex + 1,
              " of",
              " ",
              e.data.length,
              Glamor.createElement(wx.Spacer, { width: "g2" }),
              Glamor.createElement(
                "button",
                {
                  css: [Cx.paginationButton, Cx.paginationButtonPrev],
                  onMouseDown: this._onPrevPageMouseDown,
                  onClick: this._onPrevPageClick,
                  disabled: 0 === t.viewStartIndex,
                },
                Glamor.createElement(wx.SvgIcon, { name: kx })
              ),
              Glamor.createElement(wx.Spacer, { width: "6" }),
              Glamor.createElement(
                "button",
                {
                  css: Cx.paginationButton,
                  onMouseDown: this._onNextPageMouseDown,
                  onClick: this._onNextPageClick,
                  disabled: t.viewEndIndex === t.lastIndex,
                },
                Glamor.createElement(wx.SvgIcon, { name: kx })
              ),
              r > 2 &&
                Glamor.createElement(
                  wx.Fragment,
                  null,
                  Glamor.createElement(wx.Spacer, { width: "g2" }),
                  Glamor.createElement(
                    "button",
                    {
                      css: [Cx.paginationButton, Cx.paginationButtonPrev],
                      onMouseDown: this._onBackwardMouseDown,
                      onClick: this._onBackwardClick,
                      disabled: 0 === t.viewStartIndex,
                    },
                    Glamor.createElement(wx.SvgIcon, { name: Sx })
                  ),
                  Glamor.createElement(wx.Spacer, { width: "6" }),
                  Glamor.createElement(
                    "button",
                    {
                      css: Cx.paginationButton,
                      onMouseDown: this._onForwardMouseDown,
                      onClick: this._onForwardClick,
                      disabled: t.viewEndIndex === t.lastIndex,
                    },
                    Glamor.createElement(wx.SvgIcon, { name: Sx })
                  )
                )
            );
          }
          _renderNoDataOverlay() {
            return this.state.pageData.length > 0
              ? null
              : this.props.minRowCount
              ? Glamor.createElement(
                  "div",
                  { css: Cx.noDataOverlay },
                  this.props.noDataMessage
                )
              : null;
          }
          _normalizeSkip(e) {
            return Math.min(Math.max(0, e), this.props.data.length - 1);
          }
          _getPageSize() {
            const e = this.props,
              t = "pageSize" in e ? e.pageSize : this.defaultPageSize;
            return Math.min(Math.max(1, t), e.data.length);
          }
          _goPrevPage() {
            const e = this.state,
              t = this._normalizeSkip(e.skip - e.pageSize);
            this._setSkip(t);
          }
          _goBackward() {
            const e = this.state,
              t = this._normalizeSkip(e.skip - 10 * e.pageSize);
            this._setSkip(t);
          }
          _goNextPage() {
            const e = this.state,
              t = this._normalizeSkip(e.skip + e.pageSize);
            this._setSkip(t);
          }
          _goForward() {
            const e = this.state,
              t = this._normalizeSkip(e.skip + 10 * e.pageSize);
            this._setSkip(t);
          }
          _setSkip(e) {
            if (this.state.isControlled) {
              if (!this.props.onSkipChange) return;
              this.props.onSkipChange(e);
            } else this.setState({ skip: e });
          }
        }),
      (fx.defaultPageSize = 100),
      (bx = function () {
        (this._onPrevPageMouseDown = () => {
          this._goPrevPage(), (this._clickPrevented = !0);
        }),
          (this._onNextPageMouseDown = () => {
            this._goNextPage(), (this._clickPrevented = !0);
          }),
          (this._onPrevPageClick = () => {
            this._clickPrevented
              ? (this._clickPrevented = !1)
              : this._goPrevPage();
          }),
          (this._onNextPageClick = () => {
            this._clickPrevented
              ? (this._clickPrevented = !1)
              : this._goNextPage();
          }),
          (this._onBackwardMouseDown = () => {
            this._goBackward(), (this._clickPrevented = !0);
          }),
          (this._onForwardMouseDown = () => {
            this._goForward(), (this._clickPrevented = !0);
          }),
          (this._onBackwardClick = () => {
            this._clickPrevented
              ? (this._clickPrevented = !1)
              : this._goBackward();
          }),
          (this._onForwardClick = () => {
            this._clickPrevented
              ? (this._clickPrevented = !1)
              : this._goForward();
          }),
          (this._onSortClick = (e) => {
            if (
              !(
                e &&
                e.currentTarget &&
                e.currentTarget.dataset &&
                e.currentTarget.dataset.index
              )
            )
              return;
            const t = Number(e.currentTarget.dataset.index),
              r = this.props.columns[t];
            r && r.onSortClick && r.onSortClick(r, t);
          }),
          (this._onMouseLeave = () => {
            this.props.onRowHover(null);
          });
      }),
      vx));
  class Ex extends wx.Component {
    constructor(e) {
      super(e),
        _x.call(this),
        (this._rootRef = wx.createRef()),
        (this._io = null),
        (this.state = { visible: !e.tableProps.renderOnlyVisibleRows });
    }
    componentDidMount() {
      if (!this.props.tableProps.renderOnlyVisibleRows) return;
      const e = this._rootRef.current;
      let t = e;
      for (; (t = t.parentElement), t; ) {
        if ("auto" === getComputedStyle(t).overflow) break;
      }
      const r = { root: t, rootMargin: "10000px 10000px 150px", threshold: 1 };
      (this._io = new IntersectionObserver((e) => {
        this.setState({ visible: e[0].isIntersecting });
      }, r)),
        this._io.observe(e);
    }
    componentWillUnmount() {
      this._io && this._io.disconnect();
    }
    render() {
      const e = this.props,
        { tableProps: t, tableState: r } = e;
      return Glamor.createElement(
        "tr",
        {
          css: Cx.bodyRow(e.tableProps),
          ref: this._rootRef,
          key: r.viewStartIndex + e.rowIndex,
          onMouseEnter: t.onRowHover ? this._onMouseEnter : null,
          onClick: t.onRowClick ? this._onClick : null,
        },
        this._renderContent()
      );
    }
    _renderContent() {
      const e = this.props;
      return this.state.visible
        ? Glamor.createElement(
            wx.Fragment,
            null,
            e.tableProps.columns.map((t, r) =>
              Glamor.createElement(
                "td",
                {
                  css: Cx.bodyCell(e.tableProps),
                  key: `${e.tableState.viewStartIndex + e.rowIndex}:${r}`,
                },
                t.render.call(null, e.dataItem)
              )
            )
          )
        : Glamor.createElement("td", { colSpan: e.tableProps.columns.length });
    }
  }
  var _x = function () {
    (this._onMouseEnter = () => {
      const e = this.props;
      e.tableProps.onRowHover(e.dataItem);
    }),
      (this._onClick = () => {
        const e = this.props;
        e.tableProps.onRowClick(e.dataItem);
      });
  };
  function xx() {
    return (xx =
      Object.assign ||
      function (e) {
        for (var t = 1; t < arguments.length; t++) {
          var r = arguments[t];
          for (var n in r)
            Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
        }
        return e;
      }).apply(this, arguments);
  }
  const { $ui: Px } = app,
    Tx = {
      root: { ...Px.relative() },
      colon: ({ props: e }) => ({
        ...Px.absolute("6 . . 31"),
        content: ":",
        fontSize: 14,
        fontWeight: 500,
        lineHeight: "18px",
        color: Px.color.textNormal,
        zIndex: 2,
        ...(!!e.label && { top: 21 }),
      }),
      input: { fontFamily: Px.font.monospace },
      underscores: ({ props: e }) => ({
        ...Px.absolute("24 . . 11"),
        ...Px.row,
        lineHeight: "18px",
        zIndex: 2,
        ...(!!e.label && { top: 39 }),
      }),
      underscore: (e) => ({
        ...Px.absolute(),
        width: 8,
        height: 1,
        background: Px.color.textBleak,
        "&:nth-child(2)": { left: 9 },
        "&:nth-child(3)": { left: 27 },
        "&:nth-child(4)": { left: 36 },
        ...(!e && { display: "none" }),
      }),
    };
  function Ix() {
    return (Ix =
      Object.assign ||
      function (e) {
        for (var t = 1; t < arguments.length; t++) {
          var r = arguments[t];
          for (var n in r)
            Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
        }
        return e;
      }).apply(this, arguments);
  }
  Px.TimeInput = class extends Px.Component {
    constructor(e) {
      super(e),
        (this._onInput = (e) => {
          this.props.onInput && this.props.onInput();
          const t = this.inputRef.current.input.current,
            [r, n] = [t.selectionStart, t.selectionEnd].map((t) => {
              const r = this._clean(e.slice(0, t)).findIndex(
                (e) => e === this._slot
              );
              return r < 0
                ? this._prev[this._prev.length - 1]
                : this._back
                ? this._prev[r - 1] || this._first
                : r;
            });
          this.setState({ value: this._clean(e).join("") }),
            (this._back = !1),
            requestAnimationFrame(() => {
              t.setSelectionRange(r, n);
            });
        }),
        (this._onKeyDown = (e) => {
          this._back = "Backspace" === e.key;
        }),
        (this._onFocus = () => {
          const e = this.state.value.indexOf(this._slot);
          if (-1 === e) return;
          const t = this.inputRef.current.input.current;
          requestAnimationFrame(() => {
            t.setSelectionRange(e, e);
          });
        }),
        (this._onBlur = () => {
          this.state.value === this._pattern && this.setState({ value: "" });
        });
      const t = "‚ÄÇ";
      if (
        ((this._pattern = "‚ÄÇ‚ÄÇ ‚ÄÇ‚ÄÇ"),
        (this._slot = t),
        (this._prev = ((e) =>
          Array.from(this._pattern, (t, r) =>
            t === this._slot ? (e = r + 1) : e
          ))(0)),
        (this._first = Array.from(this._pattern).findIndex(
          (e) => e === this._slot
        )),
        (this._back = !1),
        (this.inputRef = Px.createRef()),
        "number" == typeof e.time)
      ) {
        let t = e.time / 1e3 / 60;
        const r = Math.floor(t / 60);
        t = Math.floor(t - 60 * r);
        const n = r.toString().padStart(2, "0"),
          o = t.toString().padStart(2, "0");
        this.state = { value: `${n} ${o}` };
      } else this.state = { value: "" };
    }
    componentDidUpdate(e, t) {
      if (
        (e.time && !this.props.time && this.setState({ value: "" }),
        "number" == typeof this.props.time && this.props.time !== e.time)
      ) {
        let e = this.props.time / 1e3 / 60;
        const t = Math.floor(e / 60);
        e = Math.floor(e - 60 * t);
        const r = t.toString().padStart(2, "0"),
          n = e.toString().padStart(2, "0");
        this.setState({ value: `${r} ${n}` });
      }
      if (this.state.value === t.value) return;
      const r = this.state.value.replace(/\D/g, "");
      if (r.length < 4)
        return void (this.props.onChange && this.props.onChange(null));
      let n = 0;
      (n += 60 * Number(r.slice(0, 2)) * 60 * 1e3),
        (n += 60 * Number(r.slice(2, 4)) * 1e3),
        this.props.onChange && this.props.onChange(n);
    }
    render() {
      return Glamor.createElement(
        "div",
        { css: Tx.root },
        Glamor.createElement(
          Px.Input,
          xx(
            {
              style: Tx.input,
              label: this.props.label,
              value: this.state.value,
              error: this.props.error,
              onInput: this._onInput,
              onKeyDown: this._onKeyDown,
              onBlur: this._onBlur,
              onFocus: this._onFocus,
            },
            this.props.inputAttrs || {},
            { ref: this.inputRef }
          )
        ),
        Glamor.createElement("div", { css: Tx.colon(this) }, ":"),
        this._renderUnderscores()
      );
    }
    _clean(e) {
      let t = e.match(/\d/g) || [];
      if (4 === t.length) {
        const [e, r, n, o] = t,
          a = Number(`${e}${r}`),
          i = Number(`${n}${o}`);
        60 * a + i > 1439
          ? (t = ["2", "3", "5", "9"])
          : i > 59 && (t = [e, r, "5", "9"]);
      }
      return Array.from(
        this._pattern,
        (e) => ((t[0] === e || e === this._slot) && t.shift()) || e
      );
    }
    _renderUnderscores() {
      const e = 4 - this.state.value.replace(/\D/g, "").length;
      return Glamor.createElement(
        "div",
        { css: Tx.underscores(this) },
        Glamor.createElement("div", { css: Tx.underscore(4 === e) }),
        Glamor.createElement("div", { css: Tx.underscore(e >= 3) }),
        Glamor.createElement("div", { css: Tx.underscore(e >= 2) }),
        Glamor.createElement("div", { css: Tx.underscore(e >= 1) })
      );
    }
  };
  const { $ui: Gx } = app,
    Dx = { root: { ...Gx.absolute("0 0 0 0 100"), pointerEvents: "none" } };
  Gx.TooltipContainer = class extends Gx.Component {
    constructor(e) {
      super(e), (this.state = { tooltips: [] });
    }
    componentDidMount() {
      Gx.tooltipController.registerContainer(this);
    }
    componentWillUnmount() {
      Gx.tooltipController.unregisterContainer(this);
    }
    render() {
      return Glamor.createElement(
        "div",
        { css: [Gx.row, Dx.root] },
        this.state.tooltips.map((e, t) =>
          Glamor.createElement(
            Gx.TooltipElement,
            Ix({ key: t }, e.props, { anchor: e.anchor })
          )
        )
      );
    }
  };
  const { $ui: Ax } = app;
  var Mx, Fx;
  Ax.tooltipController = {
    tooltips: [],
    containers: [],
    registerTooltip: function (e) {
      (this.tooltips = [
        ...this.tooltips,
        { props: e.props, anchor: e.anchor, id: e.id },
      ]),
        this.containers.forEach((e) => e.setState({ tooltips: this.tooltips }));
    },
    updateTooltip: function (e, t) {
      const r = this.tooltips.findIndex((e) => e.id === t.id);
      if (-1 === r) return;
      this.tooltips = [
        ...this.tooltips.slice(0, r),
        { props: t.props, anchor: t.anchor, id: t.id },
        ...this.tooltips.slice(r + 1),
      ];
      const n = { tooltips: this.tooltips };
      this.containers.forEach((e) => e.setState(n));
    },
    unregisterTooltip: function (e) {
      this.tooltips = this.tooltips.filter((t) => t.props !== e.props);
      const t = { tooltips: this.tooltips };
      this.containers.forEach((e) => e.setState(t));
    },
    registerContainer: function (e) {
      (this.containers = [...this.containers, e]),
        e.setState({ tooltips: this.tooltips });
    },
    unregisterContainer: function (e) {
      this.containers = this.containers.filter((t) => t !== e);
    },
  };
  const { $ui: Rx } = app,
    Lx = {
      root: ({ props: e, state: t }) => ({
        ...Rx.absolute(`${t.top} . . ${t.left}`),
        maxWidth: 300,
        ...("shown" in e && {
          ...Rx.transition.fast,
          transitionProperty: "opacity, transform",
          ...((!e.shown || !t.showDelayPassed) && {
            opacity: 0,
            transform: "translateY(2px)",
            pointerEvents: "none",
          }),
        }),
      }),
      container: ({ props: e }) => ({
        ...Rx.padding("g1 10 0 10"),
        backgroundColor: e.background || Rx.color.link,
        maxWidth: 300,
        minWidth: 100,
      }),
      arrow: ({ props: e, state: t }) => ({
        color: e.background || Rx.color.link,
        ...Rx.absolute("-3 12 . ."),
        ...(e.arrowAtCenter && { left: "50%", marginLeft: -4 }),
        ...(e.atTop && { transform: "scaleY(-1)", top: "auto", bottom: -3 }),
        ...(t.triangleDeltaX && {
          marginRight: -1 * t.triangleDeltaX,
          ...(e.arrowAtCenter && {
            marginRight: "auto",
            marginLeft: -4 + t.triangleDeltaX,
          }),
        }),
      }),
      title: {
        ...Rx.text.tooltipTitle,
        color: Rx.theme.valueOf("day", Rx.color.textInversed),
        paddingBottom: 8,
      },
      text: {
        ...Rx.text.tooltipText,
        color: Rx.theme.valueOf("day", Rx.color.textInversed),
        wordBreak: "break-word",
      },
      paragraph: { ...Rx.padding("0 0 8 0") },
    },
    Bx = "tooltip-element.arrow";
  Rx.SvgIcon.registerSvgIcons([
    `<symbol id="${Bx}" viewBox="0 0 8 3"><path d="M200,0l4-3,4,3Z" transform="translate(-200 3)" fill="currentColor" opacity="0.95"/></symbol>`,
  ]),
    (Rx.TooltipElement =
      ((Fx = Mx =
        class extends Rx.Component {
          constructor(e) {
            super(e),
              (this._setShowTimeout = () => {
                const { tooltipGroup: e, showDelay: t } = this.props;
                this.setState({ showDelayPassed: !1 }),
                  clearTimeout(this._showTimeout),
                  (this._showTimeout = setTimeout(() => {
                    this.setState({ showDelayPassed: !0 });
                  }, t || 0)),
                  this.props.tooltipGroup &&
                    (Rx.TooltipElement.groups[e] = {
                      ...Rx.TooltipElement.groups[e],
                      showTimeout: this._showTimeout,
                    });
              }),
              (this._rootRef = Rx.createRef()),
              (this._showTimeout = null),
              (this.state = {
                top: 0,
                left: 0,
                triangleDeltaX: 0,
                showDelayPassed: !1,
              });
          }
          componentDidMount() {
            this.props.shown &&
              (this._updatePosition(), this._setShowTimeout());
          }
          componentWillUnmount() {
            clearTimeout(this._showTimeout);
          }
          componentDidUpdate(e) {
            const { shown: t } = this.props;
            !e.shown && t && (this._updatePosition(), this._setShowTimeout());
          }
          render() {
            const {
                title: e,
                text: t,
                background: r,
                content: n,
                style: o,
              } = this.props,
              a =
                "none" !== r &&
                Glamor.createElement(
                  "div",
                  { css: Lx.arrow(this) },
                  Glamor.createElement(Rx.SvgIcon, { name: Bx })
                ),
              i = e && Glamor.createElement("div", { css: Lx.title }, e),
              s = Array.isArray(t) ? t : [t],
              l =
                t &&
                Glamor.createElement(
                  "div",
                  { css: Lx.text },
                  s
                    .filter(Boolean)
                    .map((e, t) =>
                      Glamor.createElement(
                        "div",
                        { key: t, css: Lx.paragraph },
                        e
                      )
                    )
                );
            return Glamor.createElement(
              "div",
              {
                css: [Rx.row, Rx.justifyContent.end, Lx.root(this), o],
                ref: this._rootRef,
              },
              Glamor.createElement(
                "div",
                { css: [Rx.column, Lx.container(this)] },
                a,
                i,
                l,
                n
              )
            );
          }
          _updatePosition() {
            const e =
              this.props.anchor &&
              this.props.anchor.current &&
              this.props.anchor.current.parentNode;
            let t;
            t = e
              ? e.getBoundingClientRect()
              : { left: 0, top: 0, width: 0, height: 0 };
            let r,
              n = window.scrollY + t.top + t.height + 12;
            if (this.props.atTop) {
              const e = this._rootRef.current.offsetHeight;
              n = t.top - 12 - e;
            }
            const o = this._rootRef.current.offsetWidth;
            r = this.props.arrowAtCenter
              ? Math.round(window.scrollX + t.left + t.width / 2 - o / 2)
              : Math.round(window.scrollX + t.left + t.width / 2 - o + 16);
            let a = 0;
            r < 30 && ((a = r - 30), (r = 30)),
              this.setState({ top: n, left: r, triangleDeltaX: a });
          }
        }),
      (Mx.groups = {}),
      Fx));
  const { $ui: Ox } = app;
  Ox.Tooltip = class extends Ox.Component {
    constructor(e) {
      super(e),
        (this.anchor = null),
        (this.anchor = Ox.createRef()),
        (this.id = Math.random().toString().slice(2));
    }
    componentDidMount() {
      Ox.tooltipController.registerTooltip(this);
    }
    componentDidUpdate(e) {
      Ox.tooltipController.updateTooltip(e, this);
    }
    componentWillUnmount() {
      Ox.tooltipController.unregisterTooltip(this);
    }
    render() {
      return Glamor.createElement(
        "div",
        { ref: this.anchor },
        this.props.children
      );
    }
  };
  const { $ui: $x } = app;
  $x.assign({
    init: function ({ _: t, pathPrefix: r, images: n, icons: o }) {
      if (!t) throw new Error("_ lodash is required to initialize ui-core");
      (("undefined" == typeof window ? e : window)._ = t),
        r && ($x.Image.pathPrefix = r),
        n && $x.Image.registerImages(n),
        o && $x.SvgIcon.registerSvgIcons(o);
    },
  }),
    $x.SvgIcon.registerSvgIcons([
      '<svg id="post" viewBox="0 0 20 20"><path fill="currentColor" d="M5 20a5.006 5.006 0 0 1-5-5V5a5.006 5.006 0 0 1 5-5h10a5.006 5.006 0 0 1 5 5v10a5.006 5.006 0 0 1-5 5H5Zm0-1.701h10a3.674 3.674 0 0 0 3.302-3.3v-2.604L14.738 8.85l-4.255 5.746-4.673-2.137-4.1 2.744A3.71 3.71 0 0 0 5 18.302v-.003ZM1.701 5v8.134l3.915-2.69 4.358 2.015 4.533-6.319 3.795 3.798V5A3.673 3.673 0 0 0 14.998 1.7H5a3.674 3.674 0 0 0-3.299 3.3Zm3.819.847a1.655 1.655 0 1 1 3.31-.002 1.655 1.655 0 0 1-3.31.002Z"/></svg>',
      '<svg id="reel" viewBox="0 0 20 20"><g clip-path="url(#a)"><g clip-path="url(#b)"><path fill="currentColor" fill-rule="evenodd" d="m10.617 1.75 2.23 3.752H8.664L6.675 1.772c.155-.01.314-.016.482-.02l.255-.003h3.205Zm1.745 0h.224c2.295 0 3.351.566 4.23 1.415.585.582 1 1.314 1.197 2.115l.052.221h-3.471L12.363 1.75Zm-7.25.283 1.85 3.469H1.934A4.507 4.507 0 0 1 4.89 2.103l.222-.071Zm7.302 9.625L9.004 9.69a.682.682 0 0 0-1.016.501l-.006.09v3.936a.683.683 0 0 0 .941.63l.082-.04 3.409-1.968a.682.682 0 0 0 .075-1.13l-.075-.05ZM1.764 7.002h16.473l.01.27.003.141v5.175c0 2.295-.566 3.351-1.416 4.23-.863.835-1.875 1.391-3.998 1.431l-.25.003H7.413c-2.295 0-3.35-.567-4.23-1.417-.835-.863-1.39-1.874-1.43-3.998l-.003-.25V7.413l.002-.142.012-.27Z" clip-rule="evenodd"/></g></g><defs><clipPath id="a"><path fill="#fff" d="M1 1h18v18H1z"/></clipPath><clipPath id="b"><path fill="#fff" d="M1 1h18v18H1z"/></clipPath></defs></svg>',
      '<svg id="story" viewBox="0 0 20 20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M3.935 4.99c.17-.203.348-.397.536-.583m-2.342 5.89a7.868 7.868 0 0 1 .382-2.738m2.432 8.503a7.925 7.925 0 0 1-2.167-2.898m10.861 3.832a7.9 7.9 0 0 1-6.121.487m2.485-15.35a7.878 7.878 0 0 1 5.944 13.044M10 7.005v6M13 10.005H7"/></svg>',
      '<svg id="video" viewBox="0 0 20 20"><path fill="currentColor" d="M5.416 17.875c-.453 0-.898-.12-1.29-.345l-.003-.002a2.588 2.588 0 0 1-1.29-2.236V4.707a2.584 2.584 0 0 1 3.872-2.24l9.17 5.294a2.583 2.583 0 0 1-.001 4.475L6.709 17.53c-.393.226-.84.346-1.293.346Z"/></svg>',
      '<svg id="carousel" viewBox="0 0 20 20"><path fill="currentColor" d="M14.747 12.505v-8.22A2.27 2.27 0 0 0 12.461 2H4.286A2.27 2.27 0 0 0 2 4.286v8.22a2.27 2.27 0 0 0 2.286 2.285h8.22c1.23-.044 2.241-1.055 2.241-2.286Zm1.934-6.461v7.077a3.62 3.62 0 0 1-3.604 3.604H6c-.264 0-.396.308-.22.484.44.483 1.055.791 1.802.791h5.89A4.521 4.521 0 0 0 18 13.473v-5.89c0-.704-.308-1.363-.791-1.803-.22-.176-.528 0-.528.264Z"/></svg>',
      '<svg id="schedule" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M13.841 1.565A9.936 9.936 0 003.906 11.5H.594l4.372 4.449 4.46-4.449H6.114a7.765 7.765 0 112.274 5.453L6.82 18.522a9.933 9.933 0 107.021-16.957zm-1.1 5.52v5.52l4.725 2.8.795-1.336-3.864-2.3V7.085z" fill="currentColor"/></svg>',
      '<svg id="gear" viewBox="0 0 15.563 16"><path d="M16,10.784A6.235,6.235,0,0,0,16.054,10,6.235,6.235,0,0,0,16,9.216L17.686,7.9a.4.4,0,0,0,.1-.512l-1.6-2.768a.4.4,0,0,0-.488-.176l-1.992.8a5.845,5.845,0,0,0-1.352-.784l-.3-2.12A.39.39,0,0,0,11.654,2h-3.2a.39.39,0,0,0-.392.336l-.3,2.12a6.146,6.146,0,0,0-1.352.784l-1.992-.8a.39.39,0,0,0-.488.176l-1.6,2.768a.394.394,0,0,0,.1.512L4.11,9.216A6.344,6.344,0,0,0,4.054,10a6.344,6.344,0,0,0,.056.784L2.422,12.1a.4.4,0,0,0-.1.512l1.6,2.768a.4.4,0,0,0,.488.176l1.992-.8a5.845,5.845,0,0,0,1.352.784l.3,2.12A.39.39,0,0,0,8.454,18h3.2a.39.39,0,0,0,.392-.336l.3-2.12A6.146,6.146,0,0,0,13.7,14.76l1.992.8a.39.39,0,0,0,.488-.176l1.6-2.768a.4.4,0,0,0-.1-.512ZM10.054,12.8a2.8,2.8,0,1,1,2.8-2.8A2.8,2.8,0,0,1,10.054,12.8Z" transform="translate(-2.271 -2)" fill="#03a9f4"/></svg>',
      '<svg id="link" viewBox="0 0 12.5 12.5"><path fill="currentColor" stroke="currentColor" stroke-width=".5" d="M2.821 1.278h2.4a.514.514 0 0 1 .07 1.024H2.821A1.542 1.542 0 0 0 1.283 3.72l-.005.109v5.85a1.543 1.543 0 0 0 1.438 1.539h.106l5.828-.005a1.543 1.543 0 0 0 1.538-1.437V7.27a.514.514 0 0 1 1.024-.07V9.67a2.572 2.572 0 0 1-2.432 2.568h-.136l-5.817.012h-.139A2.572 2.572 0 0 1 .255 9.816v-.137L.25 3.85v-.139a2.571 2.571 0 0 1 2.435-2.43ZM7.277.25h4.494l.069.01.069.019.041.017a.482.482 0 0 1 .1.062l.048.043.057.068.037.062.026.062.013.044.009.044.01.064v4.48a.514.514 0 0 1-1.024.07V2.006L6.27 6.959a.514.514 0 0 1-.67.05l-.058-.05a.514.514 0 0 1-.05-.67l.05-.058 4.95-4.953H7.277a.514.514 0 0 1-.51-.445v-.07a.514.514 0 0 1 .44-.513Z"/></svg>',
      '<svg id="delete" viewBox="0 0 12.369 15"><path fill="currentColor" d="M2.286 15a.793.793 0 0 1-.834-.7L.895 4.041h10.579L10.917 14.3a.793.793 0 0 1-.834.7ZM0 3.025V1.379A.524.524 0 0 1 .524.855h3.6v-.68A.175.175 0 0 1 4.3 0h3.773a.175.175 0 0 1 .175.175v.68h3.6a.524.524 0 0 1 .524.524v1.646Z"/></svg>',
      '<svg id="triangle" viewBox="0 0 12 6" fill="currentColor"><defs><clipPath id="a"><path d="M0 0h12v6H0z"/></clipPath></defs><g clip-path="url(#a)"><path d="M12 0 6 6 0 0Z"/></g></svg>',
      '<svg id="tick" viewBox="0 0 14 10.906"><path fill="currentColor" d="M14 1.739 12.261 0 4.832 7.426 1.738 4.335 0 6.074l4.832 4.832Z"/></svg>',
      '<svg id="plus" viewBox="0 0 16 16"><path fill="currentColor" d="M16 8c0 .354-.14.694-.387.944-.249.25-.585.392-.936.392H9.344v5.386c-.015.344-.16.67-.407.907a1.316 1.316 0 0 1-1.83 0 1.342 1.342 0 0 1-.406-.906V9.335H1.364a1.311 1.311 0 0 1-.962-.376A1.337 1.337 0 0 1 0 8a1.348 1.348 0 0 1 .402-.96 1.322 1.322 0 0 1 .962-.376H6.7V1.277c.015-.343.161-.668.407-.906a1.316 1.316 0 0 1 1.83 0c.246.238.392.563.407.906v5.387h5.335c.35 0 .687.142.935.392S16 7.646 16 8Z"/></svg>',
      '<svg id="download" viewBox="0 0 13.2 13.2"><path d="M7.29.8a.7.7 0 0 0-.202-.5.685.685 0 0 0-.977 0 .7.7 0 0 0-.2.494v6.143l-1.8-1.956a.691.691 0 0 0-.218-.16.685.685 0 0 0-.758.123.7.7 0 0 0-.221.486.7.7 0 0 0 .184.5L6.09 9.19l.035.035a.684.684 0 0 0 .979-.034L10.1 5.932a.7.7 0 0 0-.037-.987.686.686 0 0 0-.976.037l-1.8 1.956V.8Z"/><path fill="currentColor" stroke="currentColor" stroke-width=".2" d="M7.29.8a.7.7 0 0 0-.202-.5.685.685 0 0 0-.977 0 .7.7 0 0 0-.2.494v6.143l-1.8-1.956a.691.691 0 0 0-.218-.16.685.685 0 0 0-.758.123.7.7 0 0 0-.221.486.7.7 0 0 0 .184.5L6.09 9.19l.035.035a.684.684 0 0 0 .979-.034L10.1 5.932a.7.7 0 0 0-.037-.987.686.686 0 0 0-.976.037l-1.8 1.956V.8Z"/><path d="M.8 7.575a.7.7 0 0 1 .492.2.688.688 0 0 1 .2.488v2.762a.694.694 0 0 0 .7.691h8.821a.7.7 0 0 0 .493-.2.688.688 0 0 0 .2-.488V8.266a.688.688 0 0 1 .2-.488.7.7 0 0 1 .985 0 .688.688 0 0 1 .2.488v2.762a2.063 2.063 0 0 1-.612 1.465 2.1 2.1 0 0 1-1.468.607H2.189a2.1 2.1 0 0 1-1.477-.607A2.063 2.063 0 0 1 .1 11.028V8.266a.688.688 0 0 1 .2-.488.7.7 0 0 1 .5-.203Z"/><path fill="currentColor" stroke="currentColor" stroke-width=".2" d="M.8 7.575a.7.7 0 0 1 .492.2.688.688 0 0 1 .2.488v2.762a.694.694 0 0 0 .7.691h8.821a.7.7 0 0 0 .493-.2.688.688 0 0 0 .2-.488V8.266a.688.688 0 0 1 .2-.488.7.7 0 0 1 .985 0 .688.688 0 0 1 .2.488v2.762a2.063 2.063 0 0 1-.612 1.465 2.1 2.1 0 0 1-1.468.607H2.189a2.1 2.1 0 0 1-1.477-.607A2.063 2.063 0 0 1 .1 11.028V8.266a.688.688 0 0 1 .2-.488.7.7 0 0 1 .5-.203Z"/></svg>',
      '<svg id="close" viewBox="0 0 11.404 11.404"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.7" d="m10.202 10.202-4.5-4.5m0 0-4.5-4.5m4.5 4.5 4.5-4.5m-4.5 4.5-4.5 4.5"/></svg>',
      '<svg id="repost" fill="none" viewBox="0 0 14 15"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M2.447 8.947V5.33a4.341 4.341 0 0 1 7.88-2.503M11.13 6.053V9.67a4.34 4.34 0 0 1-7.88 2.503"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M3.894 7.5 2.447 8.947 1 7.5M9.684 7.5l1.447-1.447L12.578 7.5"/></svg>',
      '<svg id="warning-triangle" viewBox="0 0 28.824 26.006"><style>.theme-night #warning-triangle .exclamation {fill: #000 !important}</style><path d="M10.948 1.999a4 4 0 0 1 6.926 0l10.407 18.007a4 4 0 0 1-3.463 6H4.006a4 4 0 0 1-3.463-6z" fill="currentColor"/><path class="exclamation" d="M13.622 17.079l-.748-9.537 2.972.019-.753 9.518zm-.613 1.428h2.7v2.663h-2.7z" fill="#fff"/></svg>',
      '<svg id="warning-triangle-small" viewBox="0 0 19.5 16.87"><style>.theme-night #warning-triangle-small .exclamation {fill: #000 !important}</style><path d="M10.333,5.291a2.765,2.765,0,0,1,4.686,0l7.04,11.681a2.6,2.6,0,0,1-2.343,3.893H5.636a2.6,2.6,0,0,1-2.343-3.893Z" transform="translate(-2.926 -3.994)" fill="currentColor"/><path class="exclamation" d="M1.261-4.847.752-11.3l2.01.013L2.253-4.847Zm-.418.966H2.671v1.8H.843Z" transform="translate(7.958 16.401)" fill="#fff"/></svg>',
      '<svg id="warning-triangle-large" viewBox="0 0 50 50"><style>.theme-night #warning-triangle-large .exclamation {fill: #000 !important}</style><path fill="none" d="M0 0h50v50H0z"/><path d="M19.719 9.446a5.878 5.878 0 0 1 9.961 0l14.968 24.831a5.52 5.52 0 0 1-4.981 8.276H9.735a5.52 5.52 0 0 1-4.981-8.276z" fill="currentColor"/><path class="exclamation" d="M23.571 31.252l-1.082-13.714 4.274.028-1.082 13.686zm-.888 2.054h3.886v3.832h-3.886z" fill="#fff"/></svg>',
      '<svg id="time-morning" viewBox="0 0 22.588 22.588"><rect width="22.588" height="22.588" transform="translate(0 0)" fill="none"/><path d="M13.459,14.28a4.089,4.089,0,0,0-2.2-.691,4.159,4.159,0,0,0-2.149.691L1.08,19.662l-.746-1.19,5.035-3.355a7.056,7.056,0,0,1-.6-6.489l1.269.518a5.654,5.654,0,0,0-.305,1,5.735,5.735,0,0,0,0,2.289,5.648,5.648,0,0,0,.78,1.918l2.049-1.365a5.478,5.478,0,0,1,2.7-.8,5.382,5.382,0,0,1,2.783.8l2.045,1.356a5.677,5.677,0,0,0-4.791-8.733c-.133,0-.267,0-.4.014l-.1-1.367c.166-.012.335-.018.5-.018a7.1,7.1,0,0,1,1.421.143,7.01,7.01,0,0,1,2.521,1.061,7.072,7.072,0,0,1,2.555,3.1A7.015,7.015,0,0,1,18.2,9.873a7.121,7.121,0,0,1,0,2.842,7.009,7.009,0,0,1-.974,2.389l5.081,3.368-.813,1.19Zm6.345-2.3v-1.37h2.785v1.37Zm-19.8,0v-1.37H2.785v1.37ZM6.627,8.056,5.5,7.275a7.106,7.106,0,0,1,.808-.966c.074-.074.15-.147.227-.217l.932,1c-.064.059-.128.12-.19.181a5.731,5.731,0,0,0-.651.778h0ZM8.5,6.349h0L7.814,5.161a6.994,6.994,0,0,1,1.4-.6l.412,1.307A5.635,5.635,0,0,0,8.5,6.349ZM17.517,4.1l1.969-1.969.969.969L18.485,5.072ZM2.134,3.1,3.1,2.134,5.072,4.1,4.1,5.072Zm8.475-.318V0h1.37V2.785Z" transform="translate(0 1.481)" fill="currentColor"/></svg>',
      '<svg id="time-midday" viewBox="0 0 22.588 22.588"><rect width="22.588" height="22.588" fill="none"/><path d="M10.609,22.588V19.8h1.37v2.785Zm-8.475-3.07L4.1,17.549l.969.969L3.1,20.487Zm15.383-1,.969-.969,1.969,1.969-.969.969ZM9.873,18.2a7.01,7.01,0,0,1-2.521-1.061,7.073,7.073,0,0,1-2.555-3.1,7.022,7.022,0,0,1-.411-1.323,7.119,7.119,0,0,1,0-2.842A7.01,7.01,0,0,1,5.448,7.352a7.089,7.089,0,0,1,1.9-1.9c.09-.061.183-.12.276-.177l.722,1.165c-.078.047-.156.1-.231.148a5.7,5.7,0,0,0-2.058,2.5,5.656,5.656,0,0,0-.331,1.066,5.735,5.735,0,0,0,0,2.289,5.649,5.649,0,0,0,.855,2.031,5.7,5.7,0,0,0,2.5,2.058,5.651,5.651,0,0,0,1.066.331,5.733,5.733,0,0,0,2.289,0A5.647,5.647,0,0,0,14.47,16a5.7,5.7,0,0,0,2.058-2.5,5.648,5.648,0,0,0,.331-1.066,5.735,5.735,0,0,0,0-2.289A5.648,5.648,0,0,0,16,8.118,5.711,5.711,0,0,0,14.47,6.584l-.122-.08.721-1.166c.057.036.113.073.167.109a7.072,7.072,0,0,1,2.555,3.1A7.018,7.018,0,0,1,18.2,9.873a7.121,7.121,0,0,1,0,2.842,7.01,7.01,0,0,1-1.061,2.521,7.072,7.072,0,0,1-3.1,2.555,7.02,7.02,0,0,1-1.323.411,7.119,7.119,0,0,1-2.842,0Zm9.93-6.222v-1.37h2.785v1.37Zm-19.8,0v-1.37H2.785v1.37Zm13.193-6.04a5.672,5.672,0,0,0-.754-.21C12.3,5.7,12.148,5.676,12,5.658l.146-1.363c.191.023.382.054.568.092a7.039,7.039,0,0,1,.913.252l-.435,1.3h0ZM9.479,5.91h0L9.027,4.616a7.029,7.029,0,0,1,.846-.229c.227-.047.461-.082.694-.106l.163,1.361a5.636,5.636,0,0,0-1.251.268ZM17.517,4.1l1.969-1.969.969.969L18.486,5.072ZM2.134,3.1,3.1,2.134,5.072,4.1,4.1,5.072Zm8.475-.318V0h1.37V2.785Z" transform="translate(0 0)" fill="currentColor"/></svg>',
      '<svg id="time-evening" viewBox="0 0 22.588 22.588"><rect width="22.588" height="22.588" fill="none"/><path d="M10.923,18.38a5.479,5.479,0,0,1-2.7-.8L5.515,15.77h0l0,0L0,12.095.746,10.9,4.17,13.2q-.067-.24-.117-.485a7.121,7.121,0,0,1,0-2.842A7.011,7.011,0,0,1,5.114,7.352,7.072,7.072,0,0,1,8.216,4.8a7.021,7.021,0,0,1,1.323-.411A7.125,7.125,0,0,1,11.824,4.3l-.172,1.36a5.738,5.738,0,0,0-1.836.074,5.649,5.649,0,0,0-2.031.855,5.7,5.7,0,0,0-2.058,2.5A5.651,5.651,0,0,0,5.4,10.149a5.735,5.735,0,0,0,0,2.289A5.65,5.65,0,0,0,6.25,14.47q.081.121.17.238l2.355,1.579a4.16,4.16,0,0,0,2.149.691,4.089,4.089,0,0,0,2.2-.691l2.394-1.6q.078-.105.151-.213a5.7,5.7,0,0,0,.855-4.317l1.3-.455c.014.059.027.118.038.176a7.121,7.121,0,0,1,0,2.842q-.049.237-.114.472L21.163,10.9l.813,1.19-8.269,5.481A5.4,5.4,0,0,1,11,18.381Zm5.154-9.555a5.7,5.7,0,0,0-.407-.707c-.1-.15-.212-.3-.328-.438l.974-.971a7.054,7.054,0,0,1,.922,1.375l-1.162.74h0ZM14.3,6.7c-.053-.039-.108-.077-.162-.114a5.677,5.677,0,0,0-.965-.524L13.029,6l.463-1.29c.071.027.143.056.212.086a7.057,7.057,0,0,1,1.2.65l.127.088L14.3,6.7h0Zm2.884-2.6,1.969-1.969.969.969L18.152,5.072ZM1.8,3.1l.969-.969L4.738,4.1l-.969.969Zm8.475-.318V0h1.37V2.785Z" transform="translate(0.312 2.144)" fill="currentColor"/></svg>',
      '<svg id="time-night" viewBox="0 0 24 24"><path d="M8.433,16.693H8.346A8.346,8.346,0,0,1,8.346,0h.167a12.622,12.622,0,0,1,1.581.1A6.806,6.806,0,0,0,6.557,5.963a6.575,6.575,0,0,0,6.558,6.557h.137A6.333,6.333,0,0,0,15.8,11.99,8.152,8.152,0,0,1,8.433,16.693ZM7.021,1.468A7.01,7.01,0,0,0,8.153,15.374h.193a6.867,6.867,0,0,0,4.833-2.006,7.274,7.274,0,0,1-.793.044h-.133A7.173,7.173,0,0,1,7.021,1.468Z" transform="translate(4.049 3.776) rotate(-1)" fill="currentColor"/><rect width="24" height="24" fill="none"/></svg>',
    ]);
  const { $ui: Nx } = app;
  var Ux, Hx;
  function zx() {
    return (zx =
      Object.assign ||
      function (e) {
        for (var t = 1; t < arguments.length; t++) {
          var r = arguments[t];
          for (var n in r)
            Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
        }
        return e;
      }).apply(this, arguments);
  }
  Nx.accountSwitcherSizes = {
    selected: 62,
    unselected: 52,
    gap: 8,
    popout: 20,
  };
  const { $ui: jx } = app,
    Wx = {
      root: { paddingTop: 8, width: 350, ...jx.noselect },
      container: {
        ...jx.relative(),
        maxWidth: "100%",
        backgroundColor: jx.color.bgLight2,
        ...jx.padding("g2 g2 g0h g2"),
        ...jx.borderRadius.r4,
        ...jx.shadow.sh10,
      },
      marker: (e) => ({
        ...jx.absolute("0 11"),
        width: 40,
        height: 4,
        backgroundColor: e.marker,
      }),
      triangle: (e) => ({
        ...jx.absolute("-3 27"),
        ...jx.triangle.up({ size: 4, color: e.marker }),
      }),
      title: { ...jx.text.group2, paddingBottom: jx.space.g1 },
      content: {
        ...jx.text.tooltipText,
        color: jx.color.textNormal,
        paddingBottom: jx.space.g1,
      },
      actions: { paddingBottom: jx.space.g1 },
      action: { paddingRight: jx.space.g1 },
    };
  var Vx, qx;
  function Zx() {
    return (Zx =
      Object.assign ||
      function (e) {
        for (var t = 1; t < arguments.length; t++) {
          var r = arguments[t];
          for (var n in r)
            Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
        }
        return e;
      }).apply(this, arguments);
  }
  jx.AccountCard =
    ((Hx = Ux =
      class extends jx.Component {
        render() {
          const { title: e, content: t, actions: r } = this.props;
          return Glamor.createElement(
            "div",
            { css: [jx.row, jx.justifyContent.end, Wx.root, this.props.style] },
            Glamor.createElement(
              "div",
              { css: [jx.column, Wx.container] },
              Glamor.createElement("div", { css: Wx.marker(this.props) }),
              Glamor.createElement("div", { css: Wx.triangle(this.props) }),
              e && Glamor.createElement("div", { css: Wx.title }, e),
              t && Glamor.createElement("div", { css: Wx.content }, t),
              r &&
                Glamor.createElement(
                  "div",
                  { css: [jx.row, Wx.actions] },
                  r.map((e, t) =>
                    Glamor.createElement(
                      jx.LinkButton,
                      zx({ key: t }, e, { buttonStyle: Wx.action })
                    )
                  )
                )
            )
          );
        }
      }),
    (Ux.defaultProps = { marker: jx.color.link }),
    Hx);
  const { $ui: Yx } = app,
    Qx = Yx.accountSwitcherSizes,
    Kx = {
      root: { ...Yx.relative() },
      avatar: (e) => ({
        ...(e.onClick && Yx.clickable),
        paddingRight: e.selected ? 0 : Qx.gap,
        paddingTop: e.selected ? 0 : (Qx.selected - Qx.unselected) / 2,
        paddingBottom: e.selected ? 0 : (Qx.selected - Qx.unselected) / 2,
      }),
      card: ({ props: e, state: t }) => ({
        ...Yx.absolute(`${Qx.selected} 0 . .`),
        ...Yx.transition.fast,
        ...((!t.hovered || e.loading) && {
          opacity: 0,
          transform: "translateY(2px)",
          pointerEvents: "none",
        }),
      }),
    };
  var Xx, Jx;
  function eP() {
    return (eP =
      Object.assign ||
      function (e) {
        for (var t = 1; t < arguments.length; t++) {
          var r = arguments[t];
          for (var n in r)
            Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
        }
        return e;
      }).apply(this, arguments);
  }
  Yx.AccountItemRenderer =
    ((qx = Vx =
      class extends Yx.Component {
        constructor(e) {
          super(e),
            (this._onDisconnectAccountClick = () => {
              this.props.onDisconnectAccountClick &&
                (this.props.onDisconnectAccountClick(this.props),
                this._dropHoverState());
            }),
            (this._onClick = () => {
              this.props.onClick &&
                (this.props.onClick(this.props), this._dropHoverState());
            }),
            (this.rootRef = Yx.createRef()),
            (this.state = { hovered: !1 });
        }
        render() {
          return Glamor.createElement(
            "div",
            Zx(
              { css: [Kx.root, this.props.style], ref: this.rootRef },
              Yx.hoverState(this, "hovered")
            ),
            Glamor.createElement(
              "div",
              { css: Kx.avatar(this.props), onClick: this._onClick },
              Glamor.createElement(Yx.UserAvatar, {
                greyOut: !this.props.loggedIn,
                avatarUrl: this.props.avatarUrl,
                size: this.props.selected ? Qx.selected : Qx.unselected,
                loading: this.props.loading,
                frame:
                  this.props.frameColor ||
                  (this.props.loading
                    ? Yx.color.iconPassive
                    : this.state.hovered && !this.props.selected
                    ? Yx.color.iconActionable
                    : this.props.loggedIn && this.props.selected
                    ? Yx.color.primary
                    : Yx.color.iconPassive),
              })
            ),
            this._renderCard()
          );
        }
        _renderCard() {
          return this.props.selected && !this.props.loggedIn
            ? Glamor.createElement(Yx.AccountCard, {
                title: this.props.name || "Not logged in",
                style: Kx.card(this),
                actions: [
                  this.props.onDisconnectAccountClick
                    ? {
                        label: "REMOVE FROM INSSIST",
                        small: !0,
                        onClick: this._onDisconnectAccountClick,
                      }
                    : null,
                ],
              })
            : this.props.selected && this.props.loggedIn
            ? Glamor.createElement(Yx.AccountCard, {
                title: this.props.name || "Logged In",
                style: Kx.card(this),
                actions: [
                  this.props.onDisconnectAccountClick
                    ? {
                        label: "LOG OUT",
                        small: !0,
                        onClick: this._onDisconnectAccountClick,
                      }
                    : null,
                ],
              })
            : this.props.selected
            ? void 0
            : Glamor.createElement(Yx.AccountCard, {
                title: this.props.name,
                style: Kx.card(this),
                actions: [
                  {
                    label: "REMOVE FROM INSSIST",
                    small: !0,
                    onClick: this._onDisconnectAccountClick,
                  },
                ],
              });
        }
        _dropHoverState() {
          this.setState({ hovered: !1 });
        }
      }),
    (Vx.defaultProps = { loggedIn: !0, selected: !1 }),
    qx);
  const { $ui: tP } = app,
    rP = tP.accountSwitcherSizes,
    nP = {
      root: ({ state: e }) => ({
        ...tP.relative(),
        ...(e.disableHover && { "& *": { pointerEvents: "none !important" } }),
      }),
      selectedRenderer: {
        ...tP.absolute("0 0 . ."),
        "&::before": {
          content: '""',
          ...tP.absolute("-20 -20 -20 0"),
          zIndex: 1e3,
        },
      },
      newAccount: ({ props: e }) => ({
        "&::after": {
          content: '""',
          ...tP.absolute("2 2 2 2"),
          background: tP.color.appBackground,
          borderRadius: "50%",
        },
      }),
      newAccountPlusIcon: { ...tP.absolute("16 . . 16"), zIndex: 1 },
      switchContent: ({ state: e }) => ({
        pointerEvents: e.switcherHovered || e.rootHovered ? "inherit" : "none",
      }),
      switchHitbox: ({ props: e, hasPaginators: t }) => {
        if (e.disableSwitch) return {};
        let r;
        return (
          (r = e.addingNewAccount ? e.accounts.length : e.accounts.length - 1),
          r > 5 && (r = 5),
          {
            ...tP.absolute("-20 -10 . ."),
            width:
              rP.selected +
              (t ? 68 : 0) +
              r * (rP.unselected + rP.gap) +
              (e.addingNewAccount ? 0 : rP.unselected) +
              10 +
              25,
            height: rP.selected + 40,
          }
        );
      },
      switchRenderer: ({ props: e, state: t, index: r, hasPaginators: n }) => {
        const o = {
          ...tP.transition.fast,
          opacity: r < 0 || r >= 5 ? 0 : 1,
          pointerEvents: r < 0 || r >= 5 ? "none" : "inherit",
        };
        let a = null;
        if (!e.disableSwitch && t.switcherHovered) {
          let e =
            (r + 1) * (rP.unselected + rP.gap) +
            (rP.selected - rP.unselected - rP.gap);
          n && (e += 34), (a = tP.absolute(`0 ${e} . .`));
        } else if (!e.disableSwitch && t.rootHovered) {
          const e =
            (r + 1) * rP.popout + (rP.selected - rP.unselected - rP.gap);
          a = tP.absolute(`0 ${e} . .`);
        } else a = tP.absolute("0 2 . .");
        return { ...o, ...a };
      },
      paginator: ({ props: e, state: t }) => ({
        visibility:
          !e.disableSwitch && t.switcherHovered ? "visible" : "hidden",
        opacity: !e.disableSwitch && t.switcherHovered ? 1 : 0,
        ...tP.clickable,
        transition: "all 300ms var(--timing-function) 0ms",
        color: tP.color.iconPassive,
        ":hover": { color: tP.color.iconActionable },
      }),
      leftPaginator: {
        transform: "rotate(-180deg)",
        ...tP.absolute(
          `0 ${rP.selected + 34 + 5 * (rP.unselected + rP.gap)} . .`
        ),
      },
      rightPaginator: { ...tP.absolute(`0 ${rP.selected} . .`) },
      addIcon: ({ props: e, state: t, hasPaginators: r }) => ({
        ...(r
          ? tP.absolute(
              `0 ${rP.selected + 76 + 5 * (rP.unselected + rP.gap)} . .`
            )
          : tP.absolute(
              `0 ${
                e.accounts.length * (rP.unselected + rP.gap) +
                (rP.selected - rP.unselected - rP.gap)
              } . .`
            )),
        paddingRight: r ? 0 : tP.space.g2,
        visibility:
          !e.disableSwitch &&
          (1 !== e.accounts.length ? t.switcherHovered : t.rootHovered)
            ? "visible"
            : "hidden",
        opacity:
          !e.disableSwitch &&
          (1 !== e.accounts.length ? t.switcherHovered : t.rootHovered)
            ? 1
            : 0,
        transition: "all 600ms var(--timing-function) 0ms",
      }),
      addIconSvg: ({ props: e }) => ({
        ...tP.clickable,
        transition: "all 600ms var(--timing-function) 0ms",
        color: tP.color.iconPassive,
        ":hover": { color: tP.color.iconActionable },
        "&::before": {
          content: '""',
          position: "absolute",
          top: "11px",
          left: "0px",
          width: "40px",
          height: "40px",
          borderRadius: "50%",
          background: tP.color.appBackground,
        },
      }),
      tooltipContainer: { ...tP.relative("-12 . . .") },
      card: { ...tP.absolute("0 -11 . .") },
    },
    oP = "account-switcher.arrow",
    aP = "account-switcher.add";
  tP.SvgIcon.registerSvgIcons([
    `<symbol id="${oP}" viewBox="0 0 42 62"><rect width="42" height="62" fill="none"/><circle cx="8.25" cy="8.25" r="8.25" transform="translate(8.75 22.75)" fill="currentColor"/><path d="M9.65,6,8.6,7.05l3.45,3.45L8.6,13.95,9.65,15l4.5-4.5Z" transform="translate(5.85 20.5)" fill="#fff"/></symbol>`,
    `<symbol id="${aP}" viewBox="0 0 40 62"><g><rect width="40" height="62" fill="none"/><path d="M-1741.784,8802.43a19.961,19.961,0,0,1-6.359-4.286,19.966,19.966,0,0,1-4.286-6.359A19.869,19.869,0,0,1-1754,8784a19.868,19.868,0,0,1,1.571-7.783,19.95,19.95,0,0,1,4.286-6.359,19.961,19.961,0,0,1,6.359-4.286A19.878,19.878,0,0,1-1734,8764a19.878,19.878,0,0,1,7.784,1.571,19.961,19.961,0,0,1,6.359,4.286,19.948,19.948,0,0,1,4.286,6.359A19.868,19.868,0,0,1-1714,8784a19.869,19.869,0,0,1-1.571,7.784,19.966,19.966,0,0,1-4.286,6.359,19.961,19.961,0,0,1-6.359,4.286A19.878,19.878,0,0,1-1734,8804,19.878,19.878,0,0,1-1741.784,8802.43Zm.6-35.44a18.369,18.369,0,0,0-5.868,3.957,18.376,18.376,0,0,0-3.957,5.866,18.35,18.35,0,0,0-1.452,7.188,18.326,18.326,0,0,0,1.452,7.186,18.378,18.378,0,0,0,3.957,5.869,18.419,18.419,0,0,0,5.868,3.955,18.338,18.338,0,0,0,7.185,1.451,18.338,18.338,0,0,0,7.185-1.451,18.444,18.444,0,0,0,5.868-3.955,18.393,18.393,0,0,0,3.955-5.869,18.326,18.326,0,0,0,1.452-7.186,18.35,18.35,0,0,0-1.452-7.187,18.37,18.37,0,0,0-3.955-5.866,18.393,18.393,0,0,0-5.868-3.957,18.338,18.338,0,0,0-7.185-1.451A18.338,18.338,0,0,0-1741.185,8766.989Zm5.385,24.212v-5.4h-5.4a1.8,1.8,0,0,1-1.8-1.8,1.8,1.8,0,0,1,1.8-1.8h5.4v-5.4a1.8,1.8,0,0,1,1.8-1.8,1.8,1.8,0,0,1,1.8,1.8v5.4h5.4a1.8,1.8,0,0,1,1.8,1.8,1.8,1.8,0,0,1-1.8,1.8h-5.4v5.4a1.8,1.8,0,0,1-1.8,1.8A1.8,1.8,0,0,1-1735.8,8791.2Z" transform="translate(1754 -8753.001)" fill="currentColor"/></g></symbol>`,
  ]),
    (tP.AccountSwitcher =
      ((Jx = Xx =
        class extends tP.Component {
          constructor(e) {
            super(e),
              (this._onLeftPaginatorClick = () => {
                const e = this.state.paginationShift - 1;
                this.setState({ paginationShift: e });
              }),
              (this._onRightPaginatorClick = () => {
                const e = this.state.paginationShift + 1;
                this.setState({ paginationShift: e });
              }),
              (this._onSwitchAccountClick = (e) => {
                e &&
                  e.id &&
                  this.props.onSwitchAccountClick &&
                  (this.setState({ disableHover: !0 }),
                  setTimeout(() => {
                    this.setState({ disableHover: !1 });
                  }, 300),
                  this._dropHoverState(),
                  this.props.onSwitchAccountClick(e.id));
              }),
              (this._onAddAccountClick = () => {
                this.props.onAddAccountClick &&
                  (this.props.onAddAccountClick(), this._dropHoverState());
              }),
              (this._onDisconnectAccountClick = (e) => {
                e &&
                  e.id &&
                  this.props.onDisconnectAccountClick &&
                  (this.props.onDisconnectAccountClick(e.id),
                  this._dropHoverState());
              }),
              (this._itemRefs = {}),
              (this.state = {
                rootHovered: !1,
                disableHover: !1,
                switcherHovered: !1,
                addIconHovered: !1,
                paginationShift: 0,
              });
          }
          getSnapshotBeforeUpdate(e, t) {
            const r = t,
              n = this.state;
            if (
              r.rootHovered !== n.rootHovered ||
              r.switcherHovered !== n.switcherHovered ||
              r.paginationShift !== n.paginationShift
            ) {
              Object.values(this._itemRefs).forEach((e) => {
                const t = e.current;
                tP.flip.add(t);
              });
            }
            return null;
          }
          componentDidUpdate() {
            tP.flip.run();
          }
          render() {
            return (
              (this._accounts = this.props.accounts),
              this.props.addingNewAccount &&
                (this._accounts = this._accounts.map((e) => ({
                  ...e,
                  selected: !1,
                }))),
              Glamor.createElement(
                "div",
                eP(
                  {
                    css: [
                      tP.row,
                      tP.alignItems.center,
                      nP.root(this),
                      this.props.style,
                    ],
                  },
                  tP.hoverState(this, "rootHovered")
                ),
                this._renderSwitcher(),
                this._renderSelectedAccount()
              )
            );
          }
          _renderSelectedAccount() {
            if (this.props.addingNewAccount)
              return Glamor.createElement(
                "div",
                { css: [nP.selectedRenderer, nP.newAccount(this)] },
                Glamor.createElement(tP.AccountItemRenderer, {
                  loggedIn: !0,
                  selected: !0,
                  frameColor: tP.gradient.brand,
                }),
                Glamor.createElement(tP.Image, {
                  style: nP.newAccountPlusIcon,
                  src: "add-account-plus",
                })
              );
            const e = this._accounts.find((e) => e.selected);
            return e
              ? Glamor.createElement(
                  tP.AccountItemRenderer,
                  eP({}, e, {
                    onDisconnectAccountClick:
                      this.props.onDisconnectAccountClick &&
                      this._onDisconnectAccountClick,
                    style: nP.selectedRenderer,
                  })
                )
              : null;
          }
          _renderSwitcher() {
            let e = this._accounts.filter((e) => !e.selected);
            if (e.length > 5) {
              const t = this.state.paginationShift % e.length;
              e = [...e, ...e, ...e].slice(
                e.length + t - 1,
                e.length + t + 5 + 1
              );
            }
            const t = this._hasPaginators();
            return Glamor.createElement(
              "div",
              eP(
                { css: nP.switchContent({ state: this.state }) },
                tP.hoverState(this, "switcherHovered")
              ),
              this.state.rootHovered &&
                Glamor.createElement("div", {
                  css: nP.switchHitbox({ props: this.props, hasPaginators: t }),
                }),
              e.map((r, n) => {
                const o = nP.switchRenderer({
                    props: this.props,
                    state: this.state,
                    index: e.length - n - 1 - (t ? 1 : 0),
                    hasPaginators: t,
                  }),
                  a = n + this.state.paginationShift;
                let i = this._itemRefs[a];
                return (
                  i || ((i = tP.createRef()), (this._itemRefs[a] = i)),
                  Glamor.createElement(
                    "div",
                    { css: o, key: a, ref: i },
                    Glamor.createElement(
                      tP.AccountItemRenderer,
                      eP({}, r, {
                        onDisconnectAccountClick:
                          this._onDisconnectAccountClick,
                        onClick: this._onSwitchAccountClick,
                      })
                    )
                  )
                );
              }),
              this._renderPaginators(),
              this._renderAddIcon()
            );
          }
          _renderAddIcon() {
            if (this.props.addingNewAccount) return null;
            if (!this.props.onAddAccountClick) return null;
            const e = this._hasPaginators();
            return Glamor.createElement(
              "div",
              eP({}, tP.hoverState(this, "addIconHovered"), {
                css: nP.addIcon({
                  props: this.props,
                  state: this.state,
                  hasPaginators: e,
                }),
              }),
              Glamor.createElement(
                "div",
                { css: nP.addIconSvg(this), onClick: this._onAddAccountClick },
                Glamor.createElement(tP.SvgIcon, { name: aP })
              ),
              Glamor.createElement(
                "div",
                { css: nP.tooltipContainer },
                !this.props.disableAddAccountTooltip &&
                  Glamor.createElement(tP.Tooltip, {
                    shown: this.state.addIconHovered,
                    title: "ADD ACCOUNT",
                    text: "Connect and seamlessly switch between multiple Instagram accounts.",
                  })
              )
            );
          }
          _renderPaginators() {
            return this._hasPaginators()
              ? Glamor.createElement(
                  tP.Fragment,
                  null,
                  Glamor.createElement(
                    "div",
                    {
                      css: [
                        nP.paginator({ props: this.props, state: this.state }),
                        nP.leftPaginator,
                      ],
                      onClick: this._onLeftPaginatorClick,
                    },
                    Glamor.createElement(tP.SvgIcon, { name: oP })
                  ),
                  Glamor.createElement(
                    "div",
                    {
                      css: [
                        nP.paginator({ props: this.props, state: this.state }),
                        nP.rightPaginator,
                      ],
                      onClick: this._onRightPaginatorClick,
                    },
                    Glamor.createElement(tP.SvgIcon, { name: oP })
                  )
                )
              : null;
          }
          _hasPaginators() {
            return this._accounts.filter((e) => !e.selected).length > 5;
          }
          _dropHoverState() {
            this.setState({
              rootHovered: !1,
              switcherHovered: !1,
              addIconHovered: !1,
            });
          }
        }),
      (Xx.defaultProps = {
        accounts: [],
        disableSwitch: !1,
        disableAddAccountTooltip: !1,
      }),
      Jx));
  const { $ui: iP } = app,
    sP = {
      root: {
        background: iP.color.bgLight2,
        ...iP.borderRadius.r4,
        ...iP.shadow.sh10,
        ...iP.relative(),
        "& a": { fontWeight: 700, color: iP.color.textNormal },
      },
      content: {
        position: "relative",
        ...iP.padding("g2 g2 g2 g1h"),
        ...iP.text.tooltipText,
        color: iP.color.textNormal,
      },
      marker: ({ props: e }) => ({
        ...iP.absolute("0 . . 64"),
        width: 80,
        height: 4,
        background: e.markerColor || iP.color.link,
      }),
      image: {
        width: 40,
        height: 40,
        flexShrink: 0,
        ...iP.relative("-3 . . ."),
      },
      subcontent: ({ state: e }) => ({
        ...iP.padding("g1h g2 g1h 62"),
        ...iP.text.tooltipText,
        borderTop: "1px solid var(--color-border-dark)",
        color: iP.color.textBleak,
        "& a": { ...iP.clickable, fontWeight: 700, color: "inherit" },
        ...("night" === e.theme && { borderColor: iP.color.borderLight }),
      }),
      action: {
        ...iP.row,
        ...iP.alignItems.center,
        "&:not(:last-child)": { marginRight: iP.space.g2 },
      },
      closeButton: { ...iP.absolute("6 6 . .") },
    };
  class lP extends iP.Component {
    constructor(...e) {
      var t;
      return (
        (t = super(...e)),
        (this._renderAction = (e, t) =>
          e
            ? Glamor.createElement(
                "div",
                { css: sP.action, key: e.key || t },
                e
              )
            : null),
        t
      );
    }
    render() {
      return Glamor.createElement(
        "div",
        { css: [iP.column, sP.root, this.props.style] },
        Glamor.createElement(
          "div",
          { css: [iP.row, sP.content] },
          Glamor.createElement("div", { css: sP.marker(this) }),
          Glamor.createElement(iP.Image, {
            style: sP.image,
            src: this.props.image,
          }),
          Glamor.createElement(iP.Spacer, { width: "g1h" }),
          Glamor.createElement(
            "div",
            { css: [iP.column, iP.fullWidth] },
            this.props.content,
            this.props.actions &&
              Glamor.createElement(iP.Spacer, { height: "g1h" }),
            this.props.actions &&
              Glamor.createElement(
                "div",
                { css: iP.row },
                this.props.actions.map(this._renderAction)
              )
          )
        ),
        this._renderSubcontent(),
        this._renderCloseButton()
      );
    }
    _renderSubcontent() {
      return this.props.subcontent
        ? Glamor.createElement(
            "div",
            { css: [iP.column, sP.subcontent(this)] },
            Glamor.createElement(iP.Spacer, { width: 30 }),
            this.props.subcontent
          )
        : null;
    }
    _renderCloseButton() {
      if (this.props.onCloseClick)
        return Glamor.createElement(iP.CloseButton, {
          style: sP.closeButton,
          small: !0,
          onClick: this.props.onCloseClick,
        });
    }
  }
  var cP, uP;
  function dP() {
    return (dP =
      Object.assign ||
      function (e) {
        for (var t = 1; t < arguments.length; t++) {
          var r = arguments[t];
          for (var n in r)
            Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
        }
        return e;
      }).apply(this, arguments);
  }
  iP.ActionCard = iP.theme.ThemeAware(lP);
  const { $ui: hP } = app,
    pP = {
      root: {
        ...hP.column,
        width: "min(max(800px, calc(100vw - 590px)), 960px)",
        height: "100%",
      },
      title: {
        ...hP.row,
        ...hP.fullWidth,
        ...hP.justifyContent.between,
        ...hP.padding("14 36 g1h g3"),
      },
      titleText: { ...hP.text.mainTitle },
      filterStringInput: { minWidth: 300 },
      filterStringInputStyle: { ...hP.padding("6 80 6 6") },
      button: (e) => ({
        color: e ? hP.color.link : hP.color.iconPassive,
        ...hP.clickableInversed,
      }),
      buttonStyle: {
        ...hP.padding("6 0 6 24"),
        opacity: 1,
        pointerEvents: "inherit",
      },
      buttonTooltip: { marginTop: 5, marginLeft: -8 },
      ghostSwitch: {
        ...hP.row,
        ...hP.alignItems.center,
        marginRight: hP.space.g3,
        position: "relative",
        top: -1,
      },
      ghostSwitchInfo: ({ state: e }) => ({
        ...hP.transition.fast,
        marginLeft: hP.space.g1,
        ...(!e.ghostSwitchHovered && { opacity: 0 }),
      }),
      iframeWrapper: { ...hP.relative(), flexGrow: 1, ...hP.margin(". 4 . 4") },
      overlay: ({ props: e }) => ({
        ...hP.absolute("1 1 0 1"),
        overflow: "hidden",
        ...(!e.showOverlay && { pointerEvents: "none" }),
      }),
      overlayHeader: ({ props: e }) => ({
        ...hP.padding("g1 g3 g1 g1"),
        ...hP.text.elementNormal,
        ...hP.transition.slow,
        color: hP.color.iconActionable,
        backgroundColor: hP.color.bgLight1,
        borderTopLeftRadius: 4,
        borderTopRightRadius: 4,
        borderBottom: hP.border.dark,
        ...(!e.showOverlay && { transform: "translateY(-100%)" }),
      }),
      overlayContent: { ...hP.relative(), flexGrow: 1 },
      iframe: {
        border: "none",
        background: "inherit",
        flexGrow: 1,
        borderTopLeftRadius: 4,
        borderTopRightRadius: 4,
        "html.theme-day &": {
          borderTop: hP.border.dark,
          borderRight: hP.border.dark,
          borderLeft: hP.border.dark,
        },
      },
    },
    mP = "dm-side-panel.ghost",
    gP = "igswiss.search",
    fP = "igswiss.close",
    vP = "dm-side-panel.unread",
    bP = "dm-side-panel.flagged",
    yP = "dm-side-panel.flame";
  function wP() {
    return (wP =
      Object.assign ||
      function (e) {
        for (var t = 1; t < arguments.length; t++) {
          var r = arguments[t];
          for (var n in r)
            Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
        }
        return e;
      }).apply(this, arguments);
  }
  hP.SvgIcon.registerSvgIcons([
    `<symbol id="${mP}" viewBox="0 0 8.832 11.776"><path d="M4.28 0A4.539 4.539 0 000 4.6v6.07a.368.368 0 00.628.26l.573-.426a.368.368 0 01.495.051l.988 1.112a.368.368 0 00.52 0l.937-1.055a.368.368 0 01.55 0l.937 1.055a.368.368 0 00.52 0l.988-1.112a.368.368 0 01.495-.051l.573.426a.368.368 0 00.628-.26V4.416A4.416 4.416 0 004.28 0zM2.944 5.152a.736.736 0 11.736-.736.736.736 0 01-.736.736zm2.944 0a.736.736 0 11.736-.736.736.736 0 01-.736.736z" fill="currentColor"/></symbol>`,
    `<symbol id="${vP}" viewBox="0 0 34 34"><g transform="translate(19338 3072)"><rect width="34" height="34" transform="translate(-19338 -3072)" fill="none"/><g transform="translate(-19333.086 -3067.61)"><path d="M31.474,7.3a2.8,2.8,0,1,1-2.8-2.8,2.8,2.8,0,0,1,2.8,2.8Z" transform="translate(-8.926 0)" fill="currentColor"/><path d="M17.6,11.023l-5.551,3.7L4.35,9.593V7.725l7.7,5.131,4.423-2.948a3.933,3.933,0,0,1-.052-4.283H4.118A1.873,1.873,0,0,0,2.25,7.493V19.16a1.873,1.873,0,0,0,1.868,1.868H19.985a1.873,1.873,0,0,0,1.868-1.868V11.054a3.938,3.938,0,0,1-4.252-.031Z" transform="translate(0 -0.425)" fill="currentColor"/></g></g></symbol>`,
    `<symbol id="${bP}" viewBox="0 0 34 34"><g transform="translate(19338 3072)"><rect width="34" height="34" transform="translate(-19338 -3072)" fill="none"/><path d="M19.773,5.333a17.088,17.088,0,0,1-2.153.182,17.341,17.341,0,0,1-3.538-.53A18.057,18.057,0,0,0,10.431,4.5c-2.544,0-3.408.525-3.5.582l-.182.126V21.169H8.834V15.434a13.168,13.168,0,0,1,1.6-.087,17.569,17.569,0,0,1,3.464.673,18.619,18.619,0,0,0,3.772.5,17.228,17.228,0,0,0,2.1-.174c.326-.039.608-.074.868-.117V5.2C20.424,5.247,20.1,5.294,19.773,5.333Z" transform="translate(-19334.602 -3067.147)" fill="currentColor"/></g></symbol>`,
    `<symbol id="${yP}" viewBox="0 0 22.059 22.048"><rect width="22.024" height="22.024" transform="translate(0)" fill="none"/><g transform="translate(0.009)"><rect width="22.048" height="22.048" transform="translate(0)" fill="none"/><path d="M8.728,0a18.441,18.441,0,0,1,.681,4.258A3.125,3.125,0,0,1,6.275,7.567,3.283,3.283,0,0,1,2.941,4.258l.027-.319A11.971,11.971,0,0,0,0,11.828a7.225,7.225,0,0,0,7.35,7.1,7.225,7.225,0,0,0,7.35-7.1A15,15,0,0,0,8.728,0ZM7.084,16.265a2.873,2.873,0,0,1-2.959-2.787,2.817,2.817,0,0,1,2.581-2.769,7.154,7.154,0,0,0,4.245-2.288,11.958,11.958,0,0,1,.543,3.585A4.339,4.339,0,0,1,7.084,16.265Z" transform="translate(4.15 0.952)" fill="#738398"/></g></symbol>`,
  ]),
    (hP.DmSidePanel =
      ((uP = cP =
        class extends hP.Component {
          constructor(e) {
            super(e),
              (this._onCloseClick = () => {
                this._onChangeFilter("filterString", "");
              }),
              (this._onFilterStringInputChange = (e) => {
                this._onChangeFilter("filterString", e);
              }),
              (this._onUnreadClick = () => {
                this._onChangeFilter("filterUnread", !this.props.filterUnread);
              }),
              (this._onFlaggedClick = () => {
                this._onChangeFilter(
                  "filterFlagged",
                  !this.props.filterFlagged
                );
              }),
              (this._onGhostSwitchChange = () => {
                this._onChangeFilter(
                  "ghostModeEnabled",
                  !this.props.ghostModeEnabled
                );
              }),
              (this.state = { ghostSwitchHovered: !1 });
          }
          render() {
            return Glamor.createElement(
              "div",
              { css: pP.root },
              this._renderTitle(),
              Glamor.createElement(
                "div",
                { css: [hP.row, pP.iframeWrapper] },
                this._renderOverlay(),
                this._renderIframe()
              )
            );
          }
          _renderTitle() {
            return Glamor.createElement(
              "div",
              { css: pP.title },
              Glamor.createElement("span", { css: pP.titleText }, "Direct"),
              this._renderFilterControls()
            );
          }
          _renderFilterControls() {
            return Glamor.createElement(
              "div",
              { css: [hP.column, hP.alignItems.end] },
              this._renderGhostSwitch()
            );
          }
          _renderFilter() {
            const {
                filterString: e,
                filterUnread: t,
                filterFlagged: r,
              } = this.props,
              n = e ? { name: fP, onClick: this._onCloseClick } : { name: gP },
              o = null != t && {
                icon: vP,
                buttonStyle: pP.button(t),
                hitboxStyle: hP.absolute("0 0 0 0"),
                onClick: this._onUnreadClick,
                tooltip: {
                  style: pP.buttonTooltip,
                  title: "FILTER UNREAD",
                  showDelay: 700,
                },
              },
              a = null != r && {
                icon: bP,
                buttonStyle: pP.button(r),
                hitboxStyle: hP.absolute("0 0 0 0"),
                onClick: this._onFlaggedClick,
                tooltip: {
                  style: pP.buttonTooltip,
                  title: "FILTER FLAGGED",
                  showDelay: 700,
                },
              };
            return Glamor.createElement(
              "div",
              { style: hP.row },
              Glamor.createElement(hP.Input, {
                style: pP.filterStringInput,
                inputStyle: pP.filterStringInputStyle,
                value: e,
                icon: n,
                button: [o, a],
                buttonStyle: pP.buttonStyle,
                placeholder: "filter chats",
                onInput: this._onFilterStringInputChange,
              }),
              Glamor.createElement(hP.Spacer, { width: "g3" })
            );
          }
          _renderGhostSwitch() {
            const { ghostModeEnabled: e, ghostModeTooltip: t } = this.props;
            if ("boolean" != typeof e) return null;
            const r = Glamor.createElement(hP.SvgIcon, {
              style: { color: "#FFF", width: 8, height: 12 },
              name: mP,
            });
            return Glamor.createElement(
              "div",
              dP(
                { css: pP.ghostSwitch },
                hP.hoverState(this, "ghostSwitchHovered")
              ),
              Glamor.createElement(hP.Switch, {
                label: "Ghost-read mode",
                value: e,
                icon: r,
                onChange: this._onGhostSwitchChange,
              }),
              Glamor.createElement(
                "div",
                { css: pP.ghostSwitchInfo(this) },
                Glamor.createElement(hP.InfoCircle, { tooltip: t })
              )
            );
          }
          _renderIframe() {
            return Glamor.createElement(
              "iframe",
              dP({ css: pP.iframe }, this.props.iframeAttrs)
            );
          }
          _renderOverlay() {
            return Glamor.createElement(
              "div",
              { css: [hP.column, pP.overlay(this)] },
              this._renderOverlayHeader(),
              this._renderOverlayContent()
            );
          }
          _renderOverlayHeader() {
            const { onUpgradeClick: e, onCancelClick: t } = this.props;
            return Glamor.createElement(
              "div",
              {
                css: [
                  hP.row,
                  hP.justifyContent.between,
                  pP.overlayHeader(this),
                ],
              },
              Glamor.createElement(
                "div",
                { css: hP.row },
                Glamor.createElement(hP.SvgIcon, { name: yP }),
                Glamor.createElement(hP.Spacer, { width: "g1" }),
                Glamor.createElement(
                  "div",
                  null,
                  this.props.upsellOverlayHeaderText
                )
              ),
              Glamor.createElement(
                "div",
                { css: [hP.row, hP.alignItems.center] },
                Glamor.createElement(hP.LinkButton, {
                  label: "UPGRADE",
                  onClick: e,
                }),
                Glamor.createElement(hP.Spacer, { width: "g3" }),
                Glamor.createElement(hP.LinkButton, {
                  label: "CANCEL",
                  cancel: !0,
                  onClick: t,
                })
              )
            );
          }
          _renderOverlayContent() {
            return Glamor.createElement(
              "div",
              { css: [hP.column, pP.overlayContent] },
              this.props.upsellOverlay
            );
          }
          _onChangeFilter(e, t) {
            const {
              filterString: r,
              filterUnread: n,
              filterFlagged: o,
              ghostModeEnabled: a,
              onChange: i,
            } = this.props;
            i({
              filterString: r,
              filterUnread: n,
              filterFlagged: o,
              ghostModeEnabled: a,
              [e]: t,
            });
          }
        }),
      (cP.width = pP.root.width),
      uP));
  const { $ui: CP } = app,
    kP = {
      root: ({ props: e }) => ({
        ...(e.isHorizontal && { ...CP.row, ...CP.center }),
      }),
      button: ({ props: e }) => ({
        width: "min-content",
        "&:not(:last-child)": {
          marginBottom: CP.space.g3,
          ...(e.isHorizontal && { marginBottom: 0, marginRight: CP.space.g3 }),
        },
      }),
      buttonTooltip: { marginTop: 5 },
    };
  CP.IgButtons = class extends CP.Component {
    constructor(e) {
      super(e),
        (this._renderButtonTooltip = (e) =>
          e.tooltip
            ? Glamor.createElement(
                CP.Tooltip,
                wP({}, e.tooltip, {
                  style: kP.buttonTooltip,
                  showDelay: 700,
                  shown: this.state.hoveredButtonId === e.id,
                })
              )
            : null),
        (this._onButtonMouseOver = (e) => {
          const t = e.currentTarget.dataset.id;
          this.setState({ hoveredButtonId: t });
        }),
        (this._onButtonMouseOut = () => {
          this.setState({ hoveredButtonId: null });
        }),
        (this.state = { hoveredButtonId: null });
    }
    render() {
      return Glamor.createElement(
        "div",
        { css: kP.root(this) },
        this.props.buttons.map((e) =>
          Glamor.createElement(
            "div",
            {
              css: kP.button(this),
              key: e.id,
              "data-id": e.id,
              onMouseOver: this._onButtonMouseOver,
              onMouseOut: this._onButtonMouseOut,
            },
            Glamor.createElement(CP.RoundButton, {
              icon: e.icon,
              image: e.image,
              size: "40",
              color: CP.color.iconActionable,
              flat: this.props.isHorizontal,
              onClick: e.onClick,
              onLongPress: e.onLongPress,
            }),
            this._renderButtonTooltip(e)
          )
        )
      );
    }
  };
  const { $ui: SP } = app,
    EP = {
      root: {
        ...SP.relative(),
        ...SP.padding("12 0"),
        ...SP.shadow.sh10,
        width: 207,
        borderRadius: 12,
        background: SP.color.bgLight2,
      },
      buttonWrap: {
        ...SP.relative(),
        cursor: "pointer",
        "&:hover": { background: SP.color.bgLight1 },
      },
      button: {
        ...SP.row,
        ...SP.alignItems.center,
        ...SP.noselect,
        ...SP.padding("9 16 9 16"),
        ...SP.text.of({
          family: SP.font.primary,
          size: 11,
          height: "14px",
          weight: 700,
          color: SP.color.textActionable,
        }),
      },
      buttonIcon: { width: 24, height: 24 },
      badge: {
        ...SP.absolute("50% 0 . ."),
        ...SP.row,
        ...SP.center,
        transform: "translateY(-50%)",
        width: 36,
        height: 17,
        background:
          "linear-gradient(183deg, #fd7726 -14%, #ef1834 60%, #c70bc0 128%)",
        borderRadius: "3px 0 0 3px",
        pointerEvents: "none",
        ...SP.text.of({
          family: SP.font.primary,
          size: 9,
          height: "17px",
          weight: 600,
          color: "#FFF",
        }),
      },
    };
  function _P() {
    return (_P =
      Object.assign ||
      function (e) {
        for (var t = 1; t < arguments.length; t++) {
          var r = arguments[t];
          for (var n in r)
            Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
        }
        return e;
      }).apply(this, arguments);
  }
  SP.IgCreationCard = class extends SP.Component {
    constructor(...e) {
      var t;
      return (
        (t = super(...e)),
        (this._renderButton = (e, t) =>
          Glamor.createElement(
            "div",
            { css: EP.buttonWrap, key: e.label },
            Glamor.createElement(
              "div",
              { css: EP.button, onClick: e.onClick },
              Glamor.createElement(SP.SvgIcon, {
                style: EP.buttonIcon,
                name: e.icon,
              }),
              Glamor.createElement(SP.Spacer, { width: 11 }),
              e.label
            ),
            e.badge && Glamor.createElement("div", { css: EP.badge }, e.badge)
          )),
        t
      );
    }
    render() {
      return Glamor.createElement(
        "div",
        { css: EP.root },
        this.props.buttons.map(this._renderButton)
      );
    }
  };
  const { $ui: xP } = app,
    PP = {
      day: { igBackground: "#FFFFFF" },
      night: { igBackground: "#0D0D0D" },
    },
    TP = {
      root: {
        ...xP.row,
        ...xP.center,
        width: "100%",
        height: "100%",
        "&:hover iframe": { pointerEvents: "all" },
      },
      view: ({ props: e }) => ({
        width: 378,
        height: 740,
        position: "relative",
        ...(e.isFrameless && { width: "100%", height: "100%" }),
      }),
      phoneShadow: ({ props: e }) => ({
        position: "absolute",
        width: "100%",
        height: "100%",
        pointerEvents: "none",
        filter: "blur(50px)",
        opacity: 0.2,
        background: xP.color.dark,
        ...(e.isFrameless && { display: "none" }),
      }),
      background: ({ props: e, colorScheme: t }) => ({
        ...xP.absolute("18 21 18 21"),
        background: t.igBackground,
        ...(e.isDarkBackground && { background: PP.night.igBackground }),
        ...(e.isSplashShown && { background: xP.color.bgLight2 }),
      }),
      screen: ({ props: e }) => ({
        ...xP.row,
        ...xP.justifyContent.center,
        ...xP.absolute("47 . . 21"),
        width: 333,
        height: 671,
        ...(e.isFrameless && {
          ...xP.relative("0 0 0 0"),
          width: "100%",
          height: "100%",
        }),
      }),
      iframe: ({ colorScheme: e, props: t }) => ({
        border: "none",
        width: "100%",
        height: "100%",
        background: e.igBackground,
        pointerEvents: "none",
        ...(t.allowPointerEvents && { pointerEvents: "all" }),
      }),
      loading: ({ props: e, colorScheme: t }) => ({
        ...xP.absolute("0 0 . 0"),
        ...xP.row,
        ...xP.center,
        ...xP.text.hashtag,
        ...xP.transition.superslow,
        height: 40,
        textAlign: "center",
        pointerEvents: "none",
        background: t.igBackground,
        color: xP.color.textBleak,
        ...(e.isFrameless && { height: 44 }),
        ...(!e.isLoadingShown && {
          transform: "translateY(-10px)",
          opacity: 0,
        }),
      }),
      splash: ({ props: e }) => ({
        ...xP.column,
        ...xP.alignItems.center,
        ...xP.transition.slow,
        ...xP.absolute("0 0 0 0"),
        overflow: "hidden",
        background: xP.color.bgLight2,
        ...(e.isFrameless && { ...xP.justifyContent.center }),
        ...(!e.isSplashShown && { opacity: 0, pointerEvents: "none" }),
      }),
      splashLogo: ({ props: e }) => ({
        flexShrink: 0,
        width: 286,
        height: 286,
        marginTop: 120,
        position: "relative",
        left: -72,
        ...(e.isFrameless && { marginTop: -80, left: 0 }),
      }),
      splashTitle: {
        ...xP.text.mainTitle,
        ...xP.text.uppercase,
        marginTop: 27,
        color: xP.color.textNormal,
      },
      phone: ({ props: e }) => ({
        pointerEvents: "none",
        ...(e.isFrameless && { display: "none" }),
      }),
      creationCard: ({ props: e }) => ({
        position: "absolute",
        top: 53,
        right: -109,
        ...xP.transition.fast,
        transform: "translateX(-50%)",
        ...(!e.isCreationCardShown && {
          opacity: 0,
          transform: "translate(-50%, -5px)",
          pointerEvents: "none",
        }),
        ...(!e.isFrameless && { top: 102, right: -115 }),
      }),
    };
  xP.Image.registerImages({
    "ig-view.logo": "ui-igswiss/logo-572.png:286:286",
  });
  class IP extends xP.Component {
    render() {
      const { props: e, state: t } = this,
        r = { props: e, state: t, colorScheme: PP[t.theme] || PP.day };
      return Glamor.createElement(
        "div",
        { css: TP.root },
        Glamor.createElement(
          "div",
          { css: TP.view(this) },
          Glamor.createElement("div", { css: TP.phoneShadow(this) }),
          Glamor.createElement("div", { css: TP.background(r) }),
          Glamor.createElement(
            "div",
            { css: TP.screen(this) },
            this._renderIframe(r),
            this._renderLoading(r),
            this._renderSplashScreen()
          ),
          this._renderPhone(),
          this._renderCreationCard()
        )
      );
    }
    _renderIframe(e) {
      return Glamor.createElement(
        "iframe",
        _P({ css: TP.iframe(e) }, this.props.iframeAttrs)
      );
    }
    _renderLoading(e) {
      return Glamor.createElement(
        "div",
        { css: TP.loading(e) },
        "WAITING FOR",
        Glamor.createElement("br", null),
        "INSTAGRAM.COM"
      );
    }
    _renderSplashScreen() {
      return Glamor.createElement(
        "div",
        { css: TP.splash(this) },
        Glamor.createElement(xP.Image, {
          style: TP.splashLogo(this),
          src: "ig-view.logo",
        }),
        Glamor.createElement("div", { css: TP.splashTitle }, "INSSIST")
      );
    }
    _renderPhone() {
      return Glamor.createElement(
        "div",
        { css: TP.phone(this) },
        Glamor.createElement(xP.PhoneFrame, {
          isDarkHeader: this.props.isDarkBackground,
        })
      );
    }
    _renderCreationCard() {
      return this.props.creationCard
        ? Glamor.createElement(
            "div",
            { css: TP.creationCard(this) },
            this.props.creationCard
          )
        : null;
    }
  }
  xP.IgView = xP.theme.ThemeAware(IP);
  const { $ui: GP } = app,
    DP = {
      day: { igBackground: "#FFFFFF" },
      night: { igBackground: "#0D0D0D" },
    },
    AP = {
      root: ({ state: e }) => ({
        ...GP.row,
        width: "100%",
        height: "100%",
        minHeight: 600,
        position: "relative",
        ...(!e.mounted && { opacity: 0 }),
      }),
      dragArea: { ...GP.fixed("0 0 . 0 -1"), height: 38 },
      sidebar: ({ state: e }) => ({
        flexShrink: 0,
        position: "relative",
        zIndex: 1,
        ...("welcome" === e.screen && { display: "none" }),
      }),
      body: { ...GP.row, flexGrow: 1, minWidth: 0, zIndex: 0 },
      left: { width: "100%", minWidth: 0 },
      center: { ...GP.row, ...GP.alignItems.center, maxWidth: "100%" },
      right: { ...GP.row, ...GP.alignItems.center, width: "100%", minWidth: 0 },
      main: ({ props: e, state: t }) => ({
        ...GP.column,
        ...GP.transition.slow,
        transitionProperty: "transform",
        height: "100%",
        maxWidth: "100%",
        flexShrink: 0,
        zIndex: 1,
        boxSizing: "content-box",
        ...(t.isFrameless && {
          width: 400,
          ...("night" === t.theme && {
            boxShadow: "0 0 36px rgba(0, 0, 0, 0.45)",
          }),
          ...((e.igViewWithBorder || (t.isFrameless && !e.isFullscreen)) && {
            borderLeft: GP.border.dark,
            borderRight: GP.border.dark,
          }),
        }),
        ...(t.buttonsAtTop && { width: 400 }),
        ...(e.isFullscreen && { width: e.igViewFullscreenWidth || 460 }),
        ...("welcome" === t.screen && !t.isFrameless && { width: "auto" }),
      }),
      topButtons: ({ state: e, colorScheme: t }) => ({
        ...GP.row,
        ...GP.center,
        height: 56,
        backgroundColor: t.igBackground,
        ...(!e.buttonsAtTop && { display: "none" }),
      }),
      igView: { flexGrow: 1 },
      welcome: ({ state: e }) => ({
        ...GP.transition.slow,
        paddingLeft: 80,
        ...("welcome" !== e.screen && {
          opacity: 0,
          transform: "translateX(250px)",
          display: "none",
        }),
      }),
      assistPanel: ({ state: e }) => ({
        ...GP.row,
        ...GP.shadow.sh6,
        ...GP.borderRadius.r4,
        ...GP.transition.slow,
        ...GP.margin("16 16 16 50"),
        ...GP.relative(),
        zIndex: 1,
        flexShrink: 0,
        transitionProperty: "opacity, transform",
        width: 427,
        height: "calc(100% - 60px)",
        maxHeight: 758,
        opacity: 1,
        background: GP.color.bgLight3,
        overflow: "auto",
        ...("assist-panel" !== e.screen && {
          transform: "translateX(-200px)",
          opacity: 0,
          display: "none",
          zIndex: 0,
        }),
      }),
      rightButtons: ({ state: e }) => ({
        ...GP.transition.slow,
        transitionProperty: "opacity, transform",
        width: "100%",
        position: "relative",
        paddingLeft: 60,
        opacity: 1,
        ...(("default" !== e.screen || e.buttonsAtTop) && {
          opacity: 0,
          display: "none",
        }),
      }),
      rightTips: ({ state: e }) => ({
        position: "absolute",
        top: "100%",
        marginTop: GP.space.g5,
        paddingRight: GP.space.g5,
        ...(e.rightWidth < 340 && { display: "none" }),
      }),
      cornerButtons: ({ state: e }) => ({
        ...GP.row,
        ...GP.absolute(". 30 16 ."),
        ...((("default" === e.screen && e.rightWidth < 280) ||
          "welcome" === e.screen) && { display: "none" }),
      }),
      cornerButton: { marginLeft: GP.space.g3 },
      accountSwitcher: ({ state: e }) => ({
        ...GP.absolute("g2 g2 . ."),
        ...GP.transition.slow,
        zIndex: 1,
        ...(("welcome" === e.screen || e.bodyWidth < 800) && {
          transform: "translateX(100px)",
        }),
      }),
      snackbar: { ...GP.fixed(". 30 30 ."), width: 406, zIndex: 100 },
      experimentsBar: {
        ...GP.fixed("0 0 0 ."),
        width: 5,
        background: GP.color.link,
        pointerEvents: "none",
        opacity: 0.5,
        zIndex: "9999",
      },
    };
  class MP extends GP.Component {
    constructor(e) {
      super(e),
        (this._onBodyWheel = (e) => {
          if (!this.props.onBodyWheel) return;
          const t = this._assistPanelRef.current;
          t !== e.target && (t.contains(e.target) || this.props.onBodyWheel(e));
        }),
        (this._onBodyResize = () => {
          this.setState({
            rootHeight: this._rootRef.current.offsetHeight,
            bodyWidth: this._bodyRef.current.offsetWidth,
            rightWidth: this._rightRef.current.offsetWidth,
          });
        }),
        (this._bodyResizeObserver = null),
        (this._rootRef = GP.createRef()),
        (this._bodyRef = GP.createRef()),
        (this._mainRef = GP.createRef()),
        (this._welcomeRef = GP.createRef()),
        (this._assistPanelRef = GP.createRef()),
        (this._rightRef = GP.createRef()),
        (this._rightButtonsRef = GP.createRef()),
        (this.state = {
          mounted: !1,
          rootHeight: 0,
          bodyWidth: 0,
          rightWidth: 0,
          screen: "default",
          buttonsAtTop: !1,
          isFrameless: !1,
        });
    }
    static getDerivedStateFromProps(e, t) {
      let r;
      r = e.isWelcomeShown
        ? "welcome"
        : e.isAssistPanelShown
        ? "assist-panel"
        : "default";
      const n = "default" === r && t.rightWidth < 125;
      return {
        screen: r,
        buttonsAtTop: n,
        isFrameless: e.isFullscreen || n || t.rootHeight < 700,
      };
    }
    componentDidMount() {
      (this._bodyResizeObserver = new ResizeObserver(this._onBodyResize)),
        this._bodyResizeObserver.observe(this._bodyRef.current),
        this.setState({ mounted: !0 });
    }
    componentWillUnmount() {
      this._bodyResizeObserver.disconnect();
    }
    getSnapshotBeforeUpdate(e, t) {
      const r = t.screen,
        n = this.state.screen;
      return (
        (e.isSidebarOpen !== this.props.isSidebarOpen ||
          ("assist-panel" === r && "assist-panel" !== n) ||
          ("assist-panel" !== r && "assist-panel" === n)) &&
          (GP.flip.add(this._assistPanelRef.current),
          GP.flip.add(this._mainRef.current),
          GP.flip.add(this._rightButtonsRef.current)),
        (("welcome" === r && "welcome" !== n) ||
          ("welcome" !== r && "welcome" === n)) &&
          (GP.flip.add(this._mainRef.current),
          GP.flip.add(this._welcomeRef.current)),
        null
      );
    }
    componentDidUpdate() {
      GP.flip.run();
    }
    render() {
      return Glamor.createElement(
        "div",
        { css: AP.root(this), ref: this._rootRef },
        this._renderSidebar(),
        this._renderBody(),
        this._renderCornerButtons(),
        this._renderExperimentsBar(),
        this._renderSnackbar()
      );
    }
    _renderSidebar() {
      return Glamor.createElement(
        "div",
        { css: AP.sidebar(this) },
        Glamor.createElement(this.props.Sidebar, {
          isOpen: this.props.isSidebarOpen,
        })
      );
    }
    _renderBody() {
      return Glamor.createElement(
        "div",
        { css: AP.body, ref: this._bodyRef, onWheel: this._onBodyWheel },
        Glamor.createElement("div", { css: AP.left }),
        Glamor.createElement(
          "div",
          { css: AP.center },
          this._renderMain(),
          this._renderWelcome(),
          this._renderAssistPanel()
        ),
        Glamor.createElement(
          "div",
          { css: AP.right, ref: this._rightRef },
          this._renderRightButtons()
        ),
        this._renderAccountSwitcher()
      );
    }
    _renderMain() {
      const { props: e, state: t } = this,
        r = { props: e, state: t, colorScheme: DP[t.theme] || DP.day };
      return Glamor.createElement(
        "div",
        { css: AP.main(this), ref: this._mainRef },
        Glamor.createElement(
          "div",
          { css: AP.topButtons(r) },
          Glamor.createElement(this.props.IgButtons, { isHorizontal: !0 })
        ),
        Glamor.createElement(
          "div",
          { css: AP.igView },
          Glamor.createElement(this.props.IgView, {
            isFrameless: t.isFrameless,
            isSplashShown: e.isWelcomeShown,
          }),
          this.props.igViewAfter
        )
      );
    }
    _renderWelcome() {
      return Glamor.createElement(
        "div",
        { css: AP.welcome(this), ref: this._welcomeRef },
        Glamor.createElement(this.props.Welcome, null)
      );
    }
    _renderAssistPanel() {
      return Glamor.createElement(
        "div",
        { css: AP.assistPanel(this), ref: this._assistPanelRef },
        this.props.assistPanel
      );
    }
    _renderRightButtons() {
      return Glamor.createElement(
        "div",
        { css: AP.rightButtons(this), ref: this._rightButtonsRef },
        Glamor.createElement(this.props.IgButtons, null),
        Glamor.createElement(
          "div",
          { css: AP.rightTips(this) },
          Glamor.createElement(this.props.Tips, null)
        )
      );
    }
    _renderAccountSwitcher() {
      return this.props.AccountSwitcher
        ? Glamor.createElement(
            "div",
            { css: AP.accountSwitcher(this) },
            Glamor.createElement(this.props.AccountSwitcher, null)
          )
        : null;
    }
    _renderSnackbar() {
      return this.props.Snackbar
        ? Glamor.createElement(
            "div",
            { css: AP.snackbar },
            Glamor.createElement(this.props.Snackbar, null)
          )
        : null;
    }
    _renderCornerButtons() {
      return Glamor.createElement(
        "div",
        { css: AP.cornerButtons(this) },
        Glamor.createElement(
          "div",
          { css: AP.cornerButton },
          Glamor.createElement(this.props.Tos, null)
        )
      );
    }
    _renderExperimentsBar() {
      if (this.props.isExperimentsBarShown)
        return Glamor.createElement("div", { css: AP.experimentsBar });
    }
  }
  GP.Layout = GP.theme.ThemeAware(MP);
  const { $ui: FP } = app,
    RP = {
      root: {
        ...FP.row,
        ...FP.center,
        ...FP.text.hashtag,
        ...FP.noselect,
        pointerEvents: "all",
        width: "100%",
        height: "100%",
        opacity: 0.98,
        background: FP.color.bgLight3,
        lineHeight: 1.5,
      },
    };
  FP.LoadingOverlay = class extends FP.Component {
    render() {
      return this.props.show
        ? Glamor.createElement(
            "div",
            { css: RP.root },
            Glamor.createElement(FP.ProgressRing, {
              size: this.props.size || 20,
              value: 30,
              spinning: !0,
            }),
            this.props.noText
              ? null
              : Glamor.createElement(
                  React.Fragment,
                  null,
                  Glamor.createElement(FP.Spacer, { width: "g1" }),
                  "LOADING"
                )
          )
        : null;
    }
  };
  const { $ui: LP } = app,
    BP = {
      day: {
        time: "#4E4E4E",
        bars: "#4E4E4E",
        battery: "#A8A8A8",
        batteryFill: "#4E4E4E",
        batteryPlus: "#A8A8A8",
      },
      night: {
        time: "#FFF",
        bars: "#FFF",
        battery: "#999",
        batteryFill: "#FFF",
        batteryPlus: "#999",
      },
      darkHeader: {
        time: "#FFF",
        bars: "#FFF",
        battery: "#999",
        batteryFill: "#FFF",
        batteryPlus: "#999",
      },
    },
    OP = {
      root: { width: 378, height: 740, position: "relative" },
      frame: { width: 378, height: 740, position: "relative" },
      header: { ...LP.absolute("28 28 . 28") },
      time: ({ colorScheme: e }) => ({
        position: "absolute",
        left: 19,
        top: 1,
        width: 43,
        display: "flex",
        justifyContent: "center",
        fontSize: 12,
        lineHeight: 1.25,
        fontWeight: 700,
        fontFamily: LP.font.secondary,
        color: e.time,
      }),
      timeDivider: { ...LP.padding("0 1"), position: "relative", top: -1 },
      bars: ({ colorScheme: e }) => ({
        position: "absolute",
        top: 3,
        right: 48,
        ...LP.alignItems.end,
        ...LP.justifyContent.between,
        width: 14,
        height: 10,
        color: e.bars,
      }),
      bar: {
        width: 2,
        borderRadius: 1,
        color: "inherit",
        background: "currentColor",
        "&:nth-child(1)": { height: 4 },
        "&:nth-child(2)": { height: 6 },
        "&:nth-child(3)": { height: 8 },
        "&:nth-child(4)": { height: 10 },
      },
      battery: ({ colorScheme: e }) => ({
        position: "absolute",
        top: 3,
        right: 19,
        width: 18,
        height: 10,
        border: "1px solid",
        borderRadius: 2,
        borderColor: e.battery,
      }),
      batteryFill: ({ colorScheme: e }) => ({
        ...LP.absolute("1 1 1 1"),
        borderRadius: 1,
        background: e.batteryFill,
      }),
      batteryPlus: ({ colorScheme: e }) => ({
        ...LP.absolute("2 . 2 100%"),
        width: 2,
        marginLeft: 2,
        transform: "translateX(-0.5px) scaleX(0.65)",
        borderRadius: "0 2px 2px 0",
        background: e.batteryPlus,
      }),
    },
    $P = {
      "phone-frame.iphone-frame-day": "ui-igswiss/iphone-frame-day.png:357:698",
      "phone-frame.iphone-frame-night":
        "ui-igswiss/iphone-frame-night.png:357:698",
    };
  LP.Image.registerImages($P);
  class NP extends LP.Component {
    constructor(e) {
      super(e), (this._timer = null), (this.state = { time: this._getTime() });
    }
    componentDidMount() {
      const e = () => {
        this._timer = setTimeout(() => {
          this.setState({ time: this._getTime() }), e();
        }, 1e3);
      };
      e();
    }
    componentWillUnmount() {
      clearTimeout(this._timer);
    }
    render() {
      const e = this.state,
        t =
          $P[`phone-frame.iphone-frame-${this.state.theme}`] ||
          $P["phone-frame.iphone-frame-day"],
        r =
          (this.props.isDarkHeader ? BP.darkHeader : BP[this.state.theme]) ||
          BP.day,
        n = Glamor.createElement(LP.Image, { style: OP.frame, src: t }),
        o =
          !this.props.isHeaderHidden &&
          Glamor.createElement(
            "div",
            { css: OP.header },
            Glamor.createElement(
              "div",
              { css: OP.time({ colorScheme: r }) },
              e.time.hours,
              Glamor.createElement("span", { css: OP.timeDivider }, ":"),
              e.time.minutes
            ),
            Glamor.createElement(
              "div",
              { css: [LP.row, OP.bars({ colorScheme: r })] },
              Glamor.createElement("div", { css: OP.bar }),
              Glamor.createElement("div", { css: OP.bar }),
              Glamor.createElement("div", { css: OP.bar }),
              Glamor.createElement("div", { css: OP.bar })
            ),
            Glamor.createElement(
              "div",
              { css: OP.battery({ colorScheme: r }) },
              Glamor.createElement("div", {
                css: OP.batteryFill({ colorScheme: r }),
              }),
              Glamor.createElement("div", {
                css: OP.batteryPlus({ colorScheme: r }),
              })
            )
          );
      return Glamor.createElement("div", { css: OP.root }, n, o);
    }
    _getTime() {
      const e = new Date();
      return {
        hours: e.getHours(),
        minutes: e.getMinutes().toString().padStart(2, "0"),
      };
    }
  }
  LP.PhoneFrame = LP.theme.ThemeAware(NP);
  const { $ui: UP } = app,
    HP = {
      root: {
        width: "100%",
        maxWidth: 400,
        backgroundColor: UP.color.bgLight1,
        border: UP.border.dark,
        ...UP.borderRadius.r4,
        ...UP.padding("g2"),
        "& a": { color: UP.color.textPassive },
      },
      content: {
        ...UP.text.bleak,
        borderLeft: UP.border.dark,
        paddingLeft: UP.space.g1h,
      },
      button: { ...UP.clickable, marginBottom: 2 },
      link: { ...UP.text.group2, color: UP.color.link, fontSize: UP.space.g1h },
      starsIcon: { color: UP.color.attention },
    };
  UP.RateUsMini = class extends UP.Component {
    constructor(...e) {
      var t;
      return (
        (t = super(...e)),
        (this._onRateUsClick = () => {
          this.props.onRateUsClick && this.props.onRateUsClick();
        }),
        t
      );
    }
    render() {
      return Glamor.createElement(
        "div",
        { css: [UP.row, HP.root] },
        Glamor.createElement(
          "div",
          { css: [UP.row, HP.button], onClick: this._onRateUsClick },
          Glamor.createElement(UP.Image, { src: this.props.image }),
          Glamor.createElement(UP.Spacer, { width: "g2" }),
          Glamor.createElement(
            "div",
            { css: [UP.column, UP.alignItems.start] },
            Glamor.createElement("div", { css: HP.link }, "RATE US üôà"),
            Glamor.createElement(UP.Spacer, { height: "6" }),
            Glamor.createElement(UP.SvgIcon, {
              name: "igswiss.rate-us-stars",
              style: HP.starsIcon,
            })
          )
        ),
        Glamor.createElement(UP.Spacer, { width: "g3" }),
        Glamor.createElement("div", { css: HP.content }, this.props.content)
      );
    }
  };
  const { $ui: zP } = app,
    jP = {
      root: zP.fullWidth,
      ratingTitle: {
        ...zP.relative(),
        ...zP.text.of({ size: 12, weight: 600 }),
      },
      savingProgressRing: zP.absolute("0 . . -28"),
      star: ({ rate: e, state: t }) => {
        const r = "day" === t.theme ? "#5F6367" : zP.color.attention,
          n = "day" === t.theme ? "#D8DADD" : "#5F6367";
        return {
          ...zP.padding(
            1 === e ? "6 2 16 40" : 5 === e ? "6 40 16 2" : "6 2 16 2"
          ),
          cursor: 0 === t.rate ? "pointer" : "inherit",
          color:
            0 === t.rate ? (e <= t.hoveredRate ? r : n) : e <= t.rate ? r : n,
        };
      },
      emoji: { fontSize: 36, paddingTop: 4 },
      response: { textAlign: "center", ...zP.margin(". . g0h .") },
    },
    WP = "igswiss.rate-us-star";
  zP.SvgIcon.registerSvgIcons([
    `<symbol id="${WP}" viewBox="0 0 12.529 11.955"><path d="M12.51,15.512a.393.393,0,0,0-.317-.267l-3.853-.56L6.617,11.194a.393.393,0,0,0-.7,0L4.189,14.685l-3.853.56a.393.393,0,0,0-.218.67l2.788,2.718L2.249,22.47a.393.393,0,0,0,.57.414l3.446-1.812,3.446,1.812a.393.393,0,0,0,.57-.414l-.658-3.837,2.788-2.718A.393.393,0,0,0,12.51,15.512Z" transform="translate(0 -10.975)" fill="currentColor"/></symbol>`,
  ]);
  class VP extends zP.Component {
    constructor(e) {
      super(e),
        (this._onStarMouseEnter = (e) => {
          if (0 !== this.state.rate) return;
          if (
            !(
              e &&
              e.currentTarget &&
              e.currentTarget.dataset &&
              e.currentTarget.dataset.rate
            )
          )
            return;
          const t = Number(e.currentTarget.dataset.rate);
          this.setState({ hoveredRate: t });
        }),
        (this._onStarClick = (e) => {
          if (0 !== this.state.rate) return;
          if (
            !(
              e &&
              e.currentTarget &&
              e.currentTarget.dataset &&
              e.currentTarget.dataset.rate
            )
          )
            return;
          const t = Number(e.currentTarget.dataset.rate);
          this.setState({ rate: t, isSaving: !0 }),
            setTimeout(() => {
              this.setState({ isSaving: !1 });
            }, 1e3);
        }),
        (this._onStarsMouseLeave = () => {
          this.setState({ hoveredRate: 0 });
        }),
        (this._onRateYesButtonClick = () => {
          this.props.onRateYesClick(this.state.rate);
        }),
        (this._onRateNoButtonClick = () => {
          this.props.onRateNoClick(this.state.rate);
        }),
        (this._onOkButtonClick = () => {
          this.props.onOkClick(this.state.rate);
        }),
        (this._onCloseClick = () => {
          this.props.onCloseClick(this.state.rate);
        }),
        (this.state = { rate: 0, hoveredRate: 0, isSaving: !1 }),
        (this.defaultTexts = {
          title: "What do you think about Inssist? Give us a score:",
          image: "rate-us-heart",
          ratingPrompt: "Rate it...",
          rating: ["Hate it", "Dislike it", "It is ok", "Like it", "Love it"],
          emoji: ["üò±", "üòû", "üòâ", "üòä", "ü•∞"],
          responseLow: [
            Glamor.createElement(
              "div",
              { key: 0, css: jP.response },
              "Thank you for telling! Your rating is recorded."
            ),
            Glamor.createElement(
              "div",
              { key: 1, css: jP.response },
              "If you found a bug or problem, feel free to email us at",
              " ",
              Glamor.createElement(
                "a",
                { href: "mailto:inssist@slashed.io" },
                "inssist@slashed.io"
              ),
              " or check our",
              " ",
              Glamor.createElement(
                "a",
                { href: "https://inssist.com/faq", target: "_blank" },
                "F.A.Q. page"
              )
            ),
          ],
          responseHigh: [
            Glamor.createElement(
              "div",
              { key: 0, css: jP.response },
              "Aww! We love you too!"
            ),
            Glamor.createElement(
              "div",
              { key: 1, css: jP.response },
              "Your rating is recorded. It would ",
              Glamor.createElement("strong", null, "help us a ton"),
              " if you rate us on WebStore as well:"
            ),
          ],
          rateYesButton: "SURE, LET'S RATE",
          rateNoButton: "NO, THANKS",
          okButton: "OK, THANK YOU",
          ratingPrefix: "Your rating:",
          subcontent: Glamor.createElement(
            "div",
            null,
            "Found a bug? You can DM us at",
            " ",
            Glamor.createElement(
              "a",
              {
                href: "https://www.instagram.com/inssistapp/",
                target: "_blank",
              },
              "@inssistapp"
            ),
            " ",
            "or email at ",
            Glamor.createElement(
              "a",
              { href: "mailto:inssist@slashed.io" },
              "inssist@slashed.io"
            ),
            " ",
            "and we will try to help."
          ),
        });
    }
    render() {
      const e = this.texts;
      return Glamor.createElement(zP.ActionCard, {
        style: jP.root,
        image: e.image,
        content: this._renderContent(),
        subcontent: this._renderSubcontent(),
        onCloseClick: this._onCloseClick,
      });
    }
    _renderContent() {
      const e = this.texts;
      return Glamor.createElement(
        "div",
        { css: zP.column },
        Glamor.createElement("div", null, e.title),
        Glamor.createElement(
          "div",
          { css: [zP.column, zP.alignItems.center] },
          Glamor.createElement(zP.Spacer, { height: "g2" }),
          this._renderRating(),
          this._renderResponse()
        )
      );
    }
    _renderRating() {
      const { rate: e, hoveredRate: t, isSaving: r } = this.state,
        n = this.texts,
        o =
          0 === e
            ? 0 === t
              ? n.ratingPrompt
              : n.rating[t - 1]
            : `${n.ratingPrefix} ${n.rating[e - 1]}`;
      return Glamor.createElement(
        zP.Fragment,
        null,
        Glamor.createElement(
          "div",
          { css: jP.ratingTitle },
          r &&
            Glamor.createElement(
              "div",
              { css: jP.savingProgressRing },
              Glamor.createElement(zP.ProgressRing, {
                size: 16,
                value: 20,
                thickness: 1,
                spinning: !0,
              })
            ),
          o
        ),
        Glamor.createElement(
          "div",
          { css: zP.row, onMouseLeave: this._onStarsMouseLeave },
          [1, 2, 3, 4, 5].map((e) =>
            Glamor.createElement(
              "div",
              {
                key: e,
                "data-rate": e,
                css: jP.star({ rate: e, state: this.state }),
                onMouseEnter: this._onStarMouseEnter,
                onClick: this._onStarClick,
              },
              Glamor.createElement(zP.SvgIcon, { name: WP })
            )
          )
        )
      );
    }
    _renderResponse() {
      const { rate: e, isSaving: t } = this.state;
      if (0 === e || t) return null;
      const r = this.texts;
      return Glamor.createElement(
        zP.Fragment,
        null,
        Glamor.createElement("div", { css: jP.emoji }, r.emoji[e - 1]),
        Glamor.createElement(zP.Spacer, { height: "g3" }),
        5 === e ? r.responseHigh : r.responseLow,
        Glamor.createElement(zP.Spacer, { height: "g1" }),
        5 === e
          ? Glamor.createElement(
              "div",
              { css: zP.row },
              Glamor.createElement(zP.LinkButton, {
                label: r.rateYesButton,
                onClick: this._onRateYesButtonClick,
              }),
              Glamor.createElement(zP.Spacer, { width: "g3" }),
              Glamor.createElement(zP.LinkButton, {
                label: r.rateNoButton,
                cancel: !0,
                onClick: this._onRateNoButtonClick,
              })
            )
          : Glamor.createElement(
              "div",
              { css: zP.row },
              Glamor.createElement(zP.LinkButton, {
                label: r.okButton,
                onClick: this._onOkButtonClick,
              })
            )
      );
    }
    _renderSubcontent() {
      const { rate: e, isSaving: t } = this.state;
      if (0 === e || 5 === e || t) return null;
      return this.texts.subcontent;
    }
    get texts() {
      return { ...this.defaultTexts, ...this.props.texts };
    }
  }
  zP.RateUsStars = zP.theme.ThemeAware(VP);
  const { $ui: qP } = app,
    ZP = {
      root: {
        minHeight: 40,
        ...qP.margin("-8 -8 -8 0"),
        ...qP.row,
        ...qP.justifyContent.between,
        ...qP.alignItems.center,
        ...qP.relative(),
      },
      title: { ...qP.text.contentTitle, paddingRight: qP.space.g2 },
      right: { ...qP.row, ...qP.alignItems.center },
      action: { marginLeft: qP.space.g1, marginRight: qP.space.g1 },
    };
  qP.SvgIcon.registerSvgIcons([
    '<symbol id="screen-header.back" viewBox="0 0 40 40"><path d="M10.965 21.014l-.026.022-.374-.374H10.5v-.065l-.874-.871.026-.026-.026-.026 1.313-1.312.026.026 5.025-5.026 1.31 1.313-4.129 4.132H29.5v1.858H13.242l4.058 4.061-1.31 1.31z" fill="currentColor"/></symbol>',
  ]),
    (qP.ScreenHeader = class extends qP.Component {
      render() {
        return this.props.title
          ? Glamor.createElement(
              "div",
              { css: ZP.root },
              Glamor.createElement("div", { css: ZP.title }, this.props.title),
              Glamor.createElement(
                "div",
                { css: ZP.right },
                this._renderAction(),
                this._renderCloseButton()
              )
            )
          : null;
      }
      _renderAction() {
        const e = this.props.action;
        return e
          ? Glamor.createElement(qP.Pill, {
              style: ZP.action,
              label: e.label,
              value: e.selected,
              onChange: e.onClick,
            })
          : null;
      }
      _renderCloseButton() {
        return this.props.onCloseClick
          ? Glamor.createElement(qP.CloseButton, {
              onClick: this.props.onCloseClick,
            })
          : null;
      }
    });
  const { $ui: YP } = app,
    QP = {
      root: { ...YP.row, ...YP.relative(), height: "100%" },
      bar: ({ props: e }) => ({
        ...YP.column,
        ...YP.relative(),
        zIndex: 3,
        width: 80,
        "&::before": {
          content: '""',
          ...YP.absolute("0 0 0 0"),
          background: YP.color.bgLight2,
          borderRight: `2px solid ${YP.color.borderLight}`,
          ...(!e.open && { display: "none" }),
        },
      }),
      topDragArea: { height: 22, width: 440 },
      logo: ({ props: e }) => ({
        ...YP.relative(),
        "&::before, &::after": {
          ...YP.absolute(),
          top: -22,
          left: 0,
          zIndex: 1,
          content: '""',
          width: 80,
          height: 22,
          pointerEvents: "none",
          background: YP.color.bgLight2,
          border: `2px solid ${YP.color.borderLight}`,
          borderLeft: "none",
          opacity: 0,
          ...(e.open && "logo" === e.selectedTabId && { opacity: 1 }),
        },
        "&::before": { borderTop: "none", borderRadius: "0 0 20px 0" },
        "&::after": {
          marginTop: 102,
          borderBottom: "none",
          borderRadius: "0 20px 0 0",
        },
      }),
      menu: ({ props: e }) => {
        const t = e.menu.tabs.findIndex((t) => t.id === e.selectedTabId);
        return {
          ...YP.relative(),
          top: -10,
          "&::before, &::after": {
            ...YP.absolute(),
            top: 105 * t - 14,
            left: 0,
            zIndex: 1,
            content: '""',
            width: 80,
            height: 22,
            pointerEvents: "none",
            background: YP.color.bgLight2,
            border: `2px solid ${YP.color.borderLight}`,
            borderLeft: "none",
            opacity: 0,
            ...(e.open && t >= 0 && { opacity: 1 }),
          },
          "&::before": { borderTop: "none", borderRadius: "0 0 20px 0" },
          "&::after": {
            marginTop: 119,
            borderBottom: "none",
            borderRadius: "0 20px 0 0",
          },
        };
      },
      menuContent: ({ props: e }) => ({
        ...YP.padding("g1 g1 g1 0"),
        ...YP.transition.slow,
        ...YP.relative(),
        transitionProperty: "transform",
        width: "min-content",
        transform: "translateX(-220px)",
        ...(e.menu.disabled && { opacity: 0.7 }),
        "&::before": {
          ...YP.absolute("0 0 0 0"),
          ...YP.shadow.sh6,
          content: '""',
          borderRadius: "0 8px 8px 0",
          background: YP.color.bgLight2,
          opacity: 0,
        },
        ...(!e.open && {
          "&:hover": { transform: "none" },
          "&:hover::before": { opacity: 1 },
        }),
      }),
      tab: ({ props: e }, t) => ({
        ...YP.relative(),
        ...YP.transition.slow,
        translateZ: 0,
        width: 300,
        height: 97,
        paddingRight: 18,
        paddingLeft: 16,
        border: "1px solid transparent",
        borderLeft: "none",
        borderRadius: "0 8px 8px 0",
        cursor: "pointer",
        marginBottom: YP.space.g1,
        userSelect: "none",
        "&:last-child": { marginBottom: 0 },
        "&::before": {
          ...YP.absolute("-22 -1 -22 0"),
          content: '""',
          background: YP.color.bgLight3,
          opacity: 0,
          pointerEvents: "none",
          ...(e.open && e.selectedTabId === t && { opacity: 1 }),
        },
        ...("logo" === t && { height: 76, width: 80 }),
        ...(!e.open &&
          "logo" !== t && {
            "&:hover": {
              borderColor: YP.color.borderDark,
              background: YP.color.bgLight1,
            },
            "&:hover::after": {
              content: '""',
              ...YP.absolute("-1 . -1 0"),
              width: 4,
              background: YP.color.link,
            },
          }),
        ...(e.menu.disabled && "logo" !== t && { pointerEvents: "none" }),
      }),
      content: ({ props: e }) => ({
        ...YP.relative(),
        ...YP.transition.slow,
        height: "100%",
        ...(!e.open && {
          ...YP.absolute(),
          left: 82,
          opacity: 0,
          pointerEvents: "none",
          transform: "translateX(-15px)",
        }),
      }),
      sidePanel: ({ props: e }) => ({
        ...YP.relative(),
        zIndex: 2,
        width: e.sidePanel.width || 440,
        height: "100%",
        "&::before": {
          content: '""',
          ...YP.absolute("0 0 0 50% -1"),
          ...YP.shadow.sh12,
        },
        "&::after": {
          content: '""',
          ...YP.absolute("0 0 0 0 -1"),
          background: YP.color.bgLight3,
        },
        ...(e.sidePanel.hidden && { display: "none" }),
      }),
      sidePanelContent: {
        width: "100%",
        height: "100%",
        overflow: "auto",
        overflowX: "hidden",
        ...YP.relative(),
      },
      sidePanelCloseButton: { ...YP.absolute("g1 g1 . .") },
      bodyPanel: ({ props: e }) => ({
        ...YP.absolute("0 . 0 100% 1"),
        ...YP.transition.slow,
        width: "calc(100vw - 100% - 80px)",
        height: "100%",
        background: YP.color.bgLight3,
        ...(!e.sidePanel.content && { transition: "none" }),
        ".sidePanel_disableBodyTransition &": { transition: "none" },
        ...((!e.open || !e.bodyPanel.open) && {
          opacity: 0,
          transform: "translateX(-15px)",
          pointerEvents: "none",
        }),
      }),
      bodyPanelContent: { width: "100%", height: "100%", overflow: "auto" },
    };
  class KP extends YP.Component {
    constructor(e) {
      super(e),
        (this._renderMenuTab = (e) =>
          Glamor.createElement(
            "div",
            {
              css: QP.tab(this, e.id),
              key: e.id,
              "data-tab-id": e.id,
              onClick: this._onTabClick,
            },
            Glamor.createElement(YP.SidebarTab, {
              texts: { title: e.title, features: e.features },
              icon: {
                svg: e.svgIcon,
                image: e.imageIcon,
                badgeText: e.badgeText,
                badgeColor: e.badgeColor,
                style: e.iconStyle,
              },
            })
          )),
        (this._onTabClick = (e) => {
          if (!this.props.onTabClick) return;
          const t = e.target.closest("[data-tab-id]").dataset.tabId;
          this.props.onTabClick(t);
        }),
        (this._rootRef = YP.createRef()),
        (this._contentRef = YP.createRef()),
        (this._sidePanelCloseTimeout = null),
        (this._bodyPanelCloseTimeout = null);
    }
    getSnapshotBeforeUpdate(e) {
      const t = e,
        r = this.props;
      if (
        (t.open !== r.open && YP.flip.add(this._contentRef.current),
        t.sidePanel.hidden || r.sidePanel.hidden)
      ) {
        const e = this._rootRef.current;
        e.classList.add("sidePanel_disableBodyTransition"),
          setTimeout(() => {
            e.classList.remove("sidePanel_disableBodyTransition");
          }, 500);
      }
      return null;
    }
    componentDidUpdate(e) {
      YP.flip.run();
      const t = e,
        r = this.props;
      r.open
        ? clearTimeout(this._sidePanelCloseTimeout)
        : t.open &&
          (this._sidePanelCloseTimeout = setTimeout(() => {
            r.onClosed && r.onClosed();
          }, 300)),
        r.bodyPanel.open
          ? clearTimeout(this._bodyPanelCloseTimeout)
          : t.bodyPanel.open &&
            (this._bodyPanelCloseTimeout = setTimeout(() => {
              r.onBodyPanelClosed && r.onBodyPanelClosed();
            }, 300));
    }
    render() {
      return Glamor.createElement(
        "div",
        { css: QP.root, className: "sidePanel", ref: this._rootRef },
        this._renderBar(),
        this._renderContent()
      );
    }
    _renderBar() {
      return Glamor.createElement(
        "div",
        { css: QP.bar(this) },
        this._renderLogo(),
        Glamor.createElement(YP.Spacer, { grow: !0 }),
        this._renderMenu(),
        Glamor.createElement(YP.Spacer, { grow: !0 })
      );
    }
    _renderLogo() {
      return Glamor.createElement(
        "div",
        { css: QP.logo(this) },
        Glamor.createElement(
          "div",
          {
            css: QP.tab(this, "logo"),
            "data-tab-id": "logo",
            onClick: this._onTabClick,
          },
          Glamor.createElement(YP.SidebarTab, {
            style: YP.clickable,
            icon: {
              svg: this.props.logoTab.svgIcon,
              withMarker: this.props.logoTab.withMarker,
              withProSticker: this.props.logoTab.withProSticker,
            },
          })
        )
      );
    }
    _renderMenu() {
      return Glamor.createElement(
        "div",
        { css: QP.menu(this) },
        Glamor.createElement(
          "div",
          { css: QP.menuContent(this) },
          this.props.menu.tabs.map(this._renderMenuTab)
        )
      );
    }
    _renderContent() {
      return Glamor.createElement(
        "div",
        { css: QP.content(this) },
        this._renderSidePanel(),
        this._renderBodyPanel()
      );
    }
    _renderSidePanel() {
      const e = this.props.sidePanel;
      if (!e) return null;
      const t = !e.hideCloseButton;
      return Glamor.createElement(
        "div",
        { css: QP.sidePanel(this) },
        Glamor.createElement(
          "div",
          { css: QP.sidePanelContent },
          e.content,
          t &&
            Glamor.createElement(YP.CloseButton, {
              style: QP.sidePanelCloseButton,
              onClick: this.props.onSidePanelCloseClick,
            })
        )
      );
    }
    _renderBodyPanel() {
      return Glamor.createElement(
        "div",
        { css: QP.bodyPanel(this) },
        Glamor.createElement(
          "div",
          { css: QP.bodyPanelContent },
          this.props.bodyPanel.content
        )
      );
    }
  }
  YP.Sidebar = YP.theme.ThemeAware(KP);
  const { $ui: XP } = app,
    JP = {
      root: {
        ...XP.row,
        ...XP.alignItems.center,
        ...XP.justifyContent.between,
        height: "100%",
      },
      texts: {},
      title: { ...XP.text.contentTitle },
      features: { marginTop: XP.space.g0h },
      feature: {
        ...XP.text.hashtag,
        ...XP.row,
        ...XP.alignItems.center,
        marginBottom: XP.space.g0h,
        "&:last-child": { marginBottom: 0 },
        "&::before": {
          content: '""',
          width: 4,
          height: 4,
          background: "currentColor",
          borderRadius: "50%",
          marginRight: 6,
          transform: "translateY(10%)",
        },
      },
      icon: { ...XP.relative() },
      iconSvg: { color: XP.color.iconActionable },
      iconImage: {},
      iconMarker: ({ props: e }) => ({
        ...XP.absolute("-3 -5 . ."),
        ...XP.transition.fast,
        transitionProperty: "opacity",
        width: 20,
        height: 20,
        borderRadius: "50%",
        pointerEvents: "none",
        backgroundColor: XP.color.link,
        boxShadow: "0 3px 6px rgba(27, 162, 249, 0.5)",
        ...(!e.icon.withMarker && { opacity: 0 }),
      }),
      iconProSticker: { ...XP.absolute(". -9 -6 .") },
      iconBadge: ({ props: e }) => ({
        ...XP.row,
        ...XP.center,
        ...XP.padding("0 5 0 5"),
        ...XP.transition.fast,
        ...XP.absolute("-5 -6 . ."),
        height: 23,
        minWidth: 23,
        background: e.icon.badgeColor || XP.color.link,
        border: `2px solid ${XP.color.bgLight3}`,
        borderRadius: 12,
        ...XP.text.of({ size: 12, height: "17px", weight: 700, color: "#FFF" }),
        ...(!e.icon.badgeText && {
          opacity: 0,
          transform: "scale(0.5)",
          pointerEvents: "none",
        }),
      }),
    },
    eT = "sidebar-tab.sticker-pro";
  XP.Image.registerImages({ [eT]: "ui-igswiss/sticker-pro.png:36:16" }),
    (XP.SidebarTab = class extends XP.Component {
      render() {
        return Glamor.createElement(
          "div",
          { css: [JP.root, this.props.style] },
          this._renderTexts(),
          this._renderIcon()
        );
      }
      _renderTexts() {
        const e = this.props.texts;
        if (e)
          return Glamor.createElement(
            "div",
            { css: JP.texts },
            Glamor.createElement("div", { css: JP.title }, e.title),
            Glamor.createElement(
              "div",
              { css: JP.features },
              e.features.map((e) =>
                Glamor.createElement("div", { css: JP.feature, key: e }, e)
              )
            )
          );
      }
      _renderIcon() {
        const e = this.props.icon;
        return Glamor.createElement(
          "div",
          { css: [JP.icon, e.style] },
          !!e.svg &&
            Glamor.createElement(XP.SvgIcon, {
              style: JP.iconSvg,
              name: e.svg,
            }),
          !!e.image &&
            Glamor.createElement(XP.Image, {
              style: JP.iconImage,
              src: e.image,
            }),
          !!e.withMarker &&
            Glamor.createElement("div", { css: JP.iconMarker(this) }),
          !!e.withProSticker &&
            Glamor.createElement(XP.Image, {
              style: JP.iconProSticker,
              src: eT,
            }),
          Glamor.createElement("div", { css: JP.iconBadge(this) }, e.badgeText)
        );
      }
    });
  const { $ui: tT } = app;
  tT.Snackbar = class extends tT.Component {
    render() {
      return Glamor.createElement("div", null, this.props.children);
    }
  };
  const { $ui: rT } = app,
    nT = ({ props: e }) => ({
      ...rT.transition.slow,
      marginTop: rT.space.g3,
      ...(!e.show && {
        transform: "translateY(50px)",
        opacity: 0,
        display: "none",
      }),
    }),
    oT = [];
  rT.SnackbarItem = class extends rT.Component {
    constructor(e) {
      super(e), (this._rootRef = rT.createRef());
    }
    componentDidMount() {
      oT.push(this._rootRef);
    }
    componentWillUnmount() {
      const e = oT.indexOf(this._rootRef);
      oT.splice(e, 1);
    }
    getSnapshotBeforeUpdate(e) {
      if (this.props.show !== e.show)
        for (const e of oT.reverse()) {
          const t = e.current;
          rT.flip.add(t);
        }
      return null;
    }
    componentDidUpdate() {
      rT.flip.run();
    }
    render() {
      return Glamor.createElement(
        "div",
        { css: nT(this), ref: this._rootRef, key: this.props.id },
        this.props.children
      );
    }
  };
  const { $ui: aT } = app,
    iT = {
      root: { maxWidth: 360 },
      icon: ({ props: e }) => ({
        flexShrink: 0,
        width: 22,
        height: 22,
        marginRight: aT.space.g1h,
        color: "#707070",
        ...("bulb" === e.icon && { color: aT.color.attention }),
      }),
      content: {
        fontFamily: aT.font.secondary,
        fontSize: 11,
        color: "#6E6D6E",
      },
      paragraph: { "&:not(:last-child)": { marginBottom: aT.space.g0h } },
      buttons: { ...aT.row, marginTop: aT.space.g1 },
      button: { "&:not(:last-child)": { marginRight: aT.space.g3 } },
    },
    sT = { exclamation: "tip.exclamation", bulb: "tip.bulb" };
  aT.SvgIcon.registerSvgIcons([
    `<symbol id="${sT.exclamation}" viewBox="0 0 22 22"><path d="M11.241 21.952c5.916 0 10.711-4.795 10.711-10.711C21.952 5.326 17.157.53 11.241.53 5.326.53.53 5.326.53 11.241c0 5.916 4.796 10.711 10.711 10.711z" fill="currentColor"/><path d="M9.825 6.65h2.846l-.474 6.992h-1.9L9.825 6.65zm1.423 10.833a1.451 1.451 0 01-1.364-.854 1.32 1.32 0 01-.105-.538 1.282 1.282 0 01.413-.972 1.476 1.476 0 011.056-.39c.39-.015.77.126 1.056.39a1.282 1.282 0 01.413.972 1.32 1.32 0 01-.421.987 1.452 1.452 0 01-1.048.405z" fill="#fff"/></symbol>`,
    `<symbol id="${sT.bulb}" viewBox="0 0 23 23"><path d="M9.494 7.623a2.347 2.347 0 0 1 1.657-.687.469.469 0 1 0 0-.938A3.286 3.286 0 0 0 7.869 9.28a.469.469 0 1 0 .938 0c0-.621.248-1.217.687-1.657z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M22.184 11.092c0 6.126-4.966 11.092-11.092 11.092S0 17.218 0 11.092 4.966 0 11.092 0s11.092 4.966 11.092 11.092zM8.965 17.956a.938.938 0 0 1-.157-.518l-.001-1.124h4.687v1.124a.938.938 0 0 1-.157.518l-.5.753a.938.938 0 0 1-.781.419h-1.81a.939.939 0 0 1-.781-.419l-.5-.753zM7.27 12.674a5.157 5.157 0 1 1 7.76 0 8.43 8.43 0 0 0-1.53 2.68v.023H8.8v-.023a8.423 8.423 0 0 0-1.53-2.68z" fill="currentColor"/></symbol>`,
  ]),
    (aT.Tip = class extends aT.Component {
      constructor(...e) {
        var t;
        return (
          (t = super(...e)),
          (this._renderParagraph = (e, t) =>
            Glamor.createElement(
              "div",
              { css: iT.paragraph, key: "paragraph_" + t },
              e
            )),
          t
        );
      }
      render() {
        const e = this.props.icon || "exclamation",
          t = [].concat(this.props.content);
        return Glamor.createElement(
          "div",
          { css: [aT.row, iT.root] },
          Glamor.createElement(aT.SvgIcon, {
            style: iT.icon(this),
            name: sT[e],
          }),
          Glamor.createElement(
            "div",
            null,
            Glamor.createElement(
              "div",
              { css: iT.content },
              t.map(this._renderParagraph)
            ),
            this._renderButtons()
          )
        );
      }
      _renderButtons() {
        const e = this.props.buttons;
        return e && 0 !== e.length
          ? Glamor.createElement(
              "div",
              { css: iT.buttons },
              e.map((e, t) =>
                Glamor.createElement(
                  "div",
                  { css: iT.button, key: `${e.label}_${t}` },
                  Glamor.createElement(aT.LinkButton, {
                    small: !0,
                    label: e.label,
                    onClick: e.onClick,
                  })
                )
              )
            )
          : null;
      }
    });
  const { $ui: lT } = app;
  lT.TosSummary = class extends lT.Component {
    constructor(...e) {
      var t;
      return (
        (t = super(...e)),
        (this._onClose = () => {
          this.props.onClose && this.props.onClose();
        }),
        (this._onOkClick = () => {
          this.props.onOkClick && this.props.onOkClick();
        }),
        (this._onFullTermsClick = () => {
          this.props.onFullTermsClick && this.props.onFullTermsClick();
        }),
        (this._onPrivacyPolicyClick = () => {
          this.props.onPrivacyPolicyClick && this.props.onPrivacyPolicyClick();
        }),
        (this._onFaqClick = () => {
          this.props.onFaqClick && this.props.onFaqClick();
        }),
        t
      );
    }
    render() {
      return Glamor.createElement(lT.InfoCard, {
        title: this.props.title || "ToS & Privacy Summary",
        content: this.props.content || [
          "Inssist is an independent project and is not affiliated with Instagram or Facebook in any way. Inssist is provided ‚Äúas is‚Äù.",
          "We take your privacy seriously and do not collect, process or sell your Instagram or other browsing data from your PC.",
          "We support further development by providing optional paid features such as Scheduling, Insights & Analytics, Multiaccount,DM ghost mode, posting Carousels, etc.",
        ],
        subcontent:
          this.props.subcontent ||
          Glamor.createElement(
            "div",
            null,
            "Want to report a bug or request a feature?",
            Glamor.createElement("br", null),
            "Send us a mail at ",
            Glamor.createElement("b", null, "inssist@slashed.io")
          ),
        onClose: this._onClose,
        actions: [
          { label: "OK, GOT IT", onClick: this._onOkClick },
          null,
          { label: "FULL TERMS", onClick: this._onFullTermsClick },
          { label: "PRIVACY POLICY", onClick: this._onPrivacyPolicyClick },
          { label: "FAQ", onClick: this._onFaqClick },
        ],
      });
    }
  };
  const { $ui: cT } = app,
    uT = {
      root: ({ props: e }) => ({
        ...cT.row,
        ...cT.center,
        ...cT.absolute("0 0 0 0"),
        ...cT.transition.slow,
        transitionProperty: "opacity",
        zIndex: 10,
        backdropFilter: "blur(4px)",
        userSelect: "none",
        overflow: "hidden",
        "&::before": {
          content: '""',
          ...cT.absolute("0 0 0 0 -1"),
          background: cT.color.bgLight3,
          opacity: 0.75,
        },
        ...(!e.show && { pointerEvents: "none", opacity: 0 }),
      }),
      art: {
        ...cT.absolute(". 0 0 ."),
        zIndex: 0,
        "@media (max-width: 1350px)": { display: "none" },
      },
      content: ({ props: e }) => ({
        ...cT.transition.slow,
        transitionProperty: "transform",
        userSelect: "text",
        ...(!e.show && { transform: "scale(1.1)" }),
      }),
    };
  var dT, hT;
  cT.UpsellOverlay = class extends cT.Component {
    constructor(e) {
      super(e),
        (this._onOverlayClick = (e) => {
          this._contentRef.current.contains(e.target) ||
            (this.props.onOverlayClick && this.props.onOverlayClick());
        }),
        (this._contentRef = cT.createRef());
    }
    render() {
      return Glamor.createElement(
        "div",
        {
          id: this.props.id,
          css: [uT.root(this), this.props.style],
          onClick: this._onOverlayClick,
        },
        this.props.noArt
          ? null
          : Glamor.createElement(cT.Image, {
              style: uT.art,
              src: "pro-art-1",
              width: 355,
              height: 451,
            }),
        Glamor.createElement(
          "div",
          { css: uT.content(this), ref: this._contentRef },
          this.props.content
        )
      );
    }
  };
  const { $ui: pT } = app,
    mT = {
      root: {
        ...pT.relative(),
        transition: "all 300ms var(--timing-function) 0ms",
        borderRadius: "50%",
      },
      rootSizes: {},
      frame: {
        ...pT.absolute("2 2 2 2"),
        backgroundColor: pT.color.bgLight1,
        borderRadius: "50%",
      },
      imagePositionInset: pT.absolute("4 4 4 4"),
      imagePositionFull: pT.absolute("0 0 0 0"),
      image: {
        flexShrink: 0,
        borderRadius: "50%",
        backgroundSize: "cover",
        backgroundRepeat: "no-repeat",
        backgroundPosition: "center",
        backgroundColor: pT.color.bgLight1,
      },
      greyOutOverlay: (e) => ({
        ...(e.frame ? pT.absolute("4 4 4 4") : pT.absolute("0 0 0 0")),
        borderRadius: "50%",
        opacity: 0.6,
        backgroundColor: pT.color.bgLight1,
      }),
    };
  pT.UserAvatar =
    ((hT = dT =
      class extends pT.Component {
        constructor(e) {
          super(e),
            (this.mounted = !1),
            (this.state = {
              isLoaded: e.avatarUrl in pT.UserAvatar.loadedImages,
            });
        }
        async componentDidMount() {
          if (((this.mounted = !0), this.props.avatarUrl)) {
            if (pT.UserAvatar.loadedImages[this.props.avatarUrl])
              return void (
                this.state.isLoaded || this.setState({ isLoaded: !0 })
              );
            fetch(this.props.avatarUrl)
              .then(() => {
                (pT.UserAvatar.loadedImages[this.props.avatarUrl] = !0),
                  this.mounted && this.setState({ isLoaded: !0 });
              })
              .catch(() => {});
          }
        }
        componentWillUnmount() {
          this.mounted = !1;
        }
        render() {
          const e = [
              mT.root,
              { width: this.props.size, height: this.props.size },
              this.props.frame && { background: this.props.frame },
            ],
            t = [
              mT.image,
              this.props.frame || this.props.loading
                ? mT.imagePositionInset
                : mT.imagePositionFull,
            ];
          return Glamor.createElement(
            "div",
            { css: e },
            this.props.frame && Glamor.createElement("div", { css: mT.frame }),
            Glamor.createElement("div", {
              css: t,
              style: { backgroundImage: `url('${this.props.avatarUrl}')` },
              draggable: "false",
              "cdn-proxy-image": "",
            }),
            this.props.greyOut &&
              Glamor.createElement("div", {
                css: mT.greyOutOverlay(this.props),
              }),
            this.props.loading &&
              Glamor.createElement(pT.ProgressRing, {
                size: this.props.size,
                value: 20,
                spinning: !0,
              })
          );
        }
      }),
    (dT.defaultProps = { size: 36 }),
    (dT.loadedImages = {}),
    hT);
  const { $ui: gT } = app,
    fT = {
      root: { position: "relative", width: 520 },
      title: {
        fontFamily: gT.font.primary,
        fontSize: 42,
        fontWeight: 700,
        lineHeight: "52px",
      },
      text: { fontFamily: gT.font.secondary, fontSize: 18 },
      listItem: {
        paddingLeft: 38,
        position: "relative",
        "&:not(:last-child)": { marginBottom: gT.space.g1 },
        "&::before": {
          content: '""',
          position: "absolute",
          left: gT.space.g2,
          top: 9,
          width: 6,
          height: 6,
          borderRadius: "50%",
          background: gT.color.textNormal,
        },
      },
      disclaimer: {
        fontFamily: gT.font.secondary,
        position: "absolute",
        top: "100%",
        marginTop: gT.space.g5,
        fontSize: 11,
        color: gT.color.textNormal,
        opacity: 0.5,
        "& a": { color: "inherit" },
        "& a:hover": { textDecoration: "underline" },
      },
    };
  gT.Welcome = class extends gT.Component {
    constructor(...e) {
      var t;
      return (
        (t = super(...e)),
        (this._onButtonClick = () => {
          this.props.onButtonClick && this.props.onButtonClick();
        }),
        t
      );
    }
    render() {
      const e = this.props,
        t = e.description && Glamor.createElement("div", null, e.description),
        r =
          e.listItems &&
          Glamor.createElement(
            gT.Fragment,
            null,
            Glamor.createElement(gT.Spacer, { height: "g2" }),
            Glamor.createElement(
              "div",
              null,
              e.listItems.map((e, t) =>
                Glamor.createElement("div", { css: fT.listItem, key: t }, e)
              )
            )
          ),
        n =
          e.comingSoon &&
          Glamor.createElement(
            gT.Fragment,
            null,
            Glamor.createElement(gT.Spacer, { height: "g2" }),
            Glamor.createElement(
              "div",
              {
                css: [gT.row, gT.justifyContent.between, gT.alignItems.center],
              },
              Glamor.createElement("div", null, e.comingSoon),
              Glamor.createElement(gT.Spacer, { width: "g2" }),
              Glamor.createElement(gT.Badge, { text: "coming soon" })
            )
          );
      return Glamor.createElement(
        "div",
        { css: fT.root },
        Glamor.createElement("div", { css: fT.title }, e.title),
        Glamor.createElement(gT.Spacer, { height: "g2" }),
        Glamor.createElement("div", { css: fT.text }, t, r, n),
        Glamor.createElement(gT.Spacer, { height: "g5" }),
        Glamor.createElement(gT.PrimaryButton, {
          label: e.buttonLabel,
          onClick: this._onButtonClick,
        }),
        Glamor.createElement("div", { css: fT.disclaimer }, e.disclaimer)
      );
    }
  };
  const { $ui: vT } = app,
    bT = {
      root: ({ props: e }) => ({
        ...vT.row,
        flexWrap: "wrap",
        margin: -5,
        ...(e.isReelsView && { width: 368 }),
      }),
      image: ({ props: e }, t) => ({
        width: 125,
        height: 125,
        backgroundSize: "cover",
        backgroundPosition: "center",
        backgroundColor: "#000",
        borderRadius: 3,
        margin: 5,
        ...vT.relative(),
        "&::before": {
          content: '""',
          ...vT.absolute("-2 -2 -2 -2"),
          ...vT.clickable,
          ...vT.transition.fast,
          borderRadius: 5,
          border: `2px solid ${vT.color.link}`,
          opacity: 0,
          ...(e.selectedImage === t && { opacity: 1 }),
        },
        "&:hover::before": { opacity: 1 },
        ...(e.isReelsView && { width: 82, height: 145 }),
      }),
      checkmark: {
        ...vT.absolute("g1 g1 . ."),
        ...vT.row,
        ...vT.center,
        ...vT.shadow.sh10,
        width: 20,
        height: 20,
        borderRadius: "50%",
        background: vT.color.link,
        pointerEvents: "none",
      },
      checkmarkIcon: { color: "#FFF", width: 12 },
    },
    yT = "cover-assist-frame-gallery.checkmark";
  vT.SvgIcon.registerSvgIcons([
    `<symbol id="${yT}" viewBox="0 0 14.001 10"><path d="M5 9.999l-5-5 1-1 4 3 8-7 1 1-9 9z" fill="currentColor"/></symbol>`,
  ]),
    (vT.CoverAssistFrameGallery = class extends vT.Component {
      constructor(...e) {
        var t;
        return (
          (t = super(...e)),
          (this._renderImage = (e) =>
            Glamor.createElement(
              "div",
              {
                css: bT.image(this, e),
                style: { backgroundImage: `url('${e}')` },
                key: e,
                "data-image": e,
                onClick: this._onImageClick,
              },
              this.props.selectedImage === e &&
                Glamor.createElement(
                  "div",
                  { css: bT.checkmark },
                  Glamor.createElement(vT.SvgIcon, {
                    style: bT.checkmarkIcon,
                    name: yT,
                  })
                )
            )),
          (this._onImageClick = (e) => {
            if (!this.props.onImageClick) return;
            const t = e.currentTarget.dataset.image;
            this.props.onImageClick(t);
          }),
          t
        );
      }
      render() {
        return Glamor.createElement(
          "div",
          { css: bT.root(this) },
          this.props.images.map(this._renderImage)
        );
      }
    });
  const { $ui: wT } = app,
    CT = {
      root: ({ props: e }) => ({
        width: 395,
        ...(e.isReelsView && { width: 300 }),
      }),
      video: ({ props: e }) => ({
        width: 395,
        height: 395,
        objectFit: "cover",
        background: "#000",
        borderRadius: 4,
        ...(e.isReelsView && {
          width: 300,
          height: Math.round((16 / 9) * 300),
        }),
      }),
      time: {
        ...wT.text.bleak,
        textAlign: "center",
        marginTop: wT.space.g1h,
        fontVariantNumeric: "tabular-nums",
      },
      range: { ...wT.relative(), height: 14, marginTop: wT.space.g1h },
      rangeTrack: ({ props: e }) => ({
        ...wT.absolute("5 0 . 0"),
        height: 4,
        background: `linear-gradient(\n      to right,\n      ${
          wT.color.link
        } ${100 * e.value}%,\n      ${wT.color.iconPassive} ${
          100 * e.value
        }%\n    )`,
      }),
      rangeInput: {
        width: "100%",
        height: 4,
        appearance: "none",
        background: "transparent",
        cursor: "pointer",
        ...wT.absolute("5 0 . 0"),
        "&::-webkit-slider-thumb": {
          appearance: "none",
          width: 14,
          height: 14,
          background: wT.color.bgLight3,
          borderRadius: "50%",
          border: `2px solid ${wT.color.link}`,
        },
      },
    };
  wT.CoverAssistFrameSelect = class extends wT.Component {
    constructor(e) {
      super(e),
        (this._onLoadedMetadata = () => {
          const e = this._videoRef.current;
          this.setState({ duration: e.duration });
        }),
        (this._onChange = (e) => {
          const t = Number(e.currentTarget.value);
          this.props.onValueChange(t);
        }),
        (this._canvas = null),
        (this._loadFramePromise = null),
        (this._imageSelectTimeout = null),
        (this._videoRef = wT.createRef()),
        (this.state = { duration: null });
    }
    componentDidMount() {
      this._updateDuration();
    }
    componentWillUnmount() {
      this._videoRef.current.removeEventListener(
        "loadedmetadata",
        this._onLoadedMetadata
      );
    }
    componentDidUpdate(e, t) {
      if (
        (this.props.videoUrl !== e.videoUrl && this._updateDuration(),
        (this.props.value !== e.value && this.state.duration) ||
          (this.state.duration && !t.duration))
      ) {
        const e = this._videoRef.current;
        (e.currentTime = this.state.duration * this.props.value),
          (this._loadFramePromise = new Promise((t) => {
            e.oncanplay = () => {
              t();
            };
          })),
          this.props.onImageSelect &&
            (clearTimeout(this._imageSelectTimeout),
            (this._imageSelectTimeout = setTimeout(async () => {
              await this._loadFramePromise;
              const e = await this._getCurrentFrameUrl();
              this.props.onImageSelect(e);
            }, 300)));
      }
    }
    render() {
      return Glamor.createElement(
        "div",
        { css: CT.root(this) },
        Glamor.createElement("video", {
          css: CT.video(this),
          ref: this._videoRef,
          src: this.props.videoUrl,
        }),
        !!this.state.duration &&
          Glamor.createElement(
            wT.Fragment,
            null,
            Glamor.createElement("div", { css: CT.time }, this._getTimeSting()),
            Glamor.createElement(
              "div",
              { css: CT.range },
              Glamor.createElement("div", { css: CT.rangeTrack(this) }),
              Glamor.createElement("input", {
                css: CT.rangeInput,
                type: "range",
                value: this.props.value,
                step: 0.001,
                min: 0,
                max: 1,
                onChange: this._onChange,
              })
            )
          )
      );
    }
    _getTimeSting() {
      const e = this.props.value * this.state.duration * 1e3;
      return `${Math.floor(e / 1e3)
        .toString()
        .padStart(2, 0)}‚Äâ:‚Äâ${Math.round(e % 1e3)
        .toString()
        .padStart(2, 0)
        .slice(0, 2)}`;
    }
    _updateDuration() {
      const e = this._videoRef.current;
      e.duration
        ? this.setState({ duration: e.duration })
        : (this.setState({ duration: null }),
          e.addEventListener("loadedmetadata", this._onLoadedMetadata));
    }
    async _getCurrentFrameUrl() {
      const e = this._videoRef.current;
      if (!document.body.contains(e)) return;
      this._canvas ||
        ((this._canvas = document.createElement("canvas")),
        (this._canvas.width = e.videoWidth),
        (this._canvas.height = e.videoHeight));
      this._canvas.getContext("2d").drawImage(e, 0, 0);
      const t = await new Promise((e) => {
        this._canvas.toBlob(e, "image/jpeg");
      });
      return URL.createObjectURL(t);
    }
  };
  const { $ui: kT } = app,
    ST = {
      root: {},
      dropzone: ({ props: e, state: t }) => ({
        ...kT.column,
        ...kT.center,
        ...kT.borderRadius.r4,
        ...kT.transition.superslow,
        ...kT.padding("0 g2"),
        transitionProperty: "border-color",
        width: 395,
        height: 395,
        backgroundColor: kT.color.bgLight2,
        border: `2px dashed ${kT.color.iconPassive}`,
        cursor: "pointer",
        ...(e.image && {
          border: "none",
          backgroundImage: `url('${e.image}')`,
          backgroundSize: "cover",
          backgroundPosition: "center",
          "& > *": { display: "none !important" },
        }),
        ...(e.isReelsView && {
          width: 300,
          height: Math.round((16 / 9) * 300),
        }),
        ...(t.draggingOverDropzone && { borderColor: kT.color.primary }),
      }),
      icon: ({ props: e }) => ({
        width: 133,
        height: 168,
        color: kT.color.iconPassive,
        ...(e.isReelsView && { transform: "scale(0.8)" }),
      }),
      title: { marginTop: 36, pointerEvents: "none" },
      subtitle: {
        ...kT.text.bleak,
        width: 285,
        maxWidth: "100%",
        marginTop: 8,
        textAlign: "center",
      },
      selectAnotherButton: ({ props: e }) => ({
        marginTop: kT.space.g2,
        ...(!e.image && { display: "none" }),
      }),
    },
    ET = "igswiss.drop";
  kT.CoverAssistFrameUpload = class extends kT.Component {
    constructor(e) {
      super(e),
        (this._onDropzoneDragOver = (e) => {
          e.preventDefault(),
            this.setState({ draggingOverDropzone: !0 }),
            clearTimeout(this._dropzoneDragLeaveTimer),
            (this._dropzoneDragLeaveTimer = setTimeout(() => {
              this.setState({ draggingOverDropzone: !1 });
            }, 30));
        }),
        (this._onDropzoneDrop = (e) => {
          e.preventDefault(), e.stopPropagation();
          const t = Array.from(e.dataTransfer.files)[0];
          t && this.props.onFileSelect && this.props.onFileSelect(t);
        }),
        (this._selectFile = () => {
          this._input ||
            ((this._input = document.createElement("input")),
            this._input.setAttribute("type", "file"),
            this._input.setAttribute("accept", "image/jpeg, image/png"),
            this._input.addEventListener("change", (e) => {
              const t = Array.from(e.target.files)[0];
              t &&
                ((this._input.value = ""),
                this.props.onFileSelect && this.props.onFileSelect(t));
            })),
            this._input.click(),
            (this._input.value = "");
        }),
        (this._input = null),
        (this._dropzoneDragLeaveTimer = null),
        (this.state = { draggingOverDropzone: !1 });
    }
    render() {
      return Glamor.createElement(
        "div",
        { css: ST.root },
        Glamor.createElement(
          "div",
          {
            css: ST.dropzone(this),
            onDragOver: this._onDropzoneDragOver,
            onDrop: this._onDropzoneDrop,
            onClick: this._selectFile,
          },
          Glamor.createElement(kT.SvgIcon, { style: ST.icon(this), name: ET }),
          Glamor.createElement(kT.LinkButton, {
            buttonStyle: ST.title,
            label: "SELECT A PHOTO",
          }),
          Glamor.createElement(
            "div",
            { css: ST.subtitle },
            "Click or drop a photo to be used as video cover. Must be a¬†JPG or PNG file."
          )
        ),
        Glamor.createElement(kT.LinkButton, {
          buttonStyle: ST.selectAnotherButton(this),
          onClick: this._selectFile,
          label: "SELECT ANOTHER PHOTO",
        })
      );
    }
  };
  const { $ui: _T } = app,
    xT = {
      root: { ..._T.row, flexWrap: "wrap", width: 402, margin: -1 },
      image: {
        width: 132,
        height: 132,
        margin: 1,
        backgroundSize: "cover",
        backgroundPosition: "center",
        backgroundColor: _T.color.bgLight1,
      },
    };
  _T.CoverAssistGrid = class extends _T.Component {
    constructor(...e) {
      var t;
      return (
        (t = super(...e)),
        (this._renderImage = (e) =>
          Glamor.createElement("div", {
            key: e,
            css: xT.image,
            style: { backgroundImage: `url('${e}')` },
            "cdn-proxy-image": "",
          })),
        t
      );
    }
    render() {
      return Glamor.createElement(
        "div",
        { css: xT.root },
        this.props.images.map(this._renderImage)
      );
    }
  };
  const { $ui: PT } = app,
    TT = {
      root: { width: "100%", height: "100%", ...PT.relative() },
      loadingOverlay: ({ props: e }) => ({
        ...PT.absolute("0 0 0 0 1"),
        ...PT.row,
        ...PT.center,
        background: PT.color.bgLight3,
        ...(!e.loading && { display: "none" }),
      }),
      body: {
        ...PT.column,
        ...PT.relative(),
        ...PT.padding("0 g2 g1h g2"),
        minHeight: "100%",
      },
      closeButton: { ...PT.absolute("4 4 . .") },
      mainScreen: ({ props: e }) => ({
        paddingTop: PT.space.g2,
        ...(e.showGrid && { display: "none" }),
      }),
      content: { marginTop: PT.space.g1h },
      tabContent: ({ props: e }, t) => ({
        ...(e.selectedTabId !== t && { display: "none" }),
      }),
      tabDescription: { ...PT.text.bleak, marginBottom: PT.space.g1h },
      gridScreen: ({ props: e }) => ({
        marginTop: 20,
        marginLeft: `calc(-1 * ${PT.space.g2})`,
        marginRight: `calc(-1 * ${PT.space.g2})`,
        ...(!e.showGrid && { display: "none" }),
      }),
      gridScreenTitle: {
        ...PT.text.group2,
        ...PT.padding("0 g2"),
        marginBottom: 20,
      },
      gridContainer: {
        height: 576,
        overflow: "hidden",
        ...PT.padding("0 g2"),
        ...PT.relative(),
        "&::before": {
          content: '""',
          ...PT.absolute(". -16 0 -16"),
          height: 1,
          background: PT.color.borderDark,
        },
      },
      defaultFooter: {
        marginTop: "auto",
        paddingTop: PT.space.g1h,
        ...PT.row,
        ...PT.justifyContent.between,
        ...PT.alignItems.center,
      },
      upgradeFooter: { marginTop: "auto" },
      upgradeFooterButtons: {
        ...PT.row,
        ...PT.justifyContent.between,
        ...PT.alignItems.center,
      },
      upgradeButton: ({ props: e }) => ({
        ...PT.clickableInversed,
        color: PT.color.textInversed,
        ...(e.hasPro && { display: "none" }),
        ...(e.showGrid && { display: "none" }),
      }),
      applyButton: ({ props: e }) => ({
        ...(!e.hasPro && { display: "none" }),
        ...(e.showGrid && { display: "none" }),
      }),
      resetButton: ({ props: e }) => ({
        ...(e.showGrid && { display: "none" }),
        ...(!e.showResetButton && { display: "none" }),
      }),
      gridButton: {
        marginLeft: "auto",
        paddingLeft: PT.space.g1,
        paddingRight: PT.space.g1,
      },
      gridButtonTooltip: { marginLeft: -9 },
      warning: ({ props: e }) => ({
        ...PT.row,
        marginBottom: PT.space.g1,
        paddingTop: PT.space.g1h,
        borderTop: `1px solid ${PT.color.borderDark}`,
        ...(e.showGrid && { opacity: 0 }),
      }),
      warningIcon: { flexShrink: 0, color: PT.color.attention, width: 18 },
      warningText: { ...PT.text.bleak, marginLeft: PT.space.g1h },
    },
    IT = "cover-assist-panel.grid";
  PT.SvgIcon.registerSvgIcons([
    `<symbol id="${IT}" viewBox="0 0 19 19"><path d="M0 0h4.886v4.886H0zm7.057 0h4.886v4.886H7.057zm7.057 0H19v4.886h-4.886zM0 7.059h4.886v4.886H0zm7.057 0h4.886v4.886H7.057zm7.057 0H19v4.886h-4.886zM0 14.115h4.886v4.886H0zm7.057 0h4.886v4.886H7.057zm7.057 0H19v4.886h-4.886z" fill="currentColor"/></symbol>`,
  ]),
    (PT.CoverAssistPanel = class extends PT.Component {
      constructor(...e) {
        var t;
        return (
          (t = super(...e)),
          (this._onCloseClick = () => {
            this.props.onCloseClick && this.props.onCloseClick();
          }),
          (this._onTabClick = (e) => {
            this.props.onTabClick && this.props.onTabClick(e.id);
          }),
          (this._onUpgradeToProClick = () => {
            this.props.onUpgradeToProClick && this.props.onUpgradeToProClick();
          }),
          (this._onResetClick = () => {
            this.props.onResetClick && this.props.onResetClick();
          }),
          (this._onGridButtonClick = () => {
            this.props.onGridButtonClick && this.props.onGridButtonClick();
          }),
          t
        );
      }
      render() {
        return Glamor.createElement(
          "div",
          { css: TT.root },
          Glamor.createElement(
            "div",
            { css: TT.loadingOverlay(this) },
            Glamor.createElement(PT.ProgressRing, { spinning: !0, value: 30 })
          ),
          this.props.upsellOverlay,
          Glamor.createElement(
            "div",
            { css: TT.body },
            this._renderCloseButton(),
            this._renderMainScreen(),
            this._renderGridScreen(),
            this._renderDefaultFooter(),
            this._renderUpgradeFooter()
          )
        );
      }
      _renderCloseButton() {
        return Glamor.createElement(PT.CloseButton, {
          style: TT.closeButton,
          onClick: this._onCloseClick,
        });
      }
      _renderMainScreen() {
        return Glamor.createElement(
          "div",
          { css: TT.mainScreen(this) },
          Glamor.createElement(PT.TabBar, {
            tabs: [
              { id: "auto", label: "AUTO COVER" },
              { id: "frame", label: "FRAME" },
              { id: "upload", label: "UPLOAD" },
            ],
            selectedTabId: this.props.selectedTabId,
            onTabClick: this._onTabClick,
          }),
          Glamor.createElement(
            "div",
            { css: TT.content },
            Glamor.createElement(
              "div",
              { css: TT.tabContent(this, "auto") },
              Glamor.createElement(
                "div",
                { css: TT.tabDescription },
                "Select one of these frames from your video."
              ),
              this.props.frameGallery
            ),
            Glamor.createElement(
              "div",
              { css: TT.tabContent(this, "frame") },
              Glamor.createElement(
                "div",
                { css: TT.tabDescription },
                "Choose any still frame from your video."
              ),
              this.props.frameSelect
            ),
            Glamor.createElement(
              "div",
              { css: TT.tabContent(this, "upload") },
              Glamor.createElement(
                "div",
                { css: TT.tabDescription },
                "Upload a custom image."
              ),
              this.props.frameUpload
            )
          )
        );
      }
      _renderGridScreen() {
        return Glamor.createElement(
          "div",
          { css: TT.gridScreen(this) },
          Glamor.createElement(
            "div",
            { css: TT.gridScreenTitle },
            "PREVIEW INSTAGRAM GRID"
          ),
          Glamor.createElement(
            "div",
            { css: TT.gridContainer },
            this.props.grid
          )
        );
      }
      _renderDefaultFooter() {
        return this.props.hasPro
          ? Glamor.createElement(
              "div",
              { css: TT.defaultFooter },
              Glamor.createElement(PT.LinkButton, {
                buttonStyle: TT.resetButton(this),
                label: "RESET TO DEFAULT",
                onClick: this._onResetClick,
              }),
              this._renderGridButton()
            )
          : null;
      }
      _renderUpgradeFooter() {
        return this.props.hasPro
          ? null
          : Glamor.createElement(
              "div",
              { css: TT.upgradeFooter },
              Glamor.createElement(
                "div",
                { css: TT.warning(this) },
                Glamor.createElement(PT.SvgIcon, {
                  style: TT.warningIcon,
                  name: "warning-triangle",
                }),
                Glamor.createElement(
                  "div",
                  { css: TT.warningText },
                  "Please consider upgrading to ",
                  Glamor.createElement("b", null, "apply custom covers"),
                  Glamor.createElement("br", null),
                  "and support development."
                )
              ),
              Glamor.createElement(
                "div",
                { css: TT.upgradeFooterButtons },
                Glamor.createElement(PT.ActionButton, {
                  label: "UPGRADE TO PRO",
                  style: TT.upgradeButton(this),
                  background: PT.color.attention,
                  onClick: this._onUpgradeToProClick,
                }),
                this._renderGridButton()
              )
            );
      }
      _renderGridButton() {
        return Glamor.createElement(PT.ActionButton, {
          cancel: !0,
          style: TT.gridButton,
          icon: IT,
          tooltip: {
            style: TT.gridButtonTooltip,
            title: "Preview Instagram Grid",
            showDelay: 500,
          },
          color: this.props.showGrid ? "#FFF" : PT.color.link,
          borderColor: this.props.showGrid
            ? "transparent"
            : PT.color.borderDark,
          background: this.props.showGrid
            ? PT.color.link
            : PT.color.borderLight,
          onClick: this._onGridButtonClick,
        });
      }
    });
  const { $ui: GT } = app;
  function DT(e, t) {
    return null === e || null === t ? null : e / t;
  }
  function AT(e) {
    return !e || (_.isNil(e.avgLikes) && _.isNil(e.avgComments))
      ? null
      : (e.avgLikes || 0) + 10 * (e.avgComments || 0);
  }
  GT.tagUtils = {
    engagementToBgColor: function (e, t, r) {
      if (e.isBanned || e.isFlagged) return null;
      const n = DT(AT(e), AT(t));
      if (null === n) return null;
      const o = [r.low, r.medium, r.high],
        a = ["#c0aede", "#d8b5ca", "#edbcb5", "#ffc3a0"];
      for (let e = 0; e < o.length; e++) if (n < o[e]) return a[e];
      return a[a.length - 1];
    },
    engagementToIconColor: function (e, t) {
      const r = DT(AT(e), AT(t));
      return null === r ? null : r >= 3 ? GT.color.error : GT.color.primary;
    },
    engagementToLabel: function (e, t, r) {
      const n = DT(AT(e), AT(t));
      if (null === n) return "N/A";
      const o = [r.low, r.medium, r.high],
        a = ["Low", "Medium", "High", "Very High"];
      for (let e = 0; e < o.length; e++) if (n < o[e]) return a[e];
      return a[a.length - 1];
    },
    engagementToMessage: function (e, t, r) {
      const n = DT(AT(e), AT(t));
      if (null === n) return null;
      const o = [r.low, r.medium, r.high],
        a = [
          {
            title: "Niche",
            content:
              "Engagement on top posts with this hashtag is lower than your account's average.",
          },
          {
            title: "Good",
            content:
              "Top posts of this hashtag have engagement similar to your account's average. It should be possible to rank  among the top posts for this hashtag.",
          },
          {
            title: "Competitive",
            content: `It will not be easy for your post to get featured among the top ones for this hashtag. Your average post's daily likes is ${GT.toShortNumber(
              t.avgLikes
            )}, and the hashtag average is ${GT.toShortNumber(e.avgLikes)}.`,
          },
          {
            title: "Very Competitive",
            content: `It is extremely unlikely that your post will get featured among the top ones for this hashtag. Your average post's daily likes is ${GT.toShortNumber(
              t.avgLikes
            )}, and the hashtag average is ${GT.toShortNumber(e.avgLikes)}.`,
          },
        ];
      for (let e = 0; e < o.length; e++) if (n < o[e]) return a[e];
      return a[a.length - 1];
    },
    calcRate: DT,
    calcEngagement: AT,
    calcReach: function (e) {
      if (!e || (_.isNil(e.avgLikes) && _.isNil(e.avgComments))) return null;
      return Math.round(8.36 * (e.avgLikes || 0 + e.avgComments || 0));
    },
    hasEngagementData: function (e) {
      return (
        !!e &&
        !(
          _.isNil(e.avgLikes) &&
          _.isNil(e.avgComments) &&
          _.isNil(e.avgPosts) &&
          _.isNil(e.totalPosts) &&
          _.isNil(e.isBanned) &&
          _.isNil(e.isFlagged) &&
          _.isNil(e.lastScanOn)
        )
      );
    },
  };
  const { $ui: MT } = app;
  let FT = null;
  MT.tagTooltips = () =>
    FT ||
    ((FT = {
      engagement: {
        text: [
          Glamor.createElement(
            React.Fragment,
            null,
            "An average number of likes and comments ",
            Glamor.createElement("strong", null, "top posts"),
            " for the hashtag get in 24 hours, relative to your account‚Äôs average."
          ),
          Glamor.createElement(
            React.Fragment,
            null,
            "The higher the engagement, the less likely it is for your post to be seen among the top for that hashtag."
          ),
          Glamor.createElement(
            React.Fragment,
            null,
            "When choosing hashtags for your post, try to build a hashtag ladder, e.g.:",
            Glamor.createElement(
              "ul",
              { style: { marginLeft: 24 } },
              Glamor.createElement(
                "li",
                null,
                "8 hashtags with engagement that is 30% lower than your account‚Äôs average"
              ),
              Glamor.createElement(
                "li",
                null,
                "8 hashtags with engagement that is similar to yours"
              ),
              Glamor.createElement(
                "li",
                null,
                "8 hashtags that are 30% above your average account engagement"
              )
            )
          ),
        ],
      },
      posts: {
        text: [
          Glamor.createElement(
            React.Fragment,
            null,
            "An average number of posts made for this hashtag every 24 hours."
          ),
          Glamor.createElement(
            React.Fragment,
            null,
            "The lower this number, the easier it is to compete for the place among the top posts for this hashtag."
          ),
        ],
      },
      likes: {
        text: Glamor.createElement(
          React.Fragment,
          null,
          "An average number of likes that a ",
          Glamor.createElement("strong", null, "top post"),
          " with this hashtag gets in the first 24 hours since it is posted."
        ),
      },
      comments: {
        text: Glamor.createElement(
          React.Fragment,
          null,
          "An average number of comments that a ",
          Glamor.createElement("strong", null, "top post"),
          " with this hashtag gets in the first 24 hours since it is posted."
        ),
      },
      reach: {
        text: [
          Glamor.createElement(
            React.Fragment,
            null,
            "An estimated number of users that a ",
            Glamor.createElement("strong", null, "top post"),
            " with this hashtag reaches in the first 24 hours since it is posted."
          ),
          Glamor.createElement(
            React.Fragment,
            null,
            "This value is very rough estimate and is not meant to be precise. The higher this value the better."
          ),
          Glamor.createElement(
            React.Fragment,
            null,
            "If your post is not featured among the top ones for the hashtag, the actual reach will be lower."
          ),
        ],
      },
    }),
    FT);
  const { $ui: RT } = app,
    LT = {
      root: { ...RT.fullWidth },
      header: {
        ...RT.row,
        ...RT.justifyContent.between,
        ...RT.relative(),
        marginBottom: RT.space.g1h,
      },
      name: { ...RT.text.elementNormal, ...RT.text.ellipsis, fontWeight: 600 },
      actions: {
        ...RT.row,
        ...RT.text.nowrap,
        ...RT.transition.superfast,
        marginLeft: RT.space.g2,
        background: RT.color.bgLight3,
        ".tag-assist-collection:not(:hover) &": {
          ...RT.absolute("0 0 0 ."),
          opacity: 0,
          pointerEvents: "none",
        },
      },
      actionButton: {
        ...RT.row,
        marginRight: RT.space.g2,
        "&:last-child": { marginRight: 0 },
      },
      tagList: { marginLeft: RT.space.g1 },
      form: { marginLeft: RT.space.g1 },
      formFooter: { ...RT.row, ...RT.justifyContent.between },
      formError: {
        ...RT.text.elementNormal,
        lineHeight: "18px",
        color: RT.color.error,
      },
    };
  RT.TagAssistCollection = class extends RT.Component {
    constructor(e) {
      super(e),
        (this._onNameInputEnter = (e) => {
          e.preventDefault(), this.textInputRef.current.input.current.focus();
        }),
        (this.nameInputRef = RT.createRef()),
        (this.textInputRef = RT.createRef());
    }
    componentDidUpdate(e) {
      const t = e,
        r = this.props;
      !t.editing &&
        r.editing &&
        this.nameInputRef.current.input.current.focus();
    }
    render() {
      return Glamor.createElement(
        "div",
        { css: LT.root, className: "tag-assist-collection" },
        this._renderViewMode(),
        this._renderEditMode()
      );
    }
    _renderViewMode() {
      return this.props.editing
        ? null
        : Glamor.createElement(
            RT.Fragment,
            null,
            this._renderViewModeHeader(),
            this._renderTags()
          );
    }
    _renderEditMode() {
      return this.props.editing
        ? Glamor.createElement(
            RT.Fragment,
            null,
            this._renderEditModeHeader(),
            this._renderForm()
          )
        : null;
    }
    _renderViewModeHeader() {
      return Glamor.createElement(
        "div",
        { css: LT.header },
        Glamor.createElement("div", { css: LT.name }, this.props.name),
        Glamor.createElement(
          "div",
          { css: LT.actions },
          this.props.showCopyAll &&
            Glamor.createElement(RT.TagAssistCopyAllButton, {
              style: LT.actionButton,
              onClick: this.props.onCopyAllClick,
            }),
          this.props.showTakeAll &&
            Glamor.createElement(RT.LinkButton, {
              style: LT.actionButton,
              small: !0,
              label: "TAKE ALL",
              onClick: this.props.onTakeAllClick,
            }),
          this.props.showRemoveAll &&
            Glamor.createElement(RT.LinkButton, {
              style: LT.actionButton,
              small: !0,
              label: "REMOVE ALL",
              onClick: this.props.onRemoveAllClick,
            }),
          Glamor.createElement(RT.LinkButton, {
            style: LT.actionButton,
            small: !0,
            label: "EDIT",
            onClick: this.props.onEditClick,
          })
        )
      );
    }
    _renderTags() {
      return Glamor.createElement(RT.TagAssistList, {
        style: LT.tagList,
        tags: this.props.tags,
        noTagsMessage: "This collection is empty",
      });
    }
    _renderEditModeHeader() {
      return Glamor.createElement(
        "div",
        { css: LT.header },
        Glamor.createElement("div", { css: LT.name }, this.props.name),
        Glamor.createElement(
          "div",
          { css: LT.actions },
          Glamor.createElement(RT.LinkButton, {
            style: LT.actionButton,
            small: !0,
            label: "SAVE",
            disabled: !!this.props.editErrorMessage,
            onClick: this.props.editErrorMessage
              ? null
              : this.props.onSaveClick,
          }),
          Glamor.createElement(RT.LinkButton, {
            style: LT.actionButton,
            small: !0,
            cancel: !0,
            label: "CANCEL",
            onClick: this.props.onCancelClick,
          })
        )
      );
    }
    _renderForm() {
      return Glamor.createElement(
        "div",
        { css: LT.form },
        Glamor.createElement(RT.Input, {
          ref: this.nameInputRef,
          label: "rename to",
          spellCheck: !1,
          value: this.props.editName,
          onInput: this.props.onNameInput,
          onEnter: this._onNameInputEnter,
        }),
        Glamor.createElement(RT.Spacer, { height: "g1" }),
        Glamor.createElement(RT.Input, {
          ref: this.textInputRef,
          label: this.props.editTextLabel,
          placeholder: "e.g. #art #design #travel",
          lines: 5,
          spellCheck: !1,
          value: this.props.editText,
          onInput: this.props.onTextInput,
        }),
        Glamor.createElement(RT.Spacer, { height: "g1h" }),
        Glamor.createElement(
          "div",
          { css: LT.formFooter },
          Glamor.createElement(
            "div",
            { css: LT.formError },
            this.props.editErrorMessage
          ),
          Glamor.createElement(RT.LinkButton, {
            small: !0,
            color: RT.color.error,
            label: "DELETE COLLECTION",
            onClick: this.props.onDeleteClick,
          })
        )
      );
    }
  };
  const { $ui: BT } = app,
    OT = {
      root: {},
      label: { ...BT.row, ...BT.alignItems.center },
      iconContainer: {
        ...BT.row,
        ...BT.alignItems.center,
        ...BT.relative(),
        width: 13,
        marginRight: BT.space.g1,
      },
      iconCopy: ({ state: e }) => ({
        ...BT.absolute(". . . 2"),
        width: 12,
        height: 12,
        ...BT.transition.slow,
        ...(e.copied && { opacity: 0, transform: "translateY(-5px)" }),
      }),
      iconTick: ({ state: e }) => ({
        ...BT.absolute(". . . 3"),
        width: 11,
        height: 11,
        transform: "translateY(-0.3px)",
        ...BT.transition.slow,
        ...(!e.copied && { opacity: 0, transform: "translateY(5px)" }),
      }),
    },
    $T = "igswiss.copy",
    NT = "igswiss.tick";
  function UT() {
    return (UT =
      Object.assign ||
      function (e) {
        for (var t = 1; t < arguments.length; t++) {
          var r = arguments[t];
          for (var n in r)
            Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
        }
        return e;
      }).apply(this, arguments);
  }
  BT.TagAssistCopyAllButton = class extends BT.Component {
    constructor(e) {
      super(e),
        (this._onClick = () => {
          this.props.onClick &&
            (this.setState({ copied: !0 }), this.props.onClick());
        }),
        (this._onMouseLeave = () => {
          this.setTimeout(() => {
            this.setState({ copied: !1 });
          }, 700);
        }),
        (this.state = { copied: !1 });
    }
    render() {
      return Glamor.createElement(
        "div",
        { css: [OT.root, this.props.style], onMouseLeave: this._onMouseLeave },
        Glamor.createElement(BT.LinkButton, {
          small: !0,
          label: Glamor.createElement(
            "div",
            { css: OT.label },
            Glamor.createElement(
              "div",
              { css: OT.iconContainer },
              Glamor.createElement(BT.SvgIcon, {
                style: OT.iconCopy(this),
                name: $T,
              }),
              Glamor.createElement(BT.SvgIcon, {
                style: OT.iconTick(this),
                name: NT,
              })
            ),
            "COPY ALL"
          ),
          onClick: this._onClick,
        })
      );
    }
  };
  const { $ui: HT } = app,
    zT = {
      root: { ...HT.column, width: "100%", height: "100%" },
      groups: { marginBottom: HT.space.g2 },
      groupsLabel: {
        ...HT.row,
        ...HT.alignItems.center,
        ...HT.text.label,
        marginBottom: HT.space.g0h,
      },
      groupsInfo: {
        marginLeft: HT.space.g1,
        ".tag-assist-panel-ladder__groups:not(:hover) &": { opacity: 0 },
      },
      groupsRow: { ...HT.row },
      group: ({ props: e, state: t }, r) => ({
        ...HT.column,
        ...HT.center,
        ...HT.noselect,
        ...HT.borderRadius.r4,
        ...HT.clickableInversed,
        ...HT.padding(". g1"),
        flexShrink: 0,
        minWidth: 68,
        height: 35,
        cursor: "pointer",
        color: HT.color.textNormal,
        border: HT.border.dark,
        background: HT.color.bgLight1,
        marginRight: 5,
        "&:last-child": { marginRight: 0 },
        ...(e.selectedGroupId === r.id && {
          borderColor: "transparent",
          background: HT.color.primary,
          color: HT.color.textInversed,
        }),
      }),
      groupTitle: {
        ...HT.text.of({
          size: 12,
          weight: 600,
          height: "15px",
          color: "inherit",
        }),
      },
      groupCount: { ...HT.row, marginTop: 4 },
      groupCountBox: ({ props: e, state: t }, r, n) => ({
        width: 4,
        height: 4,
        marginRight: 1,
        "&:last-child": { marginRight: 0 },
        background: "night" === t.theme ? "#505050" : "#C4C4C4",
        ...(e.selectedGroupId === r.id && {
          background:
            "night" === t.theme ? "rgba(0, 0, 0, 0.3)" : HT.color.bgLight3,
        }),
        ...(r.count > n && {
          background:
            "night" === t.theme && e.selectedGroupId === r.id
              ? HT.color.bgLight3
              : HT.color.positive,
        }),
      }),
      content: ({ props: e }) => ({
        ...(e.blurContent && {
          filter: "blur(3px)",
          pointerEvents: "none",
          userSelect: "none",
        }),
      }),
      groupContent: {
        marginLeft: `calc(-1 * ${HT.space.g2})`,
        marginRight: `calc(-1 * ${HT.space.g2})`,
      },
      warning: {
        marginTop: HT.space.g3,
        "&:first-child": { marginTop: HT.space.g1 },
      },
    };
  class jT extends HT.Component {
    constructor(e) {
      super(e),
        (this._renderGroupButton = (e) =>
          e
            ? Glamor.createElement(
                "div",
                {
                  css: zT.group(this, e),
                  key: e.id,
                  "data-group-id": e.id,
                  onMouseEnter: this._onGroupMouseEnter,
                  onMouseLeave: this._onGroupMouseLeave,
                  onMouseDown: this._onGroupClick,
                },
                Glamor.createElement("div", { css: zT.groupTitle }, e.title),
                "number" == typeof e.count &&
                  Glamor.createElement(
                    "div",
                    { css: zT.groupCount },
                    Glamor.createElement("div", {
                      css: zT.groupCountBox(this, e, 0),
                    }),
                    Glamor.createElement("div", {
                      css: zT.groupCountBox(this, e, 1),
                    }),
                    Glamor.createElement("div", {
                      css: zT.groupCountBox(this, e, 2),
                    }),
                    Glamor.createElement("div", {
                      css: zT.groupCountBox(this, e, 3),
                    }),
                    Glamor.createElement("div", {
                      css: zT.groupCountBox(this, e, 4),
                    }),
                    Glamor.createElement("div", {
                      css: zT.groupCountBox(this, e, 5),
                    }),
                    Glamor.createElement("div", {
                      css: zT.groupCountBox(this, e, 6),
                    }),
                    Glamor.createElement("div", {
                      css: zT.groupCountBox(this, e, 7),
                    }),
                    Glamor.createElement("div", {
                      css: zT.groupCountBox(this, e, 8),
                    }),
                    Glamor.createElement("div", {
                      css: zT.groupCountBox(this, e, 9),
                    })
                  ),
                !!e.tooltip &&
                  Glamor.createElement(
                    HT.Tooltip,
                    UT({}, e.tooltip, {
                      arrowAtCenter: !0,
                      shown: this.state.hoveredGroupId === e.id,
                      showDelay: 1e3,
                    })
                  )
              )
            : null),
        (this._onGroupMouseEnter = (e) => {
          const t = e.currentTarget.dataset.groupId;
          this.setState({ hoveredGroupId: t });
        }),
        (this._onGroupMouseLeave = () => {
          this.setState({ hoveredGroupId: null });
        }),
        (this._onGroupClick = (e) => {
          if (!this.props.onGroupClick) return;
          const t = e.currentTarget.dataset.groupId;
          this.props.onGroupClick(t);
        }),
        (this.state = { hoveredGroupId: null });
    }
    render() {
      return Glamor.createElement(
        "div",
        { css: zT.root },
        this._renderButtons(),
        this._renderContent()
      );
    }
    _renderButtons() {
      return Glamor.createElement(
        "div",
        { css: zT.groups, className: "tag-assist-panel-ladder__groups" },
        Glamor.createElement(
          "div",
          { css: zT.groupsLabel },
          "engagement group",
          Glamor.createElement(
            "div",
            { css: zT.groupsInfo },
            Glamor.createElement(HT.InfoCircle, {
              mini: !0,
              tooltip: {
                text: "\n                  Hashtags are grouped together, relative to your account engagement.\n                  If possible, pick an equal number of hashtags from each engagement group.\n                ",
              },
            })
          )
        ),
        Glamor.createElement(
          "div",
          { css: zT.groupsRow },
          this.props.groups.map(this._renderGroupButton)
        )
      );
    }
    _renderContent() {
      return Glamor.createElement(
        "div",
        { css: zT.content(this) },
        !!this.props.content &&
          Glamor.createElement(
            "div",
            { css: zT.groupContent },
            this.props.content
          ),
        this._renderNotEnoughDataWarning()
      );
    }
    _renderNotEnoughDataWarning() {
      return this.props.showNotEnoughDataWarning
        ? Glamor.createElement(
            "div",
            { css: zT.warning },
            Glamor.createElement(
              "div",
              { css: HT.text.group2 },
              "Could not find enough tags in this category üßê"
            ),
            Glamor.createElement(HT.Spacer, { height: "6" }),
            Glamor.createElement(
              "div",
              { css: HT.text.bleak },
              "Do not worry! Sometimes it is difficult to find hashtags to rank for, especially if account engagement is not high enough. Pick hashtags from the next category, considering the tags with low engagement first."
            ),
            Glamor.createElement(HT.Spacer, { height: "g2" }),
            Glamor.createElement(HT.Tip, {
              icon: "bulb",
              content: Glamor.createElement(
                HT.Fragment,
                null,
                Glamor.createElement("b", null, "Tip:"),
                " Try searching for Long-tail tags. For example, if you are posting a photo of a #britishcat, search for: #britishcat",
                Glamor.createElement("b", null, "photo"),
                ", #britishcat",
                Glamor.createElement("b", null, "cute"),
                ", #britishcat",
                Glamor.createElement("b", null, "oftheday"),
                " ",
                "and so on."
              ),
            })
          )
        : null;
    }
    _renderTextarea() {
      return this.props.textarea
        ? Glamor.createElement("div", { css: zT.textarea }, this.props.textarea)
        : null;
    }
  }
  HT.TagAssistLadder = HT.theme.ThemeAware(jT);
  const { $ui: WT } = app,
    VT = {
      root: {},
      label: {
        ...WT.row,
        ...WT.alignItems.center,
        ...WT.text.label,
        height: 14,
        marginBottom: WT.space.g0h,
      },
      noTagsMessage: { marginTop: WT.space.g0h, ...WT.text.bleak },
      tags: { ...WT.row, flexWrap: "wrap", marginBottom: -4 },
      tag: { marginRight: 4, marginBottom: 4 },
    };
  WT.TagAssistList = class extends WT.Component {
    render() {
      return Glamor.createElement(
        "div",
        { css: [VT.root, this.props.style], className: "tag-assist-list" },
        this._renderLabel(),
        this._renderNoTagsMessage(),
        this._renderTags()
      );
    }
    _renderNoTagsMessage() {
      return this.props.tags.length > 0
        ? null
        : Glamor.createElement(
            "div",
            { css: VT.noTagsMessage },
            this.props.noTagsMessage
          );
    }
    _renderLabel() {
      return this.props.label
        ? Glamor.createElement("div", { css: VT.label }, this.props.label)
        : null;
    }
    _renderTags() {
      return 0 === this.props.tags.length
        ? null
        : Glamor.createElement(
            "div",
            { css: VT.tags },
            this.props.tags.map((e) =>
              Glamor.createElement("div", { css: VT.tag, key: e.id }, e.element)
            )
          );
    }
  };
  const { $ui: qT } = app,
    ZT = {
      root: { ...qT.fullWidth },
      button: {
        ...qT.row,
        ...qT.noselect,
        ...qT.fullWidth,
        ...qT.borderRadius.r4,
        ...qT.padding("g2 g3 g2 g3"),
        ...qT.clickableInversed,
        minHeight: 80,
        border: qT.border.dark,
        background: qT.color.bgLight1,
      },
      buttonIcon: { flexShrink: 0, marginRight: qT.space.g3 },
      buttonBody: {},
      buttonTitle: { ...qT.text.group1, color: qT.color.link },
      buttonText: { ...qT.text.bleak, marginTop: qT.space.g0h },
      form: {},
      formButtons: { ...qT.row },
      formError: {
        ...qT.text.elementNormal,
        lineHeight: "18px",
        color: qT.color.error,
      },
    },
    YT = "tag-assist-new-collection.hashtag-book";
  qT.SvgIcon.registerSvgIcons([
    `<symbol id="${YT}" viewBox="0 0 35 45"><g transform="translate(13580 3457)"><rect width="35" height="45" transform="translate(-13580 -3457)" fill="none"/><path d="M19771.053,6573.718a3.49,3.49,0,0,1-3.41-3.414V6534.05a4.24,4.24,0,0,1,4.234-4.239h29.637a.848.848,0,0,1,0,1.7,2.546,2.546,0,0,0,0,5.092.846.846,0,0,1,.846.848v33.724a2.553,2.553,0,0,1-2.539,2.548Zm-1.717-3.414a1.888,1.888,0,0,0,1.717,1.713h28.768a.846.846,0,0,0,.846-.848v-32.876h-28.789a4.19,4.19,0,0,1-2.541-.875Zm0-36.254a2.545,2.545,0,0,0,2.541,2.548h26.244a4.258,4.258,0,0,1,0-5.092h-26.244A2.541,2.541,0,0,0,19769.336,6534.05Zm17.459,31.791.723-5.993h-6.463l-.754,5.993h-1.7l.721-5.993h-4.475v-1.736h4.7l.822-6.631h-4.512v-1.736h4.729l.727-5.993h1.734l-.76,5.993h6.5l.725-5.993h1.705l-.727,5.993h4.443v1.736h-4.662l-.82,6.631h4.475v1.736h-4.7l-.721,5.993Zm-5.549-7.729h6.5l.818-6.631h-6.463Z" transform="translate(-33347.641 -9986.342)" fill="#A5AAAE"/></g></symbol>`,
  ]),
    (qT.TagAssistNewCollection = class extends qT.Component {
      constructor(e) {
        super(e),
          (this._onNameInputEnter = (e) => {
            e.preventDefault(), this.textInputRef.current.input.current.focus();
          }),
          (this.nameInputRef = qT.createRef()),
          (this.textInputRef = qT.createRef());
      }
      componentDidUpdate(e) {
        const t = e,
          r = this.props;
        !t.showForm &&
          r.showForm &&
          (this.nameInputRef.current.input.current.focus(),
          this.nameInputRef.current.input.current.select());
      }
      render() {
        return Glamor.createElement(
          "div",
          { css: ZT.root },
          this._renderButton(),
          this._renderForm()
        );
      }
      _renderButton() {
        return this.props.showForm
          ? null
          : Glamor.createElement(
              "div",
              { css: ZT.button, onClick: this.props.onButtonClick },
              Glamor.createElement(qT.SvgIcon, {
                style: ZT.buttonIcon,
                name: YT,
              }),
              Glamor.createElement(
                "div",
                { css: ZT.buttonBody },
                Glamor.createElement(
                  "div",
                  { css: ZT.buttonTitle },
                  "ADD COLLECTION"
                ),
                Glamor.createElement(
                  "div",
                  { css: ZT.buttonText },
                  "Create and manage hashtag collections."
                )
              )
            );
      }
      _renderForm() {
        return this.props.showForm
          ? Glamor.createElement(
              "div",
              { css: ZT.form },
              Glamor.createElement(qT.Input, {
                ref: this.nameInputRef,
                label: "name",
                spellCheck: !1,
                value: this.props.name,
                onInput: this.props.onNameInput,
                onEnter: this._onNameInputEnter,
              }),
              Glamor.createElement(qT.Spacer, { height: "g1" }),
              Glamor.createElement(qT.Input, {
                ref: this.textInputRef,
                label: this.props.textLabel,
                placeholder: "e.g. #art #design #travel",
                lines: 5,
                spellCheck: !1,
                value: this.props.text,
                onInput: this.props.onTextInput,
              }),
              Glamor.createElement(qT.Spacer, { height: "g1h" }),
              Glamor.createElement(
                "div",
                { css: ZT.formButtons },
                Glamor.createElement(
                  "div",
                  { css: ZT.formError },
                  this.props.errorMessage
                ),
                Glamor.createElement(qT.Spacer, { grow: !0 }),
                Glamor.createElement(qT.LinkButton, {
                  small: !0,
                  label: "CONFIRM",
                  disabled: !!this.props.errorMessage,
                  onClick: this.props.errorMessage
                    ? null
                    : this.props.onSaveClick,
                }),
                Glamor.createElement(qT.Spacer, { width: "g2" }),
                Glamor.createElement(qT.LinkButton, {
                  small: !0,
                  cancel: !0,
                  label: "CANCEL",
                  onClick: this.props.onCancelClick,
                })
              )
            )
          : null;
      }
    });
  const { $ui: QT } = app,
    KT = {
      root: { ...QT.column, ...QT.relative(), width: "100%", height: "100%" },
      tabBar: ({ props: e }) => ({
        ...QT.padding("g2 g2 0 g2"),
        marginBottom: QT.space.g1h,
        ...("schedule" === e.placement && { marginTop: 3 }),
      }),
      body: ({ props: e }) => ({
        ...QT.grow,
        ...("sidebar" === e.placement && {
          marginRight: `calc(-1 * ${QT.space.g1})`,
        }),
      }),
      proWarning: ({ props: e }) => ({
        ...QT.padding("g1h g2"),
        borderTop: QT.border.dark,
        ...("sidebar" === e.placement && { paddingBottom: 30 }),
      }),
      proWarningRow: { ...QT.row },
      proWarningIcon: { width: 18, flexShrink: 0, color: QT.color.attention },
      proWarningText: { ...QT.text.bleak, marginLeft: QT.space.g1h },
      proWarningButton: {
        color: QT.color.textInversed,
        marginTop: QT.space.g1h,
      },
      tips: {
        ...QT.padding("g1h g2"),
        borderTop: QT.border.dark,
        "&:empty": { display: "none" },
      },
      loadingOverlay: {
        ...QT.absolute("0 0 0 0 10"),
        ...QT.row,
        ...QT.center,
        background: QT.color.bgLight3,
      },
      closeButton: ({ props: e }) => ({
        ...QT.absolute("g0h g0h . ."),
        ...("schedule" === e.placement && {
          top: QT.space.g1,
          right: QT.space.g1,
        }),
      }),
    };
  QT.TagAssistPanel = class extends QT.Component {
    constructor(e) {
      super(e), (this._bodyRef = QT.createRef());
    }
    componentDidUpdate(e) {
      const t = e,
        r = this.props;
      t.selectedTabId !== r.selectedTabId && this._bodyRef.current.scrollTop(0);
    }
    render() {
      return Glamor.createElement(
        "div",
        { css: KT.root },
        this._renderTabBar(),
        this._renderBody(),
        this._renderProWarning(),
        this._renderTips(),
        this._renderLoadingOverlay(),
        this._renderCloseButton()
      );
    }
    _renderTabBar() {
      return Glamor.createElement(QT.TabBar, {
        style: KT.tabBar(this),
        tabs: this.props.tabs,
        selectedTabId: this.props.selectedTabId,
        onTabClick: this.props.onTabClick,
      });
    }
    _renderBody() {
      return Glamor.createElement(
        QT.FadedScroller,
        { style: KT.body(this), ref: this._bodyRef },
        this.props.body
      );
    }
    _renderProWarning() {
      const e = this.props.proWarning;
      return e
        ? Glamor.createElement(
            "div",
            { css: KT.proWarning(this) },
            Glamor.createElement(
              "div",
              { css: QT.row },
              Glamor.createElement(QT.SvgIcon, {
                style: KT.proWarningIcon,
                name: "warning-triangle",
              }),
              Glamor.createElement("div", { css: KT.proWarningText }, e.text)
            ),
            Glamor.createElement(QT.ActionButton, {
              label: "UPGRADE TO PRO",
              style: KT.proWarningButton,
              background: QT.color.attention,
              onClick: e.onUpgradeClick,
            })
          )
        : null;
    }
    _renderTips() {
      return "sidebar" === this.props.placement
        ? null
        : this.props.tips
        ? Glamor.createElement("div", { css: KT.tips }, this.props.tips)
        : null;
    }
    _renderLoadingOverlay() {
      return this.props.loading
        ? Glamor.createElement(
            "div",
            { css: KT.loadingOverlay },
            Glamor.createElement(QT.ProgressRing, { spinning: !0, value: 30 })
          )
        : null;
    }
    _renderCloseButton() {
      return this.props.onCloseClick
        ? Glamor.createElement(QT.CloseButton, {
            style: KT.closeButton(this),
            onClick: this.props.onCloseClick,
          })
        : null;
    }
  };
  const { $ui: XT } = app,
    JT = {
      root: { width: "100%", ...XT.padding("g1 g2 g5") },
      newCollection: {},
      collections: { marginTop: XT.space.g3 },
      collection: {
        marginBottom: XT.space.g3,
        "&:last-child": { marginBottom: 0 },
      },
    };
  XT.TagAssistPanelCollections = class extends XT.Component {
    render() {
      return Glamor.createElement(
        "div",
        { css: JT.root },
        this._renderNewCollection(),
        this._renderCollections()
      );
    }
    _renderNewCollection() {
      return this.props.newCollection
        ? Glamor.createElement(
            "div",
            { css: JT.newCollection },
            this.props.newCollection
          )
        : null;
    }
    _renderCollections() {
      return this.props.collections
        ? 0 === this.props.collections.length
          ? null
          : Glamor.createElement(
              "div",
              { css: JT.collections },
              this.props.collections.map((e) =>
                Glamor.createElement(
                  "div",
                  { css: JT.collection, key: e.id },
                  e.element
                )
              )
            )
        : null;
    }
  };
  const { $ui: eI } = app,
    tI = {
      root: {
        ...eI.column,
        paddingTop: eI.space.g1,
        width: "100%",
        height: "100%",
      },
      input: { ...eI.padding("0 g2") },
      content: {
        ...eI.column,
        ...eI.margin("g2 0"),
        ...eI.padding("0 g2"),
        flexGrow: 1,
      },
      textarea: { ...eI.padding("0 g2 g2 g2") },
      welcome: { height: "100%", ...eI.text.of({ size: 14, height: "24px" }) },
    };
  eI.TagAssistPanelSearch = class extends eI.Component {
    render() {
      return Glamor.createElement(
        "div",
        { css: tI.root },
        this._renderInput(),
        this._renderContent(),
        this._renderTextarea()
      );
    }
    _renderInput() {
      return Glamor.createElement("div", { css: tI.input }, this.props.input);
    }
    _renderContent() {
      const e = this.props.showWelcome
        ? this._renderWelcome()
        : this.props.content;
      return Glamor.createElement(eI.FadedScroller, { style: tI.content }, e);
    }
    _renderTextarea() {
      return this.props.textarea
        ? Glamor.createElement("div", { css: tI.textarea }, this.props.textarea)
        : null;
    }
    _renderWelcome() {
      return "search" === this.props.type
        ? Glamor.createElement(
            "div",
            { css: tI.welcome },
            "Get relevant tag suggestions with the Tag Assistant. Find out how to pick the best hashtags for your posts in our",
            " ",
            Glamor.createElement(
              "a",
              {
                href: "https://inssist.com/knowledge-base/ultimate-instagram-hashtag-guide",
                target: "_blank",
              },
              "Ultimate Instagram Hashtag Guide"
            ),
            "."
          )
        : "ladder" === this.props.type
        ? Glamor.createElement(
            "div",
            { css: tI.welcome },
            "Get hashtags from multiple engagement levels: lower, similar to and higher than your account‚Äôs average, to build an efficient",
            " ",
            Glamor.createElement(
              "a",
              {
                href: "https://inssist.com/knowledge-base/ultimate-instagram-hashtag-guide",
                target: "_blank",
              },
              "hashtag ladder"
            ),
            "."
          )
        : null;
    }
  };
  const { $ui: rI } = app,
    nI = {
      root: { paddingTop: rI.space.g1, paddingBottom: rI.space.g5 },
      ranking: { ...rI.padding("0 g2") },
      rankingLabel: { ...rI.text.label, marginBottom: rI.space.g0h },
      rankingTitle: ({ props: e }) => ({
        ...rI.row,
        ...rI.alignItems.center,
        ...rI.text.group2,
        ...(e.rankingColor && { color: e.rankingColor }),
      }),
      rankingInfoCircle: { marginLeft: rI.space.g1 },
      rankingDescription: {
        ...rI.text.bleak,
        marginTop: rI.space.g1h,
        minHeight: 54,
      },
      buttons: {
        ...rI.row,
        ...rI.alignItems.center,
        ...rI.padding("0 g2"),
        marginTop: rI.space.g1h,
      },
      button: { marginRight: rI.space.g3, "&:last-child": { marginRight: 0 } },
      content: { marginTop: rI.space.g2 },
    };
  function oI() {
    return (oI =
      Object.assign ||
      function (e) {
        for (var t = 1; t < arguments.length; t++) {
          var r = arguments[t];
          for (var n in r)
            Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
        }
        return e;
      }).apply(this, arguments);
  }
  rI.TagAssistPanelSummary = class extends rI.Component {
    render() {
      return Glamor.createElement(
        "div",
        { css: nI.root },
        this._renderRanking(),
        this._renderButtons(),
        this._renderContent()
      );
    }
    _renderRanking() {
      return Glamor.createElement(
        "div",
        { css: nI.ranking },
        Glamor.createElement(
          "div",
          { css: nI.rankingLabel },
          "hashtag ladder ranking"
        ),
        Glamor.createElement(
          "div",
          { css: nI.rankingTitle(this) },
          this.props.rankingTitle,
          Glamor.createElement(rI.InfoCircle, {
            style: nI.rankingInfoCircle,
            mini: !0,
            tooltip: {
              text: "\n                This is an estimation of how balanced your hashtags are.\n                To rank higher and increase reach from hashtags,\n                make sure to include hashtags with low, medium and high engagement.\n              ",
            },
          })
        ),
        Glamor.createElement(
          "div",
          { css: nI.rankingDescription },
          this.props.rankingDescription
        )
      );
    }
    _renderButtons() {
      return Glamor.createElement(
        "div",
        { css: nI.buttons },
        this.props.showTakeAll &&
          Glamor.createElement(rI.LinkButton, {
            style: nI.button,
            small: !0,
            label: "TAKE ALL",
            onClick: this.props.onTakeAllClick,
          }),
        this.props.showRemoveAll &&
          Glamor.createElement(rI.LinkButton, {
            style: nI.button,
            small: !0,
            label: "REMOVE ALL",
            onClick: this.props.onRemoveAllClick,
          }),
        this.props.showCheckAll &&
          Glamor.createElement(rI.LinkButton, {
            style: nI.button,
            small: !0,
            label: "CHECK ALL TAGS",
            onClick: this.props.onCheckAllClick,
          }),
        this.props.showStopAll &&
          Glamor.createElement(rI.LinkButton, {
            style: nI.button,
            small: !0,
            label: "STOP FETCHING",
            onClick: this.props.onStopAllClick,
          })
      );
    }
    _renderContent() {
      return this.props.content
        ? Glamor.createElement("div", { css: nI.content }, this.props.content)
        : null;
    }
  };
  const { $ui: aI } = app,
    iI = {
      root: {
        ...aI.row,
        ...aI.alignItems.end,
        ...aI.justifyContent.between,
        width: "100%",
      },
      input: { paddingLeft: 6 },
      latinOnlySwitch: { marginLeft: aI.space.g1 },
    },
    sI = "tag-assist-panel-ladder.glob",
    lI = "igswiss.close",
    cI = "igswiss.search";
  aI.SvgIcon.registerSvgIcons([
    `<symbol id="${sI}" viewBox="0 0 15.418 16.11"><path fill="currentColor" d="M7.354 16.11v-1.1a3 3 0 00-.911-2.068 1.282 1.282 0 01-.378-.911v-1.292a1.287 1.287 0 00-.664-1.125c-.292-.163-1.3-.718-1.968-1.054a5.836 5.836 0 01-1.277-.879l-.031-.028a4.635 4.635 0 01-.728-.835c-.222-.326-.525-.775-.819-1.21l-.264-.389-.313-.464A8.079 8.079 0 014.165.647l.966.485a.635.635 0 00.288.069.647.647 0 00.646-.646V.098a8.016 8.016 0 01.982-.1l1.142 1.141a.647.647 0 010 .911l-.191.191-.413.414a.32.32 0 000 .457l.187.191a.316.316 0 010 .453l-.322.322a.311.311 0 01-.227.1h-.361a.315.315 0 00-.227.091l-.4.39a.328.328 0 00-.063.374l.629 1.26a.321.321 0 01-.287.465h-.227a.306.306 0 01-.211-.08l-.373-.326a.664.664 0 00-.426-.156.646.646 0 00-.2.033l-1.257.417a.484.484 0 00-.063.891l.445.223a2.718 2.718 0 001.226.286c.241 0 .5.357.754.7a2.118 2.118 0 00.534.59h2.692a1.283 1.283 0 01.911.378l.553.553a1.217 1.217 0 01.361.867 1.86 1.86 0 01-.557 1.332l-.453.453a1.017 1.017 0 00-.251.434l-.03.12-.014.055v.012a4.855 4.855 0 01-.144.494l-.7 1.889a8.132 8.132 0 01-1.73.187zm7.992-7.031l-1.176-.294a.987.987 0 01-.573-.4l-.724-1.09a.96.96 0 010-1.074l.791-1.185a.953.953 0 01.37-.326l.525-.262a7.872 7.872 0 01.787 4.632z"/></symbol>`,
  ]),
    (aI.TagAssistSearchInput = class extends aI.Component {
      constructor(e) {
        super(e), (this.state = { latinOnlyHovered: !1 });
      }
      render() {
        return Glamor.createElement(
          "div",
          { css: iI.root },
          this._renderInput(),
          this._renderLatinOnlySwitch()
        );
      }
      _renderInput() {
        const e = this.props.query
          ? { name: lI, onClick: this.props.onClearQueryClick }
          : { name: cI };
        let t;
        return (
          "search" === this.props.type
            ? (t = "search for relevant hashtags")
            : "ladder" === this.props.type &&
              (t = "get hashtag ladder suggestions"),
          Glamor.createElement(aI.Input, {
            inputStyle: iI.input,
            icon: e,
            label: t,
            value: this.props.query || "",
            placeholder: this.props.placeholder || "",
            spellCheck: !1,
            progress: this.props.loading && { value: 60, spinning: !0 },
            onInput: this.props.onQueryInput,
          })
        );
      }
      _renderLatinOnlySwitch() {
        return Glamor.createElement(
          "div",
          oI(
            { css: iI.latinOnlySwitch },
            aI.hoverState(this, "latinOnlyHovered")
          ),
          Glamor.createElement(aI.Switch, {
            value: !this.props.latinOnly,
            icon: Glamor.createElement(aI.SvgIcon, {
              style: { color: "#FFF" },
              name: sI,
            }),
            onChange: this.props.onLatinOnlyClick,
          }),
          Glamor.createElement(aI.Tooltip, {
            shown: this.state.latinOnlyHovered,
            showDelay: 800,
            text: this.props.latinOnly
              ? Glamor.createElement(
                  aI.Fragment,
                  null,
                  "Show hashtags with emojis",
                  Glamor.createElement("br", null),
                  "and non-latin characters"
                )
              : Glamor.createElement(
                  aI.Fragment,
                  null,
                  "Hide hashtags with emojis",
                  Glamor.createElement("br", null),
                  "and non-latin characters"
                ),
          })
        );
      }
    });
  const { $ui: uI } = app,
    dI = {
      root: {
        ...uI.column,
        ...uI.padding("g2 g3 0 g3"),
        ...uI.relative(),
        height: "100%",
      },
      title: { ...uI.text.mainTitle },
      closeButton: { ...uI.absolute("g1 g1 . .") },
      content: {
        ...uI.grow,
        height: "100%",
        marginTop: uI.space.g1,
        marginLeft: `calc(-1 * ${uI.space.g2})`,
        marginRight: `calc(-1 * ${uI.space.g2})`,
      },
    };
  uI.TagAssistSidePanel = class extends uI.Component {
    render() {
      return Glamor.createElement(
        "div",
        { css: dI.root },
        Glamor.createElement("div", { css: dI.title }, this.props.title),
        this._renderCloseButton(),
        this._renderContent()
      );
    }
    _renderCloseButton() {
      return Glamor.createElement(uI.CloseButton, {
        style: dI.closeButton,
        onClick: this.props.onCloseClick,
      });
    }
    _renderContent() {
      return Glamor.createElement(
        "div",
        { css: dI.content },
        this.props.content
      );
    }
  };
  const { $ui: hI } = app,
    pI = {
      root: {
        ...hI.fullWidth,
        ...hI.relative(),
        "& table": { ...hI.column },
        "& thead": { ...hI.column },
        "& tbody": { ...hI.column },
        "& tr": {
          ...hI.row,
          ...hI.alignItems.center,
          border: "none !important",
        },
      },
      body: { marginTop: hI.space.g1 },
      bodyRow: { "&:hover": { backgroundColor: hI.color.bgLight1 } },
      headCell: {
        "&:nth-child(1)": { width: "60%" },
        "&:nth-child(2)": { width: "40%" },
      },
      bodyCell: {
        ...hI.padding("3 0"),
        ...hI.text.elementNormal,
        fontSize: 12,
        "&:nth-child(1)": { width: "60%", ...hI.padding("0 g2") },
        "&:nth-child(2)": { width: "40%" },
      },
      paginator: ({ props: e }, t) => ({
        marginRight: hI.space.g3,
        ...(e.tags.length <= t && { display: "none" }),
      }),
      passive: { color: hI.color.textPassive },
      high: { color: hI.color.error },
      bottomButton: { ...hI.absolute(". . 0 g2") },
    };
  hI.TagAssistTable = class extends hI.Component {
    constructor(e) {
      super(e),
        (this._renderTagCell = (e) =>
          this.props.renderTagPill ? this.props.renderTagPill(e) : null),
        (this._renderEngagementCell = (e) => {
          if (e.fetching)
            return Glamor.createElement(
              "div",
              { css: pI.passive },
              "fetching data..."
            );
          if (!e.hasData)
            return Glamor.createElement(hI.LinkButton, {
              label: "FETCH TAG DATA",
              small: !0,
              tagName: e.name,
              onClick: this._onCheckClick,
            });
          if (e.banned)
            return Glamor.createElement(
              "div",
              { css: pI.passive },
              "banned or missing"
            );
          if (e.flagged)
            return Glamor.createElement("div", { css: pI.passive }, "flagged");
          const t = e.engagementRate;
          return "number" != typeof t
            ? Glamor.createElement("div", { css: pI.passive }, "N/A")
            : !Number.isFinite(t) || t > 99
            ? Glamor.createElement(
                hI.Fragment,
                null,
                Glamor.createElement("span", { css: pI.high }, "‚ñ≤99x"),
                " higher"
              )
            : t >= 3
            ? Glamor.createElement(
                hI.Fragment,
                null,
                Glamor.createElement(
                  "span",
                  { css: pI.high },
                  "‚ñ≤",
                  Math.round(t),
                  "x"
                ),
                " higher"
              )
            : Glamor.createElement(hI.Fragment, null, Math.round(100 * t), "%");
        }),
        (this._onCheckClick = ({ tagName: e }) => {
          this.props.onCheckClick && this.props.onCheckClick(e);
        }),
        (this._onSkipChange = (e) => {
          this.setState({ skip: e });
        }),
        (this.pageSize = 0);
    }
    render() {
      if (0 === this.props.tags.length) return null;
      const e = this.props.pageSize || 10;
      return Glamor.createElement(
        "div",
        { css: pI.root },
        Glamor.createElement(hI.Table, {
          className: "tag-assist-table",
          rowStyle: pI.bodyRow,
          headCellStyle: pI.headCell,
          bodyCellStyle: pI.bodyCell,
          paginatorStyle: pI.paginator(this, e),
          skip: this.props.skip,
          onSkipChange: this.props.onSkipChange,
          data: this.props.tags.map((e) => ({ id: e.name, ...e })),
          pageSize: e,
          minRowCount: Math.min(e, this.props.tags.length),
          minRowHeight: 38,
          columns: [
            { id: "tag", label: "", render: this._renderTagCell },
            {
              id: "engagement",
              label: "engagement",
              info: { tooltip: hI.tagTooltips().engagement },
              sort: this.props.engagementSort,
              render: this._renderEngagementCell,
              onSortClick: this.props.onEngagementSortClick,
            },
          ],
        }),
        this._renderBottomButton()
      );
    }
    _renderPostCount(e) {
      return Glamor.createElement(hI.NumberRenderer, {
        value: e.postCount,
        short: !0,
      });
    }
    _renderBottomButton() {
      return this.props.showCheckAll
        ? Glamor.createElement(hI.LinkButton, {
            style: pI.bottomButton,
            mini: !0,
            label: "FETCH ALL TAG DATA",
            hitboxStyle: pI.footerButtonHitbox,
            onClick: this.props.onCheckAllClick,
          })
        : this.props.showStopAll
        ? Glamor.createElement(hI.LinkButton, {
            style: pI.bottomButton,
            mini: !0,
            label: "STOP FETCHING",
            hitboxStyle: pI.footerButtonHitbox,
            onClick: this.props.onStopAllClick,
          })
        : null;
    }
  };
  const { $ui: mI } = app,
    gI = {
      root: { width: "100%" },
      textarea: {},
      buttons: { ...mI.row, ...mI.justifyContent.end, marginTop: mI.space.g1 },
    };
  mI.TagAssistTextarea = class extends mI.Component {
    render() {
      return Glamor.createElement(
        "div",
        { css: gI.root },
        Glamor.createElement(mI.Input, {
          css: gI.textarea,
          lines: 3,
          label: this.props.label,
          value: this.props.value,
          spellCheck: !1,
          onInput: this.props.onInput,
        }),
        Glamor.createElement(
          "div",
          { css: gI.buttons },
          Glamor.createElement(mI.TagAssistCopyAllButton, {
            onClick: this.props.onCopyAllClick,
          })
        )
      );
    }
  };
  const { $ui: fI } = app;
  let vI = null;
  const bI = {
      root: ({ props: e, state: t }) => ({
        ...fI.relative(),
        ...fI.padding("6 g1h 6 g1h"),
        ...fI.text.bleakSemiBold,
        ...fI.borderRadius.r4,
        width: "min-content",
        maxWidth: "100%",
        color: fI.color.textNormal,
        border: fI.border.dark,
        background: fI.color.bgLight1,
        overflow: "hidden",
        ...(e.color && {
          color: fI.theme.valueOf("day", fI.color.dark),
          borderColor: e.color,
          background: e.color,
        }),
        ...(e.clickable && {
          cursor: "pointer",
          ...fI.noselect,
          ...fI.transition.fast,
          transitionProperty: "transform, box-shadow",
          "&:hover:not(:active)": {
            transform: "translateY(-1px)",
            ...("day" === t.theme && {
              borderColor: "transparent",
              boxShadow: "0 2px 4px rgba(0, 0, 0, 0.16)",
            }),
            ...("night" === t.theme && {
              boxShadow: "0 2px 4px rgba(0, 0, 0, 0.24)",
            }),
          },
        }),
      }),
      selectionMarker: ({ props: e }) => ({
        ...fI.absolute("14 . . 7"),
        ...fI.transition.fast,
        width: 4,
        height: 4,
        background: fI.color.link,
        borderRadius: "50%",
        ...(e.color && { background: "currentColor" }),
        ...(!e.selected && { opacity: 0, transform: "translateX(-4px)" }),
      }),
      content: ({ props: e }) => ({
        ...fI.row,
        ...fI.alignItems.center,
        ...fI.transition.fast,
        ...(e.selected && { transform: "translateX(4px)" }),
      }),
      bannedMarker: { marginRight: fI.space.g1 },
      flaggedMarker: { marginRight: fI.space.g1 },
      name: { ...fI.text.ellipsis },
      spinner: { marginLeft: fI.space.g1 },
      popup: ({ state: e }) => ({
        position: "fixed",
        top: e.popupY,
        left: e.popupX,
        ...fI.transition.fast,
        transitionProperty: "opacity, transform",
        ...(!e.showPopup && {
          opacity: 0,
          transform: "translateY(10px)",
          pointerEvents: "none",
        }),
      }),
    },
    yI = "tag-pill.banned-marker",
    wI = "tag-pill.flagged-marker";
  fI.SvgIcon.registerSvgIcons([
    `<symbol id="${yI}" viewBox="0 0 14 14"><path d="M7.563.563a7,7,0,1,0,7,7A7,7,0,0,0,7.563.563ZM11.235,3.89a5.194,5.194,0,0,1,.584,6.651L4.584,3.306A5.194,5.194,0,0,1,11.235,3.89ZM3.89,11.235a5.194,5.194,0,0,1-.584-6.651l7.235,7.235a5.194,5.194,0,0,1-6.651-.584Z" transform="translate(-0.563 -0.563)" fill="#e34e21"/></symbol>`,
    `<symbol id="${wI}" viewBox="0 0 14 12.112"><g transform="translate(0.358 0.311)"><path d="M8.244,4.925a1.985,1.985,0,0,1,3.364,0l5.054,8.386a1.864,1.864,0,0,1-1.682,2.8H4.871a1.864,1.864,0,0,1-1.682-2.8Z" transform="translate(-3.283 -4.305)" fill="#e34e21"/><path d="M1.118-6.666.752-11.3l1.443.009L1.83-6.666Zm-.3.694H2.13v1.294H.818Z" transform="translate(5.145 14.65)" fill="#fff"/></g></symbol>`,
  ]);
  class CI extends fI.Component {
    constructor(e) {
      if (
        (super(e),
        (this._onClick = (e) => {
          const t = this.rootRef.current;
          (t === e.target || t.contains(e.target)) &&
            (clearTimeout(this.popupShowTimeout),
            this.props.onClick && this.props.onClick());
        }),
        (this._onPopupMouseEnter = () => {
          clearTimeout(this.popupShowTimeout),
            clearTimeout(this.popupHideTimeout),
            this.setState({ showPopup: !0 }),
            (this.popupHovered = !0);
        }),
        (this._onPopupMouseLeave = () => {
          (this.popupHovered = !1), this._hidePopup();
        }),
        (this._hidePopup = () => {
          clearTimeout(this.popupShowTimeout),
            clearTimeout(this.popupHideTimeout),
            (this.popupHideTimeout = this.setTimeout(() => {
              this.setState({ showPopup: !1 }),
                (this.popupHideTimeout = this.setTimeout(() => {
                  this.setState({ createPopup: !1 });
                }, 300));
            }, 200));
        }),
        (this.rootRef = fI.createRef()),
        (this.popupRef = fI.createRef()),
        (this.popupHandled = !1),
        (this.popupHovered = !1),
        (this.popupShowTimeout = null),
        (this.popupHideTimeout = null),
        (this.hoverElem = null),
        (this.onHoverElemMouseEnter = null),
        (this.onHoverElemMouseLeave = null),
        (this.state = {
          createPopup: !1,
          showPopup: !1,
          popupX: 0,
          popupY: 0,
          popupMarkerDy: 0,
          popupMarkerAtLeft: !1,
        }),
        "undefined" != typeof document)
      ) {
        const e = "tag-pill__portal-root";
        (this.portalRoot = document.getElementById(e)),
          this.portalRoot ||
            ((this.portalRoot = document.createElement("div")),
            (this.portalRoot.id = e),
            (this.portalRoot.style.position = "fixed"),
            (this.portalRoot.style.left = "-100000px"),
            (this.portalRoot.style.zIndex = "99"),
            document.body.appendChild(this.portalRoot)),
          (this.portal = document.createElement("div")),
          this.portalRoot.appendChild(this.portal);
      }
    }
    componentDidUpdate() {
      this._handleStatsPopup();
    }
    componentDidMount() {
      this._handleStatsPopup();
    }
    componentWillUnmount() {
      super.componentWillUnmount(),
        this.portalRoot.removeChild(this.portal),
        this.hoverElem &&
          (this.hoverElem.removeEventListener(
            "mouseenter",
            this.onHoverElemMouseEnter
          ),
          this.hoverElem.removeEventListener(
            "mouseleave",
            this.onHoverElemMouseLeave
          ));
    }
    render() {
      return Glamor.createElement(
        "div",
        { css: bI.root(this), ref: this.rootRef, onClick: this._onClick },
        Glamor.createElement("div", { css: bI.selectionMarker(this) }),
        Glamor.createElement(
          "div",
          { css: bI.content(this) },
          this._renderBannedMarker(),
          this._renderFlaggedMarker(),
          this._renderName(),
          this._renderSpinner()
        ),
        this._renderStatsPopup()
      );
    }
    _renderBannedMarker() {
      return this.props.banned
        ? Glamor.createElement(fI.SvgIcon, { style: bI.bannedMarker, name: yI })
        : null;
    }
    _renderFlaggedMarker() {
      return this.props.flagged
        ? Glamor.createElement(fI.SvgIcon, {
            style: bI.flaggedMarker,
            name: wI,
          })
        : null;
    }
    _renderName() {
      return Glamor.createElement("div", { css: bI.name }, this.props.name);
    }
    _renderSpinner() {
      return this.props.loading
        ? Glamor.createElement(fI.ProgressRing, {
            style: bI.spinner,
            size: 14,
            thickness: 1.5,
            value: 40,
            spinning: !0,
          })
        : null;
    }
    _renderStatsPopup() {
      return this.portal &&
        this.props.renderStatsPopup &&
        this.state.createPopup
        ? Dp.createPortal(
            Glamor.createElement(
              "div",
              {
                css: bI.popup(this),
                ref: this.popupRef,
                onMouseEnter: this._onPopupMouseEnter,
                onMouseLeave: this._onPopupMouseLeave,
              },
              this.props.renderStatsPopup({
                markerDy: this.state.popupMarkerDy,
                markerAtLeft: this.state.popupMarkerAtLeft,
              })
            ),
            this.portal
          )
        : null;
    }
    _handleStatsPopup() {
      if (!this.props.renderStatsPopup) return;
      if (this.popupHandled) return;
      this.popupHandled = !0;
      const e = this.rootRef.current,
        t = e.closest(".tag-assist-table tr") || e,
        r = !!e.closest(".tag-assist-list"),
        n = !!e.closest(".tag-assist-table");
      (this.hoverElem = t),
        (this.onHoverElemMouseEnter = () => {
          clearTimeout(this.popupShowTimeout),
            clearTimeout(this.popupHideTimeout),
            (this.popupShowTimeout = this.setTimeout(async () => {
              vI && vI !== this && vI._hidePopup(),
                this.setState({ createPopup: !0 }),
                await this._tick();
              const o = e.getBoundingClientRect(),
                a = this.popupRef.current,
                i = (
                  e.closest(".tag-assist-list") || t
                ).getBoundingClientRect(),
                s = i.left,
                l = i.width,
                c = o.top,
                u = o.height,
                d = a.offsetWidth,
                h = a.offsetHeight,
                p = window.innerHeight - h - 20,
                m = r ? 12 : n ? -4 : 4;
              let g = s - d - m,
                f = !1;
              g < 30 && ((g = s + l + m), (f = !0));
              let v = c - h / 2 + u / 2,
                b = 0;
              v < 20
                ? ((b = v - 20), (v = 20))
                : v > p && ((b = v - p), (v = p)),
                this.setState({
                  popupX: g,
                  popupY: v,
                  popupMarkerDy: b,
                  popupMarkerAtLeft: f,
                }),
                await this._tick(),
                this.setState({ showPopup: !0 }),
                (vI = this);
            }, 800));
        }),
        (this.onHoverElemMouseLeave = () => {
          this.popupHovered || this._hidePopup();
        }),
        t.addEventListener("mouseenter", this.onHoverElemMouseEnter),
        t.addEventListener("mouseleave", this.onHoverElemMouseLeave);
    }
    async _tick() {
      return new Promise((e) => {
        this.setTimeout(e);
      });
    }
  }
  fI.TagPill = fI.theme.ThemeAware(CI);
  const { $ui: kI } = app,
    SI = {
      root: {
        ...kI.relative(),
        ...kI.borderRadius.r4,
        ...kI.shadow.sh10,
        width: 292,
        cursor: "default",
        backgroundColor: kI.color.bgLight3,
      },
      marker: ({ props: e }) => ({
        ...kI.absolute("50% 0 . ."),
        transform: "translateY(-50%)",
        width: 4,
        height: 30,
        background: kI.color.link,
        ...(e.markerDy && { marginTop: e.markerDy }),
        ...(e.markerAtLeft && { left: 0, right: "auto" }),
        "&::before": {
          content: '""',
          transform: "translateY(-50%)",
          ...kI.absolute("50% . . 100%"),
          ...kI.triangle.right({ size: 3, color: kI.color.link }),
          ...(e.markerAtLeft && {
            left: "auto",
            right: "100%",
            ...kI.triangle.left({ size: 3, color: kI.color.link }),
          }),
        },
      }),
      header: {
        ...kI.row,
        ...kI.alignItems.center,
        ...kI.padding("g1h g3 g1h g3"),
        minHeight: 32,
      },
      title: { ...kI.text.ellipsis, ...kI.text.contentTitle },
      gotoIcon: {
        flexShrink: 0,
        marginLeft: kI.space.g1,
        marginRight: kI.space.g1,
        color: kI.color.link,
      },
      refreshIcon: ({ props: e }) => ({
        flexShrink: 0,
        width: 16,
        height: 16,
        color: kI.color.link,
        marginLeft: "auto",
        ...(!e.showRefreshButton && { display: "none" }),
      }),
      metricGrid: {
        ...kI.fullWidth,
        ...kI.padding("g1h g3 g1h g3"),
        gridTemplateColumns: "repeat(1, 100fr)",
        gridColumnGap: kI.space.g3,
        gridRowGap: kI.space.g3,
        justifyItems: "stretch",
        backgroundColor: kI.color.bgLight1,
        borderTop: kI.border.dark,
        borderBottom: kI.border.dark,
      },
      message: { marginTop: kI.space.g1, ...kI.padding("g1 g3 g2 g3") },
    },
    EI = "tag-stats-popup.goto",
    _I = "igswiss.refresh";
  var xI, PI;
  function TI() {
    return (TI =
      Object.assign ||
      function (e) {
        for (var t = 1; t < arguments.length; t++) {
          var r = arguments[t];
          for (var n in r)
            Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
        }
        return e;
      }).apply(this, arguments);
  }
  kI.SvgIcon.registerSvgIcons([
    `<symbol id="${EI}" viewBox="0 0 32 32"><rect width="32" height="32" fill="none"/><path d="M15729,6145.5v-10h6l-2,2h-2v6h6v-2l2-2v6Zm4.147-5.847,5.148-5.148h-3.3V6133h6.51v6.451H15740V6136.2l-5.147,5.147Z" transform="translate(-15718.508 -6123.5)" fill="currentColor"/></symbol>`,
  ]),
    (kI.TagStatsPopup = class extends kI.Component {
      render() {
        return Glamor.createElement(
          "div",
          { css: SI.root },
          this._renderMarker(),
          this._renderHeader(),
          this._renderMetrics(),
          this._renderMessage()
        );
      }
      _renderMarker() {
        return Glamor.createElement("div", { css: SI.marker(this) });
      }
      _renderHeader() {
        return Glamor.createElement(
          "div",
          { css: SI.header },
          Glamor.createElement(
            "div",
            { css: SI.title },
            "#",
            this.props.tag.name
          ),
          Glamor.createElement(kI.SvgIcon, {
            name: EI,
            style: SI.gotoIcon,
            onClick: this.props.onGoToTagClick,
          }),
          Glamor.createElement(kI.SvgIcon, {
            name: _I,
            style: SI.refreshIcon(this),
            onClick: this.props.onRefreshTagClick,
          })
        );
      }
      _renderMetrics() {
        const e = this.props.tag || {},
          t = this.props.accountStats || {},
          r = this.props.tiers,
          { avgLikes: n, avgComments: o, isBanned: a, isFlagged: i } = e;
        if (a || i) return null;
        if (_.isNil(n) && _.isNil(o)) return null;
        const s = {
            title: "ENGAGEMENT",
            tooltip: kI.tagTooltips().engagement,
            iconName: "engagement",
            iconColor: kI.tagUtils.engagementToIconColor(e, t),
            blurred: this.props.showUpgradeToPro,
            value: kI.tagUtils.engagementToLabel(e, t, r),
            subValue: this._renderSubValue(
              kI.tagUtils.calcRate(
                kI.tagUtils.calcEngagement(e),
                kI.tagUtils.calcEngagement(t)
              )
            ),
          },
          l = _.isNil(n) ? "N/A" : n,
          c = {
            title: "AVG. LIKES ON TOP POSTS",
            tooltip: kI.tagTooltips().likes,
            iconName: "likes",
            blurred: this.props.showUpgradeToPro,
            value: l,
            valueSuffix: "N/A" === l ? "" : 1 === l ? "like" : "likes",
            subValue:
              !_.isNil(e.avgLikes) &&
              !_.isNil(t.avgLikes) &&
              this._renderSubValue(
                kI.tagUtils.calcRate(e.avgLikes, t.avgLikes)
              ),
          },
          u = _.isNil(o) ? "N/A" : o,
          d = {
            title: "AVG. COMMENTS ON TOP POSTS",
            tooltip: kI.tagTooltips().comments,
            iconName: "comments",
            blurred: this.props.showUpgradeToPro,
            value: u,
            valueSuffix: "N/A" === u ? "" : 1 === u ? "comment" : "comments",
            subValue:
              !_.isNil(e.avgComments) &&
              !_.isNil(t.avgComments) &&
              this._renderSubValue(
                kI.tagUtils.calcRate(e.avgComments, t.avgComments)
              ),
          };
        return Glamor.createElement(
          "div",
          { css: [kI.grid, SI.metricGrid] },
          Glamor.createElement(kI.TagStatsPopupItem, s),
          Glamor.createElement(kI.TagStatsPopupItem, c),
          Glamor.createElement(kI.TagStatsPopupItem, d)
        );
      }
      _renderMessage() {
        const { tag: e, accountStats: t, tiers: r } = this.props,
          { isFlagged: n, isBanned: o } = e;
        let a = null;
        return (
          (a = o
            ? {
                iconName: "banned",
                title: "Banned or Missing",
                content:
                  "\n          Oops‚Ä¶ There are no posts for this hashtag.\n          It could be banned by Instagram. Forget about it.\n        ",
              }
            : n
            ? {
                iconName: "flagged",
                title: "Flagged Hashtag",
                content:
                  "\n          Oops‚Ä¶ This hashtag is flagged by Instagram,\n          it is best to ignore it.\n        ",
              }
            : this.props.showUpgradeToPro
            ? {
                title: "Inssist PRO",
                content: Glamor.createElement(
                  kI.Fragment,
                  null,
                  "Get the most out of hashtags with Inssist PRO. Hashtag metrics, ladders and collections included.",
                  Glamor.createElement(kI.Spacer, { height: "g1h" }),
                  Glamor.createElement(
                    "div",
                    { css: kI.row },
                    Glamor.createElement(kI.LinkButton, {
                      label: "UPGRADE NOW",
                      onClick: this.props.onUpgradeClick,
                    }),
                    Glamor.createElement(kI.Spacer, { width: "g3" }),
                    Glamor.createElement(kI.LinkButton, {
                      label: "NO, THANKS",
                      onClick: this.props.onUpgradeCancelClick,
                    })
                  )
                ),
              }
            : kI.tagUtils.engagementToMessage(e, t, r)),
          a
            ? Glamor.createElement(
                "div",
                { css: SI.message },
                Glamor.createElement(kI.TagStatsPopupMessage, a)
              )
            : null
        );
      }
      _renderSubValue(e) {
        return null === e
          ? null
          : !Number.isFinite(e) || e > 99
          ? Glamor.createElement(
              "span",
              null,
              Glamor.createElement(
                "span",
                { css: { color: kI.color.error } },
                "‚ñ≤99x"
              ),
              " your average"
            )
          : e >= 3
          ? Glamor.createElement(
              "span",
              null,
              Glamor.createElement(
                "span",
                { css: { color: kI.color.error } },
                "‚ñ≤",
                Math.round(e),
                "x"
              ),
              " ",
              "your average"
            )
          : Glamor.createElement(
              "span",
              null,
              Math.round(100 * e),
              "% of your average"
            );
      }
    });
  const { $ui: II } = app,
    GI = {
      title: { ...II.text.bleakSemiBold, paddingRight: II.space.g1 },
      content: ({ props: e }) => ({
        ...(e.blurred && {
          opacity: 0.45,
          filter: "blur(4px)",
          pointerEvents: "none",
          userSelect: "none",
        }),
      }),
      icon: ({ iconColor: e }) => ({
        color: e || II.color.primary,
        marginRight: II.space.g1,
      }),
      value: { ...II.text.contentTitle },
      na: { color: II.color.textPassive },
      subValue: { ...II.text.bleakSemiBold, fontSize: 10, lineHeight: "12px" },
      tooltip: ({ hovered: e }) => ({
        opacity: e ? 1 : 0,
        ...II.transition.superfast,
      }),
    },
    DI = "tag-stats-popup-item.metric.engagement",
    AI = "tag-stats-popup-item.metric.posts",
    MI = "tag-stats-popup-item.metric.likes",
    FI = "tag-stats-popup-item.metric.comments",
    RI = "tag-stats-popup-item.metric.reach";
  II.SvgIcon.registerSvgIcons([
    `<symbol id="${DI}" viewBox="0 0 20 23"><rect width="20" height="23" fill="none"/><path d="M66.063,18.461c.7-1.4,1.531-3.776.368-4.8a7.29,7.29,0,0,1-2.644,0c-1.776-.4-2.338-1.806-1.849-3.607-2.389,2.183-2.49,5.4-1.6,8.5a.565.565,0,0,1-.856.625c-.149-.1-3.64-2.469-3.64-6.117,0-5.978,6.777-6.235,6.777-12.5a.565.565,0,0,1,.928-.433c2.708,2.272,7.636,7.732,7.359,12.755-.137,2.49-1.49,4.608-4.021,6.295A.566.566,0,0,1,66.063,18.461Z" transform="translate(-53.215 1.588)" fill="currentColor"/></symbol>`,
    `<symbol id="${AI}" viewBox="0 0 20 23"><rect width="20" height="23" fill="none"/><path d="M16172.362,4956.869a1.361,1.361,0,0,1-1.361-1.361V4944.35a1.361,1.361,0,0,1,1.361-1.361h17.147a1.364,1.364,0,0,1,1.361,1.361v11.158a1.364,1.364,0,0,1-1.361,1.361Zm11.54-3.876c1.932-.041,4.174-1.609,5.607-2.8v-5.3a.547.547,0,0,0-.545-.544h-16.059a.545.545,0,0,0-.544.544v8.029c.873-.913,2.656-2.458,4.718-2.458C16180.006,4950.465,16180.7,4953.058,16183.9,4952.993Zm-9.9-5.494a1.5,1.5,0,1,1,1.5,1.5A1.5,1.5,0,0,1,16174,4947.5Zm.264-5.872a.817.817,0,0,1,0-1.633h13.34a.817.817,0,1,1,0,1.633Zm2.178-2.995a.817.817,0,0,1,0-1.633h8.984a.817.817,0,1,1,0,1.633Z" transform="translate(-16171 -4935)" fill="#556180"/></symbol>`,
    `<symbol id="${MI}" viewBox="0 0 20 23"><rect width="20" height="23" fill="none"/><path d="M13.03,0A5.381,5.381,0,0,0,8.986,1.878,5.381,5.381,0,0,0,4.942,0,4.894,4.894,0,0,0,0,4.942c0,3.4,3.055,6.165,7.683,10.37l1.3,1.177,1.3-1.186c4.628-4.2,7.683-6.964,7.683-10.361A4.894,4.894,0,0,0,13.03,0Z" transform="translate(1.276 3)" fill="#ee4956"/></symbol>`,
    `<symbol id="${FI}" viewBox="0 0 20 23"><rect width="20" height="23" fill="none"/><path d="M15.865,0H1.916A1.918,1.918,0,0,0,0,1.916V12.134A1.918,1.918,0,0,0,1.916,14.05H6.337L7.8,16.978a1.267,1.267,0,0,0,1.09.8,1.267,1.267,0,0,0,1.09-.8l1.464-2.928h4.421a1.918,1.918,0,0,0,1.916-1.916V1.916A1.918,1.918,0,0,0,15.865,0Z" transform="translate(1.277 3.036)" fill="#556180"/></symbol>`,
    `<symbol id="${RI}" viewBox="0 0 20 23"><rect width="20" height="23" fill="none"/><path d="M15.622,2.682a9.15,9.15,0,1,0,0,12.94A9.145,9.145,0,0,0,15.622,2.682ZM15.24,14.317a9.172,9.172,0,0,0-1.367-1.012,14.8,14.8,0,0,0,.552-3.57h2.69a7.911,7.911,0,0,1-1.875,4.583ZM1.189,9.735h2.69a14.8,14.8,0,0,0,.552,3.57,9.172,9.172,0,0,0-1.367,1.012A7.912,7.912,0,0,1,1.189,9.735ZM3.065,3.986A9.172,9.172,0,0,0,4.431,5a14.8,14.8,0,0,0-.552,3.57H1.189A7.912,7.912,0,0,1,3.065,3.986Zm5.5,1.133A7.922,7.922,0,0,1,5.851,4.43c.494-1.273,1.406-2.8,2.718-3.178Zm0,1.168V8.569H5.046a13.738,13.738,0,0,1,.442-3.023A9.089,9.089,0,0,0,8.569,6.287Zm0,3.448v2.282a9.089,9.089,0,0,0-3.081.742,13.738,13.738,0,0,1-.442-3.023Zm0,3.45v3.867c-1.312-.378-2.224-1.905-2.718-3.178A7.922,7.922,0,0,1,8.569,13.185Zm1.166,0a7.922,7.922,0,0,1,2.718.689c-.494,1.273-1.406,2.8-2.718,3.178Zm0-1.168V9.735h3.523a13.738,13.738,0,0,1-.442,3.023,9.089,9.089,0,0,0-3.081-.742Zm0-3.448V6.287a9.089,9.089,0,0,0,3.081-.742,13.738,13.738,0,0,1,.442,3.023Zm0-3.45V1.252c1.312.378,2.224,1.905,2.718,3.178A7.923,7.923,0,0,1,9.735,5.119Zm2.619-3.285a7.949,7.949,0,0,1,2.067,1.32,8.014,8.014,0,0,1-.938.712,8.779,8.779,0,0,0-1.129-2.032ZM4.821,3.866a8.017,8.017,0,0,1-.938-.712A7.949,7.949,0,0,1,5.95,1.834,8.782,8.782,0,0,0,4.821,3.866Zm0,10.572A8.78,8.78,0,0,0,5.95,16.469a7.949,7.949,0,0,1-2.067-1.32A8.014,8.014,0,0,1,4.821,14.438Zm8.662,0a8.018,8.018,0,0,1,.938.712,7.949,7.949,0,0,1-2.067,1.32,8.778,8.778,0,0,0,1.129-2.032Zm.942-5.869A14.8,14.8,0,0,0,13.873,5,9.174,9.174,0,0,0,15.24,3.986a7.912,7.912,0,0,1,1.875,4.583Z" transform="translate(1 2)" fill="#1ba2f9"/></symbol>`,
  ]),
    (II.TagStatsPopupItem =
      ((PI = xI =
        class extends II.Component {
          constructor(e) {
            super(e), (this.state = { hovered: !1 });
          }
          render() {
            const {
                title: e,
                tooltip: t,
                iconName: r,
                value: n,
                subValue: o,
                valueSuffix: a,
              } = this.props,
              i = Glamor.createElement("div", { css: GI.title }, e),
              s =
                t &&
                Glamor.createElement(II.InfoCircle, {
                  mini: !0,
                  style: GI.tooltip(this.state),
                  tooltip: t,
                }),
              l =
                r &&
                Glamor.createElement(II.SvgIcon, {
                  name: `tag-stats-popup-item.metric.${r}`,
                  style: GI.icon(this.props),
                }),
              c =
                null != n &&
                ("number" == typeof n
                  ? Glamor.createElement(
                      "div",
                      { css: GI.value },
                      Glamor.createElement(II.NumberRenderer, {
                        short: !0,
                        value: n,
                      }),
                      " ",
                      a
                    )
                  : "N/A" === n
                  ? Glamor.createElement(
                      "div",
                      { css: [GI.value, GI.na] },
                      n,
                      " ",
                      a
                    )
                  : Glamor.createElement("div", { css: GI.value }, n, " ", a)),
              u =
                null != o &&
                Glamor.createElement("div", { css: GI.subValue }, o);
            return Glamor.createElement(
              "div",
              TI({ css: [II.column] }, II.hoverState(this, "hovered")),
              Glamor.createElement(
                "div",
                { css: [II.row, II.alignItems.center] },
                i,
                s
              ),
              Glamor.createElement(II.Spacer, { height: "g1" }),
              Glamor.createElement(
                "div",
                { css: [II.row, GI.content(this)] },
                l,
                Glamor.createElement("div", { css: II.column }, c, u)
              )
            );
          }
        }),
      (xI.defaultProps = { title: "METRIC" }),
      PI));
  const { $ui: LI } = app,
    BI = {
      root: { ...LI.row, ...LI.fullWidth },
      icon: { flexShrink: 0, width: 28, height: 28, marginRight: LI.space.g1h },
      body: {},
      title: { marginBottom: LI.space.g1, ...LI.text.group2 },
      content: { ...LI.text.bleak },
    },
    OI = "tag-stats-popup-message.flagged",
    $I = "tag-stats-popup-message.banned";
  LI.SvgIcon.registerSvgIcons([
    `<symbol id="${OI}" viewBox="0 0 28.117 24.326"><g transform="translate(0.358 0.311)"><path d="M13.606,5.864a3.987,3.987,0,0,1,6.757,0L30.514,22.706a3.744,3.744,0,0,1-3.378,5.614H6.833a3.744,3.744,0,0,1-3.378-5.614Z" transform="translate(-3.283 -4.305)" fill="#e34e21"/><path d="M1.486-2,.752-11.3l2.9.019L2.917-2ZM.884-.6H3.519v2.6H.884Z" transform="translate(11.449 18.346)" fill="#fff"/></g></symbol>`,
    `<symbol id="${$I}" viewBox="0 0 40 40"><path d="M20.563.563a20,20,0,1,0,20,20A20,20,0,0,0,20.563.563ZM31.055,10.07a14.841,14.841,0,0,1,1.667,19L12.052,8.4A14.84,14.84,0,0,1,31.055,10.07ZM10.07,31.055a14.841,14.841,0,0,1-1.667-19l20.671,20.67a14.84,14.84,0,0,1-19-1.667Z" transform="translate(-0.563 -0.563)" fill="#e34e21"/></symbol>`,
  ]),
    (LI.TagStatsPopupMessage = class extends LI.Component {
      render() {
        return Glamor.createElement(
          "div",
          { css: BI.root },
          this._renderIcon(),
          this._renderBody()
        );
      }
      _renderIcon() {
        return this.props.iconName
          ? Glamor.createElement(LI.SvgIcon, {
              style: BI.icon,
              name: `tag-stats-popup-message.${this.props.iconName}`,
            })
          : null;
      }
      _renderBody() {
        return Glamor.createElement(
          "div",
          { css: BI.body },
          Glamor.createElement("div", { css: BI.title }, this.props.title),
          Glamor.createElement("div", { css: BI.content }, this.props.content)
        );
      }
    });
  const { $ui: NI } = app,
    UI = {
      root: {},
      title: {
        ...NI.text.bleakSemiBold,
        textAlign: "center",
        color: NI.color.iconPassive,
        marginBottom: NI.space.g1,
      },
      clientList: { ...NI.row, ...NI.alignItems.center },
      client: {
        color: NI.color.iconPassive,
        marginRight: NI.space.g5,
        "&:last-child": { marginRight: 0 },
      },
    },
    HI = "billing-clients.burger-king",
    zI = "billing-clients.espn",
    jI = "billing-clients.kbs",
    WI = "billing-clients.vichy",
    VI = "billing-clients.samsung";
  var qI, ZI;
  NI.SvgIcon.registerSvgIcons([
    `<symbol id="${HI}" viewBox="0 0 62.114 62.649"><path d="M0 31.07A31.3 31.3 0 0131.61 0a30.3 30.3 0 019.36 1.487 33.617 33.617 0 00-7.424-.892C15.933.595 3.318 13.549 3.318 30.008a27.422 27.422 0 005.255 16.544v4.714l3.042-1.3a28.223 28.223 0 0019.911 7.306C42.4 57.128 50.67 50.4 54.988 40.711l5.233 2.846A31.36 31.36 0 010 31.07zm19.187 18.71s-.4-.4-.234-.807c.128-.255.277-.319.638-.467a235.675 235.675 0 0131.7-10.088c.383-.085.681-.085.872.127a1.015 1.015 0 01.128.913c-.3 1.253-2.957 10.151-15.55 13.188a25.042 25.042 0 01-5.883.7c-5.749-.003-10.387-1.946-11.671-3.566zM9.232 34.871l4.722-1.933V38.4l3.978-6.775a2.244 2.244 0 012.872-.786 1.935 1.935 0 01.851 2.867c-.489.765-3.446 5.437-3.446 5.437l3.361 3.377a2.388 2.388 0 01-.34 3.334 2.61 2.61 0 01-3.616-.212l-3.7-3.929v4.885a3.23 3.23 0 01-.34 1.508 2.014 2.014 0 01-1.042.807l-3.319 1.38zm13.657-2.612c0-2.251.872-3.122 2.361-3.653 1.149-.425 2.553-.828 2.553-.828v13.061a3.116 3.116 0 01-2.382 3.355c-1.234.467-2.531.913-2.531.913zm6.339-4.821l2.255-.679a2.559 2.559 0 012.446.361c1.723 1.72 4.4 5.054 4.4 5.054v-4.651c0-1.954.893-2.7 2.042-3.016 1-.276 2.212-.531 2.212-.531v13.4a2.341 2.341 0 01-1.681 2.251 2.468 2.468 0 01-2.6-.595l-4.7-5.394s0 3.525.021 5.331a2.928 2.928 0 01-2.212 3.185c-.17.043-2.191.743-2.191.743zM56.5 38.97a2.809 2.809 0 112.808 2.74 2.7 2.7 0 01-2.808-2.74zm.745 0a2.045 2.045 0 002.063 2.145 2.147 2.147 0 10-2.063-2.145zm2.68 1.529l-.745-1.3h-.38v1.3h-.6v-3.058h1.17c.766 0 1.191.255 1.191.913 0 .552-.361.765-.808.807l.808 1.338zm-1.085-1.763h.532c.34 0 .6-.043.6-.425 0-.34-.362-.382-.638-.382h-.511zm-15.53-7.964c.021-6.562 4.765-8.58 7.19-9.068a9.336 9.336 0 015.169.34c1.978.765 1.361 4.014-.808 3.7a7.6 7.6 0 00-3.7-.106 4.2 4.2 0 00-3.212 4.375c.021 2.357 1 3.7 3.169 3.355 1.659-.318 1.553-1.062 1.553-1.019v-1.258s-.51.149-.851.212c-1.064.191-1.553-.361-1.574-1.381v-1.528l6.573-1.423s.043 3.993 0 5.267a4.006 4.006 0 01-1.065 2.862 8.622 8.622 0 01-5.148 2.209 8.514 8.514 0 01-.933.052c-3.19.004-6.383-1.83-6.363-6.589zM6.81 23.02s2.616-1.062 3.467-1.38c2.425-.892 3.85.191 3.85 1.805a3.474 3.474 0 01-1.468 2.8 2.19 2.19 0 011.851 2.1c.043 2.166-1.51 3.313-3.552 4.141l-4.151 1.769zm2.872 4.991v2.74l.638-.3a1.8 1.8 0 001.17-1.7.9.9 0 00-.912-1 2.019 2.019 0 00-.899.261zm-.024-4.141v2.4c.213-.085.361-.149.532-.234a1.773 1.773 0 001.064-1.593c0-.539-.288-.817-.741-.817a1.938 1.938 0 00-.855.244zm5.084 3.037v-6.923s.511-.213 1.4-.51c.787-.255 1.447.021 1.447.977v5.713c0 .7.319 1.147.978.977.872-.212.978-1.083.978-1.784V18.37s.745-.276 1.383-.467c.787-.213 1.447.021 1.447.977v5.861c-.021 3.08-1.468 4.29-3.616 4.927a4.73 4.73 0 01-1.344.212c-1.656.001-2.691-1.118-2.674-2.973zm8.445-9.663s2.361-.828 3.744-1.147c2.127-.51 3.659.467 3.638 2.209a4.315 4.315 0 01-1.769 3.356l1.832 1.738a1.5 1.5 0 01-.021 2.124 1.532 1.532 0 01-2.148-.085c-.021 0-2.446-2.506-2.446-2.506V25.7a1.668 1.668 0 01-1.149 1.529c-.532.191-1.681.573-1.681.573zm2.829 1.168l-.021 2.931s1.659-.871 1.659-2.23c-.013-.688-.387-.882-.806-.882a2.458 2.458 0 00-.832.181zm-1.149 8.813zm6.063-7.454c0-3.377 2.021-6.222 5.977-6.35 1.808-.064 2.659.531 2.638 1.487-.021.892-.638 1.4-1.723 1.232a3.887 3.887 0 00-1.638.021c-1.255.318-2.191 1.465-2.212 3.419.021 1.487.574 2.272 1.6 2.315.723.021 1.4-.276 1.4-.743v-1.168s-.276.064-.617.127a.74.74 0 01-.936-.786v-1.167l4.191-.956v3.993a2.4 2.4 0 01-.766 1.784 5.815 5.815 0 01-2.872 1.3 5.644 5.644 0 01-.982.089c-2.303-.005-4.061-1.555-4.061-4.596zm9.36-7.051c1.766-.4 4.595-.977 6.084-1.232v1.189a1.037 1.037 0 01-.872 1.189l-2.383.488v1.572l2.978-.637v1.147a.992.992 0 01-.872 1.1c-.447.106-2.106.446-2.106.446v1.975l3.361-.743v1.21a1.223 1.223 0 01-1 1.338c-1.851.4-5.212 1.189-5.212 1.189zm6.81-1.379s2.957-.531 3.723-.616c2.127-.276 3.552.913 3.51 2.57a3.507 3.507 0 01-1.723 2.888s1.446 1.614 1.829 2.06a1.367 1.367 0 01-.276 2.06 1.465 1.465 0 01-1.936-.255l-2.361-2.8v2.464a1.4 1.4 0 01-1.213 1.444l-1.553.3zm2.744 1.614l.021 2.718s1.638-.616 1.617-1.933a.818.818 0 00-.931-.885 3.119 3.119 0 00-.711.1zm-37.187 4.778a1.311 1.311 0 01-.064-.892s1.149-6.775 8.807-10.873a27.52 27.52 0 0114.635-2.7c8.232.892 10.572 4.842 10.572 4.842a.739.739 0 01.149.7c-.106.255-.34.34-.638.4-3.786.637-9.721 1.805-16.932 3.717-5.064 1.344-13.086 3.999-15.786 4.912a1.172 1.172 0 01-.362.07.461.461 0 01-.381-.176z" fill="currentColor"/></symbol>`,
    `<symbol id="${zI}" viewBox="0 0 96.998 23.478"><path d="M38.936 23.433H22.325l.957-6.223v-.052h15.627l.319-2.63H28.491a4.644 4.644 0 01-3.4-1.12 3.961 3.961 0 01-1.2-2.682c-.027-.313.08-1.51.08-1.51h19.191a5.94 5.94 0 012.5.469 3.225 3.225 0 011.46 2.215 31.132 31.132 0 01-.824 7.5 4.955 4.955 0 01-2.87 3.437 8.242 8.242 0 01-3.458.643 11.022 11.022 0 01-1.034-.047zm47.813 0L88.529 9.3h7.761l-1.781 14.133zm-15.654 0l1.754-14.19h7.787l-1.781 14.19zm-23.946 0L48.9 9.243h22.673a10.92 10.92 0 01-.8 3.463A3.25 3.25 0 0168.57 14.4a15.183 15.183 0 01-2.631.234h-9.887l-1.01 8.8zM0 23.433L1.807 9.165h20.917l-.664 5.442H9.01l-.346 2.6H21.74l-.8 6.223zM73.114 6.77l.957-6.744 17.515.026a6.48 6.48 0 013.561.677 3.908 3.908 0 011.781 2.76 10.455 10.455 0 01-.213 3.281zM2.179 6.718L3.03 0h20.89l-.9 6.718zm69.872-.026H24.239a11.631 11.631 0 01.718-3.463 5.667 5.667 0 012.5-2.6A8.54 8.54 0 0129.474 0h37.607a8.693 8.693 0 012.259.312 3.83 3.83 0 012.339 2.057 5.561 5.561 0 01.421 2.969 5.479 5.479 0 01-.047 1.357.009.009 0 01-.002-.003z" fill="currentColor"/></symbol>`,
    `<symbol id="${jI}" viewBox="0 0 104.688 36.492"><g fill="currentColor"><path d="M.188 7.606L0 29.735h4.741l.013-22.1-4.567-.026"/><path d="M4.706 18.338l8.556 11.463 6.234.026-9.17-11.371 8.919-10.849-5.971-.026-8.567 10.758m33.987-.366a5.563 5.563 0 002.215-4.381v-.443c-.415-5.1-5.6-5.555-5.6-5.555l-13.26-.039-.074 22.263 14.028.091s5.358-.157 6-6.39v-.443c.017-2.899-3.309-5.103-3.309-5.103zm-12.176-6.872a62.2 62.2 0 017.025.078 2.612 2.612 0 012.448 2.569c-.54 2.8-2.47 2.53-2.47 2.53l-7.027-.026zm7.308 15.192l-7.377-.039.029-6.4 7.289.026s3.248.2 3.059 3.351a3.316 3.316 0 01-3 3.064M62.362 7.75l-12.91-.091s-6.148.4-6.087 6.377 6.824 5.829 7.085 6.012l4.128-.078s3.338-.065 3.941 2.4-1.775 3.766-1.775 3.766l-1.055.248-11.329-.052-.016 3.43 13.173.065s5.621-.156 6.436-5.777-4.883-7.394-4.883-7.394l-2.547-.183-5.62-.065a2.706 2.706 0 01-2.27-2.7c.1-2.282 2.733-2.53 2.733-2.53h10.978l.014-3.43m40.314 2.088C97.455-.935 87.681.056 87.681.056c-6.551-.547-8.995 3.117-8.995 3.117a13.4 13.4 0 00-9.107 8.215c-3.664 9 1.888 16.887 1.888 16.887 4.775 7.994 13.993 8.215 13.993 8.215 6.774.1 8.773-3.117 8.773-3.117 5.661-1.434 8.555-6.885 8.555-6.885 4.335-8.554-.116-16.652-.116-16.652zm-24.32-5.672c15.658-5.542 22.546 3.782 22.546 3.782l-.561-.222c-9.88-8.437-22.207-2.66-22.207-2.66-.658-.444.227-.9.227-.9zm-.554 3.117c17.879-7.224 25.1 4.329 25.1 4.329C91.351.617 77.913 8.389 77.913 8.389c-.887 0-.11-1.108-.11-1.108zm25.878 8.215C94.9 3.838 78.131 10.945 78.131 10.945c-.554-.118 0-1.226 0-1.226 21.22-7.211 25.55 5.777 25.55 5.777zM94.9 32.383c-15.659 5.548-22.544-3.782-22.544-3.782l.555.222c9.883 8.442 22.21 2.673 22.21 2.673.672.443-.216.886-.216.886zm.555-3.117c-17.879 7.224-25.1-4.329-25.1-4.329 11.548 10.993 24.987 3.221 24.987 3.221.895 0 .118 1.106.118 1.106zm-25.876-8.215c8.773 11.658 25.543 4.551 25.543 4.551.555.117 0 1.226 0 1.226-21.206 7.21-25.538-5.777-25.538-5.777zm34.1 2.217s-2.452-12.649-19.659-8.437a9.764 9.764 0 002.331.222s11.216-2.438 15.1 5.112a12.005 12.005 0 01-6.214 5.112l-1-.782s-21.211 7.668-25.1-7.772c0 0 4.775 13.209 23.987 6.663 0 0-.222-1-1.556-.782 0 0-20.195 6.663-21.873-9.754.063.509 1.811 13.105 19.765 8.763 0 0 0-.561-2.332-.339 0 0-11.662 3-15.437-5.333a19.232 19.232 0 016.108-4.89l1.222 1s20.105-7.55 25.1 7.107c0 0-5.444-12-23.99-5.881l1.333.887s16.325-5.777 21.77 6a5.406 5.406 0 01.443 3.1"/></g></symbol>`,
    `<symbol id="${WI}" viewBox="0 0 114.851 35.302"><path d="M0 .785h4.551l8.629 19.3 8.316-19.3h3.922l-11.14 24.163h-2.824zm29.5 24.163h3.923V.785h-3.926zm57.111.156h-3.925V14.121H68.879v10.983H64.8V.942h4.079v10.2h13.807V.942h3.922v24.162zM89.906.628h4.86l8.158 11.454 7.689-11.3h4.236l-9.883 14.438v9.728h-4.237V15.22zm-29.34 3.3V.942A29.2 29.2 0 0053.506 0C47.073 0 40.797 2.667 38.13 8.629c-1.569 3.138-.942 7.845 1.1 10.827 5.178 6.589 14.592 6.747 22.123 4.706v-2.824c-.314 0-.314 0-.471.157-5.496 1.88-11.772 2.824-17.107-2.82a10.277 10.277 0 01-1.726-9.257c1.726-4.707 5.962-7.217 11.14-6.747a20.9 20.9 0 017.377 1.252zm-48.8 30.904h1.255v.47H11.14v-4.863h.626zm9.257-1.413h-1.567l.785-2.039zm.314.471l.471 1.411h.627l-2.2-5.178-2.2 5.178h.627l.471-1.411zm7.06-.942h.469c.627 0 1.255.157 1.255.942s-.627.941-1.1.941h-.627v-1.883zm-.47 2.354h1.1c.941 0 1.726-.47 1.726-1.411a1.193 1.193 0 00-.942-1.255.95.95 0 00.471-.942c0-.941-.785-1.254-1.569-1.254h-.785v4.863zm.47-4.393h.157c.785 0 1.255 0 1.255.784s-.627.785-1.255.785h-.157zm10.355-.157a2.047 2.047 0 010 4.08 2.076 2.076 0 01-2.039-2.039 1.978 1.978 0 012.041-2.041zm0-.47a2.515 2.515 0 100 5.02 2.51 2.51 0 100-5.02zm8 .627h.157c.627 0 1.255 0 1.255.941 0 .628-.627.785-1.255.785h-.157zm0 2.2h.157l1.412 2.2h.627l-1.569-2.2a1.374 1.374 0 001.255-1.413c0-1.1-.785-1.254-1.726-1.254h-.785v4.863h.627v-2.2zm9.884.314h-1.721l.942-2.039zm.157.471l.627 1.411h.628l-2.2-5.178-2.353 5.178h.627l.627-1.411zm7.061 1.411h-.628v-4.396h-1.1v-.47h2.824v.47h-1.1zm8-4.55a2.04 2.04 0 010 4.08 2.046 2.046 0 010-4.08zm0-.47a2.51 2.51 0 100 5.02 2.515 2.515 0 100-5.02zm8 .157h.628v4.863h-.616zm7.061.47h.157c.784 0 1.255 0 1.255.941 0 .628-.628.785-1.1.785h-.314zm0 2.2h.157l1.568 2.2h.628l-1.57-2.2a1.373 1.373 0 001.268-1.419c0-1.1-.941-1.254-1.882-1.254h-.628v4.863h.471v-2.2zm7.688-2.667h2.668v.47h-2.033v1.412h1.883v.471h-1.883v2.039h2.041v.47h-2.668zm9.885.941c-.314-.314-.47-.628-.941-.628a.741.741 0 00-.784.785c0 .47.47.627.784.784l.314.157c.627.314 1.1.627 1.1 1.413a1.406 1.406 0 01-1.413 1.411 1.528 1.528 0 01-1.57-1.255l.471-.156a1.038 1.038 0 001.1.941.9.9 0 00.941-.941c0-.628-.47-.785-.941-.942l-.314-.156c-.47-.314-.941-.471-.941-1.255a1.311 1.311 0 012.511-.471z" fill="currentColor" fill-rule="evenodd"/></symbol>`,
    `<symbol id="${VI}" viewBox="0 0 107.843 35.807"><path d="M28.012 35.807a98.706 98.706 0 01-10.929-.559 50.947 50.947 0 01-8.638-1.643c-.609-.18-1.2-.373-1.742-.574s-1.074-.416-1.559-.637-.948-.458-1.369-.7a12.09 12.09 0 01-1.17-.762 8.837 8.837 0 01-.964-.823 6.399 6.399 0 01-.747-.883A5.462 5.462 0 01.6 28.76a4.971 4.971 0 01-.235-.479 4.649 4.649 0 01-.178-.494A4.494 4.494 0 010 26.415a4.96 4.96 0 01.1-.88 5.891 5.891 0 01.258-.894 7.376 7.376 0 01.413-.906 9.5 9.5 0 01.565-.916c.211-.3.451-.615.712-.924s.547-.62.855-.93.641-.623.995-.934.732-.625 1.13-.936.82-.625 1.261-.937.906-.625 1.387-.935.989-.623 1.51-.931 1.069-.619 1.629-.925 1.147-.615 1.743-.918a75.734 75.734 0 013.814-1.8 2.624 2.624 0 00-.375.327 2.46 2.46 0 00-.3.4 2.583 2.583 0 00-.226.47 3.04 3.04 0 00-.141.547 4.362 4.362 0 00-.061.732 3.917 3.917 0 00.086.775 2.223 2.223 0 00.155.464 2.558 2.558 0 00.246.42 3.3 3.3 0 00.323.381 4.558 4.558 0 00.384.347 7.927 7.927 0 00.892.614c.314.19.64.368.956.541a13.382 13.382 0 011.3.77 3.151 3.151 0 01.475.4 1.718 1.718 0 01.172.214 1.212 1.212 0 01.121.226 1.141 1.141 0 01.072.436 1.747 1.747 0 01-.048.391 1.149 1.149 0 01-.105.273.848.848 0 01-.2.24.923.923 0 01-.317.171 1.546 1.546 0 01-.469.065 1.2 1.2 0 01-.824-.277.963.963 0 01-.3-.735v-1.083H15.2v.863a3.932 3.932 0 00.088.853 2.919 2.919 0 00.25.7 2.58 2.58 0 00.391.562 2.766 2.766 0 00.511.434 3.423 3.423 0 00.609.318 4.533 4.533 0 00.686.213 6.862 6.862 0 001.518.156 6.966 6.966 0 001.43-.137 4.686 4.686 0 00.634-.179 3.581 3.581 0 00.564-.261 2.587 2.587 0 001.313-1.971 6.421 6.421 0 00.062-1.188 4.553 4.553 0 00-.073-.644 2.172 2.172 0 00-.162-.477 2.542 2.542 0 00-.256-.433 3.345 3.345 0 00-.339-.392 4.681 4.681 0 00-.4-.357 8.172 8.172 0 00-.936-.626 25.107 25.107 0 00-.992-.543 12.485 12.485 0 01-1.276-.735 2.463 2.463 0 01-.434-.373 1.178 1.178 0 01-.141-.195.783.783 0 01-.082-.2 1.407 1.407 0 01-.036-.33 1.362 1.362 0 01.025-.258.933.933 0 01.277-.506.865.865 0 01.3-.174 1.355 1.355 0 01.443-.067 1.255 1.255 0 01.437.073.9.9 0 01.326.205 1.007 1.007 0 01.274.734v.689h2.78v-.782a3.643 3.643 0 00-.025-.432 2.967 2.967 0 00-.072-.386 2.527 2.527 0 00-.115-.343 2.287 2.287 0 00-.154-.3 2.219 2.219 0 00-.408-.493 2.59 2.59 0 00-.514-.359 3.453 3.453 0 00-.588-.245 4.78 4.78 0 00-.63-.151c-.2-.035-.415-.06-.638-.076a8.579 8.579 0 00-.615-.021 6.79 6.79 0 00-1.55.163c1.113-.472 2.281-.943 3.473-1.4s2.447-.913 3.715-1.352 2.6-.878 3.939-1.3 2.738-.841 4.141-1.235 2.874-.791 4.337-1.162 3-.739 4.51-1.083a190.035 190.035 0 019.471-1.895 196.092 196.092 0 017.635-1.175 182.72 182.72 0 017.359-.829C71 .22 75.567 0 79.842 0a98.673 98.673 0 0110.926.559A50.918 50.918 0 0199.4 2.2c.609.18 1.195.373 1.741.574s1.074.416 1.559.637.948.458 1.368.7a12.076 12.076 0 011.17.762 8.83 8.83 0 01.963.823 6.399 6.399 0 01.747.883 5.456 5.456 0 01.292.464 4.96 4.96 0 01.235.479 4.647 4.647 0 01.178.494 4.507 4.507 0 01.186 1.354 4.941 4.941 0 01-.091.862 5.827 5.827 0 01-.244.875 7.25 7.25 0 01-.394.887 9.272 9.272 0 01-.54.9c-.2.3-.432.6-.682.9s-.524.607-.82.911-.615.61-.954.915-.7.612-1.084.917-.788.613-1.211.918-.87.612-1.333.917-.95.611-1.452.914-1.028.608-1.567.908-1.1.6-1.678.9c-1.15.6-2.386 1.193-3.674 1.775a2.663 2.663 0 001.069-1.989c.034-.381.038-.532.04-.736v-2.987h-3.949v1.627h1.144V20.4a2.579 2.579 0 01-.025.424.878.878 0 01-.086.251.958.958 0 01-.2.263 1.031 1.031 0 01-.342.208 1.592 1.592 0 01-1.023 0 1.021 1.021 0 01-.341-.207.936.936 0 01-.2-.262.831.831 0 01-.082-.249 2.368 2.368 0 01-.029-.424v-5.1a2.623 2.623 0 01.047-.526 1.1 1.1 0 01.084-.245.983.983 0 01.188-.267.963.963 0 01.329-.214 1.378 1.378 0 01.508-.088 1.4 1.4 0 01.526.092.951.951 0 01.331.222 1 1 0 01.254.5 2.817 2.817 0 01.036.424v.624h2.811v-.372a6.658 6.658 0 00-.025-.736 3.4 3.4 0 00-.144-.718 2.7 2.7 0 00-.274-.594 2.511 2.511 0 00-.387-.478 2.759 2.759 0 00-.485-.371 3.422 3.422 0 00-.568-.273 4.5 4.5 0 00-.636-.184 6.8 6.8 0 00-1.417-.137 4.989 4.989 0 00-2.608.6 2.778 2.778 0 00-.483.371 2.57 2.57 0 00-.388.478 2.8 2.8 0 00-.28.593 3.543 3.543 0 00-.158.717 7.894 7.894 0 00-.047.736v4.694c0 .214.01.37.04.736a3.216 3.216 0 00.142.7 2.641 2.641 0 00.273.585 2.543 2.543 0 00.388.477 2.846 2.846 0 00.488.375 3.979 3.979 0 001.212.471 6.555 6.555 0 001.422.145 6.465 6.465 0 001.484-.16c-1.121.485-2.3.968-3.506 1.437s-2.476.938-3.761 1.389-2.638.9-4 1.333-2.789.86-4.217 1.268-2.927.813-4.418 1.194c-1.506.385-3.054.759-4.6 1.111a190.654 190.654 0 01-9.672 1.94 194.775 194.775 0 01-7.633 1.174 182.63 182.63 0 01-7.357.829c-4.736.431-9.304.651-13.578.651zM51.5 19.743v.852a3.89 3.89 0 00.087.844 2.889 2.889 0 00.248.695 2.553 2.553 0 00.388.556 2.739 2.739 0 00.506.429 3.389 3.389 0 00.6.314 4.49 4.49 0 00.679.21 6.8 6.8 0 001.5.154 6.9 6.9 0 001.415-.135 4.641 4.641 0 00.628-.177 3.546 3.546 0 00.559-.258 2.56 2.56 0 001.3-1.951 6.44 6.44 0 00.065-1.177 3.964 3.964 0 00-.074-.635 2.156 2.156 0 00-.156-.474 2.524 2.524 0 00-.254-.429 3.315 3.315 0 00-.336-.389 4.636 4.636 0 00-.4-.353 8.1 8.1 0 00-.926-.62c-.326-.191-.659-.367-.981-.538a12.366 12.366 0 01-1.264-.729 2.442 2.442 0 01-.43-.37 1.167 1.167 0 01-.14-.193.779.779 0 01-.081-.2 1.393 1.393 0 01-.036-.327 1.251 1.251 0 01.025-.25 1.113 1.113 0 01.094-.267.826.826 0 01.181-.238.851.851 0 01.3-.17 1.357 1.357 0 01.438-.065 1.256 1.256 0 01.433.071.881.881 0 01.321.2 1 1 0 01.269.727v.682h2.76v-.776a3.589 3.589 0 00-.025-.427 2.923 2.923 0 00-.071-.382 2.5 2.5 0 00-.114-.339 2.255 2.255 0 00-.152-.3 2.2 2.2 0 00-.4-.487 2.571 2.571 0 00-.51-.355 3.431 3.431 0 00-.583-.243 4.749 4.749 0 00-.624-.15c-.2-.034-.411-.06-.633-.076a8.51 8.51 0 00-.609-.021 6.937 6.937 0 00-1.39.129 4.613 4.613 0 00-.617.17 3.512 3.512 0 00-.55.249 2.8 2.8 0 00-.471.334 2.459 2.459 0 00-.382.424 2.5 2.5 0 00-.281.521 2.967 2.967 0 00-.169.623 4.181 4.181 0 00-.06.721 3.915 3.915 0 00.087.768 2.2 2.2 0 00.153.46 2.526 2.526 0 00.244.416 3.263 3.263 0 00.319.377 4.5 4.5 0 00.38.344 7.843 7.843 0 00.883.608c.312.188.635.365.947.537a13.246 13.246 0 011.281.762 3.117 3.117 0 01.47.4 1.7 1.7 0 01.17.212 1.2 1.2 0 01.119.223 1.109 1.109 0 01.072.43 1.824 1.824 0 01-.047.386 1.126 1.126 0 01-.1.272.83.83 0 01-.193.238.913.913 0 01-.314.168 1.549 1.549 0 01-.466.064 1.18 1.18 0 01-.813-.275.878.878 0 01-.22-.315 1.064 1.064 0 01-.077-.408v-1.07zm10.568-7.479v8c0 .2.015.621.025.731a3.527 3.527 0 00.14.716 2.723 2.723 0 00.263.593 2.465 2.465 0 00.375.478 2.66 2.66 0 00.474.372 3.289 3.289 0 00.561.274 4.385 4.385 0 00.636.185 5.986 5.986 0 00.7.1c.235.022.487.033.748.033s.512-.011.747-.033a5.972 5.972 0 00.7-.1 4.378 4.378 0 00.635-.185 3.288 3.288 0 00.56-.274 2.66 2.66 0 00.474-.372 2.469 2.469 0 00.375-.478 2.729 2.729 0 00.264-.593 3.537 3.537 0 00.14-.716c.012-.112.031-.529.025-.731v-8h-2.82v8.252a2.393 2.393 0 01-.027.426 1.031 1.031 0 01-.081.242.985.985 0 01-.183.265.941.941 0 01-.318.214 1.392 1.392 0 01-.974 0 .942.942 0 01-.319-.215 1.01 1.01 0 01-.188-.266 1.157 1.157 0 01-.085-.242 2.576 2.576 0 01-.027-.426v-8.25zm-16.159 1.13l.074 10.024h2.786l-.241-11.15h-4.544l-1.378 8.524h-.06l-1.375-8.524h-4.55l-.247 11.15h2.793l.069-10.024h.06l1.866 10.024h2.829l1.864-10.024h.058zM29.667 13.3l1.485 10.116h3l-2.06-11.15h-4.96l-2.066 11.15h3.012L29.6 13.3h.062zm45.939.945h.06l2.755 9.055h3.968V12.269h-2.76l.152 8.754h-.06l-2.563-8.754h-4.142V23.3h2.744l-.154-9.055z" fill="currentColor"/></symbol>`,
  ]),
    (NI.BillingClients = class extends NI.Component {
      render() {
        return Glamor.createElement(
          "div",
          { css: UI.root },
          Glamor.createElement(
            "div",
            { css: UI.title },
            "Trusted by many, including"
          ),
          Glamor.createElement(
            "div",
            { css: UI.clientList },
            this._renderClient(HI),
            this._renderClient(zI),
            this._renderClient(jI),
            this._renderClient(WI),
            this._renderClient(VI)
          )
        );
      }
      _renderClient(e) {
        return Glamor.createElement(NI.SvgIcon, {
          style: UI.client,
          name: e,
          key: e,
        });
      }
    });
  const { $ui: YI } = app,
    QI = {
      root: { width: "100%", maxWidth: 320 },
      text: { ...YI.text.bleak, paddingBottom: YI.space.g2 },
      inputContainer: { ...YI.relative() },
      input: {
        ...YI.absolute("0 . 0 0 1"),
        width: 292,
        height: 52,
        lineHeight: "50px",
        fontSize: 42,
        fontWeight: 700,
        letterSpacing: "0.5em",
        opacity: 0,
        cursor: "pointer",
      },
      letterRenderer: (e) => ({
        ...YI.relative(),
        ...YI.noselect,
        width: 54,
        height: 52,
        lineHeight: "50px",
        marginRight: 8,
        textAlign: "center",
        fontSize: 42,
        fontWeight: 700,
        backgroundColor: YI.color.bgLight1,
        border: YI.border.dark,
        ...YI.borderRadius.r4,
        color: e.hasError
          ? YI.color.error
          : void 0 === e.value
          ? YI.color.iconPassive
          : YI.color.textNormal,
        ...YI.clickable,
      }),
      letterMarker: (e) => ({
        ...YI.absolute(". -1 0 -1 10"),
        ...YI.transition.superfast,
        backgroundColor: YI.color.link,
        height: 0,
        ...(e.selected && { height: 4, bottom: -2 }),
      }),
    };
  YI.BillingCodeSection =
    ((ZI = qI =
      class extends YI.Component {
        constructor(e) {
          super(e),
            (this._onFocus = () => {
              this.props.onChange &&
                (this.setState({ selectedLetter: 0 }), this.props.onChange(""));
            }),
            (this._onBlur = () => {
              this.setState({ selectedLetter: -1 });
            }),
            (this._onInput = (e, t) => {
              if (!this.props.onChange) return;
              if (
                ((e = e.toUpperCase().replace(/[^0-9A-Z]/gi, "")),
                -1 === this.state.selectedLetter)
              )
                return;
              const r = this.state.selectedLetter + e.length;
              r < 5
                ? this.setState({ selectedLetter: r })
                : (this.setState({ selectedLetter: -1 }),
                  t && t.target && t.target.blur()),
                (e = (e = (this.props.value || "") + e).substr(0, 5)),
                this.props.onChange(e);
            }),
            (this.state = { selectedLetter: null });
        }
        render() {
          const { value: e, text: t, hasError: r } = this.props,
            n = t && Glamor.createElement("div", { css: QI.text }, t),
            o = Glamor.createElement(
              "div",
              { css: [YI.row, QI.inputContainer] },
              [0, 1, 2, 3, 4].map((t) =>
                Glamor.createElement(KI, {
                  key: t,
                  index: t,
                  value: e[t],
                  selected: this.state.selectedLetter === t,
                  hasError: r,
                })
              ),
              Glamor.createElement(YI.Input, {
                value: "",
                style: QI.input,
                onFocus: this._onFocus,
                onBlur: this._onBlur,
                onInput: this._onInput,
              })
            );
          return Glamor.createElement(
            "div",
            { css: [YI.column, QI.root] },
            n,
            o
          );
        }
      }),
    (qI.defaultProps = {
      text: "We‚Äôve sent a confirmation code to your email address. Please enter it below:",
    }),
    ZI);
  class KI extends YI.Component {
    render() {
      const { value: e } = this.props;
      return Glamor.createElement(
        "div",
        { style: QI.letterRenderer(this.props) },
        Glamor.createElement("div", { css: QI.letterMarker(this.props) }),
        e || "_"
      );
    }
  }
  const { $ui: XI } = app,
    JI = {
      root: XI.fullWidth,
      header: {
        ...XI.fullWidth,
        ...XI.text.group1,
        paddingBottom: XI.space.g3,
      },
      feature: (e) => ({
        ...XI.row,
        ...(e.icons && XI.relative()),
        paddingBottom: e.isPaddedBottom ? XI.space.g4 : XI.space.g2,
      }),
      icons: { ...XI.absolute("0 . . 0"), color: XI.color.iconPassive },
      icon: { marginBottom: XI.space.g3 },
      featureTitle: (e) => ({
        ...XI.row,
        ...XI.alignItems.center,
        ...XI.text.group2,
        color: XI.color.textNormal,
        paddingLeft: e.isFree ? 0 : 66,
      }),
      checkYesIcon: { color: XI.color.positive },
      checkNoIcon: { color: XI.color.iconPassive },
    };
  XI.BillingFeaturesTable = class extends XI.Component {
    render() {
      const { features: e } = this.props;
      return e && 0 !== e.length
        ? Glamor.createElement(
            "div",
            { css: JI.root },
            this._renderHeader(),
            this.props.features.map(this._renderFeature)
          )
        : null;
    }
    _renderHeader() {
      return Glamor.createElement(
        "div",
        { css: [XI.row, XI.justifyContent.end, JI.header] },
        Glamor.createElement("span", null, "FREE"),
        Glamor.createElement(XI.Spacer, { width: 40 }),
        Glamor.createElement("span", null, "PRO")
      );
    }
    _renderFeature(e) {
      const { title: t, tooltip: r, isFree: n, isPro: o, icons: a } = e;
      return Glamor.createElement(
        "div",
        { key: t, css: [XI.row, XI.justifyContent.between, JI.feature(e)] },
        a &&
          Glamor.createElement(
            "div",
            { css: [XI.column, XI.alignItems.center, JI.icons] },
            a.map((e) =>
              Glamor.createElement(XI.SvgIcon, {
                key: e,
                name: e,
                style: JI.icon,
              })
            )
          ),
        Glamor.createElement(
          "div",
          { css: JI.featureTitle(e) },
          t,
          !!r &&
            Glamor.createElement(
              XI.Fragment,
              null,
              Glamor.createElement(XI.Spacer, { width: "g1" }),
              Glamor.createElement(XI.InfoCircle, { mini: !0, tooltip: r })
            )
        ),
        Glamor.createElement(
          "div",
          { css: XI.row },
          Glamor.createElement(XI.Spacer, { width: 13 }),
          n
            ? Glamor.createElement(XI.SvgIcon, {
                style: JI.checkYesIcon,
                name: "igswiss.circle-check-yes",
              })
            : Glamor.createElement(XI.SvgIcon, {
                style: JI.checkNoIcon,
                name: "igswiss.circle-check-no",
              }),
          Glamor.createElement(XI.Spacer, { width: 62 }),
          o
            ? Glamor.createElement(XI.SvgIcon, {
                style: JI.checkYesIcon,
                name: "igswiss.circle-check-yes",
              })
            : Glamor.createElement(XI.SvgIcon, {
                style: JI.checkNoIcon,
                name: "igswiss.circle-check-no",
              }),
          Glamor.createElement(XI.Spacer, { width: 9 })
        )
      );
    }
  };
  const { $ui: eG } = app,
    tG = {
      root: { ...eG.fullWidth, ...eG.relative() },
      title: { ...eG.text.contentTitle, paddingBottom: eG.space.g2 },
      content: (e) => ({
        width: 320,
        ...(e.disabled && {
          ...eG.disabledWithoutTransparency,
          pointerEvents: "none",
        }),
      }),
    };
  var rG, nG;
  eG.BillingForm = class extends eG.Component {
    render() {
      const { title: e, children: t } = this.props,
        r = e && Glamor.createElement("div", { css: [eG.column, tG.title] }, e);
      return Glamor.createElement(
        "div",
        { css: [eG.column, eG.alignItems.start, tG.root] },
        Glamor.createElement(
          "div",
          { css: [eG.column, tG.content(this.props)] },
          r,
          t
        )
      );
    }
  };
  const { $ui: oG } = app,
    aG = {
      root: { width: "100%", maxWidth: 320 },
      text: { ...oG.text.bleak, paddingBottom: oG.space.g2 },
    };
  var iG, sG;
  oG.BillingFSpringAuthSection =
    ((nG = rG =
      class extends oG.Component {
        constructor(...e) {
          var t;
          return (
            (t = super(...e)),
            (this._onUsernameEnter = () => {
              this.props.onNextClick && this.props.onNextClick();
            }),
            (this._onChange = (e, t) => {
              const r = t.currentTarget.dataset.field,
                n = { ...this.props, [r]: e };
              this.props.onChange && this.props.onChange(n);
            }),
            t
          );
        }
        render() {
          const {
              text: e,
              email: t,
              errors: r,
              hideActions: n,
              disableInputs: o,
              onNextClick: a,
              onCancelClick: i,
            } = this.props,
            s = e && Glamor.createElement("div", { css: aG.text }, e);
          return Glamor.createElement(
            "div",
            { css: [oG.column, aG.root] },
            s,
            Glamor.createElement(
              "form",
              null,
              Glamor.createElement(oG.Input, {
                autoComplete: "username",
                label: "email address",
                "data-field": "email",
                value: t,
                error: { hasError: r.email },
                disabled: o,
                onEnter: this._onUsernameEnter,
                onInput: this._onChange,
              })
            ),
            !n && Glamor.createElement(oG.Spacer, { height: "g3" }),
            !n &&
              Glamor.createElement(
                "div",
                { css: oG.row },
                Glamor.createElement(oG.ActionButton, {
                  label: "NEXT",
                  shadow: oG.color.linkShadow,
                  onClick: a,
                }),
                Glamor.createElement(oG.Spacer, { width: "g3" }),
                Glamor.createElement(oG.LinkButton, {
                  label: "CANCEL",
                  cancel: !0,
                  onClick: i,
                })
              )
          );
        }
      }),
    (rG.defaultProps = {
      text: "Please enter an email to store your purchase:",
      email: "",
      errors: {},
      hideActions: !1,
      disableInputs: !1,
    }),
    nG);
  const { $ui: lG } = app,
    cG = {
      root: { width: "100%", maxWidth: 320 },
      text: { ...lG.text.bleak, paddingBottom: lG.space.g2 },
    };
  var uG, dG;
  lG.BillingFSpringCreateAccountSection =
    ((sG = iG =
      class extends lG.Component {
        constructor(e) {
          super(e),
            (this._onUsernameEnter = () => {
              this.passwordInput &&
                this.passwordInput.current.input.current.focus();
            }),
            (this._onPasswordEnter = () => {
              this.givenNameInput &&
                this.givenNameInput.current.input.current.focus();
            }),
            (this._onGivenNameEnter = () => {
              this.lastNameInput &&
                this.lastNameInput.current.input.current.focus();
            }),
            (this._onLastNameEnter = () => {
              this.props.onCreateAccountClick &&
                this.props.onCreateAccountClick();
            }),
            (this._onChange = (e, t) => {
              const r = t.currentTarget.dataset.field,
                n = { ...this.props, [r]: e };
              this.props.onChange && this.props.onChange(n);
            }),
            (this.passwordInput = lG.createRef()),
            (this.givenNameInput = lG.createRef()),
            (this.lastNameInput = lG.createRef());
        }
        render() {
          const {
              textEmail: e,
              textDetails: t,
              email: r,
              password: n,
              firstName: o,
              lastName: a,
              errors: i,
              hideActions: s,
              disableInputs: l,
              onCreateAccountClick: c,
              onCancelClick: u,
            } = this.props,
            d = e && Glamor.createElement("div", { css: cG.text }, e),
            h = t && Glamor.createElement("div", { css: cG.text }, t),
            p = {
              showOnHover: !0,
              tooltip: {
                text: "Required by FastSpring for new accounts to process payments.",
              },
            };
          return Glamor.createElement(
            "div",
            { css: [lG.column, cG.root] },
            d,
            Glamor.createElement(
              "form",
              null,
              Glamor.createElement(lG.Input, {
                autoComplete: "username",
                label: "email address",
                "data-field": "email",
                value: r,
                error: { hasError: i.email },
                disabled: l,
                onEnter: this._onUsernameEnter,
                onInput: this._onChange,
              }),
              Glamor.createElement(lG.Spacer, { height: "g2" }),
              h,
              Glamor.createElement(lG.Input, {
                ref: this.givenNameInput,
                autoComplete: "given-name",
                label: "first name",
                "data-field": "firstName",
                info: p,
                value: o,
                error: { hasError: i.firstName },
                disabled: l,
                onEnter: this._onGivenNameEnter,
                onInput: this._onChange,
              }),
              Glamor.createElement(lG.Spacer, { height: "g1" }),
              Glamor.createElement(lG.Input, {
                ref: this.lastNameInput,
                autoComplete: "family-name",
                label: "last name",
                "data-field": "lastName",
                info: p,
                value: a,
                error: { hasError: i.lastName },
                disabled: l,
                onEnter: this._onLastNameEnter,
                onInput: this._onChange,
              }),
              Glamor.createElement(lG.Spacer, { height: "g1" }),
              Glamor.createElement(lG.Input, {
                ref: this.passwordInput,
                autoComplete: "current-password",
                label: "password",
                "data-field": "password",
                type: "password",
                info: {
                  showOnHover: !0,
                  tooltip: {
                    text: "At least 4 characters long. Any character combination is allowed.",
                  },
                },
                value: n,
                error: { hasError: i.password },
                disabled: l,
                onEnter: this._onPasswordEnter,
                onInput: this._onChange,
              })
            ),
            !s && Glamor.createElement(lG.Spacer, { height: "g3" }),
            !s &&
              Glamor.createElement(
                "div",
                { css: lG.row },
                Glamor.createElement(lG.ActionButton, {
                  label: "CREATE ACCOUNT",
                  shadow: lG.color.linkShadow,
                  onClick: c,
                }),
                Glamor.createElement(lG.Spacer, { width: "g3" }),
                Glamor.createElement(lG.LinkButton, {
                  label: "CANCEL",
                  cancel: !0,
                  onClick: u,
                })
              )
          );
        }
      }),
    (iG.defaultProps = {
      textEmail: "Please enter an email to store your purchase:",
      textDetails:
        "Please provide details and pick a password for your new Inssist account:",
      email: "",
      password: "",
      firstName: "",
      lastName: "",
      errors: {},
      hideActions: !1,
      disableInputs: !1,
    }),
    sG);
  const { $ui: hG } = app,
    pG = { root: { width: "100%", maxWidth: 320 }, text: hG.text.bleak };
  var mG, gG;
  hG.BillingFSpringDeleteConfirmSection =
    ((dG = uG =
      class extends hG.Component {
        render() {
          const { text: e, okButtonText: t, onOkClick: r } = this.props,
            n = e && Glamor.createElement("div", { css: pG.text }, e),
            o =
              t &&
              r &&
              Glamor.createElement(
                hG.Fragment,
                null,
                Glamor.createElement(hG.Spacer, { height: "g3" }),
                Glamor.createElement(hG.LinkButton, { label: t, onClick: r })
              );
          return Glamor.createElement(
            "div",
            { css: [hG.column, pG.root] },
            n,
            o
          );
        }
      }),
    (uG.defaultProps = {
      text: "Success! Account has been removed, subscription cancelled and all your data erased from our servers.",
      okButtonText: "OK, CLOSE",
    }),
    dG);
  const { $ui: fG } = app,
    vG = {
      root: { ...fG.fullWidth, maxWidth: 320 },
      text: { ...fG.text.bleak, paddingBottom: fG.space.g2 },
    };
  var bG, yG;
  fG.BillingFSpringLoginSection =
    ((gG = mG =
      class extends fG.Component {
        constructor(e) {
          super(e),
            (this._onUsernameEnter = () => {
              this.passwordInput &&
                this.passwordInput.current.input.current.focus();
            }),
            (this._onPasswordEnter = () => {
              this.props.onLoginClick && this.props.onLoginClick();
            }),
            (this._onChange = (e, t) => {
              const r = t.currentTarget.dataset.field,
                n = { ...this.props, [r]: e };
              this.props.onChange && this.props.onChange(n);
            }),
            (this.passwordInput = fG.createRef());
        }
        render() {
          const {
              text: e,
              email: t,
              password: r,
              errors: n,
              hideActions: o,
              disableInputs: a,
              onCancelClick: i,
              onLoginClick: s,
              onIForgotPasswordClick: l,
            } = this.props,
            c = e && Glamor.createElement("div", { css: vG.text }, e);
          return Glamor.createElement(
            "div",
            { css: [fG.column, vG.root] },
            c,
            Glamor.createElement(
              "form",
              null,
              Glamor.createElement(fG.Input, {
                autoComplete: "username",
                label: "email address",
                "data-field": "email",
                value: t,
                error: { hasError: n.email },
                disabled: a,
                onEnter: this._onUsernameEnter,
                onInput: this._onChange,
              }),
              Glamor.createElement(fG.Spacer, { height: "g1" }),
              Glamor.createElement(fG.Input, {
                ref: this.passwordInput,
                autoComplete: "current-password",
                label: "password",
                "data-field": "password",
                type: "password",
                value: r,
                error: { hasError: n.password },
                button: { label: "FORGOT PASSWORD?", onClick: l },
                disabled: a,
                onEnter: this._onPasswordEnter,
                onInput: this._onChange,
              })
            ),
            !o && Glamor.createElement(fG.Spacer, { height: "g3" }),
            !o &&
              Glamor.createElement(
                "div",
                { css: fG.row },
                Glamor.createElement(fG.ActionButton, {
                  label: "LOG IN",
                  shadow: fG.color.linkShadow,
                  onClick: s,
                }),
                Glamor.createElement(fG.Spacer, { width: "g3" }),
                Glamor.createElement(fG.LinkButton, {
                  label: "CANCEL",
                  cancel: !0,
                  onClick: i,
                })
              )
          );
        }
      }),
    (mG.defaultProps = {
      text: "Please login to your account:",
      email: "",
      password: null,
      errors: {},
      hideActions: !1,
      disableInputs: !1,
    }),
    gG);
  const { $ui: wG } = app,
    CG = { root: { width: "100%", maxWidth: 320 }, text: wG.text.bleak };
  wG.BillingFSpringLogoutConfirmSection =
    ((yG = bG =
      class extends wG.Component {
        render() {
          const { text: e, okButtonText: t, onOkClick: r } = this.props,
            n = e && Glamor.createElement("div", { css: CG.text }, e),
            o =
              t &&
              r &&
              Glamor.createElement(
                wG.Fragment,
                null,
                Glamor.createElement(wG.Spacer, { height: "g3" }),
                Glamor.createElement(wG.LinkButton, { label: t, onClick: r })
              );
          return Glamor.createElement(
            "div",
            { css: [wG.column, CG.root] },
            n,
            o
          );
        }
      }),
    (bG.defaultProps = {
      text: "You were successfully logged out of your product account. Feel free to log back in any time.",
      okButtonText: "OK, CLOSE",
    }),
    yG);
  const { $ui: kG } = app,
    SG = {
      root: { width: 320, maxWidth: 320 },
      input: { opacity: "1.0 !important" },
      text: kG.text.bleak,
      link: kG.clickable,
      subscription: {
        ...kG.text.contentTitle,
        ...kG.fullWidth,
        backgroundColor: kG.color.bgLight1,
        marginBottom: kG.space.g1,
        marginLeft: kG.space.g1h,
        minHeight: 40,
        borderRadius: 20,
      },
    };
  var EG, _G;
  kG.BillingFSpringManageAccountSection = class extends kG.Component {
    constructor(e) {
      super(e),
        (this._onConfirmValueInput = (e) => {
          this.setState({ confirmValue: e.toUpperCase() });
        }),
        (this._getConfirmPercentage = () => {
          const e = this.expectedConfirmString;
          let t = 0;
          for (
            let r = 0;
            r < e.length && this.state.confirmValue[r] === e[r];
            r++
          )
            t++;
          return Math.min(100, (t / e.length) * 100);
        }),
        (this.state = { confirmValue: "" }),
        (this.expectedConfirmString = "I CONFIRM");
    }
    render() {
      const {
          email: e,
          onFsamClick: t,
          subscriptions: r,
          onDeleteClick: n,
          onDeleteConfirmClick: o,
          onDeleteCancelClick: a,
        } = this.props,
        i = Glamor.createElement(kG.Input, {
          label: "signed in to",
          placeholder: "N/A",
          fixed: !0,
          value: e,
          style: SG.input,
        }),
        s = Glamor.createElement(
          React.Fragment,
          null,
          Glamor.createElement(kG.Spacer, { height: "g2" }),
          Glamor.createElement(
            "div",
            { css: SG.text },
            "You can delete your account here. If you choose to delete your account, there is no turning back."
          ),
          Glamor.createElement(kG.Spacer, { height: "g0h" }),
          Glamor.createElement(
            "div",
            { css: SG.text },
            "We will remove your data from our servers and cancel your PRO licenses and subscriptions."
          )
        ),
        l =
          r &&
          t &&
          Glamor.createElement(
            React.Fragment,
            null,
            Glamor.createElement(kG.Spacer, { height: "g0h" }),
            Glamor.createElement(
              "div",
              { css: SG.text },
              "If you'd like to manage your individual subscriptions, please navigate to",
              " ",
              Glamor.createElement(
                "a",
                { css: SG.link, onClick: t, target: "_blank" },
                "FastSpring Management Site"
              )
            )
          ),
        c =
          r &&
          Glamor.createElement(
            React.Fragment,
            null,
            Glamor.createElement(kG.Spacer, { height: "g2" }),
            r.map((e) =>
              Glamor.createElement(
                "div",
                {
                  key: e.label,
                  css: [kG.row, kG.alignItems.center, SG.subscription],
                },
                Glamor.createElement(kG.Spacer, { width: "g1h" }),
                e.icon && Glamor.createElement(kG.Image, { src: e.icon }),
                Glamor.createElement(kG.Spacer, { width: "g1h" }),
                e.label
              )
            ),
            Glamor.createElement(kG.Spacer, { height: "g0h" })
          ),
        u =
          n &&
          a &&
          Glamor.createElement(
            React.Fragment,
            null,
            l,
            Glamor.createElement(kG.Spacer, { height: "g2" }),
            Glamor.createElement(
              "div",
              { css: kG.row },
              Glamor.createElement(kG.LinkButton, {
                label: "DELETE MY ACCOUNT",
                color: kG.color.error,
                onClick: n,
              }),
              Glamor.createElement(kG.Spacer, { width: "g5" }),
              Glamor.createElement(kG.LinkButton, {
                label: "CANCEL",
                onClick: a,
              })
            )
          ),
        d =
          o &&
          a &&
          Glamor.createElement(
            React.Fragment,
            null,
            Glamor.createElement(kG.Spacer, { height: "g0h" }),
            Glamor.createElement(
              "div",
              { css: SG.text },
              "Confirm account removal and cancel subscription by typing in ‚ÄúI CONFIRM‚Äù in the box below."
            ),
            Glamor.createElement(kG.Spacer, { height: "g2" }),
            Glamor.createElement(kG.Input, {
              placeholder: this.expectedConfirmString,
              value: this.state.confirmValue,
              progress: {
                value: this._getConfirmPercentage(),
                color: kG.color.error,
              },
              error: { hasError: !0 },
              onInput: this._onConfirmValueInput,
            }),
            Glamor.createElement(kG.Spacer, { height: "g2" }),
            Glamor.createElement(
              "div",
              { css: kG.row },
              Glamor.createElement(kG.LinkButton, {
                label: "CONFIRM DELETION",
                color: kG.color.error,
                disabled: 100 !== this._getConfirmPercentage(),
                onClick: o,
              }),
              Glamor.createElement(kG.Spacer, { width: "g5" }),
              Glamor.createElement(kG.LinkButton, {
                label: "CANCEL",
                onClick: a,
              })
            )
          );
      return Glamor.createElement(
        "div",
        { css: [kG.column, kG.alignItems.start, SG.root] },
        i,
        s,
        c,
        u,
        d
      );
    }
  };
  const { $ui: xG } = app,
    PG = { root: { width: "100%", maxWidth: 320 }, text: xG.text.bleak };
  xG.BillingFSpringResetConfirmSection =
    ((_G = EG =
      class extends xG.Component {
        render() {
          const { text: e, okButtonText: t, onOkClick: r } = this.props,
            n = e && Glamor.createElement("div", { css: PG.text }, e),
            o =
              t &&
              r &&
              Glamor.createElement(
                React.Fragment,
                null,
                Glamor.createElement(xG.Spacer, { height: "g3" }),
                Glamor.createElement(xG.LinkButton, { label: t, onClick: r })
              );
          return Glamor.createElement(
            "div",
            { css: [xG.column, PG.root] },
            n,
            o
          );
        }
      }),
    (EG.defaultProps = {
      text: "Success! Account password has been changed. You‚Äôre now logged in.",
      okButtonText: "OK, GO TO MY ACCOUNT",
    }),
    _G);
  const { $ui: TG } = app,
    IG = {
      root: { width: "100%", maxWidth: 320 },
      text: { ...TG.text.bleak, paddingBottom: TG.space.g2 },
      username: { display: "none" },
    };
  var GG, DG;
  TG.BillingFSpringResetSection = class extends TG.Component {
    constructor(...e) {
      var t;
      return (
        (t = super(...e)),
        (this._onResetPasswordOkClick = () => {
          this.props.onResetPasswordClick &&
            this.props.onResetPasswordClick(!0);
        }),
        (this._onResetPasswordCancelClick = () => {
          this.props.onResetPasswordClick &&
            this.props.onResetPasswordClick(!1);
        }),
        (this._onConfirmResetOkClick = () => {
          this.props.onConfirmResetClick && this.props.onConfirmResetClick(!0);
        }),
        (this._onConfirmResetCancelClick = () => {
          this.props.onConfirmResetClick && this.props.onConfirmResetClick(!1);
        }),
        t
      );
    }
    render() {
      const {
          email: e,
          newPassword: t,
          onNewPasswordChange: r,
          onResetPasswordClick: n,
          code: o,
          codeHasError: a,
          onCodeChange: i,
          onConfirmResetClick: s,
        } = this.props,
        l =
          e &&
          Glamor.createElement(
            "div",
            { css: IG.text },
            "Please enter a ",
            Glamor.createElement("strong", null, "new"),
            " password for account registered under ",
            e,
            ":"
          ),
        c =
          e &&
          Glamor.createElement(
            React.Fragment,
            null,
            Glamor.createElement(
              "form",
              null,
              Glamor.createElement(TG.Input, {
                autoComplete: "username",
                value: e,
                style: IG.username,
              }),
              Glamor.createElement(TG.Input, {
                autoComplete: "new-password",
                label: "new password",
                type: "password",
                value: t,
                fixed: !n,
                onInput: r,
              })
            ),
            Glamor.createElement(TG.Spacer, { height: "g3" })
          ),
        u =
          n &&
          Glamor.createElement(
            "div",
            { css: TG.row },
            Glamor.createElement(TG.ActionButton, {
              label: "RESET PASSWORD",
              disabled: t.length < 4,
              shadow: t.length < 4 ? null : TG.color.linkShadow,
              onClick: this._onResetPasswordOkClick,
            }),
            Glamor.createElement(TG.Spacer, { width: "32" }),
            Glamor.createElement(TG.LinkButton, {
              label: "CANCEL",
              cancel: !0,
              onClick: this._onResetPasswordCancelClick,
            })
          ),
        d =
          void 0 !== o &&
          Glamor.createElement(
            React.Fragment,
            null,
            Glamor.createElement(TG.BillingCodeSection, {
              value: o,
              hasError: a,
              onChange: i,
            }),
            Glamor.createElement(TG.Spacer, { height: "g3" })
          ),
        h =
          s &&
          Glamor.createElement(
            "div",
            { css: TG.row },
            Glamor.createElement(TG.ActionButton, {
              label: "CONFIRM RESET",
              disabled: a,
              shadow: a ? null : TG.color.linkShadow,
              onClick: this._onConfirmResetOkClick,
            }),
            Glamor.createElement(TG.Spacer, { width: "32" }),
            Glamor.createElement(TG.LinkButton, {
              label: "CANCEL",
              onClick: this._onConfirmResetCancelClick,
            })
          );
      return Glamor.createElement(
        "div",
        { css: [TG.column, IG.root] },
        l,
        c,
        u,
        d,
        h
      );
    }
  };
  const { $ui: AG } = app,
    MG = {
      root: { ...AG.row, width: "100%", minHeight: "100vh" },
      main: {
        ...AG.column,
        ...AG.padding("g2 g3 0 g3"),
        ...AG.relative(),
        flexGrow: 1,
        background: AG.color.bgLight3,
        boxShadow: "0 0 12px rgba(0, 0, 0, 0.04)",
        zIndex: 1,
      },
      title: { ...AG.text.mainTitle },
      form: { marginTop: AG.space.g0h },
      storefront: { ...AG.row, ...AG.justifyContent.center, width: "100%" },
      checkout: {},
      clients: {
        ...AG.row,
        ...AG.justifyContent.center,
        marginTop: "auto",
        paddingBottom: AG.space.g1h,
      },
      loadingPanel: { ...AG.absolute("g1 g1 . ."), ...AG.text.hashtag },
      progressRing: (e) => ({ ...AG.transition.fast, opacity: e ? 1 : 0 }),
      sidePanel: {
        ...AG.relative(),
        ...AG.column,
        ...AG.padding("g2"),
        flexShrink: 0,
        width: 510,
        background: AG.color.bgLight1,
        overflowY: "scroll",
      },
      sidePanelTitle: { ...AG.text.mainTitle, paddingLeft: AG.space.g1h },
      sidePanelFeatures: {
        width: 430,
        marginLeft: AG.space.g2,
        marginTop: -30,
      },
      sidePanelFooter: {
        ...AG.row,
        ...AG.justifyContent.between,
        paddingTop: 22,
        margin: AG.space.g1,
        marginTop: "auto",
        borderTop: AG.border.dark,
      },
      billingDisclaimer: { ...AG.row, ...AG.alignItems.cener },
      billingDisclaimerIcon: { color: AG.color.positive },
      billingDisclaimerText: {
        marginLeft: AG.space.g1,
        ...AG.text.of({
          family: AG.font.secondary,
          size: 9,
          height: "12px",
          color: AG.color.textBleak,
        }),
      },
    },
    FG = "billing-panel.lock";
  AG.SvgIcon.registerSvgIcons([
    `<symbol id="${FG}" viewBox="0 0 24 24"><rect width="24" height="24" fill="none"/><path d="M6553.6-5145h0a25.837,25.837,0,0,1-4.8-3.3,16.947,16.947,0,0,1-3.3-3.788A9.337,9.337,0,0,1,6544-5157v-8.4l9.6-3.6,9.6,3.6v8.4a9.337,9.337,0,0,1-1.5,4.912,16.922,16.922,0,0,1-3.3,3.788,25.837,25.837,0,0,1-4.8,3.3Zm0-21.553h0l-7.643,2.865V-5157a7.431,7.431,0,0,0,1.194,3.91,13.471,13.471,0,0,0,2.627,3.015,20.623,20.623,0,0,0,3.819,2.627l0-19.1Z" transform="translate(-6541.6 5169)" fill="currentColor"/></symbol>`,
  ]),
    (AG.BillingPanel =
      ((DG = GG =
        class extends AG.Component {
          render() {
            const {
              title: e,
              form: t,
              storefront: r,
              checkout: n,
              clients: o,
              features: a,
            } = this.props;
            return Glamor.createElement(
              "div",
              { css: MG.root },
              Glamor.createElement(
                "div",
                { css: MG.main },
                e && Glamor.createElement("div", { css: MG.title }, e),
                t && Glamor.createElement("div", { css: MG.form }, t),
                r && Glamor.createElement("div", { css: MG.storefront }, r),
                n && Glamor.createElement("div", { css: MG.checkout }, n),
                o && Glamor.createElement("div", { css: MG.clients }, o),
                this._renderLoadingPanel()
              ),
              Glamor.createElement(
                "div",
                { css: MG.sidePanel },
                Glamor.createElement(
                  "div",
                  { css: MG.sidePanelTitle },
                  "Features"
                ),
                a &&
                  Glamor.createElement("div", { css: MG.sidePanelFeatures }, a),
                this._renderSidePanelFooter()
              )
            );
          }
          _renderLoadingPanel() {
            const { loading: e, onCloseClick: t } = this.props;
            return Glamor.createElement(
              "div",
              { css: [AG.row, AG.alignItems.center, MG.loadingPanel] },
              Glamor.createElement(
                "div",
                { css: [AG.row, MG.progressRing(e)] },
                Glamor.createElement(AG.ProgressRing, {
                  size: 16,
                  value: 20,
                  thickness: 1,
                  spinning: !0,
                }),
                Glamor.createElement(AG.Spacer, { width: "g1" }),
                "LOADING"
              ),
              Glamor.createElement(AG.Spacer, { width: "g2" }),
              t && Glamor.createElement(AG.CloseButton, { onClick: t })
            );
          }
          _renderSidePanelFooter() {
            const { onBillingFaqClick: e } = this.props;
            return Glamor.createElement(
              "div",
              { css: MG.sidePanelFooter },
              Glamor.createElement(
                "div",
                { css: MG.billingDisclaimer },
                Glamor.createElement(AG.SvgIcon, {
                  style: MG.billingDisclaimerIcon,
                  name: FG,
                }),
                Glamor.createElement(
                  "div",
                  { css: MG.billingDisclaimerText },
                  "We use FastSpring‚Ñ¢ to process purchases securely",
                  Glamor.createElement("br", null),
                  "and do not have access to or process your card details."
                )
              ),
              e &&
                Glamor.createElement(AG.LinkButton, {
                  label: "BILLING F.A.Q",
                  onClick: e,
                })
            );
          }
        }),
      (GG.defaultProps = { title: "Activate PRO" }),
      DG));
  const { $ui: RG } = app,
    LG = {
      root: (e) => ({
        ...RG.relative(),
        height: "min-content",
        marginRight: 28,
        "&:last-child": { marginRight: 0 },
        ...(e.padding || {
          ...RG.padding("0 50"),
          "@media (max-width: 1420px)": { ...RG.padding("0 40") },
          "@media (max-width: 1380px)": { ...RG.padding("0 30") },
        }),
        "&:not(:last-child)::before": {
          content: '""',
          width: 1,
          height: 132,
          ...RG.absolute("50 0 . ."),
          background: RG.color.borderDark,
        },
        ...(e.disabled && { "& > *": { opacity: 0.3, pointerEvents: "none" } }),
      }),
      priceSection: {
        ...RG.relative(),
        paddingLeft: 1,
        color: RG.color.primary,
        fontFamily: RG.font.secondary,
        minHeight: 66,
      },
      priceValue: { fontWeight: 700 },
      priceDollar: { fontSize: 24 },
      priceIntegral: { fontSize: 40, lineHeight: "40px" },
      priceFractal: { fontSize: 14 },
      priceSubtext: {
        fontWeight: 600,
        fontSize: 12,
        marginTop: -1,
        marginLeft: 1,
      },
      pricePeriod: (e) => ({ ...(e && { color: RG.color.iconPassive }) }),
      priceCustomCurrency: { fontWeight: 700 },
      priceBadge: {
        ...RG.absolute("-4 . . 83"),
        ...RG.borderRadius.r4,
        ...RG.padding("g0h g1"),
        background: RG.color.attention,
        ...RG.text.of({
          size: 10,
          height: "13px",
          weight: 600,
          color: RG.color.bgLight3,
        }),
      },
      labelSection: { ...RG.relative(), marginTop: 18 },
      planCheckmark: {
        ...RG.absolute("-2 100% . ."),
        marginRight: RG.space.g1,
        width: 24,
        height: 24,
        color: RG.color.positive,
      },
      planIcon: (e) => ({
        ...RG.absolute("-2 100% . ."),
        marginRight: RG.space.g1h,
        width: 20,
        height: 20,
        fill: e ? RG.color.textPassive : "url(#inssist.gradient)",
      }),
      planLabel: RG.text.group1,
      benefitSection: { marginTop: RG.space.g1, maxWidth: 180 },
      benefitLine: {
        ...RG.text.hashtag,
        marginBottom: RG.space.g1,
        lineHeight: "18px",
        "&:last-child": { marginBottom: 0 },
      },
      footerButton: ({ disabled: e }) => ({
        backgroundColor: RG.color.borderLight,
        ...(e && { filter: "none !important", cursor: "default" }),
      }),
      footer: {
        ...RG.relative(),
        marginTop: 40,
        width: "100%",
        minWidth: 155,
        marginLeft: -14,
      },
      footerButtonContainer: { ...RG.absolute("0 0 0 0"), margin: "auto" },
      footerText: {
        ...RG.absolute("60 . . -50"),
        ...RG.text.bleak,
        width: 232,
        textAlign: "center",
      },
      usernamesSection: { marginTop: RG.space.g2 },
      usernamesTextarea: { width: 210, fontSize: 12 },
      usernamesConfirmationError: { ...RG.relative(), marginTop: RG.space.g3 },
      usernamesConfirmationErrorIcon: {
        ...RG.absolute("0 . . -37"),
        color: RG.color.primary,
        width: 24,
        height: 24,
      },
      usernamesConfirmationErrorText: RG.text.bleak,
      accountCounter: { marginTop: RG.space.g2, paddingBottom: 4 },
      accountCounterButton: {
        ...RG.row,
        ...RG.center,
        ...RG.borderRadius.r4,
        ...RG.text.group1,
        width: 31,
        height: 23,
        color: RG.theme.valueOf("day", RG.color.bgLight3),
        background: RG.color.link,
        marginRight: 6,
        "&:not(:disabled)": { ...RG.clickable },
        "&:disabled": { background: RG.color.textPassive },
      },
      accountCounterLabel: {
        ...RG.text.hashtag,
        fontWeight: 600,
        marginLeft: 6,
      },
      avatar: {
        width: 26,
        height: 26,
        borderRadius: "50%",
        backgroundSize: "cover",
        backgroundPosition: "center",
        backgroundColor: RG.color.bgLight1,
        flexShrink: 0,
        border: `1px solid ${RG.color.bgLight1}`,
        position: "relative",
        "&::before": {
          content: '""',
          position: "absolute",
          inset: -2,
          zIndex: -1,
          background: RG.gradient.brand,
          borderRadius: "inherit",
        },
      },
    };
  function BG() {
    return (BG =
      Object.assign ||
      function (e) {
        for (var t = 1; t < arguments.length; t++) {
          var r = arguments[t];
          for (var n in r)
            Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
        }
        return e;
      }).apply(this, arguments);
  }
  RG.BillingPlanRenderer = class extends RG.Component {
    constructor(...e) {
      var t;
      return (
        (t = super(...e)),
        (this._onPlanClick = (e) => {
          e.plan.action.onClick(e.plan);
        }),
        (this._onCountChange = (e) => {
          const t = e.currentTarget.dataset.plan,
            r = e.currentTarget.dataset.delta,
            n = this.props.plans.find((e) => e.id === t);
          n.usernames.onCountChange(n.usernames.count + Number(r), n);
        }),
        t
      );
    }
    render() {
      const e = this.props;
      return Glamor.createElement(
        "div",
        { css: LG.root(e) },
        this._renderPriceSection(e),
        this._renderLabelSection(e),
        this._renderBenefitSection(e),
        this._renderUsernamesSection(e),
        this._renderFooterSection(e),
        this._renderChangePlanSection()
      );
    }
    _renderPriceSection(e) {
      const { price: t, period: r, badge: n, isUnlimited: o } = e;
      if (!t) return null;
      const { currency: a, integral: i, fractal: s } = t,
        l = ("USD" === a || "$" === a) && "$",
        c = !l && a;
      return Glamor.createElement(
        "div",
        { css: LG.priceSection },
        Glamor.createElement(
          "div",
          { css: [RG.row, RG.alignItems.baseline, LG.priceValue] },
          l && Glamor.createElement("div", { css: LG.priceDollar }, l),
          Glamor.createElement("div", { css: LG.priceIntegral }, i || 0),
          s && Glamor.createElement("div", { css: LG.priceFractal }, ".", s)
        ),
        Glamor.createElement(
          "div",
          { css: LG.priceSubtext },
          c && Glamor.createElement("span", { css: LG.priceCustomCurrency }, c),
          r &&
            Glamor.createElement("span", { css: LG.pricePeriod(!1) }, " ", r),
          !c &&
            o &&
            Glamor.createElement(
              "span",
              { css: LG.pricePeriod(!0) },
              " unlimited"
            )
        ),
        n &&
          String(i || 0).length <= 2 &&
          Glamor.createElement("div", { css: LG.priceBadge }, n)
      );
    }
    _renderLabelSection(e) {
      const { label: t, isSelected: r, isDisabled: n } = e,
        o = r
          ? Glamor.createElement(RG.SvgIcon, {
              style: [RG.row, LG.planCheckmark],
              name: "igswiss.checkmark",
            })
          : Glamor.createElement(
              "div",
              { css: [RG.row, RG.center, LG.planIcon(n)] },
              e.icon.name
                ? Glamor.createElement(RG.SvgIcon, { name: e.icon.name })
                : Glamor.createElement("div", {
                    css: LG.avatar,
                    style: { backgroundImage: `url('${e.icon.avatarUrl}')` },
                    "cdn-proxy-image": "",
                  })
            );
      return Glamor.createElement(
        "div",
        { css: [RG.row, RG.alignItems.center, LG.labelSection] },
        o,
        t && Glamor.createElement("div", { css: LG.planLabel }, t)
      );
    }
    _renderBenefitSection(e) {
      const { benefits: t } = e;
      return t && 0 !== t.length
        ? Glamor.createElement(
            "div",
            { css: LG.benefitSection },
            t.map((e, t) =>
              Glamor.createElement("div", { key: t, css: LG.benefitLine }, e)
            )
          )
        : null;
    }
    _renderUsernamesSection(e) {
      const { usernames: t } = e;
      return t
        ? Glamor.createElement(
            "div",
            { css: [RG.column, { maxWidth: 210 }] },
            Glamor.createElement(
              "div",
              { css: [RG.row, RG.alignItems.center, LG.accountCounter] },
              Glamor.createElement(
                "button",
                {
                  css: LG.accountCounterButton,
                  "data-delta": 1,
                  "data-plan": e.id,
                  onClick: this._onCountChange,
                },
                "+1"
              ),
              Glamor.createElement(
                "button",
                {
                  css: LG.accountCounterButton,
                  disabled: t.count <= t.minCount,
                  "data-delta": -1,
                  "data-plan": e.id,
                  onClick: this._onCountChange,
                },
                "‚Äì1"
              ),
              Glamor.createElement(
                "div",
                { css: LG.accountCounterLabel },
                t.count,
                " ",
                1 === t.count ? "account" : "accounts"
              )
            ),
            null !== t.value &&
              Glamor.createElement(
                "div",
                { css: [RG.column, LG.usernamesSection] },
                Glamor.createElement(RG.Input, {
                  inputStyle: LG.usernamesTextarea,
                  label: "usernames",
                  placeholder: "e.g. @account1 @account2",
                  lines: 2,
                  value: t.value,
                  onInput: t.onInput,
                }),
                Glamor.createElement(RG.Spacer, { height: "g2" }),
                Glamor.createElement(
                  "div",
                  { css: RG.row },
                  Glamor.createElement(RG.LinkButton, {
                    label: "APPLY",
                    disabled: !t.onApplyClick,
                    onClick: t.onApplyClick,
                  }),
                  Glamor.createElement(RG.Spacer, { width: "g3" }),
                  Glamor.createElement(RG.LinkButton, {
                    label: "CANCEL",
                    cancel: !0,
                    disabled: !t.onCancelClick,
                    onClick: t.onCancelClick,
                  })
                )
              ),
            t.errorMessage &&
              Glamor.createElement(
                "div",
                { css: [RG.row, LG.usernamesConfirmationError] },
                Glamor.createElement(RG.SvgIcon, {
                  style: LG.usernamesConfirmationErrorIcon,
                  name: "warning-triangle-large",
                }),
                Glamor.createElement(
                  "div",
                  { css: LG.usernamesConfirmationErrorText },
                  t.errorMessage
                )
              )
          )
        : null;
    }
    _renderFooterSection(e) {
      const { action: t, footerText: r, disabled: n } = e;
      if (!t) return null;
      const o = t.disabled
          ? RG.color.textPassive
          : t.tinted
          ? RG.color.primary
          : RG.color.link,
        a =
          !n &&
          Glamor.createElement(RG.ActionButton, {
            style: LG.footerButton({ disabled: n }),
            label: t.label,
            disabled: t.disabled,
            color: o,
            borderColor: RG.color.borderDark,
            tooltip: t.tooltip && {
              style: LG.buttonTooltip,
              text: Glamor.createElement(RG.Fragment, null, t.tooltip),
              arrowAtCenter: !0,
            },
            progress: t.progress && {
              value: 60,
              spinning: !0,
              size: 18,
              thickness: 1,
              ...t.progress,
            },
            plan: e,
            onClick: !t.disabled && t.onClick ? this._onPlanClick : null,
            isLightBackground: !0,
          }),
        i = r && Glamor.createElement("div", { css: LG.footerText }, r);
      return Glamor.createElement(
        "div",
        { css: [RG.column, RG.alignItems.center, LG.footer] },
        a &&
          Glamor.createElement(
            "div",
            { css: LG.footerButtonContainer },
            a,
            a && i && Glamor.createElement(RG.Spacer, { height: "g2" })
          ),
        i
      );
    }
    _renderChangePlanSection() {
      return this.props.onChangePlanClick
        ? Glamor.createElement(
            RG.Fragment,
            null,
            Glamor.createElement(RG.Spacer, { height: "g2" }),
            Glamor.createElement(RG.LinkButton, {
              label: "CHANGE PLAN",
              small: !0,
              onClick: this.props.onChangePlanClick,
            })
          )
        : null;
    }
  };
  const { $ui: OG } = app,
    $G = {
      root: {},
      priceRow: {
        ...OG.row,
        ...OG.justifyContent.center,
        marginBottom: OG.space.g1h,
      },
      price: {
        ...OG.relative(),
        ...OG.text.of({
          family: OG.font.secondary,
          weight: 700,
          color: OG.color.primary,
        }),
      },
      priceValue: {},
      priceCurrency: {
        fontSize: 32,
        marginRight: 1,
        position: "relative",
        top: -3,
      },
      priceIntegral: { fontSize: 64, lineHeight: "64px" },
      priceFractal: { fontSize: 16 },
      pricePeriod: { fontSize: 12, fontWeight: 600 },
      oldPrice: {
        ...OG.absolute("-4 -34 . ."),
        transform: "skewX(-8deg)",
        textDecoration: "line-through",
        ...OG.text.of({
          family: OG.font.secondary,
          size: 16,
          color: "#FF4D28",
          height: "22px",
          weight: 700,
        }),
      },
      body: ({ props: e }) => ({
        ...OG.padding("g2"),
        ...OG.relative(),
        background: OG.color.bgLight2,
        border: `1px solid ${OG.color.borderDark}`,
        borderRadius: 12,
        ...(e.withShadow && { ...OG.shadow.sh12 }),
        ...(e.expanded && {
          borderTopRightRadius: 0,
          borderBottomRightRadius: 0,
          "&::before": {
            content: '""',
            ...OG.absolute("-1 . -1 100%"),
            width: 18,
            borderTop: "inherit",
            borderBottom: "inherit",
            background: "inherit",
          },
        }),
      }),
      marker: {
        ...OG.absolute("-2 . . 50%"),
        width: 100,
        height: 3,
        background: OG.color.primary,
        marginLeft: -50,
      },
      header: ({ props: e }) => ({
        ...OG.margin("-16 -16 0 -16"),
        ...OG.padding("g2"),
        ...OG.relative(),
        borderRadius: "12px 12px 0 0",
        background: OG.color.bgLight1,
        marginBottom: OG.space.g2,
        overflow: "hidden",
        zIndex: 1,
        ...(e.expanded && { borderRadius: "12px 0 0 0", marginRight: -34 }),
      }),
      headerTitle: {
        ...OG.row,
        ...OG.alignItems.center,
        ...OG.text.contentTitle,
        fontWeight: 700,
        color: OG.color.textNormal,
      },
      headerIcon: {
        color: OG.color.positive,
        marginRight: OG.space.g1h,
        ...OG.relative("-2 . . ."),
      },
      headerDescription: { ...OG.text.bleak, marginTop: OG.space.g1 },
      discountRibbon: {
        ...OG.absolute("24 -94 . ."),
        ...OG.padding("3 0"),
        textAlign: "center",
        background: "#FF4D28",
        width: 250,
        transform: "rotate(45deg)",
        ...OG.text.of({
          family: OG.font.primary,
          size: 12,
          height: "15px",
          weight: "600",
          color: "#FFF",
        }),
      },
      discountPercentSymbol: { fontSize: 10 },
      purchasedLabel: {
        ...OG.absolute("-11 . . g2 1"),
        ...OG.padding("g0h g1"),
        ...OG.borderRadius.r4,
        background: OG.color.attention,
        ...OG.text.of({ color: "#FFF", size: 10, weight: 600, height: "13px" }),
      },
      features: {},
      feature: {
        ...OG.row,
        ...OG.justifyContent.between,
        "&:not(:last-child)": { marginBottom: OG.space.g2 },
      },
      featureTexts: {},
      featureHeader: {},
      featureTitle: { ...OG.text.contentTitle, color: OG.color.textNormal },
      featureInfo: { width: 30, height: 30, background: "black" },
      featureDescription: { ...OG.text.bleak, marginTop: OG.space.g0h },
      featureIcon: (e) => ({
        flexShrink: 0,
        marginLeft: OG.space.g1h,
        color: OG.color.iconActionable,
        position: "relative",
        top: 4,
        ...(!!e.iconSize && {
          width: e.iconSize.width,
          height: e.iconSize.height,
        }),
      }),
      footer: { marginTop: OG.space.g3, ...OG.column, ...OG.alignItems.center },
      ghostButton: { ...OG.absolute(), pointerEvents: "none", opacity: 0 },
      button: ({ props: e, state: t }) => ({
        color: OG.color.textInversed,
        background: OG.color.positive,
        ...(e.expanded && {
          marginRight: -34,
          alignSelf: "flex-end",
          borderTopRightRadius: 0,
          borderBottomRightRadius: 0,
          width: t.expandedButtonWidth,
        }),
      }),
      buttonIcon: { color: OG.color.textInversed },
      disclaimer: {
        ...OG.row,
        ...OG.relative(),
        marginTop: OG.space.g2,
        left: -8,
      },
      disclaimerIcon: ({ state: e }) => ({
        width: 24,
        height: 24,
        marginRight: OG.space.g1,
        color: OG.color.textPassive,
        ...("night" === e.theme && { color: OG.color.iconPassive }),
      }),
      disclaimerText: {
        ...OG.text.of({
          family: OG.font.secondary,
          size: 9,
          height: "12px",
          color: OG.color.textBleak,
        }),
      },
      faqButtonRow: {
        ...OG.row,
        ...OG.justifyContent.center,
        marginTop: OG.space.g2,
      },
    },
    NG = "billing-purchase.lock",
    UG = "billing-purchase.fire";
  OG.SvgIcon.registerSvgIcons([
    `<symbol id="${NG}" viewBox="0 0 23.819 23.819"><circle cx="11.909" cy="11.909" r="11.909" fill="currentColor"/><path d="M47.56,30.466h-.93V28.977a2.977,2.977,0,0,0-5.955,0v1.489h-.93A.747.747,0,0,0,39,31.21v7.816a.747.747,0,0,0,.744.744H47.56a.747.747,0,0,0,.744-.744V31.21A.747.747,0,0,0,47.56,30.466Zm-2.791,6.42H42.536l.6-1.526a1.117,1.117,0,1,1,1.042,0Zm1.117-6.42H41.419V28.977a2.233,2.233,0,0,1,4.466,0Z" transform="translate(-31.743 -21.162)" fill="#fff"/></symbol>`,
    `<symbol id="${UG}" viewBox="0 0 17.252 23"><path d="M10.244 0a23.131 23.131 0 01.8 5.175A3.742 3.742 0 017.365 9.2a3.923 3.923 0 01-3.913-4.025l.032-.388A14.848 14.848 0 000 14.374a8.626 8.626 0 0017.252 0A18.45 18.45 0 0010.244 0zm-1.93 19.766a3.426 3.426 0 01-3.473-3.387 3.38 3.38 0 013.029-3.365 8.319 8.319 0 004.982-2.78 15.007 15.007 0 01.637 4.357 5.179 5.179 0 01-5.175 5.175z" fill="currentColor"/></symbol>`,
  ]);
  class HG extends OG.Component {
    constructor(e) {
      super(e),
        (this._bodyRef = OG.createRef()),
        (this._ghostButtonRef = OG.createRef()),
        (this.state = { expandedButtonWidth: null });
    }
    componentDidMount() {
      this.props.expanded && this._actualizeButtonWidth();
    }
    componentDidUpdate(e) {
      !e.expanded && this.props.expanded && this._actualizeButtonWidth();
    }
    render() {
      return Glamor.createElement(
        "div",
        { css: $G.root },
        this._renderPrice(),
        Glamor.createElement(
          "div",
          { css: $G.body(this), ref: this._bodyRef },
          this._renderMarker(),
          this._renderHeader(),
          this._renderPurchasedLabel(),
          this._renderFeatures(),
          this._renderFooter()
        ),
        this._renderFaqButton()
      );
    }
    _renderPrice() {
      if (!this.props.price) return null;
      if (this.props.purchased) return null;
      if (this.props.hidePrice) return null;
      const e = this.props.price;
      return Glamor.createElement(
        "div",
        { css: $G.priceRow },
        Glamor.createElement(
          "div",
          { css: $G.price },
          Glamor.createElement(
            "div",
            { css: $G.priceValue },
            Glamor.createElement("span", { css: $G.priceCurrency }, "$"),
            Glamor.createElement("span", { css: $G.priceIntegral }, e.integral),
            Glamor.createElement(
              "span",
              { css: $G.priceFractal },
              ".",
              e.fractal
            )
          ),
          Glamor.createElement("div", { css: $G.pricePeriod }, "/ month"),
          !!e.old &&
            Glamor.createElement(
              "div",
              { css: $G.oldPrice },
              "$",
              e.old.integral,
              ".",
              e.old.fractal
            )
        )
      );
    }
    _renderMarker() {
      return this.props.price
        ? this.props.purchased || this.props.hidePrice
          ? null
          : Glamor.createElement("div", { css: $G.marker })
        : null;
    }
    _renderHeader() {
      const e = this.props.header,
        t = this.props.price && this.props.price.old;
      return e
        ? Glamor.createElement(
            "div",
            { css: $G.header(this) },
            Glamor.createElement(
              "div",
              { css: $G.headerTitle },
              Glamor.createElement(OG.SvgIcon, {
                style: $G.headerIcon,
                name: UG,
              }),
              e.title
            ),
            Glamor.createElement(
              "div",
              { css: $G.headerDescription },
              e.description
            ),
            !(!t || !t.discountPercent) &&
              Glamor.createElement(
                "div",
                { css: $G.discountRibbon },
                t.discountPercent,
                Glamor.createElement(
                  "span",
                  { css: $G.discountPercentSymbol },
                  "%"
                ),
                " OFF"
              )
          )
        : null;
    }
    _renderPurchasedLabel() {
      if (!this.props.purchased) return null;
      const e = this.props.price,
        t = e ? `ACTIVE, ${e.integral}.${e.fractal} / MONTH` : "ACTIVE";
      return Glamor.createElement("div", { css: $G.purchasedLabel }, t);
    }
    _renderFeatures() {
      return Glamor.createElement(
        "div",
        { css: $G.features },
        this.props.features.map(this._renderFeature)
      );
    }
    _renderFeature(e) {
      return Glamor.createElement(
        "div",
        { css: $G.feature, key: e.title },
        Glamor.createElement(
          "div",
          { css: $G.featureTexts },
          Glamor.createElement(
            "div",
            { css: $G.featureHeader },
            Glamor.createElement("div", { css: $G.featureTitle }, e.title),
            !!e.info &&
              Glamor.createElement(
                OG.InfoCircle,
                BG({ style: $G.featureInfo }, e.info)
              )
          ),
          Glamor.createElement(
            "div",
            { css: $G.featureDescription },
            e.description
          )
        ),
        Glamor.createElement(OG.SvgIcon, {
          style: $G.featureIcon(e),
          name: e.icon,
        })
      );
    }
    _renderFooter() {
      const e = this.props.footer;
      return e
        ? Glamor.createElement(
            "div",
            { css: $G.footer },
            Glamor.createElement(
              "div",
              { css: $G.ghostButton, ref: this._ghostButtonRef },
              Glamor.createElement(OG.PrimaryButton, {
                label: e.button.label,
                iconStyle: $G.buttonIcon,
              })
            ),
            Glamor.createElement(OG.PrimaryButton, {
              style: $G.button(this),
              label: e.button.label,
              iconStyle: $G.buttonIcon,
              onClick: e.button.onClick,
            }),
            Glamor.createElement(OG.Spacer, { height: "g1" }),
            !this.props.hideDisclaimer &&
              Glamor.createElement(
                "div",
                { css: $G.disclaimer },
                Glamor.createElement(OG.SvgIcon, {
                  style: $G.disclaimerIcon(this),
                  name: NG,
                }),
                Glamor.createElement(
                  "div",
                  { css: $G.disclaimerText },
                  e.disclaimer
                )
              )
          )
        : null;
    }
    _renderFaqButton() {
      return this.props.hideFaq
        ? null
        : Glamor.createElement(
            "div",
            { css: $G.faqButtonRow },
            Glamor.createElement(OG.LinkButton, {
              label: "BILLING F.A.Q.",
              onClick: this.props.onFaqClick,
            })
          );
    }
    _actualizeButtonWidth() {
      const e = this._bodyRef.current.offsetWidth,
        t = this._ghostButtonRef.current.offsetWidth;
      this.setState({ expandedButtonWidth: t + (e - t) / 2 + 17 });
    }
  }
  OG.BillingPurchase = OG.theme.ThemeAware(HG);
  const { $ui: zG } = app,
    jG = {
      root: {
        ...zG.padding("g2 g3 g2 g2"),
        ...zG.row,
        width: "100%",
        background: zG.color.bgLight1,
        border: `1px solid ${zG.color.borderDark}`,
        borderRadius: 8,
      },
      icon: {
        flexShrink: 0,
        marginRight: zG.space.g2,
        width: 20,
        height: 20,
        color: zG.color.primary,
      },
      body: {},
      title: { ...zG.text.group1, color: zG.color.primary },
      text: {
        ...zG.text.tooltipText,
        color: zG.color.textNormal,
        marginTop: zG.space.g0h,
      },
    },
    WG = "billing-status.tick",
    VG = "warning-triangle-large";
  var qG, ZG;
  zG.SvgIcon.registerSvgIcons([
    `<symbol id="${WG}" viewBox="0 0 19 19"><path d="M10,19.5A9.5,9.5,0,1,1,19.5,10,9.511,9.511,0,0,1,10,19.5ZM4.822,9.015l-.938.931L8.328,14.4l7.765-8.148-.856-.943L8.328,11.987,4.822,9.015Z" transform="translate(-0.5 -0.5)" fill="currentColor"/></symbol>`,
  ]),
    (zG.BillingStatus = class extends zG.Component {
      render() {
        return Glamor.createElement(
          "div",
          { css: jG.root },
          Glamor.createElement(zG.SvgIcon, {
            style: jG.icon,
            name: this.props.icon || (this.props.ok ? WG : VG),
          }),
          Glamor.createElement(
            "div",
            { css: jG.body },
            Glamor.createElement("div", { css: jG.title }, this.props.title),
            Glamor.createElement("div", { css: jG.text }, this.props.text)
          )
        );
      }
    });
  const { $ui: YG } = app,
    QG = {
      root: { width: "100%", maxWidth: 320 },
      icon: (e) => ({ flexShrink: 0, width: 21.07, color: e.icon }),
      content: { width: "100%", ...YG.text.bleak },
      button: { "&:not(:last-child)": { marginRight: 40 } },
    };
  function KG() {
    return (KG =
      Object.assign ||
      function (e) {
        for (var t = 1; t < arguments.length; t++) {
          var r = arguments[t];
          for (var n in r)
            Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
        }
        return e;
      }).apply(this, arguments);
  }
  YG.BillingStatusSection =
    ((ZG = qG =
      class extends YG.Component {
        render() {
          const { icon: e, text: t, buttons: r } = this.props,
            n =
              e &&
              Glamor.createElement(
                YG.Fragment,
                null,
                Glamor.createElement(YG.SvgIcon, {
                  style: QG.icon(this.props),
                  name: "warning-triangle",
                }),
                Glamor.createElement(YG.Spacer, { width: "g1h" })
              ),
            o =
              t &&
              Glamor.createElement(
                YG.Fragment,
                null,
                t,
                Glamor.createElement(YG.Spacer, { height: "g2" })
              ),
            a =
              r &&
              r.length > 0 &&
              Glamor.createElement(
                "div",
                { css: YG.row },
                r.map((e, t) =>
                  Glamor.createElement(
                    "div",
                    { key: t, css: QG.button },
                    Glamor.createElement(YG.LinkButton, e)
                  )
                )
              );
          return Glamor.createElement(
            "div",
            { css: [YG.row, QG.root] },
            n,
            Glamor.createElement("div", { css: [YG.column, QG.content] }, o, a)
          );
        }
      }),
    (qG.defaultProps = { icon: YG.color.error }),
    ZG);
  const { $ui: XG } = app,
    JG = {
      title: {
        ...XG.text.bleakSemiBold,
        ...XG.padding("g0h 0 g5 0"),
        ...XG.fullWidth,
      },
      status: { marginRight: XG.space.g5 },
      currencies: {},
      currenciesContent: {
        ...XG.padding("g1h . g1h ."),
        width: 340,
        borderTop: XG.border.dark,
      },
      actions: {},
      actionsContent: {
        ...XG.padding("g0h . . ."),
        ...XG.text.bleak,
        width: 340,
      },
      actionButton: { marginLeft: XG.space.g3 },
    };
  XG.SvgIcon.registerSvgIcons([
    '<symbol id="billing-storefront.sub" viewBox="0 0 20 20"><path d="M10 17.5a7.5 7.5 0 010-15 7.266 7.266 0 015.25 2.25l-4 4H20V0l-2.937 2.938a9.987 9.987 0 102.562 9.79H16.98A7.447 7.447 0 0110 17.5z"/></symbol>',
    '<symbol id="billing-storefront.person" viewBox="0 0 20 20"><path d="M10 10a5 5 0 10-5-5 5.015 5.015 0 005 5zm0 2.5c-3.312 0-10 1.688-10 5V20h20v-2.5c0-3.312-6.688-5-10-5z"/></symbol>',
    '<symbol id="billing-storefront.ouroboros" viewBox="0 0 20 11.264"><path d="M18.596 1.643a4.32 4.32 0 00-6.776-.006l-.846.933 1.592 1.88.818-.9v-.006a2.312 2.312 0 013.626-.006 3.332 3.332 0 010 4.189 2.312 2.312 0 01-3.626.006l-5.2-6.09A4.459 4.459 0 004.799 0a4.427 4.427 0 00-3.39 1.643 6.352 6.352 0 000 7.979 4.446 4.446 0 003.39 1.643 4.41 4.41 0 003.385-1.643l1.818-2.118 1.813 2.118a4.315 4.315 0 006.771.006A6.087 6.087 0 0020 5.639a6.1 6.1 0 00-1.404-3.996zM6.612 7.727a2.312 2.312 0 01-3.626.006 3.332 3.332 0 010-4.189 2.312 2.312 0 013.626-.006l1.8 2.1z"/></symbol>',
    '<symbol id="billing-storefront.currency" viewBox="0 0 24 24"><path d="M0,0H24V24H0Z" fill="none"/><path d="M19.95,2.25H1.05A1.05,1.05,0,0,0,0,3.3V15.9a1.05,1.05,0,0,0,1.05,1.05h18.9A1.05,1.05,0,0,0,21,15.9V3.3A1.05,1.05,0,0,0,19.95,2.25ZM5.775,11.959v.529a.262.262,0,0,1-.262.262H4.988a.262.262,0,0,1-.262-.262v-.535A1.879,1.879,0,0,1,3.7,11.581a.263.263,0,0,1-.019-.4l.386-.368a.269.269,0,0,1,.332-.024.79.79,0,0,0,.421.122h.922a.413.413,0,0,0,.387-.433.428.428,0,0,0-.288-.418L4.361,9.619A1.485,1.485,0,0,1,3.325,8.2a1.461,1.461,0,0,1,1.4-1.479V6.188a.262.262,0,0,1,.262-.262h.525a.262.262,0,0,1,.262.262v.535A1.876,1.876,0,0,1,6.8,7.094a.263.263,0,0,1,.019.4l-.386.368a.269.269,0,0,1-.332.024.787.787,0,0,0-.421-.122H4.762a.413.413,0,0,0-.387.433.428.428,0,0,0,.288.418l1.477.443A1.485,1.485,0,0,1,7.175,10.48,1.461,1.461,0,0,1,5.775,11.959Zm7.875-.521a.262.262,0,0,1-.263.262H9.713a.262.262,0,0,1-.262-.262v-.525a.262.262,0,0,1,.262-.262h3.675a.262.262,0,0,1,.263.262Zm5.25,0a.262.262,0,0,1-.263.262H16.013a.262.262,0,0,1-.263-.262v-.525a.262.262,0,0,1,.263-.262h2.625a.262.262,0,0,1,.263.262Zm0-3.15a.262.262,0,0,1-.263.262H9.713a.262.262,0,0,1-.262-.262V7.762A.262.262,0,0,1,9.713,7.5h8.925a.262.262,0,0,1,.263.262Z" transform="translate(1.594 3.065)" fill="#1BA2F9"/></symbol>',
    '<symbol id="billing-storefront.account" viewBox="0 0 16 16"><path d="M12.5,12.5a4,4,0,1,0-4-4A4.012,4.012,0,0,0,12.5,12.5Zm0,2c-2.65,0-8,1.35-8,4v2h16v-2C20.5,15.85,15.15,14.5,12.5,14.5Z" transform="translate(-4.5 -4.5)" fill="currentColor"/></symbol>',
  ]),
    (XG.BillingStorefront = class extends XG.Component {
      constructor(...e) {
        var t;
        return (
          (t = super(...e)),
          (this._renderPlan = (e) =>
            Glamor.createElement(XG.BillingPlanRenderer, KG({ key: e.id }, e))),
          t
        );
      }
      render() {
        const { currencies: e, status: t } = this.props;
        return Glamor.createElement(
          "div",
          { css: [XG.column, XG.alignItems.center, XG.fullWidth] },
          this._renderTitle(),
          Glamor.createElement(XG.Spacer, { height: 24 }),
          this._renderPlans(),
          (e || t) && Glamor.createElement(XG.Spacer, { height: 80 }),
          Glamor.createElement(
            "div",
            { css: [XG.row, XG.fullWidth, XG.justifyContent.between] },
            this._renderStatus(),
            Glamor.createElement(
              "div",
              { css: [XG.column, XG.alignItems.center] },
              this._renderCurrencies()
            )
          )
        );
      }
      _renderTitle() {
        const { title: e } = this.props;
        return e
          ? Glamor.createElement(
              "div",
              { css: [XG.row, XG.justifyContent.between, XG.fullWidth] },
              Glamor.createElement("div", { css: JG.title }, e),
              this._renderActions()
            )
          : null;
      }
      _renderPlans() {
        return Glamor.createElement(
          "div",
          { css: XG.row },
          (this.props.plans || []).map(this._renderPlan)
        );
      }
      _renderStatus() {
        const { status: e } = this.props;
        return Glamor.createElement(
          "div",
          { css: JG.status },
          e && Glamor.createElement(XG.BillingStatus, e)
        );
      }
      _renderCurrencies() {
        const { currencies: e, onCurrencyChange: t } = this.props;
        return e
          ? Glamor.createElement(
              "div",
              { css: [XG.rowReverse, JG.currencies] },
              Glamor.createElement(
                "div",
                { css: [XG.rowReverse, JG.currenciesContent] },
                Glamor.createElement(
                  "div",
                  null,
                  Glamor.createElement(XG.Dropdown, {
                    inline: !0,
                    icon: { name: "billing-storefront.currency" },
                    items: e,
                    onChange: t,
                  })
                )
              )
            )
          : null;
      }
      _renderActions() {
        const { actions: e } = this.props;
        if (!e) return null;
        const { content: t, buttons: r, color: n } = e;
        return Glamor.createElement(
          "div",
          { css: [XG.rowReverse, JG.actions] },
          Glamor.createElement(XG.SvgIcon, {
            style: { marginTop: 4, color: n },
            name: "billing-storefront.account",
          }),
          Glamor.createElement(XG.Spacer, { width: "g1" }),
          Glamor.createElement(
            "div",
            { css: [XG.column, XG.alignItems.end, JG.actionsContent] },
            t,
            Glamor.createElement(XG.Spacer, { height: "g0h" }),
            Glamor.createElement(
              "div",
              { css: XG.row },
              r.map((e, t) =>
                Glamor.createElement(
                  XG.LinkButton,
                  KG({ key: t }, e, { buttonStyle: JG.actionButton, small: !0 })
                )
              )
            )
          )
        );
      }
    });
  const { $ui: eD } = app;
  eD.SvgIcon.registerDefs(
    '\n  <linearGradient id="inssist.gradient" x1=".5" x2=".5" y2="1" gradientUnits="objectBoundingBox">\n    <stop offset="0" stop-color="#f27021"/>\n    <stop offset=".535" stop-color="#e94056"/>\n    <stop offset="1" stop-color="#8a2386"/>\n  </linearGradient>\n'
  ),
    eD.SvgIcon.registerSvgIcons([
      '<symbol id="igswiss.verified" viewBox="0 0 16 16"><path d="M8 14.762L5.856 16l-1.237-2.144H2.144v-2.475L0 10.144 1.238 8 0 5.856l2.144-1.237V2.144h2.475L5.856 0 8 1.238 10.144 0l1.238 2.144h2.475v2.475L16 5.856 14.762 8 16 10.144l-2.144 1.238v2.475h-2.475L10.144 16z" fill="currentColor"/><path d="M7.402 11.599L4.085 8.28 5.4 6.966l2 2 3.672-3.667 1.313 1.314z" fill="#fff"/></symbol>',
      '<symbol id="igswiss.private" viewBox="0 0 18.666 16"><g transform="translate(4290 4180)"><path d="M-4285.812-4167.761l1.205.736,5.765-1.07,3.592-3.875-.248-4.26-1.205-.682-6.764,1.257-2.94,3.685Z" fill="transparent"/><path d="M1.528,15.8a.668.668,0,0,1,0-.943l2.631-2.629a12.655,12.655,0,0,0,1.186.7L2.471,15.8a.668.668,0,0,1-.943,0Zm3.817-2.872L7.5,10.778a3.359,3.359,0,0,1-.942-.943l4.613-4.612a3.359,3.359,0,0,1,.942.943L7.5,10.778A3.328,3.328,0,0,0,12.11,6.165l2.4-2.4a17.655,17.655,0,0,1,4.032,3.839.666.666,0,0,1,0,.784C18.372,8.621,14.4,14,9.333,14A8.639,8.639,0,0,1,5.345,12.933ZM.127,8.392a.669.669,0,0,1,0-.784C.293,7.379,4.266,2,9.333,2a8.632,8.632,0,0,1,3.988,1.067L11.168,5.222A3.328,3.328,0,0,0,6.555,9.835l-2.4,2.4A17.673,17.673,0,0,1,.127,8.392ZM13.321,3.066,16.195.2a.667.667,0,1,1,.943.943L14.507,3.766A12.655,12.655,0,0,0,13.321,3.066Z" transform="translate(-4290 -4180)" fill="currentColor"/></g></symbol>',
      '<symbol id="igswiss.rate-us-stars" viewBox="0 0 76.559 11.955"><path d="M66.434,11.879a.394.394,0,0,1-.156-.384l.658-3.837L64.148,4.94a.393.393,0,0,1,.218-.67l3.853-.561L69.942.219a.392.392,0,0,1,.7,0L72.37,3.71l3.853.561a.393.393,0,0,1,.218.67L73.652,7.658l.658,3.837a.392.392,0,0,1-.387.459.389.389,0,0,1-.183-.045L70.294,10.1l-3.446,1.812a.391.391,0,0,1-.414-.03Zm-16.015,0a.392.392,0,0,1-.157-.384l.658-3.837L48.134,4.94a.392.392,0,0,1,.217-.67L52.2,3.71,53.927.219a.393.393,0,0,1,.7,0L56.354,3.71l3.853.561a.392.392,0,0,1,.218.67L57.637,7.658l.659,3.837a.393.393,0,0,1-.388.459.389.389,0,0,1-.183-.045L54.279,10.1l-3.446,1.812a.39.39,0,0,1-.413-.03Zm-15.985,0a.392.392,0,0,1-.157-.384l.658-3.837L32.149,4.94a.392.392,0,0,1,.217-.67l3.853-.561L37.942.219a.393.393,0,0,1,.7,0L40.369,3.71l3.853.561a.392.392,0,0,1,.218.67L41.652,7.658l.659,3.837a.393.393,0,0,1-.388.459.389.389,0,0,1-.183-.045L38.294,10.1l-3.446,1.812a.39.39,0,0,1-.413-.03Zm-16.016,0a.394.394,0,0,1-.157-.384l.659-3.837L16.133,4.94a.393.393,0,0,1,.218-.67L20.2,3.71,21.926.219a.393.393,0,0,1,.7,0L24.355,3.71l3.853.561a.393.393,0,0,1,.218.67L25.637,7.658l.658,3.837a.393.393,0,0,1-.387.459.386.386,0,0,1-.183-.045L22.279,10.1l-3.446,1.812a.391.391,0,0,1-.414-.03Zm-16.015,0a.394.394,0,0,1-.157-.384l.659-3.837L.119,4.94a.393.393,0,0,1,.218-.67L4.189,3.71,5.912.219a.393.393,0,0,1,.7,0L8.34,3.71l3.853.561a.392.392,0,0,1,.217.67L9.623,7.658l.658,3.837a.393.393,0,0,1-.387.459.386.386,0,0,1-.183-.045L6.265,10.1,2.819,11.909a.391.391,0,0,1-.414-.03Z" fill="currentColor"/></symbol>',
      '<symbol id="igswiss.plus"  viewBox="0 0 50 50"><path d="M25 50a25.007 25.007 0 0 1-9.728-48.034 25 25 0 0 1 19.456 46.068A24.823 24.823 0 0 1 25 50zm0-45a19.936 19.936 0 1 0 7.785 1.572A19.876 19.876 0 0 0 25 5zm2.5 32.5h-5v-10h-10v-5h10v-10h5v10h10v5h-10v10z" fill="currentColor"/></symbol>',
      '<symbol id="igswiss.tumbleweed" viewBox="0 0 40 40"><g transform="translate(-544 -62)"><rect width="40" height="40" transform="translate(544 62)" fill="none"/><path d="M31.6,23.479l-1.748.376a15.274,15.274,0,0,0-.165-15.887l-1.615.954a14.1,14.1,0,0,1,2.03,7.024L28.737,14.17l-1.592,1.143,2.693,3.368a14.178,14.178,0,0,1-3.94,7.333,14.024,14.024,0,0,1-2.387,1.908l1.281-3.582-1.766-.632-1.949,5.451a14.285,14.285,0,0,1-10.728-.2,14.22,14.22,0,0,0,4.72-1.519l4.578,1.46.57-1.788-3-.957A23.329,23.329,0,0,0,20.6,23.361,22.935,22.935,0,0,0,22.777,20.8l5.077.186.07-1.874L24,18.966c2.037-3.432,2.8-6.981,1.821-9.568l-1.754.665c.736,1.941.147,4.719-1.4,7.5l-.506-1.754-1.8.52.953,3.307a21.145,21.145,0,0,1-2.041,2.4,19.582,19.582,0,0,1-5.843,4.074l.737-1.715-1.723-.74-1.388,3.232A6.032,6.032,0,0,1,6.8,26.549l5.564-5.564h4.916V19.109h-3.04l7.019-7.019-1.326-1.326L16.891,13.8V10.764H15.016V15.68L8.934,21.761V18.72H7.059v4.916L5.473,25.222c-1.372-2.446-.193-6.78,2.9-10.663l3.315,1.074.579-1.784-2.527-.819c.088-.091.158-.188.248-.278,3.924-3.922,8.958-5.946,11.974-4.8L22.624,6.2c-2.714-1.029-6.49-.154-10.077,2.118l.362-4.1-1.868-.165-.5,5.7a23.229,23.229,0,0,0-4.674,5.04L4.913,11.8l-1.787.57,1.456,4.564a14.181,14.181,0,0,0-1.514,4.735,13.762,13.762,0,0,1-.2-10.727l5.45-1.952L7.681,7.229,4.1,8.512a14.045,14.045,0,0,1,1.909-2.39A14.215,14.215,0,0,1,13.658,2.1l3,2.745L17.9,3.3l-1.62-1.412A13.989,13.989,0,0,1,23.1,3.824l.954-1.615A15.919,15.919,0,0,0,8.144,2.054l.4-1.539L6.728.047,5.791,3.667c-.381.316-.753.647-1.109,1A16.742,16.742,0,0,0,2.5,7.539L2,5.317l-1.83.412.994,4.408A15.911,15.911,0,0,0,15.953,31.989a15.987,15.987,0,0,0,5.929-1.128l4.412.995.412-1.83-2.226-.5a15.176,15.176,0,0,0,3.843-3.417l3.676-.8Zm0,0" transform="translate(548 65.999)" fill="currentColor"/></g></symbol>',
      '<symbol id="igswiss.times" viewBox="0 0 8.5 8.5"><path d="M4.229 4.983L.752 8.46l-.753-.754L3.475 4.23-.001.754.752 0l3.477 3.476L7.706 0l.753.754L4.983 4.23l3.476 3.476-.753.754z" fill="currentColor"/></symbol>',
      '<symbol id="igswiss.logo" viewBox="0 0 46.974 46.974"><path d="M12.963 46.974A12.977 12.977 0 0 1 0 34.011V12.963A12.978 12.978 0 0 1 12.963 0h21.048a12.978 12.978 0 0 1 12.963 12.963v21.048a12.978 12.978 0 0 1-12.963 12.963zM4.168 12.963v21.048a8.8 8.8 0 0 0 8.795 8.8h21.048a8.805 8.805 0 0 0 8.8-8.8V12.963a8.805 8.805 0 0 0-8.8-8.8H12.963a8.805 8.805 0 0 0-8.795 8.8zm15.71 21.349v-6.955h-6.955v-7.479h6.955v-6.955h7.479v6.955h6.956v7.479h-6.956v6.956zM33.94 13.068a3.056 3.056 0 1 1 2.159.895 3.082 3.082 0 0 1-2.159-.895z" fill="currentColor"/></symbol>',
      '<symbol id="igswiss.drop" viewBox="0 0 56.596 71.436"><path d="M38.5.552A1.728 1.728 0 0037.254 0H9.387A9.426 9.426 0 000 9.369v52.7a9.426 9.426 0 009.387 9.37h37.822a9.426 9.426 0 009.387-9.37V20.223a1.857 1.857 0 00-.5-1.208zm.5 5.539l11.781 12.372H43.12A4.109 4.109 0 0139 14.356zm8.213 61.894H9.387a5.977 5.977 0 01-5.936-5.919V9.369a5.977 5.977 0 015.936-5.918h26.158v10.905a7.549 7.549 0 007.575 7.558h10.025v40.152a5.965 5.965 0 01-5.936 5.919zm0 0" fill="currentColor"/><path d="M42.5 56.079H14.1a1.726 1.726 0 100 3.451h28.419a1.726 1.726 0 10-.017-3.451zm-5.403-19.395l-7.109 7.644V25.485a1.726 1.726 0 00-3.451 0v18.843l-7.109-7.644a1.722 1.722 0 00-2.52 2.347L27.02 49.884a1.713 1.713 0 002.519 0L39.65 39.031a1.72 1.72 0 00-.086-2.433 1.761 1.761 0 00-2.467.086zm0 0" fill="currentColor"/></symbol>',
      '<symbol id="igswiss.checkmark" viewBox="0 0 30 30"><path fill="none" d="M0 0h30v30H0z"/><path d="M15 2.5A12.5 12.5 0 1027.5 15 12.537 12.537 0 0015 2.5zM15 25a10 10 0 1110-10 10.029 10.029 0 01-10 10z" fill="currentColor" fill-rule="evenodd"/><path data-name="Path 8107" d="M28.751 6.784l-1.643-1.69a.353.353 0 00-.261-.112.339.339 0 00-.261.112L15.197 16.567l-4.146-4.145a.361.361 0 00-.523 0l-1.662 1.662a.372.372 0 000 .532l5.228 5.228a1.653 1.653 0 001.092.532 1.732 1.732 0 001.083-.513h.009L28.76 7.316a.4.4 0 00-.009-.532z" fill="currentColor"/></symbol>',
      '<symbol id="igswiss.circle-check-yes" viewBox="0 0 17.999 17.999"><g transform="translate(-0.001 -0.001)"><path d="M15932-3733a9.01,9.01,0,0,1-9-9,9.008,9.008,0,0,1,9-9,9.01,9.01,0,0,1,9,9,8.943,8.943,0,0,1-2.636,6.365A8.94,8.94,0,0,1,15932-3733Zm-4.677-9.429a.207.207,0,0,0-.148.064l-.939.94a.2.2,0,0,0-.066.15.205.205,0,0,0,.066.15l2.96,2.964a.941.941,0,0,0,.62.3.954.954,0,0,0,.616-.292l7.081-7.113a.225.225,0,0,0-.008-.3l-.929-.96a.2.2,0,0,0-.147-.064.2.2,0,0,0-.152.064l-6.457,6.505-2.349-2.348A.2.2,0,0,0,15927.322-3742.43Z" transform="translate(-15923 3751)" fill="currentColor"/></g></symbol>',
      '<symbol id="igswiss.circle-check-no" viewBox="0 0 17.999 17.999"><path d="M15932-3733a9.01,9.01,0,0,1-9-9,9.008,9.008,0,0,1,9-9,9.01,9.01,0,0,1,9,9,8.943,8.943,0,0,1-2.636,6.365A8.94,8.94,0,0,1,15932-3733Zm0-7.585h0l3.535,3.536,1.417-1.416-3.537-3.537,3.537-3.532-1.417-1.416-3.536,3.537-3.532-3.537-1.417,1.416,3.533,3.532-3.533,3.537,1.417,1.416,3.531-3.536Z" transform="translate(-15923.001 3750.999)" fill="currentColor"/></symbol>',
      '<symbol id="igswiss.search" viewBox="0 0 32 32"><g transform="translate(-479.482 0.165)"><rect width="32" height="32" transform="translate(479.483 -0.165)" fill="none"/><path d="M20.312,19.339l-4.45-4.492a6.342,6.342,0,1,0-.962.975l4.421,4.462a.685.685,0,0,0,.967.025A.689.689,0,0,0,20.312,19.339Zm-9.433-3.462a5.007,5.007,0,1,1,3.542-1.467A4.977,4.977,0,0,1,10.879,15.876Z" transform="translate(482.982 3.343)" fill="#a5aaaf"/></g></symbol>',
      '<symbol id="igswiss.close" viewBox="0 0 32 32"><g transform="translate(-479.482 0.165)"><rect width="32" height="32" transform="translate(479.483 -0.165)" fill="none"/><path d="M6.751,14.964V8.213H0V6.751H6.751V0H8.213V6.751h6.751V8.213H8.213v6.751Z" transform="translate(495.732 4.943) rotate(45)" fill="#a5aaaf"/></g></symbol>',
      '<symbol id="igswiss.copy" viewBox="0 0 13.75 15"><path d="M5.469 12.187a2.66 2.66 0 01-2.656-2.656V3.125H1.719A1.72 1.72 0 000 4.844v8.438a1.72 1.72 0 001.719 1.719h7.812a1.72 1.72 0 001.719-1.719v-1.095zm0 0" fill="currentColor"/><path d="M13.75 1.719A1.719 1.719 0 0012.031 0H5.469A1.719 1.719 0 003.75 1.719v7.812a1.719 1.719 0 001.719 1.719h6.563a1.719 1.719 0 001.718-1.719zm0 0" fill="currentColor"/></symbol>',
      '<symbol id="igswiss.tick" viewBox="0 0 9.454 7.091"><path d="M1.364 2l2.364 2.364L8.091 0l1.363 1.364-5.726 5.727L0 3.364z" fill="currentColor"/></symbol>',
      '<symbol id="igswiss.refresh" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M20.07 10.871a.651.651 0 1 0-1.286.205v.012a7.166 7.166 0 1 1-1.78-3.639l-2.883.961.411 1.235 3.906-1.3a.651.651 0 0 0 .445-.618V3.819h-1.3V6.2a8.376 8.376 0 1 0 2.487 4.671z" fill="currentColor"/></symbol>',
      '<symbol id="igswiss.upload" viewBox="0 0 34.859 44"><g fill="currentColor"><path d="M23.711.34a1.065 1.065 0 00-.765-.34H5.782A5.806 5.806 0 000 5.771v32.458A5.806 5.806 0 005.782 44h23.3a5.806 5.806 0 005.782-5.771V12.456a1.144 1.144 0 00-.308-.744zm.308 3.412l7.259 7.62h-4.719a2.531 2.531 0 01-2.54-2.529zm5.059 38.123H5.782a3.681 3.681 0 01-3.656-3.646V5.771a3.681 3.681 0 013.656-3.645h16.112v6.716a4.649 4.649 0 004.665 4.658h6.175v24.729a3.674 3.674 0 01-3.656 3.645zm0 0"/><path d="M26.176 34.541H8.683a1.063 1.063 0 000 2.126h17.5a1.063 1.063 0 10-.011-2.126zm0 0M11.988 23.105l4.379-4.708v11.606a1.063 1.063 0 002.126 0V18.397l4.379 4.708a1.06 1.06 0 001.552-1.445l-6.228-6.685a1.055 1.055 0 00-1.552 0l-6.228 6.685a1.059 1.059 0 00.053 1.5 1.084 1.084 0 001.519-.055zm0 0"/></g></symbol>',
      '<symbol id="igswiss.discount-day" viewBox="0 0 24 23"><path d="m23.758 10.857-2.372-2.452.478-3.378a.86.86 0 0 0-.703-.967l-3.36-.59L16.202.458a.86.86 0 0 0-1.137-.37L12 1.586 8.935.088a.86.86 0 0 0-1.137.37l-1.6 3.013-3.359.589a.86.86 0 0 0-.703.968l.478 3.377-2.372 2.452a.86.86 0 0 0 0 1.196l2.372 2.451-.478 3.378a.86.86 0 0 0 .703.968l3.36.59 1.599 3.013a.86.86 0 0 0 1.137.37L12 21.323l3.065 1.498a.86.86 0 0 0 1.137-.37l1.6-3.013 3.36-.589a.86.86 0 0 0 .702-.968l-.478-3.378 2.372-2.451a.86.86 0 0 0 0-1.196Z" fill="currentColor"/><path d="M9.268 10.806a2.085 2.085 0 0 0 2.083-2.083A2.085 2.085 0 0 0 9.268 6.64a2.085 2.085 0 0 0-2.083 2.083c0 1.149.935 2.083 2.083 2.083Zm0-2.79a.707.707 0 1 1-.002 1.415.707.707 0 0 1 .002-1.414ZM16.154 7.3a.688.688 0 0 0-.973 0l-7.335 7.336a.688.688 0 0 0 .973.973l7.335-7.335a.688.688 0 0 0 0-.973ZM14.732 12.104a2.085 2.085 0 0 0-2.083 2.083c0 1.148.934 2.083 2.083 2.083a2.085 2.085 0 0 0 2.082-2.083 2.085 2.085 0 0 0-2.082-2.083Zm0 2.79a.707.707 0 1 1 .002-1.415.707.707 0 0 1-.002 1.415Z" fill="#fff"/></symbol>',
      '<symbol id="igswiss.discount-night" viewBox="0 0 24 23"><path d="m23.758 10.857-2.372-2.452.478-3.378a.86.86 0 0 0-.703-.967l-3.36-.59L16.202.458a.86.86 0 0 0-1.137-.37L12 1.586 8.935.088a.86.86 0 0 0-1.137.37l-1.6 3.013-3.359.589a.86.86 0 0 0-.703.968l.478 3.377-2.372 2.452a.86.86 0 0 0 0 1.196l2.372 2.451-.478 3.378a.86.86 0 0 0 .703.968l3.36.59 1.599 3.013a.86.86 0 0 0 1.137.37L12 21.323l3.065 1.498a.86.86 0 0 0 1.137-.37l1.6-3.013 3.36-.589a.86.86 0 0 0 .702-.968l-.478-3.378 2.372-2.451a.86.86 0 0 0 0-1.196Z" fill="currentColor"/><path d="M9.268 10.806a2.085 2.085 0 0 0 2.083-2.083A2.085 2.085 0 0 0 9.268 6.64a2.085 2.085 0 0 0-2.083 2.083c0 1.149.935 2.083 2.083 2.083Zm0-2.79a.707.707 0 1 1-.002 1.415.707.707 0 0 1 .002-1.414ZM16.154 7.3a.688.688 0 0 0-.973 0l-7.335 7.336a.688.688 0 0 0 .973.973l7.335-7.335a.688.688 0 0 0 0-.973ZM14.732 12.104a2.085 2.085 0 0 0-2.083 2.083c0 1.148.934 2.083 2.083 2.083a2.085 2.085 0 0 0 2.082-2.083 2.085 2.085 0 0 0-2.082-2.083Zm0 2.79a.707.707 0 1 1 .002-1.415.707.707 0 0 1-.002 1.415Z" fill="#292a2d"/></symbol>',
    ]);
  const { $constants: tD } = app,
    rD = "https://www.instagram.com/";
  (tD.ig = {
    maxMentions: 30,
    base: rD,
    challenge:
      '<link rel="alternate" href="https://www.instagram.com/challenge/',
    scriptPath: {
      followings: {
        regexp: [
          /(?:src|href)="\/(static\/bundles\/[\S]+\/Consumer\.js\/[\S]+)"/i,
          /(?:src|href)="\/\/www.instagram.com\/(static\/bundles\/[\S]+\/Consumer\.js\/[\S]+)"/i,
          /(?:src|href)="\/\/z-p3.www.instagram.com\/(static\/bundles\/[\S]+\/Consumer\.js\/[\S]+)"/i,
        ],
      },
      followers: {
        regexp: [
          /(?:src|href)="\/(static\/bundles\/[\S]+\/Consumer\.js\/[\S]+)"/i,
          /(?:src|href)="\/\/www.instagram.com\/(static\/bundles\/[\S]+\/Consumer\.js\/[\S]+)"/i,
          /(?:src|href)="\/\/z-p3.www.instagram.com\/(static\/bundles\/[\S]+\/Consumer\.js\/[\S]+)"/i,
        ],
      },
      timeline: {
        regexp: [
          /(?:src|href)="\/(static\/bundles\/[\S]+\/ConsumerLibCommons\.js\/[\S]+)"/i,
          /(?:src|href)="\/\/www.instagram.com\/(static\/bundles\/[\S]+\/ConsumerLibCommons\.js\/[\S]+)"/i,
          /(?:src|href)="\/\/z-p3.www.instagram.com\/(static\/bundles\/[\S]+\/ConsumerLibCommons\.js\/[\S]+)"/i,
        ],
      },
      "user-posts": {
        regexp: [
          /(?:src|href)="\/(static\/bundles\/[\S]+\/Consumer\.js\/[\S]+)"/i,
          /(?:src|href)="\/\/www.instagram.com\/(static\/bundles\/[\S]+\/Consumer\.js\/[\S]+)"/i,
          /(?:src|href)="\/\/z-p3.www.instagram.com\/(static\/bundles\/[\S]+\/Consumer\.js\/[\S]+)"/i,
        ],
      },
    },
    queryHash: {
      followings: {
        regexp: [
          /,o="([\dabcdef]{32})",u=1/,
          /,s="([\dabcdef]{32})",f=1/,
          /,l="([\dabcdef]{32})",s=1/,
          /,l="([\dabcdef]{32})",u=1/,
          /,n="([\dabcdef]{32})",u=1/,
        ],
      },
      followers: {
        regexp: [
          /\),u="([\dabcdef]{32})",l="/,
          /\),c="([\dabcdef]{32})",l="/,
          /\),l="([\dabcdef]{32})",s="/,
          /\),a="([\dabcdef]{32})",l="/,
          /;var n="([\dabcdef]{32})",o="/,
          /;var t="([\dabcdef]{32})",n="/,
          /;const c="([\dabcdef]{32})",l="/,
          /;const s="([\dabcdef]{32})",l="/,
          /;const t="([\dabcdef]{32})",n="/,
        ],
      },
      timeline: { regexp: [/,e\.FEED_QUERY_ID="([\dabcdef]{32})",/] },
      "user-posts": {
        regexp: [
          /l.pagination},queryId:"([\dabcdef]{32})",/,
          /c.pagination},queryId:"([\dabcdef]{32})",/,
        ],
      },
    },
    sharedData: {
      prefix: '<script type="text/javascript">window._sharedData =',
      suffix: ";</script>",
    },
    additionalData: {
      prefix: '<script type="text/javascript">window.__additionalDataLoaded(',
      suffix: ");</script>",
    },
    home: { url: rD },
    loginActivity: {
      url: "https://i.instagram.com/api/v1/session/login_activity/?__a=1",
    },
    post: { url: (e) => `https://www.instagram.com/p/${e}/` },
    hashtag: {
      url: (e, { json: t = !1 } = {}) =>
        t
          ? `https://i.instagram.com/api/v1/tags/web_info?tag_name=${e}`
          : `https://www.instagram.com/explore/tags/${e}/`,
    },
    explore: { url: "https://www.instagram.com/explore/grid/" },
    user: { url: (e = null) => (e ? `https://www.instagram.com/${e}/` : rD) },
    userPage: { url: (e) => `https://www.instagram.com/${e}/` },
    editAccount: { url: "https://www.instagram.com/accounts/edit/" },
    rootTagPosts: {
      url: (e) => `https://www.instagram.com/explore/tags/${e.toLowerCase()}/`,
    },
    rootTimelinePosts: {
      url: (e, t) => {
        const r = JSON.stringify({
          cached_feed_item_ids: [],
          fetch_media_item_count: 12,
          fetch_media_item_cursor: null,
          fetch_comment_count: 4,
          fetch_like: 3,
          has_stories: !1,
          has_threaded_comments: !0,
        });
        return `https://www.instagram.com/graphql/query/?${
          t && t.timeline
            ? `query_hash=${t.timeline}`
            : "query_hash=6b838488258d7a4820e48d209ef79eb1"
        }&variables=${encodeURI(r)}`;
      },
    },
    moreTimelinePosts: {
      url: (e, t) => {
        const r = JSON.stringify(
          t || {
            cached_feed_item_ids: [],
            fetch_media_item_count: 12,
            fetch_media_item_cursor: e.lastCursor,
            fetch_comment_count: 4,
            fetch_like: 3,
            has_stories: !1,
            has_threaded_comments: !0,
          }
        );
        return `https://www.instagram.com/graphql/query/?${
          e.queryHash && e.queryHash.timeline
            ? `query_hash=${e.queryHash.timeline}`
            : "query_hash=6b838488258d7a4820e48d209ef79eb1"
        }&variables=${encodeURI(r)}`;
      },
    },
    rootUserPosts: {
      url: (e) => {
        const t = JSON.stringify({ id: e, first: 50, after: null });
        return `https://www.instagram.com/graphql/query/?query_hash=003056d32c2554def87228bc3fd9668a&variables=${encodeURI(
          t
        )}`;
      },
    },
    moreUserPosts: {
      url: (e, t) => {
        const r = JSON.stringify(
          t || { id: e.userId, first: 50, after: e.lastCursor }
        );
        return `https://www.instagram.com/graphql/query/?query_hash=003056d32c2554def87228bc3fd9668a&variables=${encodeURI(
          r
        )}`;
      },
    },
    rootUserFollowers: {
      url: (e, t) => {
        const r = JSON.stringify({
          id: e,
          first: 24,
          include_reel: !0,
          fetch_mutual: !1,
        });
        return `https://www.instagram.com/graphql/query/?${
          t && t.followers
            ? `query_hash=${t.followers}`
            : "query_hash=c76146de99bb02f6415203be841dd25a"
        }&variables=${encodeURI(r)}`;
      },
    },
    moreUserFollowers: {
      url: (e, t) => {
        const r = JSON.stringify(
          t || {
            id: e.userId,
            first: 50,
            after: e.lastCursor,
            include_reel: !0,
            fetch_mutual: !1,
          }
        );
        return `https://www.instagram.com/graphql/query/?${
          e.queryHash && e.queryHash.followers
            ? `query_hash=${e.queryHash.followers}`
            : "query_hash=c76146de99bb02f6415203be841dd25a"
        }&variables=${encodeURI(r)}`;
      },
    },
    rootUserFollowings: {
      url: (e, t) => {
        const r = JSON.stringify({
          id: e,
          first: 24,
          include_reel: !0,
          fetch_mutual: !1,
        });
        return `https://www.instagram.com/graphql/query/?${
          t && t.followings
            ? `query_hash=${t.followings}`
            : "query_hash=d04b0a864b4b54837c0d870b0e77e076"
        }&variables=${encodeURI(r)}`;
      },
    },
    moreUserFollowings: {
      url: (e, t) => {
        const r = JSON.stringify(
          t || {
            id: e.userId,
            first: 50,
            after: e.lastCursor,
            include_reel: !0,
            fetch_mutual: !1,
          }
        );
        return `https://www.instagram.com/graphql/query/?${
          e.queryHash && e.queryHash.followings
            ? `query_hash=${e.queryHash.followings}`
            : "query_hash=d04b0a864b4b54837c0d870b0e77e076"
        }&variables=${encodeURI(r)}`;
      },
    },
    logout: { url: "https://www.instagram.com/accounts/logout" },
    login: {
      link: '<link rel="canonical" href="https://www.instagram.com/accounts/login/',
      url: "https://www.instagram.com/accounts/login/?source=auth_switcher",
    },
    locale: { url: rD, regexp: /"locale":"([^"]+)"/ },
  }),
    (tD.common = {
      bg: "/app/bg.js",
      reviewsUrl:
        "https://chrome.google.com/webstore/detail/bcocdbombenodlegijagbhdjbifpiijp/reviews",
      getAppUrl: "https://get.inssist.com",
      getAppHost: "get.inssist.com",
      supportEmail: "inssist@slashedio.io",
      termsUrl: "https://inssist.com/terms",
      policyUrl: "https://inssist.com/privacy",
      faqUrl: "https://inssist.com/faq",
      faqBillingUrl: "https://inssist.com/faq#billing",
    });
  const { $fetcher: nD } = app;
  nD.assign({
    fetch: lD,
    fetchText: async function (...e) {
      const t = await lD(...e);
      return await t.text();
    },
    fetchJson: async function (...e) {
      const t = await lD(...e);
      return await t.json();
    },
    getCache: function () {
      return oD;
    },
    cleanCache: function () {
      cD("cleaning fetcher cache"), (oD = []);
    },
    ignoreCache: function (e = 1) {
      aD += e;
    },
    isIgnoreCache: function () {
      return aD > 0;
    },
  });
  let oD = [],
    aD = 0;
  const iD = 2e4,
    sD = 864e5;
  async function lD(e, t = {}, r = iD) {
    return new Promise((n, o) => {
      (async () => {
        let a = setTimeout(() => {
          a && ((a = null), o({ message: "Timed out" }));
        }, r);
        try {
          const r = await (async function (e, t) {
            if (
              (cD(`fetching ${e}`),
              ((t = t || {}).method = t.method || "GET"),
              t.method && "GET" !== t.method)
            )
              return fetch(e, t);
            if (aD <= 0) {
              const t = Date.now();
              oD = oD.filter((e) => t - e.on < sD);
              const r = oD.find((t) => t.url === e);
              if (r) return cD("fetch cache hit"), r.res.clone();
            } else cD("ignoring fetch cache");
            aD > 0 && aD--;
            const r = await fetch(e, t);
            return oD.push({ url: e, on: Date.now(), res: r.clone() }), r;
          })(e, { credentials: "include", ...t });
          if (!a) return;
          if ((clearTimeout(a), (a = null), r.ok)) return void n(r);
          if (400 !== r.status) return void o({ message: String(r.status) });
          try {
            const e = await r.text();
            o({ message: String(r.status), body: e });
          } catch (e) {
            o({ message: String(r.status), body: null });
          }
        } catch (e) {
          if (!a) return;
          clearTimeout(a), (a = null), o(e);
        }
      })();
    });
  }
  function cD(...e) {}
  const { $bus: uD, $iframeBus: dD, $utils: hD, $shortid: pD } = app;
  dD.assign({
    init: function () {
      uD.on("iframe-bus", (e, ...t) => CD(e, ...t)),
        bD("chrome-bus", (e, ...t) => uD.send(e, ...t));
    },
    on: bD,
    once: yD,
    off: wD,
    send: CD,
    wait: async function (e) {
      return await new Promise((t) => {
        yD(e, t);
      });
    },
  });
  const mD = "__iframeBus.name",
    gD = "__iframeBus.args",
    fD = "__iframeBus.callbackId",
    vD = "undefined" != typeof parent && parent !== window;
  function bD(e, t) {
    const r = kD(e),
      n = t["__iframeBus.handlers"] || (t["__iframeBus.handlers"] = {});
    (n[e] = async (n) => {
      if (n.data["__iframeBus.name"] === r) {
        const r = n.data["__iframeBus.args"] || [],
          o = n.data["__iframeBus.callbackId"] || null,
          a = await t(...r);
        o && CD(`${e}:response-${o}`, a);
      }
    }),
      window.addEventListener("message", n[e]);
  }
  function yD(e, t) {
    bD(e, function r(...n) {
      return wD(e, r), t(...n);
    });
  }
  function wD(e, t) {
    const r = t["__iframeBus.handlers"] || (t["__iframeBus.handlers"] = {});
    window.removeEventListener("message", r[e]);
  }
  async function CD(e, ...t) {
    let r;
    const n = t[t.length - 1];
    "function" == typeof n ? ((r = n), (t = t.slice(0, -1))) : (r = null);
    const o = e.includes(":response-"),
      a = kD(e),
      i = o ? null : pD.generate();
    if (
      (vD
        ? parent.postMessage({ [mD]: a, [gD]: t, [fD]: i }, "*")
        : hD.$$("iframe").forEach((e) => {
            e.contentWindow.postMessage({ [mD]: a, [gD]: t, [fD]: i }, "*");
          }),
      !o)
    )
      return new Promise((t) => {
        const n = (o) => {
          r && r(o), wD(`${e}:response-${i}`, n), t(o);
        };
        bD(`${e}:response-${i}`, n);
      });
  }
  function kD(e) {
    return `iframe-bus.${e}`;
  }
  const { $store: SD } = app,
    ED = {},
    _D = (e) => {
      Object.keys(e).forEach((e) => (ED[e] = "*"));
    };
  Object.defineProperties(ED, {
    init: { get: () => _D },
    transaction: { get: () => SD.transaction },
  }),
    (app.$s = new Proxy(ED, {
      get: function (e, t) {
        return "init" === t || "transaction" === t
          ? ED[t]
          : "$" === t
          ? SD.state
          : SD.state[t];
      },
    }));
  const { $store: xD } = app;
  xD.action = (e, t) => ((t.type = e), (t.dispatch = PD), t);
  const PD = function (...e) {
      xD.model.dispatch(this, e);
    },
    { $store: TD, $reactRedux: ID } = app;
  TD.connect = (e) => (t) =>
    ID.connect((t, r) => e(t, r), null, null, { forwardRef: !0 })(t);
  const { $store: GD, $env: DD, $redux: AD } = app;
  GD.model = {
    store: null,
    init: function (e = {}) {
      if (((this._debug = !1), this.store)) return;
      const t = this._reduce.bind(this);
      return (
        DD.is.development && globalThis.devToolsExtension
          ? (this.store = AD.createStore(t, e, globalThis.devToolsExtension()))
          : (this.store = AD.createStore(t, e)),
        this.store
      );
    },
    get state() {
      return this.store.getState();
    },
    dispatch: function (e, t) {
      "influx.set-state" !== e.type &&
        this._debug &&
        GD.log(`dispatch "${e.type}"`),
        this.store.dispatch({ type: e.type, perform: e, payload: t });
    },
    observe: function (e, t, r = !0) {
      let n = e(this.state);
      const o = this.store.subscribe(() => {
        const r = e(this.state);
        if (r !== n) {
          const e = n;
          (n = r), t(n, e);
        }
      });
      return r && t(n, void 0), o;
    },
    _reduce: function (e = {}, t) {
      return t.perform ? t.perform(e, ...t.payload) : e;
    },
  };
  const { $store: MD } = app;
  Object.defineProperty(MD, "state", {
    get: function () {
      return MD.model.state;
    },
  });
  const { $store: FD } = app,
    RD = Symbol("isProxy"),
    LD = Symbol("isProxifiedArray");
  let BD = !1;
  function OD(e) {
    if (Array.isArray(e)) {
      const t = e.map(OD);
      return (t[LD] = !0), t;
    }
    if ("[object Object]" !== Object.prototype.toString.call(e)) return e;
    const t = { ...e },
      r = new Set(),
      n = new Proxy(t, {
        get: function (e, n) {
          if (n in t)
            return BD && !r.has(n) && ((t[n] = OD(t[n])), r.add(n)), t[n];
        },
        set: function (e, r, n) {
          return (t[r] = n), !0;
        },
        deleteProperty: function (e, r) {
          return delete t[r], !0;
        },
      });
    return (n[RD] = !0), n;
  }
  function $D(e) {
    if (e && e[LD]) return delete e[LD], e.map($D);
    if (
      (Array.isArray(e) &&
        e.forEach((t, r) => {
          t && t[RD] && (e[r] = $D(t));
        }),
      !e || !e[RD])
    )
      return e;
    const t = {};
    for (const r in e) t[r] = $D(e[r]);
    return t;
  }
  FD.safeModify = (e, t) => {
    const r = OD(e),
      n = BD;
    return (BD = !0), t(r), (BD = n), $D(r);
  };
  const { $store: ND } = app;
  ND.transaction = (e) => {
    const t = ND.safeModify(ND.state, e);
    UD.dispatch(t);
  };
  const UD = ND.action("influx.set-state", (e, t) => t),
    { $store: HD, $env: zD, $bus: jD, $s: WD } = app,
    VD = HD.action("store.syncState", (e, t) => t);
  HD.controller = {
    init: async function () {
      let e, t;
      zD.is.pp
        ? ((e = "popup"), (t = !1))
        : zD.is.bg && ((e = "background"), (t = !0)),
        (this._id = e),
        (this._currentState = null),
        (this._unsubscribe = null),
        (this._storeBatchingId = null),
        (this._primary = t),
        (this._templateState = {
          ...HD.getTemplateUserState(),
          ...HD.getTemplateSharedState(),
        }),
        jD.on("store.syncState", (e) => {
          HD.model.store && this._onStateUpdatedByPeer(e);
        }),
        zD.is.bg && jD.on("store.getPrimaryState", () => HD.state),
        await this._initState(),
        await this._subscribeToInflux(),
        zD.is.bg && (await HD.stateController.init()),
        WD.init(this._currentState);
    },
    _initState: async function () {
      if (this._primary) {
        let e = await HD.storageController.init();
        e || (e = this._templateState),
          (this._currentState = e),
          HD.model.init(e);
      } else {
        const e = await jD.send("store.getPrimaryState");
        (this._currentState = e), HD.model.init(e);
      }
    },
    _subscribeToInflux: function (e = !1) {
      let t;
      this._unsubscribe = HD.model.observe(
        (e) => e,
        (e) => {
          clearTimeout(t),
            (t = setTimeout(() => {
              const t = this._deltaState(e, this._currentState);
              (this._currentState = e),
                this._saveToStorage(e),
                jD.send("store.syncState", t);
            }));
        },
        e
      );
    },
    _onStateUpdatedByPeer: function (e) {
      this._unsubscribe && this._unsubscribe(),
        (this._currentState = { ...HD.state, ...e }),
        VD.dispatch(this._currentState),
        this._saveToStorage(this._currentState),
        this._subscribeToInflux(this._currentState !== HD.state);
    },
    _saveToStorage: function (e) {
      this._primary &&
        (this._storeBatchingId && clearTimeout(this._storeBatchingId),
        (this._storeBatchingId = setTimeout(
          () => {
            (this._storeBatchingId = null), HD.storageController.save(e);
          },
          zD.is.development || globalThis.electron ? 1e3 : 3e3
        )));
    },
    _deltaState: function (e, t) {
      const r = {};
      for (const n in e) {
        const o = e[n];
        (t && t[n] === o) || (r[n] = o);
      }
      return r;
    },
  };
  const { $store: qD, $idb: ZD } = app;
  qD.storageController = {
    init: async function () {
      this._debug = !1;
      return (await this.read()) || null;
    },
    read: async function () {
      const e = Date.now(),
        t = await ZD.get("state");
      if (!t) return null;
      const r = this._deuglify(t),
        n = Date.now() - e;
      return this._debug && qD.log(`state read in ${n}ms`), r;
    },
    save: async function (e) {
      const t = Date.now(),
        r = this._uglify(e);
      await ZD.set("state", r);
      const n = Date.now() - t;
      this._debug && qD.log(`state saved in ${n}ms`);
    },
    _uglify: function (e) {
      return btoa(encodeURIComponent(JSON.stringify(e)));
    },
    _deuglify: function (e) {
      return JSON.parse(decodeURIComponent(atob(e)));
    },
  };
  const { $store: YD } = app;
  YD.acknowledge = YD.action("state.acknowledge", (e, t) => {
    const r = Math.round(Date.now() / 1e3);
    return { ...e, acknowledged: { ...e.acknowledged, [t]: r } };
  });
  const { $store: QD } = app;
  QD.replaceState = QD.action("state.replace-state", (e, t) => t);
  const { $store: KD, $env: XD } = app;
  KD.proxy = {
    isLoggedIn: function () {
      return !!KD.state.billing.account.token;
    },
    hasPro: function ({ feature: e } = {}) {
      var t;
      return (
        !(
          !XD.is.development ||
          !(null === (t = KD.state.experiments) || void 0 === t
            ? void 0
            : t.enabled)
        ) ||
        !!this.hasProPaid() ||
        !!this.hasProPromocode() ||
        !(!e || !this.hasTrialFeature(e))
      );
    },
    hasTrialFeature: function (e = "*") {
      if (!XD.features.trial) return !1;
      const t = KD.state.billing.trial;
      if (!t) return !1;
      if ("*" === e) {
        for (e in t)
          if (
            XD.options.trialFeaturesLimits[e] &&
            XD.options.trialFeaturesLimits[e](t)
          )
            return !1;
        return !0;
      }
      return (
        !!e &&
        (!XD.options.trialFeaturesLimits[e] ||
          !XD.options.trialFeaturesLimits[e](t))
      );
    },
    hasProPaid: function (e = null) {
      if (!this.isLoggedIn()) return !1;
      const t = KD.state.billing,
        r = Date.now(),
        n = t.optimistic || { on: 0, plan: null };
      if (n.plan === e && n.on <= r && r - n.on <= 36e5) return !0;
      for (const n in XD.options.billingPlans) {
        if (e && e !== n) continue;
        const i = XD.options.billingPlans[n];
        if (i.isActive) {
          if (i.isActive(KD.state)) return !0;
        } else if ("subscription" === i.type) {
          var o;
          const e =
            (null === (o = t.subscriptions) || void 0 === o ? void 0 : o[n]) ||
            {};
          if ("active" === e.state) return !0;
          if ("canceled" === e.state && r <= e.next) return !0;
        } else if ("product" === i.type) {
          var a;
          if (
            ((null === (a = t.products) || void 0 === a ? void 0 : a[n]) || 0) >
            0
          )
            return !0;
        }
      }
      return !1;
    },
    hasProPromocode: function () {
      const e = KD.state.billing.promocode;
      if (!e) return !1;
      const t = Date.now(),
        [r, n, o] = e.split("."),
        a = new Date(`${n}-${r}-${o}`);
      return (
        a.setHours(23), a.setMinutes(59), a.setSeconds(59), a.getTime() >= t
      );
    },
    fspringExpirationDate: function (e) {
      if (!e) return null;
      const t = KD.state.billing,
        r = (t.subscriptions && t.subscriptions[e]) || {};
      return r.active && "canceled" === r.state
        ? new Date(r.next).toLocaleDateString()
        : null;
    },
    isAcknowledged: function (e) {
      return -1 !== KD.state.acknowledged[e];
    },
    userId: function () {
      return KD.state.auth.userId;
    },
    username: function () {
      return KD.state.auth.username;
    },
    sessionId: function () {
      var e;
      return (
        (null ===
          (e = (KD.state.auth.cookies || []).find(
            (e) => "sessionid" === e.name
          )) || void 0 === e
          ? void 0
          : e.value) || null
      );
    },
    allUsernames: function () {
      const e = KD.state,
        t = [],
        r = (e) => t.push(e.auth.username);
      r(e);
      for (const t in e.userStates) r(e.userStates[t]);
      return t;
    },
  };
  const { $store: JD } = app;
  JD.getQuickReplies = () =>
    "Hello {@name}! üëã\n\n\n  {Thank you|Thanks} {@name}! üôè\n\n\n  /tnx follow\n  {Hi|Hey|Hello|Greetings} {@name}! Thank you so much for following! Feel free to send me a DM!\n\n\n  /tnx contact\n  {Thank you for contacting us.|Thank you for reaching out to us.|Thank you for contacting us here.} {We have received your message and will be in touch shortly.|We will be in touch shortly, and you may also find answers to some of your questions on our FAQ page.|We will be in touch soon.}\n\n\n  /sorry missed\n  Hi {@name}! I am sorry I missed your message. I will get back to you as soon as possible. I look forward to speaking with you!\n\n\n  /ask feedback\n  {Hi|Hello|Hey|Greetings}! Just wanted to follow back with you and check how you find the product? Feel free to send me your feedback, suggestions or ideas.\n\n\n  /tmm\n  Thank you for contacting us. Due to an unusual level of activity, responses are delayed. We anticipate responding to your message within two business days. In the meantime, please feel free to reach out to us via email with any urgent needs or requests.\n  "
      .split("\n")
      .map((e) => e.trim())
      .join("\n");
  const { $store: eA } = app;
  eA.getTemplateSharedState = () => ({
    installedAt: Date.now(),
    installedEventSent: !1,
    isAfterTheEndUser: !0,
    userStates: {},
    experiments: { enabled: !1 },
    abTesting: { hash: Math.random(), wideScreenState: null },
    multiaccount: { userIds: [], selectedUserId: null, addingNewAccount: !1 },
    welcome: { shown: !0 },
    sidebar: { selectedTabId: null, isOpen: !1 },
    igView: {
      fullscreen: !1,
      fullscreenWidth: 460,
      withBorder: !0,
      creationCardShown: !1,
    },
    quickReplies: { shown: !1, content: eA.getQuickReplies(), total: 7 },
    settings: { laterAutoRetry: -1 },
    tagAssist: {
      shown: !1,
      query: "",
      tagMetricsUpsellDismissed: !1,
      searching: !1,
      latinOnly: !1,
      errorCode: null,
      selectedTabId: "search",
      selectedGroupId: "low",
      igSelectedTags: [],
      fcsSelectedTags: [],
      sidebarSelectedTags: [],
      sidebarSelectedTagsAsText: "",
      lastDayUsedOn: null,
      ladderEngagementSort: null,
      summaryEngagementSort: null,
      ladderPostCountSort: null,
      summaryPostCountSort: null,
      lastTagScanOn: null,
      accountStats: {},
      ladder: null,
      ladderLoadingTags: [],
      ladderConfig: {
        lastUpdateOn: Date.now(),
        tiers: { low: 0.7, medium: 1.5, high: 5 },
      },
      collections: [],
      newCollection: { name: "", text: "", showForm: !1 },
      collectionsTagData: {},
      collectionsLoadingTags: [],
    },
    acknowledged: {
      upsell: -1,
      postLimitations: -1,
      storyLimitations: -1,
      tosSummary: -1,
      scheduleTip: -1,
      scheduleDndTip: -1,
      followUs: -1,
      rateUs: -1,
      theEnd: -1,
    },
    followUs: { shown: !1 },
    rateUs: { shown: !1, rate: null },
    whatsNew: eA
      .getWhatsNewItems()
      .map((e) => ({ id: e.id, acknowledged: !0 })),
    userDetails: {},
    billing: {
      navigation: { isBodyOpen: !1 },
      discount: { availableTill: -1, showSnackbarMessage: !1 },
      account: { email: null, token: null },
      recordedUsernames: [],
      promocode: null,
      recentFeature: null,
      trial: {
        installedOn: Date.now(),
        dmAdvanced: 0,
        schedule: 0,
        later: 0,
        insights: 0,
        analytics: 0,
        coverAssist: 0,
        musicAssist: 0,
        tagAssist: 0,
        storyAssist: 0,
        addLinkToStory: 0,
        repost: 0,
        reels: 0,
        ghostStoryView: 0,
        postsPublished: 0,
        storiesPublished: 0,
        dmsSent: 0,
      },
      optimistic: null,
      subscriptions: {},
      products: {},
      orders: [],
      selectedPlan: null,
      purchasingPlan: null,
      countryIso: null,
      pricing: null,
      snapshot: {},
      verificationCodeEmail: null,
    },
  });
  const { $store: tA } = app;
  tA.getTemplateUserState = () => ({
    version: 258,
    auth: {
      userId: null,
      username: null,
      fullName: null,
      email: null,
      avatarUrl: null,
      loggedIn: !1,
      cookies: [],
    },
    coverAssist: {
      shown: !1,
      loading: !0,
      videoUrl: null,
      coverUrl: null,
      selectedTabId: "auto",
      showGrid: !1,
      gridImages: [],
      frameGalleryImages: [],
      frameGallerySelectedImage: null,
      frameSelectImage: null,
      frameSelectValue: null,
      frameUploadImage: null,
    },
    musicAssist: {
      shown: !1,
      videoUrl: null,
      videoVolume: 0,
      musicVolume: 0.5,
      videoCurrentTime: 0,
      categoryIdsOrder: [],
      selectedCategoryId: 0,
      selectedTrackId: null,
      selectedTrackStart: 0,
      customTrack: null,
      showUpsellOverlay: !1,
      isStory: !1,
    },
    storyAssist: {
      shown: !1,
      isVideo: !1,
      selectedTabId: "later",
      showUpsellOverlay: !1,
      coverUrl: null,
      mentions: { query: "", foundUsers: [], selectedUsers: [] },
    },
    ghostStoryView: { enabled: !1, lastUsedOn: null, showUpsellOverlay: !1 },
    dm: { ghostModeEnabled: !0, ghostModeFailed: !1 },
    reels: { creating: !1 },
    igTask: { actionBlockCode: null, followStatus: {}, likeStatus: {} },
    later: {
      showGrid: !1,
      showUpsell: !1,
      showBodyPanel: !1,
      showAssistPanel: !1,
      selectedUserId: null,
      selectedPostId: null,
      selectedPillId: null,
      selectedIgDate: null,
      errors: [],
      lastDate: null,
      processing: !1,
      timeSlots: [
        { time: 288e5 },
        { time: 468e5 },
        { time: 576e5 },
        { time: 72e6 },
      ],
      calendar: { periodType: "month", periodStart: Date.now(), showSlots: !0 },
      dnd: {
        dragPostId: null,
        dragOverPostId: null,
        dragOverDay: null,
        dragOverTime: null,
      },
      ig: { loading: !1, error: null, updatedAt: -1, posts: [] },
      posts: [],
    },
    inspiration: { posts: [] },
    bulk: {
      saving: !1,
      selectedPostIds: [],
      activeActionId: null,
      actions: {},
      dateDialog: {
        show: !1,
        selectedTypeId: "interval",
        startingDay: {
          selectedTypeId: "today",
          periodStart: null,
          selectedDay: null,
        },
        calendar: {
          periodStart: null,
          selectedDay: null,
          selectedSlotTime: null,
          customTime: null,
          errorMessage: null,
        },
        interval: { frequency: "1:1", timeList: [] },
        week: {
          selectedDays: [],
          selectedSlotTime: null,
          customTime: null,
          dayErrorMessage: null,
          timeErrorMessage: null,
        },
        timeSlots: { errorMessage: null },
      },
    },
  });
  const { $store: rA } = app;
  rA.getWhatsNewItems = () => [
    {
      id: "v25.1.0",
      header: "Carousels Post Later",
      subheader: "v25.1.0",
      hexImage: "hex-schedule",
      content: [
        "Upload or drag & drop multiple files to Post Later to schedule them for posting as a carousel.",
      ],
    },
    {
      id: "v25.0.0",
      header: "Advanced Post Later",
      subheader: "v25.0.0",
      hexImage: "hex-schedule",
      content: [
        "Improved Post Later interface and auto-publishing stability. Manage multiple accounts in Post Later interface seamlessly. Bulk upload files for scheduling.",
      ],
    },
    {
      id: "v24.0.0",
      header: "Post Later",
      subheader: "v24.0.0",
      hexImage: "hex-schedule",
      content: [
        "INSSIST now supports Delayed Posting for Posts, Photo and Video Stories and Reels. Facebook account is not required to schedule posts with delayed posting.",
      ],
    },
    {
      id: "v23.6.0",
      header: "Fixes and Future Plans",
      subheader: "v23.6.0",
      hexImage: "hex-schedule",
    },
    {
      id: "v23.3.0",
      header: "Major Functionality Fixes",
      subheader: "v23.3.0",
      hexImage: "hex-bug",
      content: [
        "Restored all app functions broken due to recent changes introduced by Instagram update to internal data and media handling systems.",
      ],
    },
    {
      id: "v23.1.0",
      header: "Instagram Update Bug Fixes",
      subheader: "v23.1.0",
      hexImage: "hex-bug",
      content: [
        "Fixed a number of bugs introduced by Instagram in the recent mobile and desktop app update: reels failed to be published through instagram.com, posted videos were duplicated under reels tab and showing with a wrong icon, restored search panel functionality of the explore page, and other improvements and fixes.",
      ],
    },
    {
      id: "v23.0.0",
      header: "Ghost View Mode for Stories",
      subheader: "v23.0.0",
      hexImage: "hex-ghost",
      content: [
        "Switch to a Ghost View Mode and watch stories anonymously. Story owner won‚Äôt know if you watched their story.",
      ],
    },
    {
      id: "v22.0.0",
      header: "Story Assist",
      subheader: "v22.0.0",
      hexImage: "hex-story",
      content: [
        "Added user tagging feature in stories, fixed avatars rendering Instagram bug, fixed reels API connectivity and other issues.",
      ],
    },
    {
      id: "v21.1.0",
      header: "Improvements and Bug Fixes",
      subheader: "v21.1.0",
      hexImage: "hex-update",
      content: [
        "Fixed custom video covers and music file uploads to fail in certain scenarios. Styling and usability improvements in the app. Fixed tooltips rendering in the IG frame. Fixed app rendering artifacts on slow Internet connection and more.",
      ],
    },
    {
      id: "v21.0.0",
      header: "Posting Functionality Restored",
      subheader: "v21.0.0",
      hexImage: "hex-bug",
      content: [
        "Restored posting functionality and fixed problems caused by the IG platform overhaul.",
        "Improved app stability, dark theme, custom cover feature, videos autoplay on carousels and fixed multiple bugs.",
      ],
    },
    {
      id: "v20.2.0",
      header: "Reels Improvements",
      subheader: "v20.2.0",
      hexImage: "hex-bug",
      content: [
        "Added support for locations and people mentions (tagging) on Reels posting.",
        "Fixed original audio automatically muted by Chrome v100. Fixed followers and followings not showing up correctly in the wide mode. Fixed DM not showing DM folders.",
      ],
    },
    {
      id: "v20.1.0",
      header: "Bug Fixing",
      subheader: "v20.1.0",
      hexImage: "hex-bug",
      content: [
        "Fixed scheduling connection setup, fixed isolation policy error, improved reels posting, post management error handling and usability.",
      ],
    },
    {
      id: "v20.0.0",
      header: "Music",
      subheader: "v20.0.0",
      hexImage: "hex-music",
      content: [
        "Add music or upload your tracks to Reels, Stories and Videos. Royalty-free music is provided by tunetank.com.",
      ],
    },
    {
      id: "v19.0.0",
      header: "Quick Replies in DM",
      subheader: "v19.0.0",
      hexImage: "hex-dm",
      content: [
        "Send Quick Replies in chats by typing / symbol followed by reply shortcut. Configure an unlimited number of replies for business or personal use.",
        "Inssist Quick Replies support template messages and @name, @username variables.",
      ],
    },
    {
      id: "v18.0.9",
      header: "Bug Fixing",
      subheader: "v18.0.9",
      hexImage: "hex-bug",
      content: [
        "Fixed Instagram bug that caused a blank screen to load for some users. Fixed Zen mode, story mentions and other issues.",
      ],
    },
    {
      id: "posting-from-website",
      header: "Posting from website",
      subheader: "v18.0.0",
      hexImage: "hex-igswiss",
    },
    {
      id: "v17.3.0",
      header: "60s Reels",
      subheader: "v17.3.0",
      hexImage: "hex-reels",
      content: [
        "Inssist can now post Reels of up to 60s long, up from 30s before.",
        "CSV import now supports ‚Äúmultiline \\n captions‚Äù and break lines with \\n symbols.",
        "This release improves posting stability.",
      ],
    },
    {
      id: "v17.0.0",
      header: "Bulk & CSV Scheduling",
      subheader: "v17.0.0",
      hexImage: "hex-schedule",
      content: [
        "Added ‚ÄúBULK‚Äù section to the Scheduling module that supports applying bulk commands: scheduling, drafting, deleting posts.",
        "You can now reschedule posts across time-slots or intervals with a few clicks and edit captions of all scheduled posts from a single screen.",
        "Inssist now knows how to parse CSV files so that you can drag and drop those and schedule posts even faster.",
        "Scheduling interface has been significantly speed up comparing to the previous versions.",
      ],
    },
    {
      id: "macos",
      header: "Experimental MacOS version",
      subheader: "v15.2.3",
      hexImage: "hex-macos",
    },
    {
      id: "v15.1.0",
      header: "Usability & Bug Fixes",
      subheader: "v15.1.0",
      hexImage: "hex-bug",
      content: [
        "Post Assistant now supports custom aspect ratios for images in addition to default square, portrait and landscape ones.",
        "Fix for the Instagram ‚Äúvideo failed to post‚Äù and other bugs.",
      ],
    },
    {
      id: "v15.0.3",
      header: "Bug Fixing",
      subheader: "v15.0.3",
      hexImage: "hex-bug",
      content: [
        "Fixed missing delete button in Post Assistant. Fixed dark theme Reels $ui. Fixed ‚ÄúPost did not upload‚Äù video publishing issue.",
      ],
    },
    {
      id: "reels",
      header: "Reels",
      subheader: "v15.0.0",
      hexImage: "hex-reels",
      content: [
        "Inssist can now post Reels! It ensures the best quality and does not compress your videos.",
        "Instagram Reels is a short-video format, similar to TikTok. Instagram platform limits Reels to 50 countries, including the United States.",
        "Posting Reels is a PRO feature, and you can repost Reels from other accounts and apply custom covers with Inssist.",
      ],
    },
    {
      id: "v13.1.0",
      header: "Hashtag Collections",
      subheader: "v13.1.0",
      hexImage: "hex-tag",
      content: [
        "Now you can create and manage your Hashtag collections with Inssist.",
      ],
    },
    {
      id: "v11.5.0",
      header: "Lifetime Deal",
      subheader: "v11.5.0",
      hexImage: "hex-lifetime",
      content: [
        "Claim your Inssist PRO Lifetime Deal!",
        "Now you can get Inssist PRO license for life with a one time purchase, before only a monthly subscription option was available.",
        "For businesses managing many accounts there is a special Infinite plan. Check it out!",
      ],
    },
    {
      id: "v11.2.0",
      header: "Swipe Up",
      subheader: "v11.2.0",
      hexImage: "hex-swipe-up",
      content: [
        "Swipe Up feature (adding links to stories) is now available for accounts of more than 10k followers.",
      ],
    },
    {
      id: "v11.1.0",
      header: "Editing Captions",
      subheader: "v11.1.0",
      hexImage: "hex-caption",
      content: [
        "This version brings support for editing posts. You can now edit posts and update post captions after they are published without a need to connect to Facebook API.",
      ],
    },
    {
      id: "v11.0.0",
      header: "Video Thumbnails / Covers",
      subheader: "v11.0.0",
      hexImage: "hex-video",
      content: [
        "Version 11 brings support for covers to video posting.",
        "Whenever you upload a video to post you can choose a thumbnail from a list of auto-generated covers, a specific video frame or even upload a custom image to be used.",
        "You can also preview your Instagram grid with the selected cover before posting.",
      ],
    },
    {
      id: "v10.1.0",
      header: "Zen Mode",
      subheader: "v10.1.0",
      hexImage: "hex-zen",
      content: [
        "Make your Instagram browsing experience cleaner with the new Zen mode.",
        "Switch Instagram home feed into Zen hides post captions and comments on the posts. Give it a try!",
        "This release also fixes a number of bugs, making posting Stories more stable in particular.",
      ],
    },
    {
      id: "v10.0.1",
      header: "Share Post to Story",
      subheader: "v10.0.1",
      hexImage: "hex-story",
      content: [
        "Version 10 brings support for sharing any post to your story in a few clicks.",
        "Locate a share icon below any post, video or photo, click it and select ‚ÄúShare to Story‚Äù. A photo will then be shared to your story.",
        "This feature is free. Enjoy!",
      ],
    },
    {
      id: "v10.0.0",
      header: "Bug Fixing",
      subheader: "v10.0.0",
      hexImage: "hex-bug",
      content: [
        "Fixed comments scrolling caused the app to refresh the page.",
        "Post Assistant now supports uploading and previewing posts in a grid without a Facebook API connection.",
        "Changed the dark theme background not to be so dark. Redesigned side bar and Facebook API connection setup dialogs.",
        "And a host of other improvements and stability enhancements under the hood.",
      ],
    },
    {
      id: "v9.0.0",
      header: "Bulk Scheduling",
      subheader: "v9.0.0",
      hexImage: "hex-ship",
      content: [
        "Inssist Scheduling now supports uploading multiple photos at once to speed up posting.",
        "You can also drag & drop photos and videos from the system to Inssist to schedule or publish them.",
        "Scheduling engine has been significantly improved to support bulk upload and future improvements coming down the line.",
      ],
    },
    {
      id: "v8.9.1",
      header: "Bug Fixing & Usability",
      subheader: "v8.9.1",
      hexImage: "hex-bug",
      content: [
        "Stories uploaded with Inssist are now uploaded in the best quality possible.",
        "Fixed internal bugs and improved DM module stability.",
      ],
    },
    {
      id: "v8.8.5",
      header: "Bug Fixing & Usability",
      subheader: "v8.8.5",
      hexImage: "hex-bug",
      content: [
        "Inssist now prevents Instagram from blurring photos when switching between screen modes.",
        "Inssist now shows @usernames upon hovering over accounts in multiaccount box.",
        "Increased DM text input size, fixed elements positioning on Instagram authorization screen, fixed wordings across the application and other improvements.",
        "Added support for sending debug reports if Inssist fails to connect Scheduling.",
      ],
    },
    {
      id: "v8.6.0",
      header: "Scheduling patch",
      subheader: "v8.6.0",
      hexImage: "hex-bug",
      content: [
        "Fixed a bug preventing scheduling connection setup to reliably connect Instagram account to Scheduling API.",
        "Fixed a cross-posting bug preventing Facebook Page selection from rendering.",
        "Fixed sending post from the home feed to Direct Messages. Other internal fixes.",
      ],
    },
    {
      id: "v8.5.1",
      header: "Story and Scheduling fixes",
      subheader: "v8.5.1",
      hexImage: "hex-bug",
      content: [
        "Improved aspect ratio detection on stories: video stories should upload to Instagram more reliably.",
        "Uploaded stories now have the first frame selected as a cover rather than a random one.",
        "Fixed Infinite Loading loop bug on scheduling.",
      ],
    },
    {
      id: "v8.5.0",
      header: "Story Improvements",
      subheader: "v8.5.0",
      hexImage: "hex-bug",
      content: [
        "Photo Stories are no longer cut in preview when they do not fit the aspect ratios. Inssist now detects and warns about unsupported Video Story lengths: shorter than 1 second and longer than 15 seconds. Other internal improvements.",
      ],
    },
    {
      id: "v8.4.0",
      header: "Story Mentions",
      subheader: "v8.4.0",
      hexImage: "hex-mentions",
      content: [
        "Support for @mentions (account tagging) has arrived for photo stories. This is a free feature available on all plans.",
      ],
    },
    {
      id: "v8.3.0",
      header: "Bug Fixing",
      subheader: "v8.3.0",
      hexImage: "hex-bug",
      content: [
        "Added mouse scroll to stories panel. Added photo upload spinner during posting.",
        "Fixed modal windows positioning bug in Instagram. Fixed tab buttons spacing on Instagram profile page.",
      ],
    },
    {
      id: "v8.2.1",
      header: "Bug Fixing",
      subheader: "v8.2.1",
      hexImage: "hex-bug",
      content: [
        "Fixed excess image rotation on new and scheduled posts.",
        "Fixed a black screen scheduling state bug caused by selecting a Custom Time interval.",
      ],
    },
    {
      id: "v8.2.0",
      header: "Facebook Cross-Posting",
      subheader: "v8.2.0",
      hexImage: "hex-schedule",
      content: [
        "If your Instagram @account is connected to a custom Facebook Page, Inssist will let you clone posts to that Facebook Page during scheduling.",
      ],
    },
    {
      id: "v8.1.0",
      header: "Scheduling Performance",
      subheader: "v8.1.0",
      hexImage: "hex-schedule",
      content: [
        "Over the past few weeks we have redesigned and rebuilt Scheduling engine from ground-up, making it far more stable and performing much better than before. Give it a try!",
        "A few User Interface fixes are delivered with this update.",
      ],
    },
    {
      id: "v8.0.0",
      header: "Multiaccount Support",
      subheader: "v8.0.0",
      hexImage: "hex-multiaccount",
      content: [
        "Got more than one Instagram account? Connect them all to Inssist and seamlessly switch between them without a need to relogin. Handy!",
      ],
    },
    {
      id: "v6.2.0",
      header: "Wide Screen",
      subheader: "v6.2.0",
      hexImage: "hex-monitor",
      content: [
        "Wide screen mode has been redesigned with images taking more space and page layouts improved.",
      ],
    },
    {
      id: "v6.1.0",
      header: "Bug Fixing",
      subheader: "v6.1.0",
      hexImage: "hex-bug",
      content: [
        "Stories can now be scrolled with LEFT / RIGHT keys and exited with ESC key. Fixed polls styling on stories in dark theme.",
        "Fixed videos playing sound for a split second upon navigation within plugin. Fixed an Instagram bug with videos refusing to playing on click.",
        "Fixed Scheduling incorrectly ordering posts upon updating post caption. Improved Scheduling interface buttons styling.",
        "Plugin URL now contains Instagram page URL for quick navigation.",
        "Direct Messages no longer marked as read while DM module is hidden. Fixed DM module buttons overlap. Clicking Back button no longer causes navigation in Direct Messaging module. Videos sent in Direct Messages can now be viewed in a separate tab.",
      ],
    },
    {
      id: "v6.0.1",
      header: "Carousels",
      subheader: "v6.0.1",
      hexImage: "hex-carousel",
      content: [
        "Inssist now supports carousel posts through the Post Assistant. Check it out!",
        "Multiaccount support is coming next!",
      ],
    },
    {
      id: "v6.0.0",
      header: "Scheduling",
      subheader: "v6.0.0",
      hexImage: "hex-schedule",
      content: [
        "Scheduling now supports drag&drop operations both on Grid and Calendar. Scheduling is out of Beta and has been substantially improved, debugged and redesigned.",
      ],
    },
    {
      id: "v5.0.1",
      header: "Bug Fixing",
      subheader: "v5.0.1",
      hexImage: "hex-bug",
      content: [
        "Fixed Instagram bug when adding multiline text on stories caused Instagram UI to break. Captions containing emojis are no longer cut off.",
      ],
    },
    {
      id: "v4.0.5",
      header: "Bug Fixing",
      subheader: "v4.0.5",
      hexImage: "hex-bug",
      content: [
        "A ton of bug fixes and improvements:",
        "You can now send DMs to any account without following them first. Images in DM module are no longer cropped and take all available space.",
        "Added a button to open image in a new tab in DM module. Requests tab in DM no longer overflows the new DM button and DM actions tooltips is no longer cut off. Fixed fonts in DM module.\n",
        "Added ‚ÄúOpen in Inssist‚Äù button on Instagram website. Added DM US button to reach out to us quickly. Icons in side bar no longer overlap on small screens.",
        "Fixed ‚Äúshow more‚Äù button on post captions and other small fixes across $ui.",
      ],
    },
    {
      id: "v4.0.0",
      header: "Direct Messages",
      subheader: "v4.0.0",
      hexImage: "hex-dm",
      content: [
        "Psst‚Ä¶ Check out the brand new Direct Messages panel on the left. You can now send DMs while having the Instagram view on the right simultaneously. Handy! üíå",
        "The next feature we‚Äôre working on is Scheduling drag & drop support.",
      ],
    },
    {
      id: "v3.1.0",
      header: "Bug fixing",
      subheader: "v3.1.0",
      hexImage: "hex-bug",
      content: [
        "Bug fixes and improvements: fixed emojis ü§ß in the dark theme, better scheduling setup logic and setup errors interception, permissions verification screen, scheduling migrated onto optimistic transactions mechanism, image pre-caching and scheduling loading speed-up, fixed IGTV screen and UI cleanup.",
      ],
    },
    {
      id: "v3.0.0",
      header: "Dark Mode",
      subheader: "v3.0.0",
      hexImage: "hex-moon",
      content: [
        "Join the Dark Side! Switch Inssist to Dark mode which is less strenuous on your beautiful üëÄ with a click of a button. Instagram web interface has been thoroughly restyled to Dark mode as well.",
      ],
    },
    {
      id: "v2.3.0",
      header: "Calendar and Time Slots",
      subheader: "v2.3.0",
      hexImage: "hex-schedule",
      content: [
        "Configure Time Slots to schedule posts efficiently. Browse posts in a weekly and monthly post calendars. Fixed scheduling setup, auto-logout and freezing bugs.",
      ],
    },
    {
      id: "v2.2.0",
      header: "Scheduling Usability",
      subheader: "v2.2.0",
      hexImage: "hex-schedule",
      content: [
        "Added scheduling time & date selection calendar. Improved Posts Grid performance. Fixed scheduling connection setup problems.",
      ],
    },
    {
      id: "v2.1.0",
      header: "Scheduling Beta",
      subheader: "v2.1.0",
      hexImage: "hex-schedule",
      content: [
        "Scheduling has arrived.",
        "Upload photos, videos, IGTVs and carousel posts. Preview them in a grid, save as draft, publish or schedule for auto-publish.",
        "Scheduled media are published automatically, no need to install extra software, Inssist handles auto-publish for you even if you are offline.",
        "Scheduling is currently available through our Beta program. You can enable Beta features for free by sharing a word about Inssist.",
        "All bug reports and feature requests are welcomed at inssist@slashed.io  üêúüêúüêú",
      ],
    },
    {
      id: "v1.6.0",
      header: "IGTV Support",
      subheader: "v1.6.0",
      hexImage: "hex-igtv",
      content: [
        "Plugin now supports uploading IGTV videos.",
        "To publish IGTV, simply upload a video as you would normally do. If the video is longer than 1 minute, Inssist will present an IGTV video upload interface to you.",
      ],
    },
    {
      id: "v1.3.0",
      header: "Relevant Hashtags",
      subheader: "v1.3.0",
      hexImage: "hex-tag",
      content: ["Inssist now suggests relevant hashtags. Try it out!"],
    },
    {
      id: "v1.2.2",
      header: "Bug fixing",
      subheader: "v1.2.2",
      hexImage: "hex-bug",
      content: [
        "Fixed ‚ÄúInstagram.com refused to connect‚Äù issue. If you still experience ‚ÄúInstagram.com refused to connect‚Äù error, please try to relogin to Instagram.com from a separate browser tab and reinstall Inssist from get.inssist.com.",
        "Fixed video playback jittering.",
      ],
    },
    {
      id: "v1.2.0",
      header: "Autoplay for Videos",
      subheader: "v1.2.0",
      hexImage: "hex-update",
      content: [
        "Videos on the feed will now autoplay (muted) when scrolled into the view. Clicking videos un-mutes them.",
        "Improved posting screen usability, stability and bundle size.",
      ],
    },
    {
      id: "v1.1.0",
      header: "Usability Improvements",
      subheader: "v1.1.0",
      hexImage: "hex-update",
      content: [
        "Text inside the Instagram view can now be selected and copied to clipboard.",
        "Posting photos and videos now supports locations tagging.",
        "Fixed issue with instagram.com not connecting after navigation to direct messages.",
        "Fixed issue with opening facebook.com links from DM messages caused a browser page error.",
        "Pressing Enter in DM screen now sends the message right away.",
        "Other miscellaneous usability improvements.",
      ],
    },
    {
      id: "v0.9.12",
      header: "Bug fixing & Performance",
      subheader: "v0.9.12",
      hexImage: "hex-bug",
      content: [
        "Extension rebranded to Inssist.",
        "Loading and rendering speed improved. Fixed an issue when replying to comments rendered an unnecessary actions popup.",
      ],
    },
    {
      id: "v0.9.5",
      header: "Improved Image Quality",
      subheader: "v0.9.5",
      hexImage: "hex-quality",
      content: [
        "Landscape and Portrait photos now retain high image quality when uploaded with the plugin.",
      ],
    },
    {
      id: "v0.9.2",
      header: "Video Support",
      subheader: "v0.9.2",
      hexImage: "hex-video",
      content: ["Plugin now supports Video uploads."],
    },
    {
      id: "v0.8.9",
      header: "Stickers and Markers Support",
      subheader: "v0.8.9",
      hexImage: "hex-marker",
      content: ["Stories can now be uploaded with stickers and markers."],
    },
    {
      id: "v0.8.3",
      header: "Improved UI",
      subheader: "v0.8.3",
      hexImage: "hex-bug",
      content: [
        "User profile, stories reel and other parts of user interface and user experience were improved. Fixed stories viewer not showing stories on a first click.",
      ],
    },
    {
      id: "v0.8.0",
      header: "Basic version",
      subheader: "v0.8.0",
      hexImage: "hex-igswiss",
      content: [
        "Plugin now supports photos and stories upload and direct messages.",
      ],
    },
  ];
  const {
      $auth: nA,
      $store: oA,
      $bus: aA,
      $later: iA,
      $utils: sA,
      $iframeBus: lA,
      $analytics: cA,
      $ui: uA,
    } = app,
    dA = ({ state: e }) => ({
      ...(e.disableHover && {
        pointerEvents: "none !important",
        "& *": { pointerEvents: "none !important" },
      }),
    });
  class hA extends uA.Component {
    constructor(e) {
      super(e),
        pA.call(this),
        (this.state = { loggedInStatus: null, disableHover: !1 });
    }
    componentDidMount() {
      aA.on("auth.refreshed", this._dropLoggedInStatus),
        lA.on("ig.ready", this._dropDisableHover);
    }
    componentWillUnmount() {
      aA.off("auth.refreshed", this._dropLoggedInStatus),
        lA.off("ig.ready", this._dropDisableHover);
    }
    render() {
      const e = this.props;
      return e.hidden
        ? null
        : Glamor.createElement(uA.AccountSwitcher, {
            style: dA(this),
            accounts: e.accounts.map((t) => {
              const r = t.userId === e.selectedUserId && !e.addingNewAccount;
              let n = !0;
              return (
                r &&
                  (n =
                    null === this.state.loggedInStatus
                      ? e.loggedIn
                      : this.state.loggedInStatus),
                {
                  id: t.userId,
                  name: `@${t.username}`,
                  avatarUrl: t.avatarUrl,
                  selected: r,
                  loggedIn: n,
                }
              );
            }),
            backgroundColor: this.props.backgroundColor,
            addingNewAccount: this.props.addingNewAccount,
            onSwitchAccountClick: this._onSwitchAccountClick,
            onAddAccountClick: this._onAddAccountClick,
            onDisconnectAccountClick: this._onDisconnectAccountClick,
          });
    }
    async _logout() {
      this.setState({ loggedInStatus: !1 }), aA.send("auth.logout");
    }
    async _login(e) {
      this.setState({ loggedInStatus: !0 }), aA.send("auth.login", e);
    }
  }
  var pA = function () {
    (this._onSwitchAccountClick = async (e) => {
      const t = this.props,
        r = t.accounts.find((t) => t.userId === e);
      if (
        (this.setState({ disableHover: !0 }),
        cA.controller.sendEvent("user", "multiaccount:switch"),
        oA.transaction((t) => {
          (t.multiaccount.addingNewAccount = !1),
            (t.multiaccount.selectedUserId = e);
        }),
        t.loggedIn)
      ) {
        const e = await lA.send("ig.get-url"),
          n = e.split("/")[1].split("?")[0];
        if (
          n === t.accounts.find((e) => e.userId === t.selectedUserId).username
        ) {
          const t = e.replace(n, r.username);
          await aA.send("auth.setIgInitialUrl", t);
        }
      }
      this._login(e);
    }),
      (this._onAddAccountClick = async () => {
        this.setState({ disableHover: !0 }),
          oA.transaction((e) => {
            e.multiaccount.addingNewAccount = !0;
          }),
          this._logout();
      }),
      (this._onDisconnectAccountClick = (e) => {
        const t = this.props.selectedUserId === e;
        if (t && this.props.loggedIn)
          return (
            oA.transaction((e) => (e.auth.cookies = [])),
            this.setState({ disableHover: !0 }),
            void this._logout()
          );
        let r;
        oA.transaction((t) => {
          const n = t.multiaccount.userIds;
          sA.removeFromArray(n, e), (r = n[n.length - 1] || null);
        }),
          oA.transaction((t) => {
            (t = iA.proxy.getUserState(t, e)).later.posts.forEach(
              (e) => (e.status = "draft")
            );
          }),
          t &&
            r &&
            (oA.transaction((e) => {
              e.multiaccount.selectedUserId = r;
            }),
            this.setState({ loggedInStatus: !0 }),
            this.setState({ disableHover: !0 }),
            this._login(r));
      }),
      (this._dropLoggedInStatus = () => {
        this.setState({ loggedInStatus: null });
      }),
      (this._dropDisableHover = () => {
        this.setState({ disableHover: !1 });
      });
  };
  nA.AccountSwitcherMediator = oA.connect((e) => ({
    hidden: e.welcome.shown,
    loggedIn: e.auth.loggedIn,
    selectedUserId: e.multiaccount.selectedUserId,
    addingNewAccount: e.multiaccount.addingNewAccount,
    accounts: e.multiaccount.userIds
      .map((t) => {
        const r = e.userStates[t] || e;
        if (!r.auth.loggedIn) return null;
        if (r.auth.userId !== t) return null;
        const n = r.auth;
        return {
          userId: n.userId,
          username: n.username,
          avatarUrl: n.avatarUrl,
        };
      })
      .filter(Boolean),
  }))(hA);
  const { $igApi: mA } = app;
  mA.ec = {
    noNetwork: "no-network",
    timedOut: "timed-out",
    redirectToLogin: "redirect-to-login",
    suspended: "suspended-400",
    missingPost: "missing-post-400x",
    missingUser: "missing-user",
    forbidden: "forbidden-403",
    notFound: "not-found-404",
    tooManyRequests: "too-many-requests-429",
    serverIsDown: "server-is-down-500",
    badGateway: "bad-gateway-502",
    serviceUnavailable: "service-unavailable-503",
    serviceDown: "service-down-560",
    other: "other",
  };
  const { $igApi: gA, $sentry: fA } = app,
    vA = gA.ec,
    bA = {
      "Failed to fetch": vA.noNetwork,
      "Timed out": vA.timedOut,
      "Redirect to login": vA.redirectToLogin,
      "Missing user": vA.missingUser,
      400: vA.suspended,
      "400x": vA.missingPost,
      403: vA.forbidden,
      404: vA.notFound,
      429: vA.tooManyRequests,
      500: vA.serverIsDown,
      502: vA.badGateway,
      503: vA.serviceUnavailable,
      560: vA.serviceDown,
    };
  gA.Response = class e {
    constructor(e, t, r, n) {
      (this.result = e),
        (this.error = t ? { code: t, message: r, body: n } : null);
    }
    isSuccess() {
      return !this.error;
    }
    reportError(e, t) {
      return (
        this.error.code === vA.other &&
          fA.controller.sendError(
            `ig-api.${e}: unknown error`,
            "error",
            { details: t },
            { actor: "ig-api" }
          ),
        this
      );
    }
    static ofResult(t) {
      return new e(t);
    }
    static ofNetworkError(t) {
      t &&
        t.message &&
        "400" === t.message &&
        ((t && "missing media" === t.body) ||
          (t && "Sorry, this photo has been deleted" === t.body)) &&
        (t.message = "400x");
      const r = (t && t.message && bA[t.message]) || vA.other,
        n = (t && t.message) || null,
        o = (t && t.body) || null;
      return new e(null, r, n, o);
    }
  };
  const {
      $igApi: yA,
      $bus: wA,
      $utils: CA,
      $fetcher: kA,
      $constants: SA,
    } = app,
    EA = { headers: { "x-ig-app-id": "1217981644879628" } };
  async function _A() {
    try {
      return await (async function () {
        kA.ignoreCache();
        const e = (await kA.fetchText("https://instagram.com"))
          .split("\n")
          .find((e) => e.includes("is_professional_account"));
        if (!e) return null;
        const t = e
            .split("XIGSharedData")[1]
            .replaceAll('\\"', '"')
            .replaceAll("\\/", "/")
            .replaceAll("\\u", "u"),
          r = (e, r = "string") => {
            try {
              let n;
              return (
                "string" === r
                  ? (n = t.split(`"${e}":"`)[1].split('"')[0])
                  : "bool" === r &&
                    ((n = t.split(`"${e}":`)[1].split(",")[0]),
                    (n = "false" !== n)),
                n
              );
            } catch (t) {
              return console.error(`Failed to extract "${e}"`, t), null;
            }
          };
        let n = r("profile_pic_url");
        n && (n = n.replaceAll("\\u0026", "&"));
        const o = r("appScopedIdentity") || r("id") || r("viewerId");
        if (!o) throw new Error("failed to fetch viewer id");
        return {
          userId: o,
          username: r("username"),
          fullName: r("full_name"),
          email: null,
          avatarUrl: n,
          isProfessionalAccount: r("is_professional_account", "bool"),
        };
      })();
    } catch (e) {
      console.error("Failed to fetch viewer info (v2)", e);
    }
    try {
      return await (async function () {
        const e = "https://i.instagram.com/api/v1/accounts/edit/web_form_data/";
        kA.ignoreCache();
        const t = await kA.fetchText(e, EA),
          r = CA.safeJsonParse(t);
        if (!r) return null;
        const n = r.form_data.username,
          o = await (async function (e) {
            var t;
            const r = CA.createUrl(
                "https://i.instagram.com/api/v1/users/web_profile_info/",
                { username: e }
              ),
              n = await kA.fetchJson(r, EA);
            return (
              (null == n || null === (t = n.data) || void 0 === t
                ? void 0
                : t.user) || null
            );
          })(n);
        return o
          ? {
              userId: o.id,
              username: n,
              fullName: o.full_name,
              email: r.form_data.email,
              avatarUrl: o.profile_pic_url_hd,
              isProfessionalAccount:
                o.is_professional_account || o.is_business_account,
            }
          : null;
      })();
    } catch (e) {
      console.error("Failed to fetch viewer info (v1)", e);
    }
    throw new Error("Failed to fetch viewer info");
  }
  async function xA() {
    return kA.fetchJson(SA.ig.loginActivity.url, EA);
  }
  async function PA(e, { incognito: t = !1 } = {}) {
    const r = {
      name: e,
      isBanned: null,
      isFlagged: null,
      avgLikes: null,
      avgComments: null,
      avgPosts: null,
      totalPosts: null,
      relevantTags: [],
    };
    let n,
      o = !1;
    try {
      const r = SA.ig.hashtag.url(e, { json: !0 }),
        o = t ? "omit" : "include";
      kA.ignoreCache(), (n = await kA.fetchText(r, { credentials: o, ...EA }));
    } catch (e) {
      if ("404" !== e.message) throw e;
      o = !0;
    }
    if (
      ((function (e) {
        if (e && e.includes(SA.ig.challenge)) {
          const e = new Error();
          throw ((e.message = "400"), (e.body = "Challenge"), e);
        }
      })(n),
      (function (e) {
        if (e && e.includes(SA.ig.login.link)) {
          const e = new Error();
          throw (
            ((e.message = "Redirect to login"),
            (e.body = "Redirect to login"),
            e)
          );
        }
      })(n),
      o)
    )
      return (r.isBanned = !0), (r.isFlagged = !1), r;
    const a = JSON.parse(n);
    if (!("graphql" in a)) {
      const t = a.data,
        n = t.top.sections
          .map((e) => e.layout_content.medias)
          .flat()
          .filter(Boolean)
          .map((e) => e.media),
        o = t.recent.sections
          .map((e) => e.layout_content.medias)
          .flat()
          .filter(Boolean)
          .map((e) => e.media);
      let i = 0,
        s = 0;
      {
        const e = n
          .map((e) => {
            const t = 1e3 * e.taken_at,
              r = e.like_count,
              n = e.comment_count;
            return { likes: GA(r, t), comments: GA(n, t) };
          })
          .sort(
            (e, t) =>
              CA.calcEngagement(e.likes, t.comments) -
              CA.calcEngagement(t.likes, t.comments)
          )
          .slice(
            Math.floor(n.length / 2 - Math.min(5, n.length / 3 / 2)),
            Math.floor(n.length / 2 + Math.min(5, n.length / 3 / 2))
          );
        if (e.length > 0) {
          for (const t of e) (i += t.likes), (s += t.comments);
          (i = Math.round(i / e.length)), (s = Math.round(s / e.length));
        }
      }
      let l = 0;
      {
        const e = new Set(),
          t = o
            .map((e) => ({ ts: 1e3 * e.taken_at, ownerId: e.user.pk }))
            .sort((e, t) => t.ts - e.ts)
            .slice(0, 15)
            .filter((t) => {
              const r = t.ownerId;
              return !e.has(r) && (e.add(r), !0);
            })
            .map((e) => e.ts);
        if (t.length > 2) {
          const e = t[0] - t[t.length - 1],
            r = Math.max(100, e / t.length);
          l = Math.round(CA.time.DAY / r);
        }
      }
      let c = [];
      {
        const t = {},
          r = [
            { posts: n, relevance: 2 },
            { posts: o, relevance: 1 },
          ];
        for (const e of r) {
          const r = CA.getHashtagRegex(),
            n = e.posts
              .map((e) => {
                var t;
                return (
                  (null === (t = e.caption) || void 0 === t
                    ? void 0
                    : t.text) || ""
                );
              })
              .map((e) => e.match(r) || [])
              .flat()
              .map((e) => e.replace("#", ""));
          for (const r of n) t[r] = (t[r] || 0) + e.relevance;
        }
        for (const r in t) {
          if (r === e) continue;
          const n = t[r];
          c.push({ tag: r, relevance: n });
        }
        c = c.sort((e, t) => t.relevance - e.relevance).map((e) => e.tag);
      }
      (r.isBanned = !1),
        (r.isFlagged = !t.allow_following && !!t.recent.warning_message),
        (r.totalPosts = t.media_count),
        (r.avgLikes = i),
        (r.avgComments = s),
        (r.avgPosts = l),
        (r.relevantTags = c);
    } else {
      const t = a.graphql.hashtag,
        n = t.edge_hashtag_to_top_posts.edges,
        o = t.edge_hashtag_to_media.edges;
      let i,
        s = 0,
        l = 0;
      {
        const e = n
          .map((e) => {
            const t = e.node,
              r = 1e3 * t.taken_at_timestamp,
              n = t.edge_liked_by.count,
              o = t.edge_media_to_comment.count;
            return { likes: GA(n, r), comments: GA(o, r) };
          })
          .sort(
            (e, t) =>
              CA.calcEngagement(e.likes, t.comments) -
              CA.calcEngagement(t.likes, t.comments)
          )
          .slice(
            Math.floor(n.length / 2 - Math.min(5, n.length / 3 / 2)),
            Math.floor(n.length / 2 + Math.min(5, n.length / 3 / 2))
          );
        if (e.length > 0) {
          for (const t of e) (s += t.likes), (l += t.comments);
          (s = Math.round(s / e.length)), (l = Math.round(l / e.length));
        }
      }
      {
        const e = new Set(),
          t = o
            .map((e) => ({
              ts: 1e3 * e.node.taken_at_timestamp,
              ownerId: e.node.owner.id,
            }))
            .sort((e, t) => t.ts - e.ts)
            .slice(0, 30)
            .filter((t) => {
              const r = t.ownerId;
              return !e.has(r) && (e.add(r), !0);
            })
            .map((e) => e.ts),
          r = t[0] - t[t.length - 1],
          n = Math.max(100, r / t.length);
        i = Math.round(CA.time.DAY / n);
      }
      let c = [];
      {
        const t = {},
          r = [
            { edges: n, relevance: 2 },
            { edges: o, relevance: 1 },
          ];
        for (const e of r) {
          const r = CA.getHashtagRegex(),
            n = e.edges
              .map((e) => {
                var t, r, n, o, a;
                return (
                  (null === (t = e.node) ||
                  void 0 === t ||
                  null === (r = t.edge_media_to_caption) ||
                  void 0 === r ||
                  null === (n = r.edges) ||
                  void 0 === n ||
                  null === (o = n[0]) ||
                  void 0 === o ||
                  null === (a = o.node) ||
                  void 0 === a
                    ? void 0
                    : a.text) || ""
                );
              })
              .map((e) => e.match(r) || [])
              .flat()
              .map((e) => e.replace("#", ""));
          for (const r of n) t[r] = (t[r] || 0) + e.relevance;
        }
        for (const r in t) {
          if (r === e) continue;
          const n = t[r];
          c.push({ tag: r, relevance: n });
        }
        c = c.sort((e, t) => t.relevance - e.relevance).map((e) => e.tag);
      }
      (r.isBanned = !1),
        (r.isFlagged = t.is_top_media_only && !t.allow_following),
        (r.totalPosts = t.edge_hashtag_to_media.count),
        (r.avgLikes = s),
        (r.avgComments = l),
        (r.avgPosts = i),
        (r.relevantTags = c);
    }
    return r;
  }
  async function TA(e, t = 10, r = [], n = null) {
    const o = CA.createUrl(
        `https://i.instagram.com/api/v1/feed/user/${e}/username/`,
        { count: 33, ...(n && { max_id: n }) }
      ),
      a = await kA.fetchJson(o, EA);
    return (
      r.push(...a.items),
      r.length < t && a.more_available && (await TA(e, t, r, a.next_max_id)),
      (r = r.slice(0, t)).map((e) => {
        var t, r, n, o, a, i, s, l, c, u;
        const d =
          (null === (t = e.carousel_media) ||
          void 0 === t ||
          null === (r = t[0].image_versions2) ||
          void 0 === r
            ? void 0
            : r.candidates) ||
          (null === (n = e.image_versions2) || void 0 === n
            ? void 0
            : n.candidates) ||
          [];
        return {
          id: String(e.pk),
          code: e.code,
          stats: {
            likes: Number(e.like_count) || 0,
            comments: Number(e.comment_count) || 0,
          },
          on: 1e3 * e.taken_at,
          caption:
            (null === (o = e.caption) || void 0 === o ? void 0 : o.text) || "",
          owner: String(
            (null === (a = e.user) || void 0 === a ? void 0 : a.pk) || ""
          ),
          ownerName:
            (null === (i = e.user) || void 0 === i ? void 0 : i.username) || "",
          type:
            { 1: "photo", 2: "video", 8: "carousel" }[e.media_type] || "photo",
          isLiked: e.has_liked,
          isVideo: "view_count" in e,
          imgx: (null === (s = d[0]) || void 0 === s ? void 0 : s.url) || null,
          img:
            (null === (l = d.at(-1)) || void 0 === l ? void 0 : l.url) || null,
          imgMedium:
            (null === (c = d.find((e) => 320 === e.width)) || void 0 === c
              ? void 0
              : c.url) ||
            (null === (u = d[0]) || void 0 === u ? void 0 : u.url) ||
            null,
        };
      })
    );
  }
  async function IA(e) {
    const t = CA.createUrl(`${SA.ig.base}web/search/topsearch/`, {
      context: "user",
      query: e,
    });
    return (await kA.fetchJson(t)).users.map((e) => ({
      id: e.user.pk,
      username: e.user.username,
      fullName: e.user.full_name,
      avatar: e.user.profile_pic_url,
    }));
  }
  function GA(e, t) {
    const r = Date.now();
    return e * (Math.log(0.061 * CA.time.DAY) / Math.log(0.061 * (r - t)));
  }
  function DA(e) {
    return {
      userId: e.id,
      username: e.username,
      fullName: e.full_name,
      avatarUrl: e.profile_pic_url,
      bio: e.biography,
      postsCount: e.edge_owner_to_timeline_media.count,
      followersCount: e.edge_followed_by.count,
      followingsCount: e.edge_follow.count,
      isFresh: e.is_joined_recently,
      isPrivate: e.is_private,
      isVerified: e.is_verified,
      isBusiness: e.is_business_account,
      businessCategory: e.category_name,
      isFollowingViewer: e.follows_viewer,
      isFollowedByViewer: e.followed_by_viewer,
      hasAvatar: e.profile_pic_url.includes("150x150"),
      hasHighlights: e.highlight_reel_count > 0,
      hasIgtv: e.edge_felix_video_timeline.count > 0,
      lastPosts: e.edge_owner_to_timeline_media.edges.map((e) => ({
        ts: 1e3 * e.node.taken_at_timestamp,
      })),
    };
  }
  function AA(e, t) {
    const r = async function (...r) {
      try {
        const t = await e(...r);
        return yA.Response.ofResult(t);
      } catch (e) {
        return yA.Response.ofNetworkError(e).reportError(t, e);
      }
    };
    return wA.on(`ig-api.${t}`, r), r;
  }
  yA.api = {
    init: function () {
      (this.fetchViewerInfo = AA(_A, "fetch-viewer-info")),
        (this.fetchLoginActivity = AA(xA, "fetch-login-activity")),
        (this.fetchTag = AA(PA, "fetch-tag")),
        (this.fetchUserPosts = AA(TA, "fetch-user-posts")),
        (this.searchProfiles = AA(IA, "search-profiles")),
        (this.normalizePostStat24h = GA),
        (this.createUserObject = DA);
    },
  };
  const { $abTesting: MA, $store: FA, $analytics: RA, $utils: LA } = app;
  MA.controller = {
    init: function () {
      LA.ls.remove("ab-testing-hash"), this._initWideScreenExperiment();
    },
    _initWideScreenExperiment: function () {
      const e = FA.state;
      if (e.igView.fullscreen) return;
      if (e.abTesting.wideScreenState) return;
      e.abTesting.hash < 0.2 &&
        (RA.controller.sendEvent("user", "ab:widescreen-applied"),
        FA.transaction((e) => {
          (e.igView.fullscreen = !0), (e.abTesting.wideScreenState = "applied");
        }));
    },
  };
  const { $later: BA, $dateFns: OA } = app;
  BA.calcNextPeriod = ({ periodType: e, periodStart: t, direction: r }) => {
    if (
      (t || (t = Date.now()),
      "week" === e && (t = OA.addWeeks(t, r)),
      "month" === e)
    ) {
      const e = OA.getMonth(t);
      for (t = OA.addMonths(t, r); OA.getMonth(t) === e; )
        t = OA.addWeeks(t, r);
    }
    return t.getTime();
  };
  const { $later: $A, $utils: NA } = app;
  $A.config = {
    mimeTypes: [
      "image/jpeg",
      "image/png",
      "video/quicktime",
      "video/mp4",
      "video/webm",
      "text/csv",
    ],
    maxFileSize: 524288e3,
    maxCarouselFiles: 10,
    minVideoDurationSec: 1,
    maxVideoDurationSec: 900.9,
    maxCarouselVideoDurationSec: 60.9,
    maxStoryDurationSec: 300.9,
    minVideoRatio: 0.12,
    maxVideoRatio: 1.91,
    minImageRatio: 0.6,
    maxImageRatio: 1.91,
    maxImageWidth: 4e3,
    maxImageHeight: 4e3,
    maxCaptionLength: 2200,
    minTimeBetweenPublishing: 10 * NA.time.SECOND,
    minTimeFromNow: 5 * NA.time.MINUTE,
  };
  const { $later: UA, $dateFns: HA } = app;
  UA.getDateTitle = (e = null, { short: t = !1 } = {}) => {
    if (!e) return null;
    if ("draft" === e) return "Draft";
    const r = HA.format(e, "HH:mm");
    let n;
    return (
      (n = HA.isToday(e)
        ? "Today"
        : HA.isYesterday(e)
        ? "Yesterday"
        : HA.isTomorrow(e)
        ? "Tomorrow"
        : HA.isThisYear(e)
        ? t
          ? HA.format(e, "MMM d")
          : HA.format(e, "MMMM do")
        : t
        ? HA.format(e, "MMM d yyyy")
        : HA.format(e, "MMMM do yyyy")),
      `${n}, ${r}`
    );
  };
  const { $later: zA } = app;
  zA.timeToHhmm = (e) => {
    const t = e / 1e3 / 60,
      r = Math.floor(t / 60);
    return `${r.toString().padStart(2, "0")}:${(t - 60 * r)
      .toString()
      .padStart(2, "0")}`;
  };
  const { $later: jA } = app;
  jA.timeToIcon = (e) => {
    const t = Math.floor(e / 36e5);
    return t < 5
      ? "time-night"
      : t < 11
      ? "time-morning"
      : t < 17
      ? "time-midday"
      : t < 21
      ? "time-evening"
      : "time-night";
  };
  const { $later: WA } = app;
  WA.timeToString = (e) => {
    const t = Math.floor(e / 36e5);
    return t < 5
      ? "Night"
      : t < 11
      ? "Morning"
      : t < 17
      ? "Midday"
      : t < 21
      ? "Evening"
      : "Night";
  };
  const { $later: VA, $store: qA, $billing: ZA, $ui: YA } = app,
    QA = {
      root: { ...YA.column, height: "100%" },
      description: { ...YA.text.bleak },
      footer: {
        ...YA.row,
        ...YA.alignItems.center,
        height: 35,
        marginBottom: YA.space.g1h,
      },
    };
  VA.AssistPanelContent = qA.connect((e) => ({
    showCancel: !!e.later.selectedIgDate,
  }))(
    class extends YA.Component {
      constructor(e) {
        super(e),
          (this.onSaveClick = () => {
            if (!qA.proxy.hasPro({ feature: "later" }))
              return void this.setState({ showUpsell: !0 });
            this.dateTimePicker.validateTime();
            const e = this.dateTimePicker.getDate();
            e && qA.transaction((t) => (t.later.selectedIgDate = e));
          }),
          (this.onDraftClick = () => {
            qA.transaction((e) => (e.later.selectedIgDate = "draft"));
          }),
          (this.onCancelClick = () => {
            qA.transaction((e) => (e.later.selectedIgDate = null));
          }),
          (this.onUpsellOverlayClick = () => {
            this.setState({ showUpsell: !1 });
          }),
          (this.unmounted = !1),
          (this.dateTimePickerRef = YA.createRef()),
          (this.state = { drafting: !1, showUpsell: !1 });
      }
      get dateTimePicker() {
        return this.dateTimePickerRef.current;
      }
      componentWillUnmount() {
        this.unmounted = !0;
      }
      render() {
        return Glamor.createElement(
          "div",
          { css: QA.root },
          this.renderDescription(),
          Glamor.createElement(YA.Spacer, { height: "g2" }),
          this.renderDateTimePicker(),
          Glamor.createElement(YA.Spacer, { height: "g2", grow: !0 }),
          this.renderFooter(),
          this.renderUpsellOverlay()
        );
      }
      renderDescription() {
        return Glamor.createElement(
          "div",
          { css: QA.description },
          "Post will be published automatically if you are ",
          Glamor.createElement("b", null, "online"),
          " at the given time. If you computer is offline, post will NOT be posted."
        );
      }
      renderDateTimePicker() {
        return Glamor.createElement(VA.DateTimePicker, {
          ref: this.dateTimePickerRef,
        });
      }
      renderFooter() {
        return Glamor.createElement(
          "div",
          { css: QA.footer },
          Glamor.createElement(YA.LinkButton, {
            label: "SAVE",
            onClick: this.onSaveClick,
          }),
          Glamor.createElement(YA.Spacer, { width: "g3" }),
          Glamor.createElement(YA.LinkButton, {
            label: "STORE AS DRAFT",
            onClick: this.onDraftClick,
          }),
          Glamor.createElement(YA.Spacer, { width: "g2", grow: !0 }),
          this.props.showCancel &&
            Glamor.createElement(YA.LinkButton, {
              label: "CANCEL",
              cancel: !0,
              onClick: this.onCancelClick,
            })
        );
      }
      renderUpsellOverlay() {
        return Glamor.createElement(ZA.UpsellOverlayMediator, {
          show: this.state.showUpsell,
          feature: "later",
          onOverlayClick: this.onUpsellOverlayClick,
        });
      }
    }
  );
  const { $later: KA, $store: XA, $ui: JA } = app,
    eM = {
      root: {
        ...JA.column,
        ...JA.padding("g2 g2 0 g2"),
        ...JA.relative(),
        ...JA.noselect,
        width: "100%",
        height: "100%",
      },
      closeButton: { ...JA.absolute("4 4 . .") },
    };
  KA.AssistPanel = class extends JA.Component {
    constructor(...e) {
      var t;
      return (
        (t = super(...e)),
        (this.onCloseClick = () => {
          XA.transaction((e) => {
            e.later.showAssistPanel = !1;
          });
        }),
        t
      );
    }
    render() {
      return Glamor.createElement(
        "div",
        { css: eM.root },
        this.renderCloseButton(),
        this.renderTabBar(),
        Glamor.createElement(JA.Spacer, { height: "g2" }),
        Glamor.createElement(KA.AssistPanelContent, null)
      );
    }
    renderCloseButton() {
      return Glamor.createElement(JA.CloseButton, {
        style: eM.closeButton,
        onClick: this.onCloseClick,
      });
    }
    renderTabBar() {
      return Glamor.createElement(JA.TabBar, {
        tabs: [{ id: "later", label: "POST LATER" }],
        selectedTabId: "later",
      });
    }
  };
  const { $later: tM, $store: rM, $ui: nM } = app;
  function oM() {
    return (oM =
      Object.assign ||
      function (e) {
        for (var t = 1; t < arguments.length; t++) {
          var r = arguments[t];
          for (var n in r)
            Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
        }
        return e;
      }).apply(this, arguments);
  }
  tM.BodyPanel = rM.connect((e) => ({
    selectedPostId: e.later.selectedPostId,
    selectedPillId: e.later.selectedPillId,
  }))(
    class extends nM.Component {
      render() {
        return this.props.selectedPostId
          ? Glamor.createElement(tM.PostScreen, {
              key: this.props.selectedPostId,
            })
          : "time-slots" === this.props.selectedPillId
          ? Glamor.createElement(tM.SlotsScreen, null)
          : "calendar" === this.props.selectedPillId
          ? Glamor.createElement(tM.CalendarScreen, null)
          : null;
      }
    }
  );
  const { $later: aM, $store: iM, $utils: sM, $ui: lM, $dateFns: cM } = app,
    uM = {
      root: {
        ...lM.grid,
        justifyItems: "stretch",
        gridTemplateColumns: "repeat(7, 123px)",
      },
      headerLabel: {
        ...lM.row,
        ...lM.justifyContent.end,
        ...lM.noselect,
        ...lM.text.of({ weight: 600, color: lM.color.textBleak }),
        ...lM.padding(". g1 g1 ."),
        minWidth: 122,
        fontVariantNumeric: "tabular-nums",
      },
    };
  aM.CalendarScreenCalendar = iM.connect((e) => ({
    periodType: e.later.calendar.periodType,
    periodStart: e.later.calendar.periodStart,
    showSlots: e.later.calendar.showSlots,
  }))(
    class extends lM.Component {
      get headerCells() {
        if ("month" === this.props.periodType) return sM.time.weekdays;
        if ("week" === this.props.periodType) {
          const e = cM.endOfWeek(this.props.periodStart);
          return [-6, -5, -4, -3, -2, -1, 0].map((t, r) => {
            const n = cM.addDays(e, t);
            return cM.isToday(n)
              ? "Today"
              : `${sM.time.weekdays[r]} ${cM.getDate(n)}`;
          });
        }
        return [];
      }
      get monthCells() {
        const { periodStart: e } = this.props;
        return aM.calendarController.getMonthCells(e);
      }
      get weekCells() {
        const { periodStart: e, showSlots: t } = this.props;
        return aM.calendarController.getWeekCells(e, t);
      }
      render() {
        return Glamor.createElement(
          "div",
          { css: uM.root },
          this.renderHeaderCells(),
          this.renderMonthCells(),
          this.renderWeekCells()
        );
      }
      renderHeaderCells() {
        return this.headerCells.map((e) =>
          Glamor.createElement("div", { css: uM.headerLabel, key: e }, e)
        );
      }
      renderMonthCells() {
        if ("month" === this.props.periodType)
          return this.monthCells.map((e) =>
            Glamor.createElement(
              aM.CalendarScreenCellMonth,
              oM({ key: e.day }, e)
            )
          );
      }
      renderWeekCells() {
        if ("week" === this.props.periodType)
          return this.weekCells.map((e) => {
            var t;
            return Glamor.createElement(
              aM.CalendarScreenCellWeek,
              oM(
                {
                  key: `${e.day}-${
                    (null === (t = e.slot) || void 0 === t ? void 0 : t.time) ||
                    ""
                  }`,
                },
                e
              )
            );
          });
      }
    }
  );
  const { $later: dM, $store: hM, $utils: pM, $ui: mM, $dateFns: gM } = app,
    fM = {
      root: {
        ...mM.column,
        ...mM.noselect,
        ...mM.justifyContent.between,
        width: 106,
        height: 134,
        padding: "6px 8px 8px",
        borderRight: mM.border.light,
        borderBottom: mM.border.light,
        boxSizing: "content-box",
      },
      rootFirstRow: { borderTop: mM.border.light },
      rootFirstColumn: { borderLeft: mM.border.light },
      header: {
        ...mM.row,
        ...mM.alignItems.center,
        ...mM.justifyContent.between,
        position: "relative",
      },
      addButtonMini: {
        ...mM.clickable,
        ...mM.transition.fast,
        color: mM.color.link,
        ".root:not(:hover) &, html.dragging &": { opacity: 0 },
        ".root.processing &": {
          pointerEvents: "none",
          color: mM.color.iconPassive,
        },
        "& .SvgIcon": { width: 19, height: 19 },
      },
      paginator: {
        ...mM.row,
        ...mM.center,
        ...mM.clickableInversed,
        position: "absolute",
        inset: "0 24px",
      },
      paginatorDot: {
        ...mM.margin("0 3"),
        width: 5,
        height: 5,
        borderRadius: 2.5,
        background: mM.color.iconPassive,
      },
      paginatorDotHighlight: { background: mM.color.link },
      title: {
        fontSize: 16,
        fontWeight: 500,
        color: mM.color.primary,
        marginLeft: "auto",
      },
      titleBleak: { color: mM.color.textPassive },
      today: { fontSize: 13 },
      addButton: {
        ...mM.row,
        ...mM.center,
        ...mM.borderRadius.r4,
        width: 106,
        height: 106,
        cursor: "pointer",
        border: mM.border.dark,
        color: mM.color.iconPassive,
        background: mM.color.bgLight1,
        "html:not(.dragging) &:hover": { color: mM.color.link },
        ".processing &": { pointerEvents: "none", color: mM.color.iconPassive },
        "& .SvgIcon": { ...mM.transition.fast },
        "html:not(.dragging) &:hover .SvgIcon": { transform: "scale(1.05)" },
      },
      post: { width: 106, height: 106, cursor: "pointer" },
    };
  dM.CalendarScreenCellMonth = hM.connect((e, t) => ({
    processing: e.later.processing,
    posts: dM.proxy
      .getSelectedUserPosts()
      .filter((e) => e.date && gM.isSameDay(e.date, t.day))
      .reverse(),
  }))(
    class extends mM.Component {
      constructor(e) {
        super(e),
          (this.onPaginatorClick = () => {
            const e = this.props.posts,
              t =
                (e.findIndex((e) => e.id === this.selectedPostId) + 1) %
                e.length;
            this.setState({ selectedPostId: e[t].id });
          }),
          (this.onAddClick = async () => {
            const e = Date.now() + dM.config.minTimeFromNow,
              t = Math.max(e, gM.endOfDay(this.props.day).getTime());
            let r;
            const n = this.props.posts.at(-1);
            (r = n
              ? n.date + pM.time.HOUR
              : this.props.day + 12 * pM.time.HOUR),
              r < e && (r = e),
              r > t && (r = t);
            const o = await dM.calendarController.createScheduledPost(r);
            o && this.setState({ selectedPostId: o });
          }),
          (this.onPostClick = () => {
            hM.transaction((e) => {
              (e.later.selectedPillId = null),
                (e.later.selectedPostId = this.selectedPostId);
            });
          }),
          (this.onPostDragStart = (e) => {
            mM.dnd.setDragImage(e),
              mM.dnd.onDrop(() => dM.proxy.applyDnd()),
              hM.transaction((e) => {
                e.later.dnd.dragPostId = this.selectedPostId;
              });
          }),
          (this.onDragEnter = () => {
            if (!this.props.actionable) return;
            const e = hM.state;
            this.setState({ selectedPostId: e.later.dnd.dragPostId }),
              hM.transaction((e) => {
                e.later.dnd.dragOverDay = this.props.day;
              });
          }),
          (this.onDragLeave = (e) => {
            if (mM.dnd.shouldIgnoreDragLeave(e)) return;
            hM.state.later.dnd.dragOverDay === this.props.day &&
              hM.transaction((e) => {
                e.later.dnd.dragOverDay = null;
              });
          }),
          (this.state = { selectedPostId: null });
      }
      get showPaginator() {
        return this.props.posts.length >= 2;
      }
      get selectedPostId() {
        const e = this.props.posts,
          t = this.state.selectedPostId;
        return e.find((e) => e.id === t) ? t : e.length > 0 ? e[0].id : null;
      }
      get selectedPost() {
        return this.props.posts.find((e) => e.id === this.selectedPostId);
      }
      render() {
        const e = [
            fM.root,
            0 === this.props.row && fM.rootFirstRow,
            0 === this.props.column && fM.rootFirstColumn,
          ],
          t = ["root", this.props.processing && "processing"]
            .filter(Boolean)
            .join(" ");
        return Glamor.createElement(
          "div",
          {
            css: e,
            className: t,
            onDragEnter: this.onDragEnter,
            onDragLeave: this.onDragLeave,
          },
          this.renderHeader(),
          this.renderAddButton(),
          this.renderPost()
        );
      }
      renderHeader() {
        return Glamor.createElement(
          "div",
          { css: fM.header },
          this.renderAddButtonMini(),
          this.renderPaginator(),
          this.renderTitle()
        );
      }
      renderAddButtonMini() {
        if (this.props.actionable && 0 !== this.props.posts.length)
          return Glamor.createElement(
            "div",
            { css: fM.addButtonMini, onClick: this.onAddClick },
            Glamor.createElement(mM.SvgIcon, { name: "igswiss.plus" })
          );
      }
      renderPaginator() {
        if (this.showPaginator)
          return Glamor.createElement(
            "div",
            { css: fM.paginator, onClick: this.onPaginatorClick },
            this.props.posts.slice(0, 5).map((e) => {
              const t = e.id === this.selectedPostId;
              return Glamor.createElement("div", {
                css: [fM.paginatorDot, t && fM.paginatorDotHighlight],
                key: e.id,
              });
            })
          );
      }
      renderTitle() {
        return Glamor.createElement(
          "div",
          { css: [fM.title, this.props.outer && fM.titleBleak] },
          this.props.today &&
            !this.showPaginator &&
            Glamor.createElement("span", { css: fM.today }, "today, "),
          this.props.dayOfMonth
        );
      }
      renderAddButton() {
        if (this.props.actionable && !(this.props.posts.length > 0))
          return Glamor.createElement(
            "div",
            { css: fM.addButton, onClick: this.onAddClick },
            Glamor.createElement(mM.SvgIcon, { name: "igswiss.plus" })
          );
      }
      renderPost() {
        if (0 !== this.props.posts.length)
          return Glamor.createElement(
            "div",
            {
              css: fM.post,
              draggable: "scheduled" === this.selectedPost.status,
              onClick: this.onPostClick,
              onDragStart: this.onPostDragStart,
            },
            Glamor.createElement(dM.PostTeaser, {
              post: this.selectedPost,
              showDate: !0,
            })
          );
      }
    }
  );
  const { $later: vM, $store: bM, $ui: yM, $dateFns: wM } = app,
    CM = {
      root: {
        ...yM.column,
        ...yM.noselect,
        ...yM.padding("g1"),
        width: 106,
        minHeight: 146,
        gap: yM.space.g1,
        borderRight: yM.border.light,
        boxSizing: "content-box",
      },
      rootFirstColumn: { borderLeft: yM.border.light },
      rootFirstRow: {
        minHeight: 0,
        borderTop: yM.border.light,
        ".root:not(.hasPosts)&": { paddingTop: 0, paddingBottom: 0 },
      },
      rootLastRow: { minHeight: 146, borderBottom: yM.border.light },
      slot: {
        ...yM.column,
        border: yM.border.dark,
        borderRadius: 4,
        background: yM.color.bgLight1,
        cursor: "pointer",
        ".disabled &": {
          cursor: "default",
          background: "transparent",
          borderColor: "transparent",
        },
      },
      slotHeader: {
        ...yM.row,
        ...yM.alignItems.center,
        ...yM.padding("6"),
        gap: yM.space.g1,
        color: yM.color.primary,
        height: 30,
      },
      slotIcon: { width: 16, height: 16 },
      slotTime: { fontSize: 11, fontHeight: "14px", fontWeight: 600 },
      slotAddIconMini: {
        width: 18,
        height: 18,
        marginLeft: "auto",
        display: "none",
        color: yM.color.iconPassive,
        ".root.hasPosts:not(.disabled) &": { display: "block" },
        "html:not(.dragging) .slot:hover &": { color: yM.color.link },
      },
      slotBody: {
        ...yM.row,
        ...yM.alignItems.center,
        ...yM.justifyContent.center,
        height: 72,
        paddingBottom: 8,
        ".root.disabled &": { display: "none" },
        ".root.hasPosts &": { display: "none" },
      },
      slotAddIcon: {
        color: yM.color.iconPassive,
        ...yM.transition.fast,
        "html:not(.dragging) .slot:hover &": {
          color: yM.color.link,
          transform: "scale(1.05)",
        },
      },
      post: { width: 106, height: 106, cursor: "pointer" },
    };
  vM.CalendarScreenCellWeek = bM.connect((e, t) => ({
    posts: vM.proxy
      .getSelectedUserPosts()
      .filter(
        (e) =>
          !!e.date &&
          !!wM.isSameDay(e.date, t.day) &&
          t.dateFrom <= e.date &&
          e.date < t.dateTo
      )
      .reverse(),
  }))(
    class extends yM.Component {
      constructor(...e) {
        var t;
        return (
          (t = super(...e)),
          (this.onSlotClick = () => {
            const e = this.props.day + this.props.slot.time;
            vM.calendarController.createScheduledPost(e);
          }),
          (this.onPostClick = (e) => {
            const t = e.currentTarget.dataset.postId;
            bM.transaction((e) => {
              (e.later.selectedPillId = null), (e.later.selectedPostId = t);
            });
          }),
          (this.onPostDragStart = (e) => {
            yM.dnd.setDragImage(e), yM.dnd.onDrop(() => vM.proxy.applyDnd());
            const t = e.currentTarget.dataset.postId;
            bM.transaction((e) => {
              e.later.dnd.dragPostId = t;
            });
          }),
          (this.onDragEnter = () => {
            this.props.actionable &&
              this.props.slot &&
              bM.transaction((e) => {
                (e.later.dnd.dragOverDay = this.props.day),
                  (e.later.dnd.dragOverTime = this.props.slot.time);
              });
          }),
          (this.onDragLeave = (e) => {
            if (yM.dnd.shouldIgnoreDragLeave(e)) return;
            if (!this.props.slot) return;
            const t = bM.state;
            t.later.dnd.dragOverDay === this.props.day &&
              t.later.dnd.dragOverTime === this.props.slot.time &&
              bM.transaction((e) => {
                (e.later.dnd.dragOverDay = null),
                  (e.later.dnd.dragOverTime = null);
              });
          }),
          t
        );
      }
      render() {
        const e = [
            CM.root,
            0 === this.props.column && CM.rootFirstColumn,
            0 === this.props.row && CM.rootFirstRow,
            this.props.isLastRow && CM.rootLastRow,
          ],
          t = [
            "root",
            this.props.posts.length > 0 && "hasPosts",
            !this.props.actionable && "disabled",
          ]
            .filter(Boolean)
            .join(" ");
        return Glamor.createElement(
          "div",
          {
            css: e,
            className: t,
            onDragEnter: this.onDragEnter,
            onDragLeave: this.onDragLeave,
          },
          this.renderSlot(),
          this.renderPosts()
        );
      }
      renderSlot() {
        if (!this.props.slot) return;
        const e = vM.timeToIcon(this.props.slot.time),
          t = wM.format(this.props.day + this.props.slot.time, "HH:mm");
        return Glamor.createElement(
          "div",
          { css: CM.slot, className: "slot", onClick: this.onSlotClick },
          Glamor.createElement(
            "div",
            { css: CM.slotHeader },
            Glamor.createElement(yM.SvgIcon, { style: CM.slotIcon, name: e }),
            Glamor.createElement("div", { css: CM.slotTime }, t),
            Glamor.createElement(yM.SvgIcon, {
              style: CM.slotAddIconMini,
              name: "igswiss.plus",
            })
          ),
          Glamor.createElement(
            "div",
            { css: CM.slotBody },
            Glamor.createElement(yM.SvgIcon, {
              style: CM.slotAddIcon,
              name: "igswiss.plus",
            })
          )
        );
      }
      renderPosts() {
        return this.props.posts.map((e) =>
          Glamor.createElement(
            "div",
            {
              css: CM.post,
              key: e.id,
              draggable: "scheduled" === e.status,
              "data-post-id": e.id,
              onClick: this.onPostClick,
              onDragStart: this.onPostDragStart,
            },
            Glamor.createElement(vM.PostTeaser, { post: e, showDate: !0 })
          )
        );
      }
    }
  );
  const { $later: kM, $store: SM, $ui: EM } = app,
    _M = { root: { minWidth: 200 }, rootWeek: { minWidth: 280 } };
  kM.CalendarScreenPeriodPaginator = SM.connect((e) => ({
    periodType: e.later.calendar.periodType,
    periodStart: e.later.calendar.periodStart,
  }))(
    class extends EM.Component {
      constructor(...e) {
        var t;
        return (
          (t = super(...e)),
          (this.onPeriodStartChange = (e) => {
            SM.transaction((t) => {
              t.later.calendar.periodStart = e;
            });
          }),
          t
        );
      }
      render() {
        return Glamor.createElement(kM.PeriodPaginator, {
          style: [_M.root, "week" === this.props.periodType && _M.rootWeek],
          periodType: this.props.periodType,
          periodStart: this.props.periodStart,
          onPeriodStartChange: this.onPeriodStartChange,
        });
      }
    }
  );
  const { $later: xM, $store: PM, $ui: TM } = app,
    IM = {
      root: {
        ...TM.row,
        ...TM.noselect,
        ...TM.text.elementNormal,
        ...TM.borderRadius.r4,
        border: TM.border.dark,
        overflow: "hidden",
      },
      button: {
        ...TM.clickable,
        ...TM.padding("g1 g2"),
        background: TM.color.bgLight1,
      },
      buttonSelected: { background: TM.color.bgLight3 },
      divider: { width: 1, background: TM.color.borderDark },
    };
  xM.CalendarScreenPeriodTypeSwitch = PM.connect((e) => ({
    periodType: e.later.calendar.periodType,
  }))(
    class extends TM.Component {
      constructor(...e) {
        var t;
        return (
          (t = super(...e)),
          (this.onButtonClick = (e) => {
            const t = e.currentTarget.dataset.type;
            PM.transaction((e) => (e.later.calendar.periodType = t));
          }),
          t
        );
      }
      render() {
        return Glamor.createElement(
          "div",
          { css: IM.root },
          this.renderButton("Month", "month"),
          Glamor.createElement("div", { css: IM.divider }),
          this.renderButton("Week", "week")
        );
      }
      renderButton(e, t) {
        return Glamor.createElement(
          "div",
          {
            css: [IM.button, this.props.periodType === t && IM.buttonSelected],
            "data-type": t,
            onClick: this.onButtonClick,
          },
          e
        );
      }
    }
  );
  const { $later: GM, $store: DM, $ui: AM } = app;
  GM.CalendarScreenShowSlotsSwitch = DM.connect((e) => ({
    periodType: e.later.calendar.periodType,
    showSlots: e.later.calendar.showSlots,
  }))(
    class extends AM.Component {
      constructor(...e) {
        var t;
        return (
          (t = super(...e)),
          (this.onChange = () => {
            DM.transaction((e) => {
              e.later.calendar.showSlots = !e.later.calendar.showSlots;
            });
          }),
          t
        );
      }
      render() {
        return "month" === this.props.periodType
          ? null
          : Glamor.createElement(AM.Switch, {
              label: "Show time slots",
              value: this.props.showSlots,
              onChange: this.onChange,
            });
      }
    }
  );
  const { $later: MM, $store: FM, $ui: RM } = app,
    LM = {
      root: { ...RM.padding("g2 g2 g2 g3") },
      header: { marginBottom: RM.space.g2 },
      controls: { ...RM.row, ...RM.alignItems.center, maxWidth: 860 },
    };
  MM.CalendarScreen = class extends RM.Component {
    constructor(...e) {
      var t;
      return (
        (t = super(...e)),
        (this.onCloseClick = () => {
          FM.transaction((e) => {
            e.later.showBodyPanel = !1;
          }),
            this.setTimeout(() => {
              FM.transaction((e) => {
                e.later.selectedPillId = null;
              });
            }, 300);
        }),
        t
      );
    }
    render() {
      return Glamor.createElement(
        "div",
        { css: LM.root },
        this.renderHeader(),
        this.renderBody()
      );
    }
    renderHeader() {
      return Glamor.createElement(
        "div",
        { css: LM.header },
        Glamor.createElement(RM.ScreenHeader, {
          title: "Post Calendar",
          onCloseClick: this.onCloseClick,
        })
      );
    }
    renderBody() {
      return Glamor.createElement(
        "div",
        { css: RM.column },
        Glamor.createElement(
          "div",
          { css: LM.controls },
          Glamor.createElement(MM.CalendarScreenPeriodTypeSwitch, null),
          Glamor.createElement(RM.Spacer, { width: "g3" }),
          Glamor.createElement(MM.CalendarScreenPeriodPaginator, null),
          Glamor.createElement(RM.Spacer, { grow: !0 }),
          Glamor.createElement(MM.CalendarScreenShowSlotsSwitch, null)
        ),
        Glamor.createElement(RM.Spacer, { height: "g2" }),
        Glamor.createElement(MM.CalendarScreenCalendar, null)
      );
    }
  };
  const { $later: BM, $ui: OM, $dateFns: $M } = app,
    NM = {
      root: { width: 262 },
      calendar: {
        ...OM.grid,
        marginTop: OM.space.g1,
        gridTemplateColumns: "repeat(7, 34px)",
        justifyItems: "stretch",
        gridGap: 4,
      },
      weekLabel: {
        ...OM.row,
        ...OM.center,
        ...OM.noselect,
        width: 34,
        height: 34,
        fontSize: "12px",
        fontWeight: "600",
        fontFamily: OM.font.secondary,
        color: OM.color.textBleak,
      },
      cell: ({ isBleak: e, selectable: t, selected: r }) => ({
        ...OM.row,
        ...OM.center,
        ...OM.borderRadius.r4,
        ...OM.noselect,
        width: 34,
        height: 34,
        fontSize: "16px",
        fontWeight: "600",
        fontFamily: OM.font.secondary,
        color: OM.color.primary,
        ...(e && { color: OM.color.textPassive }),
        ...(t && {
          ...OM.clickableInversed,
          border: OM.border.dark,
          background: OM.color.bgLight1,
        }),
        ...(r && {
          border: "none",
          background: OM.color.link,
          color: OM.theme.valueOf("day", OM.color.textInversed),
        }),
      }),
    };
  BM.DatePicker = class extends OM.Component {
    constructor(...e) {
      var t;
      return (
        (t = super(...e)),
        (this.renderCell = ({
          day: e,
          dayOfMonth: t,
          outer: r,
          actionable: n,
        }) =>
          Glamor.createElement(
            "div",
            {
              css: NM.cell({
                isBleak: r,
                selected: n && $M.isSameDay(e, this.props.selectedDay),
                selectable: n,
              }),
              key: e,
              "data-day": e,
              "data-selectable": n ? "1" : null,
              onClick: this.onCellClick,
            },
            t
          )),
        (this.onCellClick = (e) => {
          if (!this.props.onDaySelect) return;
          const t = e.currentTarget;
          if (!!!t.dataset.selectable) return;
          const r = Number(t.dataset.day);
          this.props.onDaySelect(r);
          const n = this.props.periodStart;
          if ($M.isSameMonth(n, r)) return;
          const o = BM.calcNextPeriod({
            periodType: "month",
            periodStart: n,
            direction: r > n ? 1 : -1,
          });
          this.props.onPeriodStartChange && this.props.onPeriodStartChange(o);
        }),
        t
      );
    }
    render() {
      return Glamor.createElement(
        "div",
        { css: NM.root },
        this.renderPeriodPaginator(),
        this.renderCalendar()
      );
    }
    renderPeriodPaginator() {
      return Glamor.createElement(BM.PeriodPaginator, {
        periodType: "month",
        periodStart: this.props.periodStart,
        onPeriodStartChange: this.props.onPeriodStartChange,
      });
    }
    renderCalendar() {
      const e = this.props.periodStart,
        t = BM.calendarController.getMonthCells(e);
      return Glamor.createElement(
        "div",
        { css: NM.calendar },
        Glamor.createElement("div", { css: NM.weekLabel }, "Su"),
        Glamor.createElement("div", { css: NM.weekLabel }, "Mo"),
        Glamor.createElement("div", { css: NM.weekLabel }, "Tu"),
        Glamor.createElement("div", { css: NM.weekLabel }, "We"),
        Glamor.createElement("div", { css: NM.weekLabel }, "Th"),
        Glamor.createElement("div", { css: NM.weekLabel }, "Fr"),
        Glamor.createElement("div", { css: NM.weekLabel }, "Sa"),
        t.map(this.renderCell)
      );
    }
  };
  const { $later: UM, $store: HM, $utils: zM, $ui: jM, $dateFns: WM } = app,
    VM = { root: { width: 262 } };
  UM.DateTimePicker = HM.connect((e, t) => {
    t.userId && (e = UM.proxy.getUserState(e, t.userId));
    let r = e.later.lastDate;
    if (!r) {
      const t = e.later.posts
        .filter((e) => "scheduled" === e.status)
        .sort((e, t) => t.date - e.date)
        .at(0);
      r = (null == t ? void 0 : t.date) || null;
    }
    return { lastDate: r, timeSlots: e.later.timeSlots };
  })(
    class extends jM.Component {
      constructor(e) {
        super(e),
          (this.onDaySelect = (e) => {
            this.state.day !== e &&
              (this.setState({ day: e, timeErrorMessage: null }),
              this.props.onDayChange &&
                this.setTimeout(() => this.props.onDayChange()));
          }),
          (this.onPeriodStartChange = (e) => {
            this.setState({ periodStart: e, timeErrorMessage: null });
          }),
          (this.onSlotChange = (e) => {
            this.setState({ slotTime: e, timeErrorMessage: null }),
              this.props.onTimeChange &&
                this.setTimeout(() => this.props.onTimeChange());
          }),
          (this.onCustomTimeInput = () => {
            this.setState({ timeErrorMessage: null });
          }),
          (this.onCustomTimeChange = (e) => {
            this.setState({ customTime: e }),
              this.props.onTimeChange &&
                this.setTimeout(() => this.props.onTimeChange());
          }),
          (this.state = {
            periodStart: null,
            day: null,
            slotTime: null,
            customTime: null,
            timeErrorMessage: null,
          }),
          this.setDate(e.initialDate, !0);
      }
      get minDate() {
        return Date.now() + 10 * zM.time.MINUTE;
      }
      getDay() {
        return this.state.day;
      }
      getTime() {
        var e, t;
        return null !==
          (e =
            null !== (t = this.state.slotTime) && void 0 !== t
              ? t
              : this.state.customTime) && void 0 !== e
          ? e
          : null;
      }
      getDate() {
        const e = this.getDay(),
          t = this.getTime();
        if ("number" != typeof t) return null;
        const r = e + t;
        return r < Date.now() + UM.config.minTimeFromNow ? null : r;
      }
      getDefaultDate() {
        let e = this.props.lastDate;
        (!e || e < this.minDate) && (e = this.minDate);
        let t = this.props.timeSlots;
        0 === t.length && (t = HM.getTemplateUserState().later.timeSlots);
        let r = WM.startOfDay(e).getTime(),
          n = t.find((t) => r + t.time > e);
        return (
          n || ((r += 1 * zM.time.DAY), (n = t.find((t) => r + t.time > e))),
          r + n.time
        );
      }
      setDate(e = null, t = !1) {
        e || (e = this.getDefaultDate());
        const r = WM.startOfDay(e).getTime(),
          n = e - r,
          o = this.props.timeSlots.find((e) => e.time === n),
          a = {
            periodStart: r,
            day: r,
            customTime: n,
            slotTime: o ? n : null,
            timeErrorMessage: null,
          };
        t ? Object.assign(this.state, a) : this.setState(a);
      }
      validateTime() {
        const e = this.getTime(),
          t = this.getDate();
        "number" != typeof e
          ? this.setState({ timeErrorMessage: "no time specified" })
          : t
          ? this.setState({ timeErrorMessage: null })
          : this.setState({
              timeErrorMessage: "should be at least 5 minutes from now",
            });
      }
      render() {
        return Glamor.createElement(
          "div",
          { css: VM.root },
          Glamor.createElement(UM.DatePicker, {
            periodStart: this.state.periodStart,
            selectedDay: this.state.day,
            onDaySelect: this.onDaySelect,
            onPeriodStartChange: this.onPeriodStartChange,
          }),
          Glamor.createElement(jM.Spacer, { height: "g2" }),
          Glamor.createElement(UM.TimePicker, {
            errorMessage: this.state.timeErrorMessage,
            selectedSlotTime: this.state.slotTime,
            customTime: this.state.customTime,
            onSlotChange: this.onSlotChange,
            onCustomTimeInput: this.onCustomTimeInput,
            onCustomTimeChange: this.onCustomTimeChange,
          })
        );
      }
    }
  );
  const { $later: qM, $store: ZM, $ui: YM } = app,
    QM = {
      warningIcon: {
        ...YM.relative(),
        top: 1,
        width: 14,
        height: 16,
        color: YM.color.error,
      },
      content: { ...YM.column, gap: YM.space.g1h, marginTop: YM.space.g0h },
      group: {},
      title: { ...YM.row, gap: YM.space.g1 },
      name: { fontWeight: 700, ...YM.text.nowrap },
      nameEllipsis: { ...YM.text.ellipsis },
      divider: { opacity: 0.5 },
      description: {
        marginTop: YM.g0h,
        "& a": { color: YM.color.link, ...YM.clickable },
      },
    };
  qM.ErrorCard = ZM.connect((e) => ({ errors: e.later.errors }))(
    class extends YM.Component {
      constructor(...e) {
        var t;
        return (
          (t = super(...e)),
          (this.renderContent = () =>
            Glamor.createElement(
              "div",
              { css: QM.content },
              this.groups.map((e) => this.renderGroup(e))
            )),
          (this.onCloseClick = () => {
            ZM.transaction((e) => {
              e.later.errors = [];
            });
          }),
          t
        );
      }
      get groups() {
        const e = [];
        for (const t of this.props.errors) {
          let r = e.find((e) => e.type === t.type);
          r || ((r = { type: t.type, filenames: [] }), e.push(r)),
            r.filenames.push(t.filename);
        }
        return e;
      }
      render() {
        return Glamor.createElement(
          YM.SnackbarItem,
          { id: "later-error-card", show: this.props.errors.length > 0 },
          Glamor.createElement(YM.InfoCard, {
            icon: "warning-triangle",
            iconStyle: QM.warningIcon,
            markerColor: YM.color.error,
            title: "Failed to add files",
            content: this.renderContent(),
            onClose: this.onCloseClick,
          })
        );
      }
      renderGroup(e) {
        const t = e.filenames.slice(0, 2);
        return (
          e.filenames.length > 2 && t.push(e.filenames.length - 2 + " more..."),
          Glamor.createElement(
            "div",
            { css: QM.group, key: e.type },
            Glamor.createElement(
              "div",
              { css: QM.title },
              t.map((e, r) => {
                const n = r === t.length - 1;
                return Glamor.createElement(
                  YM.Fragment,
                  { key: r },
                  Glamor.createElement(
                    "div",
                    { css: [QM.name, r < 2 && QM.nameEllipsis] },
                    e
                  ),
                  !n && Glamor.createElement("div", { css: QM.divider }, "|")
                );
              })
            ),
            Glamor.createElement(
              "div",
              { css: QM.description },
              this.renderDescription(e)
            )
          )
        );
      }
      renderDescription(e) {
        const t = Glamor.createElement(
            "a",
            { href: "https://ezgif.com/cut-video", target: "_blank" },
            "EzGif"
          ),
          r = Glamor.createElement(
            "a",
            {
              href: "https://inssist.com/faq#images-are-cut-or-videos-do-not-upload",
              target: "_blank",
            },
            "FAQ page"
          );
        return "type" === e.type
          ? Glamor.createElement(
              React.Fragment,
              null,
              "Unsupported file type. Please use PNG / JPG for photos and MP4 / MOV for videos."
            )
          : "duration" === e.type
          ? Glamor.createElement(
              React.Fragment,
              null,
              "Instagram does not accept videos longer than 15 minutes. You can cut video online with ",
              t,
              "."
            )
          : "ratio" === e.type
          ? Glamor.createElement(
              React.Fragment,
              null,
              "Unsupported size ratio. Please check the aspect ratios Instagram supports on our ",
              r,
              "."
            )
          : "encoding" === e.type
          ? Glamor.createElement(
              React.Fragment,
              null,
              "Unsupported video codec. A MP4-h264 or WEBM is recommended. Find more on our ",
              r,
              "."
            )
          : "size" === e.type
          ? Glamor.createElement(
              React.Fragment,
              null,
              "The file is above ",
              Glamor.createElement("b", null, "500MB"),
              " and is too large to upload. Please resize or compress the file and try again."
            )
          : "fetch" === e.type
          ? Glamor.createElement(React.Fragment, null, "Failed to download.")
          : "unknown" === e.type
          ? Glamor.createElement(
              React.Fragment,
              null,
              "Failed to read. Please try again or pick another file."
            )
          : void 0;
      }
    }
  );
  const { $later: KM, $utils: XM, $ui: JM, $dateFns: eF } = app,
    tF = {
      root: {
        ...JM.row,
        ...JM.alignItems.center,
        ...JM.justifyContent.between,
        ...JM.noselect,
        ...JM.text.elementNormal,
        ...JM.borderRadius.r4,
        border: JM.border.dark,
        backgroundColor: JM.color.bgLight1,
        fontVariantNumeric: "tabular-nums",
      },
      button: { color: JM.color.link },
    },
    rF = "later-period-paginator.left",
    nF = "later-period-paginator.right";
  JM.SvgIcon.registerSvgIcons([
    `<symbol id="${rF}" viewBox="0 0 34 34"><rect width="34" height="34" fill="none"/><path d="M9.789,2.613A5.224,5.224,0,0,0,7.88.7,5.132,5.132,0,0,0,5.246,0,5.132,5.132,0,0,0,2.613.7,5.223,5.223,0,0,0,.7,2.613,5.132,5.132,0,0,0,0,5.246,5.133,5.133,0,0,0,.7,7.88,5.224,5.224,0,0,0,2.613,9.789a5.132,5.132,0,0,0,2.633.7,5.132,5.132,0,0,0,2.633-.7A5.223,5.223,0,0,0,9.789,7.88a5.133,5.133,0,0,0,.7-2.633A5.133,5.133,0,0,0,9.789,2.613ZM6.906,7.343a.428.428,0,0,1,0,.615l-.7.7a.429.429,0,0,1-.615,0l-3.1-3.1a.429.429,0,0,1,0-.615l3.1-3.1a.429.429,0,0,1,.615,0l.7.7a.428.428,0,0,1,0,.615l-2.1,2.1Z" transform="translate(11.754 11.754)" fill="currentColor"/></symbol>`,
    `<symbol id="${nF}" viewBox="0 0 34 34"><rect width="34" height="34" fill="none"/><path d="M9.789,2.613A5.224,5.224,0,0,0,7.88.7,5.132,5.132,0,0,0,5.246,0,5.132,5.132,0,0,0,2.613.7,5.223,5.223,0,0,0,.7,2.613,5.132,5.132,0,0,0,0,5.246,5.133,5.133,0,0,0,.7,7.88,5.224,5.224,0,0,0,2.613,9.789a5.132,5.132,0,0,0,2.633.7,5.132,5.132,0,0,0,2.633-.7A5.223,5.223,0,0,0,9.789,7.88a5.133,5.133,0,0,0,.7-2.633A5.133,5.133,0,0,0,9.789,2.613ZM6.906,7.343a.428.428,0,0,1,0,.615l-.7.7a.429.429,0,0,1-.615,0l-3.1-3.1a.429.429,0,0,1,0-.615l3.1-3.1a.429.429,0,0,1,.615,0l.7.7a.428.428,0,0,1,0,.615l-2.1,2.1Z" transform="translate(22.247 22.246) rotate(180)" fill="currentColor"/></symbol>`,
  ]),
    (KM.PeriodPaginator = class extends JM.Component {
      constructor(...e) {
        var t;
        return (
          (t = super(...e)),
          (this.onButtonClick = ({ direction: e }) => {
            const t = this.props;
            if (!t.onPeriodStartChange) return;
            const r = KM.calcNextPeriod({
              periodType: t.periodType,
              periodStart: t.periodStart,
              direction: e,
            });
            t.onPeriodStartChange(r);
          }),
          t
        );
      }
      get label() {
        const e = this.props.periodStart || Date.now(),
          t = eF.getMonth(e),
          r = XM.time.months[t],
          n = eF.getYear(e);
        if ("month" === this.props.periodType) return `${r} ${n}`;
        if ("week" === this.props.periodType) {
          return `${r} ${n}, Week ${eF.getWeek(e)}`;
        }
        return null;
      }
      render() {
        const e = this.props;
        return Glamor.createElement(
          "div",
          { css: [tF.root, e.style] },
          Glamor.createElement(JM.SvgIcon, {
            style: tF.button,
            name: rF,
            direction: -1,
            onClick: this.onButtonClick,
          }),
          this.label,
          Glamor.createElement(JM.SvgIcon, {
            style: tF.button,
            name: nF,
            direction: 1,
            onClick: this.onButtonClick,
          })
        );
      }
    });
  const { $later: oF, $files: aF, $ui: iF } = app,
    sF = {
      root: {
        width: "100%",
        height: "100%",
        flexShrink: 0,
        borderRadius: 3,
        position: "relative",
        backgroundSize: "cover",
        backgroundPosition: "center",
        backgroundRepeat: "no-repeat",
        overflow: "hidden",
        ...iF.noselect,
        "&::before": {
          ...iF.absolute("50% 0 -20 0"),
          content: '""',
          background: iF.gradient.fromBlackToTransparent(),
        },
      },
      icon: {
        position: "absolute",
        top: 4,
        right: 4,
        color: "#FFF",
        filter: "drop-shadow(0px 1px 3px rgba(0 0 0 / 30%))",
      },
      status: {
        ...iF.row,
        ...iF.alignItems.center,
        ...iF.justifyContent.end,
        gap: iF.space.g1,
        position: "absolute",
        left: 8,
        right: 8,
        bottom: 6,
        fontVariantNumeric: "tabular-nums",
      },
      statusText: {
        fontSize: 11,
        fontWeight: 600,
        lineHeight: "14px",
        color: "#FFF",
        textAlign: "right",
      },
      statusIndicator: {
        width: 8,
        height: 8,
        borderRadius: "50%",
        '[data-status="posted"] &': { display: "none" },
        '[data-status="posting"] &': { display: "none" },
        '[data-status="scheduled"] &': { display: "none" },
        '[data-status="draft"] &': { display: "none" },
        '[data-status="failed"] &': { background: iF.color.error },
      },
    };
  oF.PostTeaser = class extends iF.Component {
    render() {
      return Glamor.createElement(
        aF.Renderer,
        { fileId: this.props.post.mediaList[0].previewId },
        (e) =>
          Glamor.createElement(
            "div",
            {
              css: [sF.root, this.props.style],
              style: {
                backgroundColor: this.props.post.mediaList[0].color,
                backgroundImage: e ? `url("${e}")` : null,
              },
            },
            this.renderIcon(),
            this.renderStatus()
          )
      );
    }
    renderIcon() {
      let e = null;
      const t = this.props.post;
      if (
        ("reel" === t.type
          ? (e = "reel")
          : "story" === t.type
          ? (e = "story")
          : "post" === t.type &&
            (t.mediaList.length > 1
              ? (e = "carousel")
              : t.mediaList[0].isVideo && (e = "video")),
        e)
      )
        return Glamor.createElement(
          "div",
          { css: sF.icon },
          Glamor.createElement(iF.SvgIcon, { name: e })
        );
    }
    renderStatus() {
      if (this.props.hideStatus) return;
      const e = this.props.post,
        t = {
          draft: "Draft",
          posted: "Published",
          posting: "Publishing...",
          failed: "Failed",
          scheduled: this.props.showDate
            ? oF.getDateTitle(e.date, { short: !0 })
            : "Scheduled",
        }[e.status];
      return Glamor.createElement(
        "div",
        { css: sF.status, "data-status": e.status },
        Glamor.createElement("div", { css: sF.statusText }, t),
        Glamor.createElement("div", { css: sF.statusIndicator })
      );
    }
  };
  const { $later: lF, $store: cF, $ui: uF } = app,
    dF = {
      root: { width: "100%", ...uF.relative() },
      timezone: {
        ...uF.absolute("0 0 . ."),
        ...uF.noselect,
        fontFamily: uF.font.primary,
        fontSize: "9px",
        fontWeight: "600",
        color: uF.color.iconActionable,
      },
      dropdown: { width: "100%" },
      customTime: { marginTop: uF.space.g1 },
    };
  lF.TimePicker = cF.connect((e) => ({ slots: e.later.timeSlots }))(
    class extends uF.Component {
      constructor(e) {
        super(e),
          (this.onSlotChange = (e) => {
            this.props.onSlotChange(e.value);
          }),
          (this.timezone = Intl.DateTimeFormat().resolvedOptions().timeZone);
      }
      get label() {
        return "time to publish";
      }
      render() {
        return Glamor.createElement(
          "div",
          { css: dF.root },
          this.renderTimezone(),
          this.renderDropdown(),
          this.renderCustomTime()
        );
      }
      renderTimezone() {
        return Glamor.createElement("div", { css: dF.timezone }, this.timezone);
      }
      renderDropdown() {
        if (0 === this.props.slots.length) return;
        let e = !1;
        const t = this.props.slots.map((t) => {
            const r = this.props.selectedSlotTime === t.time;
            return (
              r && (e = !0),
              {
                value: t.time,
                label: `${lF.timeToString(t.time)}, ${lF.timeToHhmm(t.time)}`,
                selected: r,
              }
            );
          }),
          r = { value: null, label: "Custom", selected: !e },
          n = {
            hasError: !!this.props.errorMessage,
            message:
              null === this.props.selectedSlotTime
                ? null
                : this.props.errorMessage,
          };
        return Glamor.createElement(uF.Dropdown, {
          menuStyle: dF.dropdown,
          label: this.label,
          items: [...t, r],
          onChange: this.onSlotChange,
          error: n,
          isMenuAtTheTop: !0,
        });
      }
      renderCustomTime() {
        if (null !== this.props.selectedSlotTime) return;
        const e = {
          hasError: !!this.props.errorMessage,
          message: this.props.errorMessage,
        };
        return Glamor.createElement(
          "div",
          { css: dF.customTime },
          Glamor.createElement(uF.TimeInput, {
            time: this.props.customTime,
            label: 0 === this.props.slots.length ? this.label : null,
            onChange: this.props.onCustomTimeChange,
            onInput: this.props.onCustomTimeInput,
            error: e,
          })
        );
      }
    }
  );
  const { $later: hF, $store: pF, $ui: mF, $igFrame: gF } = app,
    fF = { root: {}, input: { maxWidth: 492 } };
  hF.PostScreenCaption = pF.connect(() => ({
    post: hF.proxy.getSelectedPost(),
  }))(
    class extends mF.Component {
      constructor(...e) {
        var t;
        return (
          (t = super(...e)),
          (this.onInput = (e) => {
            hF.proxy.updatePost(this.props.post.id, (t) => {
              t.caption = e;
            });
          }),
          t
        );
      }
      get error() {
        return gF.validateCaption(this.props.post.caption);
      }
      render() {
        return "story" === this.props.post.type
          ? null
          : hF.proxy.isPostEditable(this.props.post)
          ? Glamor.createElement(
              "div",
              { css: fF.root },
              Glamor.createElement(mF.Input, {
                style: fF.input,
                label: "caption",
                placeholder: "Write a caption...",
                value: this.props.post.caption,
                onInput: this.onInput,
                error: { hasError: !!this.error, message: this.error },
                lines: 5,
              })
            )
          : null;
      }
    }
  );
  const { $later: vF, $store: bF, $analytics: yF, $ui: wF } = app,
    CF = {
      root: {
        ...wF.row,
        ...wF.alignItems.center,
        ...wF.padding("g1h g3"),
        borderTop: wF.border.dark,
        height: 60,
        flexShrink: 0,
        position: "relative",
      },
      status: {
        ...wF.row,
        ...wF.alignItems.center,
        ...wF.text.group1,
        color: wF.color.textPassive,
        fontWeight: 500,
      },
      statusSuccessIcon: { width: 24, height: 24, color: wF.color.textPassive },
      statusText: { ...wF.row, ...wF.text.nowrap, flexShrink: 0 },
      button: { paddingLeft: 20, paddingRight: 20 },
      scheduleButton: {
        paddingRight: wF.space.g2,
        background: "transparent",
        marginLeft: -16,
      },
      scheduleButtonIcon: { marginLeft: wF.space.g1h, ...wF.transition.slow },
      scheduleButtonIconRotated: { transform: "rotate(-180deg)" },
      scheduleDialog: {
        position: "absolute",
        left: wF.space.g2,
        bottom: "100%",
        zIndex: 10,
        marginBottom: wF.space.g1h,
      },
      deleteButton: {
        border: wF.border.dark,
        background: wF.color.bgLight1,
        color: wF.color.textPassive,
      },
      deleteButtonLabel: { minWidth: 65 },
      deleteButtonDanger: { color: wF.color.error },
    };
  function kF() {
    return (kF =
      Object.assign ||
      function (e) {
        for (var t = 1; t < arguments.length; t++) {
          var r = arguments[t];
          for (var n in r)
            Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
        }
        return e;
      }).apply(this, arguments);
  }
  vF.PostScreenFooter = bF.connect(() => ({
    post: vF.proxy.getSelectedPost(),
  }))(
    class extends wF.Component {
      constructor(e) {
        super(e),
          (this.onScheduleClick = () => {
            this.state.showScheduleDialog ||
              (this.setState({ showScheduleDialog: !0 }),
              setTimeout(() =>
                this.addEventListener(document, "click", this.onDocClick)
              ));
          }),
          (this.onDocClick = (e) => {
            e.target.closest(".LaterPostScreenScheduleDialog") ||
              this.closeScheduleDialog();
          }),
          (this.onPublishClick = () => {
            const e = this.props.post,
              t = "story" === e.type && e.mediaList.some((e) => e.isVideo),
              r = bF.proxy.hasPro({ feature: "storyAssist" });
            !t || r
              ? (yF.controller.sendEvent("user", "later:post-publish-click"),
                this.closeBodyPanel(),
                vF.proxy.updatePost(e.id, (e) => {
                  (e.status = "scheduled"),
                    (e.date = Date.now()),
                    (e.instant = !0);
                }))
              : bF.transaction((e) => (e.storyAssist.showUpsellOverlay = !0));
          }),
          (this.onDraftClick = () => {
            yF.controller.sendEvent("user", "later:post-draft-click"),
              this.closeBodyPanel(),
              vF.proxy.updatePost(this.props.post.id, (e) => {
                (e.status = "draft"), (e.date = null);
              });
          }),
          (this.onDeleteClick = () => {
            this.state.deleting || "posted" === this.props.post.status
              ? (this.closeBodyPanel(), vF.proxy.deletePost(this.props.post.id))
              : (this.setState({ deleting: !0 }),
                this.setTimeout(() => this.setState({ deleting: !1 }), 2500));
          }),
          (this.closeScheduleDialog = () => {
            this.setState({ showScheduleDialog: !1 }),
              document.removeEventListener("click", this.onDocClick);
          }),
          (this.state = { deleting: !1, showScheduleDialog: !1 });
      }
      get editable() {
        return vF.proxy.isPostEditable(this.props.post);
      }
      render() {
        return Glamor.createElement(
          "div",
          { css: CF.root },
          this.renderStatus(),
          this.renderScheduleButton(),
          this.renderScheduleDialog(),
          Glamor.createElement(wF.Spacer, { width: "g1h" }),
          this.renderPublishButton(),
          Glamor.createElement(wF.Spacer, { width: "g1h" }),
          this.renderDraftButton(),
          Glamor.createElement(wF.Spacer, { grow: !0 }),
          this.renderDeleteButton()
        );
      }
      renderStatus() {
        if (this.editable) return;
        const e = this.props.post;
        let t;
        if ("posting" === e.status)
          t = Glamor.createElement(React.Fragment, null, "Publishing...");
        else if ("posted" === e.status) {
          const r = vF.getDateTitle(e.date);
          t = Glamor.createElement(
            React.Fragment,
            null,
            Glamor.createElement(wF.SvgIcon, {
              style: CF.statusSuccessIcon,
              name: "igswiss.checkmark",
            }),
            Glamor.createElement(wF.Spacer, { width: "g1h" }),
            Glamor.createElement(
              "div",
              { css: CF.statusText },
              "Published",
              Glamor.createElement(wF.Spacer, { width: "g1" }),
              "‚Ä¢",
              Glamor.createElement(wF.Spacer, { width: "g1" }),
              r
            )
          );
        }
        return Glamor.createElement("div", { css: CF.status }, t);
      }
      renderScheduleButton() {
        if (!this.editable) return;
        const e = [
          CF.scheduleButtonIcon,
          this.state.showScheduleDialog && CF.scheduleButtonIconRotated,
        ];
        return Glamor.createElement(wF.ActionButton, {
          style: [CF.button, CF.scheduleButton],
          iconStyle: e,
          label: "SCHEDULE",
          icon: "triangle",
          isIconAtRight: !0,
          cancel: !0,
          onClick: this.onScheduleClick,
        });
      }
      renderScheduleDialog() {
        if (this.editable)
          return Glamor.createElement(vF.PostScreenScheduleDialog, {
            style: CF.scheduleDialog,
            show: this.state.showScheduleDialog,
            close: this.closeScheduleDialog,
          });
      }
      renderPublishButton() {
        if (this.editable)
          return Glamor.createElement(wF.ActionButton, {
            style: CF.button,
            label: "PUBLISH NOW",
            cancel: !0,
            onClick: this.onPublishClick,
          });
      }
      renderDraftButton() {
        if (this.editable && "draft" !== this.props.post.status)
          return Glamor.createElement(wF.ActionButton, {
            style: CF.button,
            label: "SAVE AS DRAFT",
            cancel: !0,
            onClick: this.onDraftClick,
          });
      }
      renderDeleteButton() {
        const e = this.props.post;
        if ("posting" === e.status) return;
        const t = this.state.deleting;
        let r;
        return (
          (r = t
            ? "SURE?"
            : "posted" === e.status
            ? "REMOVE FROM LIST"
            : "DELETE"),
          Glamor.createElement(wF.ActionButton, {
            style: [CF.button, CF.deleteButton, t && CF.deleteButtonDanger],
            label: Glamor.createElement(
              "div",
              { css: CF.deleteButtonLabel },
              r
            ),
            icon: "delete",
            cancel: !0,
            onClick: this.onDeleteClick,
          })
        );
      }
      closeBodyPanel() {
        bF.transaction((e) => {
          (e.later.showBodyPanel = !1), (e.later.selectedPostId = null);
        });
      }
    }
  );
  const { $later: SF, $store: EF, $files: _F, $ui: xF } = app,
    PF = {
      root: {},
      body: {
        width: "fit-content",
        height: "fit-content",
        position: "relative",
      },
      media: {
        maxWidth: "100%",
        maxHeight: "min(540px, calc(100vh - 500px + 8px + 44px))",
        minHeight: 200,
        borderRadius: 4,
      },
      openInNewTab: {
        ...xF.row,
        ...xF.alignItems.center,
        ...xF.justifyContent.center,
        ...xF.shadow.sh4,
        width: 26,
        height: 26,
        position: "absolute",
        top: xF.space.g1,
        right: xF.space.g1,
        color: "#3F3F3F",
        background: "#FFF",
        borderRadius: "50%",
        ...xF.transition.slow,
        ".LaterPostScreenPreview__body:not(:hover) &": { opacity: 0 },
      },
      tray: {
        ...xF.row,
        gap: xF.space.g1,
        marginTop: xF.space.g1,
        marginBottom: xF.space.g2,
      },
      thumbnails: { ...xF.row, gap: xF.space.g1, flexShrink: 0 },
      thumbnail: {
        width: 42,
        height: 42,
        flexShrink: 0,
        borderRadius: 4,
        cursor: "pointer",
        position: "relative",
        ...xF.hitboxBefore(4),
        ...xF.transition.slow,
      },
      thumbnailSingle: { cursor: "default" },
      thumbnailSelected: { opacity: 1 },
      thumbnailImage: {
        width: "100%",
        height: "100%",
        borderRadius: "inherit",
        backgroundSize: "cover",
        backgroundPosition: "center",
        backgroundRepeat: "no-repeat",
      },
      thumbnailDragImage: {
        width: 20,
        height: 20,
        borderRadius: 2,
        backgroundColor: "inherit",
        objectFit: "cover",
        position: "fixed",
        left: -1e4,
      },
      thumbnailError: {
        ...xF.row,
        ...xF.alignItems.center,
        ...xF.justifyContent.center,
        position: "absolute",
        inset: 0,
        color: xF.color.error,
        "&::before": {
          content: '""',
          position: "absolute",
          inset: 0,
          background: xF.color.bgLight3,
          opacity: 0.85,
        },
        "& .SvgIcon": { width: 18, height: 18 },
      },
      thumbnailMarker: {
        position: "absolute",
        left: 0,
        right: 0,
        top: "100%",
        marginTop: 4,
        height: 4,
        background: xF.color.link,
      },
      thumbnailRemove: {
        ...xF.row,
        ...xF.alignItems.center,
        ...xF.justifyContent.center,
        ...xF.shadow.sh4,
        ...xF.clickableInversed,
        width: 18,
        height: 18,
        position: "absolute",
        top: -4,
        right: -4,
        borderRadius: "50%",
        background: xF.color.bgLight3,
      },
      thumbnailRemoveIcon: {
        color: xF.color.textNormal,
        width: 10,
        height: 10,
        rotate: "45deg",
      },
      addButton: {
        ...xF.row,
        ...xF.alignItems.center,
        ...xF.justifyContent.center,
        ...xF.clickableInversed,
        ...xF.transition.slow,
        flexShrink: 0,
        width: 42,
        height: 42,
        color: xF.color.iconActionable,
        background: xF.color.bgLight2,
        border: `2px dashed ${xF.color.borderDark}`,
        borderRadius: 4,
      },
      addButtonProcessing: { pointerEvents: "none" },
      addButtonHighlight: {
        background: xF.color.bgLight1,
        borderColor: xF.color.iconActionable,
      },
      error: {
        ...xF.row,
        ...xF.alignItems.center,
        ...xF.justifyContent.center,
        ...xF.text.group1,
        color: "#FFF",
      },
    };
  (SF.PostScreenPreview = EF.connect(() => ({
    post: SF.proxy.getSelectedPost(),
  }))(
    class extends xF.Component {
      constructor(e) {
        super(e),
          (this.onThumbnailDragStart = (e) => {
            xF.dnd.setDragImage(e, 30),
              this.setState({ dragFileId: e.currentTarget.dataset.fileId });
          }),
          (this.onThumbnailDragEnd = (e) => {
            this.setState({ dragFileId: null });
          }),
          (this.onThumbnailDragOver = (e) => {
            e.preventDefault();
          }),
          (this.onThumbnailDragEnter = (e) => {
            const t = e.currentTarget.dataset.fileId,
              r = this.state.dragFileId;
            t !== r &&
              SF.proxy.updatePost(this.post.id, (e) => {
                const n = e.mediaList.findIndex((e) => e.fileId === r),
                  o = e.mediaList.findIndex((e) => e.fileId === t);
                if (-1 === n || -1 === o) return;
                const a = e.mediaList[n];
                e.mediaList.splice(n, 1), e.mediaList.splice(o, 0, a);
              });
          }),
          (this.onThumbnailClick = (e) => {
            const t = e.currentTarget.dataset.fileId;
            this.setState({ selectedFileId: t });
          }),
          (this.onRemoveClick = (e) => {
            let t;
            e.stopPropagation();
            const r = this.state.selectedFileId;
            SF.proxy.updatePost(this.post.id, (e) => {
              const n = e.mediaList.findIndex((e) => e.fileId === r);
              if (-1 === n) return;
              e.mediaList.splice(n, 1);
              const o = Math.min(n, e.mediaList.length - 1);
              t = e.mediaList[o].fileId;
            }),
              this.setState({ selectedFileId: t });
          }),
          (this.onAddClick = () => {
            SF.controller.startFileSelection(async (e) => {
              await SF.controller.addFilesToPost(this.post.id, e);
            });
          }),
          (this.rootRef = xF.createRef()),
          (this.addButtonRef = xF.createRef()),
          (this.state = {
            selectedFileId: e.post.mediaList[0].fileId,
            dragFileId: null,
          });
      }
      get root() {
        return this.rootRef.current;
      }
      get addButton() {
        return this.addButtonRef.current;
      }
      get post() {
        return this.props.post;
      }
      get editable() {
        return SF.proxy.isPostEditable(this.post);
      }
      get selectedMedia() {
        const e = this.state.selectedFileId;
        return this.post.mediaList.find((t) => t.fileId === e);
      }
      getSnapshotBeforeUpdate(e) {
        const t = e,
          r = this.props;
        if (
          t.post.mediaList.map((e) => e.fileId).join("-") !==
          r.post.mediaList.map((e) => e.fileId).join("-")
        ) {
          this.root
            .querySelectorAll(".LaterPostScreenPreview__thumbnail")
            .forEach((e) => xF.flip.add(e)),
            xF.flip.add(this.addButton);
        }
        return null;
      }
      componentDidUpdate() {
        xF.flip.run();
      }
      render() {
        return Glamor.createElement(
          "div",
          { css: PF.root, ref: this.rootRef },
          this.renderLabel(),
          this.renderTray(),
          this.renderBody()
        );
      }
      renderLabel() {
        return Glamor.createElement(xF.Label, null, "preview");
      }
      renderBody() {
        return Glamor.createElement(
          "div",
          { className: "LaterPostScreenPreview__body", css: PF.body },
          Glamor.createElement(
            _F.Renderer,
            { fileId: this.selectedMedia.fileId },
            (e, t) =>
              Glamor.createElement(
                React.Fragment,
                null,
                "ok" === t && this.renderMedia(e),
                "ok" === t && this.renderOpenInNewTabButton(e),
                "failed" === t && this.renderError()
              )
          )
        );
      }
      renderMedia(e) {
        return this.selectedMedia.isVideo
          ? Glamor.createElement("video", {
              css: PF.media,
              src: e,
              controls: !0,
              controlsList: "noplaybackrate",
              disablePictureInPicture: !0,
            })
          : Glamor.createElement("img", {
              css: PF.media,
              src: e,
              draggable: !1,
            });
      }
      renderOpenInNewTabButton(e) {
        return Glamor.createElement(
          "a",
          { css: PF.openInNewTab, href: e, target: "_blank" },
          Glamor.createElement(xF.SvgIcon, { name: "link" })
        );
      }
      renderTray() {
        if (this.editable || 1 !== this.post.mediaList.length)
          return Glamor.createElement(
            "div",
            { css: PF.tray },
            this.renderThumbnails(),
            this.renderAddButton()
          );
      }
      renderThumbnails() {
        return Glamor.createElement(
          "div",
          { css: PF.thumbnails },
          this.post.mediaList.map((e) => this.renderThumbnail(e))
        );
      }
      renderThumbnail(e) {
        if (!e) return;
        const t = this.state.selectedFileId === e.fileId,
          r = 1 === this.post.mediaList.length;
        return Glamor.createElement(
          "div",
          {
            key: e.fileId,
            className: "LaterPostScreenPreview__thumbnail",
            css: [
              PF.thumbnail,
              r && PF.thumbnailSingle,
              t && PF.thumbnailSelected,
            ],
            style: { background: e.color },
            "data-file-id": e.fileId,
            draggable: !r && this.editable,
            onClick: r ? null : this.onThumbnailClick,
            onDragStart: r ? null : this.onThumbnailDragStart,
            onDragEnd: r ? null : this.onThumbnailDragEnd,
            onDragOver: r ? null : this.onThumbnailDragOver,
            onDragEnter: r ? null : this.onThumbnailDragEnter,
          },
          Glamor.createElement(_F.Renderer, { fileId: e.previewId }, (e) =>
            Glamor.createElement(
              React.Fragment,
              null,
              Glamor.createElement("div", {
                css: PF.thumbnailImage,
                style: { backgroundImage: `url('${e}')` },
              }),
              Glamor.createElement("img", {
                css: PF.thumbnailDragImage,
                src: e,
              })
            )
          ),
          this.renderThumbnailError(e),
          t && !r && Glamor.createElement("div", { css: PF.thumbnailMarker }),
          t &&
            !r &&
            this.editable &&
            Glamor.createElement(
              "div",
              { css: PF.thumbnailRemove, onClick: this.onRemoveClick },
              Glamor.createElement(xF.SvgIcon, {
                style: PF.thumbnailRemoveIcon,
                name: "plus",
              })
            )
        );
      }
      renderThumbnailError(e) {
        const t = SF.proxy.getMediaError(this.post, e);
        if (t)
          return Glamor.createElement(SF.PostScreenPreview.ThumbnailError, {
            message: t.message,
          });
      }
      renderAddButton() {
        if (!this.editable) return;
        if (this.post.mediaList.length >= 10) return;
        const e = this.post.processing;
        return Glamor.createElement(
          "div",
          {
            css: [
              PF.addButton,
              e && PF.addButtonProcessing,
              this.props.dragOver && !e && PF.addButtonHighlight,
            ],
            ref: this.addButtonRef,
            onClick: this.onAddClick,
          },
          e
            ? Glamor.createElement(xF.ProgressRing, {
                size: 20,
                value: 30,
                spinning: !0,
              })
            : Glamor.createElement(xF.SvgIcon, { name: "plus" })
        );
      }
      renderError() {
        return Glamor.createElement(
          "div",
          { css: PF.error },
          Glamor.createElement("div", null, "FILE NOT FOUND"),
          Glamor.createElement(xF.Spacer, { width: "g1h" }),
          Glamor.createElement(xF.InfoCircle, {
            tooltip: { text: "File was deleted from the browser's storage" },
          })
        );
      }
    }
  )),
    (SF.PostScreenPreview.ThumbnailError = class extends xF.Component {
      constructor(e) {
        super(e), (this.state = { hovered: !1 });
      }
      render() {
        return Glamor.createElement(
          "div",
          kF({ css: PF.thumbnailError }, xF.hoverState(this, "hovered")),
          Glamor.createElement(
            xF.Tooltip,
            {
              shown: this.state.hovered,
              background: xF.color.error,
              text: this.props.message,
              arrowAtCenter: !0,
            },
            Glamor.createElement(xF.SvgIcon, { name: "tip.exclamation" })
          )
        );
      }
    });
  const { $later: TF, $store: IF, $ui: GF } = app,
    DF = {
      root: {
        ...GF.row,
        ...GF.alignItems.center,
        ...GF.text.bleakSemiBold,
        ...GF.transition.superfast,
        color: GF.color.positive,
        transitionTimingFunction: "linear",
      },
      icon: { width: 12, height: 12 },
      rootHidden: { opacity: 0, pointerEvents: "none" },
    };
  TF.PostScreenSavedBadge = IF.connect((e) => ({
    post: TF.proxy.getSelectedPost(),
  }))(
    class extends GF.Component {
      constructor(e) {
        super(e),
          (this.showTimeout = null),
          (this.hideTimeout = null),
          (this.state = { show: !1 });
      }
      componentDidUpdate(e) {
        const t = e,
          r = this.props;
        for (const e in t.post) {
          if (t.post[e] !== r.post[e]) return void this.show();
        }
      }
      render() {
        return Glamor.createElement(
          "div",
          { css: [DF.root, !this.state.show && DF.rootHidden] },
          Glamor.createElement(GF.SvgIcon, { style: DF.icon, name: "tick" }),
          Glamor.createElement(GF.Spacer, { width: "g1" }),
          Glamor.createElement("div", null, "SAVED")
        );
      }
      show() {
        clearTimeout(this.showTimeout),
          clearTimeout(this.hideTimeout),
          (this.showTimeout = this.setTimeout(() => {
            this.setState({ show: !0 }),
              (this.hideTimeout = this.setTimeout(() => {
                this.setState({ show: !1 });
              }, 1200));
          }, 450));
      }
    }
  );
  const { $later: AF, $store: MF, $analytics: FF, $ui: RF } = app,
    LF = {
      root: {
        ...RF.shadow.sh10,
        ...RF.borderRadius.r4,
        ...RF.padding("g2"),
        ...RF.transition.fast,
        width: 294,
        background: RF.color.bgLight3,
      },
      rootHidden: { opacity: 0, translate: "0 5px", pointerEvents: "none" },
      title: {
        ...RF.text.contentText,
        marginBottom: RF.space.g1h,
        display: "none",
      },
      footer: {
        ...RF.row,
        ...RF.justifyContent.between,
        marginTop: RF.space.g2,
      },
      cancelButton: { paddingRight: RF.space.g0h },
    };
  AF.PostScreenScheduleDialog = MF.connect((e) => ({
    post: AF.proxy.getSelectedPost(),
    selectedUserId: e.later.selectedUserId,
  }))(
    class extends RF.Component {
      constructor(e) {
        super(e),
          (this.onApplyClick = () => {
            if (!MF.proxy.hasPro({ feature: "later" }))
              return void MF.transaction((e) => (e.later.showUpsell = !0));
            this.dateTimePicker.validateTime();
            const e = this.dateTimePicker.getDate();
            e &&
              (FF.controller.sendEvent("user", "later:post-schedule-click"),
              AF.proxy.updatePost(this.props.post.id, (t) => {
                (t.status = "scheduled"), (t.date = e);
              }),
              MF.transaction((t) => {
                (t.later.showBodyPanel = !1), (t.later.selectedPostId = null);
                AF.proxy.getPostOwnerState(
                  t,
                  this.props.post.id
                ).later.lastDate = e;
              }));
          }),
          (this.onCancelClick = () => {
            this.props.close && this.props.close();
          }),
          (this.dateTimePickerRef = RF.createRef());
      }
      get dateTimePicker() {
        return this.dateTimePickerRef.current;
      }
      componentDidUpdate(e) {
        const t = e,
          r = this.props;
        !t.show && r.show && this.dateTimePicker.setDate(this.props.post.date);
      }
      render() {
        return Glamor.createElement(
          "div",
          {
            className: "LaterPostScreenScheduleDialog",
            css: [LF.root, !this.props.show && LF.rootHidden, this.props.style],
          },
          Glamor.createElement(
            "div",
            { css: LF.title },
            "Select when to publish"
          ),
          Glamor.createElement(AF.DateTimePicker, {
            ref: this.dateTimePickerRef,
            userId: this.props.selectedUserId,
          }),
          Glamor.createElement(
            "div",
            { css: LF.footer },
            Glamor.createElement(RF.ActionButton, {
              label: "APPLY",
              onClick: this.onApplyClick,
            }),
            Glamor.createElement(RF.LinkButton, {
              style: LF.cancelButton,
              label: "CANCEL",
              cancel: !0,
              onClick: this.onCancelClick,
            })
          )
        );
      }
    }
  );
  const { $later: BF, $store: OF, $ui: $F } = app,
    NF = {
      root: { maxWidth: 492 },
      body: {
        ...$F.row,
        ...$F.alignItems.center,
        height: 30,
        gap: $F.space.g1,
      },
      pill: { "& .SvgIcon": { width: 15, height: 15 } },
    };
  BF.PostScreenTypeSelect = OF.connect(() => ({
    post: BF.proxy.getSelectedPost(),
  }))(
    class extends $F.Component {
      constructor(...e) {
        var t;
        return (
          (t = super(...e)),
          (this.onPillClick = (e) => {
            BF.proxy.updatePost(this.props.post.id, (t) => {
              t.type = e.type;
            });
          }),
          (this.onShareToFeedChange = () => {
            BF.proxy.updatePost(this.props.post.id, (e) => {
              e.shareToFeed = !e.shareToFeed;
            });
          }),
          t
        );
      }
      get labelText() {
        const e = this.props.post;
        return "post" === e.type
          ? e.mediaList.length > 1
            ? "carousel post"
            : "single post"
          : "story" === e.type
          ? e.mediaList.length > 1
            ? "series of stories"
            : "single story"
          : "reel" === e.type
          ? e.mediaList.length > 1
            ? "series of reels"
            : "single reel"
          : void 0;
      }
      render() {
        const e = this.props.post;
        return BF.proxy.isPostEditable(e)
          ? Glamor.createElement(
              "div",
              { css: NF.root },
              Glamor.createElement(
                $F.Label,
                null,
                "type (",
                this.labelText,
                ")"
              ),
              Glamor.createElement(
                "div",
                { css: NF.body },
                this.renderPill({
                  type: "post",
                  icon: "post",
                  label: "Post",
                  selected: "post" === e.type,
                }),
                this.renderPill({
                  type: "reel",
                  icon: "reel",
                  label: "Reel",
                  selected: "reel" === e.type,
                }),
                this.renderPill({
                  type: "story",
                  icon: "story",
                  label: "Story",
                  selected: "story" === e.type,
                }),
                Glamor.createElement($F.Spacer, { grow: !0 }),
                this.renderShareToFeedSwitch()
              )
            )
          : null;
      }
      renderPill({
        type: e,
        icon: t,
        label: r,
        selected: n,
        disabled: o,
        tooltip: a,
      }) {
        return Glamor.createElement($F.Pill, {
          style: NF.pill,
          label: r,
          icon: t,
          type: e,
          value: n,
          disabled: o,
          tooltip: a,
          onChange: this.onPillClick,
        });
      }
      renderShareToFeedSwitch() {
        if ("reel" === this.props.post.type)
          return Glamor.createElement($F.Switch, {
            label: "Share to Feed",
            value: this.props.post.shareToFeed,
            onChange: this.onShareToFeedChange,
          });
      }
    }
  );
  const { $later: UF, $store: HF, $billing: zF, $ui: jF } = app,
    WF = {
      root: { ...jF.column, height: "100%", position: "relative" },
      header: {
        ...jF.row,
        ...jF.alignItems.baseline,
        ...jF.padding("g2 g3"),
        flexShrink: 0,
      },
      headerWithBorder: { borderBottom: jF.border.dark },
      title: { ...jF.text.contentTitle },
      closeButton: { ...jF.absolute("g1 g1 . .") },
      body: {
        ...jF.column,
        ...jF.padding("0 g3 g3 g3"),
        gap: jF.space.g3,
        flexGrow: 1,
        overflow: "auto",
      },
      footer: {
        ...jF.row,
        ...jF.alignItems.center,
        ...jF.padding("g1h g2"),
        borderTop: jF.border.dark,
        flexShrink: 0,
      },
    };
  function VF() {
    return (VF =
      Object.assign ||
      function (e) {
        for (var t = 1; t < arguments.length; t++) {
          var r = arguments[t];
          for (var n in r)
            Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
        }
        return e;
      }).apply(this, arguments);
  }
  UF.PostScreen = HF.connect((e) => ({
    post: UF.proxy.getSelectedPost(),
    showLaterUpsell: e.later.showUpsell,
    showStoryUpsell: e.storyAssist.showUpsellOverlay,
  }))(
    class extends jF.Component {
      constructor(e) {
        super(e),
          (this.onDragOver = (e) => {
            0 !== e.dataTransfer.items.length &&
              "post" === this.props.post.type &&
              UF.proxy.isPostEditable(this.props.post) &&
              (e.preventDefault(),
              this.setState({ dragOver: !0 }),
              clearTimeout(this.dragLeaveTimeout),
              (this.dragLeaveTimeout = this.setTimeout(() => {
                this.setState({ dragOver: !1 });
              }, 100)));
          }),
          (this.onDrop = async (e) => {
            if ("post" !== this.props.post.type) return;
            e.preventDefault(),
              e.stopPropagation(),
              this.setState({ dragOver: !1 });
            const t = [...e.dataTransfer.files];
            0 !== t.length &&
              (await UF.controller.addFilesToPost(this.props.post.id, t));
          }),
          (this.onCloseClick = () => {
            HF.transaction((e) => {
              e.later.showBodyPanel = !1;
            }),
              this.setTimeout(() => {
                HF.transaction((e) => {
                  e.later.selectedPostId = null;
                });
              }, 300);
          }),
          (this.onBodyScroll = (e) => {
            const t = e.currentTarget.scrollTop > 5;
            this.state.scrolled !== t && this.setState({ scrolled: t });
          }),
          (this.onLaterUpsellOverlayClick = () => {
            HF.transaction((e) => (e.later.showUpsell = !1));
          }),
          (this.onStoryUpsellOverlayClick = () => {
            HF.transaction((e) => (e.storyAssist.showUpsellOverlay = !1));
          }),
          (this.dragLeaveTimeout = null),
          (this.state = { scrolled: !1, dragOver: !1 });
      }
      render() {
        return Glamor.createElement(
          "div",
          {
            css: WF.root,
            onDragOver: this.onDragOver,
            onDragLeave: this.onDragLeave,
            onDrop: this.onDrop,
          },
          this.renderHeader(),
          this.renderBody(),
          this.renderFooter(),
          this.renderCloseButton(),
          this.renderUpsellOverlays()
        );
      }
      renderHeader() {
        return Glamor.createElement(
          "div",
          { css: [WF.header, this.state.scrolled && WF.headerWithBorder] },
          Glamor.createElement("div", { css: WF.title }, "Post Details"),
          Glamor.createElement(jF.Spacer, { width: "g2" }),
          Glamor.createElement(UF.PostScreenSavedBadge, null)
        );
      }
      renderBody() {
        return Glamor.createElement(
          "div",
          { css: WF.body, onScroll: this.onBodyScroll },
          Glamor.createElement(UF.PostScreenTypeSelect, null),
          Glamor.createElement(UF.PostScreenCaption, null),
          Glamor.createElement(UF.PostScreenPreview, {
            dragOver: this.state.dragOver,
          })
        );
      }
      renderFooter() {
        return Glamor.createElement(UF.PostScreenFooter, null);
      }
      renderCloseButton() {
        return Glamor.createElement(jF.CloseButton, {
          style: WF.closeButton,
          onClick: this.onCloseClick,
        });
      }
      renderUpsellOverlays() {
        return Glamor.createElement(
          React.Fragment,
          null,
          Glamor.createElement(zF.UpsellOverlayMediator, {
            show: this.props.showLaterUpsell,
            noArt: !0,
            feature: "later",
            onOverlayClick: this.onLaterUpsellOverlayClick,
          }),
          Glamor.createElement(zF.UpsellOverlayMediator, {
            show: this.props.showStoryUpsell,
            noArt: !0,
            feature: "video-stories",
            onOverlayClick: this.onStoryUpsellOverlayClick,
          })
        );
      }
    }
  );
  const { $later: qF, $store: ZF, $analytics: YF, $ui: QF } = app,
    KF = {
      root: {
        ...QF.row,
        ...QF.noselect,
        ...QF.alignItems.center,
        ...QF.padding("g2"),
        ...QF.transition.fast,
        height: 76,
        marginBottom: QF.space.g2,
        borderRadius: 6,
        background: QF.color.bgLight2,
        border: `2px dashed ${QF.color.borderDark}`,
        "&.LaterSidePanelAddCard_highlight": {
          background: QF.color.bgLight1,
          borderColor: QF.color.iconActionable,
        },
        "&.LaterSidePanelAddCard_processing": { pointerEvents: "none" },
        "&.LaterSidePanelAddCard_clickable": { ...QF.clickableInversed },
        "&.LaterSidePanelAddCard_csvHovered": { filter: "none !important" },
      },
      iconContainer: {
        ...QF.row,
        ...QF.alignItems.center,
        ...QF.justifyContent.center,
        width: 35,
        marginRight: QF.space.g2,
        flexShrink: 0,
      },
      icon: { color: QF.color.iconPassive },
      body: {},
      title: {
        ...QF.text.group1,
        color: QF.color.link,
        marginBottom: QF.space.g0h,
        ".LaterSidePanelAddCard_processing &": { color: QF.color.textPassive },
      },
      text: { ...QF.text.bleak },
      csvLink: { ...QF.clickable },
    };
  qF.SidePanelAddCard = ZF.connect((e) => ({ processing: e.later.processing }))(
    class extends QF.Component {
      constructor(e) {
        super(e),
          (this.onClick = (e) => {
            "default" === this.screen &&
              (e.target.closest("a") ||
                qF.controller.startFileSelection((e) => this.addFiles(e)));
          }),
          (this.onCreateSeparatePostsClick = async () => {
            const e = this.files.length;
            YF.controller.sendEvent(
              "user",
              "later:add-files-create-separate",
              e
            ),
              this.setState({ showForm: !1 }),
              await qF.controller.createDrafts(this.files);
          }),
          (this.onCreateSinglePostClick = async () => {
            const e = this.files.length;
            YF.controller.sendEvent("user", "later:add-files-create-multi", e),
              this.setState({ showForm: !1 });
            const t = ZF.state.later.selectedUserId;
            await qF.controller.createCarouselDraft(t, this.files);
          }),
          (this.onCancelClick = () => {
            this.setState({ showForm: !1 });
          }),
          (this.files = []),
          (this.state = { showForm: !1, fileCount: 0, csvHovered: !1 });
      }
      get className() {
        const e = this.props.processing;
        return [
          "LaterSidePanelAddCard",
          this.props.dragOver && !e && "LaterSidePanelAddCard_highlight",
          e && "LaterSidePanelAddCard_processing",
          "default" === this.screen && "LaterSidePanelAddCard_clickable",
          this.state.csvHovered && "LaterSidePanelAddCard_csvHovered",
        ]
          .filter(Boolean)
          .join(" ");
      }
      get screen() {
        return this.props.processing
          ? "processing"
          : this.state.showForm
          ? "form"
          : "default";
      }
      async addFiles(e) {
        YF.controller.sendEvent("user", "later:add-files", e.length);
        const t = e.some((e) => "text/csv" === e.type);
        1 === e.length || t
          ? (this.setState({ showForm: !1 }),
            await qF.controller.createDrafts(e))
          : ((this.files = e),
            this.setState({ showForm: !0, fileCount: e.length }));
      }
      render() {
        return Glamor.createElement(
          "div",
          { className: this.className, css: KF.root, onClick: this.onClick },
          this.renderDefaultContent(),
          this.renderProcessingContent(),
          this.renderFormContent()
        );
      }
      renderDefaultContent() {
        if ("default" !== this.screen) return;
        const e = Glamor.createElement(
          "a",
          VF(
            {
              css: KF.csvLink,
              href: "https://gist.github.com/slashedio/34e1fe9b143183c9cde86070c85f532c",
              target: "_blank",
            },
            QF.hoverState(this, "csvHovered")
          ),
          "CSV"
        );
        return Glamor.createElement(
          React.Fragment,
          null,
          Glamor.createElement(
            "div",
            { css: KF.iconContainer },
            Glamor.createElement(QF.SvgIcon, {
              style: KF.icon,
              name: "igswiss.upload",
            })
          ),
          Glamor.createElement(
            "div",
            { css: KF.body },
            Glamor.createElement("div", { css: KF.title }, "ADD FILES"),
            Glamor.createElement(
              "div",
              { css: KF.text },
              "Click to add photos, videos, or ",
              e,
              "."
            )
          )
        );
      }
      renderProcessingContent() {
        if ("processing" === this.screen)
          return Glamor.createElement(
            React.Fragment,
            null,
            Glamor.createElement(
              "div",
              { css: KF.iconContainer },
              Glamor.createElement(QF.ProgressRing, {
                size: 30,
                value: 30,
                spinning: !0,
              })
            ),
            Glamor.createElement(
              "div",
              { css: KF.body },
              Glamor.createElement("div", { css: KF.title }, "ADDING..."),
              Glamor.createElement(
                "div",
                { css: KF.text },
                "Files are being processed"
              )
            )
          );
      }
      renderFormContent() {
        if ("form" === this.screen)
          return Glamor.createElement(
            React.Fragment,
            null,
            Glamor.createElement(
              "div",
              { css: KF.iconContainer },
              Glamor.createElement(QF.SvgIcon, {
                style: KF.icon,
                name: "igswiss.upload",
              })
            ),
            Glamor.createElement(
              "div",
              { css: KF.body },
              Glamor.createElement(
                "div",
                { css: KF.text },
                "You've selected ",
                this.state.fileCount,
                " files, choose how to save:"
              ),
              Glamor.createElement(QF.Spacer, { height: 6 }),
              Glamor.createElement(
                "div",
                { css: QF.row },
                Glamor.createElement(QF.ActionButton, {
                  label: `${this.state.fileCount} POSTS`,
                  small: !0,
                  onClick: this.onCreateSeparatePostsClick,
                }),
                Glamor.createElement(QF.Spacer, { width: "g1" }),
                Glamor.createElement(QF.ActionButton, {
                  label: "CAROUSEL POST",
                  small: !0,
                  onClick: this.onCreateSinglePostClick,
                }),
                Glamor.createElement(QF.Spacer, { width: "g1" }),
                Glamor.createElement(QF.ActionButton, {
                  icon: "igswiss.times",
                  small: !0,
                  cancel: !0,
                  color: QF.color.textPassive,
                  background: QF.color.bgLight2,
                  onClick: this.onCancelClick,
                })
              )
            )
          );
      }
    }
  );
  const { $later: XF, $store: JF, $utils: eR, $ui: tR } = app,
    rR = {
      root: { "& *": { filter: "none !important" } },
      menu: { left: "auto", right: 0 },
      value: { ...tR.row, ...tR.alignItems.center },
      info: {
        ...tR.transition.superfast,
        ".Dropdown__toggler:not(:hover) &": { opacity: 0 },
      },
      infoTooltip: { width: 290, maxWidth: 290, "& *": { maxWidth: 290 } },
    };
  XF.SidePanelAutoRetrySelect = JF.connect((e) => ({
    value: e.settings.laterAutoRetry,
  }))(
    class extends tR.Component {
      constructor(...e) {
        var t;
        return (
          (t = super(...e)),
          (this.onChange = (e) => {
            JF.transaction((t) => {
              t.settings.laterAutoRetry = e.value;
            });
          }),
          t
        );
      }
      get items() {
        return [
          { value: -1, label: "Auto-retry when online" },
          {
            value: 1 * eR.time.HOUR,
            label: "Auto-retry for 1 hour",
            duration: "1 hour",
          },
          {
            value: 3 * eR.time.HOUR,
            label: "Auto-retry for 3 hours",
            duration: "3 hours",
          },
          {
            value: 12 * eR.time.HOUR,
            label: "Auto-retry for 12 hours",
            duration: "12 hours",
          },
          { value: 0, label: "Do not auto-retry if offline" },
        ].map((e) => {
          const t = e.value === this.props.value;
          return { ...e, selected: t };
        });
      }
      render() {
        return Glamor.createElement(
          "div",
          { className: "LaterSidePanelAutoRetrySelect", css: rR.root },
          Glamor.createElement(tR.Dropdown, {
            menuStyle: rR.menu,
            inline: !0,
            value: this.renderValue(),
            items: this.items,
            onChange: this.onChange,
          })
        );
      }
      renderValue() {
        const e = this.items.find((e) => e.selected),
          t = e.label;
        let r;
        return (
          (r =
            0 === e.value
              ? Glamor.createElement(
                  React.Fragment,
                  null,
                  "INSSIST ",
                  Glamor.createElement("b", null, "will not"),
                  " retry publishing a post if your computer was offline at the scheduled time."
                )
              : -1 === e.value
              ? Glamor.createElement(
                  React.Fragment,
                  null,
                  "INSSIST will retry to publish your post once your computer comes online."
                )
              : Glamor.createElement(
                  React.Fragment,
                  null,
                  "INSSIST will retry to publish a post if your computer was offline at a scheduled time, for up to ",
                  Glamor.createElement("b", null, e.duration),
                  "."
                )),
          Glamor.createElement(
            "div",
            { css: rR.value },
            Glamor.createElement(tR.InfoCircle, {
              style: rR.info,
              tooltip: {
                style: rR.infoTooltip,
                title: t.toUpperCase(),
                text: r,
                arrowAtCenter: !0,
              },
            }),
            Glamor.createElement(tR.Spacer, { width: "g1" }),
            Glamor.createElement("div", null, t)
          )
        );
      }
    }
  );
  const { $later: nR, $store: oR, $ui: aR } = app,
    iR = {
      root: { width: "calc((100% - 16px) / 3)", aspectRatio: "1 / 1" },
      rootClickable: { ...aR.clickable },
    };
  nR.SidePanelGridPost = class extends aR.Component {
    constructor(...e) {
      var t;
      return (
        (t = super(...e)),
        (this.onClick = (e) => {
          oR.transaction((e) => {
            e.later.selectedPostId === this.props.post.id
              ? ((e.later.showBodyPanel = !1), (e.later.selectedPostId = null))
              : ((e.later.showBodyPanel = !0),
                (e.later.selectedPillId = !1),
                (e.later.selectedPostId = this.props.post.id));
          });
        }),
        (this.onDragStart = (e) => {
          aR.dnd.setDragImage(e),
            aR.dnd.onDrop(() => nR.proxy.applyDnd()),
            oR.transaction((e) => {
              e.later.dnd.dragPostId = this.props.post.id;
            });
        }),
        (this.onDragEnter = () => {
          oR.transaction((e) => {
            e.later.dnd.dragOverPostId = this.props.post.id;
          });
        }),
        t
      );
    }
    render() {
      const e = this.props.post;
      return !e.status
        ? this.renderIgPost()
        : Glamor.createElement(
            "div",
            {
              css: [iR.root, iR.rootClickable],
              draggable: "scheduled" === e.status,
              onDragStart: this.onDragStart,
              onDragEnter: this.onDragEnter,
              onClick: this.onClick,
            },
            Glamor.createElement(nR.PostTeaser, { post: e, showDate: !0 })
          );
    }
    renderIgPost() {
      const e = this.props.post,
        t = {
          color: e.color,
          previewId: e.previewId,
          isVideo: "video" === e.type,
        },
        r = {
          id: e.id,
          date: e.date,
          type: "post",
          status: "posted",
          mediaList: [t, ...("carousel" === e.type ? [{}] : [])],
        };
      return Glamor.createElement(
        "div",
        { css: iR.root },
        Glamor.createElement(nR.PostTeaser, { post: r, hideStatus: !0 })
      );
    }
  };
  const { $later: sR, $store: lR, $ui: cR } = app,
    uR = {
      root: {
        ...cR.row,
        flexWrap: "wrap",
        gap: cR.space.g1,
        position: "relative",
      },
      loading: {
        position: "absolute",
        inset: "0",
        zIndex: 1,
        background: cR.color.bgLight3,
        opacity: 0.98,
        minHeight: 125,
      },
      spinnerContainer: {
        ...cR.row,
        ...cR.alignItems.center,
        ...cR.justifyContent.center,
        position: "sticky",
        top: "calc(50vh - 15px)",
        width: "100%",
        minHeight: "inherit",
      },
      post: { width: "calc((100% - 16px) / 3)", aspectRatio: "1 / 1" },
      postClickable: { ...cR.clickable },
    };
  function dR() {
    return (dR =
      Object.assign ||
      function (e) {
        for (var t = 1; t < arguments.length; t++) {
          var r = arguments[t];
          for (var n in r)
            Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
        }
        return e;
      }).apply(this, arguments);
  }
  sR.SidePanelGrid = lR.connect(() => {
    const e = sR.proxy.getSelectedUserState();
    return {
      loading: e.later.ig.loading,
      posts: [
        ...sR.proxy.getSelectedUserPosts().filter((e) => {
          const t = "post" === e.type || ("reel" === e.type && e.shareToFeed),
            r = "scheduled" === e.status || "posting" === e.status;
          return t && r;
        }),
        ...e.later.ig.posts,
      ],
    };
  })(
    class extends cR.Component {
      render() {
        return Glamor.createElement(
          "div",
          { css: uR.root },
          this.renderLoading(),
          this.renderPosts()
        );
      }
      renderLoading() {
        if (this.props.loading)
          return Glamor.createElement(
            "div",
            { css: uR.loading },
            Glamor.createElement(
              "div",
              { css: uR.spinnerContainer },
              Glamor.createElement(cR.ProgressRing, {
                size: 30,
                value: 30,
                spinning: !0,
              })
            )
          );
      }
      renderPosts() {
        return this.props.posts.map((e) =>
          Glamor.createElement(sR.SidePanelGridPost, { post: e, key: e.id })
        );
      }
    }
  );
  const { $later: hR, $store: pR, $ui: mR } = app,
    gR = {
      root: {
        ...mR.row,
        gap: mR.space.g1h,
        height: 96,
        padding: 2,
        background: mR.color.bgLight2,
        border: mR.border.dark,
        position: "relative",
        cursor: "pointer",
        ...mR.noselect,
        ...mR.borderRadius.r4,
        ...mR.transition.superslow,
        "html:not(.dragging) &:hover": { ...mR.shadow.sh12 },
      },
      rootFresh: { opacity: 0, transform: "scale(0.5)" },
      rootSelected: {
        borderTopRightRadius: 0,
        borderBottomRightRadius: 0,
        "&::before": {
          content: '""',
          ...mR.absolute("-1 -1 -1 ."),
          width: 4,
          background: mR.color.link,
        },
      },
      teaser: { width: 90, height: 90 },
      body: { ...mR.column, paddingTop: 6, paddingBottom: 6, paddingRight: 10 },
      title: { ...mR.text.contentTitle, marginBottom: mR.space.g0h },
      corner: { position: "absolute", top: mR.space.g1, right: mR.space.g1 },
      content: { ...mR.text.bleak, flexGrow: 1 },
      caption: {
        overflow: "hidden",
        display: "-webkit-box",
        WebkitLineClamp: "3",
        WebkitBoxOrient: "vertical",
        wordBreak: "break-word",
      },
      error: { ...mR.column, height: "100%" },
      errorTooltip: { "& *": { wordBreak: "break-all" } },
      clockIcon: { width: 24, height: 24, color: mR.color.iconPassive },
      errorIcon: { color: mR.color.error, width: 18, marginRight: 2 },
      successIcon: {
        width: 24,
        height: 24,
        position: "relative",
        left: 2,
        color: mR.color.textPassive,
      },
    };
  hR.SidePanelPost = pR.connect((e) => ({
    selectedPostId: e.later.selectedPostId,
  }))(
    class extends mR.Component {
      constructor(e) {
        super(e),
          (this.onClick = (e) => {
            e.target.closest("button") ||
              pR.transaction((e) => {
                e.later.selectedPostId === this.props.post.id
                  ? ((e.later.showBodyPanel = !1),
                    (e.later.selectedPostId = null))
                  : ((e.later.showBodyPanel = !0),
                    (e.later.selectedPillId = null),
                    (e.later.selectedPostId = this.props.post.id));
              });
          }),
          (this.onRetryClick = () => {
            hR.proxy.updatePost(this.props.post.id, (e) => {
              (e.date = Date.now()), (e.status = "scheduled");
            });
          }),
          (this.onDragStart = (e) => {
            mR.dnd.setDragImage(e),
              mR.dnd.onDrop(() => hR.proxy.applyDnd()),
              pR.transaction((e) => {
                e.later.dnd.dragPostId = this.props.post.id;
              });
          }),
          (this.onDragEnter = () => {
            this.draggable &&
              pR.transaction((e) => {
                e.later.dnd.dragOverPostId = this.props.post.id;
              });
          }),
          (this.state = { cornerHovered: !1 });
      }
      get selected() {
        return this.props.selectedPostId === this.props.post.id;
      }
      get title() {
        return "posting" === this.props.post.status
          ? "Publishing..."
          : "draft" === this.props.post.status
          ? hR.getDateTitle("draft")
          : hR.getDateTitle(this.props.post.date);
      }
      get draggable() {
        const e = this.props.post.status;
        return "draft" === e || "scheduled" === e;
      }
      render() {
        const e = this.props.post.fresh,
          t = this.selected;
        return Glamor.createElement(
          "div",
          {
            className: "LaterSidePanelPost",
            css: [gR.root, e && gR.rootFresh, t && gR.rootSelected],
            "data-id": this.props.post.id,
            draggable: this.draggable,
            onClick: this.onClick,
            onDragStart: this.onDragStart,
            onDragEnter: this.onDragEnter,
          },
          this.renderTeaser(),
          this.renderBody()
        );
      }
      renderTeaser() {
        return Glamor.createElement(hR.PostTeaser, {
          style: gR.teaser,
          post: this.props.post,
        });
      }
      renderBody() {
        return Glamor.createElement(
          "div",
          { css: gR.body },
          this.renderTitle(),
          this.renderCorner(),
          Glamor.createElement(
            "div",
            { css: gR.content },
            this.renderCaption(),
            this.renderError()
          )
        );
      }
      renderTitle() {
        return Glamor.createElement("div", { css: gR.title }, this.title);
      }
      renderCorner() {
        const e = this.props.post;
        return Glamor.createElement(
          "div",
          dR({ css: gR.corner }, mR.hoverState(this, "cornerHovered")),
          "scheduled" === e.status &&
            Glamor.createElement(mR.SvgIcon, {
              style: gR.clockIcon,
              name: "schedule",
            }),
          "failed" === e.status &&
            Glamor.createElement(
              mR.Tooltip,
              {
                style: gR.errorTooltip,
                shown: this.state.cornerHovered,
                text: e.error.details || "No error details",
                background: mR.color.error,
              },
              Glamor.createElement(mR.SvgIcon, {
                style: gR.errorIcon,
                name: "warning-triangle-small",
              })
            ),
          "posting" === e.status &&
            Glamor.createElement(mR.ProgressRing, {
              size: 20,
              value: 30,
              spinning: !0,
            }),
          "posted" === e.status &&
            Glamor.createElement(mR.SvgIcon, {
              style: gR.successIcon,
              name: "igswiss.checkmark",
            })
        );
      }
      renderCaption() {
        const e = this.props.post;
        if ("failed" === e.status) return;
        const t = "story" !== e.type ? e.caption : null;
        return Glamor.createElement(
          "div",
          { css: gR.caption },
          t || "No caption"
        );
      }
      renderError() {
        if ("failed" === this.props.post.status && this.props.post.error)
          return Glamor.createElement(
            "div",
            { css: gR.error },
            Glamor.createElement("div", null, this.props.post.error.message),
            Glamor.createElement(mR.Spacer, { grow: !0 }),
            Glamor.createElement(mR.LinkButton, {
              label: "RETRY NOW",
              onClick: this.onRetryClick,
            })
          );
      }
    }
  );
  const { $later: fR, $store: vR, $ui: bR } = app,
    yR = {
      dropdown: { "& *": { filter: "none !important" } },
      menu: { marginLeft: -2 },
      value: {},
      item: {
        ...bR.padding("g0h g3 g0h g1h"),
        maxWidth: 400,
        cursor: "pointer",
        position: "relative",
        color: bR.color.textNormal,
        "&:hover": { color: "#FFF", background: bR.color.link },
      },
      itemSelected: {
        "&::before": {
          content: '""',
          position: "absolute",
          top: 0,
          left: 0,
          bottom: 0,
          width: bR.space.g0h,
          background: bR.color.link,
        },
      },
      user: { ...bR.row, ...bR.alignItems.center, gap: bR.space.g1 },
      avatar: {
        width: 24,
        height: 24,
        borderRadius: "50%",
        backgroundSize: "cover",
        backgroundPosition: "center",
        backgroundColor: bR.color.bgLight1,
        position: "relative",
        flexShrink: 0,
      },
      username: {
        ...bR.text.elementNormal,
        ...bR.text.nowrap,
        ...bR.text.ellipsis,
        color: "inherit",
      },
    };
  fR.SidePanelUserSelect = vR.connect((e) => ({
    users: fR.proxy
      .getAllConnectedStates()
      .map((t) => ({
        id: t.auth.userId,
        selected: t.auth.userId === e.later.selectedUserId,
        username: t.auth.username,
        avatarUrl: t.auth.avatarUrl,
      })),
  }))(
    class extends bR.Component {
      constructor(e) {
        super(e),
          (this.renderItem = (e) =>
            Glamor.createElement(
              "div",
              {
                css: [yR.item, e.selected && yR.itemSelected],
                key: e.id,
                "data-user-id": e.id,
                onClick: this.onItemClick,
              },
              this.renderUser(e)
            )),
          (this.onItemClick = (e) => {
            this.dropdown.close(),
              vR.transaction((t) => {
                const r = e.currentTarget.dataset.userId;
                t.later.selectedUserId !== r &&
                  ((t.later.selectedUserId = r),
                  t.later.selectedPostId &&
                    ((t.later.showBodyPanel = !1),
                    (t.later.selectedPostId = null)));
              });
          }),
          (this.dropdownRef = bR.createRef());
      }
      get dropdown() {
        return this.dropdownRef.current;
      }
      render() {
        return 0 === this.props.users.length
          ? null
          : 1 === this.props.users.length
          ? this.renderValue()
          : Glamor.createElement(bR.Dropdown, {
              ref: this.dropdownRef,
              style: yR.dropdown,
              menuStyle: yR.menu,
              maxHeight: "400",
              inline: !0,
              value: this.renderValue(),
              items: this.props.users,
              renderer: this.renderItem,
            });
      }
      renderValue() {
        const e = this.props.users.find((e) => e.selected);
        return e
          ? Glamor.createElement("div", { css: yR.value }, this.renderUser(e))
          : null;
      }
      renderUser(e) {
        return Glamor.createElement(
          "div",
          { css: yR.user },
          Glamor.createElement("div", {
            css: yR.avatar,
            style: { backgroundImage: `url("${e.avatarUrl}")` },
            "cdn-proxy-image": "",
          }),
          Glamor.createElement("div", { css: yR.username }, e.username)
        );
      }
    }
  );
  const { $later: wR, $store: CR, $ui: kR } = app,
    SR = {
      root: { ...kR.column, ...kR.padding("g2 g3 160 g3"), ...kR.relative() },
      title: { ...kR.text.mainTitle, marginBottom: kR.space.g1 },
      description: {
        ...kR.text.bleak,
        lineHeight: "20px",
        marginBottom: kR.space.g2,
        "& b": { opacity: 0.8, color: kR.color.primary },
        "html.theme-night & b": { color: kR.color.textNormal },
      },
      header: { ...kR.row, ...kR.justifyContent.between },
      divider: {
        height: 1,
        width: "100%",
        background: kR.color.borderDark,
        marginTop: kR.space.g1h,
        marginBottom: kR.space.g2,
      },
      controls: {
        ...kR.row,
        ...kR.alignItems.center,
        gap: kR.space.g1h,
        marginBottom: kR.space.g2,
      },
      posts: { ...kR.column, gap: kR.space.g1h },
      noPosts: { ...kR.text.bleak },
      footer: {
        ...kR.row,
        ...kR.justifyContent.end,
        ...kR.transition.superslow,
        marginTop: kR.space.g2,
        "& *": { color: kR.color.textActionable },
      },
    },
    ER = "later-side-panel.calendar",
    _R = "later-side-panel.time-slots";
  kR.SvgIcon.registerSvgIcons([
    `<symbol id="${ER}" viewBox="0 0 15 15"><path d="M4860.91,175.455a3.545,3.545,0,1,1,3.545,3.544A3.55,3.55,0,0,1,4860.91,175.455Zm1.172,0a2.373,2.373,0,1,0,2.374-2.374A2.375,2.375,0,0,0,4862.082,175.455ZM4855.344,179a2.347,2.347,0,0,1-2.345-2.343v-9.141a2.347,2.347,0,0,1,2.345-2.343h.732v-.586a.586.586,0,1,1,1.171,0v.586h2.638v-.586a.586.586,0,1,1,1.171,0v.586h2.666v-.586a.586.586,0,1,1,1.171,0v.586h.763a2.345,2.345,0,0,1,2.343,2.343v3.34a.586.586,0,0,1-1.172,0v-3.34a1.173,1.173,0,0,0-1.171-1.172h-.763v.585a.586.586,0,1,1-1.171,0v-.585h-2.666v.585a.586.586,0,1,1-1.171,0v-.585h-2.638v.585a.586.586,0,1,1-1.171,0v-.585h-.732a1.174,1.174,0,0,0-1.173,1.172v9.141a1.174,1.174,0,0,0,1.173,1.172h4.482a.586.586,0,0,1,0,1.172Zm9.111-2.959a.586.586,0,0,1-.586-.585v-1.2a.586.586,0,0,1,1.172,0v.616h.264a.586.586,0,1,1,0,1.172Zm-5.831-.79a.586.586,0,1,1,.586.585A.587.587,0,0,1,4858.625,175.25Zm-2.548,0a.586.586,0,1,1,.586.585A.587.587,0,0,1,4856.076,175.25Zm2.548-2.548a.586.586,0,1,1,.586.585A.587.587,0,0,1,4858.625,172.7Zm-2.548,0a.586.586,0,1,1,.586.585A.587.587,0,0,1,4856.076,172.7Zm7.646-2.55a.586.586,0,1,1,.586.586A.586.586,0,0,1,4863.723,170.152Zm-2.548,0a.586.586,0,1,1,.585.586A.584.584,0,0,1,4861.174,170.152Zm-2.55,0a.586.586,0,1,1,.586.586A.586.586,0,0,1,4858.625,170.152Zm-2.548,0a.586.586,0,1,1,.586.586A.586.586,0,0,1,4856.076,170.152Z" transform="translate(-4853 -164)" fill="#fff"/></symbol>`,
    `<symbol id="${_R}" viewBox="0 0 15 15"><path d="M4858.988,178.847a7.463,7.463,0,0,1-1.407-.437,7.543,7.543,0,0,1-3.991-4,7.534,7.534,0,0,1,2.717-9.163c.1-.065.194-.128.293-.188l.767,1.242c-.082.05-.165.1-.246.158a6.072,6.072,0,0,0-2.189,7.382,6.068,6.068,0,0,0,2.189,2.666,6.042,6.042,0,0,0,4.6.911,5.954,5.954,0,0,0,1.134-.353,6.061,6.061,0,0,0,1.027-.558,6.135,6.135,0,0,0,.893-.739,6.064,6.064,0,0,0,1.295-1.927,5.855,5.855,0,0,0,.352-1.137,6.091,6.091,0,0,0,0-2.441,5.855,5.855,0,0,0-.352-1.137,6.1,6.1,0,0,0-2.188-2.666c-.042-.029-.086-.057-.131-.086l.768-1.242.178.116a7.557,7.557,0,0,1,2.717,3.308,7.527,7.527,0,0,1-1.608,8.244,7.5,7.5,0,0,1-2.384,1.613,7.531,7.531,0,0,1-4.431.437Zm.958-6.357h-.5v-5.5h2v3.5h2.5v2Zm1.771-6.945c-.153-.032-.309-.057-.465-.077l.155-1.453c.2.024.405.057.6.1a7.511,7.511,0,0,1,.971.269l-.463,1.387A6.027,6.027,0,0,0,4861.718,165.545Zm-3.628-1.187a7.45,7.45,0,0,1,1.637-.358l.173,1.451a6.137,6.137,0,0,0-.618.094,5.863,5.863,0,0,0-.712.193Z" transform="translate(-4853 -164)" fill="#fff"/></symbol>`,
  ]),
    (wR.SidePanel = CR.connect((e) => ({
      posts: wR.proxy.getSelectedUserPosts(),
      showGrid: e.later.showGrid,
      selectedUserId: e.later.selectedUserId,
      selectedPillId: e.later.selectedPillId,
    }))(
      class extends kR.Component {
        constructor(e) {
          super(e),
            (this.onDragOver = (e) => {
              0 !== e.dataTransfer.items.length &&
                (e.preventDefault(),
                this.setState({ dragOver: !0 }),
                clearTimeout(this.dragLeaveTimeout),
                (this.dragLeaveTimeout = this.setTimeout(() => {
                  this.setState({ dragOver: !1 });
                }, 100)));
            }),
            (this.onDrop = async (e) => {
              e.preventDefault(),
                e.stopPropagation(),
                this.setState({ dragOver: !1 });
              const t = [...e.dataTransfer.files];
              0 !== t.length && (await this.addCard.addFiles(t));
            }),
            (this.onClearPublishedClick = () => {
              CR.transaction((e) => {
                (e = wR.proxy.getSelectedUserState(e)).later.posts =
                  e.later.posts.filter((e) => "posted" !== e.status);
                const t = e.later.selectedPostId;
                t &&
                  !e.later.posts.find((e) => e.id === t) &&
                  ((e.later.showBodyPanel = !1),
                  (e.later.selectedPostId = null));
              });
            }),
            (this.onPillClick = ({ pillId: e }) => {
              CR.transaction((t) => {
                t.later.selectedPillId === e
                  ? ((t.later.showBodyPanel = !1),
                    (t.later.selectedPillId = null))
                  : ((t.later.showBodyPanel = !0),
                    (t.later.selectedPostId = null),
                    (t.later.selectedPillId = e));
              });
            }),
            (this.onShowGridChange = () => {
              CR.transaction((e) => {
                e.later.showGrid = !e.later.showGrid;
              });
            }),
            (this.rootRef = kR.createRef()),
            (this.footerRef = kR.createRef()),
            (this.addCardRef = kR.createRef()),
            (this.dragLeaveTimeout = null),
            (this.state = { dragOver: !1 });
        }
        get root() {
          return this.rootRef.current;
        }
        get footer() {
          return this.footerRef.current;
        }
        get addCard() {
          return this.addCardRef.current;
        }
        getSnapshotBeforeUpdate(e) {
          const t = e,
            r = this.props;
          if (
            t.posts.map((e) => e.id).join("-") !==
              r.posts.map((e) => e.id).join("-") &&
            t.selectedUserId === r.selectedUserId
          ) {
            this.root
              .querySelectorAll(".LaterSidePanelPost")
              .forEach((e) => kR.flip.add(e)),
              kR.flip.add(this.footer);
          }
          return null;
        }
        componentDidUpdate() {
          kR.flip.run();
        }
        render() {
          return Glamor.createElement(
            "div",
            {
              css: SR.root,
              ref: this.rootRef,
              onDragOver: this.onDragOver,
              onDrop: this.onDrop,
            },
            this.renderTitle(),
            this.renderDescription(),
            this.renderHeader(),
            this.renderDivider(),
            this.renderAddCard(),
            this.renderControls(),
            this.renderPosts(),
            this.renderNoPosts(),
            this.renderFooter(),
            this.renderGrid()
          );
        }
        renderTitle() {
          return Glamor.createElement("div", { css: SR.title }, "Post Later");
        }
        renderDescription() {
          return Glamor.createElement(
            "div",
            { css: SR.description },
            "Schedule photos, videos, carousels, stories and reels.",
            Glamor.createElement("br", null),
            "Posts are published automatically if you are ",
            Glamor.createElement("b", null, "online"),
            "."
          );
        }
        renderHeader() {
          return Glamor.createElement(
            "div",
            { css: SR.header },
            Glamor.createElement(wR.SidePanelUserSelect, null),
            Glamor.createElement(wR.SidePanelAutoRetrySelect, null)
          );
        }
        renderDivider() {
          return Glamor.createElement("div", { css: SR.divider });
        }
        renderAddCard() {
          return Glamor.createElement(wR.SidePanelAddCard, {
            ref: this.addCardRef,
            dragOver: this.state.dragOver,
          });
        }
        renderControls() {
          return Glamor.createElement(
            "div",
            { css: SR.controls },
            Glamor.createElement(kR.Pill, {
              label: "TIME SLOTS",
              icon: _R,
              selectColor: kR.color.link,
              value: "time-slots" === this.props.selectedPillId,
              pillId: "time-slots",
              onChange: this.onPillClick,
            }),
            Glamor.createElement(kR.Pill, {
              label: "CALENDAR",
              icon: ER,
              selectColor: kR.color.link,
              value: "calendar" === this.props.selectedPillId,
              pillId: "calendar",
              onChange: this.onPillClick,
            }),
            Glamor.createElement(kR.Spacer, { grow: !0 }),
            Glamor.createElement(kR.Switch, {
              label: "Grid View",
              value: this.props.showGrid,
              onChange: this.onShowGridChange,
            })
          );
        }
        renderPosts() {
          if (!this.props.showGrid && 0 !== this.props.posts.length)
            return Glamor.createElement(
              "div",
              { css: SR.posts },
              this.props.posts.map((e) =>
                Glamor.createElement(wR.SidePanelPost, { key: e.id, post: e })
              )
            );
        }
        renderNoPosts() {
          if (!(this.props.showGrid || this.props.posts.length > 0))
            return Glamor.createElement(
              "div",
              { css: SR.noPosts },
              "Your posts scheduled with INSSIST will appear here."
            );
        }
        renderFooter() {
          if (this.props.showGrid) return;
          return this.props.posts.some((e) => "posted" === e.status)
            ? Glamor.createElement(
                "div",
                { css: SR.footer, ref: this.footerRef },
                Glamor.createElement(kR.LinkButton, {
                  label: "CLEAR PUBLISHED",
                  onClick: this.onClearPublishedClick,
                })
              )
            : void 0;
        }
        renderGrid() {
          if (this.props.showGrid)
            return Glamor.createElement(wR.SidePanelGrid, null);
        }
      }
    ));
  const { $later: xR, $store: PR, $ui: TR } = app,
    IR = {
      root: {
        ...TR.row,
        ...TR.borderRadius.r4,
        ...TR.noselect,
        ...TR.margin(". 8 8 ."),
        ...TR.padding("8 . 8 8"),
        ...TR.text.of({
          size: 11,
          height: "14px",
          weight: 600,
          color: TR.color.primary,
          opacity: 0.9,
        }),
      },
      addIcon: { width: 24, height: 24, marginTop: 4, marginLeft: 4 },
      controls: { ...TR.column, minWidth: 190 },
    };
  xR.SlotsScreenAddSlot = class extends TR.Component {
    constructor(e) {
      super(e),
        (this.onTimeInput = () => {
          this.setState({ timeError: null });
        }),
        (this.onTimeChange = (e) => {
          this.setState({ time: e });
        }),
        (this.onKeyUp = (e) => {
          this.props.onAddClick && "Enter" === e.key && this.onAddClick();
        }),
        (this.onAddClick = () => {
          if (!this.state.time)
            return (
              this.setState({ timeError: { hasError: !0 } }),
              void this.timeInputRef.current.inputRef.current.input.current.focus()
            );
          const e = this.state.time;
          this.setState({ time: null }),
            PR.transaction((t) => {
              !!(t = xR.proxy.getSelectedUserState(t)).later.timeSlots.find(
                (t) => t.time === e
              ) ||
                (t.later.timeSlots.push({ time: e }),
                t.later.timeSlots.sort((e, t) => e.time - t.time));
            });
        }),
        (this.timeInputRef = TR.createRef()),
        (this.state = { time: null, timeError: null });
    }
    render() {
      return Glamor.createElement(
        "div",
        { css: IR.root },
        Glamor.createElement(TR.SvgIcon, {
          name: "igswiss.plus",
          style: IR.addIcon,
        }),
        Glamor.createElement(TR.Spacer, { width: "g2" }),
        Glamor.createElement(
          "div",
          { css: IR.controls },
          Glamor.createElement(TR.TimeInput, {
            ref: this.timeInputRef,
            time: this.state.time,
            onInput: this.onTimeInput,
            onChange: this.onTimeChange,
            inputAttrs: { onKeyUp: this.onKeyUp },
            error: this.state.timeError,
          }),
          Glamor.createElement(TR.Spacer, { height: "g1" }),
          this.renderActionButtons()
        )
      );
    }
    renderActionButtons() {
      return Glamor.createElement(
        "div",
        { css: TR.row },
        Glamor.createElement(TR.LinkButton, {
          label: "ADD NEW SLOT",
          small: !0,
          onClick: this.onAddClick,
        })
      );
    }
  };
  const { $later: GR, $store: DR, $ui: AR } = app,
    MR = {
      root: {
        ...AR.column,
        ...AR.alignItems.stretch,
        ...AR.borderRadius.r4,
        ...AR.noselect,
        ...AR.margin(". 8 8 ."),
        ...AR.padding("8"),
        ...AR.text.of({
          size: 18,
          height: "24px",
          weight: 600,
          color: AR.color.primary,
          opacity: 0.9,
        }),
        border: AR.border.dark,
        background: AR.color.bgLight1,
      },
      label: { ...AR.row, ...AR.alignItems.center, marginBottom: 8 },
      icon: { width: 24, height: 24, color: AR.color.primary },
    };
  GR.SlotsScreenSlot = class extends AR.Component {
    constructor(...e) {
      var t;
      return (
        (t = super(...e)),
        (this.onDeleteClick = () => {
          const e = this.props.time;
          DR.transaction((t) => {
            (t = GR.proxy.getSelectedUserState(t)).later.timeSlots =
              t.later.timeSlots.filter((t) => t.time !== e);
          });
        }),
        t
      );
    }
    render() {
      return Glamor.createElement(
        "div",
        { css: MR.root },
        this.renderLabel(),
        this.renderActionButtons()
      );
    }
    renderLabel() {
      const e = GR.timeToIcon(this.props.time),
        t = GR.timeToHhmm(this.props.time);
      return Glamor.createElement(
        "div",
        { css: MR.label },
        Glamor.createElement(AR.SvgIcon, { name: e, style: MR.icon }),
        Glamor.createElement(AR.Spacer, { width: "g1h" }),
        t
      );
    }
    renderActionButtons() {
      return Glamor.createElement(AR.LinkButton, {
        label: "DELETE SLOT",
        small: !0,
        onClick: this.onDeleteClick,
      });
    }
  };
  const { $later: FR, $store: RR, $ui: LR } = app,
    BR = {
      root: { width: "100%", ...LR.padding("g2 g2 g2 g3") },
      description: {
        ...LR.text.contentText,
        color: LR.color.textBleak,
        marginTop: LR.space.g2,
        marginBottom: LR.space.g2,
      },
      slotsContainer: {
        ...LR.grid,
        justifyItems: "stretch",
        gridTemplateColumns: "repeat(2, 50fr)",
        maxWidth: 500,
      },
    };
  FR.SlotsScreen = RR.connect(() => {
    const e = FR.proxy.getSelectedUserState();
    return { slots: (null == e ? void 0 : e.later.timeSlots) || [] };
  })(
    class extends LR.Component {
      constructor(...e) {
        var t;
        return (
          (t = super(...e)),
          (this.onCloseClick = () => {
            RR.transaction((e) => {
              e.later.showBodyPanel = !1;
            }),
              this.setTimeout(() => {
                RR.transaction((e) => {
                  e.later.selectedPillId = null;
                });
              }, 300);
          }),
          t
        );
      }
      render() {
        return Glamor.createElement(
          "div",
          { css: BR.root },
          this.renderHeader(),
          this.renderDescription(),
          this.renderSlotsSelector()
        );
      }
      renderHeader() {
        return Glamor.createElement(LR.ScreenHeader, {
          title: "Time Slots",
          onCloseClick: this.onCloseClick,
        });
      }
      renderDescription() {
        return Glamor.createElement(
          "div",
          { css: BR.description },
          "Manage slots for quick scheduling"
        );
      }
      renderSlotsSelector() {
        return this.props.slots
          ? Glamor.createElement(
              "div",
              { css: LR.column },
              Glamor.createElement(
                "div",
                { css: BR.slotsContainer },
                this.props.slots.map((e) =>
                  Glamor.createElement(FR.SlotsScreenSlot, {
                    key: e.time,
                    time: e.time,
                  })
                )
              ),
              Glamor.createElement(LR.Spacer, { height: "g1" }),
              Glamor.createElement("div", null, "ADD SLOT"),
              Glamor.createElement(FR.SlotsScreenAddSlot, null)
            )
          : null;
      }
    }
  );
  const { $later: OR, $store: $R, $dateFns: NR } = app;
  OR.calendarController = {
    createScheduledPost: async function (e) {
      const t = await new Promise((e) => {
        OR.controller.startFileSelection((t) => e(t));
      });
      let r;
      $R.transaction((e) => {
        e.later.processing = !0;
      });
      const { validFiles: n, errors: o } = await OR.validator.validate(t);
      if (n.length > 0) {
        const t = OR.proxy.getSelectedUserState().auth.userId;
        r = await OR.controller.createPost(t, n, {
          date: e,
          status: "scheduled",
        });
      }
      return (
        $R.transaction((e) => {
          (e.later.processing = !1), (e.later.errors = o);
        }),
        r || null
      );
    },
    getMonthCells: function (e) {
      const t = NR.startOfDay(new Date()),
        r = NR.startOfMonth(e),
        n = NR.endOfMonth(e),
        o = NR.startOfWeek(r);
      let a = NR.endOfWeek(n);
      NR.differenceInCalendarDays(a, o) < 41 && (a = NR.addWeeks(a, 1));
      const i = [];
      let s = o;
      for (; s <= a; ) i.push(s), (s = NR.addDays(s, 1));
      return i.map((r, n) => ({
        day: r.getTime(),
        dayOfMonth: NR.getDate(r),
        row: Math.floor(n / 7),
        column: n % 7,
        today: NR.isSameDay(r, t),
        outer: !NR.isSameMonth(r, e),
        actionable: r >= t,
      }));
    },
    getWeekCells: function (e, t = !1) {
      const r = NR.startOfWeek(e),
        n = [
          NR.addDays(r, 0),
          NR.addDays(r, 1),
          NR.addDays(r, 2),
          NR.addDays(r, 3),
          NR.addDays(r, 4),
          NR.addDays(r, 5),
          NR.addDays(r, 6),
        ],
        o = OR.proxy.getSelectedUserState(),
        a = [null, ...(t ? o.later.timeSlots : [])],
        i = Date.now();
      return a
        .map((e, t) => {
          const r = a[t + 1];
          return n.map((n, o) => {
            const s = n.getTime(),
              l = e ? s + e.time : NR.startOfDay(n).getTime();
            return {
              day: s,
              dateFrom: l,
              dateTo: r ? s + r.time : NR.endOfDay(n).getTime(),
              slot: e,
              row: t,
              column: o,
              isLastRow: t === a.length - 1,
              actionable: l >= i,
            };
          });
        })
        .flat();
    },
  };
  const {
    $later: UR,
    $store: HR,
    $files: zR,
    $utils: jR,
    $musicAssist: WR,
    $iframeBus: VR,
    $analytics: qR,
    $shortid: ZR,
    $bus: YR,
  } = app;
  UR.controller = {
    init: function () {
      UR.igController.init(),
        this._dropFreshMarkerForPosts(),
        this._resetDateOnCreationStart(),
        VR.on("later.saveCurrentPost", this._saveCurrentIgPostSafe.bind(this));
    },
    startFileSelection: function (e) {
      const t = document.createElement("input");
      t.setAttribute("type", "file"),
        t.setAttribute("multiple", !0),
        t.setAttribute("accept", UR.config.mimeTypes.join(", ")),
        t.addEventListener("change", async (t) => {
          t.preventDefault(), e([...t.target.files]);
        }),
        t.click();
    },
    createDrafts: async function (e = []) {
      HR.transaction((e) => {
        e.later.processing = !0;
      });
      const { validFiles: t, errors: r } = await UR.validator.validate(e),
        n = HR.state.later.selectedUserId;
      for (const e of t)
        if (jR.file.isCsv(e)) {
          const t = await UR.csvController.processFile(e);
          for (const e of t)
            r.push(...e.errors),
              0 !== e.files.length &&
                (await jR.sleep(450),
                await this.createPost(n, e.files, {
                  date: e.date,
                  status: e.date ? "scheduled" : "draft",
                  caption: e.caption,
                }));
        } else await jR.sleep(450), await this.createPost(n, [e]);
      HR.transaction((e) => {
        (e.later.errors = r), (e.later.processing = !1);
      });
    },
    createCarouselDraft: async function (e, t = []) {
      HR.transaction((e) => {
        e.later.processing = !0;
      });
      const { validFiles: r, errors: n } = await UR.validator.validate(t);
      await jR.sleep(450);
      const o = await this.createPost(e, r);
      HR.transaction((t) => {
        (t.later.processing = !1),
          (t.later.errors = n),
          o &&
            ((t.later.showBodyPanel = !0),
            (t.later.selectedPillId = null),
            (t.later.selectedUserId = e),
            (t.later.selectedPostId = o));
      });
    },
    addFilesToPost: async function (e, t) {
      qR.controller.sendEvent("user", "later:post-add-files", t.length),
        UR.proxy.updatePost(e, (e) => {
          e.processing = !0;
        });
      const { validFiles: r, errors: n } = await UR.validator.validate(t);
      for (const t of r) {
        if (UR.proxy.getPost(e).mediaList.length >= UR.config.maxCarouselFiles)
          break;
        await jR.sleep(450);
        const r = await this._createMedia(t);
        r && UR.proxy.updatePost(e, (e) => e.mediaList.push(r));
      }
      UR.proxy.updatePost(e, (e) => {
        e.processing = !1;
      }),
        HR.transaction((e) => {
          e.later.errors = n;
        });
    },
    createPost: async function (e, t = [], r = {}) {
      HR.transaction((e) => (e.later.showGrid = !1)),
        (t = t.slice(0, UR.config.maxCarouselFiles));
      const n = [];
      for (const e of t) {
        const t =
          e instanceof Blob
            ? await this._createMedia(e)
            : await this._createMedia(e.file, e.cover);
        t && n.push(t);
      }
      if (0 === n.length) return null;
      let o = null;
      return (
        HR.transaction((t) => {
          (t = UR.proxy.getUserState(t, e)) &&
            ((o = ZR.generate()),
            t.later.posts.push({
              date: null,
              type: "post",
              status: "draft",
              caption: "",
              location: null,
              mentions: null,
              shareToFeed: !0,
              error: null,
              ...r,
              id: o,
              mediaList: n,
            }));
        }),
        o
      );
    },
    _dropFreshMarkerForPosts: function () {
      HR.transaction((e) => {
        const t = UR.proxy.getAllPosts(e);
        for (const e of t) delete e.fresh;
      });
    },
    _resetDateOnCreationStart: function () {
      VR.on("ig.creation-session-start", () => {
        HR.transaction((e) => (e.later.selectedIgDate = null));
      });
    },
    _saveCurrentIgPostSafe: async function (e) {
      try {
        return await this._saveCurrentIgPost(e), !0;
      } catch (e) {
        return console.error("[$later] Failed to save post", e), !1;
      }
    },
    _saveCurrentIgPost: async function (e = null) {
      var t;
      e
        ? qR.controller.sendEvent("user", "later:ig-schedule-click")
        : qR.controller.sendEvent("user", "later:ig-draft-click");
      const r = await VR.send("later.getPostInfo");
      if (!r) throw new Error("No post info from ig frame");
      await YR.send("auth.actualizeCookies"),
        r.isVideo &&
          WR.videoGenerator.shouldGenerate() &&
          (r.blob = await WR.videoGenerator.generate(r.blob));
      const n = await this.createPost(
        HR.state.auth.userId,
        [{ file: r.blob, cover: r.coverBlob }],
        {
          date: e,
          type: r.type,
          status: e ? "scheduled" : "draft",
          caption: r.caption || "",
          location: r.location,
          mentions: r.mentions,
          shareToFeed: null === (t = r.shareToFeed) || void 0 === t || t,
          fresh: !0,
        }
      );
      e && HR.transaction((t) => (t.later.lastDate = e)),
        VR.send("ig.ajax-go", "/"),
        HR.transaction((e) => {
          (e.sidebar.isOpen = !0),
            (e.sidebar.selectedTabId = "tab-later"),
            (e.later.selectedUserId = e.auth.userId);
        }),
        setTimeout(() => {
          UR.proxy.updatePost(n, (e) => delete e.fresh);
        }, 150);
    },
    _createMedia: async function (e, t = null) {
      try {
        const r = jR.file.isVideo(e);
        let n;
        return (
          r && !t
            ? ((t = await jR.extractFrame(e, 0)),
              (n = await jR.generateSquarePreview(t)),
              n.colorDiversity < 10 &&
                ((t = await jR.extractFrame(e, 0.5)),
                (n = await jR.generateSquarePreview(t))))
            : (n = await jR.generateSquarePreview(e)),
          {
            isVideo: r,
            color: n.averageColor,
            fileId: await zR.controller.save(e, "later"),
            previewId: await zR.controller.save(n.blob, "later"),
            ...(r && {
              coverId: await zR.controller.save(t, "later"),
              duration: (await jR.loadVideoMetadata(e)).duration,
            }),
          }
        );
      } catch (e) {
        return console.error("failed to create media", e), null;
      }
    },
  };
  const { $later: QR, $utils: KR, $dateFns: XR } = app;
  QR.csvController = {
    processFile: async function (e) {
      const t = URL.createObjectURL(e),
        r = await fetch(t),
        n = await r.text(),
        o = this._csvToTable(n),
        a = [],
        i = Date.now();
      for (const e of o) {
        const {
            date: t,
            files: r,
            caption: n,
            errors: o,
          } = await this._parseRow(e),
          { validFiles: s, errors: l } = await QR.validator.validate(r);
        a.push({
          date: t > i ? t : null,
          caption: n || "",
          errors: [...o, ...l],
          files: s,
        });
      }
      return a;
    },
    _csvToTable: function (e) {
      const t = [],
        r = "{{__br__}}",
        n = "{{__quote__}}",
        o = "{{__comma__}}";
      let a = !1;
      const i = e
        .replaceAll('""', n)
        .split("")
        .map((e) =>
          a && "\n" === e
            ? r
            : a && "," === e
            ? o
            : '"' !== e
            ? e
            : ((a = !a), "")
        )
        .join("")
        .split("\n");
      for (const e of i) {
        const a = this._guessDelimiter(e),
          i = e
            .split(a)
            .map((e) =>
              e.replaceAll(r, "\n").replaceAll(n, '"').replaceAll(o, ",").trim()
            );
        t.push(i);
      }
      return t;
    },
    _guessDelimiter: function (e) {
      const t = [",", ";", "\t", "|"];
      let r = null,
        n = 0;
      for (const o of t) {
        const t = e.split(o).length;
        (!r || t > n) && ((r = o), (n = t));
      }
      return r || ",";
    },
    _parseRow: async function (e) {
      let t = null;
      const r = [],
        n = [],
        o = [];
      for (const a of e) {
        const e = a.trim();
        if (e.startsWith("http://") || e.startsWith("https://")) {
          if (n.length >= QR.config.maxCarouselFiles) continue;
          try {
            const t = await fetch(e, { credentials: "include" }),
              r = await t.blob(),
              o = new File([r], e, { type: r.type });
            n.push(o);
          } catch {
            o.push({ type: "fetch", filename: e });
          }
        } else (!t && ((t = this._parseDate(e)), t)) || r.push(e);
      }
      return {
        date: t,
        caption: (r.sort((e, t) => t.length - e.length)[0] || "").slice(
          0,
          QR.config.maxCaptionLength
        ),
        files: n,
        errors: o,
      };
    },
    _parseDate: function (e) {
      e = e
        .trim()
        .toLowerCase()
        .replaceAll("at ", " ")
        .replaceAll(",", " ")
        .replaceAll(":", ".")
        .replaceAll("-", ".")
        .replaceAll("/", ".")
        .replace(/(\d) am/, "$1am")
        .replace(/(\d) pm/, "$1pm")
        .replace(/\s+/g, " ");
      const t = Date.now(),
        r = XR.startOfDay(t).getTime();
      e = e.replace(/(today|tomorrow)( ?\+ ?(\d*))?/, (...e) => {
        let t = Number(e[3] || 0);
        "tomorrow" === e[1] && (t += 1);
        const n = new Date(r + t * KR.time.DAY);
        return XR.format(n, "dd.MM.yyyy");
      });
      const n = (() => {
          const n = ["H.mm", "h.mma"],
            o = e.split(" ");
          for (const e of o)
            for (const o of n) {
              const n = XR.parse(e, o, t);
              if (!isNaN(n)) return { str: e, ms: n.getTime() - r };
            }
          return { str: "", ms: t - r };
        })(),
        o = e.replace(n.str, "").trim(),
        a = (() => {
          const e = [
            "dd.MM.yy",
            "dd.MM.yyyy",
            "yyyy.dd.MM",
            "MM.dd.yy",
            "MM.dd.yyyy",
            "yyyy.MM.dd",
            "dd MMMM yyyy",
            "MMMM dd yyyy",
            "yyyy MMMM dd",
            "yyyy dd MMMM",
          ];
          new Date("11 Jan 2023").toLocaleDateString().startsWith("11") &&
            e.reverse();
          for (const t of e) {
            const e = XR.parse(o, t, new Date());
            if (!isNaN(e)) return e.getTime();
          }
          return null;
        })();
      return a ? a + n.ms : null;
    },
  };
  const {
    $later: JR,
    $store: eL,
    $utils: tL,
    $bus: rL,
    $files: nL,
    $iframeBus: oL,
  } = app;
  JR.igController = {
    init: function () {
      this._updatePosts(),
        this._updatePostsOnUserChange(),
        this._updatePostsOnFastGridToggle(),
        rL.on("later.updateIgPosts", this._updatePosts.bind(this));
    },
    _updatePostsOnUserChange: function () {
      eL.model.observe(
        (e) => e.later.selectedUserId,
        (e) => this._updatePosts(e),
        !1
      );
    },
    _updatePostsOnFastGridToggle: function () {
      let e = Date.now();
      eL.model.observe(
        (e) => e.later.showGrid,
        () => {
          const t = Date.now(),
            r = t - e;
          (e = t), r > 300 || this._updatePosts(null, !0);
        },
        !1
      );
    },
    _updatePosts: async function (e = null, t = !1) {
      e || (e = eL.state.later.selectedUserId);
      const r = JR.proxy.getUserState(eL.state, e);
      if (!r.auth.loggedIn) return;
      const n = Date.now() - r.later.ig.updatedAt;
      if (!t && n < 2 * tL.time.MINUTE) return;
      if (t && n < 5 * tL.time.SECOND) return;
      JR.proxy.updateUserState(e, (e) => {
        (e.later.ig.loading = !0), (e.later.ig.updatedAt = Date.now());
      });
      const o = r.auth.username;
      await rL.send("later.ignoreFetchCache");
      const { error: a, result: i } = await rL.send(
        "ig-api.fetch-user-posts",
        o,
        30
      );
      if (a)
        return (
          JR.error("failed to load ig posts", a),
          void JR.proxy.updateUserState(e, (e) => {
            (e.later.ig.loading = !1), (e.later.ig.error = a);
          })
        );
      let s;
      try {
        s = await Promise.all(
          i.map(async (e) => {
            const t = await oL.send("cdn-proxy.fetch", e.imgx),
              r = await fetch(t).then((e) => e.blob()),
              n = await tL.generateSquarePreview(r, { size: 375 }),
              o = await nL.controller.save(n.blob, "later:ig");
            return {
              id: e.code,
              date: e.on,
              type: e.type,
              color: n.averageColor,
              previewId: o,
            };
          })
        );
      } catch (e) {
        JR.error("failed to prepare ig posts", e), (s = []);
      }
      JR.proxy.updateUserState(e, (e) => {
        (e.later.ig.loading = !1), (e.later.ig.posts = s);
      }),
        setTimeout(() => {
          rL.send("later.dropOldIgPreviews");
        }, 1e3);
    },
  };
  const { $later: aL, $utils: iL } = app;
  aL.validator = {
    validate: async function (e) {
      const t = [],
        r = [];
      for (let n of e) {
        const e = await this._validateFile(n);
        if (e) r.push({ type: e, filename: n.name || "unnamed" });
        else {
          if (iL.file.isImage(n)) {
            const e = aL.config.maxImageWidth,
              t = aL.config.maxImageHeight;
            n = await iL.scaler.scaleToFitSize(n, e, t);
          }
          t.push(n);
        }
      }
      return { validFiles: t, errors: r };
    },
    _validateFile: async function (e) {
      if (e.size > aL.config.maxFileSize) return "size";
      if (!aL.config.mimeTypes.includes(e.type)) return "type";
      if (iL.file.isCsv(e)) return null;
      if (!iL.file.isVideo(e)) {
        const { ratio: t } = await iL.loadImage(e);
        return t < aL.config.minImageRatio || t > aL.config.maxImageRatio
          ? "ratio"
          : null;
      }
      let t;
      try {
        t = await iL.loadVideoMetadata(e);
      } catch (t) {
        return (
          console.error("failed to load metadata", { file: e, details: t }),
          "unknown"
        );
      }
      if (0 === t.width && 0 === t.height) return "encoding";
      if (
        t.duration < aL.config.minVideoDurationSec ||
        t.duration > aL.config.maxVideoDurationSec
      )
        return "duration";
      const r = t.width / t.height;
      return r < aL.config.minVideoRatio || r > aL.config.maxVideoRatio
        ? "ratio"
        : null;
    },
  };
  const { $later: sL, $store: lL, $utils: cL, $dateFns: uL } = app;
  sL.proxy = {
    getAllStates: function (e = lL.state) {
      return [e, ...Object.values(e.userStates)];
    },
    getAllConnectedStates: function (e = lL.state) {
      return this.getAllStates(e).filter((t) => {
        const r = t.auth.userId;
        return e.multiaccount.userIds.includes(r);
      });
    },
    getSelectedUserState: function (e = lL.state) {
      return this.getUserState(e, e.later.selectedUserId);
    },
    getUserState: function (e, t) {
      return this.getAllStates(e).find((e) => e.auth.userId === t) || null;
    },
    getPostOwnerState: function (e, t) {
      const r = this.getAllStates(e).find((e) =>
        e.later.posts.some((e) => e.id === t)
      );
      return r || null;
    },
    getSelectedUserPosts: function () {
      const e = this.getSelectedUserState();
      if (!e) return [];
      const t = structuredClone(e.later.posts);
      this._sortPosts(t);
      const r = lL.state.later.dnd;
      return this._applyDndToPosts(r, t), t;
    },
    getAllPosts: function (e = lL.state) {
      return this.getAllStates(e)
        .map((e) => e.later.posts)
        .flat();
    },
    getConnectedUsersPosts: function () {
      return this.getAllConnectedStates()
        .map((e) => e.later.posts)
        .flat();
    },
    getSelectedPost: function () {
      const e = lL.state;
      return this.getAllPosts().find((t) => t.id === e.later.selectedPostId);
    },
    getPost: function (e) {
      const t = this.getAllConnectedStates();
      for (const r of t) {
        const t = r.later.posts.find((t) => t.id === e);
        if (t) return t;
      }
      return null;
    },
    getPostPublishTypeForAnalytics: function (e) {
      return "post" === e.type
        ? e.mediaList.length > 1
          ? "carousel"
          : e.mediaList[0].isVideo
          ? "video"
          : "photo"
        : "story" === e.type
        ? e.mediaList.length > 1
          ? "story-series"
          : e.mediaList[0].isVideo
          ? "story-video"
          : "story-photo"
        : "reel" === e.type
        ? e.mediaList.length > 1
          ? "reel-series"
          : "reel"
        : void 0;
    },
    updatePost: function (e, t = () => {}) {
      lL.transaction((r) => {
        const n = (r = this.getPostOwnerState(r, e)).later.posts.find(
          (t) => t.id === e
        );
        n && t(n);
      });
    },
    deletePost: function (e) {
      lL.transaction((t) => {
        const r = (t = this.getPostOwnerState(t, e)).later.posts.findIndex(
          (t) => t.id === e
        );
        t.later.posts.splice(r, 1);
      });
    },
    isPostEditable: function (e) {
      return "posted" !== e.status && "posting" !== e.status;
    },
    getMediaError: function (e, t) {
      return "post" === e.type &&
        e.mediaList.length > 1 &&
        t.isVideo &&
        t.duration > sL.config.maxCarouselVideoDurationSec
        ? {
            message:
              "Instagram does not support videos longer than 1 minute for carousels.",
          }
        : "story" === e.type &&
          t.isVideo &&
          t.duration > sL.config.maxStoryDurationSec
        ? {
            message:
              "Instagram does not support videos longer than 5 minutes for stories.",
          }
        : "reel" !== e.type || t.isVideo
        ? null
        : { message: "Instagram does not support photos as reels." };
    },
    updateSelectedUserState: function (e = () => {}) {
      lL.transaction((t) => {
        (t = this.getSelectedUserState(t)), e(t);
      });
    },
    updateUserState: function (e, t = () => {}) {
      lL.transaction((r) => {
        (r = sL.proxy.getUserState(r, e)), t(r);
      });
    },
    applyDnd: function () {
      lL.transaction((e) => {
        const t = e.later.dnd,
          r = this.getSelectedUserState(e);
        this._applyDndToPosts(t, r.later.posts),
          e.later.selectedPostId &&
            (e.later.selectedPostId =
              t.dragPostId === e.later.selectedPostId
                ? t.dragOverPostId
                : t.dragOverPostId === e.later.selectedPostId
                ? t.dragPostId
                : e.later.selectedPostId),
          (t.dragPostId = null),
          (t.dragOverPostId = null),
          (t.dragOverDay = null),
          (t.dragOverTime = null);
      });
    },
    _sortPosts: function (e) {
      e.sort((t, r) => {
        if ("draft" !== t.status && "draft" === r.status) return 1;
        if ("draft" === t.status && "draft" !== r.status) return -1;
        if (t.date && r.date) return r.date - t.date;
        if (t.date) return 1;
        if (r.date) return -1;
        const n = e.indexOf(t);
        return e.indexOf(r) - n;
      });
    },
    _applyDndToPosts: function (e, t) {
      if (e.dragPostId)
        if (e.dragOverDay && e.dragOverTime) {
          const r = t.find((t) => t.id === e.dragPostId);
          (r.date = e.dragOverDay + e.dragOverTime), (r.status = "scheduled");
        } else if (e.dragOverDay) {
          const r = e.dragOverDay,
            n = t.find((t) => t.id === e.dragPostId),
            o = Date.now() + cL.time.HOUR,
            a = uL.endOfDay(r).getTime();
          if (o > a) return;
          let i;
          if (n.date) i = n.date - uL.startOfDay(n.date);
          else {
            const e = t.findLast((e) => uL.isSameDay(e.date, r));
            i = e ? e.date - r + cL.time.HOUR : 12 * cL.time.HOUR;
          }
          let s = r + i;
          s < o && (s = o),
            s > a && (s = a),
            (n.date = s),
            (n.status = "scheduled");
        } else if (e.dragOverPostId) {
          const r = t.find((t) => t.id === e.dragPostId),
            n = t.find((t) => t.id === e.dragOverPostId);
          if (!r || !n) return;
          const o = { ...n, id: r.id, date: r.date, status: r.status },
            a = { ...r, id: n.id, date: n.date, status: n.status };
          Object.assign(r, o), Object.assign(n, a);
        }
    },
  };
  const {
    $analytics: dL,
    $store: hL,
    $bus: pL,
    $idb: mL,
    $iframeBus: gL,
    $env: fL,
  } = app;
  dL.controller = {
    init: function () {
      return (
        fL.is.pp
          ? (this._insertAnalyticsScript(),
            this._initIframeMessage(),
            this._sendBgEvents())
          : fL.is.bg && this._initChromeMessage(),
        this
      );
    },
    _insertAnalyticsScript: function () {
      globalThis.ga = (...e) => {
        (globalThis.ga.q = globalThis.ga.q || []).push(e);
      };
      const e = document.createElement("script");
      (e.src = "/js/analytics.js"), document.body.appendChild(e);
      const t = "ga:clientId";
      globalThis.ga("create", "UA-146823118-1", {
        storage: "none",
        clientId: localStorage.getItem(t),
      }),
        globalThis.ga(function (e) {
          localStorage.setItem(t, e.get("clientId"));
        }),
        globalThis.ga("set", "checkProtocolTask", () => {}),
        globalThis.ga("require", "displayfeatures");
    },
    _initIframeMessage: function () {
      gL.on("ga.send-event", (...e) => {
        this.sendEvent(...e);
      });
    },
    _initChromeMessage: function () {
      pL.on("ga.send-event", (...e) => {
        this.sendEvent(...e);
      });
    },
    _sendBgEvents: async function () {
      const e = (await mL.get("ga.bgEvents")) || [];
      await mL.set("ga.bgEvents", []);
      for (const t of e) this._ga(...t);
    },
    sendPageview: function () {
      if (!this._enabled()) return this;
      const e = fL.is.bg ? "background" : document.location.pathname;
      return this._ga("send", "pageview", e), this;
    },
    sendInstall: function () {
      if (!hL.state.installedEventSent) {
        const e = chrome.runtime.getManifest().version,
          t = "installed:" + (globalThis.electron ? "electron" : "chrome");
        this.sendEvent("user", t, e),
          hL.transaction((e) => {
            e.installedEventSent = !0;
          });
      }
      return this;
    },
    sendEvent: function (e, t, r, n, o = { nonInteraction: 1 }) {
      if (!e) throw new dL.Error("category is required");
      if (!t) throw new dL.Error("action is required");
      if (n && !Number.isInteger(n))
        throw new dL.Error("value must be an integer");
      return this._enabled()
        ? (this._ga("send", "event", e, t, r || null, n || null, o || null),
          this)
        : (dL.log(...arguments), this);
    },
    _enabled: function () {
      return !fL.is.development;
    },
    _ga: async function (...e) {
      if (fL.is.bg) {
        const t = (await mL.get("ga.bgEvents")) || [];
        t.push(e), await mL.set("ga.bgEvents", t);
      } else {
        if (!globalThis.ga) return;
        globalThis.ga(...e);
      }
    },
  };
  const { $billing: vL, $store: bL, $env: yL, $ui: wL } = app,
    CL = {
      permissionPrompt: {
        ...wL.absolute("0 0 0 0 1"),
        ...wL.column,
        ...wL.justifyContent.center,
        ...wL.alignItems.center,
        ...wL.noDataGradient,
      },
      permissionText: {
        ...wL.column,
        ...wL.alignItems.center,
        maxWidth: 300,
        backgroundColor: wL.color.bgLight1,
        border: wL.border.light,
        textAlign: "center",
        ...wL.borderRadius.r4,
        ...wL.padding("g3 g3 g3 g3"),
      },
      fsForm: (e) => ({
        ...wL.absolute("0 0 0 0 1"),
        ...wL.transition.slow,
        opacity: e.loaded ? 1 : 0,
      }),
    };
  wL.SvgIcon.registerSvgIcons([
    '<symbol id="billing-checkout-mediator.unlock" viewBox="0 0 50 49.999"><g transform="translate(0 -0.003)"><g transform="translate(41.21 11.82)"><path d="M430.624,121.817a1.468,1.468,0,0,0-1.966-.655l-5.859,2.93a1.465,1.465,0,1,0,1.31,2.621l5.859-2.93A1.465,1.465,0,0,0,430.624,121.817Z" transform="translate(-421.989 -121.008)" fill="#74be86"/></g><g transform="translate(41.21 26.467)"><path d="M429.969,274.082l-5.859-2.93a1.465,1.465,0,0,0-1.31,2.621l5.859,2.93a1.465,1.465,0,0,0,1.31-2.621Z" transform="translate(-421.989 -270.997)" fill="#74be86"/></g><g transform="translate(0 0.003)"><path d="M33.691,23.636H11.719V16.116a7.324,7.324,0,0,1,14.648,0v2.93a1.464,1.464,0,0,0,1.465,1.465h5.859a1.464,1.464,0,0,0,1.465-1.465v-2.93a16.113,16.113,0,1,0-32.226,0v7.789A4.388,4.388,0,0,0,0,28.03V45.608A4.4,4.4,0,0,0,4.394,50h29.3a4.4,4.4,0,0,0,4.394-4.394V28.03A4.4,4.4,0,0,0,33.691,23.636ZM20.508,38.014v4.664a1.465,1.465,0,1,1-2.93,0V38.014a4.394,4.394,0,1,1,2.93,0Z" transform="translate(0 -0.003)" fill="#74be86"/></g><g transform="translate(41.21 20.608)"><path d="M429.319,211H423.46a1.465,1.465,0,0,0,0,2.93h5.859a1.465,1.465,0,0,0,0-2.93Z" transform="translate(-421.995 -211)" fill="#74be86"/></g></g></symbol>',
  ]);
  class kL extends wL.Component {
    constructor(e) {
      super(e),
        (this._onLoad = () => {
          this.setState({ loaded: !0 });
        }),
        (this._onCloseClick = () => {
          bL.transaction((e) => {
            e.billing.purchasingPlan = null;
          });
        }),
        (this.state = { granted: null });
    }
    render() {
      const { purchasingPlan: e } = this.props.billing;
      if (!e) return null;
      if (null === this.state.granted)
        return (
          chrome.permissions.contains(
            { origins: ["*://*.onfastspring.com/*"] },
            (e) => {
              this.setState({ granted: e });
            }
          ),
          null
        );
      if (!this.state.granted)
        return (
          chrome.permissions.request(
            { origins: ["*://*.onfastspring.com/*"] },
            (e) => {
              e
                ? this.setState({ granted: !0 })
                : bL.transaction((e) => {
                    e.billing.purchasingPlan = null;
                  });
            }
          ),
          Glamor.createElement(
            "div",
            { css: CL.permissionPrompt },
            Glamor.createElement(
              "div",
              { css: CL.permissionText },
              Glamor.createElement(wL.SvgIcon, {
                name: "billing-checkout-mediator.unlock",
              }),
              Glamor.createElement(wL.Spacer, { height: "g3" }),
              Glamor.createElement(
                "div",
                null,
                "INSSIST needs your permission to launch a¬†secure billing form powered by FastSpring."
              )
            )
          )
        );
      const t = yL.options.checkoutContainer,
        r = this._fetchFSpringConfig(),
        n = `${t}/fspring/${this.state.theme}?config=${r}`;
      return Glamor.createElement(
        "div",
        { css: CL.fsForm(this.state) },
        Glamor.createElement("iframe", {
          src: n,
          style: { border: "none", width: "100%", height: "100%" },
          className: "dnd-immune",
          onLoad: this._onLoad,
        }),
        Glamor.createElement(wL.CloseButton, {
          style: wL.absolute("8 8 . . 2"),
          onClick: this._onCloseClick,
        })
      );
    }
    _fetchFSpringConfig() {
      const e = this.props.billing,
        t = {
          plan: e.purchasingPlan.id,
          email: e.account.email,
          token: e.account.token,
          hasPro: true,
          countryIso:
            "default" === e.snapshot.checkoutCurrency ? "US" : e.countryIso,
          storefront: yL.options.storefront,
          apiUrl: yL.options.apiUrl,
        };
      return (
        "inssist-pro-lifetime" === t.plan &&
          (t.tags = {
            accounts: [
              { id: bL.state.auth.userId, name: bL.state.auth.username },
            ],
          }),
        btoa(JSON.stringify(t))
      );
    }
  }
  vL.CheckoutMediator = bL.connect((e) => ({ billing: e.billing }))(
    wL.theme.ThemeAware(kL)
  );
  const { $billing: SL, $store: EL, $ui: _L } = app;
  SL.CodeMediator = EL.connect((e) => ({
    email: e.billing.verificationCodeEmail,
  }))(
    class extends _L.Component {
      constructor(...e) {
        var t;
        return (
          (t = super(...e)),
          (this._onActionBlockCloseClick = () => {
            EL.transaction((e) => {
              e.billing.verificationCodeEmail = null;
            });
          }),
          t
        );
      }
      render() {
        const { email: e } = this.props,
          t = Boolean(e),
          r = [
            Glamor.createElement(
              "div",
              null,
              "We sent a verification code to ",
              Glamor.createElement("b", null, e),
              " from ",
              Glamor.createElement("b", null, "Inssist, no-reply@slashed.io")
            ),
            Glamor.createElement(
              "div",
              null,
              "Sometimes it may get into a spam folder. If a code is not delivered in 5 minutes, please double check your email address or reach out to us at ",
              "inssist@slashed.io"
            ),
          ];
        return Glamor.createElement(
          _L.SnackbarItem,
          { id: "billing-code-mediator", show: t },
          Glamor.createElement(_L.InfoCard, {
            markerColor: _L.color.positive,
            title: "Your Code is Emailed",
            content: r,
            onClose: this._onActionBlockCloseClick,
          })
        );
      }
    }
  );
  const { $billing: xL, $store: PL, $analytics: TL, $ui: IL } = app;
  xL.DiscountSnackbarCardMediator = PL.connect((e) => {
    const t = e.sidebar.isOpen && "tab-billing" === e.sidebar.selectedTabId;
    return { show: e.billing.discount.showSnackbarMessage && !t };
  })(
    class extends IL.Component {
      constructor(...e) {
        var t;
        return (
          (t = super(...e)),
          (this._onCloseClick = () => {
            this._close(),
              TL.controller.sendEvent("user", "billing:discount-dismiss-click");
          }),
          (this._onGoToBillingClick = () => {
            this._close(),
              TL.controller.sendEvent(
                "user",
                "billing:discount-go-to-billing-click"
              ),
              xL.controller.openBilling("discount");
          }),
          t
        );
      }
      render() {
        return Glamor.createElement(
          IL.SnackbarItem,
          {
            id: "billing-discount-snackbar-card-mediator",
            show: this.props.show,
          },
          Glamor.createElement(IL.InfoCard, {
            markerColor: IL.color.link,
            title: "Discount Available",
            content: this._renderContent(),
            onClose: this._onCloseClick,
          })
        );
      }
      _renderContent() {
        return Glamor.createElement(
          React.Fragment,
          null,
          Glamor.createElement(
            "div",
            null,
            "Get ",
            Glamor.createElement("b", null, "50%"),
            " off the first month of Inssist PRO Monthly",
            Glamor.createElement("br", null),
            "or ",
            Glamor.createElement("b", null, "15%"),
            " off the Infinite or Lifetime plan purchase."
          ),
          Glamor.createElement(IL.Spacer, { height: "g2" }),
          Glamor.createElement(
            "div",
            { css: [IL.row, IL.alignItems.center] },
            Glamor.createElement(IL.ActionButton, {
              label: "USE DISCOUNT",
              style: { fontSize: 14 },
              onClick: this._onGoToBillingClick,
            }),
            Glamor.createElement(IL.Spacer, { width: "g3" }),
            Glamor.createElement(IL.LinkButton, {
              label: "ABOUT PRO",
              onClick: this._onGoToBillingClick,
            })
          )
        );
      }
      _close() {
        PL.transaction((e) => {
          e.billing.discount.showSnackbarMessage = !1;
        });
      }
    }
  );
  const { $billing: GL, $env: DL, $ui: AL } = app;
  var ML, FL;
  function RL() {
    return (RL =
      Object.assign ||
      function (e) {
        for (var t = 1; t < arguments.length; t++) {
          var r = arguments[t];
          for (var n in r)
            Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
        }
        return e;
      }).apply(this, arguments);
  }
  GL.FeaturesMediator = class extends AL.Component {
    render() {
      const e = DL.options.billingProFeaturesTable;
      return Glamor.createElement(AL.BillingFeaturesTable, { features: e });
    }
  };
  const { $billing: LL, $store: BL, $ui: OL, $lodash: $L } = app;
  let NL = -1,
    UL = -1;
  const HL = (e) => null == e,
    zL = (e, t = null) => (null != e ? e : t);
  OL.Image.registerImages({
    "billing-form-mediator.inssist": "inssist-mini.png:24:24",
  });
  const jL = {
    selectedPlan: {
      maxWidth: 240,
      ...OL.absolute("0 0 . . 1"),
      ...OL.shadow.sh6,
      paddingTop: OL.space.g5,
      paddingBottom: OL.space.g3,
      backgroundColor: OL.color.bgLight2,
      borderRadius: 8,
    },
    username: {
      ...OL.text.ellipsis,
      color: OL.color.textNormal,
      fontWeight: 700,
    },
    usernameSign: {
      fontSize: 10,
      opacity: 0.9,
      position: "relative",
      top: -1,
      marginRight: 1,
    },
  };
  LL.FormMediator = BL.connect((e) => ({
    auth: e.auth,
    billing: e.billing,
    hasPro: true,
    hasProPaid: true,
    hasProPromocode: BL.proxy.hasProPromocode(),
  }))(
    ((ML = class extends OL.Component {
      constructor(e) {
        super(e), FL.call(this), (this.state = {});
      }
      get data() {
        const e = BL.state,
          t = e.billing.snapshot || {},
          r = {
            panel: zL(t.panel),
            accountScreen: zL(t.accountScreen, null),
            accountForm: zL(t.accountForm, {
              email: "",
              password: "",
              firstName: "",
              lastName: "",
              errors: { email: !1, password: !1, firstName: !1, lastName: !1 },
            }),
            statusText: zL(t.statusText),
            statusButtons: zL(t.statusButtons),
            confirmationCodeText: zL(t.confirmationCodeText),
            confirmationCodeError: zL(t.confirmationCodeError, !1),
            passwordResetValue: zL(t.passwordResetValue),
            passwordResetCodeText: zL(t.passwordResetCodeText),
            passwordResetCodeError: zL(t.passwordResetCodeError, !1),
            loading: zL(t.loading, !1),
          };
        if (!this.state.isAccountFormTouched) {
          if (
            (e.auth.email &&
              (r.accountForm.email || (r.accountForm.email = e.auth.email)),
            e.auth.fullName)
          ) {
            const e = this.props.auth.fullName.split(" "),
              t = e.shift(),
              n = e.join(" ");
            !r.accountForm.firstName && t && (r.accountForm.firstName = t),
              !r.accountForm.lastName && n && (r.accountForm.lastName = n);
          }
          r.accountForm.password = "";
        }
        return r;
      }
      render() {
        return Glamor.createElement(
          OL.BillingForm,
          { disabled: this.data.loading },
          this.renderContent()
        );
      }
      renderContent() {
        const { email: e } = this.props.billing.account,
          {
            accountScreen: t,
            accountForm: r,
            confirmationCodeText: n,
            passwordResetValue: o,
            passwordResetCodeText: a,
          } = this.data;
        if ("auth" === t)
          return Glamor.createElement(
            React.Fragment,
            null,
            Glamor.createElement(
              OL.BillingFSpringAuthSection,
              RL({}, r, {
                onChange: this._onAccountFormChange,
                onCancelClick: this._onGoToStorefrontClick,
                onNextClick: this._onNextClick,
                disableInputs: !HL(n),
                hideActions: !HL(n),
              })
            ),
            this._renderCodeSection(),
            this._renderStatusSection(),
            this._renderSelectedPlanSection()
          );
        if ("login" === t)
          return Glamor.createElement(
            React.Fragment,
            null,
            Glamor.createElement(
              OL.BillingFSpringLoginSection,
              RL({}, r, {
                onChange: this._onAccountFormChange,
                onCancelClick: this._onGoToStorefrontClick,
                onIForgotPasswordClick: this._onIForgotPasswordClick,
                onLoginClick: this._onLoginClick,
                disableInputs: !HL(n),
                hideActions: !HL(n),
              })
            ),
            this._renderCodeSection(),
            this._renderStatusSection(),
            this._renderSelectedPlanSection()
          );
        if ("create-account" === t)
          return Glamor.createElement(
            React.Fragment,
            null,
            Glamor.createElement(
              OL.BillingFSpringCreateAccountSection,
              RL({}, r, {
                onChange: this._onAccountFormChange,
                onCancelClick: this._onGoToStorefrontClick,
                onCreateAccountClick: this._onCreateAccountClick,
                disableInputs: !HL(n),
                hideActions: !HL(n),
              })
            ),
            this._renderCodeSection(),
            this._renderStatusSection(),
            this._renderSelectedPlanSection()
          );
        if ("reset" === t) {
          const e = !HL(a);
          return Glamor.createElement(
            React.Fragment,
            null,
            Glamor.createElement(
              OL.BillingFSpringResetSection,
              RL({}, r, {
                newPassword: o,
                onNewPasswordChange: !e && this._onNewPasswordChange,
                onResetPasswordClick: !e && this._onResetPasswordClick,
              })
            ),
            this._renderResetCodeSection(),
            this._renderStatusSection()
          );
        }
        return "reset-confirm" === t
          ? Glamor.createElement(OL.BillingFSpringResetConfirmSection, {
              onOkClick: this._onResetPasswordAcknowledgeClick,
            })
          : "logout-confirm" === t
          ? Glamor.createElement(OL.BillingFSpringLogoutConfirmSection, {
              onOkClick: this._onLogoutAcknowledgeClick,
            })
          : "delete-confirm" === t
          ? Glamor.createElement(OL.BillingFSpringDeleteConfirmSection, {
              onOkClick: this._onDeleteAcknowledgeClick,
            })
          : "manage-account" === t
          ? Glamor.createElement(
              OL.BillingFSpringManageAccountSection,
              RL({ email: e }, this._subscriptions(), {
                onDeleteClick: this._onDeleteClick,
                onDeleteCancelClick: this._onDeleteCancelClick,
              })
            )
          : "delete" === t
          ? Glamor.createElement(
              OL.BillingFSpringManageAccountSection,
              RL({ email: e }, this._subscriptions(), {
                onDeleteConfirmClick: this._onDeleteConfirmClick,
                onDeleteCancelClick: this._onDeleteCancelClick,
              })
            )
          : null;
      }
      _renderCodeSection() {
        const {
          accountScreen: e,
          accountForm: t,
          confirmationCodeText: r,
          confirmationCodeError: n,
        } = this.data;
        if (HL(r)) return null;
        let o = null;
        const { firstName: a, lastName: i, email: s } = t;
        "create-account" === e &&
          a &&
          i &&
          (o = OL.emailTypoChecker({ firstName: a, lastName: i, email: s }));
        const l = Glamor.createElement(
            "p",
            null,
            "Please confirm your email address by entering a code we sent to you from ",
            Glamor.createElement("strong", null, "no-reply@inssist.com"),
            "."
          ),
          c = o
            ? Glamor.createElement(
                "div",
                { css: OL.row },
                Glamor.createElement("div", { style: { fontSize: 21 } }, "üßê"),
                Glamor.createElement(OL.Spacer, { width: "g0h" }),
                Glamor.createElement(
                  "div",
                  { css: OL.column },
                  Glamor.createElement(
                    "p",
                    null,
                    "The email address you entered appears to have a typo. Did you mean to enter ",
                    Glamor.createElement("strong", null, o),
                    " email address instead?"
                  ),
                  Glamor.createElement(OL.Spacer, { height: "g0h" }),
                  Glamor.createElement(
                    "div",
                    null,
                    "If you made a typo, simply click Cancel."
                  ),
                  Glamor.createElement(OL.Spacer, { height: "g0h" })
                )
              )
            : Glamor.createElement(
                "p",
                null,
                "If you have not received a code, please check the spam folder, email address or send a new code."
              );
        return Glamor.createElement(
          React.Fragment,
          null,
          Glamor.createElement(OL.Spacer, { height: "g3" }),
          Glamor.createElement(OL.BillingCodeSection, {
            value: r,
            text: Glamor.createElement(
              React.Fragment,
              null,
              l,
              Glamor.createElement(OL.Spacer, { height: "g1" }),
              c
            ),
            hasError: n,
            onChange: this._onConfirmationCodeChange,
          }),
          Glamor.createElement(OL.Spacer, { height: "g3" }),
          Glamor.createElement(
            "div",
            { css: OL.row },
            Glamor.createElement(OL.ActionButton, {
              label: "CONFIRM EMAIL",
              shadow: OL.color.linkShadow,
              onClick: this._onConfirmEmailClick,
            }),
            Glamor.createElement(OL.Spacer, { width: "g3" }),
            Glamor.createElement(OL.LinkButton, {
              label: "CANCEL",
              cancel: !0,
              onClick: this._onCancelConfirmEmailClick,
            })
          )
        );
      }
      _renderResetCodeSection() {
        const { passwordResetCodeText: e, passwordResetCodeError: t } =
          this.data;
        return HL(e)
          ? null
          : Glamor.createElement(
              React.Fragment,
              null,
              Glamor.createElement(OL.BillingCodeSection, {
                value: e,
                text: "We‚Äôve sent a verification code to your email address. Please enter it below:",
                hasError: t,
                onChange: this._onPasswordResetCodeChange,
              }),
              Glamor.createElement(OL.Spacer, { height: "g3" }),
              Glamor.createElement(
                "div",
                { css: OL.row },
                Glamor.createElement(OL.ActionButton, {
                  label: "CONFIRM RESET",
                  shadow: OL.color.linkShadow,
                  onClick: this._onConfirmPasswordResetClick,
                }),
                Glamor.createElement(OL.Spacer, { width: "g3" }),
                Glamor.createElement(OL.LinkButton, {
                  label: "CANCEL",
                  cancel: !0,
                  onClick: this._onCancelPasswordResetClick,
                })
              ),
              Glamor.createElement(OL.Spacer, { height: "g3" })
            );
      }
      _renderSelectedPlanSection() {
        const { selectedPlan: e } = this.props.billing;
        if (!e) return null;
        const t = this.props.auth.username,
          r =
            {
              "inssist-pro-monthly": [
                "Best for Casual use",
                "Unlimited accounts",
                "Paid monthly, cancel any time",
              ],
              "inssist-pro-lifetime": [
                "Best for Creatives",
                Glamor.createElement(
                  "div",
                  null,
                  Glamor.createElement("div", null, "Will be activated for"),
                  Glamor.createElement(
                    "div",
                    { css: jL.username, title: t },
                    Glamor.createElement("span", { css: jL.usernameSign }, "@"),
                    t
                  )
                ),
                "Paid once",
              ],
              "inssist-pro-infinite": [
                "Best for Businesses",
                "Unlimited accounts",
                "Paid once",
              ],
            }[e.id] || null;
        return Glamor.createElement(
          "div",
          { css: [OL.column, jL.selectedPlan] },
          Glamor.createElement(
            OL.BillingPlanRenderer,
            RL({}, e, {
              benefits: r,
              padding: OL.padding("0 20 0 50"),
              onChangePlanClick: this._onChangePlanClick,
            })
          )
        );
      }
      _renderStatusSection() {
        const { statusText: e } = this.data;
        if (!HL(e))
          return Glamor.createElement(
            React.Fragment,
            null,
            Glamor.createElement(OL.Spacer, { height: "g3" }),
            Glamor.createElement(OL.BillingStatusSection, {
              text: e,
              buttons: this._enrichStatusButtons(),
            })
          );
      }
      _subscriptions() {
        const { subscriptions: e } = this.props.billing;
        if (!e) return null;
        const t = [];
        return (
          e["inssist-pro-monthly"] &&
            "active" === e["inssist-pro-monthly"].state &&
            t.push({
              label: "INSSIST PRO",
              icon: "billing-form-mediator.inssist",
            }),
          0 === t.length
            ? null
            : { subscriptions: t, onFsamClick: this._onFsamClick }
        );
      }
      _showVerificationCodeSnackbar(e) {
        setTimeout(
          () =>
            BL.transaction((t) => {
              t.billing.verificationCodeEmail = e;
            }),
          1500
        );
      }
      _hideVerificationCodeSnackbar() {
        setTimeout(
          () =>
            BL.transaction((e) => {
              e.billing.verificationCodeEmail = null;
            }),
          1500
        );
      }
      _enrichStatusButtons() {
        return this.data.statusButtons && 0 !== this.data.statusButtons.length
          ? this.data.statusButtons.map((e) => {
              const t = { ...e };
              return (
                "CREATE NEW ACCOUNT" === e.label &&
                  (t.onClick = this._onGoToCreateAccountScreen),
                "SEND A NEW CODE" === e.label &&
                  (t.onClick = this._onResendCodeClick),
                "I FORGOT MY PASSWORD" === e.label &&
                  (t.onClick = this._onIForgotPasswordClick),
                "LOGIN INSTEAD" === e.label &&
                  (t.onClick = this._onGoToLoginScreen),
                t
              );
            })
          : null;
      }
      _reset(e, t) {
        t = t || {
          form: !0,
          errors: !0,
          status: !0,
          code: !0,
          password: !0,
          loading: !0,
        };
        const {
          form: r,
          errors: n,
          status: o,
          code: a,
          password: i,
          loading: s,
        } = t;
        r &&
          (this.setState({ isAccountFormTouched: !1 }),
          (e.accountForm.email = ""),
          (e.accountForm.password = ""),
          (e.accountForm.firstName = ""),
          (e.accountForm.lastName = "")),
          n &&
            ((e.accountForm.errors.email = !1),
            (e.accountForm.errors.password = !1),
            (e.accountForm.errors.firstName = !1),
            (e.accountForm.errors.lastName = !1)),
          o && ((e.statusText = null), (e.statusButtons = null)),
          a &&
            ((e.confirmationCodeText = null), (e.confirmationCodeError = !1)),
          i &&
            ((e.passwordResetValue = null),
            (e.passwordResetCodeText = null),
            (e.passwordResetCodeError = !1)),
          s && (e.loading = !1);
      }
      getSnapshot() {
        return $L.cloneDeep(this.data);
      }
      applySnapshot(e) {
        this.setState(e),
          BL.transaction((t) => {
            t.billing.snapshot = e;
          });
      }
      updateSnapshot(e) {
        const t = this.getSnapshot(),
          r = e(t);
        return this.applySnapshot(t), r;
      }
    }),
    (FL = function () {
      (this._onFsamClick = () => {
        LL.controller.onFsamClick();
      }),
        (this._onChangePlanClick = () => {
          BL.transaction((e) => {
            (e.billing.selectedPlan = null),
              (e.billing.snapshot.panel = "storefront"),
              (e.billing.snapshot.accountScreen = null);
          });
        }),
        (this._onLogoutAcknowledgeClick = () => {
          this.updateSnapshot((e) => {
            (e.panel = "storefront"), (e.accountScreen = null);
          });
        }),
        (this._onDeleteClick = () => {
          this.updateSnapshot((e) => {
            e.accountScreen = "delete";
          });
        }),
        (this._onCancelClick = () => {
          this.updateSnapshot((e) => {
            (e.panel = "storefront"), (e.accountScreen = null);
          });
        }),
        (this._onDeleteConfirmClick = () => {
          LL.connector
            .deleteAccount(this, this.props.billing.account.token)
            .then(() => {
              this.updateSnapshot((e) => {
                this._reset(e, {
                  status: !0,
                  form: !0,
                  code: !0,
                  password: !0,
                }),
                  (e.accountScreen = "delete-confirm");
              }),
                BL.transaction((e) => {
                  e.billing.account = { email: null, token: null };
                });
            })
            .catch((e) => {
              this.updateSnapshot((t) => {
                "unauthorized" === e.status &&
                  (this._reset(t, {
                    form: !0,
                    status: !0,
                    code: !0,
                    password: !0,
                    loading: !0,
                  }),
                  (t.accountScreen = null),
                  (t.statusButtons = null),
                  (t.statusText =
                    "Oops... Your session has expired, please log back in to delete your account."),
                  BL.transaction((e) => {
                    (e.billing.account = { email: null, token: null }),
                      (e.billing.snapshot = t);
                  }));
              });
            });
        }),
        (this._onDeleteAcknowledgeClick = () => {
          this.updateSnapshot((e) => {
            (e.panel = "storefront"), (e.accountScreen = null);
          });
        }),
        (this._onDeleteCancelClick = () => {
          this.updateSnapshot((e) => {
            (e.panel = "storefront"), (e.accountScreen = null);
          });
        }),
        (this._onAccountFormChange = (e) => {
          this.setState({ isAccountFormTouched: !0 }),
            this.updateSnapshot((t) => {
              this._reset(t, { status: !0, code: !0, loading: !0 }),
                e.email !== t.accountForm.email &&
                  ((t.accountForm.email = e.email),
                  (t.accountForm.errors.email = !1)),
                e.firstName !== t.accountForm.firstName &&
                  ((t.accountForm.firstName = e.firstName),
                  (t.accountForm.errors.firstName = !1)),
                e.lastName !== t.accountForm.lastName &&
                  ((t.accountForm.lastName = e.lastName),
                  (t.accountForm.errors.lastName = !1)),
                e.password !== t.accountForm.password &&
                  ((t.accountForm.password = e.password),
                  (t.accountForm.errors.password = !1));
            });
        }),
        (this._onGoToStorefrontClick = () => {
          this.updateSnapshot((e) => {
            this._reset(e, {
              status: !0,
              form: !0,
              errors: !0,
              code: !0,
              loading: !0,
            }),
              (e.panel = "storefront");
          });
        }),
        (this._onIForgotPasswordClick = (e) => {
          this.updateSnapshot((e) => {
            e.accountForm.email
              ? (this._reset(e, {
                  status: !0,
                  errors: !0,
                  code: !0,
                  loading: !0,
                }),
                (e.accountScreen = "reset"),
                (e.passwordResetValue = ""),
                (e.passwordResetCodeText = null))
              : (this._reset(e, {
                  status: !0,
                  errors: !0,
                  code: !0,
                  loading: !0,
                }),
                (e.statusText =
                  "Please enter your email above to reset the password."),
                (e.accountForm.errors.email = !0));
          });
        }),
        (this._onGoToCreateAccountScreen = () => {
          this.updateSnapshot((e) => {
            this._reset(e, { status: !0, errors: !0, code: !0, loading: !0 }),
              (e.accountScreen = "create-account");
          });
        }),
        (this._onGoToLoginScreen = () => {
          this.updateSnapshot((e) => {
            this._reset(e, { status: !0, errors: !0, code: !0, loading: !0 }),
              (e.accountScreen = "login");
          });
        }),
        (this._onNextClick = () => {
          const { email: e } = this.data.accountForm;
          this.updateSnapshot(
            (t) => (
              (t.accountForm.errors = { email: e.length < 1, password: !1 }),
              t.accountForm.errors.email
                ? ((t.statusText =
                    "Email is required to store your purchases and reuse them across multiple devices."),
                  !0)
                : ((t.statusText = null), !1)
            )
          ) ||
            LL.connector
              .isTaken(this, e)
              .then((e) => {
                e.taken
                  ? BL.transaction((e) => {
                      e.billing.snapshot.accountScreen = "login";
                    })
                  : BL.transaction((e) => {
                      e.billing.snapshot.accountScreen = "create-account";
                    });
              })
              .catch((e) => {
                console.log(e),
                  this.updateSnapshot((t) => {
                    "bad-query" === e.status &&
                      (t.accountForm.errors.email = !0);
                  });
              });
        }),
        (this._onLoginClick = () => {
          const { email: e, password: t } = this.data.accountForm;
          this.updateSnapshot(
            (r) => (
              (r.accountForm.errors = {
                email: e.length < 1,
                password: t.length < 4,
              }),
              r.accountForm.errors.email || r.accountForm.errors.password
                ? ((r.statusText =
                    "Email and password required to sign in to Inssist account. If you do not have an Inssist account, create one instead."),
                  !0)
                : ((r.statusText = null), !1)
            )
          ) ||
            LL.connector
              .login(this, e, t)
              .then((t) => {
                this.updateSnapshot((e) => {
                  this._reset(e, {
                    status: !0,
                    form: !0,
                    code: !0,
                    password: !0,
                  }),
                    "reset" === e.accountScreen
                      ? (e.accountScreen = "reset-confirm")
                      : (e.panel = "storefront");
                }),
                  BL.transaction((r) => {
                    (r.billing.account = { email: e, token: t.token }),
                      r.billing.selectedPlan &&
                        ((r.billing.purchasingPlan = r.billing.selectedPlan),
                        (r.billing.selectedPlan = null));
                  });
              })
              .catch((e) => {
                this.updateSnapshot((t) => {
                  "bad-query" === e.status
                    ? (t.accountForm.errors.email = !0)
                    : "email-is-not-verified" === e.status &&
                      (t.confirmationCodeText = "");
                });
              });
        }),
        (this._onCreateAccountClick = () => {
          const {
            email: e,
            password: t,
            firstName: r,
            lastName: n,
          } = this.data.accountForm;
          if (
            this.updateSnapshot(
              (o) => (
                (o.accountForm.errors = {}),
                e.length < 1 && (o.accountForm.errors.email = !0),
                t.length < 4 && (o.accountForm.errors.password = !0),
                r.length < 1 && (o.accountForm.errors.firstName = !0),
                n.length < 1 && (o.accountForm.errors.lastName = !0),
                (o.confirmationCodeText = null),
                (o.statusText =
                  o.accountForm.errors.email ||
                  o.accountForm.errors.password ||
                  o.accountForm.errors.firstName ||
                  o.accountForm.errors.lastName
                    ? "Please fill in remaining fields to create an Inssist account. First Name and Last Name are required by FastSpring."
                    : null),
                Boolean(o.statusText)
              )
            )
          )
            return;
          const o = BL.proxy.allUsernames();
          LL.connector
            .register(this, e, t, r, n, o)
            .then(() => {
              this._showVerificationCodeSnackbar(e),
                BL.transaction((e) => {
                  e.billing.recordedUsernames = ((e) => Array.from(new Set(e)))(
                    [...e.billing.recordedUsernames, ...o]
                  );
                }),
                this.updateSnapshot((e) => {
                  this._reset(e, { status: !0, code: !0 }),
                    (e.confirmationCodeText = "");
                }),
                BL.transaction((t) => {
                  t.billing.account = { email: e };
                });
            })
            .catch((e) => {
              this.updateSnapshot((t) => {
                ("bad-query" === e.status ||
                  "email-already-in-use" === e.status) &&
                  (t.accountForm.errors.email = !0);
              });
            });
        }),
        (this._onConfirmEmailClick = () => {
          if (
            this.updateSnapshot((e) => {
              const { confirmationCodeText: t } = e;
              return 0 === t.length || 5 !== t.length
                ? ((e.confirmationCodeError = !0),
                  (e.statusText =
                    "Verification code does not match our records. Please check your inbox for the code we sent."),
                  (e.statusButtons = [{ label: "SEND A NEW CODE" }]),
                  !0)
                : (this._reset(e, { status: !0 }), !1);
            })
          )
            return;
          const e = this.data.accountForm.email,
            t = this.data.confirmationCodeText;
          LL.connector
            .verifyEmail(this, e, t)
            .then(() => {
              this._hideVerificationCodeSnackbar(), this._onLoginClick();
            })
            .catch((e) => {
              this.updateSnapshot((t) => {
                "bad-query" === e.status
                  ? (t.accountForm.errors.email = !0)
                  : "account-not-found" === e.status
                  ? ((t.statusButtons = null),
                    (t.statusText =
                      "No account found for the given email address. Please correct email address or create a new account instead."))
                  : "email-already-verified" === e.status
                  ? ((t.confirmationCodeText = null),
                    (t.statusText =
                      "This email address has been verified. Please login instead."))
                  : "otp-does-not-match" === e.status &&
                    ((t.confirmationCodeError = !0),
                    (t.statusButtons = [{ label: "SEND A NEW CODE" }]));
              });
            });
        }),
        (this._onResendCodeClick = () => {
          const { email: e, password: t } = this.data.accountForm;
          this.updateSnapshot((e) => {
            this._reset(e, { status: !0, code: !0, loading: !0 }),
              (e.confirmationCodeText = "");
            const t = Date.now();
            return (
              Math.round((NL + 3e4 - t) / 1e3) > 0 &&
              ((e.statusText =
                "The last code was sent less than a minute ago. Please wait some time before requesting a new one."),
              (e.statusButtons = [{ label: "SEND A NEW CODE" }]),
              !0)
            );
          }) ||
            ((NL = Date.now()),
            LL.connector
              .resendOtp(this, e, t)
              .then(() => {
                this._showVerificationCodeSnackbar(e),
                  this.updateSnapshot((e) => {
                    (e.statusText =
                      "We sent you a new email verification code. Please check your inbox for messages from no-reply@inssist.com."),
                      (e.statusButtons = [{ label: "SEND A NEW CODE" }]);
                  });
              })
              .catch((e) => {
                this.updateSnapshot((t) => {
                  "account-not-found" === e.status
                    ? (t.statusText =
                        "No account found for the given email address. Please update email address or create a new account instead.")
                    : "account-is-not-active" === e.status
                    ? (t.statusText =
                        "This account has been disabled. Please create a new account instead.")
                    : "email-already-verified" === e.status &&
                      ((t.confirmationCodeText = null),
                      (t.statusText =
                        "This email address has already been verified. Please login instead."));
                });
              }));
        }),
        (this._onResetPasswordClick = (e) => {
          if (!e)
            return void this.updateSnapshot((e) => {
              this._reset(e, {
                status: !0,
                code: !0,
                loading: !0,
                password: !0,
              }),
                (e.panel = "storefront"),
                (e.accountScreen = null);
            });
          if (
            this.updateSnapshot((e) => {
              this._reset(e, { status: !0, code: !0 });
              const t = Date.now();
              return (
                Math.round((UL + 3e4 - t) / 1e3) > 0 &&
                ((e.statusText =
                  "The last code was sent less than a minute ago. Please wait some time before requesting a new one."),
                this.applySnapshot(e),
                !0)
              );
            })
          )
            return;
          const t = this.data.accountForm.email;
          (UL = Date.now()),
            LL.connector
              .recoverPassword(this, t)
              .then(() => {
                this._showVerificationCodeSnackbar(t),
                  this.updateSnapshot((e) => {
                    e.passwordResetCodeText = "";
                  });
              })
              .catch((e) => {
                this.updateSnapshot((t) => {
                  "account-not-found" === e.status &&
                    ((t.statusButtons = null),
                    (t.statusText =
                      "No account found for the given email address. Please correct email address or create a new account instead."));
                });
              });
        }),
        (this._onConfirmPasswordResetClick = () => {
          if (
            this.updateSnapshot((e) => {
              const { passwordResetCodeText: t } = e;
              return 0 === t.length || 5 !== t.length
                ? ((e.passwordResetCodeError = !0),
                  (e.statusText =
                    "Verification code does not match our records. Please check your inbox for the code we sent."),
                  !0)
                : (this._reset(e, { status: !0 }), !1);
            })
          )
            return;
          const e = this.data.accountForm.email,
            t = this.data.passwordResetCodeText,
            r = this.data.passwordResetValue;
          LL.connector
            .changePassword(this, e, t, r)
            .then(() => {
              this._hideVerificationCodeSnackbar(),
                this.setState({ isAccountFormTouched: !0 }),
                this.updateSnapshot((e) => {
                  e.accountForm.password = r;
                }),
                this._onLoginClick();
            })
            .catch((e) => {
              this.updateSnapshot((t) => {
                "bad-query" === e.status
                  ? (t.accountForm.errors.email = !0)
                  : "account-not-found" === e.status
                  ? ((t.statusButtons = null),
                    (t.statusText =
                      "No account found for the given email address. Please correct email address or create a new account instead."))
                  : "account-is-not-active" === e.status &&
                    (t.statusText =
                      "This account has been disabled. Please create a new account instead.");
              });
            });
        }),
        (this._onConfirmationCodeChange = (e) => {
          this.updateSnapshot((t) => {
            this._reset(t, { status: !0, loading: !0 }),
              (t.confirmationCodeText = e),
              (t.confirmationCodeError = !1);
          });
        }),
        (this._onCancelConfirmEmailClick = () => {
          this._hideVerificationCodeSnackbar(),
            this.updateSnapshot((e) => {
              this._reset(e, { status: !0, code: !0, loading: !0 });
            });
        }),
        (this._onPasswordResetCodeChange = (e) => {
          this.updateSnapshot((t) => {
            this._reset(t, { status: !0, loading: !0 }),
              (t.passwordResetCodeText = e),
              (t.passwordResetCodeError = !1);
          });
        }),
        (this._onNewPasswordChange = (e) => {
          this.updateSnapshot((t) => {
            this._reset(t, { status: !0, code: !0, loading: !0 }),
              (t.passwordResetValue = e),
              (t.passwordResetCodeText = null);
          });
        }),
        (this._onCancelPasswordResetClick = () => {
          this._hideVerificationCodeSnackbar(),
            this.updateSnapshot((e) => {
              this._reset(e, {
                status: !0,
                code: !0,
                password: !0,
                loading: !0,
              }),
                (e.panel = "storefront"),
                (e.accountScreen = null);
            });
        }),
        (this._onResetPasswordAcknowledgeClick = () => {
          this.updateSnapshot((e) => {
            this._reset(e, { status: !0, code: !0, password: !0, loading: !0 }),
              (e.panel = "storefront"),
              (e.accountScreen = null);
          });
        });
    }),
    ML)
  );
  const {
    $billing: WL,
    $store: VL,
    $analytics: qL,
    $ui: ZL,
    $constants: YL,
    $bus: QL,
  } = app;
  var KL, XL;
  WL.PanelMediator = VL.connect((e) => ({ billing: e.billing }))(
    class extends ZL.Component {
      constructor(...e) {
        var t;
        return (
          (t = super(...e)),
          (this._onCloseClick = () => {
            VL.transaction((e) => {
              e.sidebar.isOpen = !1;
            });
          }),
          (this._onBillingFaqClick = () => {
            qL.controller.sendEvent("user", "billing:faq-click"),
              chrome.tabs.create({ url: YL.common.faqBillingUrl });
          }),
          t
        );
      }
      componentDidMount() {
        Date.now() - WL.PanelMediator.lastUpdateTs < 5e3 ||
          ((WL.PanelMediator.lastUpdateTs = Date.now()),
          setTimeout(() => QL.send("billing.updatePro", !0), 250));
      }
      render() {
        const { billing: e } = this.props;
        return Glamor.createElement(ZL.BillingPanel, {
          form: this._getFormSection(),
          storefront: this._getStorefrontSection(),
          checkout: this._getCheckoutSection(),
          clients: this._getClientsSection(),
          features: this._getFeaturesSection(),
          onCloseClick: this._onCloseClick,
          onBillingFaqClick: this._onBillingFaqClick,
          loading: e.snapshot.loading,
        });
      }
      _getFormSection() {
        const { panel: e, accountScreen: t } = this.props.billing.snapshot;
        return "form" === e && t
          ? Glamor.createElement(WL.FormMediator, null)
          : null;
      }
      _getStorefrontSection() {
        const { panel: e, accountScreen: t } = this.props.billing.snapshot;
        return "form" === e && t
          ? null
          : Glamor.createElement(WL.StorefrontMediator, null);
      }
      _getCheckoutSection() {
        const { purchasingPlan: e } = this.props.billing;
        return e ? Glamor.createElement(WL.CheckoutMediator, null) : null;
      }
      _getClientsSection() {
        return Glamor.createElement(ZL.BillingClients, null);
      }
      _getFeaturesSection() {
        return Glamor.createElement(WL.FeaturesMediator, null);
      }
    }
  );
  const {
    $billing: JL,
    $store: eB,
    $analytics: tB,
    $env: rB,
    $ui: nB,
    $constants: oB,
  } = app;
  JL.PurchaseMediator = eB.connect((e) => ({
    hasPro: true,
    hasProPaid: true,
  }))(
    ((XL = KL =
      class extends nB.Component {
        constructor(...e) {
          var t;
          return (
            (t = super(...e)),
            (this._onFaqClick = () => {
              tB.controller.sendEvent("user", "billing:faq-click"),
                chrome.tabs.create({ url: oB.common.faqBillingUrl });
            }),
            t
          );
        }
        render() {
          return Glamor.createElement(nB.BillingPurchase, {
            expanded: this.props.expanded,
            purchased: this.props.hasProPaid,
            withShadow: this.props.withShadow,
            hidePrice: this.props.hidePrice,
            hideDisclaimer: this.props.hideDisclaimer,
            hideFaq: this.props.hideFaq,
            header: this._getHeader(),
            features: this._getFeatures(),
            footer: this._getFooter(),
            onFaqClick: this._onFaqClick,
          });
        }
        _getHeader() {
          return {
            title: "Upgrade to PRO",
            description: Glamor.createElement(
              React.Fragment,
              null,
              "A ",
              Glamor.createElement("b", null, "trial"),
              " period of this feature has expired. Please consider upgrading to PRO to continue using ",
              this.props.featureTitle,
              "."
            ),
          };
        }
        _getFeatures() {
          return rB.options.billingProFeaturesList.map((e) => ({
            id: e.id,
            icon: e.icon,
            title: e.title,
            description: e.description,
          }));
        }
        _getFooter() {
          return {
            button: {
              label: "ACTIVATE PRO",
              onClick: this.props.onActivateProClick,
            },
          };
        }
      }),
    (KL.defaultProps = {
      expanded: !1,
      widthShadow: !0,
      hidePrice: !0,
      hideDisclaimer: !0,
      hideFaq: !0,
    }),
    XL)
  );
  const { $billing: aB, $store: iB, $analytics: sB, $env: lB, $ui: cB } = app,
    uB = {
      fsamLink: cB.clickable,
      coupon: {
        padding: "0px 3px 0.5px 4px",
        color: cB.color.textNormal,
        border: `1px solid ${cB.color.textActionable}`,
        borderRadius: 3,
        fontFamily: cB.font.monospace,
        fontWeight: 600,
        letterSpacing: "1px",
      },
      username: {
        ...cB.text.ellipsis,
        color: cB.color.textNormal,
        fontWeight: 700,
      },
      usernameSign: {
        fontSize: 10,
        opacity: 0.9,
        position: "relative",
        top: -1,
        marginRight: 1,
      },
    };
  class dB extends cB.Component {
    constructor(...e) {
      var t;
      return (
        (t = super(...e)),
        (this._onLoginClick = () => {
          iB.transaction((e) => {
            (e.billing.snapshot.panel = "form"),
              (e.billing.snapshot.accountScreen = "login");
          });
        }),
        (this._onLogoutClick = () => {
          iB.transaction((e) => {
            (e.billing.snapshot.panel = "form"),
              (e.billing.snapshot.accountScreen = "logout-confirm"),
              (e.billing.account.email = null),
              (e.billing.account.token = null);
          });
        }),
        (this._onManageAccountClick = () => {
          iB.transaction((e) => {
            (e.billing.snapshot.panel = "form"),
              (e.billing.snapshot.accountScreen = "manage-account");
          });
        }),
        (this._onFsamClick = () => {
          aB.controller.onFsamClick();
        }),
        (this._onActionClick = (e) => {
          sB.controller.sendEvent(
            "user",
            `billing:storefront-plan-click-${e.id}`
          ),
            chrome.runtime.sendMessage(
              { name: "update-fspring-status" },
              () => {
                setTimeout(() => {
                  var t, r;
                  const { billing: n } = this.props;
                  "active" ===
                    (null === (t = n.subscriptions) ||
                    void 0 === t ||
                    null === (r = t["inssist-pro-monthly"]) ||
                    void 0 === r
                      ? void 0
                      : r.state) ||
                    true ||
                    ("inssist-pro-lifetime" === e.id &&
                      iB.proxy.hasProPaid("inssist-pro-lifetime")) ||
                    this._kickOffPurchaseFlow(e);
                }, 250);
              }
            );
        }),
        (this._kickOffPurchaseFlow = (e) => {
          var t;
          (null === (t = this.props.billing.purchasingPlan) || void 0 === t
            ? void 0
            : t.id) === e.id
            ? iB.transaction((e) => {
                e.billing.purchasingPlan = null;
              })
            : iB.proxy.isLoggedIn()
            ? iB.transaction((t) => {
                t.billing.purchasingPlan = { id: e.id };
              })
            : iB.transaction((t) => {
                (t.billing.selectedPlan = {
                  id: e.id,
                  type: e.type,
                  icon: e.icon,
                  label: e.label,
                  period: e.period,
                  price: e.price,
                }),
                  (t.billing.snapshot.panel = "form"),
                  (t.billing.snapshot.accountScreen = "auth");
              });
        }),
        t
      );
    }
    componentDidMount() {
      this._updatePricing();
    }
    async _updatePricing() {
      aB.controller.updatePricing();
    }
    render() {
      const e = this._constructPlans(),
        t = this._constructStatus(),
        r = this._constructCurrencies(),
        n = this._constructActions();
      return Glamor.createElement(cB.BillingStorefront, {
        title: this._renderTitle(),
        plans: e,
        status: t,
        currencies: r,
        onCurrencyChange: this._onCurrencyChange,
        actions: n,
      });
    }
    _renderTitle() {
      return Glamor.createElement(
        "div",
        null,
        "Unlock all features with a ",
        Glamor.createElement("strong", null, "PRO Subscription"),
        " or a",
        " ",
        Glamor.createElement("strong", null, "Life-Time Deal"),
        Glamor.createElement("br", null)
      );
    }
    _constructStatus() {
      const { hasProPromocode: e, hasProPaid: t, auth: r } = this.props;
      if (e) {
        return {
          title: "PROMOCODE ACTIVATED",
          text: `A promocode has been activated for your Instagram @${
            (null == r ? void 0 : r.username) || "account"
          } ü§ó. Enjoy all features!`,
          ok: !0,
        };
      }
      if (t)
        return {
          title: "PRO ACTIVATED üèÖ",
          text: Glamor.createElement(
            "div",
            null,
            "All advanced features unlocked! You can manage your orders at",
            " ",
            Glamor.createElement(
              "a",
              { style: uB.fsamLink, onClick: this._onFsamClick },
              "FastSpring Account Portal"
            )
          ),
          ok: !0,
        };
      const n = this.props.discountAvailableTill;
      return -1 !== n && Date.now() < n
        ? {
            icon:
              "day" === this.state.theme
                ? "igswiss.discount-day"
                : "igswiss.discount-night",
            title: "Discount Available",
            text: Glamor.createElement(
              React.Fragment,
              null,
              Glamor.createElement(cB.Spacer, { height: "g0h" }),
              Glamor.createElement(
                "div",
                null,
                "Use these codes today to get a discount:"
              ),
              Glamor.createElement(cB.Spacer, { height: "g1" }),
              Glamor.createElement(
                "div",
                null,
                Glamor.createElement("span", { css: uB.coupon }, "INX2"),
                " ‚Äî ",
                Glamor.createElement("b", null, "50%"),
                " off for the first month."
              ),
              Glamor.createElement(cB.Spacer, { height: "g1" }),
              Glamor.createElement(
                "div",
                null,
                Glamor.createElement("span", { css: uB.coupon }, "MTZ8"),
                " ‚Äî ",
                Glamor.createElement("b", null, "15%"),
                " off for LIFETIME and INFINITE."
              ),
              Glamor.createElement(cB.Spacer, { height: "g1h" }),
              Glamor.createElement(
                "div",
                { css: { color: cB.color.textBleak } },
                "Click ‚ÄúEnter Promotional Code‚Äù during payment to enter coupon."
              )
            ),
          }
        : null;
    }
    _constructCurrencies() {
      const { billing: e } = this.props;
      if (!e.countryIso || "US" === e.countryIso) return null;
      const t =
        "default" === e.snapshot.checkoutCurrency
          ? "US"
          : this.props.billing.countryIso;
      return "US" !== t &&
        "USD" === this._getPriceCurrency("inssist-pro-monthly", t) &&
        this._getPriceValue("inssist-pro-monthly", t) >
          this._getPriceValue("inssist-pro-monthly", "US") &&
        "USD" === this._getPriceCurrency("inssist-pro-lifetime", t) &&
        this._getPriceValue("inssist-pro-lifetime", t) >
          this._getPriceValue("inssist-pro-lifetime", "US") &&
        "USD" === this._getPriceCurrency("inssist-pro-infinite", t) &&
        this._getPriceValue("inssist-pro-infinite", t) >
          this._getPriceValue("inssist-pro-infinite", "US")
        ? null
        : [
            {
              label: "Pay in: Local Currency",
              selected: "US" !== t,
              checkoutCurrency: "local",
              countryIso: t,
            },
            {
              label: "Pay in: USD",
              selected: "US" === t,
              checkoutCurrency: "default",
              countryIso: t,
            },
          ];
    }
    _onCurrencyChange(e) {
      iB.transaction((t) => {
        t.billing.snapshot.checkoutCurrency = e.checkoutCurrency;
      });
    }
    _constructActions() {
      const { billing: e } = this.props;
      return e.account.token
        ? {
            content: e.account.email
              ? Glamor.createElement(
                  "div",
                  null,
                  Glamor.createElement("strong", null, e.account.email)
                )
              : Glamor.createElement(
                  "div",
                  null,
                  "You are signed in to Inssist"
                ),
            buttons: [
              { label: "MANAGE ACCOUNT", onClick: this._onManageAccountClick },
              { label: "LOG OUT", onClick: this._onLogoutClick },
            ],
            color: cB.color.positive,
          }
        : {
            content: Glamor.createElement(
              "div",
              null,
              "Already have an Inssist account?"
            ),
            buttons: [{ label: "LOG IN HERE", onClick: this._onLoginClick }],
            color: cB.color.iconPassive,
          };
    }
    _getPrice(e, t) {
      const { billing: r } = this.props;
      if (!e) return null;
      t || (t = "US");
      const n = (e, t, r) =>
        e && e[t]
          ? e[t][r]
            ? { ...e[t][r], countryIso: r }
            : e[t].pricing && e[t].pricing[r]
            ? { ...e[t].pricing[r], countryIso: r }
            : null
          : null;
      return ((e) => {
        if (!e) return null;
        const t = this._getIntegralNumberPart(e.price),
          r = 100 * this._getFractalNumberPart(e.price);
        return {
          currency: e.currency,
          integral: t,
          fractal: 0 === r ? null : r,
        };
      })(
        n(r.pricing, e, t) ||
          n(r.pricing, e, "US") ||
          n(lB.options.billingPlans, e, t) ||
          n(lB.options.billingPlans, e, "US")
      );
    }
    _getPriceValue(e, t) {
      const r = this._getPrice(e, t);
      return r ? r.integral + r.fractal / 100 : null;
    }
    _getPriceCurrency(e, t) {
      const r = this._getPrice(e, t);
      return r ? r.currency : null;
    }
    _constructPlans() {
      var e, t, r, n, o;
      const { billing: a, auth: i } = this.props,
        s = "default" === a.snapshot.checkoutCurrency ? "US" : a.countryIso,
        l = iB.proxy.hasProPaid("inssist-pro-monthly"),
        c = iB.proxy.hasProPaid("inssist-pro-lifetime"),
        u = true,
        d =
          "active" ===
          (null === (e = a.subscriptions) ||
          void 0 === e ||
          null === (t = e["inssist-pro-monthly"]) ||
          void 0 === t
            ? void 0
            : t.state),
        h = i.username;
      return [
        {
          id: "inssist-pro-monthly",
          type: "subscription",
          price: this._getPrice("inssist-pro-monthly", s),
          period: "/ month",
          isSelected: l,
          icon: { name: "billing-storefront.sub" },
          label: "MONTHLY",
          benefits: [
            "Best for Casual use",
            "Unlimited accounts",
            Glamor.createElement(
              "span",
              null,
              "Paid monthly,",
              Glamor.createElement("br", null),
              "cancel any time"
            ),
          ],
          action: {
            label: l ? (d ? "SUBSCRIBED" : "CANCELED") : "SUBSCRIBE",
            disabled: l || u,
            progress:
              "inssist-pro-monthly" ===
              (null === (r = a.purchasingPlan) || void 0 === r ? void 0 : r.id),
            tooltip:
              l && !d
                ? "You have canceled PRO subscription and it will deactivate automatically at the end of the billing period."
                : null,
            onClick: this._onActionClick,
          },
          disabled: !1,
        },
        {
          id: "inssist-pro-lifetime",
          type: "product-username",
          price: this._getPrice("inssist-pro-lifetime", s),
          period: "/ account",
          badge: "POPULAR",
          isSelected: c,
          icon: i.avatarUrl
            ? { avatarUrl: i.avatarUrl }
            : { name: "billing-storefront.person" },
          label: "LIFETIME",
          benefits: this._constructLifetimeBenefits(),
          action: {
            label: c ? "PURCHASED" : "PURCHASE",
            disabled: c || u || d,
            progress:
              "inssist-pro-lifetime" ===
              (null === (n = a.purchasingPlan) || void 0 === n ? void 0 : n.id),
            tooltip: d
              ? "Please cancel MONTHLY subscription before purchasing LIFETIME plan."
              : null,
            onClick: this._onActionClick,
          },
          disabled: !h,
        },
        {
          id: "inssist-pro-infinite",
          type: "product",
          price: this._getPrice("inssist-pro-infinite", s),
          isUnlimited: !0,
          isSelected: u,
          icon: { name: "billing-storefront.ouroboros" },
          label: "INFINITE",
          benefits: ["Best for Businesses", "Unlimited accounts", "Paid once"],
          action: {
            label: u ? "PURCHASED" : "PURCHASE",
            disabled: u || d,
            progress:
              "inssist-pro-infinite" ===
              (null === (o = a.purchasingPlan) || void 0 === o ? void 0 : o.id),
            tooltip: d
              ? "Please cancel MONTHLY subscription before purchasing INFINITE plan."
              : null,
            onClick: this._onActionClick,
          },
          disabled: !1,
        },
      ];
    }
    _constructLifetimeBenefits() {
      const e = this.props.billing.orders
          .filter((e) => "inssist-pro-lifetime" === e.product)
          .map((e) => e.tags.accounts)
          .flat()
          .map((e) => e.name),
        t = Glamor.createElement(
          "div",
          { css: cB.absolute("1 . . -20") },
          Glamor.createElement(cB.InfoCircle, {
            mini: !0,
            tooltip: {
              text: [
                Glamor.createElement(
                  React.Fragment,
                  null,
                  "Lifetime plan is purchased once per Instagram account and will remain active for that Instagram account. It can not be transferred or reused with a different Instagram account."
                ),
                Glamor.createElement(
                  React.Fragment,
                  null,
                  "If you rename your Instagram account, the Lifetime plan will switch to the new name automatically."
                ),
                Glamor.createElement(
                  React.Fragment,
                  null,
                  "If you'd like to activate Lifetime plan for a different Instagram account, please switch over to that account in Inssist or Instagram before making the purchase."
                ),
              ],
            },
          })
        ),
        r = Glamor.createElement(
          React.Fragment,
          null,
          Glamor.createElement("div", null, "Will be activated for"),
          this._renderUsername(this.props.auth.username)
        ),
        n = Glamor.createElement(
          React.Fragment,
          null,
          Glamor.createElement("div", null, "Purchased for:"),
          Glamor.createElement(
            cB.FadedScroller,
            { style: { height: 18.5 * Math.min(e.length, 5.5) } },
            Glamor.createElement(
              "div",
              { css: { height: "fit-content" } },
              e.map((e) => this._renderUsername(e))
            )
          )
        );
      return true
        ? [Glamor.createElement("div", { css: cB.relative() }, t, n)]
        : e.length > 0
        ? [Glamor.createElement("div", { css: cB.relative() }, t, r), n]
        : [
            "Best for Creatives",
            Glamor.createElement("div", { css: cB.relative() }, t, r),
            "Paid once",
          ];
    }
    _renderUsername(e) {
      return Glamor.createElement(
        "div",
        { css: uB.username, title: e, key: e },
        Glamor.createElement("span", { style: uB.usernameSign }, "@"),
        e
      );
    }
    _getIntegralNumberPart(e) {
      const t = Math.abs(e);
      return e > 0 ? Math.floor(t) : -Math.floor(t);
    }
    _getFractalNumberPart(e) {
      const t = Math.abs(e);
      return Number((t - Math.floor(t)).toFixed(12));
    }
  }
  aB.StorefrontMediator = iB.connect((e) => ({
    auth: e.auth,
    billing: e.billing,
    hasProPromocode: iB.proxy.hasProPromocode(),
    hasProPaid: true,
    discountAvailableTill: e.billing.discount.availableTill,
  }))(cB.theme.ThemeAware(dB));
  const { $billing: hB, $ui: pB, $shortid: mB } = app;
  hB.UpsellOverlayMediator = class extends pB.Component {
    constructor(e) {
      super(e),
        (this._onActivateProClick = () => {
          const e = this.props.feature || null;
          hB.controller.openBilling(e);
        }),
        (this.state = { id: `up-${mB.generate()}` });
    }
    componentDidMount() {}
    componentWillUnmount() {
      clearInterval(this.reloadIfHidden);
    }
    render() {
      return Glamor.createElement(pB.UpsellOverlay, {
        style: this.props.style,
        id: this.state.id,
        show: this.props.show,
        noArt: this.props.noArt,
        onOverlayClick: this.props.onOverlayClick,
        content: this._renderContent(),
      });
    }
    _isVisible() {
      const e = document.getElementById(this.state.id);
      return (
        e &&
        null !== e.offsetParent &&
        "visible" === window.getComputedStyle(e).visibility
      );
    }
    _renderContent() {
      const e =
        {
          analytics: "Analytics",
          bulk: "Post Assistant",
          "cover-assist": "Cover Assistant",
          dm: "Ghost Mode",
          insights: "Analytics",
          "music-assist": "Music Assistant",
          "video-stories": "Video Stories",
          "ghost-story-view": "Ghost Story View",
          later: "Post Later",
        }[this.props.feature] || "INSSIST";
      return Glamor.createElement(
        "div",
        { css: { width: "100%", maxWidth: 400 } },
        Glamor.createElement(hB.PurchaseMediator, {
          featureTitle: e,
          onActivateProClick: this._onActivateProClick,
        })
      );
    }
  };
  const {
    $billing: gB,
    $store: fB,
    $iframeBus: vB,
    $analytics: bB,
    $env: yB,
    $network: wB,
    $igApi: CB,
    $sentry: kB,
  } = app;
  gB.controller = {
    init: function () {
      Object.assign(this, {
        pricingRequested: !1,
        apiSender: new wB.Sender({ urlPrefix: yB.options.apiUrl }),
        defaultCountry: "United States",
        statesOfAmerica: [
          "Alabama",
          "Alaska",
          "Arizona",
          "Arkansas",
          "California",
          "Colorado",
          "Connecticut",
          "Delaware",
          "Florida",
          "Georgia",
          "Hawaii",
          "Idaho",
          "Illinois",
          "Indiana",
          "Iowa",
          "Kansas",
          "Kentucky",
          "Louisiana",
          "Maine",
          "Maryland",
          "Massachusetts",
          "Michigan",
          "Minnesota",
          "Mississippi",
          "Missouri",
          "Montana",
          "Nebraska",
          "Nevada",
          "New Hampshire",
          "New Jersey",
          "New Mexico",
          "New York",
          "North Carolina",
          "North Dakota",
          "Ohio",
          "Oklahoma",
          "Oregon",
          "Pennsylvania",
          "Rhode Island",
          "South Carolina",
          "South Dakota",
          "Tennessee",
          "Texas",
          "Utah",
          "Vermont",
          "Virginia",
          "Washington",
          "West Virginia",
          "Wisconsin",
          "Wyoming",
        ],
        fsamLink: null,
        fsamLinkRequestedAt: -1,
      }),
        gB.discountController.init(),
        this.capturePageEvents(),
        this.sendGaEventsWhenPurchasing();
    },
    openBilling: function (e = null) {
      fB.transaction((t) => {
        (t.sidebar.isOpen = !0),
          (t.sidebar.selectedTabId = "tab-billing"),
          (t.billing.navigation.isBodyOpen = !0),
          (t.tagAssist.shown = !1),
          (t.coverAssist.shown = !1),
          (t.musicAssist.shown = !1),
          (t.storyAssist.shown = !1),
          (t.later.showAssistPanel = !1),
          e && (t.billing.recentFeature = e);
      });
    },
    capturePageEvents: function () {
      vB.on("fspring.close", this.closeFSpringPopup),
        vB.on("fspring.subscription-success", () => {
          chrome.runtime.sendMessage({ name: "fspring.subscription-success" });
        }),
        vB.on("fspring.subscription-failure", () => {
          chrome.runtime.sendMessage({ name: "fspring.subscription-failure" });
        });
    },
    closeFSpringPopup: function () {
      fB.transaction((e) => {
        e.billing.purchasingPlan = null;
      });
    },
    sendGaEventsWhenPurchasing: function () {
      fB.model.observe(
        (e) => e.billing.purchasingPlan,
        (e) => {
          if (!e) return;
          const t = fB.state.billing.recentFeature || "none";
          bB.controller.sendEvent("user", `upgrade:from-${t}-${e.id}`);
        }
      );
    },
    updatePricing: async function () {
      var e, t, r;
      if (this.pricingRequested) return;
      const n = await CB.api.fetchLoginActivity();
      let o = this.defaultCountry;
      const a =
        (null === (e = n.result) ||
        void 0 === e ||
        null === (t = e.data) ||
        void 0 === t
          ? void 0
          : t.sessions) ||
        (null === (r = n.result) || void 0 === r ? void 0 : r.sessions);
      if ((null == a ? void 0 : a.length) > 0) {
        (o = (
          (a.find((e) => (e.location || "").split(", ").length > 1) || a[0])
            .location || ""
        ).split(", ")),
          (o = o[o.length - 1]),
          "" === !o
            ? (o = null)
            : this.statesOfAmerica.includes(o) && (o = this.defaultCountry);
      }
      const i = "/fspring/pricing",
        s =
          o !== this.defaultCountry
            ? `United States,${o}`
            : this.defaultCountry,
        l = Object.keys(yB.options.billingPlans).join(","),
        c = await this.apiSender.send(i, {
          query: { countryNames: s, productIds: l },
        });
      if ((console.log("Location:", s), c && "ok" === c.status)) {
        this.pricingRequested = !0;
        const { countries: e, pricing: t } = c,
          r = o ? e[o] : null;
        fB.transaction((e) => {
          (e.billing.countryIso = r), (e.billing.pricing = t);
        });
      } else {
        const e = c.error;
        ("TypeError" === e.name && "Failed to fetch" === e.message) ||
          kB.controller.sendError(
            `Unexpected API error at ${i}`,
            "error",
            { error: e },
            { actor: "auth" }
          );
      }
    },
    onFsamClick: function () {
      let e = `https://${yB.options.storefront}/account`;
      const t = Date.now();
      this.fsamLink =
        t - this.fsamLinkRequestedAt < 828e5 ? this.fsamLink : null;
      (this.fsamLink
        ? Promise.resolve()
        : gB.connector
            .accountManagementUrl(null, fB.state.billing.account.token)
            .then((e) => {
              (this.fsamLink = e.url), (this.fsamLinkRequestedAt = t);
            })
      )
        .then(() => {
          this.fsamLink && (e = `${this.fsamLink}#/subscriptions`),
            chrome.tabs.create({ url: e, active: !0 });
        })
        .catch(() => {
          chrome.tabs.create({ url: e, active: !0 });
        });
    },
  };
  const {
    $billing: SB,
    $store: EB,
    $utils: _B,
    $analytics: xB,
    $dateFns: PB,
  } = app;
  SB.discountController = {
    init: function () {
      this.updateDiscount();
    },
    updateDiscount: function () {
      true ||
        (-1 === EB.state.billing.discount.availableTill &&
          this.hasExceededTrialFeature() &&
          (EB.transaction((e) => {
            e.billing.discount.availableTill = PB.startOfDay(
              Date.now() + 4 * _B.time.DAY
            ).getTime();
          }),
          setTimeout(() => {
            xB.controller.sendEvent("user", "billing:discount-message-shown"),
              EB.transaction((e) => {
                e.billing.discount.showSnackbarMessage = !0;
              });
          }, 7e3)));
    },
    hasExceededTrialFeature: function () {
      return Object.keys(EB.state.billing.trial)
        .filter((e) => "installedOn" !== e)
        .some((e) => !EB.proxy.hasTrialFeature(e));
    },
  };
  const { $billing: TB, $env: IB, $network: GB, $sentry: DB } = app;
  let AB;
  function MB(e, t, r) {
    return (
      (e = e || {
        updateSnapshot: () => {},
        applySnapshot: () => {},
        getSnapshot: () => ({}),
      }).updateSnapshot((e) => {
        e.loading = !0;
      }),
      AB || (AB = new GB.Sender({ urlPrefix: IB.options.apiUrl })),
      AB.send(t, r)
        .then((t) => {
          if (!t || "ok" !== t.status) throw t;
          return (
            e.updateSnapshot((e) => {
              e.loading = !1;
            }),
            t
          );
        })
        .catch((r) => {
          const n = e.getSnapshot();
          throw (
            ((n.loading = !1),
            "TypeError" === r.name && "Failed to fetch" === r.message
              ? ((n.statusText =
                  "Billing server is not responding. Please check that you are online or try again later."),
                DB.controller.sendError(
                  `API is not responding at ${t}`,
                  "error",
                  { error: r },
                  { actor: "auth" }
                ))
              : "bad-query" === r.status
              ? (n.statusText =
                  "Malformed email address. Please check your email address and try again.")
              : "account-not-found" === r.status
              ? ((n.statusText =
                  "Account for this email not found. Please check the email address you entered or create a new account instead."),
                (n.statusButtons = [{ label: "CREATE NEW ACCOUNT" }]))
              : "wrong-password" === r.status
              ? ((n.statusText =
                  "Incorrect email / password combination. Please check the password or recover it."),
                (n.statusButtons = [{ label: "I FORGOT MY PASSWORD" }]))
              : "account-is-not-active" === r.status
              ? (n.statusText =
                  "This account has been disabled. Please create a new account instead.")
              : "email-already-verified" === r.status
              ? ((n.confirmationCodeText = null),
                (n.statusText =
                  "This email address has been verified. Please login instead."))
              : "otp-does-not-match" === r.status
              ? (n.statusText =
                  "Verification code does not match our records. Please check your inbox for the code we sent.")
              : "email-already-in-use" === r.status
              ? ((n.statusText =
                  "This email is already in use, please try to login instead or use a different email address."),
                (n.statusButtons = [{ label: "LOGIN INSTEAD" }]))
              : "email-is-not-verified" === r.status ||
                ((n.statusText =
                  "Oops... Something went wrong. Please try to login again later."),
                DB.controller.sendError(
                  `Unexpected API error at ${t}`,
                  "error",
                  { error: r },
                  { actor: "auth" }
                )),
            e.applySnapshot(n),
            r)
          );
        })
    );
  }
  TB.connector = {
    isTaken: function (e, t) {
      return MB(e, "/auth/is-taken", { body: { email: t } });
    },
    login: function (e, t, r) {
      return MB(e, "/auth/login", { body: { email: t, password: r } });
    },
    register: function (e, t, r, n, o, a) {
      return MB(e, "/auth/register", {
        body: {
          email: t,
          password: r,
          firstName: n,
          lastName: o,
          usernames: a,
        },
      });
    },
    verifyEmail: function (e, t, r) {
      return MB(e, "/auth/verify-email", { body: { email: t, otp: r } });
    },
    changePassword: function (e, t, r, n) {
      return MB(e, "/auth/change-password", {
        body: { email: t, otp: r, newPassword: n },
      });
    },
    resendOtp: function (e, t, r) {
      return MB(e, "/auth/resend-otp", { body: { email: t, password: r } });
    },
    recoverPassword: function (e, t) {
      return MB(e, "/auth/recover-password", { body: { email: t } });
    },
    deleteAccount: function (e, t) {
      return MB(e, "/auth/delete-account", { method: "POST", token: t });
    },
    accountManagementUrl: function (e, t) {
      return MB(e, "/fspring/account-management-url", {
        method: "GET",
        token: t,
      });
    },
  };
  const { $cleanup: FB, $store: RB, $bus: LB } = app;
  FB.controller = {
    cleanUpState: async function () {
      await new Promise((e) => {
        let t;
        const r = () => {
          if (!t) return;
          RB.state.cleanupId === t &&
            (RB.transaction((e) => delete e.cleanupId),
            setTimeout(() => n()),
            e());
        };
        (async () => {
          (t = await LB.send("cleanup.clean-up-state")), r();
        })();
        const n = RB.model.observe((e) => e.cleanupId, r);
      });
    },
  };
  const { $fusion: BB, $bus: OB, $ui: $B } = app;
  BB.NewVersionCardMediator = class extends $B.Component {
    constructor(e) {
      super(e),
        (this._onUpdateClick = () => {
          this.setState({ updating: !0 }), OB.send("fusion.update-now-click");
        }),
        (this.state = { show: !1, updating: !1 });
    }
    componentDidMount() {
      OB.on("fusion.new-version-available", () => {
        this.setState({ show: !0 });
      });
    }
    render() {
      return Glamor.createElement(
        $B.SnackbarItem,
        { id: "fusion-new-version-card-mediator", show: this.state.show },
        Glamor.createElement($B.ActionCard, {
          image: "new-version-icon.png:40:40",
          content:
            "A new product version is available. Click the button to update and reload INSSIST.",
          markerColor: $B.color.error,
          actions: [
            Glamor.createElement($B.LinkButton, {
              small: !0,
              label: this.state.updating ? "UPDATING..." : "UPDATE NOW",
              disabled: this.state.updating,
              onClick: this._onUpdateClick,
            }),
          ],
        })
      );
    }
  };
  const { $fusion: NB, $bus: UB, $utils: HB } = app;
  NB.controller = {
    init: async function () {
      UB.on("fusion.reload-popup", () => {
        location.reload();
      }),
        UB.send("fusion.check-new-version");
      const e = await HB.callAsync(chrome.tabs.getCurrent);
      UB.send("fusion.popup-tab-id", e.id);
    },
    getConfig: function () {
      const e = HB.ls.get("fusion.config");
      return e && e.version >= NB.config.version ? e : NB.config;
    },
  };
  const { $fusion: zB } = app;
  zB.config = {
    version: 128,
    dmSelectors: {
      bottomToolbarHeightVar: "--revamp-nav-bottom-toolbar-height",
      menuPanel: [
        '.IGDSBox[style*="height: 100%"] > div:first-child',
        "div:has(> .createKeyCommandWrapper > .PolarisNavigation)",
        'div:has(> [tabindex="-1"] > .PolarisNavigation)',
      ],
      pageContent: [
        '.IGDSBox[style*="height: 100%"] > div:last-child',
        ".PolarisPageLayoutHandler",
      ],
      header: [".IGDLeftRailContainer > div:first-child"],
      headerUserSelect: [
        ".IGDLeftRailContainer > div:first-child > div:first-child",
      ],
      headerWriteButton: [
        ".IGDLeftRailContainer > div:first-child > div:last-child",
      ],
      headerNoFoldersContainer: [
        ".IGDLeftRailContainer > .IGDThreadListTitleLayout",
      ],
      headerNoFoldersTab: [
        ".IGDLeftRailContainer > .IGDThreadListTitleLayout > *",
      ],
      folderTab: [".IGDProFolderMenu > .PressableText"],
      requestsTab: [".IGDProFolderMenu > .PressableText:nth-child(3)"],
      requestsTabContent: [
        ".IGDProFolderMenu > .PressableText:nth-child(3) > span",
      ],
      requestsTabText: [
        ".IGDProFolderMenu > .PressableText:nth-child(3) > span > span",
      ],
      requestsDescription: [".IGDMessageRequestLeftRailLayout:nth-child(2)"],
      chatItem: [
        ".ReQLScrollAnchored > .Pressable",
        ".IGDInboxThreadListContainer .ReQLScrollAnchored > .IGDVisibilityAware > .Pressable",
        ".IGDInboxThreadListContainer .ReQLScrollAnchored > .WebPressable",
        ".IGDInboxThreadListContainer .ReQLScrollAnchored .IGDVisibilityAware > .WebPressable",
      ],
      chatItemContent: [
        ".ReQLScrollAnchored > .Pressable > div",
        ".IGDInboxThreadListContainer .ReQLScrollAnchored > .IGDVisibilityAware > .Pressable > div",
        ".IGDInboxThreadListContainer .ReQLScrollAnchored > .WebPressable > div",
        ".IGDInboxThreadListContainer .ReQLScrollAnchored .IGDVisibilityAware > .WebPressable > div",
      ],
      chatItemSkeleton: [
        ".IGDInboxLeftColumnPlaceholder > .IGDListCellPlaceholder",
        ".ReQLScrollAnchored > .IGDListCellPlaceholder",
      ],
      chatItemTitle: [
        '.ReQLScrollAnchored > .Pressable div[style*="width: 244px"]',
        '.ReQLScrollAnchored > .WebPressable div[style*="width: 244px"]',
      ],
      chatHeader: [".IGDThreadDetail:has(.IGDSectionHeaderLayout) > div"],
      chatHeaderAvatar: [
        ".IGDThreadDetail:has(.IGDSectionHeaderLayout) .IGDSAvatar",
      ],
      chatHeaderAvatarContainer: [
        ".IGDThreadDetail:has(.IGDSectionHeaderLayout) .IGDSingleAvatar",
      ],
      chatHeaderTitle: [
        ".IGDThreadDetail:has(.IGDSectionHeaderLayout) a > .IGDSBox",
        ".IGDThreadDetail:has(.IGDSectionHeaderLayout) a:has(.BaseLineClamp) > div",
      ],
      writeInput: [".MWPCometComposerInner > .CometLexicalContentEditable"],
      writeInputContainer: ["div:has(> .MWPCometComposerInner)"],
      writePanel: [".MWV2FileDropzone > div:not([class]) > .IGDComposerView"],
      writePanelVoiceButton: [
        '.IGDComposerView:has(> input) > div:has(path[d^="M19.5 10.671v"])',
      ],
      mediaViewerVideo: [".IGDMediaViewer video"],
    },
    igSelectors: {
      general: {
        reactRoot: ["#react-root", '[id^="mount"]'],
        root: [
          "#react-root > section",
          "#react-root > div > div > section",
          "section.PolarisBaseShell",
          "section.PolarisRefreshedBaseShell",
        ],
        rootNewNavDesign: ["section.PolarisRefreshedBaseShell"],
        content: [
          "#react-root > section > *:nth-child(2)",
          "main.PolarisShellContent",
          "main.PolarisRefreshedShellContent",
        ],
        contentSection: [
          "main.PolarisShellContent > section",
          "main.PolarisRefreshedShellContent > section",
        ],
        header: ["._9ezyW", "header.PolarisGenericMobileHeader"],
        headerContent: [".b5itu", "header.PolarisGenericMobileHeader ._ab16"],
        headerTitle: [".K3Sf1", "h1.PolarisGenericMobileHeader"],
        footer: [".PolarisShellFooter"],
        main: [
          ".uzKWK",
          ".PolarisBaseShell main.PolarisShellContent._a996",
          ".PolarisRefreshedBaseShell main",
        ],
        pageLayoutNewNavDesign: [".PolarisPageLayoutHandler"],
        nextPageLoaderProfile: ["._4emnV", ".PolarisVirtualPostsGrid._aanh"],
        nextPageLoaderExplore: [
          'html[data-page="exploreLandingPage"] .Id0Rh',
          'html[data-page="exploreLandingPage"] .PolarisGenericVirtualFeed._aalg',
        ],
        nextPageLoaderFeed: [
          'html[data-page="feedPage"] .Id0Rh',
          'html[data-page="feedPage"] .PolarisGenericVirtualFeed._aalg',
        ],
        tabBar: [
          ".KGiwt",
          ".PolarisNavigation > ._abpb",
          '.PolarisNavigation[style*="transform"]',
          ".xaeubzz",
        ],
        tabBarWrap: [
          ".ZoygQ",
          ".IGDSBox > .PolarisNavigation",
          ".createKeyCommandWrapper > .PolarisNavigation",
          "div:not(.PolarisNavigation) > .PolarisNavigation",
        ],
        tabBarContainer: [
          ".IGDSBox > .PolarisNavigation > div",
          ".createKeyCommandWrapper .PolarisNavigation[style]:has(> .PolarisNavigation)",
          "div:has(> .createKeyCommandWrapper > .PolarisNavigation)",
          "div:has(> div:not(.PolarisNavigation) > .PolarisNavigation)",
        ],
        tabBarTopContainer: [".IGDSBox:has(> .createKeyCommandWrapper)"],
        tabBarInput: [
          ".ZoygQ input",
          ".PolarisNavigation input.PolarisImageFileForm",
        ],
        tabBarButton: [
          '.PolarisNavigation[style*="transform"] > div > div:not([class])',
          ".PolarisNavigationIcons > div",
        ],
        tabBarCreatePostIconOldNavDesign: [".PolarisMobileNavLoggedIn > svg"],
        tabBarAvatarContainer: [
          ".PolarisMobileNavLoggedInButton span.PolarisUserAvatar",
        ],
        storyTrayViewerAvatarContainer: [
          ".PolarisStoryTray .PolarisStoryTray._aauk:first-child span.PolarisUserAvatar",
        ],
        tabBarLink: [
          ".PolarisMobileNavLoggedIn a",
          '.PolarisNavigation[style*="transform"] a',
          ".createKeyCommandWrapper .PolarisNavigationItem a",
        ],
        tabBarDm: [
          '.PolarisNavigation div:not(:first-child):not(:last-child):not([class]):has(polygon[points^="11.698 20.334"])',
          '.PolarisNavigation div:not(:first-child):not(:last-child):not([class]):has(polygon[points^="11.698 20.334"])',
          '.PolarisNavigation div:not(:first-child):not(:last-child):not([class]):has(path[d^="M12.003 2.001a9"])',
        ],
        tabBarReels: [
          '.PolarisNavigation div:not(:first-child):not(:last-child):not([class]):has(path[d^="M2 12.001v3.449c0"])',
          '.PolarisNavigation div:not(:first-child):not(:last-child):not([class]):has(path[d^="m12.823 1 2.974"])',
        ],
        tabBarBadge: [
          ".PolarisNavigation .PolarisNavigationBadge",
          ".PolarisDirectNavItemBadge",
        ],
        storyFooter: [
          ".mLi3m",
          "footer.PolarisMobileStoriesFooter",
          "footer.PolarisMobileOwnerStoriesOverlay",
        ],
        storyQuickReactionsBackground: ".x4U7z",
        storyPreviewContainer: [
          ".zGtbP",
          ".PolarisShellContent ._aac4",
          ".PolarisRefreshedShellContent ._aac4",
        ],
        settingsRectangle: ".BvMHM",
        recommendationsContainer: [
          ".bq3Mi",
          ".tHaIX",
          ".PolarisSuggestedUserFeedUnit",
        ],
        modal: [".RnEpo", '.PolarisIGCoreModalBackdrop[role="presentation"]'],
        modalWindow: [
          '.RnEpo [role="dialog"]',
          '.PolarisIGCoreModalBackdrop[role="presentation"] [role="dialog"]',
        ],
        modalWindowHashtagContent: ['.RnEpo [role="dialog"] ._8zyFd'],
        bottomNotification: ".Z2m7o",
        createStoryHeaderButton: [
          ".mTGkH",
          ".PLytv",
          "button.PolarisFeedPageMobileHeader",
        ],
        peersPage: '[data-page="followList"]',
        peersPageHeader: [
          '[data-page="followList"] .b5itu',
          '[data-page="followList"] .PolarisGenericMobileHeader > ._ab16',
        ],
        peersModalHeader: ".HYpXt .eiUFA",
        storiesBar: [
          ".qf6s4",
          ".PolarisIGVirtualList.PolarisStoryTray",
          ".PolarisFeedStoryTrayWrapper",
        ],
        storiesBarLoadingPanel: [
          ".PolarisFeedLoadingSpinner._ab6o",
          ".PolarisFeedPage ._ab6o",
        ],
        blueLinkButton: ".UP43G",
        actionSheet: [".xkuux", ".PolarisIGCoreModalBackdrop > ._ac7o"],
        useAppGradientBar: [".xZ2Xk", ".PolarisMobileNav + section._aa9n"],
        actionDialog: [".mt3GC", ".IGCoreDialog._a9-z"],
        actionDialogItem: [".mt3GC .aOOlW", ".IGCoreDialog._a9--"],
        actionDialogWithoutHeader: [
          ".mt3GC:first-child",
          ".IGCoreDialog._a9-z:first-child",
        ],
        postDmButton: [
          'article button.PolarisIGCoreSVGIconButton:has(polygon[points*="11.698 20.334 22 3.001"])',
          '.PolarisMobilePost_next button.PolarisIGCoreSVGIconButton:has(polygon[points*="11.698 20.334 22 3.001"])',
        ],
        post: [
          "article[data-post-id]",
          "article:has([data-post-id])",
          ".PolarisMobilePost_next[data-post-id]",
        ],
        postThreeDotsButton: [
          ".MEAGs button",
          ".PolarisPostOptionsButtonPicker button",
          '.PressableText:has(circle[cx="18"][cy="12"][r="1.5"])',
        ],
        postVideoContainer: ["._5wCQW", ".PolarisDeclarativeVideo._ab1c"],
        publishingBarText: [
          ".o5gub span",
          ".PolarisUploadProgressBar._aaug",
          ".UploadBar__text",
        ],
        uploadPanel: [
          ".TExId",
          ".PolarisUploadProgressBar._aauh",
          ".UploadBar",
        ],
        uploadPanelText: [".PolarisUploadProgressBar._aaug"],
        uploadPanelVideoIcon: ".TExId .cRc_w",
        expandVideoButton: "._7zNgw",
        continueWatchingOverlay: ".oNYBg",
        cookieModalContent: ".RnEpo ._74vy-",
        cookieModal: ".BaseCometModal:has(.PolarisCookieConsentModal)",
        carouselNavButton: ".PolarisSidecar .PolarisHSnapScroll > button",
        blueButton: "button._acas:not(._acao)",
        toastMessage: [".PolarisToastWrapper._a999"],
        postCaption: [
          ".PolarisPostPreviewCommentsPicker ._ab9o > span:last-child > span:first-child",
        ],
        postCaptionLink: [
          ".PolarisPostPreviewCommentsPicker ._ab9o > span:last-child > span:first-child a",
        ],
        exceptionDialogOkButton: [
          '.CometExceptionDialog .PressableText[role="button"]',
        ],
        errorPageContent: ["._a3gq ._ab8q"],
        postPhotoOverlay: [".PolarisPhoto._aagw"],
        tryMbsSection: [".PolarisQPBloksRenderer._a9_9"],
        splashScreen: ["body > #splash-screen"],
      },
      creationPopup: {
        root: [
          ".PolarisMobileCreationNavItem ._aa5x",
          ".PolarisMobileCreationNavItem ._ad8j",
          ".PolarisMobileCreationNavItem ._aa5-",
          ".IGDSPopover:has(.PolarisMobileCreationMenuContent)",
          ".PolarisMobileCreationMenuContent",
        ],
        triggerButton: [
          ".PolarisGenericMobileHeader .PolarisMobileCreationNavItem a",
        ],
        postButton: [
          '.PolarisMobileCreationNavItem ._aa5x [role="button"]:first-child',
          '.PolarisMobileCreationNavItem ._ad8j [role="button"]:first-child',
          '.PolarisMobileCreationNavItem ._aa5- [role="button"]:first-child',
          '.PolarisMobileCreationMenuContent [role="button"]:first-child',
        ],
        storyButton: [
          '.PolarisMobileCreationNavItem ._aa5x [role="button"]:last-child',
          '.PolarisMobileCreationNavItem ._ad8j [role="button"]:last-child',
          '.PolarisMobileCreationNavItem ._aa5- [role="button"]:last-child',
          '.PolarisMobileCreationMenuContent [role="button"]:last-child',
        ],
        postInput: [".PolarisMobileCreationNavItem > form:last-child > input"],
      },
      dragPanel: {
        root: [".RnEpo.xpORG._9Mt7n", ".PolarisIGCoreModalBackdrop > ._ac7o"],
        handle: [".BHY8D", ".PolarisIGCoreSheet._ac7m"],
        igIcon: ".glyphsSpriteApp_Icon_36.u-__7",
        sendEmailLink: [
          '.-qQT3[href^="mailto:"]',
          '._abm4[href^="mailto:"]',
          '._abm4 [href^="mailto:"]',
          'a.Pressable[target="_top"][href^="mailto:"]',
          'a.WebPressable:has(polygon[points*="11.698 20.334 22 3.001"])',
        ],
        shareToThreadsLink: [
          'a.WebPressable:has(path[d*="M141.537 88.9883C140.71 88.5919 139.87"])',
        ],
      },
      authScreen: {
        loginContainer: ".rxwpz",
        loginContainerParagraph: ".rxwpz p",
        loginFormParagraph: ".HmktE p",
        avatar: ".rxwpz img",
        username: [
          'html[data-page="unifiedHome"] .l9hKg',
          'html[data-page="loginPage"] .l9hKg',
        ],
        footer: [
          'html[data-page="unifiedHome"] footer',
          'html[data-page="loginPage"] footer',
        ],
        fromFacebookBar: [
          'html[data-page="unifiedHome"] .O1flK',
          'html[data-page="loginPage"] .O1flK',
        ],
        openAppButton: [
          ".PolarisAuthFormCard:not(:has(.PolarisSlimLoginForm)) div:has(> .PolarisIGCoreButton:first-child:last-child)",
        ],
      },
      storyViewer: {
        root: [
          ".PolarisMobileOwnerStories.PolarisStoriesReel",
          ".PolarisMobileStoriesPage > .PolarisMobileStories",
          "section.PolarisBaseShell > .PolarisMobileStories",
          ".CometPushView > .PolarisStoriesV3Page",
        ],
        container: [
          ".PolarisBaseShell:has(> .PolarisMobileStories)",
          ".CometPushView:has(> .PolarisStoriesV3Page)",
        ],
        videoPlayer: ['.PolarisStoryVideoPlayerWrapper > div[style*="top: 0"]'],
        avatar: [
          ".PolarisMobileOwnerStories img.PolarisUserAvatar",
          ".PolarisMobileOwnerStoriesOverlay img.PolarisUserAvatar",
          ".PolarisStoriesV3Owner img.PolarisUserAvatar",
        ],
        time: [
          "time.PwV9z",
          "time.PolarisStoriesHeaderOwner",
          "time.PolarisStoriesV3Timestamp",
        ],
        videoPoster: "img.PolarisStoryVideo",
        mediaContainer: ".PolarisStoryMediaLayout._aa64",
        image: [
          ".PolarisStoryImage img.PolarisStoryImage",
          ".PolarisStoriesV3MediaPlayer > img",
        ],
        video: [
          "video.PolarisStoryVideo",
          ".PolarisMobileStoryViewer video",
          ".PolarisStoriesV3MediaPlayer video",
        ],
        textarea: ["textarea.PolarisStoriesV3ReplyInput"],
        viewAsAvatar: [".PolarisStoryMediaLayout img.PolarisUserAvatar"],
        pollContainer: ".tj63N",
        pollButtons: ".tj63N",
        pollAnswerDigitOrEmoji: ".KUQv0",
      },
      storyCreation: {
        root: [
          "._650Zr",
          ".PolarisStoryCreationPage",
          'body[data-page="StoryCreationPage"] section.PolarisBaseShell',
        ],
        canvas: [
          ".PolarisStoryCreationPage canvas",
          'body[data-page="StoryCreationPage"] canvas',
        ],
        headerButton: [
          ".PolarisStoryCreationPage header button",
          'body[data-page="StoryCreationPage"] header button',
        ],
        textInput: [
          "[contenteditable]",
          ".PolarisStoryCreationTextInput[contenteditable]",
        ],
        topRightButtonsContainer: [
          ".o4NXM",
          ".PolarisStoryCreationPage header > div.PolarisStoryImageCreationContainer",
          'body[data-page="StoryCreationPage"] header > div.PolarisStoryImageCreationContainer',
        ],
        topRightButton: [
          ".o4NXM button",
          ".PolarisStoryCreationPage header > div button",
          'body[data-page="StoryCreationPage"] header > div button',
        ],
        downloadButton: [
          '[class*="storiesSpriteDownload"]',
          ".PolarisStoryCreationPage header > div button:nth-child(1)",
          'body[data-page="StoryCreationPage"] header > div button:nth-child(1)',
        ],
        mentionBarContainer: [
          ".uPlSl",
          ".PolarisTypeahead.PolarisStoryCreationTextInput",
        ],
        mentionBar: [
          ".imGmP",
          ".PolarisTypeahead.PolarisStoryCreationTextInput > div",
        ],
        mentionReel: [
          ".imGmP > div",
          ".PolarisTypeahead.PolarisStoryCreationTextInput > div > div",
        ],
        mentionReelRow: [
          ".imGmP > div > div",
          ".PolarisTypeahead.PolarisStoryCreationTextInput > div > div > div",
        ],
        mentionReelItem: [
          "#touch_mention.qOsKV",
          "#touch_mention.PolarisStoryTypeaheadResultsList._acn7",
        ],
        mentionReelItemName: [
          "#touch_mention.qOsKV .KMpYj",
          "#touch_mention.PolarisStoryTypeaheadResultsList ._acn9",
        ],
        mentionReelItemAvatar: [
          "#touch_mention.PolarisStoryTypeaheadResultsList img.PolarisStoryTypeaheadResultsList",
        ],
        videoHeader: ["._9o3e0", "header.PolarisStoryVideoCreationContainer"],
        photoControls: [
          ".PolarisStoryImageCreationContainer._aa3f",
          "header.PolarisStoryImageCreationContainer > div:last-child",
        ],
        videoWrap: [
          "header.PolarisStoryVideoCreationContainer + .PolarisStoryVideoCreationContainer",
        ],
        video: [".JHXak", "video.PolarisStoryVideoCreationContainer"],
        videoPoster: [
          ".pSeby",
          "video.PolarisStoryVideoCreationContainer + img",
        ],
        footer: [".GRPvx ~ footer", "footer.PolarisStoryCreationShareFooter"],
        videoPlayButton: [
          ".JHXak ~ .videoSpritePlayButton",
          "div.PolarisStoryVideoCreationContainer > span",
        ],
        videoCreationExitButton: [
          "header.PolarisStoryVideoCreationContainer > button.PolarisIGCoreIconButton",
        ],
        submitButton: [".PolarisStoryCreationShareFooter > button"],
        submitButtonText: [
          ".PolarisStoryCreationShareFooter > button .PolarisStoryCreationShareFooter",
        ],
        uploadHeader: [
          ".PolarisStoryCreationPage .PolarisSharingProgressModal header",
          'body[data-page="StoryCreationPage"] .PolarisSharingProgressModal header',
        ],
        uploadBar: [
          ".PolarisStoryCreationPage .PolarisSharingProgressModal header > div",
          'body[data-page="StoryCreationPage"] .PolarisSharingProgressModal header > div',
        ],
        uploadText: [
          ".PolarisStoryCreationPage .PolarisSharingProgressModal header h1",
          'body[data-page="StoryCreationPage"] .PolarisSharingProgressModal header h1',
        ],
        textColorPicker: [
          ".PolarisStoryCreationColorPicker.PolarisStoryCreationTextInput",
        ],
        drawColorPicker: [
          ".PolarisStoryCreationDrawColorPicker.PolarisStoryCreationDrawing",
        ],
        colorPickerSelectedCircle: [
          "button.PolarisStoryCreationColorPicker > ._aa87",
          "button.PolarisStoryCreationDrawColorPicker > ._aa82",
        ],
        addStickerButton: [
          ".PolarisStoryImageCreationContainer > button:nth-child(2)",
        ],
      },
      explorePage: {
        nav: [
          'html[data-page="exploreLandingPage"] nav.PolarisShellMobileHeader',
        ],
        header: "header.PolarisExploreMobileHeader",
        searchInputPlaceholder: [
          ".PolarisDynamicExplorePageContentWrapper input.PolarisIGCoreSearchInput::placeholder",
        ],
        searchContainer: [
          ".PolarisDynamicExplorePageContentWrapper > .PolarisIGCoreBox",
        ],
        search: [
          ".PolarisDynamicExplorePageContentWrapper > .PolarisIGCoreBox > .PolarisIGCoreBox:first-child",
        ],
        main: ["main > .PolarisDynamicExplorePageContentWrapper"],
        content: [
          ".mJ2Qv",
          ".PolarisDynamicExplorePageSharedContent",
          ".PolarisDynamicExplorePageContentWrapper",
        ],
        contentInner: [
          ".K6yM_",
          ".PolarisDynamicExplorePageSharedContent > *",
          ".PolarisDynamicExplorePageContentWrapper > *",
        ],
        post: [".pKKVh", ".PolarisDynamicExploreSectionalItem"],
        searchResults: [
          ".gJlPN",
          ".PolarisDynamicExplorePageSharedContent > .PolarisSearchResultsList",
          ".PolarisDynamicExplorePageContentWrapper > .PolarisSearchResultsList",
        ],
      },
      profilePage: {
        content: [
          ".v9tJq",
          "main.PolarisShellContent > .PolarisProfilePage",
          "main.PolarisRefreshedShellContent > .PolarisProfilePage",
          "main.PolarisRefreshedShellContent > .PolarisProfilePageContent",
          "main > .PolarisProfilePageContent",
        ],
        header: [
          ".zw3Ow",
          ".PolarisProfilePage header",
          ".PolarisProfilePageContent header",
        ],
        username: [
          ".KV-D4",
          "section.PolarisProfilePageHeader h2.PolarisIGCoreText",
        ],
        avatarWithStoryWrap: [
          ".RR-M-.h5uC0",
          ".PolarisProfilePageHeader div.PolarisUserAvatarWithStories",
        ],
        avatarStoryRing: [
          'html[data-page="profilePage"] .RR-M-.h5uC0 canvas',
          ".PolarisProfilePageHeader canvas.PolarisStoryRing",
        ],
        followButton: [
          ".nZSzR .y3zKF.sqdOP",
          ".XBGH5 ._4EzTm .soMvl:last-child",
          '[data-page="profilePage"] .PolarisFollowButton button',
        ],
        toggleSuggestionsButton: [
          ".PolarisFollowButton > .PolarisDropdownButton:last-child",
        ],
        writeButton: [
          ".JI_ht.vwCYk",
          'html[data-page="profilePage"] .i0EQd',
          ".PolarisProfilePageHeader ._ab9s",
          'div:has(+ div[style*="width: 34px"]):not(:has(button))',
          ".PolarisProfilePageHeader .IGDSBox > .WebPressable",
        ],
        subscribeButtonWrap: [".vBF20"],
        blueButtonsWrap: [".nZSzR .vwCYk"],
        buttonsRow: [".Y2E37 > div:first-child"],
        settingsMenuWrap: ["._7XkEo", ".PolarisNavigationalHeader + ._ac8b"],
        settingsMenu: [
          "._7XkEo > div",
          ".PolarisNavigationalHeader + ._ac8b > div",
        ],
        postRow: [
          ".v9tJq .weEfm",
          ".PolarisProfileMediaBrowser .PolarisIGVirtualGrid",
          ".PolarisProfileTabChannel .PolarisIGVirtualGrid",
          ".PolarisProfilePageContent .PolarisIGVirtualGrid",
        ],
        postContainer: [
          ".v9tJq ._bz0w",
          ".PolarisProfileMediaBrowser .PolarisPostsGridItem",
          ".PolarisProfilePageContent .PolarisPostsGridItem_next",
          ".PolarisProfileTabChannel .PolarisVirtualPostsGrid",
          ".PolarisProfilePageContent .PolarisClipsGrid_next",
          ".PolarisProfilePageContent .PolarisIGVirtualGrid > div",
        ],
        post: [
          '.v9tJq ._bz0w a[href^="/p/"]',
          '.PolarisProfileMediaBrowser .PolarisPostsGridItem > a[href^="/p/"]',
          '.PolarisPostsGridItem_next a[href^="/p/"]',
          ".PolarisProfilePageContent .PolarisIGVirtualGrid > div a",
        ],
        reelRow: [
          ".v9tJq .gmGWn",
          ".v9tJq .Nnq7C",
          ".PolarisProfilePage .PolarisIGVirtualList .PolarisIGVirtualGrid._abq4",
          ".PolarisProfilePageContent .PolarisIGVirtualList .PolarisIGVirtualGrid._abq4",
        ],
        reelContainer: [
          ".v9tJq .k1v61",
          ".v9tJq .b9_1r",
          ".PolarisProfilePage .PolarisClipsGrid",
          "div:has(> .PolarisClipsGridItem)",
          ".PolarisIGVirtualGrid > .PolarisClipsGrid",
        ],
        reelPreviewStats: [
          ".v9tJq .b9_1r .qn-0x",
          ".PolarisPostsGridItemOverlay._ac2d",
        ],
        reelIcon: ['svg:has(path[d*="m12.823 1 2.974"])'],
        pinnedIcon: ['svg:has(path[d*="m22.707 7.583-6.29-6.29a1"])'],
        moreButton: [
          ".VMs3J",
          "section.PolarisProfilePageHeader > .PolarisProfilePageHeader > div.PolarisProfilePageHeader",
        ],
        tab: [
          "._9VEo1",
          ".PolarisProfilePage .PolarisTabbedContent > .PressableText",
          ".PolarisProfilePageContent .PolarisTabbedContent > .PressableText",
        ],
        activeTab: [
          '.PolarisProfilePage .PolarisTabbedContent > .PressableText[aria-selected="true"]',
          '.PolarisProfilePageContent .PolarisTabbedContent > .PressableText[aria-selected="true"]',
        ],
        openMbsButton: [
          'div:has(> a[href*="https://business.facebook.com/business/loginpage/"])',
          'div:has(> a[href*="instagram.com/?u=https%3A%2F%2Fbusiness.facebook.com"])',
        ],
        profileButton: ["section.PolarisProfilePageHeader .WebPressable"],
        postVideoIcon: [".CzVzU svg"],
        postVideoOverlay: [".qn-0x"],
        followersFollowingsLink: ".Y8-fY a",
      },
      profilePageFeedTab: {
        postFooter: ["article.PolarisPost ._ae3w"],
        addCommentSection: [
          "article.PolarisPost ._ae3w section.PolarisPostCommentInput",
        ],
        addCommentTypeahead: ["article.PolarisPost ._ae3w .PolarisTypeahead"],
      },
      postPage: {
        postHeader: [
          ".PolarisPostPage ._aasi",
          ".PolarisPostPage article > div > div:first-child",
        ],
        postFooter: [
          ".PolarisPostPage ._aast",
          ".PolarisPostPage article > div > div:last-child > div",
        ],
      },
      commentsPage: {
        body: 'html[data-page="mobileAllCommentsPage"] .CometMainContentWrapper',
        footer: 'html[data-page="mobileAllCommentsPage"] nav.PolarisNavWrapper',
        scrollContainer: [".XQXOT", ".PolarisThreadedComments > ul"],
        showMoreButton: [
          "li > div > .wpO6b",
          ".PolarisThreadedComments > ul > li:last-child",
        ],
        lastListItem: ".PolarisThreadedComments > ul > *:last-child",
        comment: [".C4VMK", ".PolarisPostComment._a9zr"],
      },
      feedPage: {
        body: [".Wamc7", "section > ._aam1"],
        postsContainer: [".IGDSBox > .PolarisFeedPage"],
        nextPostsContainer: [
          ".PolarisFeedWrapper_next .IGDSBox:has(> .PolarisIGVirtualList)",
        ],
        followSuggestions: [".bq3Mi", ".PolarisSuggestedUserFeedUnit"],
        createPostTopButton: [
          '.PolarisGenericMobileHeader a:has(path[d^="M2 12v3.45c0"])',
        ],
        feed: [
          "section.PolarisFeedPage",
          ".PolarisFeedContainerLayout > div > .PolarisFeedWrapper_next",
        ],
        post: [
          "article._8Rm4L",
          "article.PolarisPost",
          "article.PolarisPostFunctional",
          "article.PolarisFeedCard_next",
        ],
        postContainer: [".PolarisFeedCard_next:has(> .PolarisDoubleTappable)"],
        postContainerChild: [
          ".PolarisFeedCard_next:has(> .PolarisDoubleTappable) > div",
        ],
        postContainerChild2: [
          ".PolarisFeedCard_next:has(> .PolarisDoubleTappable) > div > div",
        ],
        postLocationRow: [".M30cS", ".PolarisPostHeader._aaql"],
        postHashtagLocation: ".M30cS > div:not(:empty) + .JF9hh",
        postHeader: [".UE9AK", ".PolarisIGCoreBox > ._aaqw"],
        postHeaderBeforePseudo: [
          ".UE9AK::before",
          ".PolarisIGCoreBox > ._aaqw::before",
        ],
        postHeaderItem: ".UE9AK > *",
        postBody: [
          "article.PolarisPost ._aatk",
          "article.PolarisPost ._ab12",
          "article.PolarisFeedCard_next > div > div:nth-child(2)",
        ],
        postContentLimit: '[style*="min(470px, 100vw)"]',
        postFooterWrap1: [
          "article._8Rm4L ._97aPb + div",
          "._aatk + .PolarisIGCoreBox",
          "._ab12 + .PolarisIGCoreBox",
        ],
        postFooterWrap2: [
          "article._8Rm4L .cv3IO",
          "._aatk + .PolarisIGCoreBox > ._aast",
          "._ab12 + .PolarisIGCoreBox > div",
          "._aatk + .PolarisIGCoreBox > div",
        ],
        postFooter: [
          ".eo2As",
          "._aatk + .PolarisIGCoreBox > ._aast > ._aasx",
          "._ab12 + .PolarisIGCoreBox > div > div",
          "._aatk + .PolarisIGCoreBox > div > div",
        ],
        postActions: [".Slqrh", ".PolarisPostFeedbackControls._aamu"],
        postAfterActions: [".PolarisPostFeedbackControls._aamu ~ *"],
        postThreeDotsButtonWrap: [".PolarisPostOptionsButtonPicker"],
        postThreeDotsButton: [
          ".MEAGs",
          ".PolarisPostOptionsButtonPicker > button",
        ],
        postAction: [".Slqrh > *", ".PolarisPostFeedbackControls._aamu > *"],
        postActionIconDefault: [
          ".rrUvL",
          ".PolarisPostFeedbackControls button._abl- > div:last-child",
        ],
        postActionIconHovered: [
          ".B58H7",
          ".PolarisPostFeedbackControls button._abl- .PolarisIGCoreSVGIconButton",
        ],
        postUnderActionsContent: [
          ".eo2As > *:not(.Slqrh)",
          "._aasx > *:not(.PolarisPostFeedbackControls)",
        ],
        postPhoto: [
          ".KL4Bh img",
          "article.PolarisPost .PolarisPhoto img",
          "article.PolarisPostFunctional .PolarisPhoto img",
          "article.PolarisFeedCard_next .PolarisPhoto img",
        ],
        postVideo: [
          "article._8Rm4L video",
          "article.PolarisPost .PolarisVideo video",
          "article.PolarisPostFunctional .PolarisVideo video",
          "article.PolarisFeedCard_next video",
        ],
        postMediaContainer: ["._97aPb", ".PolarisPhoto._aagu"],
        postPhotoContainer: [
          "._9AhH0",
          ".PolarisPost .PolarisPost.PolarisPhoto",
          ".PolarisPost .PolarisPost.PolarisPhotoWithIndicator",
          ".PolarisPostFunctional .PolarisPostFunctional.PolarisPhoto",
          ".PolarisPostFunctional .PolarisPostFunctional.PolarisPhotoWithIndicator",
          ".PolarisFeedCard_next .PolarisPhoto._aagu",
        ],
        postVideoContainer: [
          ".GRtmf",
          ".PolarisPost .PolarisMedia.PolarisVideo",
          ".PolarisPostFunctional .PolarisMedia.PolarisVideo",
          '[data-media-actions-post-type="igtv"] > .PolarisIGCoreBox',
          "[data-visualcompletion] > .PolarisPostVideoPlayerWrapper",
        ],
        postCarouselContainer: [".rQDP3", ".PolarisSidecar._aamn"],
        carouselDots: [".ijCUd", ".PolarisStepIndicator.PolarisSidecar"],
        carouselDot: [".Yi5aA", ".PolarisStepIndicator ._acnb"],
      },
      postCreation: {
        body: [
          '[data-page="CreationDetailsPage"] .PolarisCreationShell',
          '[data-page="CreationDetailsPage"] .PolarisBaseShell',
        ],
        nextButton: [
          '[data-page="CreationStylePage"] .UP43G',
          '[data-page="CreationStylePage"] .PolarisNavigationalHeader ._ab5p',
        ],
        closeButton: [
          ".PolarisCreationShell .PolarisGenericMobileHeader._ab19 button.PolarisNavigationalHeader",
        ],
        captionContainer: [".IpSxo", ".PolarisCreationDetailsPage._abru"],
        captionTextarea: [
          ".IpSxo textarea",
          "textarea.PolarisCreationCaptionInput",
          ".PolarisCreationCaptionInput textarea",
        ],
        userAvatar: [
          ".IpSxo .GsWMc",
          ".IpSxo ._2dbep",
          ".PolarisUserAvatar.PolarisCreationDetailsPage",
        ],
        imageContainer: [".N7f6u", ".PolarisCreationCroppingUnit._abqh"],
        videoContainer: [".YMoW3", ".PolarisCreationStyleVideoUnit._abe_"],
        video: [".YMoW3 video", ".PolarisCreationStyleVideoUnit._abe_ video"],
        videoPoster: [".YMoW3 img", ".PolarisCreationStyleVideoUnit._abe_ img"],
        videoPlayButton: [
          '.PolarisCreationStyleVideoUnit._abe_ span._abf6[role="button"]',
        ],
        filtersReel: [
          ".PDNx9",
          ".PolarisIGVirtualList.PolarisCreationFilteringUnit",
        ],
        submitPostButton: [
          ".hfWwk .UP43G",
          '[data-page="CreationDetailsPage"] ._ab5p',
        ],
        rowButton: ["._2OfRz", ".PolarisCreationDetailsPage._abrf"],
        previewContainer: [
          'html[data-page="CreationDetailsPage"] .g5kp1',
          ".PolarisCreationDetailsPage ._aau7",
        ],
        previewPostTypeIcon: [
          ".cRc_w",
          ".PolarisCreationDetailsPage .PolarisMediaPreviewThumbnail svg",
        ],
        previewPostImage: [".IpSxo .FuaTR", "img.PolarisMediaPreviewThumbnail"],
        expandImageButton: [".pHnkA", ".PolarisCroppableImage._abfb"],
        mentionsOverlay: [".cDEf6", ".PolarisCreationCaptionInput._aby4"],
        tagPeopleButton: [".DG8Ws", "button.PolarisCreationTagVideo._a9z-"],
      },
      loginBar: {
        root: ".Xwp_P .KGiwt",
        content: ".Xwp_P .KGiwt .ryLs_",
        openAppButton: [
          ".Xwp_P .KGiwt button",
          ".PolarisMobileTopNavLoggedOut button._acap",
        ],
      },
      activityPage: {
        headerBottomLine: [
          'html[data-page="ActivityFeedPage"] .PolarisGenericMobileHeader::before',
        ],
        topListContainer: [
          'html[data-page="ActivityFeedPage"] .PolarisShellContent > .PolarisIGVirtualList > div',
        ],
      },
      "general_use-application-bar": [".Z_Gl2", ".MFkQJ", "._acc8"],
      "post-item": [
        "._97aPb",
        ".PolarisPost div:first-child:last-child:not([class]) > .PolarisPhoto",
        ".PolarisPost div:first-child:last-child:not([class]) > .PolarisPhotoWithIndicator > .PolarisPhoto",
        ".PolarisPost .PolarisMedia.PolarisVideo",
        ".PolarisPost .PolarisSidecar li.PolarisVirtualHSnapScrollComponents",
        ".PolarisPostFunctional .PolarisPostFunctional.PolarisPhoto",
        ".PolarisPostFunctional .PolarisPostFunctional.PolarisPhotoWithIndicator",
        ".PolarisFeedCard_next .PolarisPhoto._aagu",
        ".PolarisPostFunctional .PolarisMedia.PolarisVideo",
        "[data-visualcompletion] > .PolarisPostVideoPlayerWrapper",
        ".PolarisPostFunctional .PolarisSidecar li.PolarisVirtualHSnapScrollComponents",
        ".PolarisFeedCard_next .PolarisSidecar li.PolarisVirtualHSnapScrollComponents",
        ".PolarisPostVideoPlayerWrapper[style]",
        ".PolarisMediaItem_next",
        ".PolarisVideoLegacy",
        "article .PolarisMediaItem",
      ],
      "post-video": [
        ".GRtmf video",
        ".PolarisPost ._aatk video",
        ".PolarisPostFunctional ._ab12 video",
        "video.VideoPlayerImplementationReactVideoElement",
      ],
      "post-video-poster": [
        ".GRtmf video + img",
        ".PolarisPost ._aatk video + img",
        ".PolarisPostFunctional ._ab12 video + img",
      ],
      postVideoOverlayContainer: [
        ".VideoPlayerComponentContainer:has(> .VideoPlayerInteractionOverlay)",
      ],
      postVideoOverlay: [".VideoPlayerInteractionOverlay"],
      postVideoOverlaySoundButton: [
        ".VideoPlayerComponentContainer:has(> .VideoPlayerInteractionOverlay) button[aria-label]",
      ],
      "post-tagged-people-button": [
        ".G_hoz",
        "._a3gq ._a9-6",
        ".PolarisVideo ._a9-6",
        ".PolarisUserTagIndicator",
      ],
      "story-container": [
        ".qbCDp",
        ".PolarisMobileOwnerStories._aa2i",
        "section > .PolarisMobileStories",
        ".CometPushView > .PolarisStoriesV3Page",
      ],
      "story-loading-preview": ".qbCDp canvas",
      "story-video-play-button": [
        ".qbCDp .videoSpritePlayButton",
        ".PolarisMobileStoryEventZone._9zwu",
      ],
      "stories-viewer": [".UIujo", ".PolarisMobileStoriesPage"],
      "highlights-container": [
        ".YlNGR",
        ".PolarisProfileStoryHighlightsTray .PolarisHSnapScroll._aap0",
      ],
      "comments-list-on-comments-page": ".XQXOT",
      "profile-page-stat-container": ".LH36I",
      "profile-page-stat-item": "._81NM2",
      "profile-page-grid-stretch-element": "._2z6nI article:first-child:empty",
      "profile-send-message-button": ".fAR91",
      "header-top-level-button": [
        ".HOQT4",
        ".PolarisGenericMobileHeader._ab18._ab1b",
      ],
      "your-story-button-text": [".XdXBI", ".PolarisOwnStoryTrayItem._aac2"],
      "comment-form": [".RxpZH", ".PolarisPostCommentInput._aaof"],
      "comment-form-avatar": [
        ".RxpZH ._2dbep",
        ".PolarisPostCommentInput > img.PolarisUserAvatar",
      ],
      "comment-form-form": [".RxpZH form", "form.PolarisPostCommentInput"],
      "comment-form-textarea": [
        ".RxpZH textarea",
        "textarea.PolarisPostCommentInput",
      ],
      "comment-form-submit-button": [
        '.RxpZH button[type="submit"]',
        "form.PolarisPostCommentInput button",
      ],
      postCreationPage: ['html[data-page="CreationStylePage"]'],
      storyCreationPage: ['html[data-page="StoryCreationPage"]'],
      "new-post_tag-people-image-container": ".qJfNm",
    },
    ig: { STORY_REELS_ITEM_SEEN: "STORY_REELS_ITEM_SEEN" },
  };
  const { $ffmpeg: jB, $utils: WB } = app;
  jB.controller = {
    DEBUG_LOGS: !1,
    addFile: async function (e, t) {
      const r = await this.load(),
        n = await r.fetchFile(t);
      r.FS("writeFile", e, n);
    },
    readFile: async function (e, t) {
      const r = (await this.load()).FS("readFile", e);
      return new File([r.buffer], e, { type: t });
    },
    removeFile: async function (e) {
      (await this.load()).FS("unlink", e);
    },
    run: async function (e) {
      const t = await this.load(),
        r = e.trim().replace(/\s+/g, " ").split(" ");
      await t.run(...r);
    },
    getBitrate: async function (e) {
      (this._bitrate = null),
        (this._watchBitrate = !0),
        await this.run(`-t 1 -i ${e} -f null -y /dev/null`);
      const t = this._bitrate || null;
      return (this._bitrate = null), (this._watchBitrate = !1), t;
    },
    load: async function () {
      const e = this.load;
      return (
        e.promise ||
          (e.promise = (async () => {
            const e = document.createElement("script");
            (e.src = "/js/ffmpeg/ffmpeg.min.js"),
              document.head.insertAdjacentElement("beforeend", e),
              await new Promise((t) => {
                e.addEventListener("load", t);
              });
            const t = await WB.waitFor(() => window.FFmpeg);
            if (!t) return void console.error("failed to load ffmpeg");
            delete window.FFmpeg;
            const r = /bitrate: (\d+\.\d+|\d+) kb\/s/,
              n = t.createFFmpeg({
                log: this.DEBUG_LOGS,
                logger: ({ message: e }) => {
                  var t;
                  if (!this._watchBitrate) return;
                  const n =
                    null === (t = e.match(r)) || void 0 === t ? void 0 : t[1];
                  n && (this._bitrate = Number(n));
                },
              });
            return await n.load(), (n.fetchFile = t.fetchFile.bind(t)), n;
          })()),
        e.promise
      );
    },
  };
  const {
      $featureEncourage: VB,
      $store: qB,
      $later: ZB,
      $iframeBus: YB,
      $analytics: QB,
      $ui: KB,
    } = app,
    XB = "feature-encourage-ig-creation-card-mediator.story",
    JB = "feature-encourage-ig-creation-card-mediator.post",
    eO = "feature-encourage-ig-creation-card-mediator.reels",
    tO = "feature-encourage-ig-creation-card-mediator.carousel";
  KB.SvgIcon.registerSvgIcons([
    `<symbol id="${XB}" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12.474 22.779a11.28 11.28 0 01-5.294-1.32.777.777 0 11.732-1.37 9.741 9.741 0 006.775.884.777.777 0 01.353 1.513 11.326 11.326 0 01-2.566.293zm-7.205-2.871a.773.773 0 01-.534-.213 11.218 11.218 0 01-3.2-5.509.777.777 0 011.51-.366 9.667 9.667 0 002.757 4.748.777.777 0 01-.534 1.34zm-3.221-8.651h-.077a.776.776 0 01-.7-.849 11.174 11.174 0 01.995-3.632.777.777 0 011.408.656 9.618 9.618 0 00-.854 3.122.777.777 0 01-.772.703zm3.258-6.58a.777.777 0 01-.6-1.269q.1-.127.211-.25a.777.777 0 111.171 1.02c-.062.071-.122.143-.182.215a.776.776 0 01-.6.284zm12.543 16.62a.777.777 0 01-.4-1.443 9.7 9.7 0 00-4.975-18.03.777.777 0 110-1.554 11.255 11.255 0 015.773 20.917.77.77 0 01-.398.11z" fill="currentColor"/><path d="M17.723 10.788h-4.45v-4.45H11.72v4.45H7.27v1.553h4.45v4.45h1.553v-4.45h4.45z" fill="currentColor"/></symbol>`,
    `<symbol id="${JB}" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M7.164 22.654A5.17 5.17 0 012 17.49V7.164A5.17 5.17 0 017.164 2H17.49a5.17 5.17 0 015.164 5.164V17.49a5.17 5.17 0 01-5.164 5.164zm0-1.757H17.49a3.794 3.794 0 003.41-3.407V14.8l-3.68-3.661-4.394 5.934L8 14.866 3.766 17.7a3.832 3.832 0 003.398 3.2zM3.757 7.164v8.4L7.8 12.785l4.5 2.081 4.681-6.525 3.919 3.922v-5.1a3.794 3.794 0 00-3.41-3.406H7.164a3.794 3.794 0 00-3.407 3.407zm3.943.874a1.709 1.709 0 111.7 1.708 1.709 1.709 0 01-1.7-1.708z" fill="currentColor"/></symbol>`,
    `<symbol id="${eO}" viewBox="0 0 24 24"><path d="M15.548 14.007l-.006-.005-.006-.004-4.696-2.73s0 0 0 0a.736.736 0 00-.381-.113.73.73 0 00-.373.108c-.262.11-.407.371-.407.662v5.464c0 .262.155.511.398.658h0l.009.004a.899.899 0 00.352.098.88.88 0 00.314-.069l.063-.022.012-.004.012-.006 4.697-2.732h0l.001-.001a.743.743 0 00.357-.658c0-.259-.152-.505-.346-.65zM20.764 3.85h0l-.003-.004c-.534-.513-1.125-.945-1.943-1.247-.816-.301-1.85-.47-3.264-.47h-6.5c-1.394 0-2.417.169-3.233.476-.818.307-1.42.75-1.974 1.283h0l-.003.004C3.33 4.428 2.9 5.02 2.599 5.834c-.3.812-.469 1.837-.469 3.234v6.514c0 1.396.169 2.432.475 3.255.306.824.748 1.428 1.282 1.964l.002.002c.534.513 1.126.945 1.943 1.246.816.302 1.85.47 3.264.47h6.5c1.394 0 2.428-.168 3.249-.475.823-.307 1.425-.75 1.96-1.285l.001-.002c.513-.535.944-1.128 1.245-1.947.3-.817.469-1.853.469-3.27V9.068c0-1.397-.169-2.422-.475-3.24-.306-.819-.748-1.422-1.28-1.977zm-5.168-.2c1.31 0 2.174.166 2.788.41.612.244.985.567 1.314.896.466.468.897 1.045 1.149 2.216h-3.665L15.19 3.65h.406zm-6.948 0h4.734l1.991 3.522H10.64L8.648 3.65zM4.952 4.957c.435-.436.982-.87 2.065-1.12l1.897 3.336h-5.11c.25-1.17.682-1.748 1.148-2.216zm16.05 10.667c0 1.313-.167 2.178-.41 2.794-.243.613-.565.987-.894 1.316-.328.33-.712.652-1.33.896-.62.244-1.482.411-2.772.411H9.054c-1.31 0-2.174-.167-2.788-.411-.612-.243-.985-.566-1.314-.896a3.699 3.699 0 01-.893-1.332c-.244-.62-.41-1.486-.41-2.778v-6.93h17.353v6.93z" fill="currentColor" stroke="currentColor" stroke-width=".26"/></symbol>`,
    `<symbol id="${tO}" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M10.03 22a4.283 4.283 0 01-2.605-.876 4.363 4.363 0 01-1.539-2.212h2a2.483 2.483 0 002.14 1.235h8.647a2.474 2.474 0 002.471-2.471V9.03a2.483 2.483 0 00-1.235-2.14v-2a4.365 4.365 0 012.212 1.539A4.283 4.283 0 0123 9.03v8.647A4.329 4.329 0 0118.677 22zm-3.706-3.706A4.328 4.328 0 012 13.97V5.324A4.328 4.328 0 016.324 1h8.646a4.328 4.328 0 014.324 4.324v8.646a4.328 4.328 0 01-4.324 4.324zM3.853 5.324v8.646a2.474 2.474 0 002.471 2.471h8.646a2.474 2.474 0 002.471-2.471V5.324a2.474 2.474 0 00-2.471-2.471H6.324a2.474 2.474 0 00-2.471 2.471z" fill="currentColor"/></symbol>`,
  ]),
    (VB.IgCreationCardMediator = class extends KB.Component {
      constructor(...e) {
        var t;
        return (
          (t = super(...e)),
          (this._onStoryClick = () => {
            QB.controller.sendEvent("user", "feature-encourage:story-click"),
              YB.send("feature-encourage.start-story-creation");
          }),
          (this._onPhotoVideoClick = () => {
            QB.controller.sendEvent(
              "user",
              "feature-encourage:photo-video-click"
            ),
              YB.send("feature-encourage.start-post-creation");
          }),
          (this._onReelsClick = () => {
            QB.controller.sendEvent("user", "feature-encourage:reels-click"),
              YB.send("feature-encourage.start-reels-creation");
          }),
          (this._onCarouselPostClick = () => {
            QB.controller.sendEvent(
              "user",
              "feature-encourage:carousel-post-click"
            ),
              YB.send("feature-encourage.hide-creation-card"),
              ZB.controller.startFileSelection(async (e) => {
                this._openPostLaterPanel();
                const t = qB.state.auth.userId;
                await ZB.controller.createCarouselDraft(t, e);
              });
          }),
          (this._onScheduleClick = () => {
            QB.controller.sendEvent(
              "user",
              "feature-encourage:scheduled-post-click"
            ),
              YB.send("feature-encourage.hide-creation-card"),
              this._openPostLaterPanel();
          }),
          t
        );
      }
      render() {
        return Glamor.createElement(KB.IgCreationCard, {
          buttons: [
            { icon: XB, label: "STORY", onClick: this._onStoryClick },
            {
              icon: JB,
              label: "PHOTO / VIDEO",
              onClick: this._onPhotoVideoClick,
            },
            { icon: eO, label: "REEL", onClick: this._onReelsClick },
            { icon: tO, label: "CAROUSEL", onClick: this._onCarouselPostClick },
            {
              icon: "schedule",
              label: "SCHEDULE",
              onClick: this._onScheduleClick,
            },
          ],
        });
      }
      _openPostLaterPanel() {
        YB.send("feature-encourage.hide-creation-card"),
          qB.transaction((e) => {
            (e.sidebar.isOpen = !0),
              (e.sidebar.selectedTabId = "tab-later"),
              (e.later.selectedUserId = e.auth.userId),
              (e.later.selectedPostId = null),
              (e.later.selectedPillId = null),
              (e.later.showBodyPanel = !1);
          });
      }
    });
  const { $featureEncourage: rO, $store: nO, $iframeBus: oO } = app;
  rO.controller = {
    init: function () {
      (this._onClick = this._onClick.bind(this)),
        (this._onKeyDown = this._onKeyDown.bind(this)),
        oO.on(
          "feature-encourage.toggle-creation-card",
          this._toggleCreationCard.bind(this)
        );
    },
    _toggleCreationCard: function (e) {
      nO.transaction((t) => {
        t.igView.creationCardShown = e;
      }),
        e
          ? (document.addEventListener("click", this._onClick),
            document.addEventListener("keydown", this._onKeyDown))
          : (document.removeEventListener("click", this._onClick),
            document.removeEventListener("keydown", this._onKeyDown));
    },
    _onClick: function (e) {
      oO.send("feature-encourage.hide-creation-card");
    },
    _onKeyDown: function (e) {
      "Escape" === e.key && oO.send("feature-encourage.hide-creation-card");
    },
  };
  const {
    $igView: aO,
    $store: iO,
    $utils: sO,
    $iframeBus: lO,
    $featureEncourage: cO,
    $env: uO,
    $ui: dO,
    $fusion: hO,
  } = app;
  class pO extends dO.Component {
    constructor(e) {
      super(e),
        (this._initIframe = () => {
          this.setState({ iframeUrl: aO.controller.getInitialUrl() });
        }),
        (this._onIframeReady = () => {
          this.setState({ isLoadingShown: !1 });
        }),
        (this._onIframePathChange = (e) => {
          this.setState({
            isDarkBackground:
              e.startsWith("/stories/") || e.startsWith("/create/story"),
          });
        }),
        (this.state = {
          iframeUrl: null,
          isDarkBackground: !1,
          isLoadingShown: !0,
        });
    }
    componentDidMount() {
      lO.on("ig.ready", this._onIframeReady),
        lO.on("ig.path-change", this._onIframePathChange),
        setTimeout(this._initIframe, 70);
    }
    componentWillUnmount() {
      lO.off("ig.ready", this._onIframeReady),
        lO.off("ig.path-change", this._onIframePathChange);
    }
    render() {
      let e = this.state.isDarkBackground;
      return (
        "night" === this.state.theme && (e = !e),
        Glamor.createElement(dO.IgView, {
          iframeAttrs: {
            src: !1 !== uO.features.iframes ? this.state.iframeUrl : null,
            name: sO.iframe.createName("inssist-ig", {
              theme: this.state.theme,
              fusionConfig: hO.controller.getConfig(),
              isElectron: !!globalThis.electron,
            }),
            allow: "geolocation; autoplay",
          },
          isFrameless: this.props.isFrameless,
          isDarkBackground: e,
          isLoadingShown: this.state.isLoadingShown,
          isSplashShown: this.props.isSplashShown,
          isCreationCardShown: this.props.creationCardShown,
          allowPointerEvents: this.props.allowPointerEvents,
          creationCard: Glamor.createElement(cO.IgCreationCardMediator, null),
        })
      );
    }
  }
  aO.Mediator = iO.connect((e) => ({
    creationCardShown: e.igView.creationCardShown,
    hasScheduleAccess: iO.proxy.hasPro({ feature: "schedule" }),
    allowPointerEvents: e.experiments.enabled,
  }))(dO.theme.ThemeAware(pO));
  const { $igView: mO, $bus: gO, $iframeBus: fO } = app;
  mO.controller = {
    init: function () {
      mO.frameController.init(), gO.on("igView.refresh", () => bO());
    },
    getInitialUrl: function () {
      let e;
      e = location.hash
        ? `https://www.${location.hash.replace("#", "")}`
        : "instagram-iframe-path" in localStorage
        ? `https://www.instagram.com${localStorage.getItem(
            "instagram-iframe-path"
          )}`
        : "https://www.instagram.com";
      (function (e) {
        const t = e.split("/");
        return vO.some((e) => {
          const r = e.split("/");
          if (r.length !== t.length) return !1;
          for (let e = 0; e < t.length; e += 1) {
            const n = t[e],
              o = r[e];
            if (o !== n && (!o.startsWith("<") || !o.endsWith(">"))) return !1;
          }
          return !0;
        });
      })(
        (function (e) {
          let t = e.split("?")[0].split("/").slice(3).join("/");
          t.startsWith("/") || (t = `/${t}`);
          t.endsWith("/") || (t = `${t}/`);
          return t;
        })(e)
      ) || (e = "https://www.instagram.com");
      return e;
    },
    refreshIframe: bO,
  };
  const vO = [
    "/",
    "/explore/",
    "/explore/people/suggested/",
    "/accounts/activity/",
    "/accounts/edit/",
    "/<username>/",
    "/<username>/followers/",
    "/<username>/following/",
    "/<username>/feed/",
    "/<username>/channel/",
    "/<username>/saved/",
    "/<username>/tagged/",
    "/<username>/reels/",
    "/p/<postId>/",
    "/reel/<postId>/",
    "/stories/highlights/<storyId>/",
  ];
  async function bO() {
    const e = document.querySelector('iframe[name^="inssist-ig"]'),
      t = setTimeout(() => {
        const t = e.src;
        e.src = t;
      }, 1e3),
      r = await fO.send("ig.get-url");
    clearTimeout(t), (e.src = `https://instagram.com${r}`);
  }
  const {
    $igView: yO,
    $store: wO,
    $iframeBus: CO,
    $analytics: kO,
    $sentry: SO,
  } = app;
  function EO(e) {
    SO.controller.sendError(`ig: ${e}`, "error", null, { actor: "instagram" });
  }
  function _O(e) {
    e.startsWith("/stories/") ||
      e.startsWith("/direct/") ||
      localStorage.setItem("instagram-iframe-path", e);
  }
  function xO({ url: e, currentTime: t, volume: r, muted: n, paused: o }) {
    const a = document.createElement("video"),
      i = a.requestFullscreen || a.webkitRequestFullScreen;
    document.body.appendChild(a),
      a.setAttribute("src", e),
      i.call(a),
      (a.disablePictureInPicture = !0),
      (a.currentTime = t),
      (a.volume = r),
      (a.muted = n),
      o || a.play(),
      document.addEventListener("fullscreenchange", function t() {
        document.fullscreenElement ||
          (CO.send("ig.media-fullscreen-exit", {
            url: e,
            currentTime: a.currentTime,
            volume: a.volume,
            muted: a.muted,
          }),
          a.remove(),
          document.removeEventListener("fullscreenchange", t));
      });
  }
  function PO({ url: e }) {
    chrome.tabs.create({ url: e, active: !0 });
  }
  function TO() {
    wO.transaction((e) => {
      (e.sidebar.isOpen = !0), (e.sidebar.selectedTabId = "tab-dm");
    });
  }
  function IO() {
    return true;
  }
  async function GO(e) {
    wO.transaction((t) => {
      "fullscreenWidth" in e && (t.igView.fullscreenWidth = e.fullscreenWidth),
        "withBorder" in e && (t.igView.withBorder = e.withBorder);
    }),
      await new Promise((e) => {
        requestAnimationFrame(e);
      });
  }
  function DO() {
    return wO.state.igView.fullscreen;
  }
  yO.frameController = {
    init: function () {
      window.addEventListener("message", (e) => {
        "ig-patch-corrupted" === e.data.name &&
          kO.controller.sendEvent("system", "ig-patch-corrupted");
      }),
        (function () {
          let e = !1;
          window.addEventListener("hashchange", () => {
            if (e) return;
            const t = location.hash;
            if (!t.startsWith("#instagram.com/")) return;
            const r = t.split("instagram.com")[1];
            CO.send("ig.ajax-go", r);
          }),
            CO.on("ig.url-change", (t) => {
              e = !0;
              const r = `instagram.com${t}`;
              history.replaceState(null, null, `inssist.html#${r}`), (e = !1);
            });
        })(),
        CO.on("ig.error", EO),
        CO.on("ig.path-change", _O),
        CO.on("ig.media-open", PO),
        CO.on("ig.media-fullscreen-enter", xO),
        CO.on("ig.open-sidebar-dm", TO),
        CO.on("ig.check-has-pro", IO),
        CO.on("ig.update-ig-view", GO),
        CO.on("ig.is-fullscreen", DO);
    },
  };
  const {
      $tosSummary: AO,
      $store: MO,
      $analytics: FO,
      $ui: RO,
      $constants: LO,
    } = app,
    BO = (e) => ({
      ...RO.text.nowrap,
      opacity: 0,
      pointerEvents: "none",
      ...(e.showTosSummary && { opacity: 1, pointerEvents: "inherit" }),
    }),
    OO = (e, t) => ({
      ...RO.absolute(". 0 31 ."),
      ...RO.transition.fast,
      width: 406,
      opacity: 0,
      transform: "translateY(20px)",
      pointerEvents: "none",
      ...(e.showTosSummary &&
        t.panelShown && {
          opacity: 1,
          transform: "none",
          pointerEvents: "inherit",
        }),
    });
  AO.Mediator = MO.connect((e) => ({
    showTosSummary: -1 === e.acknowledged.tosSummary,
  }))(
    class extends RO.Component {
      constructor(e) {
        super(e),
          (this._onButtonClick = () => {
            this.setState({ panelShown: !this.state.panelShown });
          }),
          (this._onClose = () => {
            FO.controller.sendEvent("user", "tos-summary:close-click"),
              MO.acknowledge.dispatch("tosSummary");
          }),
          (this._onOkClick = () => {
            FO.controller.sendEvent("user", "tos-summary:ok-click"),
              MO.acknowledge.dispatch("tosSummary");
          }),
          (this._onFullTermsClick = () => {
            FO.controller.sendEvent("user", "tos-summary:terms-click"),
              chrome.tabs.create({ url: LO.common.termsUrl });
          }),
          (this._onPrivacyPolicyClick = () => {
            FO.controller.sendEvent("user", "tos-summary:privacy-click"),
              chrome.tabs.create({ url: LO.common.policyUrl });
          }),
          (this._onFaqClick = () => {
            FO.controller.sendEvent("user", "tos-summary:faq-click"),
              chrome.tabs.create({ url: LO.common.faqUrl });
          }),
          (this.state = { panelShown: !1 });
      }
      componentDidUpdate(e) {
        !e.showTosSummary &&
          this.props.showTosSummary &&
          FO.controller.sendEvent("user", "tos-summary:shown");
      }
      render() {
        return Glamor.createElement(
          React.Fragment,
          null,
          Glamor.createElement(
            "div",
            { css: BO(this.props) },
            Glamor.createElement(RO.LinkButton, {
              label: "TOS & PRIVACY",
              color: RO.color.textPassive,
              small: !0,
              onClick: this._onButtonClick,
            })
          ),
          Glamor.createElement(
            "div",
            { css: OO(this.props, this.state) },
            Glamor.createElement(RO.TosSummary, {
              onClose: this._onClose,
              onOkClick: this._onOkClick,
              onFullTermsClick: this._onFullTermsClick,
              onPrivacyPolicyClick: this._onPrivacyPolicyClick,
              onFaqClick: this._onFaqClick,
            })
          )
        );
      }
    }
  );
  const { $ghostStoryView: $O, $store: NO, $billing: UO, $ui: HO } = app,
    zO = { root: {}, rootWider: { left: -50, right: -50 } };
  $O.UpsellOverlayMediator = NO.connect((e) => ({
    show: e.ghostStoryView.showUpsellOverlay,
    widescreen: e.igView.fullscreen,
  }))(
    class extends HO.Component {
      constructor(...e) {
        var t;
        return (
          (t = super(...e)),
          (this.onOverlayClick = () => {
            NO.transaction((e) => {
              (e.ghostStoryView.enabled = !1),
                (e.ghostStoryView.showUpsellOverlay = !1);
            });
          }),
          t
        );
      }
      render() {
        return Glamor.createElement(UO.UpsellOverlayMediator, {
          style: [zO.root, !this.props.widescreen && zO.rootWider],
          feature: "ghost-story-view",
          show: this.props.show,
          noArt: !0,
          onOverlayClick: this.onOverlayClick,
        });
      }
    }
  );
  const {
    $ghostStoryView: jO,
    $store: WO,
    $utils: VO,
    $iframeBus: qO,
    $analytics: ZO,
  } = app;
  jO.controller = {
    init: function () {
      qO.on("ghost-story-view.has-pro", this._hasPro.bind(this)),
        qO.on("ghost-story-view.is-enabled", this._isEnabled.bind(this)),
        qO.on(
          "ghost-story-view.show-upsell-overlay",
          this._showUpsellOverlay.bind(this)
        ),
        this._handleToggling(),
        this._manageTrial();
    },
    _hasPro: function () {
      return WO.proxy.hasPro({ feature: "ghostStoryView" });
    },
    _isEnabled: function () {
      return WO.state.ghostStoryView.enabled;
    },
    _showUpsellOverlay: function () {
      WO.transaction((e) => {
        e.ghostStoryView.showUpsellOverlay = !0;
      });
    },
    _handleToggling: function () {
      WO.model.observe(
        (e) => e.ghostStoryView.enabled,
        (e) => {
          qO.send("ghost-story-view.toggled", e),
            e ||
              WO.transaction((e) => {
                e.ghostStoryView.showUpsellOverlay = !1;
              });
        }
      );
    },
    _manageTrial: function () {
      qO.on("ghost-story-view.used", () => {
        const e = Date.now(),
          t = WO.state.ghostStoryView.lastUsedOn || 0;
        e - t < 24 * VO.time.HOUR ||
          (WO.transaction((t) => {
            t.ghostStoryView.lastUsedOn = e;
          }),
          true
            ? ZO.controller.sendEvent("user", "pro-paid-usage.ghost-story-view")
            : WO.transaction((e) => {
                e.billing.trial.ghostStoryView += 1;
              }));
      });
    },
  };
  const { $files: YO, $utils: QO, $ui: KO } = app;
  YO.Renderer = class extends KO.Component {
    constructor(e) {
      super(e), (this.state = { url: null, status: "loading" });
    }
    get statePromises() {
      return YO.Renderer.statePromises || (YO.Renderer.statePromises = {});
    }
    async componentDidMount() {
      await this.update(this.props.fileId);
    }
    componentWillUnmount() {
      this.unmounted = !0;
    }
    async componentDidUpdate(e) {
      const t = e,
        r = this.props;
      t.fileId !== r.fileId &&
        (this.setState({ url: null, status: "loading" }),
        await this.update(r.fileId));
    }
    async update(e) {
      let t;
      if (this.statePromises[e]) t = await this.statePromises[e];
      else {
        this.statePromises[e] = QO.createResolvablePromise();
        const r = await YO.controller.read(e);
        (t = {
          url: r ? URL.createObjectURL(r) : null,
          status: r ? "ok" : "failed",
        }),
          this.statePromises[e].resolve(t);
      }
      this.unmounted || this.setState({ ...t });
    }
    render() {
      return this.props.children(this.state.url, this.state.status);
    }
  };
  const { $files: XO, $idb: JO, $shortid: e$ } = app;
  XO.controller = {
    save: async function (e, t = "") {
      const r = e$.generate(),
        n = t ? `${t}.${r}` : r;
      return await JO.set(`files.${n}`, e), n;
    },
    read: async function (e) {
      return (await JO.get(`files.${e}`)) || null;
    },
    remove: async function (e) {
      await JO.remove(`files.${e}`);
    },
    getFileIds: async function (e = "") {
      const t = await JO.keys(),
        r = e ? `files.${e}.` : "files.";
      return t
        .filter((e) => e.startsWith(r))
        .map((e) => e.replace("files.", ""));
    },
  };
  const { $tagAssist: t$, $utils: r$ } = app;
  t$.utils = {
    extractTags: function (e, t = !1) {
      const r = r$.getHashtagRegex({ hashOptional: !t });
      return (e.match(r) || [])
        .map((e) => (e.startsWith("#") ? e.substr(1) : e))
        .map((e) => e.toLowerCase())
        .filter(r$.unique);
    },
    compressTag: function (e) {
      return [
        e.name,
        e.lastScanOn,
        e.isBanned ? 1 : 0,
        e.isFlagged ? 1 : 0,
        e.avgLikes,
        e.avgComments,
        e.avgPosts,
        (e.relevantTags || []).map((t) => t.split(e.name).join("~")).join(","),
      ].join(":");
    },
    decompressTag: function (e) {
      const t = e.split(":");
      if (1 === t.length) return { name: t[0] };
      const [r, n, o, a, i, s, l, c] = t;
      return {
        name: r,
        lastScanOn: Number(n),
        isBanned: 1 === Number(o),
        isFlagged: 1 === Number(a),
        avgLikes: Number(i),
        avgComments: Number(s),
        avgPosts: Number(l),
        relevantTags: (c || "")
          .split(",")
          .filter(Boolean)
          .filter(r$.unique)
          .map((e) => e.split("~").join(r)),
      };
    },
    sortByFrequency: function (e) {
      const t = [];
      {
        const r = {},
          n = e.flat();
        for (const e of n) r[e] = (r[e] || 0) + 1;
        for (const e in r) {
          const n = r[e];
          let o = t.find((e) => e.frequency === n);
          o || ((o = { frequency: n, strs: [] }), t.push(o)), o.strs.push(e);
        }
        t.sort((e, t) => t.frequency - e.frequency);
      }
      for (const r of t) {
        const t = {};
        for (const n of e) {
          let e = 0;
          for (const o of n)
            r.strs.includes(o) && ((t[o] = (t[o] || 0) + e), (e += 1));
        }
        r.strs.sort((e, r) => t[e] - t[r]);
      }
      return t.map((e) => e.strs).flat();
    },
  };
  const {
    $tagAssist: n$,
    $store: o$,
    $utils: a$,
    $analytics: i$,
    $billing: s$,
    $ui: l$,
  } = app;
  n$.CollectionMediator = o$.connect(
    (e, { collectionId: t, placement: r }) => ({
      tagData: e.tagAssist.collectionsTagData,
      collection: e.tagAssist.collections.find((e) => e.id === t),
      selectedTags: n$.proxy.getSelectedTags(r),
    })
  )(
    class extends l$.Component {
      constructor(e) {
        super(e),
          (this._constructTag = (e) => ({
            id: e.name,
            element: Glamor.createElement(n$.TagPillMediator, {
              tag: e,
              placement: this.props.placement,
            }),
          })),
          (this._onCopyAllClick = () => {
            i$.controller.sendEvent("user", "tag-assist:collection-copy-all");
            const e = this.tags.map((e) => e.name);
            n$.controller.copyTags(e);
          }),
          (this._onTakeAllClick = () => {
            i$.controller.sendEvent("user", "tag-assist:collection-take-all");
            const e = this.tags.map((e) => e.name);
            n$.controller.selectTags(e, this.props.placement);
          }),
          (this._onRemoveAllClick = () => {
            i$.controller.sendEvent("user", "tag-assist:collection-remove-all");
            const e = this.tags.map((e) => e.name);
            n$.controller.unselectTags(e, this.props.placement);
          }),
          (this._onNameInput = (e) => {
            o$.transaction((t) => {
              this._getCollection(t).editName = e;
            });
          }),
          (this._onTextInput = (e) => {
            o$.transaction((t) => {
              this._getCollection(t).editText = e;
            });
          }),
          (this._onEditClick = () => {
            o$.proxy.hasPro({ feature: "tagAssist" })
              ? o$.transaction((e) => {
                  for (const t of e.tagAssist.collections) t.editing = !1;
                  const t = this._getCollection(e);
                  (t.editing = !0),
                    (t.editName = t.editName || this.props.collection.name),
                    (t.editText =
                      t.editText ||
                      this.tags.map((e) => `#${e.name}`).join(" "));
                })
              : s$.controller.openBilling("tag-assist");
          }),
          (this._onSaveClick = () => {
            i$.controller.sendEvent("user", "tag-assist:collection-edit"),
              o$.transaction((e) => {
                const t = this._getCollection(e);
                (t.name = t.editName),
                  (t.tags = n$.utils.extractTags(t.editText)),
                  (t.editing = !1),
                  (t.editName = ""),
                  (t.editText = "");
              }),
              n$.controller.registerUsage(),
              n$.controller.saveCollectionsToLs(),
              n$.controller.updateCollectionsTagData();
          }),
          (this._onCancelClick = () => {
            o$.transaction((e) => {
              const t = this._getCollection(e);
              (t.editing = !1), (t.editName = ""), (t.editText = "");
            });
          }),
          (this._onDeleteClick = () => {
            i$.controller.sendEvent("user", "tag-assist:collection-delete"),
              o$.transaction((e) => {
                e.tagAssist.collections = e.tagAssist.collections.filter(
                  (e) => e.id !== this.props.collectionId
                );
              }),
              n$.controller.saveCollectionsToLs(),
              n$.controller.updateCollectionsTagData();
          }),
          (this.tags = []);
      }
      render() {
        this.tags = this.props.collection.tags
          .map((e) => this.props.tagData[e] || e)
          .map(n$.utils.decompressTag);
        const e = this.tags.every((e) =>
            this.props.selectedTags.includes(e.name)
          ),
          t = n$.utils
            .extractTags(this.props.collection.editText)
            .filter(a$.unique).length;
        return Glamor.createElement(l$.TagAssistCollection, {
          name: this.props.collection.name,
          tags: this.tags.map(this._constructTag),
          editing: this.props.collection.editing,
          editName: this.props.collection.editName,
          editText: this.props.collection.editText,
          editTextLabel: this._getEditTextLabel(t),
          editErrorMessage: this._getEditErrorMessage(t),
          showCopyAll: this.tags.length > 0,
          showTakeAll:
            "sidebar" !== this.props.placement && this.tags.length > 0 && !e,
          showRemoveAll:
            "sidebar" !== this.props.placement && this.tags.length > 0 && e,
          onCopyAllClick: this._onCopyAllClick,
          onTakeAllClick: this._onTakeAllClick,
          onRemoveAllClick: this._onRemoveAllClick,
          onNameInput: this._onNameInput,
          onTextInput: this._onTextInput,
          onEditClick: this._onEditClick,
          onSaveClick: this._onSaveClick,
          onCancelClick: this._onCancelClick,
          onDeleteClick: this._onDeleteClick,
        });
      }
      _getEditTextLabel(e) {
        return e <= 1 ? "hashtags" : `hashtags (${e})`;
      }
      _getEditErrorMessage(e) {
        return e <= 100 ? null : `Limit exceeded: ${e} / 100`;
      }
      _getCollection(e) {
        return e.tagAssist.collections.find(
          (e) => e.id === this.props.collectionId
        );
      }
    }
  );
  const { $tagAssist: c$, $store: u$, $ui: d$ } = app;
  c$.LadderMediator = u$.connect((e, t) => ({
    selectedGroupId: e.tagAssist.selectedGroupId,
    selectedTags: c$.proxy.getSelectedTags(t.placement),
    ladder: c$.proxy.getLadderLatinOnlyAware(),
    hasPro: u$.proxy.hasPro({ feature: "tagAssist" }),
  }))(
    class extends d$.Component {
      constructor(...e) {
        var t;
        return (
          (t = super(...e)),
          (this.scuIgnoreFields = ["tagData"]),
          (this._onGroupClick = (e) => {
            u$.transaction((t) => {
              t.tagAssist.selectedGroupId = e;
            });
          }),
          t
        );
      }
      render() {
        return Glamor.createElement(d$.TagAssistLadder, {
          selectedGroupId: this.props.selectedGroupId,
          groups: this._getGroups(),
          content: this._constructContent(),
          blurContent: this._shouldBlurContent(),
          showNotEnoughDataWarning: this._shouldShowNotEnoughDataWarning(),
          onGroupClick: this._onGroupClick,
        });
      }
      _getGroups() {
        return this.props.ladder
          ? [
              this._getGroupLow(),
              this._getGroupMedium(),
              this._getGroupHigh(),
              this._getGroupVHigh(),
              this._getGroupNoData(),
            ]
          : null;
      }
      _constructContent() {
        if (!this.props.ladder) return null;
        const e = this.props.ladder[this.props.selectedGroupId];
        return 0 === e.length
          ? null
          : Glamor.createElement(c$.TableMediator, {
              key: this.props.selectedGroupId,
              tagNames: e,
              tagData: this.props.tagData,
              tagDataKey: this.props.tagDataKey,
              placement: this.props.placement,
            });
      }
      _shouldBlurContent() {
        return !this.props.hasPro;
      }
      _shouldShowNotEnoughDataWarning() {
        if (!this.props.ladder) return !1;
        return this.props.ladder[this.props.selectedGroupId].length < 10;
      }
      _getGroupLow() {
        const e = this._getGroupCount("low");
        return {
          id: "low",
          title: "LOW",
          count: e,
          tooltip: {
            text: [
              Glamor.createElement(
                React.Fragment,
                null,
                "Hashtags of this group have a ",
                Glamor.createElement("b", null, "LOW"),
                " engagement comparing to your account."
              ),
              Glamor.createElement(
                React.Fragment,
                null,
                "It is quite likely to get ranked among the top posts for these hashtags. Using these hashtags should boost your engagement."
              ),
              !!e &&
                Glamor.createElement(
                  React.Fragment,
                  null,
                  "You selected ",
                  Glamor.createElement("b", null, e),
                  " ",
                  1 === e ? "hashtag" : "hashtags",
                  " of this group."
                ),
            ],
          },
        };
      }
      _getGroupMedium() {
        const e = this._getGroupCount("medium");
        return {
          id: "medium",
          title: "MEDIUM",
          count: e,
          tooltip: {
            text: [
              Glamor.createElement(
                React.Fragment,
                null,
                "Hashtags of this group have a ",
                Glamor.createElement("b", null, "MEDIUM"),
                " engagement comparing to your account."
              ),
              Glamor.createElement(
                React.Fragment,
                null,
                "It is possible to get ranked among the top posts for these hashtags. Using these hashtags is optimal for your account. Mix them with low hashtags to get ranked higher among them."
              ),
              !!e &&
                Glamor.createElement(
                  React.Fragment,
                  null,
                  "You selected ",
                  Glamor.createElement("b", null, e),
                  " ",
                  1 === e ? "hashtag" : "hashtags",
                  " of this group."
                ),
            ],
          },
        };
      }
      _getGroupHigh() {
        const e = this._getGroupCount("high");
        return {
          id: "high",
          title: "HIGH",
          count: e,
          tooltip: {
            text: [
              Glamor.createElement(
                React.Fragment,
                null,
                "Hashtags of this group have a ",
                Glamor.createElement("b", null, "HIGH"),
                " engagement comparing to your account."
              ),
              Glamor.createElement(
                React.Fragment,
                null,
                "It will be possible to get ranked among the top posts for these hashtags if your post also ranks among the low and medium hashtags."
              ),
              !!e &&
                Glamor.createElement(
                  React.Fragment,
                  null,
                  "You selected ",
                  Glamor.createElement("b", null, e),
                  " ",
                  1 === e ? "hashtag" : "hashtags",
                  " of this group."
                ),
            ],
          },
        };
      }
      _getGroupVHigh() {
        const e = this._getGroupCount("vhigh");
        return {
          id: "vhigh",
          title: "V.HIGH",
          tooltip: {
            text: [
              Glamor.createElement(
                React.Fragment,
                null,
                "Hashtags of this group have a ",
                Glamor.createElement("b", null, "VERY HIGH"),
                " engagement comparing to your account."
              ),
              Glamor.createElement(
                React.Fragment,
                null,
                "It is unlikely to get ranked among the top posts for these hashtags. It is better to avoid these hashtags if possible."
              ),
              !!e &&
                Glamor.createElement(
                  React.Fragment,
                  null,
                  "You selected ",
                  Glamor.createElement("b", null, e),
                  " ",
                  1 === e ? "hashtag" : "hashtags",
                  " of this group."
                ),
            ],
          },
        };
      }
      _getGroupNoData() {
        if (0 === this.props.ladder.nodata.length) return null;
        return {
          id: "nodata",
          title: "NO DATA",
          tooltip: {
            text: [
              Glamor.createElement(
                React.Fragment,
                null,
                "Inssist has no engagement data for these hashtags (yet)."
              ),
              Glamor.createElement(
                React.Fragment,
                null,
                "Click CHECK TAGS button to request data for these hashtags."
              ),
            ],
          },
        };
      }
      _getGroupCount(e) {
        return this.props.hasPro
          ? (this.props.ladder[e] || []).filter((e) =>
              this.props.selectedTags.includes(e)
            ).length
          : null;
      }
    }
  );
  const { $tagAssist: h$, $store: p$, $ui: m$ } = app;
  h$.ListMediator = p$.connect((e) => ({
    hasPro: p$.proxy.hasPro({ feature: "tagAssist" }),
    upsellDismissed: e.tagAssist.tagMetricsUpsellDismissed,
  }))(
    class extends m$.Component {
      constructor(...e) {
        var t;
        return (
          (t = super(...e)),
          (this.scuIgnoreFields = ["tagData"]),
          (this._constructTag = (e, t) => {
            let r = this.props.tagData[e] || null;
            return (
              (!r || (!this.props.hasPro && this.props.upsellDismissed)) &&
                (r = { name: e }),
              {
                id: e,
                element: Glamor.createElement(h$.TagPillMediator, {
                  tag: r,
                  noColor: !this.props.hasPro,
                  placement: this.props.placement,
                }),
              }
            );
          }),
          t
        );
      }
      render() {
        return Glamor.createElement(m$.TagAssistList, {
          label: this.props.label,
          tags: this.props.tagNames.map(this._constructTag),
          noTagsMessage: "No tags found",
        });
      }
    }
  );
  const {
    $tagAssist: g$,
    $store: f$,
    $utils: v$,
    $analytics: b$,
    $billing: y$,
    $ui: w$,
    $shortid: C$,
  } = app;
  g$.NewCollectionMediator = f$.connect((e) => ({
    newCollection: e.tagAssist.newCollection,
  }))(
    class extends w$.Component {
      constructor(...e) {
        var t;
        return (
          (t = super(...e)),
          (this._onButtonClick = () => {
            f$.proxy.hasPro({ feature: "tagAssist" })
              ? f$.transaction((e) => {
                  (e.tagAssist.newCollection.name = "Collection"),
                    (e.tagAssist.newCollection.text = ""),
                    (e.tagAssist.newCollection.showForm = !0);
                })
              : y$.controller.openBilling("tag-assist");
          }),
          (this._onNameInput = (e) => {
            f$.transaction((t) => {
              t.tagAssist.newCollection.name = e;
            });
          }),
          (this._onTextInput = (e) => {
            f$.transaction((t) => {
              t.tagAssist.newCollection.text = e;
            });
          }),
          (this._onSaveClick = () => {
            b$.controller.sendEvent("user", "tag-assist:collection-create"),
              f$.transaction((e) => {
                const t = e.tagAssist.newCollection;
                e.tagAssist.collections.unshift({
                  id: C$.generate(),
                  name: t.name,
                  tags: g$.utils.extractTags(t.text),
                  editing: !1,
                  editName: "",
                  editText: "",
                }),
                  (t.name = ""),
                  (t.text = ""),
                  (t.showForm = !1);
              }),
              g$.controller.registerUsage(),
              g$.controller.saveCollectionsToLs(),
              g$.controller.updateCollectionsTagData();
          }),
          (this._onCancelClick = () => {
            f$.transaction((e) => {
              (e.tagAssist.newCollection.name = ""),
                (e.tagAssist.newCollection.text = ""),
                (e.tagAssist.newCollection.showForm = !1);
            });
          }),
          t
        );
      }
      render() {
        const e = g$.utils
          .extractTags(this.props.newCollection.text)
          .filter(v$.unique).length;
        return Glamor.createElement(w$.TagAssistNewCollection, {
          name: this.props.newCollection.name,
          text: this.props.newCollection.text,
          textLabel: this._getTextLabel(e),
          showForm: this.props.newCollection.showForm,
          errorMessage: this._getErrorMessage(e),
          onButtonClick: this._onButtonClick,
          onNameInput: this._onNameInput,
          onTextInput: this._onTextInput,
          onSaveClick: this._onSaveClick,
          onCancelClick: this._onCancelClick,
        });
      }
      _getTextLabel(e) {
        return e <= 1 ? "hashtags" : `hashtags (${e})`;
      }
      _getErrorMessage(e) {
        return e <= 100 ? null : `Limit exceeded: ${e} / 100`;
      }
    }
  );
  const { $tagAssist: k$, $store: S$, $ui: E$ } = app;
  k$.PanelCollectionsMediator = S$.connect((e) => ({
    collectionIds: e.tagAssist.collections.map((e) => e.id),
  }))(
    class extends E$.Component {
      constructor(...e) {
        var t;
        return (
          (t = super(...e)),
          (this._constructCollection = (e) => ({
            id: e,
            element: Glamor.createElement(k$.CollectionMediator, {
              collectionId: e,
              placement: this.props.placement,
            }),
          })),
          t
        );
      }
      render() {
        return Glamor.createElement(E$.TagAssistPanelCollections, {
          newCollection: Glamor.createElement(k$.NewCollectionMediator, null),
          collections: this.props.collectionIds.map(this._constructCollection),
        });
      }
    }
  );
  const {
      $tagAssist: _$,
      $store: x$,
      $analytics: P$,
      $limitations: T$,
      $billing: I$,
      $ui: G$,
    } = app,
    D$ = ({ props: e }) => ({
      width: 6,
      height: 6,
      marginLeft: G$.space.g1,
      borderRadius: "50%",
      background: e.summaryColor,
    });
  _$.PanelMediator = x$.connect((e, t) => ({
    hasPro: x$.proxy.hasPro({ feature: "tagAssist" }),
    selectedTabId: e.tagAssist.selectedTabId,
    summaryColor: _$.proxy.getSummaryStatus(t.placement).color,
    hasLadder: Boolean(e.tagAssist.ladder),
  }))(
    class extends G$.Component {
      constructor(e) {
        super(e),
          (this.scuIgnoreFields = ["tagData"]),
          (this._applyTagData = (e) => {
            this.setState({
              tagData: { ...e },
              tagDataKey: String(Date.now()),
            });
          }),
          (this._onTabClick = (e) => {
            P$.controller.sendEvent("user", `tag-assist:tab-click-${e.id}`),
              x$.transaction((t) => {
                t.tagAssist.selectedTabId = e.id;
              });
          }),
          (this._onUpgradeClick = () => {
            P$.controller.sendEvent("user", "tag-assist:upgrade-to-pro-click"),
              I$.controller.openBilling("tag-assist");
          }),
          (this._onCloseClick = () => {
            x$.transaction((e) => {
              "schedule" === this.props.placement || (e.tagAssist.shown = !1);
            });
          }),
          (this.state = { tagData: {}, tagDataKey: null });
      }
      componentDidMount() {
        (async () => {
          const e = await _$.controller.getTagData();
          this._applyTagData(e);
        })(),
          _$.controller.onTagDataUpdate(this._applyTagData);
      }
      componentWillUnmount() {
        _$.controller.onTagDataUpdate.off(this._applyTagData);
      }
      render() {
        return Glamor.createElement(G$.TagAssistPanel, {
          placement: this.props.placement,
          selectedTabId: this.props.selectedTabId,
          tabs: this._getTabs(),
          proWarning: this._constructProWarning(),
          body: this._constructBody(),
          tips: this._constructTips(),
          onTabClick: this._onTabClick,
          onCloseClick:
            "sidebar" === this.props.placement ? null : this._onCloseClick,
        });
      }
      _getTabs() {
        return [
          { id: "search", label: "SEARCH" },
          { id: "ladder", label: "LADDER" },
          { id: "collections", label: "COLLECTIONS" },
          this.props.hasPro &&
            "sidebar" !== this.props.placement && {
              id: "summary",
              label: Glamor.createElement(
                React.Fragment,
                null,
                "RANK",
                Glamor.createElement("div", { css: D$(this) })
              ),
            },
        ].filter(Boolean);
      }
      _constructProWarning() {
        if (this.props.hasPro) return null;
        const e = this.props.selectedTabId;
        return "search" === e
          ? null
          : "ladder" !== e || this.props.hasLadder
          ? {
              text: "Upgrade to PRO to get tag metrics, ladders and hashtag collection features.",
              onUpgradeClick: this._onUpgradeClick,
            }
          : null;
      }
      _constructBody() {
        const e = this.props.selectedTabId;
        return "search" === e || "ladder" === e
          ? Glamor.createElement(_$.PanelSearchMediator, {
              tagData: this.state.tagData,
              tagDataKey: this.state.tagDataKey,
              placement: this.props.placement,
            })
          : "collections" === e
          ? Glamor.createElement(_$.PanelCollectionsMediator, {
              placement: this.props.placement,
            })
          : "summary" === e
          ? Glamor.createElement(_$.PanelSummaryMediator, {
              tagData: this.state.tagData,
              tagDataKey: this.state.tagDataKey,
              placement: this.props.placement,
            })
          : null;
      }
      _constructTips() {
        return "sidebar" === this.props.placement ||
          "schedule" === this.props.placement
          ? null
          : Glamor.createElement(T$.Mediator, null);
      }
    }
  );
  const { $tagAssist: A$, $store: M$, $ui: F$ } = app;
  A$.PanelSearchMediator = M$.connect((e) => ({
    ladder: A$.proxy.getLadderLatinOnlyAware(),
    selectedTabId: e.tagAssist.selectedTabId,
    sidebarSelectedTags: e.tagAssist.sidebarSelectedTags,
  }))(
    class extends F$.Component {
      constructor(...e) {
        var t;
        return (t = super(...e)), (this.scuIgnoreFields = ["tagData"]), t;
      }
      render() {
        return Glamor.createElement(F$.TagAssistPanelSearch, {
          type: this._getType(),
          input: this._constructInput(),
          content: this._constructContent(),
          textarea: this._constructTextarea(),
          showWelcome: this._shouldShowWelcome(),
        });
      }
      _getType() {
        return "search" === this.props.selectedTabId
          ? "search"
          : "ladder" === this.props.selectedTabId
          ? "ladder"
          : null;
      }
      _constructInput() {
        return Glamor.createElement(A$.SearchInputMediator, null);
      }
      _constructContent() {
        if ("search" === this.props.selectedTabId) {
          var e;
          const t =
            (null === (e = this.props.ladder) || void 0 === e
              ? void 0
              : e.relevant) || [];
          return Glamor.createElement(A$.ListMediator, {
            label: "relevant hashtags",
            tagNames: t,
            tagData: this.props.tagData,
            tagDataKey: this.props.tagDataKey,
            placement: this.props.placement,
          });
        }
        if ("ladder" === this.props.selectedTabId)
          return Glamor.createElement(A$.LadderMediator, {
            tagData: this.props.tagData,
            tagDataKey: this.props.tagDataKey,
            placement: this.props.placement,
          });
      }
      _constructTextarea() {
        return "sidebar" === this.props.placement &&
          (this.props.ladder || this.props.sidebarSelectedTags.length > 0)
          ? Glamor.createElement(A$.TextareaMediator, null)
          : null;
      }
      _shouldShowWelcome() {
        return !this.props.ladder;
      }
    }
  );
  const { $tagAssist: R$, $store: L$, $ui: B$ } = app;
  R$.PanelSummaryMediator = L$.connect((e, t) => ({
    loadingTags: e.tagAssist.ladderLoadingTags,
    selectedTags: R$.proxy.getSelectedTags(t.placement),
    summaryStatus: R$.proxy.getSummaryStatus(t.placement),
  }))(
    class extends B$.Component {
      constructor(e) {
        super(e),
          (this.scuIgnoreFields = ["tagData"]),
          (this._onTakeAllClick = () => {
            R$.controller.selectTags(this.tags, this.props.placement);
          }),
          (this._onRemoveAllClick = () => {
            R$.controller.unselectTags(this.tags, this.props.placement);
          }),
          (this._onCheckAllClick = () => {
            R$.controller.checkTags(this.tags);
          }),
          (this._onStopAllClick = () => {
            R$.controller.stopAllTags();
          }),
          (this.tags = [...e.selectedTags]);
      }
      render() {
        const e = this._getRanking();
        return Glamor.createElement(B$.TagAssistPanelSummary, {
          rankingTitle: e.title,
          rankingColor: e.color,
          rankingDescription: e.description,
          showTakeAll: this._shouldShowTakeAll(),
          showRemoveAll: this._shouldShowRemoveAll(),
          showCheckAll: this._shouldShowCheckAll(),
          showStopAll: this._shouldShowStopAll(),
          content: this._constructContent(),
          onTakeAllClick: this._onTakeAllClick,
          onRemoveAllClick: this._onRemoveAllClick,
          onCheckAllClick: this._onCheckAllClick,
          onStopAllClick: this._onStopAllClick,
        });
      }
      _shouldShowTakeAll() {
        return (
          0 !== this.tags.length &&
          this.tags.some((e) => !this.props.selectedTags.includes(e))
        );
      }
      _shouldShowRemoveAll() {
        return (
          0 !== this.tags.length &&
          this.tags.every((e) => this.props.selectedTags.includes(e))
        );
      }
      _shouldShowCheckAll() {
        return (
          0 !== this.tags.length &&
          !(this.props.loadingTags.length > 0) &&
          this.tags
            .filter((e) => !this.props.tagData[e])
            .filter((e) => !this.props.loadingTags.includes(e)).length > 0
        );
      }
      _shouldShowStopAll() {
        return this.tags.some((e) => this.props.loadingTags.includes(e));
      }
      _getRanking() {
        const e = this.props.summaryStatus.id;
        return "n/a" === e
          ? this._getRankingNA()
          : "not-enough-low" === e
          ? this._getRankingNotBalanced("low")
          : "not-enough-high" === e
          ? this._getRankingNotBalanced("high")
          : this._getRankingBalanced();
      }
      _constructContent() {
        return Glamor.createElement(R$.TableMediator, {
          tagNames: this.tags,
          tagData: this.props.tagData,
          tagDataKey: this.props.tagDataKey,
          placement: this.props.placement,
        });
      }
      _getRankingNA() {
        return {
          title: "N/A",
          color: this.props.summaryStatus.color,
          description: Glamor.createElement(
            React.Fragment,
            null,
            "Please add at least 9 hashtags with data to get a hashtag ladder ranking. Find out more in our",
            " ",
            Glamor.createElement(
              "a",
              {
                href: "https://inssist.com/knowledge-base/ultimate-instagram-hashtag-guide",
                target: "_blank",
              },
              "Hashtag Guide"
            ),
            "."
          ),
        };
      }
      _getRankingNotBalanced(e) {
        return (
          (e = e.toUpperCase()),
          {
            title: "Not Balanced",
            color: this.props.summaryStatus.color,
            description: Glamor.createElement(
              React.Fragment,
              null,
              "Your hashtag selection is missing hashtags from ",
              e,
              " ",
              "engagement group. Try to find and add more ",
              e,
              " hashtags to your caption. Find out more in our",
              " ",
              Glamor.createElement(
                "a",
                {
                  href: "https://inssist.com/knowledge-base/ultimate-instagram-hashtag-guide",
                  target: "_blank",
                },
                "Hashtag Guide"
              ),
              "."
            ),
          }
        );
      }
      _getRankingBalanced() {
        return {
          title: "Balanced",
          color: this.props.summaryStatus.color,
          description: Glamor.createElement(
            React.Fragment,
            null,
            "Your hashtag selection looks spot on with competitive and niche hashtags mixed together. Find out more in our",
            " ",
            Glamor.createElement(
              "a",
              {
                href: "https://inssist.com/knowledge-base/ultimate-instagram-hashtag-guide",
                target: "_blank",
              },
              "Hashtag Guide"
            ),
            "."
          ),
        };
      }
    }
  );
  const { $tagAssist: O$, $store: $$, $utils: N$, $ui: U$ } = app;
  O$.SearchInputMediator = $$.connect((e) => ({
    query: e.tagAssist.query,
    loading: e.tagAssist.searching,
    latinOnly: e.tagAssist.latinOnly,
    selectedTabId: e.tagAssist.selectedTabId,
    accountStats: O$.proxy.getAccountStats(),
  }))(
    class extends U$.Component {
      constructor(e) {
        super(e),
          (this._onQueryInput = (e) => {
            $$.transaction((t) => {
              (t.tagAssist.query = e),
                e
                  ? (t.tagAssist.searching = !0)
                  : ((t.tagAssist.searching = !1), (t.tagAssist.ladder = null));
            }),
              clearTimeout(this.searchTimeout),
              (this.searchTimeout = this.setTimeout(() => {
                (this.searchTimeout = null), O$.controller.search();
              }, 800));
          }),
          (this._onClearQueryClick = () => {
            $$.transaction((e) => {
              e.tagAssist.query = "";
            }),
              clearTimeout(this.searchTimeout),
              (this.searchTimeout = null),
              O$.controller.search();
          }),
          (this._onLatinOnlyClick = () => {
            $$.transaction((e) => {
              e.tagAssist.latinOnly = !e.tagAssist.latinOnly;
            });
          }),
          (this.ladder = null),
          (this.searchTimeout = null);
      }
      componentDidMount() {
        this.props.query && O$.controller.search({ sendGaEvent: !1 });
      }
      componentWillUnmount() {
        super.componentWillUnmount(),
          this.searchTimeout && O$.controller.search();
      }
      render() {
        return Glamor.createElement(U$.TagAssistSearchInput, {
          type: this._getType(),
          query: this.props.query,
          placeholder: this._getPlaceholder(),
          loading: this.props.loading,
          latinOnly: this.props.latinOnly,
          onQueryInput: this._onQueryInput,
          onClearQueryClick: this._onClearQueryClick,
          onLatinOnlyClick: this._onLatinOnlyClick,
        });
      }
      _getType() {
        return "search" === this.props.selectedTabId
          ? "search"
          : "ladder" === this.props.selectedTabId
          ? "ladder"
          : null;
      }
      _getPlaceholder() {
        var e;
        const t =
          (null === (e = this.props.accountStats) || void 0 === e
            ? void 0
            : e.mostUsedTags) || [];
        return 0 === t.length
          ? N$.pickRandom(
              "#travel",
              "#design",
              "#nature",
              "#life",
              "#instagram"
            )
          : t
              .slice(0, 2)
              .map((e) => `#${e}`)
              .join(" ");
      }
    }
  );
  const { $tagAssist: H$, $store: z$, $ui: j$ } = app;
  function W$() {
    return (W$ =
      Object.assign ||
      function (e) {
        for (var t = 1; t < arguments.length; t++) {
          var r = arguments[t];
          for (var n in r)
            Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
        }
        return e;
      }).apply(this, arguments);
  }
  H$.SidePanelMediator = class extends j$.Component {
    constructor(...e) {
      var t;
      return (
        (t = super(...e)),
        (this._onCloseClick = () => {
          z$.transaction((e) => {
            e.sidebar.isOpen = !1;
          });
        }),
        t
      );
    }
    render() {
      return Glamor.createElement(j$.TagAssistSidePanel, {
        title: "Tag Assistant",
        content: Glamor.createElement(H$.PanelMediator, {
          placement: "sidebar",
        }),
        onCloseClick: this._onCloseClick,
      });
    }
  };
  const { $tagAssist: V$, $store: q$, $ui: Z$ } = app;
  V$.SnackbarItemMediator = q$.connect((e) => ({
    errorCode: e.tagAssist.errorCode,
  }))(
    class extends Z$.Component {
      constructor(...e) {
        var t;
        return (
          (t = super(...e)),
          (this._onCloseClick = () => {
            q$.transaction((e) => {
              e.tagAssist.errorCode = null;
            });
          }),
          t
        );
      }
      render() {
        return Glamor.createElement(
          Z$.SnackbarItem,
          {
            id: "tag-assist-snackbar-item-mediator",
            show: !!this.props.errorCode,
          },
          Glamor.createElement(
            Z$.InfoCard,
            W$({}, this._getTitleAndContent(), {
              icon: "warning-triangle",
              iconStyle: {
                width: 14,
                height: 16,
                color: Z$.color.error,
                position: "relative",
                top: 1,
              },
              markerColor: Z$.color.error,
              onClose: this._onCloseClick,
            })
          )
        );
      }
      _getTitleAndContent() {
        if ("tag-fetch-failed" === this.props.errorCode)
          return {
            title: "Too Many Requests",
            content:
              "\n          Failed to fetch data for a Hashtag page.\n          Too many hashtag requests were made from your IP network recently.\n          Please give it some time (from 15 minutes to a few hours) and try again.\n        ",
          };
      }
    }
  );
  const {
    $tagAssist: Y$,
    $store: Q$,
    $analytics: K$,
    $billing: X$,
    $ui: J$,
    $constants: eN,
  } = app;
  Y$.StatsPopupMediator = Q$.connect((e) => ({
    tiers: e.tagAssist.ladderConfig.tiers,
    hasPro: Q$.proxy.hasPro({ feature: "tagAssist" }),
    accountStats: Y$.proxy.getAccountStats(),
    showRefreshButton: e.experiments.enabled,
  }))(
    class extends J$.Component {
      constructor(...e) {
        var t;
        return (
          (t = super(...e)),
          (this._onGoToTagClick = () => {
            const e = eN.ig.hashtag.url(this.props.tag.name);
            globalThis.electron
              ? window.open(e, `hashtag-details.${this.props.tag.name}`)
              : chrome.tabs.create({ url: e, active: !0 });
          }),
          (this._onRefreshTagClick = () => {
            K$.controller.sendEvent("user", "tag-assist:refresh-tag-click"),
              Y$.controller.refreshTag(this.props.tag.name);
          }),
          (this._onUpgradeClick = () => {
            X$.controller.openBilling("tag-assist");
          }),
          (this._onUpgradeCancelClick = () => {
            Q$.transaction((e) => {
              e.tagAssist.tagMetricsUpsellDismissed = !0;
            });
          }),
          t
        );
      }
      render() {
        return Glamor.createElement(J$.TagStatsPopup, {
          tag: this.props.tag,
          accountStats: this.props.accountStats,
          tiers: this.props.tiers,
          markerDy: this.props.markerDy,
          markerAtLeft: this.props.markerAtLeft,
          showRefreshButton: this.props.showRefreshButton,
          showUpgradeToPro: !this.props.hasPro,
          onGoToTagClick: this._onGoToTagClick,
          onRefreshTagClick: this._onRefreshTagClick,
          onUpgradeClick: this._onUpgradeClick,
          onUpgradeCancelClick: this._onUpgradeCancelClick,
        });
      }
    }
  );
  const { $tagAssist: tN, $store: rN, $ui: nN } = app;
  tN.TableMediator = rN.connect((e, t) => {
    const r =
      "ladder" === e.tagAssist.selectedTabId &&
      "nodata" === e.tagAssist.selectedGroupId;
    let n, o;
    return (
      r
        ? ((n = null), (o = null))
        : "summary" === t.placement
        ? ((n = e.tagAssist.summaryEngagementSort),
          (o = e.tagAssist.summaryPostCountSort))
        : ((n = e.tagAssist.ladderEngagementSort),
          (o = e.tagAssist.ladderPostCountSort)),
      {
        loadingTags: e.tagAssist.ladderLoadingTags,
        accountStats: tN.proxy.getAccountStats(),
        engagementSort: n,
        postCountSort: o,
        isNoDataGroup: r,
      }
    );
  })(
    class extends nN.Component {
      constructor(e) {
        super(e),
          (this.scuIgnoreFields = ["tagData"]),
          (this._renderTagPill = ({ name: e }) =>
            Glamor.createElement(tN.TagPillMediator, {
              tag: this._getTag(e),
              placement: this.props.placement,
            })),
          (this._onEngagementSortClick = () => {
            rN.transaction((e) => {
              const t =
                "summary" === this.props.placement
                  ? "summaryEngagementSort"
                  : "ladderEngagementSort";
              e.tagAssist[t]
                ? "descending" === e.tagAssist[t]
                  ? (e.tagAssist[t] = "ascending")
                  : (e.tagAssist[t] = null)
                : (e.tagAssist[t] = "descending");
            });
          }),
          (this._onPostCountSortClick = () => {
            rN.transaction((e) => {
              const t =
                "summary" === this.props.placement
                  ? "summaryPostCountSort"
                  : "ladderPostCountSort";
              e.tagAssist[t]
                ? "descending" === e.tagAssist[t]
                  ? (e.tagAssist[t] = "ascending")
                  : (e.tagAssist[t] = null)
                : (e.tagAssist[t] = "descending");
            });
          }),
          (this._onSkipChange = (e) => {
            this.setState({ skip: e });
          }),
          (this._onCheckClick = (e) => {
            tN.controller.checkTags([e]);
          }),
          (this._onCheckAllClick = () => {
            const e = this._getPageTags().map((e) => e.name);
            tN.controller.checkTags(e);
          }),
          (this._onStopAllClick = () => {
            const e = this._getPageTags().map((e) => e.name);
            tN.controller.stopTags(e);
          }),
          (this.tags = []),
          (this.state = { skip: 0 });
      }
      render() {
        return (
          (this.tags = this._getSortedTags()),
          Glamor.createElement(nN.TagAssistTable, {
            skip: this.state.skip,
            pageSize: this._getPageSize(),
            engagementSort: this.props.engagementSort,
            renderTagPill: this._renderTagPill,
            tags: this.tags,
            onEngagementSortClick: this.props.isNoDataGroup
              ? null
              : this._onEngagementSortClick,
            onPostCountSortClick: this.props.isNoDataGroup
              ? null
              : this._onPostCountSortClick,
            showCheckAll: this._shouldShowCheckAll(),
            showStopAll: this._shouldShowStopAll(),
            onSkipChange: this._onSkipChange,
            onCheckClick: this._onCheckClick,
            onCheckAllClick: this._onCheckAllClick,
            onStopAllClick: this._onStopAllClick,
          })
        );
      }
      _getPageSize() {
        return "summary" === this.props.placement
          ? 100
          : window.innerHeight < 890 && "sidebar" === this.props.placement
          ? 8
          : 10;
      }
      _getSortedTags() {
        const e = this.props.engagementSort,
          t = this.props.postCountSort,
          r = nN.tagUtils.calcEngagement(this.props.accountStats);
        return this.props.tagNames
          .map((e) => {
            const t = this._getTag(e),
              n = nN.tagUtils.calcEngagement(t);
            return {
              name: t.name,
              hasData: nN.tagUtils.hasEngagementData(t),
              banned: t.isBanned,
              flagged: t.isFlagged,
              fetching: this.props.loadingTags.includes(t.name),
              postCount: t.avgPosts,
              engagementRate: nN.tagUtils.calcRate(n, r),
            };
          })
          .sort((r, n) => {
            if (e) {
              if (!r.hasData && !n.hasData) return null;
              if (r.hasData && !n.hasData) return -1;
              if (!r.hasData && n.hasData) return 1;
              return (
                ("ascending" === e ? 1 : -1) *
                (r.engagementRate - n.engagementRate)
              );
            }
            if (t) {
              return ("ascending" === t ? 1 : -1) * (r.postCount - n.postCount);
            }
            return null;
          });
      }
      _shouldShowCheckAll() {
        if (!this.props.isNoDataGroup) return !1;
        const e = this._getPageTags();
        return (
          !e.some((e) => this.props.loadingTags.includes(e.name)) &&
          e.filter((e) => !this.props.tagData[e.name]).length > 0
        );
      }
      _shouldShowStopAll() {
        if (!this.props.isNoDataGroup) return !1;
        return this._getPageTags().some((e) =>
          this.props.loadingTags.includes(e.name)
        );
      }
      _getPageTags() {
        const e = this.state.skip,
          t = this._getPageSize();
        return this.tags.slice(e, e + t);
      }
      _getTag(e) {
        return this.props.tagData[e] || { name: e };
      }
    }
  );
  const { $tagAssist: oN, $store: aN, $analytics: iN, $ui: sN } = app;
  oN.TagPillMediator = aN.connect((e, t) => ({
    tiers: e.tagAssist.ladderConfig.tiers,
    accountStats: oN.proxy.getAccountStats(),
    selectedTabId: e.tagAssist.selectedTabId,
    selectedTags: oN.proxy.getSelectedTags(t.placement),
    ladderLoadingTags: e.tagAssist.ladderLoadingTags,
    collectionsLoadingTags: e.tagAssist.collectionsLoadingTags,
  }))(
    class extends sN.Component {
      constructor(...e) {
        var t;
        return (
          (t = super(...e)),
          (this._constructStatsPopup = ({ markerDy: e, markerAtLeft: t }) =>
            Glamor.createElement(oN.StatsPopupMediator, {
              tag: this.props.tag,
              markerDy: e,
              markerAtLeft: t,
            })),
          (this._onClick = () => {
            if (
              "sidebar" !== this.props.placement ||
              "collections" !== this.props.selectedTabId
            )
              oN.controller.registerUsage(),
                oN.controller.toggleTag(
                  this.props.tag.name,
                  this.props.placement
                ),
                iN.controller.sendEvent("user", "tag-assist:tag-click");
            else {
              if (sN.tagUtils.hasEngagementData(this.props.tag)) return;
              oN.controller.checkCollectionTags([this.props.tag.name], {
                useRedis: !1,
              });
            }
          }),
          t
        );
      }
      render() {
        const e = !!this.props.tag.lastScanOn;
        return Glamor.createElement(sN.TagPill, {
          name: this.props.tag.name,
          color: this._getColor(),
          loading: this._isLoading(),
          selected: this._isSelected(),
          banned: this.props.tag.isBanned,
          flagged: this.props.tag.isFlagged,
          clickable: this._isClickable(),
          renderStatsPopup: e ? this._constructStatsPopup : null,
          onClick: this._onClick,
        });
      }
      _isClickable() {
        return (
          "sidebar" !== this.props.placement ||
          "collections" !== this.props.selectedTabId ||
          !sN.tagUtils.hasEngagementData(this.props.tag)
        );
      }
      _getColor() {
        return this.props.noColor
          ? null
          : sN.tagUtils.engagementToBgColor(
              this.props.tag,
              this.props.accountStats,
              this.props.tiers
            );
      }
      _isLoading() {
        return (
          "collections" === this.props.selectedTabId
            ? this.props.collectionsLoadingTags
            : this.props.ladderLoadingTags
        ).includes(this.props.tag.name);
      }
      _isSelected() {
        return (
          !this.props.disableSelect &&
          this.props.selectedTags.includes(this.props.tag.name)
        );
      }
    }
  );
  const { $tagAssist: lN, $store: cN, $ui: uN } = app;
  lN.TextareaMediator = cN.connect((e) => ({
    sidebarSelectedTags: e.tagAssist.sidebarSelectedTags,
    sidebarSelectedTagsAsText: e.tagAssist.sidebarSelectedTagsAsText,
  }))(
    class extends uN.Component {
      constructor(...e) {
        var t;
        return (
          (t = super(...e)),
          (this._onInput = (e) => {
            cN.transaction((t) => {
              (t.tagAssist.sidebarSelectedTags = lN.utils.extractTags(e)),
                (t.tagAssist.sidebarSelectedTagsAsText = e);
            });
          }),
          (this._onCopyAllClick = () => {
            const e = lN.utils.extractTags(
              this.props.sidebarSelectedTagsAsText
            );
            lN.controller.copyTags(e);
          }),
          t
        );
      }
      componentDidUpdate(e) {
        const t = e,
          r = this.props;
        if (t.sidebarSelectedTagsAsText === r.sidebarSelectedTagsAsText) {
          const e = t.sidebarSelectedTags.map((e) => `#${e}`).join(" "),
            n = r.sidebarSelectedTags.map((e) => `#${e}`).join(" ");
          e !== n &&
            cN.transaction((e) => {
              e.tagAssist.sidebarSelectedTagsAsText = n;
            });
        }
      }
      render() {
        return Glamor.createElement(uN.TagAssistTextarea, {
          label: this._getLabel(),
          value: this._getValue(),
          onInput: this._onInput,
          onCopyAllClick: this._onCopyAllClick,
        });
      }
      _getLabel() {
        return 0 === this.props.sidebarSelectedTags.length
          ? "hashtags"
          : `hashtags (${this.props.sidebarSelectedTags.length})`;
      }
      _getValue() {
        return this.props.sidebarSelectedTagsAsText;
      }
    }
  );
  const {
      $tagAssist: dN,
      $store: hN,
      $utils: pN,
      $iframeBus: mN,
      $analytics: gN,
      $env: fN,
      $fetcher: vN,
      $shortid: bN,
    } = app,
    yN = pN.createEmitter();
  function wN({
    _captionChange_: e,
    _sessionStart_: t,
    _sessionEnd_: r,
    _setCaption_: n,
    _selectedTags_: o,
  }) {
    let a = "",
      i = !0;
    mN.on(e, (e) => {
      i &&
        ((a = e),
        hN.transaction((e) => {
          e.tagAssist[o] = dN.utils.extractTags(a, !0);
        }));
    }),
      mN.on(t, () => {
        let e;
        const t = hN.model.observe(
          (e) => e.tagAssist[o].join("-"),
          async () => {
            const t = hN.state,
              r = dN.utils.extractTags(a, !0),
              s = t.tagAssist[o],
              l = s.filter((e) => !r.includes(e)),
              c = r.filter((e) => !s.includes(e));
            for (const e of c)
              a = a
                .replace(new RegExp(`\\s#${e}([^\\p{L}\\d_])`, "gui"), "$1")
                .replace(new RegExp(`^#${e}([^\\p{L}\\d_])`, "gui"), "$1")
                .replace(new RegExp(`#${e}\\s`, "gui"), "")
                .replace(new RegExp(`\\s#${e}$`, "gui"), "")
                .replace(new RegExp(`#${e}$`, "gui"), "");
            for (const e of l) a ? (a += ` #${e}`) : (a = `#${e}`);
            clearTimeout(e),
              (i = !1),
              await mN.send(n, a),
              (e = setTimeout(() => {
                i = !0;
              }));
          },
          !1
        );
        mN.on(r, () => {
          t && t();
        });
      });
  }
  async function CN() {
    if (!hN.state.auth.loggedIn) return;
    const e = hN.state.tagAssist.collections.map((e) => e.tags).flat();
    hN.transaction((t) => {
      const r = Date.now(),
        n = t.tagAssist.collectionsTagData,
        o = Object.keys(n).filter((t) => {
          if (!e.includes(t)) return !0;
          const o = dN.utils.decompressTag(n[t]);
          return r - o.lastScanOn > fN.options.tagAssist.collectionsTagDataTtl;
        });
      for (const e of o) delete n[e];
    });
    kN(e.filter((e) => !hN.state.tagAssist.collectionsTagData[e]).slice(0, 80));
  }
  async function kN(e, { useRedis: t = !0 } = {}) {
    hN.transaction((t) => {
      t.tagAssist.collectionsLoadingTags = t.tagAssist.collectionsLoadingTags
        .concat(e)
        .filter(pN.unique);
    });
    let r = {};
    t &&
      ((r = await dN.fetchController.fetchTagsFromRedis(e)),
      hN.transaction((e) => {
        for (const t in r) {
          const n = r[t];
          e.tagAssist.collectionsTagData[t] = dN.utils.compressTag(n);
        }
        e.tagAssist.collectionsLoadingTags =
          e.tagAssist.collectionsLoadingTags.filter((e) => !r[e]);
      })),
      (e = e.filter((e) => !r[e]).slice(0, 30)),
      hN.transaction((t) => {
        t.tagAssist.collectionsLoadingTags = e;
      });
    for (const t of e) {
      const e = await dN.fetchController.fetchTagFromIg(t);
      hN.transaction((r) => {
        e && (r.tagAssist.collectionsTagData[t] = dN.utils.compressTag(e)),
          (r.tagAssist.collectionsLoadingTags =
            r.tagAssist.collectionsLoadingTags.filter((e) => e !== t));
      });
    }
  }
  function SN() {
    yN(dN.ctx.tagData);
  }
  dN.controller = {
    init: function () {
      (function () {
        const e = hN.state.tagAssist.collectionsTagData;
        for (const t in e) {
          const r = dN.utils.decompressTag(e[t]);
          dN.ctx.tagData[t] = r;
        }
      })(),
        (async function () {
          const e = hN.state,
            t = Date.now(),
            r = e.tagAssist.ladderConfig.lastUpdateOn;
          if (t - r < 1 * pN.time.HOUR) return;
          const n = hN.state.auth.userId;
          if (!n) return;
          let o;
          try {
            const e = pN.createUrl(
                `${fN.options.tagAssist.apiUrl}/ladder/get-config`,
                { id: n }
              ),
              t = await vN.fetchJson(e);
            o = t.ladderConfig || null;
          } catch (e) {
            console.error("failed to fetch ladder config", e);
          }
          if (!o) return;
          hN.transaction((e) => {
            e.tagAssist.ladderConfig = { lastUpdateOn: Date.now(), ...o };
          });
        })(),
        mN.on("ig.ig-creation-session-start", () => {
          hN.transaction((e) => {
            e.tagAssist.igSelectedTags = [];
          });
        }),
        wN({
          _captionChange_: "tag-assist.ig-caption-change",
          _sessionStart_: "ig.creation-session-start",
          _sessionEnd_: "ig.creation-session-end",
          _setCaption_: "ig.creation-set-caption",
          _selectedTags_: "igSelectedTags",
        }),
        wN({
          _captionChange_: "tag-assist.fcs-caption-change",
          _sessionStart_: "tag-assist.fcs-composer-opened",
          _sessionEnd_: "tag-assist.fcs-composer-closed",
          _setCaption_: "tag-assist.fcs-set-caption",
          _selectedTags_: "fcsSelectedTags",
        }),
        yN(() => {
          hN.transaction((e) => {
            for (const t in e.tagAssist.collectionsTagData) {
              const r = dN.ctx.tagData[t];
              r &&
                (e.tagAssist.collectionsTagData[t] = dN.utils.compressTag(r));
            }
          });
        });
      (async () => {
        await (async function () {
          await new Promise((e) => {
            hN.state.tagAssist.collections.length > 0
              ? e()
              : mN.on("ig.ready", async () => {
                  const t = await mN.send(
                    "tag-assist.read-collections-from-ls"
                  );
                  hN.transaction((e) => {
                    e.tagAssist.collections = t;
                  }),
                    e();
                });
          });
        })(),
          CN();
      })();
    },
    search: async function e({ sendGaEvent: t = !0 } = {}) {
      const r = e,
        n = bN.generate();
      r.searchId = n;
      const o = hN.state.tagAssist.query.trim().toLowerCase();
      if (
        (hN.transaction((e) => {
          e.tagAssist.ladderLoadingTags = [];
        }),
        !o)
      )
        return void hN.transaction((e) => {
          (e.tagAssist.searching = !1), (e.tagAssist.ladder = null);
        });
      t && gN.controller.sendEvent("user", "tag-assist:search-perform");
      const a = dN.utils
          .extractTags(o)
          .slice(0, fN.options.tagAssist.maxTagsToQuery),
        i = await dN.fetchController.fetchLadder(a);
      if (r.searchId !== n) return;
      const s = {};
      for (const e in i) {
        const t = i[e];
        for (const e of t) {
          !!e.lastScanOn && (s[e.name] = e);
        }
      }
      Object.assign(dN.ctx.tagData, s),
        SN(),
        hN.transaction((e) => {
          (e.tagAssist.searching = !1),
            (e.tagAssist.ladderLoadingTags = []),
            (e.tagAssist.ladder = {});
          for (const t in i) {
            const r = i[t];
            e.tagAssist.ladder[t] = r.map((e) => e.name);
          }
          0 === i[e.tagAssist.selectedGroupId].length &&
            (e.tagAssist.selectedGroupId = "medium");
        });
    },
    getTagData: function () {
      return dN.ctx.tagData;
    },
    onTagDataUpdate: yN,
    registerUsage: function () {
      if (true)
        return void gN.controller.sendEvent(
          "user",
          "pro-paid-usage:tag-assist"
        );
      hN.transaction((e) => {
        const t = Math.floor(Date.now() / pN.time.DAY);
        e.tagAssist.lastDayUsedOn
          ? e.tagAssist.lastDayUsedOn !== t &&
            ((e.billing.trial.tagAssist += 1), (e.tagAssist.lastDayUsedOn = t))
          : (e.tagAssist.lastDayUsedOn = t);
      });
    },
    selectTags: function (e, t = null) {
      const r =
        "sidebar" === t
          ? "sidebarSelectedTags"
          : "schedule" === t
          ? "fcsSelectedTags"
          : "igSelectedTags";
      hN.transaction((t) => {
        t.tagAssist[r] = [...t.tagAssist[r], ...e].filter(pN.unique);
      });
    },
    unselectTags: function (e, t = null) {
      const r =
        "sidebar" === t
          ? "sidebarSelectedTags"
          : "schedule" === t
          ? "fcsSelectedTags"
          : "igSelectedTags";
      hN.transaction((t) => {
        t.tagAssist[r] = t.tagAssist[r].filter((t) => !e.includes(t));
      });
    },
    toggleTag: function (e, t = null) {
      const r =
        "sidebar" === t
          ? "sidebarSelectedTags"
          : "schedule" === t
          ? "fcsSelectedTags"
          : "igSelectedTags";
      hN.transaction((t) => {
        t.tagAssist[r].includes(e)
          ? (t.tagAssist[r] = t.tagAssist[r].filter((t) => t !== e))
          : t.tagAssist[r].push(e);
      });
    },
    copyTags: function (e) {
      const t = e.map((e) => `#${e}`).join(" ");
      navigator.clipboard.writeText(t);
    },
    checkTags: async function e(t) {
      const r = e,
        n = bN.generate();
      (r.execId = n),
        hN.transaction((e) => {
          e.tagAssist.ladderLoadingTags = e.tagAssist.ladderLoadingTags
            .concat(t)
            .filter((e) => !dN.ctx.tagData[e])
            .filter(pN.unique);
        });
      const o = await dN.fetchController.fetchTagsFromRedis(t);
      if ((Object.assign(dN.ctx.tagData, o), SN(), r.execId !== n)) return;
      hN.transaction((e) => {
        e.tagAssist.ladderLoadingTags = e.tagAssist.ladderLoadingTags.filter(
          (e) => !dN.ctx.tagData[e]
        );
      });
      const a = async () => {
        if (r.execId !== n) return;
        const e = hN.state.tagAssist.ladderLoadingTags[0];
        if (!e) return;
        const t = await dN.fetchController.fetchTagFromIg(e);
        t && ((dN.ctx.tagData[e] = t), SN()),
          hN.transaction((t) => {
            t.tagAssist.ladderLoadingTags =
              t.tagAssist.ladderLoadingTags.filter((t) => t !== e);
          }),
          a();
      };
      a();
    },
    refreshTag: async function (e) {
      hN.transaction((t) => {
        t.tagAssist.ladderLoadingTags.push(e);
      }),
        delete dN.ctx.tagData[e],
        SN();
      const t = await dN.fetchController.fetchTagFromIg(e);
      (dN.ctx.tagData[t.name] = t),
        SN(),
        hN.transaction((t) => {
          pN.removeFromArray(t.tagAssist.ladderLoadingTags, e);
        });
    },
    stopTags: function (e) {
      hN.transaction((t) => {
        t.tagAssist.ladderLoadingTags = t.tagAssist.ladderLoadingTags.filter(
          (t) => !e.includes(t)
        );
      });
    },
    stopAllTags: function () {
      hN.transaction((e) => {
        e.tagAssist.ladderLoadingTags = [];
      });
    },
    saveCollectionsToLs: function () {
      const e = hN.state.tagAssist.collections;
      mN.send("tag-assist.save-collections-to-ls", e);
    },
    checkCollectionTags: kN,
    updateCollectionsTagData: CN,
  };
  const {
    $tagAssist: EN,
    $store: _N,
    $bus: xN,
    $utils: PN,
    $analytics: TN,
    $env: IN,
    $fetcher: GN,
    $ui: DN,
  } = app;
  async function AN(e) {
    const t = AN;
    t.initialized &&
      ((t.initialized = !0), (t.incognito = !0), (t.lastRunOn = null));
    const r = Date.now();
    if (t.lastRunOn && !t.incognito) {
      const e = r - t.lastRunOn,
        n = 2 * PN.time.SECOND;
      e < n && (await PN.sleep(n - e));
    }
    (t.lastRunOn = r), (e = e.toLowerCase());
    const n = await xN.send("ig-api.fetch-tag", e, { incognito: t.incognito });
    if (n.result) {
      const e = {
        ...n.result,
        name: n.result.name.toLowerCase(),
        lastScanOn: Date.now(),
        relevantTags: n.result.relevantTags
          .map((e) => e.toLowerCase())
          .slice(0, IN.options.tagAssist.maxRelevantTagsToKeep),
      };
      return xN.send("tag-assist.tag-fetched-from-ig", e), e;
    }
    if (t.incognito) return (t.incognito = !1), AN(e);
    const o = PN.safe(() => JSON.stringify(n.error), "unknown");
    return (
      TN.controller.sendEvent("user", "tag-assist:fetch-tag-from-ig-error", o),
      console.error("failed to fetch tags from ig", n.error),
      null
    );
  }
  async function MN(e) {
    if (0 === (e = PN.ensureArray(e).map((e) => e.toLowerCase())).length)
      return {};
    const t = _N.state.auth.userId;
    if (!t) return {};
    let r;
    try {
      const n = PN.createUrl(IN.options.tagAssist.apiUrl, {
        id: t,
        tags: e.join(","),
      });
      r = await GN.fetchJson(n, { credentials: "omit" });
    } catch (e) {
      return console.error("failed to fetch tags from redis", e), {};
    }
    const n = {};
    for (const e in r.tags) {
      const t = EN.utils.decompressTag(`${e}:${r.tags[e]}`);
      (t.name = t.name.toLowerCase()),
        (t.relevantTags = t.relevantTags
          .map((e) => e.toLowerCase())
          .slice(0, IN.options.tagAssist.maxRelevantTagsToKeep)),
        (n[e] = t);
    }
    return (
      Object.keys(n).forEach((e) => {
        DN.tagUtils.hasEngagementData(n[e]) || delete n[e];
      }),
      n
    );
  }
  EN.fetchController = {
    fetchTagFromIg: AN,
    fetchTagsFromRedis: MN,
    fetchLadder: async function e(t) {
      const r = e;
      r.cache || (r.cache = {});
      const n = _N.state,
        o = n.auth.userId;
      if (!o) return {};
      const a = EN.proxy.getAccountStats(),
        i = DN.tagUtils.calcEngagement(a),
        s = PN.createUrl(`${IN.options.tagAssist.apiUrl}/ladder/calculate`, {
          id: o,
          engagement: i,
          tags: t.join(","),
        });
      if (r.cache[s]) return r.cache[s];
      const l = await MN(t),
        c = [];
      for (const e of t) {
        if (l[e]) continue;
        const t = await AN(e);
        t && c.push(t);
      }
      IN.is.production &&
        (async () => {
          for (const e in l) await AN(e);
        })();
      const u = {
        low: [],
        medium: [],
        high: [],
        vhigh: [],
        nodata: [],
        relevant: [],
      };
      try {
        const e = await GN.fetchJson(s, { method: "POST" });
        u.low.push(...(e.low || [])),
          u.medium.push(...(e.medium || [])),
          u.high.push(...(e.high || [])),
          u.vhigh.push(...(e.vhigh || [])),
          u.nodata.push(...(e.nodata || []));
      } catch (e) {
        return console.error("failed to fetch ladder", e), u;
      }
      {
        const e = [];
        for (const t of Object.values(l)) e.push(t.relevantTags);
        for (const t of c) e.push(t.relevantTags);
        u.relevant = []
          .concat(...u.low)
          .concat(...u.medium)
          .concat(...u.high)
          .concat(...u.vhigh);
      }
      for (const e in u) u[e] = u[e].map(EN.utils.decompressTag);
      const d = n.tagAssist.ladderConfig.tiers,
        h = [...Object.values(l), ...c];
      for (const e of h) {
        let t;
        if (DN.tagUtils.hasEngagementData(e)) {
          const r = DN.tagUtils.calcEngagement(e),
            n = DN.tagUtils.calcRate(r, i);
          t =
            n < d.low
              ? u.low
              : n < d.medium
              ? u.medium
              : n < d.high
              ? u.high
              : u.vhigh;
        } else t = u.nodata;
        t.find((t) => t.name === e.name) || t.push(e);
      }
      const p = new Set(t);
      for (const e in u) {
        const t = u[e];
        if ("nodata" === e) {
          u[e] = t.sort((e, t) =>
            p.has(e.name) ? -1 : p.has(t.name) ? 1 : null
          );
          continue;
        }
        const r = {};
        for (const e of t) {
          const t = e.relevantTags.slice(0, 50);
          for (const e of t) r[e] = (r[e] || 0) + 1;
        }
        u[e] = t.sort((e, t) => {
          if (p.has(e.name)) return -1;
          if (p.has(t.name)) return 1;
          const n = r[e.name],
            o = r[t.name];
          return n || o ? (n ? (o ? o - n : -1) : 1) : null;
        });
      }
      for (const e in u)
        "nodata" !== e && (u[e] = u[e].filter(DN.tagUtils.hasEngagementData));
      return (
        (u.relevant = u.relevant.slice(0, 120).map((e) => ({ name: e.name }))),
        (r.cache[s] = u),
        PN.createAlarm(
          "tag-assist.reset-ladder-cache",
          { delay: 20 * PN.time.MINUTE },
          () => {
            delete r.cache[s];
          }
        ),
        u
      );
    },
  };
  const { $tagAssist: FN } = app;
  FN.ctx = { tagData: {} };
  const { $tagAssist: RN, $store: LN, $ui: BN } = app;
  function ON() {
    const e = LN.state,
      t = e.auth.userId;
    return e.tagAssist.accountStats[t] || {};
  }
  function $N(e) {
    const t = LN.state;
    return "sidebar" === e
      ? t.tagAssist.sidebarSelectedTags
      : "schedule" === e
      ? t.tagAssist.fcsSelectedTags
      : t.tagAssist.igSelectedTags;
  }
  RN.proxy = {
    getAccountStats: ON,
    getSummaryStatus: function (e) {
      const t = LN.state,
        r = $N(e).filter((e) => !!RN.ctx.tagData[e]);
      if (r.length < 9) return { id: "n/a", color: BN.color.textBleak };
      const n = ON(),
        o = BN.tagUtils.calcEngagement(n),
        a = r
          .map((e) => {
            const t = RN.ctx.tagData[e],
              r = BN.tagUtils.calcEngagement(t);
            return BN.tagUtils.calcRate(r, o);
          })
          .filter(Boolean),
        i = t.tagAssist.ladderConfig.tiers;
      if (a.filter((e) => e < i.low).length < 3)
        return { id: "not-enough-low", color: BN.color.attention };
      if (a.filter((e) => e > i.medium && e <= i.high).length < 3)
        return { id: "not-enough-high", color: BN.color.attention };
      return { id: "balanced", color: BN.color.positive };
    },
    getLadderLatinOnlyAware: function () {
      const e = LN.state;
      if (!e.tagAssist.ladder) return null;
      if (!e.tagAssist.latinOnly) return e.tagAssist.ladder;
      const t = {},
        r = /^[a-z0-9_-]+$/;
      for (const n in e.tagAssist.ladder)
        t[n] = e.tagAssist.ladder[n].filter((e) => r.test(e));
      return t;
    },
    getSelectedTags: $N,
  };
  const { $musicAssist: NN, $utils: UN } = app;
  let HN;
  NN.getData = () =>
    HN ||
    ((HN = (function (e) {
      const t = e.categories.map((e) => ({
          id: e[0],
          emoji: e[1],
          name: e[2],
          trackIds: e[3],
        })),
        r = {};
      for (const t in e.tracks) {
        const n = e.tracks[t];
        r[t] = {
          id: n[0],
          name: n[1],
          duration: n[2],
          moods: n[3].map((t) => e.moods[t]),
        };
      }
      return { categories: t, tracks: r };
    })({
      moods: {
        1: "Dreamy",
        2: "Inspiring",
        3: "Nostalgic",
        4: "Funny",
        5: "Dark",
        7: "Tense",
        8: "Happy",
        9: "Eccentric",
        11: "Epic",
        12: "Romantic",
        13: "Euphoric",
        15: "Glamorous",
        16: "Energetic",
        17: "Exciting",
        18: "Sentimental",
        19: "Dramatic",
        20: "Sad",
        21: "Scary",
        22: "Angry",
        23: "Majestic",
        25: "Powerful",
        26: "Quirky",
        27: "Relaxed",
        31: "Hard",
        32: "Hopeful",
        33: "Mysterious",
        34: "Peaceful",
        35: "Sexy",
        36: "Suspense",
        38: "Enchanting",
        39: "Party",
        40: "Sporty",
        41: "Aesthetic",
        42: "Studying",
        43: "Neutral",
      },
      tracks: {
        171: [171, "Autumn in Fall", 137, [18, 12, 20]],
        181: [181, "One More Time", 162, [17, 2, 43]],
        188: [188, "When Summer Ends", 132, [8, 18, 12]],
        202: [202, "New Opportunities", 171, [17, 2, 32]],
        204: [204, "Travel", 144, [2, 32, 3]],
        209: [209, "This Beautiful Summer Day", 146, [16, 17, 1]],
        222: [222, "Chasing Shadows", 91, [22, 17, 16]],
        260: [260, "Follow Your Dream", 197, [1, 17, 32]],
        263: [263, "The Good News", 129, [17, 16, 2]],
        266: [266, "Tropical Adventure", 147, [16, 17, 8]],
        267: [267, "Escape From The Town", 132, [27, 8, 2]],
        282: [282, "Bringing Memories", 135, [20, 12, 18]],
        291: [291, "Pulse of Time", 147, [1, 32, 2]],
        292: [292, "A Breath Of Freedom", 163, [8, 4, 34]],
        293: [293, "Movie Funk", 142, [9, 4, 26]],
        294: [294, "Sunny Travel Day", 150, [8, 2, 34]],
        401: [401, "Be Happy", 92, [8, 17, 34]],
        402: [402, "Good Start To The Day", 160, [8, 2, 34]],
        403: [403, "Happy And Carefree Mood", 96, [8, 4, 2]],
        406: [406, "Successful Business", 134, [17, 8, 32]],
        408: [408, "Over The Horizon", 163, [1, 17, 32]],
        415: [415, "Lift Me Up", 139, [17, 2, 32]],
        428: [428, "Dreams Come True", 113, [17, 2, 43]],
        429: [429, "Drive It Now", 102, [25, 17, 16]],
        446: [446, "Morning Light", 158, [19, 11, 17]],
        450: [450, "Beautiful Moment", 131, [18, 12, 34]],
        451: [451, "Comedy Episode", 135, [43, 9, 26]],
        458: [458, "Empire on Fire", 152, [19, 7, 11]],
        459: [459, "Battle For The Universe", 161, [19, 7, 32]],
        462: [462, "Young And Free", 135, [17, 25, 16]],
        471: [471, "Everest", 161, [1, 2, 32]],
        472: [472, "Hollywood Epic", 157, [19, 11, 32]],
        482: [482, "Corporate Uplifting", 56, [27, 2, 43]],
        522: [522, "The Stomp", 93, [16, 25, 40]],
        526: [526, "Everything's All Right", 130, [1, 17, 2]],
        529: [529, "Blackout", 161, [19, 7, 11]],
        554: [554, "We Make The Future", 147, [17, 32, 2]],
        559: [559, "Discovery", 117, [19, 11, 32]],
        561: [561, "Swing With Me", 105, [9, 16, 8]],
        577: [577, "Successful Campaign", 122, [1, 2, 43]],
        621: [621, "End Of The Abyss", 180, [19, 7, 5]],
        638: [638, "Cooking Food", 132, [4, 9, 26]],
        649: [649, "Over the ocean", 208, [18, 20, 3]],
        657: [657, "Fashion House", 106, [15, 43, 1]],
        661: [661, "Time Shift", 95, [19, 11, 32]],
        729: [729, "Emotional Cello", 145, [20, 18, 34]],
        734: [734, "Evening Air", 180, [43, 2, 1]],
        774: [774, "Stomp and Claps", 83, [25, 16, 40]],
        786: [786, "Future Dance", 126, [16, 13, 8]],
        802: [802, "Here We Go!", 89, [16, 9, 8]],
        823: [823, "Successful Business Venture", 125, [43, 2]],
        838: [838, "Sunrise", 134, [2, 17]],
        843: [843, "Deep Blue Sea", 108, [1, 17, 2]],
        846: [846, "Live Your Dreams", 118, [16, 13, 8]],
        855: [855, "Phoenix", 122, [19, 7, 22]],
        856: [856, "Horizons", 123, [43, 27]],
        858: [858, "Party All Night", 228, [16, 13, 8]],
        864: [864, "Day Dreaming", 169, [27, 15, 2]],
        905: [905, "American Robbery", 132, [9, 4, 43]],
        912: [912, "Ambient Piano", 135, [1, 32, 3]],
        979: [979, "Future Hustle", 134, [25, 16, 43]],
        980: [980, "Dawnkeeper", 136, [5, 43]],
        996: [996, "Blacklist", 170, [16, 25, 22]],
        1028: [1028, "Space Discovery", 132, [43, 1]],
        1044: [1044, "Fashion Jam", 133, [27, 15, 43]],
        1081: [1081, "Modern Attraction", 180, [1, 2, 43]],
        1084: [1084, "Acoustic Folk", 124, [8, 17, 2]],
        1088: [1088, "Sad Moments", 144, [20, 18, 3]],
        1106: [1106, "Dreams of You", 145, [20, 12, 34]],
        1108: [1108, "Nostalgic Memories", 138, [20, 3, 32]],
        1211: [1211, "Tenderness", 151, [27, 12, 2]],
        1224: [1224, "Sport Action Drums", 175, [7, 19, 25]],
        1233: [1233, "Abstract Technology", 216, [43, 27, 2]],
        1234: [1234, "Beautiful Technology", 132, [43, 27, 2]],
        1242: [1242, "Wedding", 146, [18, 12, 34]],
        1275: [1275, "Summer Evening", 206, [8, 32, 2]],
        1303: [1303, "Dreams", 84, [27, 2, 43]],
        1313: [1313, "Dawn in the Mountains", 101, [19, 11, 32]],
        1315: [1315, "Texas Shuffle Blues Rock", 148, [9, 4, 26]],
        1385: [1385, "Future Chill", 123, [17, 43]],
        1402: [1402, "Breath", 117, [19, 11, 32]],
        1407: [1407, "Memories", 118, [18, 12, 27]],
        1426: [1426, "Trap", 102, [22, 25, 16]],
        1458: [1458, "Power", 199, [25, 5, 11]],
        1498: [1498, "Midnight Party", 165, [16, 8, 2]],
        1506: [1506, "Inspiration", 182, [16, 17, 32]],
        1592: [1592, "Outer Worlds", 110, [34, 3, 32]],
        1622: [1622, "Mad Rhythm", 108, [16, 25, 22]],
        1624: [1624, "I'm funny", 130, [8, 17, 34]],
        1667: [1667, "Dark Air", 161, [5, 19, 11]],
        1673: [1673, "Western Drive", 155, [25]],
        1744: [1744, "Far Planet", 120, [43]],
        1746: [1746, "Abandoned Factory", 128, [21, 5, 33]],
        1747: [1747, "Mirror", 105, [20, 3, 1]],
        1779: [1779, "Remember", 97, [20, 12, 34]],
        1796: [1796, "Runaway", 175, [27, 1, 2]],
        1812: [1812, "Night Lights", 89, [16, 25, 43]],
        1862: [1862, "Modern Sine", 148, [16, 25, 2]],
        1884: [1884, "Energy Sport", 120, [25, 16, 22]],
        1885: [1885, "Dynamic Power", 120, [25, 16, 40]],
        1921: [1921, "Clouds", 129, [35, 12, 43]],
        1946: [1946, "One Day", 115, [25, 17, 13]],
        1947: [1947, "Fun Quirky Style", 120, [8, 4, 26]],
        1948: [1948, "Dream of Memories", 142, [18, 12, 20]],
        1962: [1962, "Miami Nights", 139, [27, 35, 15]],
        1983: [1983, "Just Be Happy", 122, [8, 17, 4]],
        2041: [2041, "In Joy And In Sorrow", 127, [20, 18, 12]],
        2138: [2138, "Sport Style", 136, [25, 16, 31]],
        2161: [2161, "Stay Chilled", 96, [43, 27]],
        2184: [2184, "Intense Hybrid Trailer", 65, [19, 22, 7]],
        2191: [2191, "Hope", 91, [20, 2, 32]],
        2221: [2221, "Gentle Ambient", 158, [1, 32, 2]],
        2270: [2270, "Adventures", 82, [19, 7, 11]],
        2272: [2272, "Presentation", 167, [27, 2]],
        2274: [2274, "Power", 101, [22, 25, 16]],
        2289: [2289, "Abstract Slow Motion", 122, [43, 2]],
        2290: [2290, "Cold Northern Stars", 120, [19, 11, 5]],
        2293: [2293, "Inspiring Background", 156, [27, 1, 34]],
        2298: [2298, "Old Street", 126, [27, 26, 15]],
        2316: [2316, "Funny Chase", 100, [26, 9]],
        2351: [2351, "Smile", 151, [8, 16]],
        2375: [2375, "Business Gadgets", 125, [27, 43, 2]],
        3088: [3088, "Horror Teaser", 75, [5, 19, 21]],
        3126: [3126, "Emergency", 75, [19, 22, 5]],
        3127: [3127, "Dreamy Abstraction", 148, [27, 1, 2]],
        3130: [3130, "Storytelling", 193, [1, 32, 2]],
        3136: [3136, "Breaking Sky", 142, [19, 7, 11]],
        3154: [3154, "Evening Chill", 117, [27, 1, 34]],
        3174: [3174, "Dunkirk", 110, [19, 20, 32]],
        3211: [3211, "Funk", 76, [9, 43]],
        3220: [3220, "Sneaky Walk", 60, [26]],
        3263: [3263, "Absolute Power", 163, [11, 17, 32]],
        3264: [3264, "Escaping the Prison", 171, [19, 5, 33]],
        3290: [3290, "Space Travel", 129, [20, 1, 17]],
        3300: [3300, "Speed", 146, [25, 16, 2]],
        3301: [3301, "Funny Procession", 90, [8, 26, 4]],
        3308: [3308, "Extreme", 99, [22, 5, 11]],
        3342: [3342, "Morning Ispiration", 135, [17, 2]],
        3356: [3356, "New Year Night Party", 132, [16, 17, 8]],
        3401: [3401, "Summer Relax Chill", 190, [2, 1, 27]],
        3410: [3410, "Business Success", 133, [16, 8, 2]],
        3464: [3464, "Road Adventures", 140, [8, 17, 2]],
        3474: [3474, "Cozy Cafe", 135, [27, 26, 8]],
        3476: [3476, "New Day", 120, [27, 26, 43]],
        3499: [3499, "Warm Feeling", 127, [27, 41, 43]],
        3525: [3525, "Let's Funk", 141, [9, 16, 4]],
        3535: [3535, "Cold Star", 131, [27, 1, 43]],
        3549: [3549, "Street Sound", 114, [9, 16, 17]],
        3585: [3585, "Forgotten Memories", 90, [20, 19, 3]],
        3600: [3600, "Islands", 97, [8, 4, 26]],
        3621: [3621, "Rainy Evening", 103, [43, 20, 27]],
        3629: [3629, "Calm Place", 120, [1, 43, 34]],
        3681: [3681, "Light Steps", 93, [27, 41, 8]],
        3687: [3687, "Icarus Landing", 82, [19, 32, 2]],
        3729: [3729, "Loca Dance", 111, [16, 17, 8]],
        3735: [3735, "Escape The Dead", 97, [5, 21, 19]],
        3738: [3738, "Aesthetic Things", 141, [41, 8, 34]],
        3743: [3743, "5 AM", 140, [27, 41, 34]],
        3747: [3747, "Love Story", 139, [43, 20, 18]],
        3773: [3773, "Lonely Night", 175, [27, 43, 35]],
        3780: [3780, "Cheerful Morning", 123, [8, 2, 26]],
        3805: [3805, "Night Sky", 163, [41, 1, 2]],
        3830: [3830, "Spring Piano", 258, [1, 32, 3]],
        3835: [3835, "Stay Home", 162, [41, 43, 34]],
        3841: [3841, "Isolation", 102, [27, 41, 1]],
        3850: [3850, "Beyond the Mind", 120, [19, 7, 5]],
        3854: [3854, "Old Forest", 85, [20, 43, 32]],
        3856: [3856, "Deep Space Travel", 126, [43, 7, 5]],
        3872: [3872, "The Last Kingdom", 124, [19, 11, 17]],
        3878: [3878, "Through The Sky", 105, [16, 13, 39]],
        3881: [3881, "Blackout", 116, [19, 7, 5]],
        3882: [3882, "Journey of life", 165, [19, 11, 32]],
        3887: [3887, "In The Sky", 127, [20, 3, 32]],
        3891: [3891, "Windwalker", 127, [19, 11, 32]],
        3894: [3894, "Fantasy", 130, [11, 17, 32]],
        3914: [3914, "Brutal Fervour", 159, [19, 5, 11]],
        3928: [3928, "Outside the World", 114, [1, 11, 17]],
        3935: [3935, "The Time", 166, [19, 11, 32]],
        3955: [3955, "Vortex", 170, [19, 11, 25]],
        3957: [3957, "Such Things", 115, [8, 26]],
        3960: [3960, "Deliverance", 194, [5, 19, 11]],
        3972: [3972, "Sorrow", 114, [20, 3, 19]],
        4043: [4043, "Summer Lofi", 180, [27, 41, 1]],
        4056: [4056, "Smoke on the road", 89, [16, 31, 25]],
        4071: [4071, "Lucky One", 96, [25, 16, 17]],
        4081: [4081, "Hidden Gods", 178, [19, 5, 11]],
        4086: [4086, "Faceshot", 96, [25, 22, 5]],
        4089: [4089, "Information Flows", 182, [2, 43]],
        4091: [4091, "Dark Force", 106, [22, 5, 19]],
        4100: [4100, "Evening Wind", 120, [17, 32, 27]],
        4105: [4105, "Sad Memories", 132, [20, 18, 3]],
        4112: [4112, "Nature and Tranquility", 130, [3, 18, 34]],
        4118: [4118, "Calm Spirit", 500, [1, 32, 23]],
        4119: [4119, "Travel Vlog", 107, [17, 43, 34]],
        4125: [4125, "Happy Rocking Birthday", 103, [16, 17, 8]],
        4146: [4146, "Everything That Unites Us", 119, [17, 8, 2]],
        4148: [4148, "Future Tools", 145, [43]],
        4160: [4160, "Gamer", 96, [25, 16, 31]],
        4162: [4162, "Inspiring Piano Memories", 144, [32, 3, 18]],
        4174: [4174, "Be Happy", 160, [9, 8, 26]],
        4176: [4176, "Digital Volition", 125, [16, 5, 11]],
        4195: [4195, "Casino", 107, [9, 16, 4]],
        4201: [4201, "In A Silence", 348, [43, 1, 34]],
        4202: [4202, "Deep Forest", 348, [38, 33, 27]],
        4208: [4208, "Digital Corporate Technology", 136, [11, 25, 40]],
        4215: [4215, "Depth", 133, [5, 1, 32]],
        4231: [4231, "Sweet Heat", 122, [1, 17, 2]],
        4233: [4233, "Strange World", 142, [21, 5, 33]],
        4238: [4238, "Godfall", 96, [25, 22, 5]],
        4243: [4243, "Summer Rain", 143, [41, 1, 34]],
        4269: [4269, "Clouds", 137, [41, 1, 32]],
        4275: [4275, "New Hero", 138, [5, 19, 11]],
        4284: [4284, "Dance With Me", 140, [1, 2, 32]],
        4285: [4285, "Dreaming Ahead", 216, [1, 43, 41]],
        5019: [5019, "Vibes", 125, [27, 43, 42]],
        5023: [5023, "Fashion Deep House", 156, [43, 15]],
        5032: [5032, "Quantum Realm", 140, [19, 5, 11]],
        5037: [5037, "Apotheosis Of War", 155, [19, 7, 32]],
        5038: [5038, "Robot", 124, [5, 22, 11]],
        5039: [5039, "Simple Live", 138, [17, 32, 2]],
        5040: [5040, "Peace", 124, [41, 1, 17]],
        5057: [5057, "Cosmic", 144, [43, 27]],
        5060: [5060, "Everything You Are", 97, [27, 17]],
        5061: [5061, "Bicycle Ride", 126, [17, 4, 8]],
        5062: [5062, "Tropical Summer", 140, [13, 2]],
        5070: [5070, "Surfing!", 70, [41, 1, 17]],
        5072: [5072, "Inspire", 166, [11, 32, 2]],
        5074: [5074, "Documentary", 164, [17, 2, 43]],
        5075: [5075, "Coffeehouse", 150, [41, 1, 43]],
        5094: [5094, "New York Lounge", 153, [27, 41]],
        5100: [5100, "Supernova", 179, [11, 16, 2]],
        5108: [5108, "Travel", 152, [43, 2, 34]],
        5109: [5109, "Pop Party", 148, [16, 13, 17]],
        5116: [5116, "Morning Lights", 151, [27, 15, 1]],
        5164: [5164, "We Can Fly", 147, [19, 11, 2]],
        5169: [5169, "Funny Detective", 60, [26, 4]],
        5178: [5178, "I Wanna Be With You", 91, [27, 12]],
        5181: [5181, "Humans After Us", 182, [19, 5, 20]],
        5186: [5186, "Merging Colors", 147, [19, 2, 32]],
        5196: [5196, "Secrets of the House on the Hill", 110, [5, 21, 36]],
        5201: [5201, "End of the World", 189, [19, 11, 25]],
        5208: [5208, "The Spread of Evil", 144, [19, 11, 21]],
        5210: [5210, "Thirst For Extreme", 134, [16, 25, 22]],
        5221: [5221, "Life Is Inevitable", 136, [19, 11]],
        5234: [5234, "Last Hope", 170, [11, 19, 32]],
        5237: [5237, "Joyful Life", 115, [8, 26]],
        5240: [5240, "Braveheart", 160, [19, 7, 38]],
        5242: [5242, "Learn To Love", 156, [27, 1, 17]],
        5243: [5243, "Curious Kids", 105, [8, 9, 2]],
        5251: [5251, "Light Comedy", 108, [8, 26, 9]],
        5257: [5257, "Acoustic", 146, [1, 17, 8]],
        5261: [5261, "Comedy", 55, [26, 8, 4]],
        5264: [5264, "Born to Win", 138, [22, 5, 25]],
        5265: [5265, "Lyrical Folk", 152, [43, 1, 8]],
        5269: [5269, "The Terrifying Truth", 176, [21, 5, 33]],
        5271: [5271, "Nostalgia", 130, [20, 3]],
        5274: [5274, "Revelation", 140, [21, 5, 19]],
        5280: [5280, "Green Tea", 138, [27, 41, 1]],
        5282: [5282, "The Indie Rock", 135, [25, 22, 5]],
        5294: [5294, "For Kids", 110, [27, 26, 8]],
        5301: [5301, "Lama Tries to Cross the Road", 90, [9, 4, 26]],
        5304: [5304, "Successful –°ompany", 178, [8, 27, 2]],
        5310: [5310, "Just Be Happy", 138, [8, 4, 2]],
        5312: [5312, "A Serene Day", 189, [27, 43, 1]],
        5313: [5313, "Funny Clowns", 72, [26, 23]],
        5324: [5324, "Happy Children", 166, [27, 26, 8]],
        5325: [5325, "Furry Toys", 106, [9, 4, 8]],
        5326: [5326, "Love", 115, [1, 3, 34]],
        5328: [5328, "Dance of Little Skeletons", 91, [9, 33]],
        5330: [5330, "Let's Get the Party", 101, [17, 4, 40]],
        5331: [5331, "Playful Sparrow", 96, [9, 8, 34]],
        5342: [5342, "Calming Waves", 164, [1, 2, 34]],
        5343: [5343, "Sunset Dreams", 208, [27, 1, 17]],
        5347: [5347, "Cello Concerto in D major", 72, [23, 8, 9]],
        5348: [5348, "Cello Concerto in D major ‚Ññ2", 68, [8, 23, 9]],
        5350: [5350, "Sneaking Out", 85, [26]],
        5352: [5352, "Scerzo in A minor", 69, [9, 23]],
        5354: [5354, "Scerzo in C minor", 84, [23, 9, 7]],
        5356: [5356, "Concerto in C minor", 71, [23, 9]],
        5361: [5361, "Concerto in E major", 92, [9, 26, 23]],
        5371: [5371, "Cybernetics", 174, [5, 1, 43]],
        5394: [5394, "Rock Spot", 75, [22, 25, 16]],
        5400: [5400, "Morning Lo-Fi", 175, [27, 41, 1]],
        5405: [5405, "News Time", 61, [43]],
        5407: [5407, "Elysium", 150, [43, 2, 11]],
        5410: [5410, "Time Loop", 184, [5, 1, 17]],
        5412: [5412, "Rooftop Sunsets", 162, [27, 26, 41]],
        5414: [5414, "Feel The Energy", 142, [25, 16, 31]],
        5415: [5415, "Late Night Latte", 177, [27, 41, 1]],
        5416: [5416, "Alone At Night", 180, [27, 41, 1]],
        5417: [5417, "Avalanche", 105, [22, 16, 31]],
        5419: [5419, "Adrenaline", 144, [16, 22, 31]],
        5423: [5423, "Lazy Bones", 93, [27, 41, 8]],
        5427: [5427, "Cheerful Clown Show", 56, [8, 9, 4]],
        5428: [5428, "Gentle Touch", 75, [20, 18, 12]],
        5429: [5429, "Heat Waves", 90, [25, 16, 1]],
        5432: [5432, "Secular", 168, [41, 1, 8]],
        5433: [5433, "Funny Playful March", 55, [8, 17, 23]],
        5436: [5436, "Let's Put On A Show!", 120, [26, 8, 9]],
        5514: [5514, "Deep Ocean Meditation", 585, [1, 33, 43]],
        5522: [5522, "Fountains", 96, [25, 16, 1]],
        5526: [5526, "Unbroken", 227, [25, 22, 11]],
        5528: [5528, "Loving Someone", 136, [43, 27, 1]],
        5529: [5529, "It's Funk O'Clock", 138, [8, 17, 16]],
        5536: [5536, "Calmness", 169, [27, 43, 41]],
        5543: [5543, "Afternoon", 154, [27, 43, 41]],
        5546: [5546, "Graceful Style", 116, [15, 43]],
        5555: [5555, "Scary Eve", 140, [9, 33, 21]],
        5556: [5556, "A Spooktacular Day", 214, [7, 5, 9]],
        5557: [5557, "Hip-Hop Halloween", 46, [9, 33]],
        5558: [5558, "Spooky Funny Halloween", 62, [9, 33, 26]],
        5563: [5563, "Funky Saxophone", 120, [16, 13, 2]],
        5566: [5566, "Fun Maker", 103, [16, 17, 26]],
        5569: [5569, "In Fashion", 115, [43, 27, 15]],
        5572: [5572, "Smooth Vibes", 176, [27, 1, 15]],
        5574: [5574, "Lovely Date", 197, [1, 38, 32]],
        5576: [5576, "Miracle", 114, [43, 27, 1]],
        5583: [5583, "Late Night Moves", 169, [1, 41, 17]],
        5587: [5587, "Body Shaking Party", 139, [15, 39]],
        5596: [5596, "Funk Electro Groove", 105, [5, 16, 17]],
        5599: [5599, "I Got You", 132, [5, 31, 25]],
        5601: [5601, "Funky Halloween", 135, [9, 33, 21]],
        5602: [5602, "Scary Hip-Hop", 98, [9, 33, 26]],
        5604: [5604, "Happy Halloween", 77, [5, 9, 33]],
        5605: [5605, "Jack-o'-lantern", 129, [5, 9, 33]],
        5606: [5606, "Halloween Jokes", 70, [9, 4, 33]],
        5611: [5611, "Vacation", 143, [25, 16, 1]],
        5612: [5612, "In A Dark Cave", 43, [21, 5, 33]],
        5616: [5616, "Distant Planet", 65, [7, 21, 5]],
        5617: [5617, "Grim Witches Party", 131, [5, 9, 33]],
        5620: [5620, "Wind Of Change", 285, [27, 43, 1]],
        5623: [5623, "Light In The Dark", 148, [25, 11, 17]],
        5624: [5624, "Sunrise", 154, [43, 1, 17]],
        5625: [5625, "Nature", 138, [1, 38, 2]],
        5626: [5626, "Childrens Holiday", 140, [17, 8, 4]],
        5627: [5627, "Children Background", 111, [8, 26, 4]],
        5628: [5628, "Children", 128, [27, 26, 8]],
        5629: [5629, "Poltergeist", 198, [5, 43, 25]],
        5634: [5634, "Charity", 130, [32, 34, 18]],
        5646: [5646, "Breathe", 115, [16, 13, 2]],
        5656: [5656, "Chill Heart", 144, [27, 1, 3]],
        5657: [5657, "Get Up", 104, [25, 16, 31]],
        5658: [5658, "Life In A Trend", 157, [27, 15, 43]],
        5659: [5659, "Beautiful Sunrise", 117, [18, 3, 32]],
        5666: [5666, "Night Shift", 131, [27, 12, 41]],
        5669: [5669, "Popular", 95, [25, 1, 13]],
        5670: [5670, "Happyish", 120, [16, 1, 13]],
        5671: [5671, "Behave", 96, [1, 17, 2]],
        5673: [5673, "Sax Days", 118, [16, 9, 39]],
        5680: [5680, "Morning In New York", 129, [27, 15, 43]],
        5683: [5683, "Beauty Of Nature", 130, [8, 27, 2]],
        5684: [5684, "The Scent Of Love", 132, [27, 15, 43]],
        5685: [5685, "Comeback", 118, [19, 25, 5]],
        5688: [5688, "Time To Breathe", 168, [16, 2, 43]],
        5689: [5689, "So Much Fun", 108, [39, 9, 26]],
        5691: [5691, "Hope", 139, [1, 17, 32]],
        5699: [5699, "Will You Marry Me", 160, [1, 32, 2]],
        5702: [5702, "Stay Together", 164, [27, 43, 41]],
        5705: [5705, "Space Cyberpunk", 159, [25, 16, 5]],
        5710: [5710, "Morning Coffee", 177, [27, 41, 8]],
        5716: [5716, "Friends", 169, [27, 8, 32]],
        5755: [5755, "Vinyl Jingle Bells", 126, [27, 17, 8]],
        5760: [5760, "Fresh Air", 148, [17, 16, 8]],
        5761: [5761, "Sunny Day", 150, [8, 17, 2]],
        5762: [5762, "Memories", 157, [20, 32, 18]],
        5765: [5765, "Love Intentions", 113, [27, 12, 41]],
        5785: [5785, "The Snatch Up", 91, [9, 4, 26]],
        5819: [5819, "War Thunder", 121, [22, 25, 31]],
        5820: [5820, "Romantic Evening In The Park", 80, [18, 12, 27]],
        5821: [5821, "Heartwarming Story", 63, [3, 18]],
        5824: [5824, "Echoes of the Mind", 124, [43, 27, 1]],
        5826: [5826, "Touching Stories", 145, [32, 2, 3]],
        5830: [5830, "Simple Joys Of Life", 137, [16, 2, 39]],
        5831: [5831, "Turn Up The Volume", 148, [8, 17, 39]],
        5833: [5833, "Remember Me", 298, [1, 38, 2]],
        5839: [5839, "Magic Flower", 145, [41, 2, 34]],
        5841: [5841, "Pleasant evening", 100, [27, 41, 43]],
        5867: [5867, "Jingle Bells Slap House (Extended)", 190, [13, 8]],
        5878: [5878, "In Search Of A Hero", 126, [11]],
        5888: [5888, "Cute Kids", 51, [8, 4, 34]],
        5889: [5889, "Lazy Summer Rain", 63, [41, 1, 2]],
        5902: [5902, "Autumn Leaves", 117, [20, 18, 3]],
        5906: [5906, "My Name Is Rock", 142, [25, 16, 17]],
        5908: [5908, "Moving Clouds", 136, [27, 43]],
        5915: [5915, "Modern Trends", 93, [16, 17, 2]],
        5916: [5916, "Lounge Cafe", 201, [27, 43, 34]],
        5922: [5922, "Time", 160, [43, 1, 38]],
        5936: [5936, "Forest Trails", 84, [20, 32, 3]],
        5937: [5937, "Calm Lake", 61, [27, 34, 42]],
        5938: [5938, "The Smell Of Spring", 158, [43, 27, 1]],
        5939: [5939, "Dance Of Leaves", 150, [27, 1, 2]],
        5940: [5940, "Light Rain", 186, [43, 27, 20]],
        5942: [5942, "Memories", 95, [20, 43, 32]],
        5946: [5946, "Beginning of the Game", 114, [22, 7, 5]],
        5947: [5947, "Morning Walk", 168, [27, 41, 8]],
        5952: [5952, "Beautiful Moments", 130, [18, 12, 34]],
        5953: [5953, "In A Jazz Mood", 162, [27, 12]],
        5955: [5955, "La Bamba", 159, [27, 8]],
        5957: [5957, "Stay Close", 124, [20, 32, 3]],
        5959: [5959, "Feeling Hopeful", 132, [27, 2, 1]],
        5977: [5977, "Slow Motion Feelings", 151, [43, 27]],
        5991: [5991, "Training Day", 120, [22, 5, 16]],
        5992: [5992, "Good Memories", 223, [27, 43, 1]],
        5995: [5995, "Sensual Flow", 138, [27, 43, 1]],
        6005: [6005, "Harmony With The World", 153, [11, 17, 32]],
        6010: [6010, "Big Band", 143, [4, 8, 26]],
        6011: [6011, "East 233rd Street", 112, [41, 34, 27]],
        6013: [6013, "In This Summer", 170, [13, 8, 2]],
        6018: [6018, "Around", 221, [22, 5, 16]],
        6020: [6020, "In The Morning Mist", 71, [1, 38, 27]],
        6022: [6022, "Speed Racer", 188, [16, 25, 40]],
        6023: [6023, "Chilling Time", 122, [41, 43, 15]],
        6024: [6024, "Future Love", 148, [2, 43, 27]],
        6026: [6026, "Beautiful People", 163, [19, 11, 17]],
        6027: [6027, "That Soaring Feeling", 119, [17, 2, 34]],
        6028: [6028, "Waiting Is Over", 126, [5, 11, 25]],
        6037: [6037, "Gameboy", 120, [41, 8, 2]],
        6070: [6070, "Birdsong", 132, [41, 1, 8]],
        6071: [6071, "Stroll", 120, [41, 1, 34]],
        6072: [6072, "Morning Coffee", 144, [41, 1, 34]],
        6073: [6073, "Alley Cat", 121, [26, 41, 34]],
        6075: [6075, "Quiet Place", 134, [41, 1, 34]],
        6076: [6076, "Rustle of Leaves", 132, [41, 1, 8]],
        6077: [6077, "Another Day", 132, [41, 1, 8]],
        6078: [6078, "Far Away", 135, [41, 1, 8]],
        6079: [6079, "The Way Home", 135, [41, 1, 8]],
        6080: [6080, "My Street", 133, [41, 1, 2]],
        6202: [6202, "Planet Zero", 190, [19, 11, 17]],
        6205: [6205, "Not Your Hero", 155, [19, 11, 32]],
      },
      categories: [
        [
          50,
          "üèôÔ∏è",
          "Aerials",
          [
            5611, 5429, 5572, 5683, 5536, 5257, 3805, 5164, 5620, 3928, 4112,
            3854, 5181, 5201, 5624, 5583, 5371, 3747, 5629, 5522, 5671, 5821,
            5280, 5942, 6005, 5666, 4202, 5432, 5625, 5940, 5543, 3835, 5186,
            5312, 5938, 6080, 5936, 6037, 3972, 6071, 3887, 5826, 5889, 5039,
            5841, 5342, 5839, 5669, 6020, 6027,
          ],
        ],
        [
          2,
          "üë†",
          "Fashion",
          [
            4043, 5019, 4231, 5572, 3729, 5587, 5536, 526, 5689, 5684, 5109,
            5178, 181, 5620, 5574, 4284, 5915, 5670, 5831, 5062, 1962, 5702,
            5673, 3681, 5688, 1081, 1921, 2298, 1498, 5312, 6023, 5116, 5765,
            5658, 657, 1044, 3127, 5596, 5830, 5841, 6011, 5656, 5947, 5680,
            5957, 5569, 864, 5546, 5023, 5916,
          ],
        ],
        [
          30,
          "üé•",
          "Cinema",
          [
            5072, 3914, 171, 3290, 5100, 4081, 471, 3935, 843, 559, 3891, 621,
            3960, 3955, 5037, 3735, 5181, 3882, 529, 5201, 5526, 3687, 661, 912,
            5208, 450, 3136, 3850, 458, 459, 3088, 3621, 6005, 2290, 472, 2270,
            1667, 3881, 4233, 2184, 1402, 729, 5685, 6028, 4275, 5946, 1313,
            6205, 3127, 1746,
          ],
        ],
        [
          46,
          "ü§£",
          "Comedy",
          [
            5412, 5566, 5689, 1983, 3957, 5251, 5350, 5331, 5169, 5529, 5310,
            5061, 5261, 5606, 5427, 5626, 5070, 4174, 5243, 5604, 5237, 3211,
            2316, 5325, 5301, 5294, 5436, 5324, 5617, 5330, 5313, 4125, 5605,
            5555, 1315, 5328, 5433, 5347, 5348, 5354, 5602, 5601, 5356, 5557,
            5558, 5361, 5352, 5556,
          ],
        ],
        [
          36,
          "ü•ò",
          "Cooking",
          [
            4043, 5019, 5075, 5572, 5415, 5412, 5683, 5536, 5566, 5684, 5178,
            5620, 5915, 6079, 4100, 6076, 5953, 5702, 3681, 4243, 5280, 5710,
            3841, 6077, 5416, 5666, 5400, 6078, 5094, 5432, 5543, 5312, 6075,
            6080, 6023, 6037, 5658, 6071, 6072, 5423, 5841, 5947, 5680, 3738,
            6073, 5916, 5995, 5937, 5955, 5992,
          ],
        ],
        [
          1,
          "üíº",
          "Corporate",
          [
            266, 6013, 5683, 4208, 5257, 1211, 3410, 3263, 260, 5109, 5304,
            5164, 3928, 4284, 846, 5624, 2375, 5310, 5074, 4100, 5242, 482, 577,
            263, 6005, 5265, 5716, 4174, 5040, 5108, 5528, 5405, 5186, 4148,
            4285, 838, 2272, 554, 5039, 406, 428, 4146, 5760, 3464, 5623, 6027,
            209, 1506, 3342, 5057,
          ],
        ],
        [
          4,
          "ü§ì",
          "Education",
          [
            3878, 4043, 5019, 4231, 266, 5075, 5572, 5415, 4119, 5412, 5683,
            5536, 5257, 5566, 471, 3743, 5684, 5109, 5178, 5304, 5620, 4284,
            5915, 5624, 5529, 5583, 4056, 5670, 202, 5074, 5062, 5061, 4100,
            5242, 5953, 5522, 5702, 5671, 5563, 3681, 3773, 4243, 5688, 5280,
            5710, 3841, 6077, 5416, 5265, 5626,
          ],
        ],
        [
          0,
          "üî•",
          "Popular",
          [
            4231, 621, 5906, 2351, 450, 5416, 5657, 5094, 5432, 4118, 5423,
            3174, 980, 1224, 4215, 5038, 5761, 4269, 3474, 5646, 2161, 649,
            6202, 774, 5274, 1028, 734, 1948, 5634, 5410, 5785, 1946, 5269,
            4201, 5240, 5867, 5908, 5755, 4089, 1385, 2191, 5032, 3126, 858,
            4176, 5959, 1592, 3264, 1812, 5060,
          ],
        ],
        [
          47,
          "üìΩÔ∏è",
          "Filming",
          [
            5072, 4043, 5611, 5019, 4231, 5429, 5572, 3729, 5536, 5100, 5257,
            4081, 5234, 5196, 3891, 5109, 5178, 3805, 3960, 3955, 5164, 5037,
            5394, 3928, 4112, 3854, 5264, 3735, 5181, 3882, 5201, 5624, 5583,
            5526, 4056, 3687, 5371, 5208, 5074, 5612, 3747, 3850, 5629, 5522,
            5563, 3773, 5821, 4243, 5280, 5942,
          ],
        ],
        [
          27,
          "üïπÔ∏è",
          "Gaming",
          [
            1458, 5611, 3914, 6013, 3308, 4091, 4081, 1426, 3935, 5234, 4160,
            222, 3960, 5394, 5264, 1862, 3735, 5906, 3882, 5526, 5419, 5991,
            4056, 5670, 3850, 5629, 5671, 5819, 4086, 5705, 5599, 2290, 1885,
            5657, 5417, 3881, 4071, 6022, 5685, 6028, 4275, 5946, 6205, 2274,
            786, 4238, 979, 5210, 5596, 6018,
          ],
        ],
        [
          10,
          "üë∂",
          "Kids",
          [
            5412, 5689, 292, 5251, 5350, 5331, 5169, 1947, 6079, 5310, 2351,
            5061, 403, 5261, 5606, 5427, 5626, 4174, 3525, 6070, 3780, 6075,
            293, 5243, 4195, 1624, 5604, 3600, 5888, 401, 638, 2316, 1275, 5325,
            5301, 561, 5294, 5955, 462, 5627, 905, 3356, 451, 6010, 5324, 5330,
            3220, 3301, 402, 5628,
          ],
        ],
        [
          45,
          "üèÑ",
          "Lifestyle",
          [
            3878, 4043, 5611, 5019, 4231, 5429, 5075, 5572, 6013, 5415, 3729,
            4119, 5587, 5412, 5683, 5536, 5257, 5689, 3743, 1983, 5684, 5109,
            4160, 5620, 3928, 3854, 5264, 3882, 4284, 5915, 5624, 5529, 6079,
            5831, 5062, 5061, 3747, 5242, 6076, 5629, 5522, 5702, 5671, 5563,
            3681, 3773, 4243, 5688, 5280, 5710,
          ],
        ],
        [
          49,
          "üå≥",
          "Nature",
          [
            5072, 2293, 5683, 5257, 5234, 3805, 5164, 3928, 4112, 3854, 5574,
            5181, 3882, 5201, 5624, 3687, 5074, 3747, 3850, 5821, 3621, 5942,
            6005, 5416, 5265, 5716, 5952, 4202, 5040, 4162, 5625, 5543, 5186,
            3872, 5514, 5938, 6075, 5221, 3629, 4285, 5936, 6037, 3972, 4118,
            6071, 3894, 3887, 6072, 3127, 5826,
          ],
        ],
        [
          28,
          "üéôÔ∏è",
          "Podcast",
          [
            4043, 3914, 5019, 5075, 5572, 5415, 5412, 4091, 5100, 5566, 3743,
            5684, 5178, 3955, 5037, 5620, 1862, 3735, 5583, 6079, 4056, 3549,
            5371, 5208, 3476, 6076, 5953, 5629, 5522, 5671, 3773, 5282, 5688,
            5280, 3841, 1921, 5070, 2298, 5094, 5405, 6070, 3835, 5221, 6023,
            4285, 3535, 4071, 6037, 5685, 4275,
          ],
        ],
        [
          19,
          "üß™",
          "Science",
          [
            2221, 3263, 559, 5201, 5583, 2375, 5371, 661, 912, 482, 1081, 6005,
            2290, 5343, 4148, 5977, 1746, 406, 5342, 3174, 1622, 6027, 5407,
            5922, 5878, 2289, 408, 6026, 856, 855, 291, 5824, 3830, 1796, 3300,
            446, 1233, 1303, 3585, 1234, 3856, 1028, 1744, 823, 5576, 5616,
            6024, 3401, 522, 996,
          ],
        ],
        [
          21,
          "‚öΩ",
          "Sport",
          [
            1458, 5072, 5611, 3914, 5429, 6013, 3308, 4208, 4091, 5100, 1426,
            2138, 5414, 3935, 5234, 3891, 621, 4160, 222, 3960, 3955, 5037,
            5394, 3928, 1884, 5264, 5906, 5181, 3882, 5201, 5526, 5419, 5991,
            429, 4056, 5670, 3687, 3549, 661, 3136, 5629, 5522, 5671, 5673, 458,
            5563, 5819, 4086, 5282, 5688,
          ],
        ],
        [
          48,
          "üë®‚Äçüíª",
          "Tech",
          [
            3878, 4043, 5611, 5019, 4231, 5429, 5075, 5572, 5587, 4208, 5536,
            4091, 5234, 3743, 5684, 5109, 5178, 4160, 3960, 5394, 5620, 5906,
            5181, 5201, 4284, 5915, 5583, 6079, 4056, 5371, 5062, 5061, 5242,
            3850, 5629, 5522, 5702, 5671, 5563, 3681, 3773, 4243, 5282, 5688,
            5280, 6005, 5599, 3841, 5416, 5070,
          ],
        ],
        [
          24,
          "‚úàÔ∏è",
          "Travel",
          [
            5072, 4043, 5611, 5019, 4231, 5572, 2293, 6013, 5415, 3290, 3729,
            5412, 5683, 5536, 5257, 5566, 471, 2221, 843, 3743, 260, 5684, 5109,
            5178, 3805, 5164, 5620, 3928, 188, 5201, 5915, 846, 5624, 5583,
            6079, 202, 3687, 1673, 2351, 1084, 5074, 5062, 5061, 3476, 4100,
            294, 5242, 6076, 5953, 5522,
          ],
        ],
        [
          25,
          "ü§≥",
          "Vlog",
          [
            5072, 5429, 266, 5075, 5572, 2293, 3729, 3308, 5412, 5566, 1426,
            3499, 1211, 843, 526, 260, 292, 5164, 181, 5620, 1884, 1862, 188,
            5583, 429, 3549, 1673, 5831, 661, 1084, 5062, 5061, 3476, 450, 294,
            1962, 5522, 5702, 5671, 403, 3681, 3773, 263, 3154, 415, 5710, 2290,
            1921, 802, 5666,
          ],
        ],
        [
          26,
          "üíç",
          "Wedding",
          [
            171, 5683, 1106, 471, 2221, 260, 4112, 5574, 188, 282, 5624, 202,
            912, 3747, 450, 5821, 5942, 5952, 1088, 4162, 267, 5940, 5936, 729,
            5765, 1747, 554, 5826, 3130, 2041, 5762, 5659, 4105, 1407, 5957,
            1108, 408, 5691, 204, 5939, 5699, 5833, 5902, 649, 5271, 5428, 1779,
            1242, 5326, 5820,
          ],
        ],
      ],
    })),
    (function (e) {
      if (!UN.ls.has("musicAssist.order")) {
        const t = Object.keys(e.tracks).map(Number),
          r = e.categories.map((e) => e.id).filter((e) => 0 !== e);
        UN.ls.set("musicAssist.order", {
          trackIds: UN.shuffle(t),
          categoryIds: [0, ...UN.shuffle(r)],
        });
      }
      const t = UN.ls.get("musicAssist.order");
      e.categories.sort(
        (e, r) => t.categoryIds.indexOf(e.id) - t.categoryIds.indexOf(r.id)
      );
      for (const r of e.categories)
        r.trackIds.sort(
          (e, r) => t.trackIds.indexOf(e) - t.trackIds.indexOf(r)
        );
    })(HN),
    HN);
  const { $musicAssist: zN, $store: jN, $ui: WN } = app,
    VN = {
      root: { ...WN.row, flexWrap: "wrap", marginRight: -6, marginBottom: -6 },
      category: {
        marginRight: 6,
        marginBottom: 6,
        color: WN.color.textActionable,
        background: WN.color.borderDark,
        ...WN.clickableInversed,
      },
      categorySelected: { color: "#fff", background: WN.color.link },
      emoji: { marginRight: 6 },
    };
  zN.CategoriesMediator = jN.connect((e) => ({
    selectedCategoryId: e.musicAssist.selectedCategoryId,
    categoryIdsOrder: e.musicAssist.categoryIdsOrder,
  }))(
    class extends WN.Component {
      constructor(e) {
        super(e),
          (this.renderCategory = (e) => {
            const t = this.props.selectedCategoryId === e.id;
            return Glamor.createElement(WN.Pill, {
              key: e.id,
              style: [VN.category, t && VN.categorySelected],
              label: this.renderCategoryLabel(e),
              categoryId: e.id,
              onChange: this.onCategoryClick,
            });
          }),
          (this.onCategoryClick = ({ categoryId: e }) => {
            "more" !== e
              ? (this.setState({ expanded: !1 }),
                jN.transaction((t) => {
                  const r = t.musicAssist;
                  if (
                    ((r.selectedCategoryId = e),
                    0 === r.categoryIdsOrder.length &&
                      (r.categoryIdsOrder = this.getCategories().map(
                        (e) => e.id
                      )),
                    this.state.expanded)
                  ) {
                    const t = r.categoryIdsOrder.indexOf(e);
                    r.categoryIdsOrder.splice(t, 1),
                      r.categoryIdsOrder.unshift(e);
                  }
                }))
              : this.setState({ expanded: !0 });
          }),
          (this.state = { expanded: !1 });
      }
      render() {
        let e;
        return (
          (e = this.state.expanded
            ? this.getCategories()
            : [
                ...this.getCategoriesSortedByUsage().slice(0, 3),
                { id: "more", name: "‚Ä¢‚Äâ‚Ä¢‚Äâ‚Ä¢" },
              ]),
          Glamor.createElement(
            "div",
            { css: VN.root },
            e.map(this.renderCategory)
          )
        );
      }
      renderCategoryLabel(e) {
        return Glamor.createElement(
          "span",
          { "data-id": e.id },
          e.emoji && Glamor.createElement("span", { css: VN.emoji }, e.emoji),
          Glamor.createElement("span", null, e.name.toUpperCase())
        );
      }
      getCategories() {
        return [...zN.getData().categories];
      }
      getCategoriesSortedByUsage() {
        return this.getCategories().sort(
          (e, t) =>
            this.props.categoryIdsOrder.indexOf(e.id) -
            this.props.categoryIdsOrder.indexOf(t.id)
        );
      }
    }
  );
  const { $musicAssist: qN, $store: ZN, $ui: YN } = app,
    QN = {
      disclaimer: {
        color: YN.color.textBleak,
        fontWeight: 500,
        lineHeight: "15px",
      },
      scroll: {
        flexGrow: 1,
        overflow: "auto",
        marginLeft: -16,
        marginRight: -16,
        paddingLeft: 16,
        paddingRight: 16,
        paddingBottom: YN.space.g1,
      },
    };
  qN.ContentMediator = ZN.connect((e) => ({
    selectedCategoryId: e.musicAssist.selectedCategoryId,
  }))(
    class extends YN.Component {
      render() {
        return Glamor.createElement(
          React.Fragment,
          null,
          Glamor.createElement(qN.PreviewMediator, null),
          this.renderDisclaimer(),
          Glamor.createElement(YN.Spacer, { height: "g1h" }),
          Glamor.createElement(qN.CategoriesMediator, null),
          Glamor.createElement(YN.Spacer, { height: "g1" }),
          Glamor.createElement(
            "div",
            { css: QN.scroll, key: this.props.selectedCategoryId },
            Glamor.createElement(YN.Spacer, { height: "g1" }),
            Glamor.createElement(qN.UploadMediator, null),
            Glamor.createElement(YN.Spacer, { height: "g1" }),
            Glamor.createElement(qN.TrackListMediator, null)
          ),
          Glamor.createElement(qN.UpgradeMediator, null)
        );
      }
      renderDisclaimer() {
        return Glamor.createElement(
          "div",
          { css: QN.disclaimer },
          "Royalty-free music is provided by",
          " ",
          Glamor.createElement(
            "a",
            { href: "https://tunetank.com", target: "_blank" },
            "tunetank.com"
          )
        );
      }
    }
  );
  const { $musicAssist: KN, $store: XN, $ui: JN } = app,
    eU = {
      root: {
        ...JN.column,
        ...JN.padding("g2 g2 0 g2"),
        ...JN.relative(),
        ...JN.noselect,
        width: "100%",
        height: "100%",
      },
      closeButton: { ...JN.absolute("4 4 . .") },
    };
  KN.PanelMediator = class extends JN.Component {
    constructor(...e) {
      var t;
      return (
        (t = super(...e)),
        (this.onCloseClick = () => {
          XN.transaction((e) => {
            e.musicAssist.shown = !1;
          });
        }),
        t
      );
    }
    render() {
      return Glamor.createElement(
        "div",
        { css: eU.root },
        this.renderCloseButton(),
        this.renderTabs(),
        Glamor.createElement(JN.Spacer, { height: "g2" }),
        Glamor.createElement(KN.ContentMediator, null)
      );
    }
    renderCloseButton() {
      return Glamor.createElement(JN.CloseButton, {
        style: eU.closeButton,
        onClick: this.onCloseClick,
      });
    }
    renderTabs() {
      return Glamor.createElement(JN.TabBar, {
        tabs: [{ id: "main", label: "ADD MUSIC" }],
        selectedTabId: "main",
      });
    }
  };
  const { $musicAssist: tU, $store: rU, $ui: nU } = app,
    oU = {
      root: {},
      body: {
        ...nU.relative(),
        borderRadius: 4,
        overflow: "hidden",
        ".MusicAssistPreview_collapsed &": {
          height: "0 !important",
          marginTop: -8,
        },
        ".MusicAssistPreview_animateHeight &": {
          ...nU.transition.fast,
          transitionProperty: "height, margin-top",
        },
        ".MusicAssistPreview_story &": { height: "auto !important" },
      },
      footer: {
        ...nU.row,
        ...nU.alignItems.center,
        marginTop: nU.space.g1,
        marginBottom: nU.space.g2,
        ".MusicAssistPreview_story &": { marginTop: 0 },
      },
      video: {
        width: "100%",
        maxHeight: "100%",
        backgroundColor: nU.color.textNormal,
        ...nU.transition.fast,
        transitionProperty: "opacity, transform",
        "html.theme-night &": { backgroundColor: nU.color.bgLight2 },
        "&::-webkit-media-controls-volume-control-container": {
          display: "none",
        },
      },
      videoHidden: { opacity: 0, transform: "translateY(2px)" },
      volumeBars: { flexShrink: 0, ...nU.row },
      volumeBar: {
        ...nU.row,
        ...nU.alignItems.center,
        marginRight: nU.space.g3,
        "&:last-child": { marginRight: 0 },
      },
      volumeBarIcon: {
        flexShrink: 0,
        marginRight: nU.space.g1,
        color: nU.color.textActionable,
        ".MusicAssistPreview__volumeBar_inactive &": {
          color: nU.color.iconActionable,
        },
      },
      volumeBarRange: {
        width: 110,
        ".MusicAssistPreview__volumeBar_inactive &": {
          color: nU.color.iconActionable,
        },
      },
      handle: {
        ...nU.row,
        ...nU.alignItems.center,
        ...nU.justifyContent.end,
        ...nU.relative(),
        ...nU.transition.slow,
        top: -10,
        height: 20,
        paddingRight: 3,
        flexGrow: 1,
        color: nU.color.textPassive,
        cursor: "ns-resize",
        "html.theme-night &": { color: nU.color.iconPassive },
        "&:not(:hover)": { opacity: 0.8 },
        ".MusicAssistPreview:not(.MusicAssistPreview_collapsed):not(:hover) &":
          { opacity: 0, transitionDelay: "0.2s" },
        "&::before": {
          content: '""',
          width: 40,
          height: 4,
          borderRadius: 2,
          background: "currentColor",
        },
      },
    },
    aU = "music-assist-track-mediator.volume-video",
    iU = "music-assist-track-mediator.volume-music";
  nU.SvgIcon.registerSvgIcons([
    `<symbol id="${aU}" viewBox="0 0 24 24"><g transform="translate(-86 -82)"><path d="M0,0H24V24H0Z" transform="translate(86 82)" fill="none"/><g transform="translate(88 83.5)"><path d="M13.815,10.658A3.158,3.158,0,1,1,10.658,7.5a3.158,3.158,0,0,1,3.158,3.158Z" transform="translate(-2.842 -2.132)" fill="currentColor"/><path d="M7.815,13.262C5.708,13.262,1.5,14.32,1.5,16.42V18H14.131V16.42C14.131,14.32,9.923,13.262,7.815,13.262Zm6.126-7.61L12.615,6.987a2.619,2.619,0,0,1,0,3.071l1.326,1.334A4.04,4.04,0,0,0,13.941,5.652ZM16.554,3,15.267,4.287a6.3,6.3,0,0,1,0,8.478l1.287,1.287A7.759,7.759,0,0,0,16.554,3Z" fill="currentColor"/></g></g></symbol>`,
    `<symbol id="${iU}" viewBox="0 0 24 24"><path d="M0 0h24v24H0Z" fill="none"/><path d="M18.5 5.438a.937.937 0 0 0-1.22-.893L7.906 7.313a.937.937 0 0 0-.656.893v7.658a4.052 4.052 0 0 0-.937-.115c-1.554 0-2.813.84-2.813 1.875s1.259 1.877 2.812 1.877 2.812-.839 2.812-1.875v-6.847l7.5-2.2v5.41a4.052 4.052 0 0 0-.937-.115c-1.553 0-2.812.839-2.812 1.875s1.259 1.875 2.812 1.875 2.813-.839 2.813-1.875V5.438Z" fill="currentColor"/></symbol>`,
  ]),
    (tU.PreviewMediator = rU.connect((e) => ({
      isStory: e.musicAssist.isStory,
      videoUrl: e.musicAssist.videoUrl,
      videoVolume: e.musicAssist.videoVolume,
      musicVolume: e.musicAssist.musicVolume,
    }))(
      class extends nU.Component {
        constructor(e) {
          super(e),
            (this.onVideoVolumeChange = (e) => {
              rU.transaction((t) => {
                t.musicAssist.videoVolume = e;
              });
            }),
            (this.onMusicVolumeChange = (e) => {
              rU.transaction((t) => {
                t.musicAssist.musicVolume = e;
              });
            }),
            (this.onHandleMouseDown = (e) => {
              1 === e.buttons &&
                ((this.resizeStartY = e.clientY),
                (this.resizeStartHeight = this.state.videoHeight),
                document.addEventListener("mousemove", this.onDocMouseMove));
            }),
            (this.onHandleDoubleClick = () => {
              this.setState({ collapsed: !this.state.collapsed });
            }),
            (this.onDocMouseMove = (e) => {
              if (1 !== e.buttons)
                return (
                  document.removeEventListener(
                    "mouseup",
                    this.onDocMouseUp,
                    !0
                  ),
                  void document.removeEventListener(
                    "mousemove",
                    this.onDocMouseMove
                  )
                );
              const t = e.clientY - this.resizeStartY;
              let r = this.resizeStartHeight + t;
              const n = this.minVideoHeight - r > 50;
              r < this.minVideoHeight && (r = this.minVideoHeight),
                r > this.maxVideoHeight && (r = this.maxVideoHeight),
                this.setState({ videoHeight: r, collapsed: n });
            }),
            (this.minVideoHeight = 150),
            (this.maxVideoHeight = 400),
            (this.resizeStartY = 0),
            (this.resizeStartHeight = 0),
            (this.state = {
              collapsed: !1,
              showVideo: !1,
              videoHeight: 200,
              animateHeight: !1,
            });
        }
        componentDidMount() {
          this.setTimeout(() => {
            this.setState({ showVideo: !0 });
          }, 200);
        }
        getSnapshotBeforeUpdate(e, t) {
          const r = t,
            n = this.state;
          return (
            r.collapsed !== n.collapsed &&
              (this.setState({ animateHeight: !0 }),
              this.setTimeout(() => {
                this.setState({ animateHeight: !1 });
              }, 300)),
            null
          );
        }
        componentDidUpdate() {}
        render() {
          return Glamor.createElement(
            "div",
            {
              css: oU.root,
              className: `\n          MusicAssistPreview\n          ${
                this.props.isStory ? "MusicAssistPreview_story" : ""
              }\n          ${
                this.state.collapsed ? "MusicAssistPreview_collapsed" : ""
              }\n          ${
                this.state.animateHeight
                  ? "MusicAssistPreview_animateHeight"
                  : ""
              }\n        `,
            },
            Glamor.createElement(
              "div",
              { css: oU.body, style: { height: this.state.videoHeight } },
              this.renderVideo()
            ),
            Glamor.createElement(
              "div",
              { css: oU.footer },
              this.renderVolumeBars(),
              this.renderHandle()
            )
          );
        }
        renderVideo() {
          return this.props.isStory
            ? null
            : Glamor.createElement("video", {
                css: [oU.video, !this.state.showVideo && oU.videoHidden],
                style: { height: this.state.videoHeight },
                src: this.props.videoUrl,
                controls: !0,
                controlsList: "nodownload noremoteplayback noplaybackrate",
                "music-assist-player": "",
                disablePictureInPicture: !0,
              });
        }
        renderVolumeBars() {
          return Glamor.createElement(
            "div",
            { css: oU.volumeBars },
            Glamor.createElement(
              "div",
              {
                css: oU.volumeBar,
                className: `\n            MusicAssistPreview__volumeBar\n            ${
                  0 === this.props.videoVolume
                    ? "MusicAssistPreview__volumeBar_inactive"
                    : ""
                }\n          `,
              },
              Glamor.createElement(nU.SvgIcon, {
                style: oU.volumeBarIcon,
                name: aU,
              }),
              Glamor.createElement(nU.Range, {
                style: oU.volumeBarRange,
                value: this.props.videoVolume,
                min: 0,
                max: 1,
                step: 0.01,
                onChange: this.onVideoVolumeChange,
              })
            ),
            Glamor.createElement(
              "div",
              {
                css: oU.volumeBar,
                className: `\n            MusicAssistPreview__volumeBar\n            ${
                  0 === this.props.musicVolume
                    ? "MusicAssistPreview__volumeBar_inactive"
                    : ""
                }\n          `,
              },
              Glamor.createElement(nU.SvgIcon, {
                style: oU.volumeBarIcon,
                name: iU,
              }),
              Glamor.createElement(nU.Range, {
                style: oU.volumeBarRange,
                value: this.props.musicVolume,
                min: 0,
                max: 1,
                step: 0.01,
                onChange: this.onMusicVolumeChange,
              })
            )
          );
        }
        renderHandle() {
          return this.props.isStory || this.state.showVolumeBars
            ? null
            : Glamor.createElement("div", {
                css: oU.handle,
                onMouseDown: this.onHandleMouseDown,
                onDoubleClick: this.onHandleDoubleClick,
              });
        }
      }
    ));
  const { $musicAssist: sU, $store: lU, $ui: cU } = app,
    uU = { root: { marginLeft: -16, marginRight: -16 } };
  sU.TrackListMediator = lU.connect((e) => {
    const t = e.musicAssist;
    return {
      trackIds: sU
        .getData()
        .categories.find((e) => e.id === t.selectedCategoryId).trackIds,
      hasCustomTrack: !!t.customTrack,
    };
  })(
    class extends cU.Component {
      render() {
        return Glamor.createElement(
          "div",
          { css: uU.root },
          this.props.hasCustomTrack &&
            Glamor.createElement(sU.TrackMediator, {
              key: "custom",
              trackId: "custom",
            }),
          this.props.trackIds.map((e) =>
            Glamor.createElement(sU.TrackMediator, { key: e, trackId: e })
          )
        );
      }
    }
  );
  const { $musicAssist: dU, $store: hU, $ui: pU } = app,
    mU = {
      root: {
        ...pU.row,
        ...pU.alignItems.center,
        ...pU.padding("g1 g2"),
        width: "100%",
        "&:not(.MusicAssistTrack_selected)": { cursor: "pointer" },
      },
      playButton: {
        ...pU.row,
        ...pU.alignItems.center,
        ...pU.justifyContent.center,
        ...pU.transition.fast,
        transitionProperty: "color",
        marginRight: pU.space.g1h,
        flexShrink: 0,
        width: 36,
        height: 36,
        border: "2px solid",
        borderRadius: "50%",
        color: pU.color.textPassive,
        ".MusicAssistTrack_selected &": {
          color: "#FFF",
          background: pU.color.link,
          border: "none",
          ...pU.clickable,
        },
        ".MusicAssistTrack:not(.MusicAssistTrack_selected):hover &": {
          color: pU.color.iconActionable,
        },
        "html.theme-night .MusicAssistTrack:not(.MusicAssistTrack_selected):hover &":
          { color: pU.color.textActionable },
      },
      body: { flexGrow: 1, minWidth: 0, whiteSpace: "nowrap" },
      actions: {
        display: "none",
        marginLeft: pU.space.g1h,
        ".MusicAssistTrack:hover &": { display: "flex" },
      },
      action: {
        color: pU.color.link,
        ...pU.clickable,
        ...pU.relative(),
        "&::before": { content: '""', ...pU.absolute("-8 -8 -8 -8") },
        "&:first-child::before": { right: -4 },
        "&:last-child::before": { left: -4 },
      },
      header: {
        ...pU.row,
        ...pU.justifyContent.between,
        ...pU.alignItems.baseline,
      },
      subheader: { height: 14, marginTop: 2 },
      name: {
        fontSize: 14,
        fontWeight: 600,
        textOverflow: "ellipsis",
        overflow: "hidden",
      },
      startLabel: {
        marginLeft: pU.space.g1,
        fontSize: 12,
        fontWeight: 500,
        color: pU.color.textPassive,
        fontVariantNumeric: "tabular-nums",
      },
      info: {
        fontSize: 12,
        lineHeight: "14px",
        fontWeight: 500,
        color: pU.color.textPassive,
        textOverflow: "ellipsis",
        overflow: "hidden",
      },
    },
    gU = "music-assist-track-mediator.play",
    fU = "music-assist-track-mediator.tick",
    vU = "music-assist-track-mediator.download",
    bU = "music-assist-track-mediator.open";
  pU.SvgIcon.registerSvgIcons([
    `<symbol id="${gU}" _dx="7%" viewBox="0 0 15.369 16.881"><path d="M13.973 6.019a2.8 2.8 0 0 1 0 4.842l-9.779 5.642A2.8 2.8 0 0 1 0 14.08V2.799A2.8 2.8 0 0 1 4.191.38Z" fill="currentColor"/></symbol>`,
    `<symbol id="${fU}" viewBox="0 0 23.409 16.721"><path d="M8.36 16.721 0 8.36l1.672-1.672L8.36 11.7 21.737 0l1.672 1.672L8.36 16.721Z" fill="currentColor" fill-rule="evenodd"/></symbol>`,
    `<symbol id="${vU}" viewBox="0 0 23 23"><path fill="none" d="M0 0h23v23H0z"/><path d="M5.501 18.016v-2h12v2Zm1.35-7.979 1.068-1.068 2.3 2.3V4.983h2.4v6.283l2.334-2.333 1.064 1.064-4.6 4.6Z" fill="currentColor"/></symbol>`,
    `<symbol id="${bU}" viewBox="0 0 23 23"><path fill="none" d="M0 0h23v23H0z"/><path d="M5 17.794V7.4h6.234L9.157 9.481H7.079v6.234h6.234v-2.077l2.079-2.079v6.235Zm4.313-6.079 5.351-5.352h-3.429V4.8H18v6.708h-1.569V8.13l-5.351 5.352Z" fill="currentColor"/></symbol>`,
  ]),
    (dU.TrackMediator = hU.connect((e, t) => {
      const r = t.trackId,
        n = e.musicAssist.selectedTrackId === r;
      if ("custom" === r) {
        const t = e.musicAssist.customTrack;
        return t
          ? {
              url: t.url,
              name: t.name,
              filename: t.name,
              info: Math.round((t.size / 1e3 / 1e3) * 10) / 10 + " MB",
              start: n ? e.musicAssist.selectedTrackStart : 0,
              progress: n ? e.musicAssist.videoCurrentTime : 0,
              duration: t.duration,
              selected: n,
            }
          : {};
      }
      {
        const t = dU.getData().tracks[r];
        return t
          ? {
              url: dU.proxy.getTrackUrl(t.id),
              name: t.name,
              filename: `${t.name}.mp3`,
              info: t.moods.join(" ‚Ä¢ "),
              start: n ? e.musicAssist.selectedTrackStart : 0,
              progress: n ? e.musicAssist.videoCurrentTime : 0,
              duration: t.duration,
              selected: n,
            }
          : {};
      }
    })(
      class extends pU.Component {
        constructor(...e) {
          var t;
          return (
            (t = super(...e)),
            (this.onClick = () => {
              this.props.selected ||
                hU.transaction((e) => {
                  dU.proxy.canUseMusicAssist()
                    ? ((e.musicAssist.selectedTrackId = this.props.trackId),
                      (e.musicAssist.selectedTrackStart = 0),
                      (e.musicAssist.videoCurrentTime = 0))
                    : (e.musicAssist.showUpsellOverlay = !0);
                });
            }),
            (this.onPlayButtonClick = () => {
              this.props.selected &&
                hU.transaction((e) => {
                  (e.musicAssist.selectedTrackId = null),
                    (e.musicAssist.selectedTrackStart = 0),
                    (e.musicAssist.videoCurrentTime = 0);
                });
            }),
            (this.onDownloadClick = async (e) => {
              e.stopPropagation(),
                chrome.permissions.request(
                  { permissions: ["downloads"] },
                  (e) => {
                    e &&
                      chrome.downloads.download({
                        url: this.props.url,
                        filename: this.props.filename,
                      });
                  }
                );
            }),
            (this.onOpenClick = (e) => {
              e.stopPropagation(),
                chrome.tabs.create({ url: this.props.url, active: !0 });
            }),
            (this.onStartChange = (e) => {
              hU.transaction((t) => {
                t.musicAssist.selectedTrackStart = e;
              });
            }),
            t
          );
        }
        render() {
          return this.props.url
            ? Glamor.createElement(
                "div",
                {
                  css: mU.root,
                  className:
                    "MusicAssistTrack " +
                    (this.props.selected ? "MusicAssistTrack_selected" : ""),
                  onClick: this.onClick,
                },
                this.renderPlayButton(),
                this.renderBody(),
                this.renderActions()
              )
            : null;
        }
        renderPlayButton() {
          return Glamor.createElement(
            "div",
            { css: mU.playButton, onClick: this.onPlayButtonClick },
            this.props.selected
              ? Glamor.createElement(pU.SvgIcon, {
                  style: { width: 17 },
                  name: fU,
                })
              : Glamor.createElement(pU.SvgIcon, {
                  style: { width: 12 },
                  name: gU,
                })
          );
        }
        renderBody() {
          return Glamor.createElement(
            "div",
            { css: mU.body },
            Glamor.createElement(
              "div",
              { css: mU.header },
              this.renderName(),
              this.renderStartLabel()
            ),
            Glamor.createElement(
              "div",
              { css: mU.subheader },
              this.renderInfo(),
              this.renderRange()
            )
          );
        }
        renderActions() {
          return this.props.selected
            ? null
            : Glamor.createElement(
                "div",
                { css: mU.actions },
                Glamor.createElement(
                  "div",
                  { css: mU.action, onClick: this.onDownloadClick },
                  Glamor.createElement(pU.SvgIcon, { name: vU })
                ),
                Glamor.createElement(pU.Spacer, { width: "g1" }),
                Glamor.createElement(
                  "div",
                  { css: mU.action, onClick: this.onOpenClick },
                  Glamor.createElement(pU.SvgIcon, { name: bU })
                )
              );
        }
        renderName() {
          return Glamor.createElement("div", { css: mU.name }, this.props.name);
        }
        renderStartLabel() {
          if (!this.props.selected) return null;
          const e = this.renderTime(this.props.start),
            t = this.renderTime(this.props.duration);
          return Glamor.createElement(
            "div",
            { css: mU.startLabel },
            "Start at ",
            e,
            " / ",
            t
          );
        }
        renderTime(e) {
          const t = Math.floor(e / 60),
            r = Math.floor(e - 60 * t),
            n = t.toString().padStart(2, 0),
            o = r.toString().padStart(2, 0);
          return Glamor.createElement(React.Fragment, null, n, ":", o);
        }
        renderInfo() {
          return this.props.selected
            ? null
            : Glamor.createElement("div", { css: mU.info }, this.props.info);
        }
        renderRange() {
          return this.props.selected
            ? Glamor.createElement(pU.Range, {
                value: this.props.start,
                step: 1,
                min: 0,
                max: this.props.duration,
                extraValue: this.props.start + this.props.progress,
                onChange: this.onStartChange,
              })
            : null;
        }
      }
    ));
  const { $musicAssist: yU, $store: wU, $billing: CU, $ui: kU } = app,
    SU = {
      root: {},
      panel: {
        borderTop: kU.border.dark,
        paddingTop: kU.space.g1h,
        marginBottom: kU.space.g1h,
      },
      panelBody: { ...kU.row, marginBottom: kU.space.g1 },
      panelIcon: {
        width: 18,
        flexShrink: 0,
        color: kU.color.attention,
        marginRight: kU.space.g1h,
      },
      panelText: { ...kU.text.bleak },
    };
  yU.UpgradeMediator = wU.connect((e) => ({
    canUseMusicAssist: yU.proxy.canUseMusicAssist(),
    showUpsellOverlay: e.musicAssist.showUpsellOverlay,
  }))(
    class extends kU.Component {
      constructor(...e) {
        var t;
        return (
          (t = super(...e)),
          (this.onUpgradeClick = () => {
            CU.controller.openBilling("music-assist");
          }),
          (this.onUpsellOverlayClick = () => {
            wU.transaction((e) => {
              e.musicAssist.showUpsellOverlay = !1;
            });
          }),
          t
        );
      }
      render() {
        return this.props.canUseMusicAssist
          ? null
          : Glamor.createElement(
              "div",
              { css: SU.root },
              this.renderPanel(),
              this.renderUpsellOverlay()
            );
      }
      renderPanel() {
        return Glamor.createElement(
          "div",
          { css: SU.panel },
          Glamor.createElement(
            "div",
            { css: SU.panelBody },
            Glamor.createElement(kU.SvgIcon, {
              style: SU.panelIcon,
              name: "warning-triangle",
            }),
            Glamor.createElement(
              "div",
              { css: SU.panelText },
              "Please consider upgrading to ",
              Glamor.createElement("b", null, "add music"),
              " to video",
              Glamor.createElement("br", null),
              "and support development."
            )
          ),
          Glamor.createElement(kU.ActionButton, {
            label: "UPGRADE TO PRO",
            color: kU.color.textInversed,
            background: kU.color.attention,
            onClick: this.onUpgradeClick,
          })
        );
      }
      renderUpsellOverlay() {
        return Glamor.createElement(CU.UpsellOverlayMediator, {
          show: this.props.showUpsellOverlay,
          feature: "music-assist",
          onOverlayClick: this.onUpsellOverlayClick,
        });
      }
    }
  );
  const { $musicAssist: EU, $store: _U, $ui: xU } = app,
    PU = {
      root: {
        ...xU.row,
        ...xU.alignItems.center,
        ...xU.padding("11 15"),
        ...xU.relative(),
        width: "100%",
        background: xU.color.bgLight2,
        borderRadius: 4,
        border: `2px dashed ${xU.color.iconPassive}`,
        ...xU.transition.fast,
        transitionProperty: "border-color",
      },
      rootDragOver: { borderColor: xU.color.iconActionable },
      icon: { color: xU.color.iconPassive, marginRight: xU.space.g2 },
      body: {},
      title: {
        fontSize: 14,
        fontWeight: 600,
        lineHeight: "18px",
        color: xU.color.link,
      },
      description: {
        fontSize: 12,
        fontWeight: 500,
        lineHeight: "15px",
        color: xU.color.textBleak,
        marginTop: xU.space.g0h,
      },
      input: { ...xU.absolute("0 0 0 0"), opacity: 0, cursor: "pointer" },
    },
    TU = "igswiss.upload";
  EU.UploadMediator = class extends xU.Component {
    constructor(e) {
      super(e),
        (this.onChange = async (e) => {
          this.setState({ dragOver: !1 });
          const t = e.target.files[0];
          if (!t) return;
          if (!this.allowedTypes.includes(t.type)) return;
          if (t.size > this.maxFileSize)
            return void alert(
              `File is too large. Max file size is ${this.maxFileSizeStr}.`
            );
          const r = URL.createObjectURL(t),
            n = await new Promise((e) => {
              const t = new Audio();
              (t.src = r),
                t.addEventListener("loadedmetadata", (r) => {
                  e(t.duration);
                });
            });
          _U.transaction((e) => {
            (e.musicAssist.customTrack = {
              url: r,
              name: t.name,
              size: t.size,
              duration: n,
            }),
              EU.proxy.canUseMusicAssist() &&
                ((e.musicAssist.selectedTrackId = "custom"),
                (e.musicAssist.selectedTrackStart = 0));
          });
        }),
        (this.onDragEnter = (e) => {
          e.dataTransfer.items[0] && this.setState({ dragOver: !0 });
        }),
        (this.onDragLeave = () => {
          this.setState({ dragOver: !1 });
        }),
        (this.maxFileSize = 3e7),
        (this.maxFileSizeStr = "30MB"),
        (this.allowedTypes = ["audio/mpeg"]),
        (this.state = { dragOver: !1 });
    }
    render() {
      return Glamor.createElement(
        "div",
        { css: [PU.root, this.state.dragOver && PU.rootDragOver] },
        Glamor.createElement(xU.SvgIcon, { style: PU.icon, name: TU }),
        Glamor.createElement(
          "div",
          { css: PU.body },
          Glamor.createElement("div", { css: PU.title }, "UPLOAD CUSTOM .MP3"),
          Glamor.createElement(
            "div",
            { css: PU.description },
            "Click or drag & drop an audio file to use."
          )
        ),
        Glamor.createElement("input", {
          css: PU.input,
          type: "file",
          accept: this.allowedTypes.join(","),
          onChange: this.onChange,
          onDragEnter: this.onDragEnter,
          onDragLeave: this.onDragLeave,
        })
      );
    }
  };
  const {
    $musicAssist: IU,
    $store: GU,
    $iframeBus: DU,
    $analytics: AU,
    $igFrame: MU,
    $eventBus: FU,
  } = app;
  IU.controller = {
    init: function () {
      DU.on(
        "music-assist.open-for-story-creation",
        this.openForStoryCreation.bind(this)
      ),
        DU.on(
          "music-assist.set-video-current-time",
          this.setVideoCurrentTime.bind(this)
        ),
        DU.on("music-assist.get-blob", this.getBlob.bind(this)),
        FU.on(
          "music-assist.set-video-current-time",
          this.setVideoCurrentTime.bind(this)
        ),
        IU.videoPlayer.init(),
        IU.videoGenerator.init(),
        this.manageTrial(),
        this.sendGaStats(),
        this.updateVideoUrlOnChange(),
        this.resetStateOnCreationStart(),
        this.addTrackInfoToCaptionWhenNeeded(),
        this.sendPlayerDataUpdates();
    },
    togglePanel: function (e) {
      GU.transaction((t) => {
        t.musicAssist.shown = null != e ? e : !t.musicAssist.shown;
      });
    },
    openForStoryCreation: function () {
      const e = IU.proxy.getSelectedTrackCategory();
      GU.transaction((t) => {
        (t.storyAssist.shown = !0),
          (t.storyAssist.selectedTabId = "music"),
          e && (t.musicAssist.selectedCategoryId = e.id);
      });
    },
    setVideoCurrentTime: function (e) {
      GU.transaction((t) => {
        t.musicAssist.videoCurrentTime = e;
      });
    },
    getBlob: async function (e) {
      return await fetch(e).then((e) => e.blob());
    },
    manageTrial: function () {
      DU.on("ig.published", (e) => {
        if (GU.state.musicAssist.selectedTrackId)
          if (true)
            AU.controller.sendEvent("user", "pro-paid-usage:music-assist");
          else {
            if ("story-video" === e) return;
            GU.transaction((e) => {
              e.billing.trial.musicAssist += 1;
            });
          }
      });
    },
    sendGaStats: function () {
      DU.on("ig.published", () => {
        const e = GU.state.musicAssist;
        e.selectedTrackId &&
          AU.controller.sendEvent(
            "user",
            "music-assist:submit",
            "custom" === e.selectedTrackId
              ? "custom-track"
              : e.selectedCategoryId
          );
      });
    },
    updateVideoUrlOnChange: function () {
      DU.on("ig.creation-video-change", ({ url: e }) => {
        GU.transaction((t) => {
          t.musicAssist.videoUrl = e;
        });
      });
    },
    resetStateOnCreationStart: function () {
      DU.on("ig.creation-session-start", ({ isStory: e }) => {
        GU.transaction((t) => {
          Object.assign(t.musicAssist, {
            ...GU.getTemplateUserState().musicAssist,
            isStory: e,
            videoUrl: t.musicAssist.videoUrl,
            videoVolume: t.musicAssist.videoVolume,
            musicVolume: t.musicAssist.musicVolume,
            categoryIdsOrder: t.musicAssist.categoryIdsOrder,
            selectedCategoryId: t.musicAssist.selectedCategoryId,
          });
        });
      });
    },
    addTrackInfoToCaptionWhenNeeded: function () {
      MU.creationController.observeStateDuringCreation(
        (e) => e.musicAssist.selectedTrackId,
        async (e) => {
          let t = await DU.send("ig.creation-get-caption");
          (t = t.replace(/(\n\n)?üéµ.*\(tunetank.com\)/g, "")),
            (() => {
              if ("custom" === e) return;
              const r = IU.getData().tracks[e];
              if (!r) return;
              const n = `üéµ ${r.name} (tunetank.com)`;
              0 === t.trim().length
                ? (t = n)
                : ((t = t.replace(/\s+$/, "")), (t = `${t}\n\n${n}`));
            })(),
            DU.send("ig.creation-set-caption", t);
        }
      );
    },
    sendPlayerDataUpdates: function () {
      const e = () => {
        const e = GU.state.musicAssist;
        return {
          isStory: e.isStory,
          musicUrl: IU.proxy.getSelectedTrackUrl(),
          musicStart: e.selectedTrackStart,
          musicVolume: e.musicVolume,
          videoVolume: e.videoVolume,
        };
      };
      MU.creationController.observeStateDuringCreation(
        () => {
          const t = e();
          return [
            t.isStory,
            t.musicUrl,
            t.musicStart,
            t.musicVolume,
            t.videoVolume,
          ].join(",");
        },
        () => {
          const t = e();
          FU.send("music-assist.update-player-data", t),
            DU.send("music-assist.update-player-data", t);
        }
      );
    },
  };
  const {
    $musicAssist: RU,
    $store: LU,
    $utils: BU,
    $ffmpeg: OU,
    $iframeBus: $U,
  } = app;
  RU.videoGenerator = {
    init: function () {
      $U.on(
        "music-assist.should-generate-video",
        this.shouldGenerate.bind(this)
      ),
        $U.on("music-assist.generate-video", this.generate.bind(this));
    },
    shouldGenerate: function () {
      return !!LU.state.musicAssist.selectedTrackId;
    },
    generate: async function (e) {
      if (!e) return;
      const t = URL.createObjectURL(e),
        r = RU.proxy.getSelectedTrackUrl();
      if (!r) return;
      const n = await BU.loadVideoMetadata(t),
        o = e.name.split(".").pop(),
        a = `video.${o}`,
        i = "music.mp3",
        s = `output.${o}`;
      await OU.controller.addFile(a, t), await OU.controller.addFile(i, r);
      const l = LU.state.musicAssist,
        c = l.selectedTrackStart || 0,
        u = l.videoVolume,
        d = l.musicVolume;
      n.hasAudio
        ? await OU.controller.run(
            [
              `-i ${a}`,
              (c ? `-ss ${c}` : "") + " -i music.mp3",
              `-t ${n.duration}`,
              `-filter_complex [0:a]volume=${u}[a0];[1:a]volume=${d}[a1];[a0][a1]amerge`,
              "-map 0:v",
              "-map 0:a",
              "-map 1:a",
              "-c:v copy",
              "-c:a mp3",
              s,
            ].join(" ")
          )
        : await OU.controller.run(
            [
              `-i ${a}`,
              (c ? `-ss ${c}` : "") + " -i music.mp3",
              `-t ${n.duration}`,
              `-filter_complex [1:a]volume=${d}`,
              "-map 0:v",
              "-map 1:a",
              "-c:v copy",
              "-c:a aac",
              s,
            ].join(" ")
          );
      const h = await OU.controller.readFile(s, e.type);
      return (
        await OU.controller.removeFile(a),
        await OU.controller.removeFile(i),
        await OU.controller.removeFile(s),
        h
      );
    },
  };
  const { $musicAssist: NU, $utils: UU, $iframeBus: HU, $eventBus: zU } = app;
  NU.videoPlayer = {
    init: function () {
      (this.video = null),
        (this.audio = null),
        (this.overlay = null),
        (this.helpers = null),
        (this.musicUrl = null),
        (this.musicStart = 0),
        (this.musicVolume = 0),
        (this.videoVolume = 0),
        (this.onVideoResize = this.onVideoResize.bind(this)),
        (this.onWindowResize = this.onWindowResize.bind(this)),
        (this.videoResizeObserver = null),
        this.autoRegister(),
        this.handleDataUpdates();
    },
    autoRegister: function () {
      UU.onDocMutations(() => {
        const e = UU.$("video[music-assist-player]");
        e && !this.video
          ? this.register(e)
          : !e && this.video && this.unregister();
      });
    },
    handleDataUpdates: function () {
      UU.iframe.isIframe()
        ? HU.on("music-assist.update-player-data", this.applyData.bind(this))
        : zU.on("music-assist.update-player-data", this.applyData.bind(this));
    },
    register: function (e) {
      document.head.insertAdjacentHTML(
        "beforeend",
        `\n      <style class="MusicAssistPlayer__style">\n        ${this.getStyles()}\n      </style>\n    `
      ),
        document.body.insertAdjacentHTML(
          "afterend",
          '\n      <div class="MusicAssistPlayer__helpers">\n        <audio class="MusicAssistPlayer__audio"></audio>\n        <div class="MusicAssistPlayer__overlay">\n          <div class="MusicAssistPlayer__spinner"></div>\n          <div class="MusicAssistPlayer__pause"></div>\n        </div>\n      </div>\n    '
        ),
        (this.video = e),
        (this.audio = document.querySelector(".MusicAssistPlayer__audio")),
        (this.style = document.querySelector(".MusicAssistPlayer__style")),
        (this.overlay = document.querySelector(".MusicAssistPlayer__overlay")),
        (this.helpers = document.querySelector(".MusicAssistPlayer__helpers")),
        this.musicUrl && (this.audio.src = this.musicUrl),
        (this.audio.volume = this.musicVolume),
        (this.video.volume = this.videoVolume),
        (this.videoResizeObserver = new ResizeObserver(this.onVideoResize)),
        this.videoResizeObserver.observe(this.video),
        window.addEventListener("resize", this.onWindowResize),
        this.updateOverlayPosition(),
        setTimeout(() => this.updateOverlayPosition(), 300),
        setTimeout(() => this.updateOverlayPosition(), 1e3),
        this.startMusicAndVideoSync(),
        this.video.addEventListener("play", () => {
          this.startMusicAndVideoSync();
        }),
        this.video.addEventListener("timeupdate", () => {
          this.video &&
            (UU.iframe.isIframe()
              ? HU.send(
                  "music-assist.set-video-current-time",
                  this.video.currentTime
                )
              : zU.send(
                  "music-assist.set-video-current-time",
                  this.video.currentTime
                ));
        });
    },
    unregister: function () {
      this.style.remove(),
        this.helpers.remove(),
        (this.video = null),
        (this.audio = null),
        (this.style = null),
        (this.overlay = null),
        (this.helpers = null),
        this.videoResizeObserver.disconnect(this.video),
        (this.videoResizeObserver = null),
        window.removeEventListener("resize", this.onWindowResize),
        this.stopMusicAndVideoSync();
    },
    applyData: async function ({
      isStory: e,
      musicUrl: t,
      musicStart: r,
      musicVolume: n,
      videoVolume: o,
    }) {
      if (UU.iframe.isIframe() && t && t.startsWith("blob:")) {
        const e = await HU.send("music-assist.get-blob", t);
        t = URL.createObjectURL(e);
      }
      if (!this.video)
        return (
          (this.musicUrl = t),
          (this.musicStart = r),
          (this.musicVolume = n),
          void (this.videoVolume = o)
        );
      (this.musicVolume = n),
        (this.videoVolume = o),
        t && (this.audio.volume = n),
        (!t && e) || (this.video.volume = o),
        this.musicUrl !== t &&
          ((this.musicUrl = t),
          t
            ? ((this.audio.src = t),
              (this.video.currentTime = 0),
              this.video.play())
            : (this.audio.pause(),
              this.audio.removeAttribute("src"),
              (this.video.currentTime = 0),
              this.video.pause())),
        this.musicStart !== r &&
          ((this.musicStart = r),
          t && ((this.video.currentTime = 0), this.video.play())),
        t ? this.startMusicAndVideoSync() : this.stopMusicAndVideoSync();
    },
    onVideoResize: function () {
      this.updateOverlayPosition();
    },
    onWindowResize: function () {
      this.updateOverlayPosition();
    },
    updateOverlayPosition: function () {
      if (!this.video) return;
      if (!this.overlay) return;
      const e = this.video.getBoundingClientRect();
      (this.overlay.style.top = `${e.top}px`),
        (this.overlay.style.left = `${e.left}px`),
        (this.overlay.style.width = `${e.width}px`),
        (this.overlay.style.height = `${e.height}px`);
    },
    startMusicAndVideoSync: function () {
      if (!this.musicUrl) return;
      if (this.syncEnabled) return;
      this.video.paused ||
        setTimeout(() => {
          const e = this.video.currentTime;
          (this.video.currentTime = e), this.video.play();
        }, 100),
        (this.syncEnabled = !0);
      const e = this.video,
        t = this.audio;
      let r, n;
      (this.onPauseClick = () => {
        (this.playing = !1),
          document.documentElement.classList.toggle(
            "MusicAssistPlayer--playing",
            this.playing
          );
      }),
        document
          .querySelector(".MusicAssistPlayer__pause")
          .addEventListener("click", this.onPauseClick),
        (this.playing = !1),
        (this.ignoreSyncOnPlay = !1),
        (this.ignoreSyncOnPause = !1),
        (this.ignoreSyncOnSeeking = !1),
        (this.ignoreAudioPause = !1),
        (this.onVideoPause = () => {
          this.ignoreSyncOnPause
            ? (this.ignoreSyncOnPause = !1)
            : ((this.playing = !1),
              document.documentElement.classList.toggle(
                "MusicAssistPlayer--playing",
                this.playing
              ),
              o("pause"));
        }),
        e.addEventListener("pause", this.onVideoPause),
        (this.onVideoPlay = () => {
          this.ignoreSyncOnPlay
            ? (this.ignoreSyncOnPlay = !1)
            : ((this.playing = !0),
              document.documentElement.classList.toggle(
                "MusicAssistPlayer--playing",
                this.playing
              ),
              o("play"));
        }),
        e.addEventListener("play", this.onVideoPlay),
        (this.onVideoSeeking = () => {
          this.ignoreSyncOnSeeking
            ? (this.ignoreSyncOnSeeking = !1)
            : o("seeking");
        }),
        e.addEventListener("seeking", this.onVideoSeeking),
        (e.pauseNoSync = () => {
          e.paused || ((this.ignoreSyncOnPause = !0), e.pause());
        }),
        (e.playNoSync = () => {
          e.paused && ((this.ignoreSyncOnPlay = !0), e.play());
        });
      const o = (o) => {
        clearTimeout(n),
          (n = setTimeout(async () => {
            if ((clearTimeout(r), !this.video)) return;
            if (!this.audio) return;
            if (!this.musicUrl) return;
            e.pauseNoSync(), t.pauseNoSync();
            const n = e.currentTime;
            (this.ignoreSyncOnSeeking = !0),
              (e.currentTime = n),
              (t.currentTime = this.musicStart + n),
              (r = setTimeout(() => {
                document.documentElement.classList.add(
                  "MusicAssistPlayer--loading"
                );
              }, 300));
            const o = new Promise((e) => (t.oncanplay = e)),
              a = new Promise((t) => (e.oncanplay = t));
            await Promise.all([o, a]),
              clearTimeout(r),
              document.documentElement.classList.remove(
                "MusicAssistPlayer--loading"
              ),
              this.playing &&
                (e.playNoSync(),
                (!t.ended || t.currentTime < t.duration) && t.play());
          }));
      };
      (t.pauseNoSync = () => {
        t.paused || ((this.ignoreAudioPause = !0), t.pause());
      }),
        (this.audioOnPause = () => {
          this.ignoreAudioPause
            ? (this.ignoreAudioPause = !1)
            : t.ended || e.pauseNoSync();
        }),
        t.addEventListener("pause", this.audioOnPause);
    },
    stopMusicAndVideoSync: function () {
      (this.syncEnabled = !1),
        document.documentElement.classList.toggle(
          "MusicAssistPlayer--playing",
          !1
        ),
        document.documentElement.classList.toggle(
          "MusicAssistPlayer--loading",
          !1
        ),
        this.video &&
          (this.video.removeEventListener("pause", this.onVideoPause),
          this.video.removeEventListener("play", this.onVideoPlay),
          this.video.removeEventListener("seeking", this.onVideoSeeking)),
        this.audio &&
          this.audio.removeEventListener("pause", this.audioOnPause);
      const e = document.querySelector(".MusicAssistPlayer__pause");
      e && e.removeEventListener("click", this.onPauseClick);
    },
    getStyles: function () {
      return '\n      <style>\n        /* hide native spinner */\n        video[music-assist-player]::-webkit-media-controls {\n          visibility: hidden;\n        }\n        video[music-assist-player]::-webkit-media-controls-enclosure {\n          visibility: visible;\n        }\n\n        .MusicAssistPlayer__overlay {\n          position: fixed;\n          display: flex;\n          align-items: center;\n          justify-content: center;\n          pointer-events: none;\n          overflow: hidden;\n        }\n        html.theme-night .MusicAssistPlayer__overlay {\n          filter: url(#theme-reverse-filter); /* for injection */\n        }\n\n        .MusicAssistPlayer__spinner {\n          --size: 40px;\n          --thickness: 3px;\n          --color-bg: transparent;\n          --color-value: #fff;\n          width: var(--size);\n          height: var(--size);\n          border-radius: 50%;\n          border-top: var(--thickness) solid var(--color-bg);\n          border-right: var(--thickness) solid var(--color-value);\n          border-bottom: var(--thickness) solid var(--color-value);\n          border-left: var(--thickness) solid var(--color-value);\n          animation: MusicAssistPlayer__rotate 0.9s infinite linear;\n          filter:  drop-shadow(0 0 1px rgba(0, 0, 0, 0.16));\n          margin-top: -20px;\n        }\n        .MusicAssistPlayer__spinner::after {\n          width: 100%;\n          height: 100%;\n          border-radius: 50%;\n        }\n        html:not(.MusicAssistPlayer--loading) .MusicAssistPlayer__spinner {\n          display: none;\n        }\n        @keyframes MusicAssistPlayer__rotate {\n          0% { transform: rotate(0deg); }\n          100% { transform: rotate(360deg); }\n        }\n\n        .MusicAssistPlayer__pause {\n          width: 36px;\n          height: 36px;\n          position: absolute;\n          left: 6px;\n          bottom: 30px;\n          border-radius: 50%;\n          cursor: pointer;\n          pointer-events: all;\n          background-size: 20px;\n          background-repeat: no-repeat;\n          background-position: center;\n          background-image: url("data:image/svg+xml;base64,PHN2ZyBmaWxsPSJXaW5kb3ciIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogICAgPHBhdGggZD0iTTYgMTloNFY1SDZ2MTR6bTgtMTR2MTRoNFY1aC00eiIvPgogICAgPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPgo8L3N2Zz4K");\n          transition: background-color 0.3s;\n          display: none;\n        }\n        .MusicAssistPlayer__pause:hover {\n          background-color: #212123;\n        }\n        html.MusicAssistPlayer--loading.MusicAssistPlayer--playing .MusicAssistPlayer__pause {\n          display: block;\n        }\n        /* hide native pause button  */\n        html.MusicAssistPlayer--loading.MusicAssistPlayer--playing video::-webkit-media-controls-play-button {\n          visibility: hidden;\n        }\n      </style>\n    '
        .replace("<style>", "")
        .replace("</style>", "");
    },
  };
  const { $musicAssist: jU, $store: WU } = app;
  jU.proxy = {
    getTrackUrl: function (e) {
      var t;
      const r = WU.state.musicAssist;
      return e
        ? "custom" === e
          ? (null === (t = r.customTrack) || void 0 === t ? void 0 : t.url) ||
            null
          : `https://storage.inssist.com/music/${e}.mp3`
        : null;
    },
    getSelectedTrackUrl: function () {
      const e = WU.state.musicAssist;
      return this.getTrackUrl(e.selectedTrackId);
    },
    getSelectedTrackName: function () {
      const e = WU.state.musicAssist;
      if (!e.selectedTrackId) return null;
      if ("custom" === e.selectedTrackId) return e.customTrack.name;
      const t = jU.getData().tracks[e.selectedTrackId];
      return t ? t.name : null;
    },
    getSelectedTrackCategory: function () {
      const e = WU.state.musicAssist;
      if (!e.selectedTrackId) return null;
      if ("custom" === e.selectedTrackId) return null;
      const t = jU
        .getData()
        .categories.find((t) => t.trackIds.includes(e.selectedTrackId));
      return t || null;
    },
    canUseMusicAssist: function () {
      return (
        !!WU.state.storyAssist.shown ||
        WU.proxy.hasPro({ feature: "musicAssist" })
      );
    },
  };
  const {
    $dev: VU,
    $store: qU,
    $env: ZU,
    $quickReplies: YU,
    $eventBus: QU,
    $jszip: KU,
    $lodash: XU,
  } = app;
  VU.controller = {
    init: function () {
      this._initialized ||
        ((this._initialized = !0),
        this._initTestCommand(),
        this._initToggleExperimentsShortcut(),
        this._initGlobalVars());
    },
    _initTestCommand: function () {
      globalThis.test = () => {
        chrome.tabs.create({ url: "/tests.html", active: !0 });
      };
    },
    _initToggleExperimentsShortcut: function () {
      document.addEventListener("keydown", (e) => {
        e.ctrlKey &&
          e.altKey &&
          e.shiftKey &&
          40 === e.keyCode &&
          qU.transaction((e) => {
            e.experiments.enabled = !e.experiments.enabled;
          });
      });
    },
    _initGlobalVars: function () {
      (globalThis.$eventBus = QU),
        (globalThis.$quickReplies = YU),
        (ZU.is.development || ZU.is.beta) &&
          ((globalThis.model = qU.model),
          (globalThis.transaction = qU.transaction),
          (globalThis.setState = this.setState),
          (globalThis.$jszip = KU),
          this.defineCommit());
    },
    setState: function (e) {
      const t = XU.cloneDeep(e);
      qU.replaceState.dispatch(t);
    },
    defineCommit: function () {
      Object.defineProperty(globalThis, "commit", {
        get: () => (this.setState(qU.state), null),
      });
    },
  };
  const { $storyAssist: JU, $ui: eH } = app,
    tH = {
      root: { ...eH.column, ...eH.grow, ...eH.relative(), minHeight: 0 },
      description: { ...eH.text.bleak },
    };
  JU.MentionsContentMediator = class extends eH.Component {
    render() {
      return Glamor.createElement(
        "div",
        { css: tH.root },
        this.renderDescription(),
        Glamor.createElement(eH.Spacer, { height: "g1h" }),
        Glamor.createElement(JU.MentionsSearchMediator, null),
        Glamor.createElement(eH.Spacer, { height: "g3" }),
        Glamor.createElement(JU.MentionsListMediator, null),
        Glamor.createElement(JU.MentionsPreviewMediator, null)
      );
    }
    renderDescription() {
      return Glamor.createElement(
        "div",
        { css: tH.description },
        "Tag up to 30 people in your story. Tagged accounts will receive a notification. Story viewers won‚Äôt see whom you tagged."
      );
    }
  };
  const { $storyAssist: rH, $store: nH, $ui: oH } = app,
    aH = {
      root: { ...oH.column, ...oH.grow, overflow: "hidden" },
      label: { ...oH.text.label, marginBottom: oH.space.g1 },
      description: { ...oH.text.bleak },
      userList: { ...oH.grow, overflow: "auto", paddingBottom: oH.space.g1 },
      user: { ...oH.transition.slow },
      userNew: { transform: "translateY(-5px)", opacity: 0 },
      userDelay: { transitionDelay: "100ms", transitionDuration: "600ms" },
    };
  (rH.MentionsListMediator = nH.connect((e) => ({
    selectedUsers: e.storyAssist.mentions.selectedUsers,
    limitReached: rH.proxy.isMentionsLimitReached(),
  }))(
    class extends oH.Component {
      constructor(e) {
        super(e),
          (this.userList = oH.createRef()),
          (this.state = { mounted: !1 });
      }
      getSnapshotBeforeUpdate(e) {
        const t = e,
          r = this.props;
        if (
          t.selectedUsers.map((e) => e.id).join("-") !==
          r.selectedUsers.map((e) => e.id).join("-")
        )
          for (const e of this.userList.current.children) oH.flip.add(e);
        return null;
      }
      componentDidUpdate() {
        oH.flip.run();
      }
      componentDidMount() {
        this.setTimeout(() => {
          this.setState({ mounted: !0 });
        });
      }
      render() {
        return Glamor.createElement(
          "div",
          { css: aH.root },
          this.renderLabel(),
          this.renderUserList()
        );
      }
      renderLabel() {
        const e = this.props.selectedUsers.length;
        return 0 === e
          ? null
          : Glamor.createElement(
              "div",
              { css: aH.label },
              e,
              " ",
              1 === e ? "user" : "users",
              " tagged",
              " ",
              this.props.limitReached &&
                Glamor.createElement(React.Fragment, null, "(limit reached)")
            );
      }
      renderUserList() {
        return Glamor.createElement(
          "div",
          { css: aH.userList, ref: this.userList },
          this.props.selectedUsers.map((e) =>
            Glamor.createElement(rH.MentionsListMediator.User, {
              key: e.id,
              user: e,
              animateNew: this.state.mounted,
            })
          )
        );
      }
    }
  )),
    (rH.MentionsListMediator.User = class extends oH.Component {
      constructor(e) {
        super(e),
          (this.onRemoveClick = ({ user: e }) => {
            nH.transaction((t) => {
              t.storyAssist.mentions.selectedUsers =
                t.storyAssist.mentions.selectedUsers.filter(
                  (t) => t.id !== e.id
                );
            });
          }),
          (this.state = { new: !0, delay: !0 });
      }
      componentDidMount() {
        this.setTimeout(() => {
          this.setState({ new: !1 });
        }),
          this.setTimeout(() => {
            this.setState({ delay: !1 });
          }, 1e3);
      }
      render() {
        return Glamor.createElement(rH.MentionsUserMediator, {
          style: [
            aH.user,
            this.state.new && this.props.animateNew && aH.userNew,
            this.state.delay && aH.userDelay,
          ],
          user: this.props.user,
          onRemoveClick: this.onRemoveClick,
        });
      }
    });
  const { $storyAssist: iH, $store: sH, $ui: lH } = app,
    cH = {
      root: {
        userSelect: "none",
        ...lH.absolute(". 0 g3 0"),
        ...lH.transition.fast,
      },
      rootInvisible: { opacity: 0, transform: "translateY(5px)" },
      text: { ...lH.text.bleak },
      imageContainer: { ...lH.relative() },
      image: {
        width: 221,
        height: 431,
        marginLeft: 22,
        borderRadius: 12,
        border: lH.border.dark,
        "html.theme-night &": { border: "none" },
      },
      imageDay: { "html.theme-night &": { display: "none" } },
      imageNight: { "html.theme-day &": { display: "none" } },
      header: {
        ...lH.absolute("7 . . 52"),
        ...lH.row,
        ...lH.alignItems.center,
      },
      avatar: {
        width: 20,
        height: 20,
        borderRadius: "50%",
        backgroundSize: "cover",
        backgroundPosition: "center",
        marginRight: 8,
      },
      username: {
        width: 72,
        fontSize: 12,
        fontWeight: 600,
        ...lH.text.ellipsis,
      },
      threadAvatar: {
        width: 17,
        height: 17,
        borderRadius: "50%",
        backgroundSize: "cover",
        backgroundPosition: "center",
        ...lH.absolute(". . 36 31"),
      },
      cover: {
        width: 96,
        height: 125,
        borderRadius: "12px 12px 0 0",
        backgroundSize: "cover",
        backgroundPosition: "center",
        ...lH.absolute(". . 62 65"),
      },
    },
    uH = "story-assist-mentions-preview-mendiator.preview-day",
    dH = "story-assist-mentions-preview-mendiator.preview-night";
  lH.Image.registerImages({
    [uH]: "ui-igswiss/story-assist-mentions-preview-day.png:440:862",
    [dH]: "ui-igswiss/story-assist-mentions-preview-night.png:440:862",
  }),
    (iH.MentionsPreviewMediator = sH.connect((e) => ({
      cover: e.storyAssist.coverUrl,
      avatar: e.auth.avatarUrl,
      username: e.auth.username,
      hasSelectedUsers: e.storyAssist.mentions.selectedUsers.length > 0,
    }))(
      class extends lH.Component {
        render() {
          return Glamor.createElement(
            "div",
            { css: [cH.root, this.props.hasSelectedUsers && cH.rootInvisible] },
            Glamor.createElement(
              "div",
              { css: [lH.row, lH.alignItems.center] },
              Glamor.createElement(lH.InfoCircle, {
                color: lH.color.iconActionable,
              }),
              Glamor.createElement(lH.Spacer, { width: "g1" }),
              Glamor.createElement(
                "div",
                { css: cH.text },
                "Tagged people will receive a DM message like this one:"
              )
            ),
            Glamor.createElement(lH.Spacer, { height: "g2" }),
            Glamor.createElement(
              "div",
              { css: cH.imageContainer },
              Glamor.createElement(lH.Image, {
                style: [cH.image, cH.imageDay],
                src: uH,
              }),
              Glamor.createElement(lH.Image, {
                style: [cH.image, cH.imageNight],
                src: dH,
              }),
              Glamor.createElement(
                "div",
                { css: cH.header },
                Glamor.createElement("div", {
                  css: cH.avatar,
                  style: { backgroundImage: `url('${this.props.avatar}')` },
                  "cdn-proxy-image": "",
                }),
                Glamor.createElement(
                  "div",
                  { css: cH.username },
                  this.props.username
                )
              ),
              Glamor.createElement("div", {
                css: cH.threadAvatar,
                style: { backgroundImage: `url('${this.props.avatar}')` },
                "cdn-proxy-image": "",
              }),
              Glamor.createElement("div", {
                css: cH.cover,
                style: { backgroundImage: `url('${this.props.cover}')` },
              })
            )
          );
        }
      }
    ));
  const { $storyAssist: hH, $store: pH, $bus: mH, $ui: gH } = app,
    fH = {
      root: { ...gH.relative(), zIndex: 1 },
      dropdown: {
        ...gH.absolute(),
        ...gH.transition.fast,
        ...gH.shadow.sh6,
        ...gH.borderRadius.r4,
        top: "100%",
        left: 0,
        right: 0,
        maxHeight: 286,
        marginTop: gH.space.g1,
        paddingTop: gH.space.g1,
        paddingBottom: gH.space.g1,
        background: gH.color.bgLight3,
        overflow: "auto",
      },
      dropdownHidden: {
        opacity: 0,
        transform: "translateY(-5px)",
        pointerEvents: "none",
      },
      dropdownNoAnimation: { transition: "none" },
      notFoundMessage: {
        ...gH.row,
        ...gH.alignItems.center,
        ...gH.justifyContent.center,
        ...gH.text.bleak,
        height: 60,
      },
    };
  hH.MentionsSearchMediator = pH.connect((e) => ({
    query: e.storyAssist.mentions.query,
    foundUsers: e.storyAssist.mentions.foundUsers,
    limitReached: hH.proxy.isMentionsLimitReached(),
  }))(
    class extends gH.Component {
      constructor(e) {
        super(e),
          (this.onInput = (e) => {
            if (
              (pH.transaction((t) => {
                t.storyAssist.mentions.query = e;
              }),
              this.isEmpty(e))
            )
              return void this.setState({ searching: !1, showDropdown: !1 });
            const t = this.onInput;
            clearTimeout(t.timeoutId),
              (this.dropdown.current.scrollTop = 0),
              this.setState({
                searching: !0,
                activeIndex: 0,
                showDropdown: !1,
              });
            const r = this.setTimeout(async () => {
              const n = await mH.send("ig-api.search-profiles", e);
              n.result &&
                r === t.timeoutId &&
                (this.setState({ searching: !1, showDropdown: !0 }),
                pH.transaction((e) => {
                  const t = e.storyAssist.mentions,
                    r = t.selectedUsers.map((e) => e.id);
                  t.foundUsers = n.result
                    .map((e) => ({
                      id: e.id,
                      username: e.username,
                      fullName: e.fullName,
                      avatar: e.avatar,
                    }))
                    .filter((e) => !r.includes(e.id))
                    .sort((e, r) =>
                      e.username === t.query
                        ? -1
                        : r.username === t.query
                        ? 1
                        : 0
                    );
                }));
            }, 300);
            t.timeoutId = r;
          }),
          (this.onKeyDown = (e) => {
            if ("Escape" !== e.key)
              if ("Enter" !== e.key) {
                if ("ArrowUp" === e.key || "ArrowDown" === e.key) {
                  if ((e.preventDefault(), this.state.searching)) return;
                  const t = "ArrowDown" === e.key;
                  let r;
                  const n = this.props.foundUsers.length - 1;
                  t
                    ? ((r = this.state.activeIndex + 1), r > n && (r = n))
                    : ((r = this.state.activeIndex - 1), r < 0 && (r = 0)),
                    this.setState({ activeIndex: r });
                  const o = this.dropdown.current,
                    a = o.children[r],
                    i = o.scrollTop,
                    s = o.offsetHeight,
                    l = a.offsetTop,
                    c = a.offsetHeight,
                    u = 8;
                  l - u < i
                    ? (o.scrollTop = l - u)
                    : l + c - u > i + s && (o.scrollTop = l + c - s + u);
                }
              } else {
                if (!this.state.showDropdown) return;
                const e = this.props.foundUsers[this.state.activeIndex];
                this.selectUser(e);
              }
            else this.getInput().blur();
          }),
          (this.onFocus = () => {
            this.isEmpty(this.props.query) ||
              this.setState({ showDropdown: !0 });
          }),
          (this.onBlur = () => {
            this.preventBlur
              ? (this.preventBlur = !1)
              : this.setState({ showDropdown: !1 });
          }),
          (this.onClearClick = () => {
            this.setState({ showDropdown: !1 }),
              pH.transaction((e) => {
                e.storyAssist.mentions.query = "";
              });
          }),
          (this.onDropdownMouseDown = () => {
            this.preventBlur = !0;
          }),
          (this.onUserClick = ({ user: e }) => {
            this.selectUser(e);
          }),
          (this.input = gH.createRef()),
          (this.dropdown = gH.createRef()),
          (this.preventBlur = !1),
          (this.state = {
            searching: !1,
            activeIndex: 0,
            showDropdown: !1,
            noDropdownAnimation: !1,
          });
      }
      render() {
        return Glamor.createElement(
          "div",
          { css: fH.root },
          this.renderInput(),
          this.renderDropdown()
        );
      }
      renderInput() {
        const e = this.props.query
            ? { name: "igswiss.close", onClick: this.onClearClick }
            : { name: "igswiss.search" },
          t = this.state.searching && {
            value: 35,
            spinning: !0,
            thickness: 1.5,
            background: gH.color.iconPassive,
          };
        return Glamor.createElement(gH.Input, {
          ref: this.input,
          disabled: this.props.limitReached,
          spellCheck: !1,
          placeholder: "search user",
          value: this.props.query,
          onInput: this.onInput,
          onKeyDown: this.onKeyDown,
          onFocus: this.onFocus,
          onBlur: this.onBlur,
          icon: e,
          progress: t,
        });
      }
      renderDropdown() {
        return Glamor.createElement(
          "div",
          {
            css: [
              fH.dropdown,
              !this.state.showDropdown && fH.dropdownHidden,
              this.state.noDropdownAnimation && fH.dropdownNoAnimation,
            ],
            onMouseDown: this.onDropdownMouseDown,
            ref: this.dropdown,
          },
          0 === this.props.foundUsers.length &&
            Glamor.createElement(
              "div",
              { css: fH.notFoundMessage },
              "NO USERS FOUND"
            ),
          this.props.foundUsers.map((e, t) =>
            Glamor.createElement(hH.MentionsUserMediator, {
              key: e.id,
              user: e,
              active: t === this.state.activeIndex,
              onClick: this.onUserClick,
            })
          )
        );
      }
      isEmpty(e) {
        return 0 === e.trim().length;
      }
      getInput() {
        return this.input.current.input.current;
      }
      selectUser(e) {
        e &&
          (pH.transaction((t) => {
            (t.storyAssist.mentions.query = ""),
              t.storyAssist.mentions.selectedUsers.unshift({
                id: e.id,
                avatar: e.avatar,
                username: e.username,
                fullName: e.fullName,
              });
          }),
          this.getInput().focus(),
          this.setState({ showDropdown: !1 }),
          this.setState({ noDropdownAnimation: !0 }),
          this.setTimeout(() => {
            this.setState({ noDropdownAnimation: !1 });
          }, 300));
      }
    }
  );
  const { $storyAssist: vH, $ui: bH } = app,
    yH = {
      root: {
        ...bH.row,
        ...bH.alignItems.center,
        ...bH.justifyContent.between,
        paddingTop: bH.space.g1,
        paddingBottom: bH.space.g1,
      },
      rootClickable: {
        cursor: "pointer",
        paddingLeft: bH.space.g1h,
        paddingRight: bH.space.g1h,
        "&:hover": { background: bH.color.bgLight1 },
      },
      rootActive: {
        position: "relative",
        background: bH.color.bgLight1,
        "&::before": {
          content: '""',
          ...bH.absolute("0 _ 0 0"),
          width: 3,
          background: bH.color.link,
        },
      },
      main: {
        ...bH.row,
        ...bH.alignItems.center,
        cursor: "pointer",
        minWidth: 0,
      },
      avatar: {
        width: 36,
        height: 36,
        marginRight: bH.space.g1h,
        borderRadius: "50%",
        backgroundSize: "contain",
        backgroundPosition: "center",
        backgroundColor: bH.color.iconPassive,
      },
      body: { minWidth: 0 },
      username: {
        ...bH.text.ellipsis,
        ...bH.text.tooltipTitle,
        color: bH.color.textNormal,
      },
      fullName: {
        ...bH.text.ellipsis,
        ...bH.text.elementNormal,
        color: bH.color.textBleak,
      },
      removeButton: { flexShrink: 0 },
    };
  vH.MentionsUserMediator = class extends bH.Component {
    constructor(...e) {
      var t;
      return (
        (t = super(...e)),
        (this.onClick = (e) => {
          this.props.onClick(this.props);
        }),
        (this.onMainClick = (e) => {
          this.props.onClick ||
            chrome.tabs.create({
              url: `https://instagram.com/${this.props.user.username}`,
              active: !e.metaKey && !e.ctrlKey,
            });
        }),
        (this.onRemoveClick = (e) => {
          this.props.onRemoveClick(this.props);
        }),
        t
      );
    }
    render() {
      return Glamor.createElement(
        "div",
        {
          css: [
            yH.root,
            this.props.style,
            this.props.active && yH.rootActive,
            this.props.onClick && yH.rootClickable,
          ],
          onClick: this.props.onClick ? this.onClick : null,
        },
        Glamor.createElement(
          "div",
          { css: yH.main, onClick: this.onMainClick },
          Glamor.createElement("div", {
            css: yH.avatar,
            style: { backgroundImage: `url('${this.props.user.avatar}')` },
            "cdn-proxy-image": "",
          }),
          Glamor.createElement(
            "div",
            { css: yH.body },
            Glamor.createElement(
              "div",
              { css: yH.username },
              this.props.user.username
            ),
            Glamor.createElement(
              "div",
              { css: yH.fullName },
              this.props.user.fullName
            )
          )
        ),
        this.props.onRemoveClick &&
          Glamor.createElement(bH.SvgIcon, {
            style: yH.removeButton,
            name: "igswiss.close",
            onClick: this.onRemoveClick,
          })
      );
    }
  };
  const {
      $storyAssist: wH,
      $later: CH,
      $store: kH,
      $musicAssist: SH,
      $ui: EH,
    } = app,
    _H = {
      root: {
        ...EH.column,
        ...EH.padding("g2 g2 0 g2"),
        ...EH.relative(),
        width: "100%",
        height: "100%",
      },
      closeButton: { ...EH.absolute("4 4 . .") },
    };
  wH.PanelMediator = kH.connect((e) => ({
    isVideo: e.storyAssist.isVideo,
    selectedTabId: e.storyAssist.selectedTabId,
    mentionCount: e.storyAssist.mentions.selectedUsers.length,
  }))(
    class extends EH.Component {
      render() {
        return Glamor.createElement(
          "div",
          { css: _H.root },
          this.renderTabs(),
          this.renderCloseButton(),
          Glamor.createElement(EH.Spacer, { height: "g2" }),
          this.renderContent()
        );
      }
      renderTabs() {
        const e = [
          { id: "later", label: "POST LATER" },
          this.props.isVideo && { id: "music", label: "ADD MUSIC" },
          this.props.isVideo && {
            id: "mentions",
            label:
              0 === this.props.mentionCount
                ? "TAG PEOPLE"
                : `TAG PEOPLE ‚Ä¢ ${this.props.mentionCount}`,
          },
        ].filter(Boolean);
        return Glamor.createElement(EH.TabBar, {
          tabs: e,
          selectedTabId: this.props.selectedTabId,
          onTabClick: this.onTabClick,
        });
      }
      renderCloseButton() {
        return Glamor.createElement(EH.CloseButton, {
          style: _H.closeButton,
          onClick: this.onCloseClick,
        });
      }
      renderContent() {
        return "later" === this.props.selectedTabId
          ? Glamor.createElement(CH.AssistPanelContent, null)
          : "music" === this.props.selectedTabId
          ? Glamor.createElement(SH.ContentMediator, null)
          : "mentions" === this.props.selectedTabId
          ? Glamor.createElement(wH.MentionsContentMediator, null)
          : null;
      }
      onTabClick(e) {
        kH.transaction((t) => {
          t.storyAssist.selectedTabId = e.id;
        });
      }
      onCloseClick() {
        wH.controller.togglePanel(!1);
      }
    }
  );
  const { $storyAssist: xH, $store: PH, $billing: TH, $ui: IH } = app,
    GH = { root: {}, rootWider: { left: -50, right: -50 } };
  xH.UpsellOverlayMediator = PH.connect((e) => ({
    show: e.storyAssist.showUpsellOverlay,
    widescreen: e.igView.fullscreen,
  }))(
    class extends IH.Component {
      constructor(...e) {
        var t;
        return (
          (t = super(...e)),
          (this.onOverlayClick = () => {
            PH.transaction((e) => {
              e.storyAssist.showUpsellOverlay = !1;
            });
          }),
          t
        );
      }
      render() {
        return Glamor.createElement(TH.UpsellOverlayMediator, {
          style: [GH.root, !this.props.widescreen && GH.rootWider],
          feature: "video-stories",
          show: this.props.show,
          noArt: !0,
          onOverlayClick: this.onOverlayClick,
        });
      }
    }
  );
  const {
    $storyAssist: DH,
    $store: AH,
    $iframeBus: MH,
    $analytics: FH,
    $igFrame: RH,
  } = app;
  DH.controller = {
    init: function () {
      MH.on("story-assist.toggle", this.togglePanel.bind(this)),
        MH.on("story-assist.get-mentions", this._getMentions.bind(this)),
        MH.on("story-assist.has-pro", this._hasPro.bind(this)),
        MH.on("story-assist.show-upsell", this._showUpsell.bind(this)),
        DH.splitter.init(),
        this._notifyPanelToggled(),
        this._toggleStoryAssistPanelWhenNeeded(),
        this._watchStoryCover(),
        this._manageTrial();
    },
    togglePanel: function (e) {
      AH.transaction((t) => {
        t.storyAssist.shown = null != e ? e : !t.storyAssist.shown;
      });
    },
    _hasPro: function () {
      return AH.proxy.hasPro({ feature: "storyAssist" });
    },
    _showUpsell: function () {
      AH.transaction((e) => {
        e.storyAssist.showUpsellOverlay = !0;
      });
    },
    _getMentions: function () {
      return AH.state.storyAssist.mentions.selectedUsers;
    },
    _notifyPanelToggled: function () {
      RH.creationController.observeStateDuringCreation(
        (e) => e.storyAssist.shown,
        (e) => {
          MH.send("story-assist.panel-toggled", e);
        }
      );
    },
    _toggleStoryAssistPanelWhenNeeded: function () {
      MH.on("ig.creation-session-start", ({ isStory: e, isVideo: t }) => {
        e &&
          AH.transaction((e) => {
            (e.sidebar.isOpen = !1),
              (e.storyAssist.shown = !0),
              (e.storyAssist.isVideo = t),
              (e.storyAssist.mentions.query = ""),
              (e.storyAssist.mentions.foundUsers = []),
              (e.storyAssist.mentions.selectedUsers = []),
              t || (e.storyAssist.selectedTabId = "later");
          });
      }),
        MH.on("ig.creation-session-end", () => {
          AH.transaction((e) => {
            e.storyAssist.shown = !1;
          });
        });
    },
    _watchStoryCover: function () {
      MH.on("story-assist.cover-change", (e) => {
        AH.transaction((t) => {
          t.storyAssist.coverUrl = e;
        });
      });
    },
    _manageTrial: function () {
      MH.on("ig.published", (e) => {
        "story-video" === e &&
          (true
            ? FH.controller.sendEvent("user", "pro-paid-usage:story-video")
            : AH.transaction((e) => {
                e.billing.trial.storyAssist += 1;
              }));
      });
    },
  };
  const { $storyAssist: LH, $utils: BH, $ffmpeg: OH, $iframeBus: $H } = app;
  LH.splitter = {
    init: function () {
      $H.on("story-assist.split-story-video", this._splitStoryVideo.bind(this));
    },
    _splitStoryVideo: async function (e) {
      const t = URL.createObjectURL(e),
        r = e.name.split(".").pop();
      await OH.controller.addFile(e.name, t),
        await OH.controller.run(
          [
            `-i ${e.name}`,
            "-c copy",
            "-f segment",
            "-segment_time 55",
            "-reset_timestamps 1",
            `chunk%03d.${r}`,
          ].join(" ")
        );
      const n = [];
      for (let t = 0; ; t++)
        try {
          const o = `chunk${t.toString().padStart(3, 0)}.${r}`,
            a = await OH.controller.readFile(o, e.type);
          await OH.controller.removeFile(o), n.push(a);
        } catch {
          break;
        }
      {
        const { duration: t } = await BH.loadVideoMetadata(n[0]),
          o = `first-chunk.${r}`;
        await OH.controller.run(
          [`-i ${e.name}`, `-t ${t}`, "-c copy", o].join(" ")
        ),
          (n[0] = await OH.controller.readFile(o, e.type)),
          await OH.controller.removeFile(o);
      }
      return await OH.controller.removeFile(e.name), n;
    },
  };
  const { $storyAssist: NH, $store: UH, $constants: HH } = app;
  NH.proxy = {
    isMentionsLimitReached: function () {
      return (
        UH.state.storyAssist.mentions.selectedUsers.length >= HH.ig.maxMentions
      );
    },
  };
  const {
      $inspiration: zH,
      $store: jH,
      $files: WH,
      $later: VH,
      $analytics: qH,
      $ui: ZH,
    } = app,
    YH = {
      post: {
        width: 125,
        height: 125,
        position: "relative",
        backgroundColor: ZH.color.bgLight1,
        overflow: "hidden",
        ...ZH.borderRadius.r4,
        ...ZH.transition.slow,
        "&::after": {
          content: '""',
          position: "absolute",
          inset: 0,
          borderRadius: "inherit",
          border: "1px solid #000",
          pointerEvents: "none",
          opacity: 0.1,
          zIndex: 1,
        },
      },
      preview: {
        cursor: "pointer",
        width: "100%",
        height: "100%",
        backgroundSize: "cover",
        backgroundPosition: "center",
        backgroundRepeat: "no-repeat",
        backgroundColor: ZH.color.bgLight1,
        borderRadius: "inherit",
        position: "relative",
        ...ZH.transition.slow,
        ...ZH.absolute("0 0 0 0"),
      },
      loading: { position: "absolute", inset: 0, ...ZH.transition.fast },
      loadingHidden: { opacity: 0, pointerEvents: "none", zIndex: -1 },
      videoIcon: {
        position: "absolute",
        top: 4,
        right: 4,
        color: "#FFF",
        filter: "drop-shadow(0px 1px 3px rgba(0 0 0 / 30%))",
        pointerEvents: "none",
      },
      actions: {
        ...ZH.row,
        gap: ZH.space.g1,
        position: "absolute",
        right: ZH.space.g1,
        bottom: ZH.space.g1,
        ...ZH.transition.fast,
        ".InspirationPost:not(:hover) &": { opacity: 0 },
      },
      action: {
        ...ZH.row,
        ...ZH.alignItems.center,
        ...ZH.justifyContent.center,
        ...ZH.shadow.sh4,
        ...ZH.clickable,
        width: 26,
        height: 26,
        color: "#3F3F3F",
        background: "#FFF",
        borderRadius: "50%",
      },
    };
  zH.Post = class extends ZH.Component {
    constructor(...e) {
      var t;
      return (
        (t = super(...e)),
        (this.onPreviewClick = async (e) => {
          qH.controller.sendEvent("user", "inspiration:open-click");
          const t = e.ctrlKey || e.metaKey,
            r = await WH.controller.read(this.props.post.fileId);
          chrome.tabs.create({ url: URL.createObjectURL(r), active: !t });
        }),
        (this.onDeleteClick = () => {
          qH.controller.sendEvent("user", "inspiration:delete-click");
          const e = this.props.post.id;
          jH.transaction((t) => {
            t.inspiration.posts = t.inspiration.posts.filter((t) => t.id !== e);
          });
        }),
        (this.onRepostClick = async () => {
          qH.controller.sendEvent("user", "inspiration:repost-click"),
            jH.transaction((e) => (e.sidebar.selectedTabId = "tab-later"));
          const e = this.props.post,
            t = await WH.controller.read(e.fileId),
            r = jH.state.later.selectedUserId,
            n = {
              caption: [
                e.username ? `Original post by @${e.username}` : null,
                e.caption,
              ]
                .filter(Boolean)
                .join("\n---\n"),
              fresh: !0,
            },
            o = await VH.controller.createPost(r, [t], n);
          VH.proxy.updatePost(o, (e) => delete e.fresh),
            jH.transaction((e) => {
              (e.later.selectedUserId = r),
                (e.later.selectedPostId = o),
                (e.later.selectedPillId = null),
                (e.later.showBodyPanel = !0);
            });
        }),
        (this.onDownloadClick = () => {
          qH.controller.sendEvent("user", "inspiration:download-click"),
            zH.controller.downloadPost(this.props.post.id);
        }),
        t
      );
    }
    render() {
      return Glamor.createElement(
        "div",
        { css: YH.post, className: "InspirationPost" },
        this.renderPreview(),
        this.renderLoading(),
        this.renderVideoIcon(),
        this.renderActions()
      );
    }
    renderPreview() {
      return Glamor.createElement(
        WH.Renderer,
        { fileId: this.props.post.previewId },
        (e) =>
          Glamor.createElement("div", {
            css: YH.preview,
            onClick: this.onPreviewClick,
            style: {
              backgroundColor: this.props.post.color,
              backgroundImage: e ? `url("${e}")` : null,
            },
          })
      );
    }
    renderLoading() {
      const e = this.props.post.saving;
      return Glamor.createElement(
        "div",
        { css: [YH.loading, !e && YH.loadingHidden] },
        Glamor.createElement(ZH.LoadingOverlay, {
          size: 30,
          show: !0,
          noText: !0,
        })
      );
    }
    renderVideoIcon() {
      if (!this.props.post.saving && this.props.post.isVideo)
        return Glamor.createElement(ZH.SvgIcon, {
          style: YH.videoIcon,
          name: "video",
        });
    }
    renderActions() {
      if (!this.props.post.saving)
        return Glamor.createElement(
          "div",
          { css: YH.actions },
          Glamor.createElement(
            "div",
            { css: YH.action, onClick: this.onDeleteClick, title: "Delete" },
            Glamor.createElement(ZH.SvgIcon, { name: "close" })
          ),
          Glamor.createElement(
            "div",
            {
              css: YH.action,
              onClick: this.onRepostClick,
              title: "Create Post",
            },
            Glamor.createElement(ZH.SvgIcon, { name: "repost" })
          ),
          Glamor.createElement(
            "div",
            {
              css: YH.action,
              onClick: this.onDownloadClick,
              title: "Download",
            },
            Glamor.createElement(ZH.SvgIcon, { name: "download" })
          )
        );
    }
  };
  const { $inspiration: QH, $store: KH, $analytics: XH, $ui: JH } = app,
    ez = {
      root: {
        ...JH.column,
        ...JH.padding("g2 g3 160 g3"),
        ...JH.relative(),
        minHeight: "100vh",
      },
      title: { ...JH.text.mainTitle, marginBottom: JH.space.g1 },
      description: {
        ...JH.text.bleak,
        lineHeight: "20px",
        marginBottom: JH.space.g2,
      },
      content: { position: "relative", flexGrow: 1 },
      header: {
        ...JH.row,
        ...JH.justifyContent.between,
        marginBottom: JH.space.g1h,
      },
      divider: {
        height: 1,
        width: "100%",
        background: JH.color.borderDark,
        marginBottom: JH.space.g2,
      },
      posts: { ...JH.row, gap: JH.space.g1, flexWrap: "wrap" },
      noPosts: { ...JH.text.bleak },
      loading: { position: "absolute", inset: 0 },
      getAllButtonDisabled: { pointerEvents: "none" },
      getAllLabel: { ...JH.row, ...JH.alignItems.center },
      getAllIconContainer: {
        ...JH.row,
        ...JH.alignItems.center,
        ...JH.justifyContent.center,
        width: 14,
      },
    };
  QH.SidePanel = KH.connect((e) => ({ posts: e.inspiration.posts }))(
    class extends JH.Component {
      constructor(e) {
        super(e),
          (this.onGetAllClick = async () => {
            this.state.downloading ||
              (this.setState({ downloading: !0 }),
              XH.controller.sendEvent("user", "inspiration:download-all-click"),
              await QH.controller.downloadAll(),
              this.unmounted || this.setState({ downloading: !1 }));
          }),
          (this.onClearClick = () => {
            this.state.clearing
              ? (XH.controller.sendEvent("user", "inspiration:clear-click"),
                KH.transaction((e) => (e.inspiration.posts = [])))
              : (this.setState({ clearing: !0 }),
                this.setTimeout(() => this.setState({ clearing: !1 }), 2500));
          }),
          (this.rootRef = JH.createRef()),
          (this.state = { downloading: !1, clearing: !1 });
      }
      get root() {
        return this.rootRef.current;
      }
      getSnapshotBeforeUpdate(e) {
        const t = e,
          r = this.props;
        if (
          t.posts.map((e) => e.id).join("-") !==
          r.posts.map((e) => e.id).join("-")
        ) {
          this.root
            .querySelectorAll(".InspirationPost")
            .forEach((e) => JH.flip.add(e));
        }
        return null;
      }
      componentDidUpdate() {
        JH.flip.run();
      }
      componentWillUnmount() {
        this.unmounted = !0;
      }
      render() {
        return Glamor.createElement(
          "div",
          { css: ez.root, ref: this.rootRef },
          this.renderTitle(),
          this.renderDescription(),
          Glamor.createElement(
            "div",
            { css: ez.content },
            this.renderHeader(),
            this.renderDivider(),
            this.renderPosts(),
            this.renderNoPosts()
          )
        );
      }
      renderTitle() {
        return Glamor.createElement("div", { css: ez.title }, "Inspirations");
      }
      renderDescription() {
        return Glamor.createElement(
          "div",
          { css: ez.description },
          "Pin photos and videos to your library from any page or profile."
        );
      }
      renderHeader() {
        if (0 === this.props.posts.length) return;
        const e = Glamor.createElement(
          "div",
          { css: ez.getAllLabel },
          Glamor.createElement(
            "div",
            { css: ez.getAllIconContainer },
            this.state.downloading
              ? Glamor.createElement(JH.ProgressRing, {
                  spinning: !0,
                  thickness: 1.5,
                  value: 30,
                  size: 14,
                })
              : Glamor.createElement(JH.SvgIcon, { name: "download" })
          ),
          Glamor.createElement(JH.Spacer, { width: "g1" }),
          Glamor.createElement(
            "div",
            null,
            "GET ALL (",
            this.props.posts.length,
            ")"
          )
        );
        return Glamor.createElement(
          "div",
          { css: ez.header },
          Glamor.createElement(JH.LinkButton, {
            style: this.state.downloading && ez.getAllButtonDisabled,
            label: e,
            onClick: this.onGetAllClick,
          }),
          Glamor.createElement(JH.LinkButton, {
            label: this.state.clearing ? "SURE?" : "CLEAR",
            buttonStyle: this.state.clearing && { color: JH.color.error },
            cancel: !0,
            onClick: this.onClearClick,
          })
        );
      }
      renderDivider() {
        return Glamor.createElement("div", { css: ez.divider });
      }
      renderPosts() {
        const e = this.props.posts;
        if (0 !== e.length)
          return Glamor.createElement(
            "div",
            { css: ez.posts },
            e.map((e, t) =>
              Glamor.createElement(QH.Post, { key: e.id, post: e })
            )
          );
      }
      renderNoPosts() {
        if (!(this.props.posts.length > 0))
          return Glamor.createElement(
            "div",
            { css: ez.noPosts },
            "Your pinned photos and videos will appear here."
          );
      }
    }
  );
  const {
    $inspiration: tz,
    $store: rz,
    $files: nz,
    $utils: oz,
    $iframeBus: az,
    $analytics: iz,
    $shortid: sz,
    $jszip: lz,
  } = app;
  tz.controller = {
    init: function () {
      this._dropAllSavingPosts(),
        az.on("inspiration.pin", this._pin.bind(this));
    },
    downloadPost: function (e) {
      chrome.permissions.request({ permissions: ["downloads"] }, async (t) => {
        if (!t) return;
        const r = tz.proxy.getPost(e);
        await this._download(r);
      });
    },
    downloadAll: async function () {
      await new Promise((e) => {
        chrome.permissions.request(
          { permissions: ["downloads"] },
          async (t) => {
            if (!t) return;
            const r = tz.proxy.getPosts();
            if (1 === r.length) return await this._download(r[0]), void e();
            const n = [];
            for (const e of r) {
              const t = await nz.controller.read(e.fileId),
                r = await tz.proxy.getFilename(e, t),
                o = r.split(".").pop(),
                a = r.replace(`.${o}`, ""),
                i = { ext: o, basename: a, blob: t };
              let s = 1;
              for (; n.some((e) => e.basename === i.basename); )
                (i.basename = `${a}-${s}`), (s += 1);
              n.push(i);
            }
            n.map((e) => {
              (e.name = `${e.basename}.${e.ext}`),
                delete e.basename,
                delete e.ext;
            });
            const o = await lz.controller.createZip(n);
            chrome.downloads.download({
              url: URL.createObjectURL(o),
              filename: "inspirations.zip",
            }),
              e();
          }
        );
      });
    },
    _download: async function (e) {
      const t = await nz.controller.read(e.fileId);
      chrome.downloads.download({
        url: URL.createObjectURL(t),
        filename: await tz.proxy.getFilename(e, t),
      });
    },
    _dropAllSavingPosts: function () {
      rz.transaction((e) => {
        e.inspiration.posts = e.inspiration.posts.filter((e) => !e.saving);
      });
    },
    _pin: async function ({ url: e, filename: t, username: r, caption: n }) {
      iz.controller.sendEvent("user", "inspiration:pin-click"),
        rz.transaction((e) => {
          (e.sidebar.selectedTabId = "tab-inspiration"),
            (e.sidebar.isOpen = !0),
            (e.inspiration.posts = e.inspiration.posts.filter(
              (e) => !e.sample
            ));
        }),
        await this._save({ url: e, filename: t, username: r, caption: n });
    },
    _save: async function ({
      url: e,
      filename: t,
      username: r = null,
      caption: n = "",
      sample: o = !1,
      useCdnProxy: a = !0,
    }) {
      const i = sz.generate();
      let s;
      rz.transaction((e) => {
        e.inspiration.posts.unshift({
          id: i,
          color: null,
          fileId: null,
          previewId: null,
          filename: t,
          username: r,
          caption: n,
          saving: !0,
          isVideo: !1,
          ...(o && { sample: !0 }),
        });
      }),
        a && (e = await az.send("cdn-proxy.fetch", e));
      try {
        const t = await fetch(e),
          r = await t.blob(),
          n = oz.file.isVideo(r);
        let o;
        if (n) {
          const e = await oz.extractFrame(r);
          o = await oz.generateSquarePreview(e);
        } else o = await oz.generateSquarePreview(r);
        s = {
          isVideo: n,
          color: o.averageColor,
          fileId: await nz.controller.save(r, "inspiration"),
          previewId: await nz.controller.save(o.blob, "inspiration"),
        };
      } catch (e) {
        return (
          console.error(e),
          void rz.transaction((e) => {
            e.inspiration.posts = e.inspiration.posts.filter((e) => e.id !== i);
          })
        );
      }
      rz.transaction((e) => {
        const t = e.inspiration.posts.find((e) => e.id === i);
        t && (Object.assign(t, s), (t.saving = !1));
      });
    },
  };
  const { $inspiration: cz, $store: uz, $utils: dz } = app;
  cz.proxy = {
    getPosts: function () {
      return uz.state.inspiration.posts;
    },
    getAllPosts: function () {
      const e = uz.state;
      return [e, ...Object.values(e.userStates)]
        .map((e) => e.inspiration.posts)
        .flat();
    },
    getPost: function (e) {
      return uz.state.inspiration.posts.find((t) => t.id === e);
    },
    getFilename: async function (e, t) {
      const r = t.type.split("/")[1];
      if (e.filename) return `${e.filename}.${r}`;
      return `${(await dz.objectUrl.create(t)).split("/").pop()}.${r}`;
    },
  };
  const { $jszip: hz, $utils: pz } = app;
  hz.controller = {
    createZip: async function (e) {
      const t = new (await this._ensureJSZip())();
      for (const r of e) t.file(r.name, r.blob);
      return await t.generateAsync({ type: "blob" });
    },
    _ensureJSZip: async function () {
      if (window.JSZip) return window.JSZip;
      const e = document.createElement("script");
      (e.src = chrome.runtime.getURL("/js/jszip.min.js")),
        document.head.appendChild(e);
      return await pz.waitFor(() => window.JSZip);
    },
  };
  const {
    $dm: mz,
    $store: gz,
    $utils: fz,
    $iframeBus: vz,
    $analytics: bz,
    $env: yz,
    $billing: wz,
    $fusion: Cz,
    $ui: kz,
  } = app;
  mz.SidePanelMediator = gz.connect((e) => ({
    dmOpen: e.sidebar.isOpen && "tab-dm" === e.sidebar.selectedTabId,
    hasDmAdvanced: gz.proxy.hasPro({ feature: "dmAdvanced" }),
    ghostModeEnabled: Boolean(e.dm.ghostModeEnabled),
  }))(
    kz.theme.ThemeAware(
      class extends kz.Component {
        constructor(e) {
          super(e),
            (this._onChange = ({
              filterString: e,
              filterUnread: t,
              filterFlagged: r,
              ghostModeEnabled: n,
            }) => {
              let o;
              gz.transaction((e) => {
                e.dm.ghostModeEnabled !== n &&
                  (n
                    ? bz.controller.sendEvent("user", "dm:ghost-mode-on")
                    : bz.controller.sendEvent("user", "dm:ghost-mode-off")),
                  (e.dm.ghostModeEnabled = n);
              }),
                this.state.filterUnread && r && (t = !1),
                this.state.filterFlagged && t && (r = !1),
                this.setState({
                  filterString: e,
                  filterUnread: t,
                  filterFlagged: r,
                }),
                vz.send("dm.set-filters", { string: e, unread: t, flagged: r }),
                e && this.state.filterString !== e
                  ? (o = "dm:filter-string")
                  : !this.state.filterUnread && t
                  ? (o = "dm:filter-unread")
                  : !this.state.filterFlagged && r && (o = "dm:filter-flagged"),
                clearTimeout(this._sendGaEventTimeout),
                o &&
                  (this._sendGaEventTimeout = setTimeout(() => {
                    bz.controller.sendEvent("user", o);
                  }, 1e3));
            }),
            (this._onUpgradeClick = () => {
              wz.controller.openBilling("dm");
            }),
            (this._onCancelClick = () => {
              this._onChange({
                filterString: "",
                filterUnread: !1,
                filterFlagged: !1,
                ghostModeEnabled: !1,
              });
            }),
            (this._sendGaEventTimeout = null),
            (this.state = {
              filterString: "",
              filterUnread: !1,
              filterFlagged: !1,
              loadIframe: e.dmOpen,
            });
        }
        componentDidUpdate(e) {
          e.dmOpen && !this.props.dmOpen && vz.send("dm.go-to-inbox");
        }
        getSnapshotBeforeUpdate() {
          return (
            !this.state.loadIframe &&
              this.props.dmOpen &&
              this.setState({ loadIframe: !0 }),
            null
          );
        }
        render() {
          const e = fz.iframe.createName("inssist-dm", {
              theme: this.state.theme,
              fusionConfig: Cz.controller.getConfig(),
              isElectron: !!globalThis.electron,
            }),
            t =
              this.state.loadIframe && !1 !== yz.features.iframes
                ? "https://www.instagram.com/direct/inbox/"
                : null;
          return Glamor.createElement(kz.DmSidePanel, {
            iframeAttrs: {
              name: e,
              src: t,
              allow: "geolocation; autoplay; microphone",
              allowFullScreen: "",
            },
            filterString: this.state.filterString,
            filterUnread: this.state.filterUnread,
            filterFlagged: this.state.filterFlagged,
            ghostModeEnabled: this.props.ghostModeEnabled,
            ghostModeTooltip: this._getGhostModeTooltip(),
            showOverlay: this.showOverlay(),
            onChange: this._onChange,
            onUpgradeClick: this._onUpgradeClick,
            onCancelClick: this._onCancelClick,
            upsellOverlay: this._renderUpsellOverlay(),
            upsellOverlayHeaderText: Glamor.createElement(
              React.Fragment,
              null,
              "Ghost Mode is a PRO feature.",
              Glamor.createElement("br", null),
              "Please consider upgrading to support development."
            ),
          });
        }
        _getGhostModeTooltip() {
          return {
            title: "GHOST MODE",
            text: [
              "If enabled, the messages you read won‚Äôt be marked as seen and other users won‚Äôt know that you read their messages.",
            ],
          };
        }
        _renderUpsellOverlay() {
          return null;
        }
        showOverlay() {
          return !1;
        }
      }
    )
  );
  const { $dm: Sz, $iframeBus: Ez } = app;
  Sz.controller = {
    init: function () {
      Sz.ghostModeController.init(), Ez.on("dm.ig-go", this._igGo);
    },
    _igGo: function (e) {
      Ez.send("ig.ajax-go", e);
    },
  };
  const { $dm: _z, $store: xz, $iframeBus: Pz } = app;
  _z.ghostModeController = {
    init: function () {
      this._syncOnChange(),
        Pz.on("dm.is-ghost-mode-enabled", this._isEnabled.bind(this));
    },
    _syncOnChange: function () {
      xz.model.observe(
        (e) => e.dm.ghostModeEnabled,
        (e) => Pz.send("dm.set-ghost-mode-enabled", e)
      );
    },
    _isEnabled: function () {
      return xz.state.dm.ghostModeEnabled;
    },
  };
  const { $theme: Tz, $iframeBus: Iz, $ui: Gz, $utils: Dz } = app;
  Tz.controller = {
    init: function () {
      Iz.on("theme.get-theme", this._getTheme.bind(this)),
        Gz.theme.onThemeChange(this._onThemeChange.bind(this));
    },
    _getTheme: function () {
      return Gz.theme.getTheme();
    },
    _onThemeChange: function (e) {
      Dz.ls.set("theme", e), Iz.send("theme.switch-theme", e);
    },
  };
  const { $quickReplies: Az, $store: Mz, $ui: Fz } = app,
    Rz = {
      root: { ...Fz.column, ...Fz.padding("16 16 16 24"), height: "100%" },
      title: {
        ...Fz.row,
        ...Fz.alignItems.start,
        ...Fz.justifyContent.between,
      },
      info: { maxWidth: 400, marginRight: 16, ...Fz.text.bleak },
      pill: {
        ...Fz.text.elementNormal,
        ...Fz.padding("4 8 4 8"),
        marginTop: 3,
        borderRadius: "4px",
        color: "white",
        backgroundColor: Fz.color.positive,
        whiteSpace: "nowrap",
      },
      closeButton: { "@media(max-width: 1420px)": { display: "none" } },
      content: { height: "calc(100vh - 90px)" },
    };
  Az.PanelMediator = Mz.connect((e) => ({
    content: e.quickReplies.content,
    total: e.quickReplies.total,
  }))(
    class extends Fz.Component {
      constructor(e) {
        super(e),
          (this._onCloseClick = () => {
            Az.controller.hideQuickReplies();
          }),
          (this._onFocus = (e) => {
            this.setState({ focus: !0 });
          }),
          (this._onInput = (e) => {
            const t = Az.controller.fetchQuickReplies(e);
            this.setState({ content: e, total: t.length });
          }),
          (this._onBlur = (...e) => {
            const { content: t, total: r } = Az.controller.updateQuickReplies(
              this.state.content
            );
            this.setState({ content: t, total: r, focus: !1 });
          }),
          (this.state = { focus: !1, content: e.content, total: e.total });
      }
      render() {
        return Glamor.createElement(
          "div",
          { css: Rz.root },
          Glamor.createElement(
            "div",
            { css: Rz.title },
            Glamor.createElement(
              "div",
              { css: Rz.info },
              "Separate quick replies with ",
              Glamor.createElement("b", null, "2 blank lines"),
              ". Use ",
              Glamor.createElement("b", null, "@name"),
              " ",
              "in quick replies. Send quick replies in chat by typing",
              " ",
              Glamor.createElement("b", null, "/shortcut"),
              "."
            ),
            Glamor.createElement(
              "div",
              { css: [Fz.row, Fz.alignItems.start] },
              Glamor.createElement(
                "div",
                { css: Rz.pill },
                "quick replies: ",
                this.state.total
              ),
              Glamor.createElement(Fz.CloseButton, {
                style: [Fz.relative("-8 -8 . . 2"), Rz.closeButton],
                onClick: this._onCloseClick,
              })
            )
          ),
          Glamor.createElement(Fz.Spacer, { height: 12 }),
          Glamor.createElement(Fz.Input, {
            inputStyle: Rz.content,
            value: this.value,
            lines: 3,
            spellCheck: !1,
            onFocus: this._onFocus,
            onInput: this._onInput,
            onBlur: this._onBlur,
          })
        );
      }
      get value() {
        return this.state.focus
          ? this.state.content
          : Az.controller.prefixReplies();
      }
    }
  );
  const { $quickReplies: Lz, $store: Bz, $iframeBus: Oz, $analytics: $z } = app;
  function Nz() {
    Bz.transaction((e) => {
      e.quickReplies.shown = !0;
    });
  }
  function Uz() {
    Bz.transaction((e) => {
      e.quickReplies.shown = !1;
    });
  }
  function Hz() {
    Bz.transaction((e) => {
      e.quickReplies.shown = !e.quickReplies.shown;
    });
  }
  function zz(e) {
    var t;
    return (e =
      null !== (t = e) && void 0 !== t ? t : Bz.state.quickReplies.content)
      .replaceAll(/^ *\n/gm, "\n")
      .replaceAll(/^\//gm, "\n\n\n/")
      .split("\n\n\n")
      .map((e) => {
        for (; e.startsWith("\n"); ) e = e.substr(1);
        for (; e.endsWith("\n"); ) e = e.substr(0, e.length - 1);
        let t = null;
        if (e.startsWith("/")) {
          const r = e.split("\n");
          (t = r[0].substr(1)), r.shift(), (e = r.join("\n"));
        }
        return { shortcut: t, content: e };
      })
      .filter((e) => e.content.replaceAll(/\n/gm, "").length > 0);
  }
  Lz.controller = {
    init: function () {
      Oz.on("quick-replies.show", Nz),
        Oz.on("quick-replies.hide", Uz),
        Oz.on("quick-replies.toggle", Hz),
        Oz.on("quick-replies.fetch", zz);
    },
    showQuickReplies: Nz,
    hideQuickReplies: Uz,
    toggleQuickReplies: Hz,
    fetchQuickReplies: zz,
    updateQuickReplies: function (e) {
      const t = this.fetchQuickReplies(e);
      e = t
        .map((e) => (e.shortcut ? `/${e.shortcut}\n${e.content}` : e.content))
        .join("\n\n\n");
      const r = t.length;
      return (
        Bz.transaction((t) => {
          (t.quickReplies.content = e), (t.quickReplies.total = r);
        }),
        Oz.send("quick-replies.update", t),
        $z.controller.sendEvent(
          "user",
          "quick-replies:update",
          t.length > 10 ? "10+" : t.length
        ),
        { content: e, total: r }
      );
    },
    prefixReplies: function (e = "‚Ü™") {
      return zz()
        .map((t) =>
          t.shortcut ? `${e} /${t.shortcut}\n${t.content}` : `${e} ${t.content}`
        )
        .join("\n\n\n");
    },
  };
  const { $whatsNew: jz, $store: Wz, $env: Vz, $ui: qz } = app,
    Zz = {
      placeholder: { width: "100%", height: 300 },
      iframeWrapper: { ...qz.relative() },
      iframeSubWrapper: { ...qz.absolute(". -16 . -124") },
      iframe: { border: "none" },
    };
  jz.AddThisPanel = Wz.connect((e) => ({
    open: e.sidebar.isOpen && "logo" === e.sidebar.selectedTabId,
  }))(
    qz.theme.ThemeAware(
      class extends qz.Component {
        get src() {
          return !1 === Vz.features.iframes
            ? null
            : `https://inssist.com/share?theme=${this.state.theme}`;
        }
        render() {
          return this.props.open
            ? Glamor.createElement(
                "div",
                { css: Zz.iframeWrapper },
                Glamor.createElement(
                  "div",
                  { css: Zz.iframeSubWrapper },
                  Glamor.createElement("iframe", {
                    css: Zz.iframe,
                    src: this.src,
                    width: "100%",
                    height: "300px",
                  })
                )
              )
            : Glamor.createElement("div", { css: Zz.placeholder });
        }
      }
    )
  );
  const {
      $whatsNew: Yz,
      $store: Qz,
      $bus: Kz,
      $analytics: Xz,
      $billing: Jz,
      $ui: ej,
      $constants: tj,
    } = app,
    rj = {
      root: { ...ej.padding("g2 g2 0 23") },
      card: {
        marginBottom: 24,
        marginRight: 10,
        "& a": { color: ej.color.link, fontWeight: "inherit" },
      },
      rateUs: {
        marginLeft: -1,
        marginBottom: 24,
        marginRight: 8,
        "& a": { color: "inherit !important", fontWeight: 700 },
      },
      contacts: { ...ej.text.bleak },
      iframeWrapper: { ...ej.relative() },
      iframeSubWrapper: { ...ej.absolute(". -16 . -124") },
      iframe: { border: "none" },
    };
  ej.Image.registerImages({
    "whats-new.fire": "ui-igswiss/billing-fire.png:50:50",
  }),
    (Yz.Panel = Qz.connect((e) => ({
      hasPro: true,
      hasProPaid: true,
      hasProPromocode: Qz.proxy.hasProPromocode(),
      whatsNew: e.whatsNew,
      showRateUs: !e.rateUs.acknowledged,
      isAfterTheEndUser: e.isAfterTheEndUser,
    }))(
      class extends ej.Component {
        constructor(e) {
          super(e),
            (this._onRateUsClick = () => {
              Xz.controller.sendEvent("user", "rate-us-mini:yes-click"),
                Qz.acknowledge.dispatch("rateUs"),
                chrome.tabs.create({ url: tj.common.reviewsUrl });
            }),
            (this._onUpgradeClick = () => {
              Xz.controller.sendEvent("user", "whats-new:upgrade-click"),
                Jz.controller.openBilling();
            }),
            (this._onGoToFaq = () => {
              Xz.controller.sendEvent("user", "whats-new:faq-click"),
                chrome.tabs.create({ url: tj.common.faqUrl });
            }),
            (this._onSendReportClick = () => {
              this.setState({ isReportSent: !0 }),
                Kz.send("overseer.send-report", { key: "user" });
            }),
            (this._onTheEndMoreInfoClick = () => {
              Qz.transaction((e) => {
                e.acknowledged.theEnd = -1;
              });
            }),
            (this._whatsNewItems = Qz.getWhatsNewItems()),
            (this.state = { isReportSent: !1 });
        }
        render() {
          return Glamor.createElement(
            "div",
            { css: rj.root },
            this._renderHeader(),
            Glamor.createElement(ej.Spacer, { height: "g1" }),
            this._renderProPanel(),
            Glamor.createElement(ej.Spacer, { height: "g3" }),
            this._renderWhatsNew(),
            this._renderRateUs(),
            this._renderContacts()
          );
        }
        _renderHeader() {
          return Glamor.createElement(
            "div",
            { css: [ej.row, ej.alignItems.center, ej.text.mainTitle] },
            "What's New"
          );
        }
        _renderProPanel() {
          const { hasProPaid: e, hasProPromocode: t } = this.props;
          let r, n;
          return (
            e || t
              ? ((n = !1),
                (r =
                  "\n        Inssist PRO is active. All advanced features activated:\n        Scheduling, Tag Collections, Custom Covers and more."))
              : ((n = !0),
                (r = Glamor.createElement(
                  React.Fragment,
                  null,
                  "All basic features are free forever. Scheduling,",
                  Glamor.createElement("br", null),
                  "Tag Collections and more features are available on PRO:"
                ))),
            Glamor.createElement(
              "div",
              { css: ej.row },
              Glamor.createElement(
                "div",
                null,
                Glamor.createElement(ej.Image, {
                  src: "whats-new.fire",
                  width: 19,
                  height: 19,
                })
              ),
              Glamor.createElement(ej.Spacer, { width: "g1" }),
              Glamor.createElement(
                "div",
                { css: ej.column },
                Glamor.createElement(
                  "div",
                  { css: [ej.row, ej.text.bleak] },
                  r
                ),
                Glamor.createElement(ej.Spacer, { height: "g1" }),
                Glamor.createElement(
                  "div",
                  { css: ej.row },
                  n &&
                    Glamor.createElement(
                      React.Fragment,
                      null,
                      Glamor.createElement(ej.LinkButton, {
                        label: "UPGRADE TO PRO",
                        onClick: this._onUpgradeClick,
                      }),
                      Glamor.createElement(ej.Spacer, { width: "g3" })
                    ),
                  Glamor.createElement(ej.LinkButton, {
                    label: "HELP & F.A.Q.",
                    onClick: this._onGoToFaq,
                  })
                )
              )
            )
          );
        }
        _renderWhatsNew() {
          return Glamor.createElement(
            "div",
            { css: rj.content },
            this.props.whatsNew.map((e) => {
              const t = this._whatsNewItems.find((t) => t.id === e.id);
              return t
                ? "announcement" === t.id && this.props.isAfterTheEndUser
                  ? null
                  : Glamor.createElement(ej.Card, {
                      key: e.id,
                      header: t.header,
                      marker: !e.acknowledged && ej.color.link,
                      subheader: t.subheader,
                      hexImage: t.hexImage,
                      content: this._renderWhatsNewItemContent(t),
                      style: rj.card,
                    })
                : null;
            })
          );
        }
        _renderWhatsNewItemContent(e) {
          return "v23.6.0" === e.id
            ? [
                Glamor.createElement(
                  React.Fragment,
                  null,
                  "This release brings many bug fixes and under the hood improvements."
                ),
                Glamor.createElement(
                  React.Fragment,
                  null,
                  "Support for Brave browser has been restored and a lot of work done to prepare for migration over to the new Google Chrome Extension Manifest v3."
                ),
                Glamor.createElement(
                  React.Fragment,
                  null,
                  "We are also building a new ‚ÄúDelayed Posting‚Äù feature that will allow you to plan your Posts, Reels and Stories in advance. INSSIST will post them automatically, no Facebook Page connection required."
                ),
                Glamor.createElement(
                  React.Fragment,
                  null,
                  "We also plan to gradually migrate and embed INSSIST interface directly into Instagram web page so that the app functions seamlessly."
                ),
                Glamor.createElement(
                  React.Fragment,
                  null,
                  "Happy Instagramming!"
                ),
              ]
            : "macos" === e.id
            ? [
                Glamor.createElement(
                  React.Fragment,
                  null,
                  "This release brings support for the experimental standalone MacOS version. You can download it",
                  " ",
                  Glamor.createElement(
                    "a",
                    { href: "https://inssist.com", target: "_blank" },
                    "from our website"
                  ),
                  "."
                ),
                Glamor.createElement(
                  React.Fragment,
                  null,
                  "Reach out to us at",
                  " ",
                  Glamor.createElement(
                    "a",
                    { href: "mailto:inssist@slashed.io" },
                    "inssist@slashed.io"
                  ),
                  " and let us know what you think about the standalone build or if you find any bugs."
                ),
              ]
            : "announcement" === e.id
            ? Glamor.createElement(
                "div",
                null,
                "Following a complaint from Facebook Inc., we are removing features that can be potentially exploited to violate Instagram and Facebook Terms of Service: Analytics & Insights, Downloading, Reposting."
              )
            : "posting-from-website" === e.id
            ? [
                Glamor.createElement(
                  React.Fragment,
                  null,
                  "Inssist now adds a [+] button to post to Instagram directly from the",
                  " ",
                  Glamor.createElement(
                    "a",
                    { href: "https://instagram.com", target: "_blank" },
                    "instagram.com"
                  ),
                  " ",
                  "website."
                ),
                Glamor.createElement(
                  React.Fragment,
                  null,
                  "Inssist will also auto-retry Reels posting if it fails on Instagram Server which improves posting stability."
                ),
              ]
            : e.content;
        }
        _renderRateUs() {
          return this.props.showRateUs
            ? Glamor.createElement(
                "div",
                { css: rj.rateUs },
                Glamor.createElement(ej.RateUsMini, {
                  image: "rate-us-heart",
                  content: Glamor.createElement(
                    "div",
                    null,
                    "Something is broken? Reach us at",
                    " ",
                    Glamor.createElement(
                      "a",
                      { href: "mailto:inssist@slashedio.io" },
                      "inssist@slashed.io"
                    ),
                    Glamor.createElement(ej.Spacer, { height: "g1" }),
                    this.state.isReportSent
                      ? Glamor.createElement(
                          React.Fragment,
                          null,
                          "Thank you! The bug report has been sent."
                        )
                      : Glamor.createElement(
                          React.Fragment,
                          null,
                          "Or send us a bug report:",
                          Glamor.createElement(
                            "div",
                            { css: ej.row },
                            Glamor.createElement(ej.LinkButton, {
                              small: !0,
                              label: "SEND BUG REPORT",
                              onClick: this._onSendReportClick,
                            }),
                            Glamor.createElement(ej.Spacer, { width: "g1" }),
                            Glamor.createElement(ej.InfoCircle, {
                              tooltip: {
                                text: Glamor.createElement(
                                  React.Fragment,
                                  null,
                                  "Clicking this button will send an internal technical data on this connectivity error to the development team for research. This data is not shared with 3rd parties."
                                ),
                              },
                            })
                          )
                        )
                  ),
                  onRateUsClick: this._onRateUsClick,
                })
              )
            : null;
        }
        _renderContacts() {
          return Glamor.createElement(
            "div",
            { css: rj.contacts },
            "Contact details:",
            " ",
            Glamor.createElement(
              "a",
              { href: "mailto:inssist@slashed.io" },
              "inssist@slashed.io"
            ),
            Glamor.createElement(ej.Spacer, { height: 24 }),
            "Share a word about us:",
            Glamor.createElement(ej.Spacer, { height: 4 }),
            Glamor.createElement(Yz.AddThisPanel, null)
          );
        }
      }
    ));
  const { $whatsNew: nj, $store: oj } = app;
  nj.controller = {
    acknowledgeAll: function () {
      oj.transaction((e) => {
        for (const t of e.whatsNew) t.acknowledged = !0;
      });
    },
  };
  const { $welcome: aj, $store: ij, $ui: sj } = app;
  aj.Screen = class extends sj.Component {
    constructor(...e) {
      var t;
      return (
        (t = super(...e)),
        (this._onLetsGoClick = () => {
          ij.transaction((e) => {
            e.welcome.shown = !1;
          });
        }),
        t
      );
    }
    render() {
      return Glamor.createElement(sj.Welcome, {
        title: "Instagram Assistant",
        description: Glamor.createElement(
          React.Fragment,
          null,
          "Inssist is your personal Instagram Assistant and is the best way to use ",
          Glamor.createElement("b", null, "Instagram on Desktop"),
          ", ads free:"
        ),
        listItems: [
          Glamor.createElement(
            React.Fragment,
            null,
            "Post photos, videos, stories, reels. Send DMs."
          ),
          Glamor.createElement(
            React.Fragment,
            null,
            "Schedule posts, videos and carousels to be published automatically. Calendar and time slots included."
          ),
          Glamor.createElement(
            React.Fragment,
            null,
            "Get relevant hashtag suggestions and manage hashtag collections. Select custom video covers."
          ),
        ],
        buttonLabel: "OK, LET'S GO",
        onButtonClick: this._onLetsGoClick,
        disclaimer: Glamor.createElement(
          React.Fragment,
          null,
          "Disclaimer: this app is not endorsed or certified by Instagram‚Ñ¢. All Instagram‚Ñ¢ logos and trademarks displayed on this app are property of third parties. Inssist is distributed AS IS. By using Inssist you agree to the Inssist terms of service found here:",
          " ",
          Glamor.createElement(
            "a",
            { href: "https://inssist.com/terms" },
            "https://inssist.com/terms"
          ),
          ".",
          Glamor.createElement("br", null),
          Glamor.createElement("br", null),
          Glamor.createElement(
            "b",
            null,
            "We do not use or sell your data. Inssist is ads free."
          )
        ),
      });
    }
  };
  const { $cdnProxy: lj, $utils: cj, $iframeBus: uj } = app;
  lj.controller = {
    init: function () {
      (this._config = { domains: ["cdninstagram.com", "fbcdn.net"] }),
        (this._cache = {}),
        (this._igReadyPromise = cj.createResolvablePromise()),
        this._handleIgReady(),
        this._patchFetch(),
        this._watchAndPatchElements();
    },
    _handleIgReady: function () {
      uj.on("ig.ready", () => {
        this._igReadyPromise.resolve(), this._resetUrls();
      });
    },
    _resetUrls: function () {
      cj.$$("[cdn-proxy-image]").forEach((e) => {
        const t = e.getAttribute("cdn-proxy-image");
        t &&
          ("IMG" === e.tagName
            ? e.setAttribute("src", t)
            : (e.style.backgroundImage = `url("${t}")`),
          e.setAttribute("cdn-proxy-image", ""));
      });
    },
    _patchFetch: function () {
      const e = window.fetch;
      window.fetch = async (...t) => {
        const r = t[0];
        return (
          this._isCdnUrl(r) && (t[0] = await this._fetchViaIframe(r)),
          e.call(window, ...t)
        );
      };
    },
    _watchAndPatchElements: function () {
      const e = Symbol("patching");
      cj.onDocMutations(() => {
        cj.$$("[cdn-proxy-image]").forEach(async (t) => {
          if (t[e]) return;
          let r;
          var n, o;
          "IMG" === t.tagName
            ? (r = t.getAttribute("src"))
            : (r =
                null === (n = t.style.backgroundImage) ||
                void 0 === n ||
                null === (o = n.split('"')[1]) ||
                void 0 === o
                  ? void 0
                  : o.split('"')[0]);
          r &&
            "null" !== r &&
            (r.startsWith("blob:") ||
              ((t[e] = !0),
              (this._isCdnUrl(r) &&
                ((r = await this._fetchViaIframe(r)),
                !document.body.contains(t))) ||
                (t.setAttribute("cdn-proxy-image", r),
                "IMG" === t.tagName
                  ? t.setAttribute("src", r)
                  : (t.style.backgroundImage = `url("${r}")`),
                delete t[e])));
        });
      }, !0);
    },
    _fetchViaIframe: async function (e) {
      if ((await this._igReadyPromise, this._cache[e]))
        try {
          await fetch(this._cache[e]);
        } catch (t) {
          delete this._cache[e];
        }
      if (!this._cache[e]) {
        const t = await uj.send("cdn-proxy.fetch", e);
        this._cache[e] = t;
      }
      return this._cache[e];
    },
    _isCdnUrl: function (e) {
      return !!e && this._config.domains.some((t) => e.includes(t));
    },
  };
  const { $popup: dj } = app;
  dj.icons = [];
  const { $popup: hj } = app;
  hj.images = {
    "rate-us-heart": "ui-igswiss/rate-us-heart.png:40:40",
    "hex-bug": "ui-igswiss/hex-bug.png:53.47:60.01",
    "hex-zen": "ui-igswiss/hex-zen.png:53.47:60.01",
    "hex-story": "ui-igswiss/hex-story.png:53.47:60.01",
    "hex-carousel": "ui-igswiss/hex-carousel.png:53.47:60.01",
    "hex-multiaccount": "ui-igswiss/hex-multiaccount.png:53.47:60.01",
    "hex-analytics": "ui-igswiss/hex-analytics.png:53.47:60.01",
    "hex-monitor": "ui-igswiss/hex-monitor.png:53.47:60.01",
    "hex-tag": "ui-igswiss/hex-tag.png:53.47:60.01",
    "hex-mentions": "ui-igswiss/hex-mentions.png:53.47:60.01",
    "hex-marker": "ui-igswiss/hex-marker.png:53.47:60.01",
    "hex-video": "ui-igswiss/hex-video.png:53.47:60.01",
    "hex-igtv": "ui-igswiss/hex-igtv.png:53.47:60.01",
    "hex-insights": "ui-igswiss/hex-insights.png:53.47:60.01",
    "hex-igswiss": "ui-igswiss/hex-igswiss.png:53.47:60.01",
    "hex-quality": "ui-igswiss/hex-quality.png:53.47:60.01",
    "hex-update": "ui-igswiss/hex-update.png:53.47:60.01",
    "hex-schedule": "ui-igswiss/hex-schedule.png:53.47:60.01",
    "hex-moon": "ui-igswiss/hex-moon.png:53.47:60.01",
    "hex-dm": "ui-igswiss/hex-dm.png:53.47:60.01",
    "hex-engagement": "ui-igswiss/hex-engagement.png:53.47:60.01",
    "hex-ghost": "ui-igswiss/hex-ghost.png:53.47:60.01",
    "hex-ship": "ui-igswiss/hex-ship.png:53.47:60.01",
    "hex-youtube": "ui-igswiss/hex-youtube.png:53.47:60.01",
    "hex-caption": "ui-igswiss/hex-caption.png:53.47:60.01",
    "hex-swipe-up": "ui-igswiss/hex-swipe-up.png:53.47:60.01",
    "hex-repost": "ui-igswiss/hex-repost.png:53.47:60.01",
    "hex-lifetime": "ui-igswiss/hex-lifetime.png:53.47:60.01",
    "hex-mutual": "ui-igswiss/hex-mutual.png:53.47:60.01",
    "hex-xmas": "ui-igswiss/hex-xmas.png:53.47:60.01",
    "hex-pinterest": "ui-igswiss/hex-pinterest.png:53.47:60.01",
    "hex-tag-ladder": "ui-igswiss/hex-tag-ladder.png:53.47:60.01",
    "hex-reels": "ui-igswiss/hex-reels.png:53.47:60.01",
    "hex-macos": "ui-igswiss/hex-macos.png:53.47:60.01",
    "hex-music": "ui-igswiss/hex-music.png:53.47:60.01",
    "like-heart-empty": "ui-igswiss/like-heart-empty.svg:20:23",
    "like-heart-full": "ui-igswiss/like-heart-full.svg:20:23",
    "navigate.day": "ui-igswiss/navigate.day.svg:32:32",
    "navigate.night": "ui-igswiss/navigate.night.svg:32:32",
    "start-dm.day": "ui-igswiss/start-dm.day.svg:32:32",
    "start-dm.night": "ui-igswiss/start-dm.night.svg:32:32",
    "add-account-plus": "ui-igswiss/add-account-plus.png:30:30",
    "pro-art-1": "ui-igswiss/pro-art-1.png:471:598",
  };
  const {
      $popup: pj,
      $store: mj,
      $sidebar: gj,
      $later: fj,
      $auth: vj,
      $coverAssist: bj,
      $musicAssist: yj,
      $iframeBus: wj,
      $welcome: Cj,
      $tosSummary: kj,
      $limitations: Sj,
      $tagAssist: Ej,
      $igView: _j,
      $storyAssist: xj,
      $ghostStoryView: Pj,
      $igButtons: Tj,
      $ui: Ij,
    } = app,
    Gj = {
      installed: {
        ...Ij.row,
        ...Ij.alignItems.center,
        ...Ij.justifyContent.center,
        position: "fixed",
        inset: 0,
        zIndex: 9999,
        background: Ij.color.bgLight3,
      },
      installedBody: { ...Ij.shadow.sh12, padding: 20, borderRadius: 8 },
      installedTitle: {
        ...Ij.row,
        ...Ij.alignItems.center,
        ...Ij.text.contentTitle,
      },
      installedIcon: { color: Ij.color.positive },
      installedText: { ...Ij.text.contentText },
    };
  pj.Screen = mj.connect((e) => ({
    isFullscreen: e.igView.fullscreen,
    isSidebarOpen:
      (e.auth.loggedIn || "logo" === e.sidebar.selectedTabId) &&
      e.sidebar.isOpen,
    isWelcomeShown: e.welcome.shown,
    isTagAssistShown: e.tagAssist.shown,
    isCoverAssistShown: e.coverAssist.shown,
    isMusicAssistShown: e.musicAssist.shown,
    isStoryAssistShown: e.storyAssist.shown,
    isLaterAssistShown: e.later.showAssistPanel,
    isExperimentsBarShown: e.experiments.enabled,
    igViewFullscreenWidth: e.igView.fullscreenWidth,
    igViewWithBorder: e.igView.withBorder,
  }))(
    class extends Ij.Component {
      constructor(e) {
        super(e),
          (this._onInstalledButtonClick = () => {
            this.setState({ showInstalledMessage: !1 });
          }),
          (this.state = {
            showInstalledMessage: location.search.includes("win-installed"),
          });
      }
      render() {
        return Glamor.createElement(
          React.Fragment,
          null,
          this._renderInstalledMessage(),
          Glamor.createElement(Ij.Layout, {
            Sidebar: gj.Panel,
            IgView: _j.Mediator,
            IgButtons: Tj.Mediator,
            Welcome: Cj.Screen,
            Tips: Sj.Mediator,
            Tos: kj.Mediator,
            AccountSwitcher: vj.AccountSwitcherMediator,
            Snackbar: pj.Snackbar,
            assistPanel: this._getAssistPanel(),
            igViewAfter: this._renderIgViewAfter(),
            isFullscreen: this.props.isFullscreen,
            isSidebarOpen: this.props.isSidebarOpen,
            isWelcomeShown: this.props.isWelcomeShown,
            isAssistPanelShown: this._isAssistPanelShown(),
            isExperimentsBarShown: this.props.isExperimentsBarShown,
            igViewFullscreenWidth: this.props.igViewFullscreenWidth,
            igViewWithBorder: this.props.igViewWithBorder,
            onBodyWheel: this._onBodyWheel,
          }),
          Glamor.createElement(Ij.TooltipContainer, null)
        );
      }
      _renderInstalledMessage() {
        return this.state.showInstalledMessage
          ? Glamor.createElement(
              "div",
              { css: Gj.installed },
              Glamor.createElement(
                "div",
                { css: Gj.installedBody },
                Glamor.createElement(
                  "div",
                  { css: Gj.installedTitle },
                  Glamor.createElement(Ij.SvgIcon, {
                    style: Gj.installedIcon,
                    name: "igswiss.circle-check-yes",
                  }),
                  Glamor.createElement(Ij.Spacer, { width: "g1h" }),
                  "INSTALLED"
                ),
                Glamor.createElement(Ij.Spacer, { height: "g2" }),
                Glamor.createElement(
                  "div",
                  { css: Gj.installedText },
                  "INSSIST can now be accessed from the ",
                  Glamor.createElement("b", null, "Start Menu"),
                  ".",
                  Glamor.createElement("br", null),
                  "You can remove the setup file."
                ),
                Glamor.createElement(Ij.Spacer, { height: "g2" }),
                Glamor.createElement(Ij.ActionButton, {
                  label: "OK, GOT IT",
                  onClick: this._onInstalledButtonClick,
                })
              )
            )
          : null;
      }
      _getAssistPanel() {
        return this.props.isTagAssistShown
          ? Glamor.createElement(Ej.PanelMediator, null)
          : this.props.isCoverAssistShown
          ? Glamor.createElement(bj.PanelMediator, null)
          : this.props.isMusicAssistShown
          ? Glamor.createElement(yj.PanelMediator, null)
          : this.props.isStoryAssistShown
          ? Glamor.createElement(xj.PanelMediator, null)
          : this.props.isLaterAssistShown
          ? Glamor.createElement(fj.AssistPanel, null)
          : null;
      }
      _renderIgViewAfter() {
        return Glamor.createElement(
          React.Fragment,
          null,
          Glamor.createElement(xj.UpsellOverlayMediator, null),
          Glamor.createElement(Pj.UpsellOverlayMediator, null)
        );
      }
      _isAssistPanelShown() {
        return (
          !this.props.isSidebarOpen &&
          (this.props.isTagAssistShown ||
            this.props.isCoverAssistShown ||
            this.props.isMusicAssistShown ||
            this.props.isStoryAssistShown ||
            this.props.isLaterAssistShown)
        );
      }
      _onBodyWheel(e) {
        wj.send("ig.broadcast-scroll", e.deltaY);
      }
    }
  );
  const {
    $popup: Dj,
    $later: Aj,
    $billing: Mj,
    $tagAssist: Fj,
    $fusion: Rj,
    $rateUs: Lj,
    $ui: Bj,
  } = app;
  Dj.Snackbar = class extends Bj.Component {
    render() {
      return Glamor.createElement(
        Bj.Snackbar,
        null,
        Glamor.createElement(Lj.CardMediator, null),
        Glamor.createElement(Rj.NewVersionCardMediator, null),
        Glamor.createElement(Fj.SnackbarItemMediator, null),
        Glamor.createElement(Mj.CodeMediator, null),
        Glamor.createElement(Mj.DiscountSnackbarCardMediator, null),
        Glamor.createElement(Aj.ErrorCard, null)
      );
    }
  };
  const { $popup: Oj, $bus: $j } = app;
  Oj.chromeTabController = {
    init: function () {
      return new Promise((e) => {
        const t = Math.random();
        $j.send("chrome-tab.close", t),
          $j.on("chrome-tab.close", (e) => {
            t !== e && window.close();
          }),
          setTimeout(e, 50);
      });
    },
  };
  const { $popup: Nj, $store: Uj, $iframeBus: Hj, $analytics: zj } = app;
  Nj.iframeStatsController = {
    init: function () {
      Hj.on("ig.open-media", () => {
        zj.controller.sendEvent("user", "ig:media-open");
      }),
        Hj.on("ig.published", (e) => {
          zj.controller.sendEvent("user", `ig:publish-${e}`),
            ("photo" !== e && "video" !== e) ||
              Uj.transaction((e) => {
                e.billing.trial.postsPublished =
                  (e.billing.trial.postsPublished || 0) + 1;
              }),
            ("story-photo" !== e && "story-video" !== e) ||
              Uj.transaction((e) => {
                e.billing.trial.storiesPublished =
                  (e.billing.trial.storiesPublished || 0) + 1;
              });
        }),
        Hj.on("ig.open-dm", () => {
          zj.controller.sendEvent("user", "ig:dm-open");
        });
    },
  };
  const {
    $popup: jj,
    $store: Wj,
    $ui: Vj,
    $reactDom: qj,
    $reactRedux: Zj,
    $lodash: Yj,
  } = app;
  jj.injector = {
    init: function () {
      Vj.init({
        _: Yj,
        pathPrefix: "/img/",
        images: jj.images,
        icons: jj.icons,
      });
      qj.createRoot(document.getElementById("root")).render(
        Glamor.createElement(
          Zj.Provider,
          { store: Wj.model.store },
          Glamor.createElement(jj.Screen, null)
        )
      );
    },
  };
  const { $popup: Qj, $store: Kj } = app;
  Qj.minVersionController = {
    init: function () {
      if (Kj.state.version >= 130) return;
      (document.body.innerHTML =
        '\n    <style>\n      .min-version {\n        width: 100%;\n        display: flex;\n        align-items: center;\n        justify-content: center;\n      }\n\n      .min-version__content {\n        width: 440px;\n        position: relative;\n        top: -40px;\n      }\n\n      .min-version__title {\n        font-size: 18px;\n        line-height: 24px;\n        font-weight: 600;\n      }\n\n      .min-version__text {\n        margin-top: 12px;\n      }\n\n      .min-version__paragraph {\n        font-size: 16px;\n        line-height: 24px;\n        margin-top: 12px;\n      }\n      .min-version__paragraph:first-child {\n        margin-top: 0;\n      }\n    </style>\n\n    <div class="min-version">\n      <div class="min-version__content">\n        <div class="min-version__title">\n          FAILED TO UPDATE\n        </div>\n        <div class="min-version__text">\n          <div class="min-version__paragraph">\n            Your Inssist plugin version is too old and Chrome has failed to fix and update it automatically üòµ.\n          </div>\n          <div class="min-version__paragraph">\n            Please uninstall Inssist from <a href="chrome://extensions">chrome://extensions</a> page\n            in Chrome and reinstall from <a href="https://get.inssist.com">https://get.inssist.com</a>\n          </div>\n        </div>\n      </div>\n    </div>\n  '),
        document.body.addEventListener("click", (e) => {
          const t = e.target.closest("a");
          if (!t) return;
          e.preventDefault();
          const r = t.getAttribute("href");
          chrome.tabs.create({ active: !0, url: r });
        });
    },
  };
  const { $store: Xj, $iframeBus: Jj } = app;
  const {
      $sidebar: eW,
      $later: tW,
      $store: rW,
      $inspiration: nW,
      $analytics: oW,
      $whatsNew: aW,
      $billing: iW,
      $tagAssist: sW,
      $dm: lW,
      $quickReplies: cW,
      $ui: uW,
      $bus: dW,
    } = app,
    hW = ({ props: e }) => ({
      width: "100%",
      height: "100%",
      ...("tab-dm" !== e.selectedTabId && {
        ...uW.fixed("0 0 0 0"),
        visibility: "hidden",
        pointerEvents: "none",
      }),
    }),
    pW = {
      dm: "sidebar-mediator.dm",
      later: "sidebar-mediator.later",
      covers: "sidebar-mediator.covers",
      schedule: "sidebar-mediator.schedule",
      hashtags: "sidebar-mediator.hashtags",
      billing: "sidebar-mediator.billing",
      music: "sidebar-mediator.music",
    };
  uW.Image.registerImages({
    "sidebar-mediator.billing": "tab-billing.png:34:45",
  }),
    uW.SvgIcon.registerSvgIcons([
      `<symbol id="${pW.dm}" viewBox="0 0 43.414 43.414"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M42 1.414l-22.55 22.55M42 1.414l-14.35 41-8.2-18.45L1 15.764z"/></g></symbol>`,
      `<symbol id="${pW.later}" viewBox="0 0 41.005 41.483"><path d="M20.335 41.46H6.144a6.189 6.189 0 0 1-1.238-.125 6.111 6.111 0 0 1-2.2-.924 6.162 6.162 0 0 1-2.226-2.7 6.112 6.112 0 0 1-.358-1.153A6.19 6.19 0 0 1 0 35.316V9.261a6.19 6.19 0 0 1 .125-1.238 6.111 6.111 0 0 1 .924-2.2A6.161 6.161 0 0 1 3.752 3.6a6.113 6.113 0 0 1 1.153-.358 6.19 6.19 0 0 1 1.238-.125h2.595V1.286a1.286 1.286 0 1 1 2.571 0v1.831h7.9V1.286a1.286 1.286 0 1 1 2.571 0v1.831h7.9V1.286a1.286 1.286 0 1 1 2.571 0v1.831h2.617a6.19 6.19 0 0 1 1.238.125 6.111 6.111 0 0 1 2.2.924 6.161 6.161 0 0 1 2.226 2.7 6.113 6.113 0 0 1 .358 1.153A6.19 6.19 0 0 1 41 9.261v9.625a1 1 0 0 1-2 0V9.671a4.585 4.585 0 0 0-.092-.917 4.526 4.526 0 0 0-.685-1.627 4.565 4.565 0 0 0-2-1.649 4.528 4.528 0 0 0-.854-.265 4.584 4.584 0 0 0-.917-.092h-2.208v1.9a1.286 1.286 0 1 1-2.571 0V5.12h-7.9v1.9a1.286 1.286 0 1 1-2.571 0v-1.9h-7.9v1.9a1.286 1.286 0 1 1-2.571 0v-1.9H6.554a4.585 4.585 0 0 0-.917.092 4.526 4.526 0 0 0-1.628.688 4.565 4.565 0 0 0-1.649 2 4.528 4.528 0 0 0-.265.854A4.585 4.585 0 0 0 2 9.671v25.235a4.584 4.584 0 0 0 .092.917 4.526 4.526 0 0 0 .685 1.627 4.564 4.564 0 0 0 2 1.649 4.527 4.527 0 0 0 .854.265 4.583 4.583 0 0 0 .917.092H20.5v.024h.046a1 1 0 1 1-.213 1.98Zm10.1-.049a9.615 9.615 0 0 1-.952-.145 9.671 9.671 0 0 1-1.8-.559 9.619 9.619 0 0 1-5.1-5.1 9.371 9.371 0 0 1-.559-1.8 9.628 9.628 0 0 1-.145-.952 9.739 9.739 0 0 1 0-1.961 9.629 9.629 0 0 1 .145-.952 9.671 9.671 0 0 1 .559-1.8 9.619 9.619 0 0 1 5.1-5.1 9.371 9.371 0 0 1 1.8-.559 9.615 9.615 0 0 1 .952-.145 9.735 9.735 0 0 1 1.961 0 9.614 9.614 0 0 1 .952.145 9.671 9.671 0 0 1 1.8.559 9.619 9.619 0 0 1 5.1 5.1 9.371 9.371 0 0 1 .559 1.8 9.629 9.629 0 0 1 .145.952 9.74 9.74 0 0 1 0 1.961 9.628 9.628 0 0 1-.145.952 9.671 9.671 0 0 1-.559 1.8 9.619 9.619 0 0 1-5.1 5.1 9.371 9.371 0 0 1-1.8.559 9.614 9.614 0 0 1-.952.145 9.735 9.735 0 0 1-1.961 0Zm-.558-17.021a7.592 7.592 0 0 0-2.73 1.149 7.657 7.657 0 0 0-2.768 3.361 7.6 7.6 0 0 0-.445 1.433 7.708 7.708 0 0 0 0 3.077 7.592 7.592 0 0 0 1.149 2.73 7.657 7.657 0 0 0 3.359 2.76 7.594 7.594 0 0 0 1.433.445 7.708 7.708 0 0 0 3.077 0 7.593 7.593 0 0 0 2.73-1.149 7.657 7.657 0 0 0 2.766-3.359 7.6 7.6 0 0 0 .445-1.433 7.708 7.708 0 0 0 0-3.077 7.592 7.592 0 0 0-1.149-2.73 7.656 7.656 0 0 0-3.359-2.766 7.6 7.6 0 0 0-1.433-.445 7.709 7.709 0 0 0-3.077 0Zm1.054 9.581a1.217 1.217 0 0 1-1.177-1.171v-3.959a1.122 1.122 0 1 1 2.244 0v2.886h1.389a1.122 1.122 0 0 1 0 2.244ZM7.512 30.5A1.988 1.988 0 1 1 9.5 32.555 2.02 2.02 0 0 1 7.512 30.5Zm7.308-.064a2.052 2.052 0 1 1 2.051 1.987 2.02 2.02 0 0 1-2.052-1.983Zm0-7.18a2.052 2.052 0 1 1 2.051 1.987 2.02 2.02 0 0 1-2.052-1.983Zm-7.308 0A1.987 1.987 0 1 1 9.5 25.247a1.987 1.987 0 0 1-1.988-1.987Zm22.052-7.18a1.987 1.987 0 1 1 1.987 1.987 1.987 1.987 0 0 1-1.988-1.982Zm-7.308 0a1.987 1.987 0 1 1 1.987 1.987 1.987 1.987 0 0 1-1.988-1.982Zm-7.436 0a2.052 2.052 0 1 1 2.051 1.987 2.02 2.02 0 0 1-2.052-1.982Zm-7.308 0A1.987 1.987 0 1 1 9.5 18.068a1.987 1.987 0 0 1-1.988-1.987Z" fill="currentColor"/></symbol>`,
      `<symbol id="${pW.covers}" viewBox="0 0 35.699 48.18"><g transform="translate(-1317 -255)"><line y1="8" transform="translate(1326.5 256.5)" fill="none" stroke="currentColor" stroke-linecap="round" stroke-width="2"/><path d="M0,16V0" transform="translate(1344.5 256.5)" fill="none" stroke="currentColor" stroke-linecap="round" stroke-width="2"/><path d="M0,12V0" transform="translate(1335.5 256.5)" fill="none" stroke="currentColor" stroke-linecap="round" stroke-width="2"/><path d="M30.891,0H2.808A2.809,2.809,0,0,0,0,2.808V22.466H33.7V2.808A2.809,2.809,0,0,0,30.891,0ZM0,29.331a5.617,5.617,0,0,0,5.617,5.617h5.617v5.617a5.617,5.617,0,0,0,11.233,0V34.947h5.617A5.617,5.617,0,0,0,33.7,29.331V26.523H0Zm16.85,9.127a2.106,2.106,0,1,1-2.106,2.106A2.106,2.106,0,0,1,16.85,38.458Z" transform="translate(1318 256)" fill="none" stroke="currentColor" stroke-width="2"/></g></symbol>`,
      `<symbol id="${pW.schedule}" viewBox="0 0 42.004 42.004"><path d="M10.002 42.002a24.394 24.394 0 01-10-10v-26a6.007 6.007 0 016-6h26a24.394 24.394 0 0110 10v26a6.007 6.007 0 01-6 6zm-4-6a4.006 4.006 0 004 4h26a4 4 0 004-4V28.69l-.635-.6-1.855-1.748-.213-.207a1.713 1.713 0 00-2.3-.059l-4.164 3.563a3.726 3.726 0 01-2.619.908l2.154 4.092a.971.971 0 01-.365 1.3.881.881 0 01-.447.117.927.927 0 01-.812-.5l-6.648-12.6-4.57-8.67a1.722 1.722 0 00-3.039-.059L6.001 29.084zm-4-30v26a4 4 0 002 3.463V10.002a6 6 0 016-6h4a1 1 0 010 2h-4a4.008 4.008 0 00-4 4v15.313l6.9-12.062a3.539 3.539 0 016.256.107l2.939 5.582 1.637 3.092 2.92 5.537a1.968 1.968 0 001.367 1.031 1.926 1.926 0 001.637-.432l4.164-3.568a3.529 3.529 0 013.693-.564l1.855 1.459.635.6V10.002a4.006 4.006 0 00-4-4h-14a1 1 0 110-2H35.47a4.117 4.117 0 00-.637-.83 3.991 3.991 0 00-2.831-1.17h-26a4.007 4.007 0 00-4 4zm24.605 8.381a4.556 4.556 0 114.553 4.553 4.562 4.562 0 01-4.553-4.555zm1.768 0a2.789 2.789 0 102.785-2.791 2.788 2.788 0 00-2.785 2.789zM17.002 5.002a1 1 0 111 1 1 1 0 01-1-1z" fill="currentColor"/></symbol>`,
      `<symbol id="${pW.hashtags}" viewBox="0 0 38.717 48.907"><path d="M3.802 48.907a3.889 3.889 0 01-3.8-3.8V4.725A4.726 4.726 0 014.725.003h33.051a.945.945 0 010 1.889 2.836 2.836 0 000 5.672.943.943 0 01.943.944v37.564a2.844 2.844 0 01-2.832 2.838zm-1.914-3.8a2.1 2.1 0 001.914 1.909h32.082a.943.943 0 00.943-.944V9.452H4.722a4.679 4.679 0 01-2.834-.974zm0-40.382a2.836 2.836 0 002.834 2.838H33.99a4.734 4.734 0 010-5.672H4.722a2.832 2.832 0 00-2.834 2.831zm19.471 35.412l.8-6.676h-7.207l-.84 6.676h-1.9l.8-6.676h-4.99v-1.934h5.238l.916-7.387H9.145v-1.934h5.273l.811-6.675h1.934l-.846 6.675h7.244l.809-6.675h1.9l-.811 6.675h4.955v1.934h-5.2l-.914 7.387h4.99v1.934h-5.24l-.8 6.676zm-6.189-8.609h7.244l.914-7.387h-7.207z" fill="currentColor"/></symbol>`,
      `<symbol id="${pW.billing}" _dx="23%" viewBox="0 0 47.703 36.216"><path d="M18.108 18.108a8.554 8.554 0 10-8.554-8.554 8.579 8.579 0 008.554 8.554zm0 4.277C12.441 22.385 1 25.272 1 30.939v4.277h34.216v-4.277c0-5.667-11.441-8.554-17.108-8.554z" fill="none" stroke="currentColor" stroke-width="2"/><path d="M32.695 1.008h-2.424v5.6h1.3V5.064h1.124c1.5 0 2.432-.776 2.432-2.024s-.936-2.032-2.432-2.032zm-.072 3h-1.056V2.064h1.056c.792 0 1.192.36 1.192.976s-.4.968-1.192.968zm8.384 2.6l-1.256-1.8a1.821 1.821 0 001.156-1.768c0-1.256-.94-2.032-2.436-2.032h-2.424v5.6h1.3v-1.56h1.188l1.08 1.56zM39.591 3.04c0 .608-.4.976-1.192.976h-1.056V2.064h1.056c.792 0 1.192.36 1.192.976zm5.048 3.668a2.9 2.9 0 003.068-2.9 2.9 2.9 0 00-3.064-2.9 2.9 2.9 0 00-3.064 2.9 2.9 2.9 0 003.06 2.9zm0-1.1a1.708 1.708 0 01-1.752-1.8 1.708 1.708 0 011.752-1.792 1.708 1.708 0 011.752 1.792A1.708 1.708 0 0144.639 5.6z" fill="currentColor"/></symbol>`,
      `<symbol id="${pW.music}" viewBox="0 0 41.521 44.119"><g transform="translate(6595.268 7553.377)"><g transform="translate(-6595.268 -7524.327)" fill="none" stroke="currentColor" stroke-width="2"><circle cx="7.534" cy="7.534" r="7.534" stroke="none"/><circle cx="7.534" cy="7.534" r="6.534" fill="none"/></g><g transform="translate(-6568.818 -7528.094)" fill="none" stroke="currentColor" stroke-width="2"><circle cx="7.534" cy="7.534" r="7.534" stroke="none"/><circle cx="7.534" cy="7.534" r="6.534" fill="none"/></g><path d="M-6584-7516.793v-30.734l26.44-4.658v31.626" transform="translate(2.812)" fill="none" stroke="currentColor" stroke-width="2"/><line y1="5.023" x2="26.37" transform="translate(-6580.559 -7545.046)" fill="none" stroke="currentColor" stroke-width="2"/></g></symbol>`,
    ]);
  eW.Panel = rW.connect((e) => ({
    loggedIn: e.auth.loggedIn,
    selectedTabId: e.sidebar.selectedTabId,
    withWhatsNewMarker: e.whatsNew.some((e) => !e.acknowledged),
    hasPro: true,
    hasProPaid: true,
    hasAllFeatures: rW.proxy.hasPro({ feature: "*" }),
    later: {
      showBody: e.later.showBodyPanel,
      badge: tW.proxy.getAllPosts().filter((e) => "failed" === e.status).length,
    },
    quickReplies: { showBody: e.quickReplies.shown },
  }))(
    class extends uW.Component {
      constructor(...e) {
        var t;
        return (
          (t = super(...e)),
          (this._onElectronTabOpen = ({ tab: e }) => {
            this._onTabClick(e);
          }),
          (this._onTabClick = (e) => {
            "tab-dm" === e && dW.send("sameSiteFix.fixExistingCookies"),
              rW.state.sidebar.selectedTabId !== e &&
                oW.controller.sendEvent("user", `sidebar:open-${e}`),
              rW.transaction((t) => {
                t.sidebar.selectedTabId === e
                  ? (t.sidebar.isOpen = !t.sidebar.isOpen)
                  : ((t.sidebar.isOpen = !0), (t.sidebar.selectedTabId = e));
              }),
              "logo" === this.props.selectedTabId &&
                aW.controller.acknowledgeAll();
          }),
          (this._onSidePanelCloseClick = () => {
            rW.transaction((e) => {
              e.sidebar.isOpen = !1;
            }),
              "logo" === this.props.selectedTabId &&
                aW.controller.acknowledgeAll();
          }),
          (this._onClosed = () => {
            rW.transaction((e) => {
              (e.sidebar.isOpen = !1), (e.sidebar.selectedTabId = null);
            });
          }),
          t
        );
      }
      componentDidMount() {
        this.props.withWhatsNewMarker &&
          rW.transaction((e) => {
            (e.sidebar.isOpen = !0), (e.sidebar.selectedTabId = "logo");
          }),
          globalThis.electron &&
            globalThis.electron.addExtensionListener(
              "sidebar-mediator.open-tab",
              this._onElectronTabOpen
            ),
          Jj.on("ig.setConnected", () => {
            Xj.transaction((e) => (e.auth.isConnected = !0));
          });
      }
      componentWillUnmount() {
        globalThis.electron &&
          globalThis.electron.removeExtensionListener(
            "sidebar-mediator.open-tab",
            this._onElectronTabOpen
          );
      }
      render() {
        return Glamor.createElement(uW.Sidebar, {
          open: this.props.isOpen,
          selectedTabId: this.props.selectedTabId,
          logoTab: this._getLogoTab(),
          menu: this._getMenu(),
          sidePanel: this._getSidePanel(),
          bodyPanel: this._getBodyPanel(),
          onTabClick: this._onTabClick,
          onSidePanelCloseClick: this._onSidePanelCloseClick,
          onClosed: this._onClosed,
          onBodyPanelClosed: this._onBodyPanelClosed,
          onLogoLongPress: this._onLogoLongPress,
        });
      }
      _getLogoTab() {
        return {
          svgIcon: "igswiss.logo",
          withMarker: this.props.withWhatsNewMarker,
          withProSticker: this.props.hasPro,
        };
      }
      _getMenu() {
        const e = true
          ? "an infinite"
          : rW.proxy.hasProPaid("inssist-pro-lifetime")
          ? "a lifetime"
          : rW.proxy.hasProPaid("inssist-pro-monthly")
          ? "a monthly"
          : "";
        return {
          disabled: !this.props.loggedIn,
          tabs: [
            {
              id: "tab-dm",
              svgIcon: pW.dm,
              title: "Direct Messages",
              features: ["send messages", "ghost mode"],
            },
            {
              id: "tab-later",
              svgIcon: pW.later,
              title: "Post Later",
              features: ["schedule everything", "published when online"],
              badgeText: this.props.later.badge,
              badgeColor: uW.color.error,
            },
            {
              id: "tab-inspiration",
              svgIcon: pW.schedule,
              title: "Inspirations",
              features: [
                "library of your favorite posts",
                "pin photos and videos",
              ],
            },
            {
              id: "tab-tag-assist",
              svgIcon: pW.hashtags,
              title: "Hashtag Assistant",
              features: [
                "manage hashtag collections",
                "find effective hashtags",
                "create hashtag ladders",
              ],
            },
            {
              id: "tab-billing",
              title: "PRO Version",
              iconStyle: { position: "relative", left: -1 },
              ...(this.props.hasProPaid
                ? {
                    svgIcon: pW.billing,
                    features: [
                      "access to all advanced features",
                      `enabled with ${e} plan`,
                      "thank you üòò",
                    ],
                  }
                : {
                    svgIcon: pW.billing,
                    iconStyle: { position: "relative", left: -1 },
                    features: [
                      "access to all advanced features",
                      "support development",
                    ],
                  }),
            },
          ].filter(Boolean),
        };
      }
      _getSidePanel() {
        let e,
          t = !1,
          r = null;
        const n = this.props.selectedTabId;
        "logo" === n
          ? (e = Glamor.createElement(aW.Panel, null))
          : "tab-dm" === n
          ? (r = uW.DmSidePanel.width)
          : "tab-later" === n
          ? (e = Glamor.createElement(tW.SidePanel, null))
          : "tab-inspiration" === n
          ? (e = Glamor.createElement(nW.SidePanel, null))
          : "tab-tag-assist" === n
          ? (e = Glamor.createElement(sW.SidePanelMediator, null))
          : "tab-billing" === n && ((t = !0), (e = null));
        const o =
          this.props.loggedIn &&
          Glamor.createElement(
            "div",
            { css: hW(this) },
            Glamor.createElement(lW.SidePanelMediator, null)
          );
        return {
          width: r,
          hidden: t,
          content: Glamor.createElement(React.Fragment, null, e, o),
          hideCloseButton: "tab-billing" === n || "tab-tag-assist" === n,
        };
      }
      _getBodyPanel() {
        const e = this.props,
          t = e.selectedTabId;
        let r = !1,
          n = null;
        return (
          "tab-later" === t
            ? ((r = e.later.showBody),
              (n = Glamor.createElement(tW.BodyPanel, null)))
            : "tab-billing" === t
            ? ((r = !0), (n = Glamor.createElement(iW.PanelMediator, null)))
            : "tab-dm" === t &&
              ((r = e.quickReplies.showBody),
              (n = Glamor.createElement(cW.PanelMediator, null))),
          { open: r, content: n }
        );
      }
    }
  );
  const { $reset: mW, $bus: gW, $utils: fW } = app;
  mW.controller = {
    _emitter: fW.createEmitter(),
    reset: function () {
      this._emitter(), gW.send("reset.reset");
    },
    onReset: function (e) {
      this._emitter(e), gW.on("reset.reset", e);
    },
  };
  const {
    $rateUs: vW,
    $store: bW,
    $iframeBus: yW,
    $analytics: wW,
    $ui: CW,
    $constants: kW,
  } = app;
  vW.CardMediator = bW.connect((e) => ({
    show: e.rateUs.shown && !bW.proxy.isAcknowledged("rateUs"),
  }))(
    class extends CW.Component {
      constructor(...e) {
        var t;
        return (
          (t = super(...e)),
          (this._onAccountClick = () => {
            yW.send("ig.ajax-go", "/inssistapp");
          }),
          (this._onRateYesClick = (e) => {
            chrome.tabs.create({ url: kW.common.reviewsUrl }),
              wW.controller.sendEvent("user", "rate-us:yes-click"),
              this._acknowledgeAndHide(e);
          }),
          (this._onRateNoClick = (e) => {
            wW.controller.sendEvent("user", "rate-us:no-click"),
              this._acknowledgeAndHide(e);
          }),
          (this._onOkClick = (e) => {
            wW.controller.sendEvent("user", "rate-us:ok-click"),
              this._acknowledgeAndHide(e);
          }),
          (this._onCloseClick = (e) => {
            wW.controller.sendEvent("user", "rate-us:close-click"),
              this._acknowledgeAndHide(e);
          }),
          t
        );
      }
      render() {
        return Glamor.createElement(
          CW.SnackbarItem,
          { id: "rate-us-mediator", show: this.props.show },
          Glamor.createElement(CW.RateUsStars, {
            texts: {
              subcontent: Glamor.createElement(
                "div",
                null,
                "Found a bug? You can DM us at",
                " ",
                Glamor.createElement(
                  "a",
                  { onClick: this._onAccountClick },
                  "@inssistapp"
                ),
                " or email at ",
                Glamor.createElement(
                  "a",
                  { href: "mailto:inssist@slashed.io" },
                  "inssist@slashed.io"
                ),
                " ",
                "and we will try to help."
              ),
            },
            onRateYesClick: this._onRateYesClick,
            onRateNoClick: this._onRateNoClick,
            onOkClick: this._onOkClick,
            onCloseClick: this._onCloseClick,
          })
        );
      }
      _acknowledgeAndHide(e) {
        wW.controller.sendEvent("user", `rate-us:${e}-stars`),
          bW.transaction((t) => {
            (t.rateUs.shown = !1),
              (t.rateUs.rate = e),
              (t.acknowledged.rateUs = Date.now());
          });
      }
    }
  );
  const { $rateUs: SW, $store: EW, $utils: _W, $iframeBus: xW } = app;
  function PW() {
    TW(5);
  }
  async function TW(e) {
    if (EW.proxy.isAcknowledged("followUs")) return;
    const t = EW.state;
    (Date.now() - t.installedAt) / _W.time.DAY < e ||
      (xW.off("ig.media-open", PW),
      xW.off("ig.published", PW),
      await _W.sleep(7 * _W.time.SECOND),
      EW.transaction((e) => (e.rateUs.shown = !0)));
  }
  SW.controller = {
    init: function () {
      if (EW.proxy.isAcknowledged("rateUs")) return;
      TW(30), xW.on("ig.media-open", PW), xW.on("ig.published", PW);
    },
    showRateUs: function () {
      TW(5);
    },
  };
  const {
    $newPostExtra: IW,
    $store: GW,
    $later: DW,
    $utils: AW,
    $musicAssist: MW,
    $iframeBus: FW,
    $igFrame: RW,
  } = app;
  function LW(e) {
    GW.transaction((t) => {
      const r = t.coverAssist.shown
        ? "cover-assist"
        : t.tagAssist.shown
        ? "tag-assist"
        : t.musicAssist.shown
        ? "music-assist"
        : t.later.showAssistPanel
        ? "later"
        : null;
      (t.tagAssist.shown = !1),
        (t.coverAssist.shown = !1),
        (t.musicAssist.shown = !1),
        (t.later.showAssistPanel = !1),
        e !== r &&
          ("tag-assist" === e
            ? (t.tagAssist.shown = !0)
            : "cover-assist" === e
            ? (t.coverAssist.shown = !0)
            : "music-assist" === e
            ? (t.musicAssist.shown = !0)
            : "later" === e && (t.later.showAssistPanel = !0));
    });
  }
  function BW(e) {
    "music-assist" === e
      ? GW.transaction((e) => {
          e.musicAssist.selectedTrackId = null;
        })
      : "cover-assist" === e
      ? GW.transaction((e) => {
          (e.coverAssist.selectedTabId = "auto"),
            (e.coverAssist.coverUrl = null),
            (e.coverAssist.frameGallerySelectedImage = null);
        })
      : "later" === e && GW.transaction((e) => (e.later.selectedIgDate = null));
  }
  function OW({ videoDurationMs: e = 0 } = {}) {
    GW.transaction((t) => {
      e && e < 2 * AW.time.MINUTE
        ? ((t.tagAssist.shown = !1),
          (t.coverAssist.shown = !1),
          (t.musicAssist.shown = !0),
          (t.later.showAssistPanel = !1))
        : e
        ? ((t.tagAssist.shown = !1),
          (t.coverAssist.shown = !0),
          (t.musicAssist.shown = !1),
          (t.later.showAssistPanel = !1))
        : ((t.tagAssist.shown = !1),
          (t.coverAssist.shown = !1),
          (t.musicAssist.shown = !1),
          (t.later.showAssistPanel = !0)),
        (t.sidebar.isOpen = !1);
    });
  }
  function $W() {
    GW.transaction((e) => {
      (e.tagAssist.shown = !1),
        (e.coverAssist.shown = !1),
        (e.musicAssist.shown = !1),
        (e.later.showAssistPanel = !1);
    });
  }
  IW.controller = {
    init: function () {
      FW.on("new-post-extra.option-click", LW),
        FW.on("new-post-extra.cancel-click", BW),
        FW.on("new-post-extra.enter-page", OW),
        FW.on("new-post-extra.exit-page", $W),
        RW.creationController.observeStateDuringCreation(
          (e) =>
            e.coverAssist.shown
              ? "cover-assist"
              : e.tagAssist.shown
              ? "tag-assist"
              : e.musicAssist.shown
              ? "music-assist"
              : e.later.showAssistPanel
              ? "later"
              : null,
          (e) => {
            FW.send("new-post-extra.synch-selected-option", e);
          }
        ),
        RW.creationController.observeStateDuringCreation(
          () => MW.proxy.getSelectedTrackName(),
          (e) => {
            FW.send("new-post-extra.update-pill-music", { name: e });
          }
        ),
        RW.creationController.observeStateDuringCreation(
          (e) => !!e.coverAssist.coverUrl,
          (e) => {
            FW.send("new-post-extra.update-pill-cover", { hasCover: e });
          }
        ),
        RW.creationController.observeStateDuringCreation(
          (e) => e.later.selectedIgDate,
          (e) => {
            FW.send("new-post-extra.update-pill-later", {
              date: e,
              dateStr: DW.getDateTitle(e),
            });
          }
        );
    },
  };
  const {
      $limitations: NW,
      $store: UW,
      $iframeBus: HW,
      $analytics: zW,
      $ui: jW,
    } = app,
    WW = { tip: { "&:not(:last-child)": { marginBottom: jW.space.g3 } } };
  NW.Mediator = UW.connect((e) => ({
    acknowledged: {
      story: -1 !== e.acknowledged.storyLimitations,
      scheduleTip: -1 !== e.acknowledged.scheduleTip,
    },
  }))(
    class extends jW.Component {
      constructor(e) {
        super(e),
          (this._onScheduleTipOkClick = () => {
            UW.acknowledge.dispatch("scheduleTip"),
              zW.controller.sendEvent("user", "tips:schedule-tip-ok-click");
          }),
          (this._onScheduleTipShowClick = () => {
            UW.acknowledge.dispatch("scheduleTip"),
              zW.controller.sendEvent("user", "tips:schedule-tip-show-click"),
              UW.transaction((e) => {
                (e.sidebar.selectedTabId = "tab-later"),
                  (e.sidebar.isOpen = !0);
              });
          }),
          (this._onStoryLimitationsOkClick = () => {
            UW.acknowledge.dispatch("storyLimitations"),
              zW.controller.sendEvent(
                "user",
                "tips:story-limitations-ok-click"
              );
          }),
          (this._onIframePathChange = (e) => {
            let t;
            (t = e.startsWith("/create/story")
              ? "create-story"
              : e.startsWith("/create/")
              ? "create-post"
              : null),
              this.setState({ pageType: t });
          }),
          (this.state = { pageType: null });
      }
      componentDidMount() {
        HW.on("ig.path-change", this._onIframePathChange);
      }
      componentWillUnmount() {
        HW.off("ig.path-change", this._onIframePathChange);
      }
      render() {
        const e = [],
          t = this.state.pageType,
          r = this.props.acknowledged;
        return (
          "create-post" === t
            ? (e.push({ key: "crop-tip", content: this._renderCropTip() }),
              r.scheduleTip ||
                e.push({
                  key: "schedule-tip",
                  content: this._renderScheduleTip(),
                }))
            : "create-story" === t &&
              (e.push({ key: "crop-tip", content: this._renderCropTip() }),
              r.story ||
                e.push({
                  key: "story-limitations",
                  content: this._renderStoryLimitations(),
                })),
          e.length
            ? Glamor.createElement(
                "div",
                null,
                e.map((e) =>
                  Glamor.createElement(
                    "div",
                    { css: WW.tip, key: e.key },
                    e.content
                  )
                )
              )
            : null
        );
      }
      _renderStoryLimitations() {
        return Glamor.createElement(jW.Tip, {
          content: Glamor.createElement(
            React.Fragment,
            null,
            Glamor.createElement("b", null, "Limitations:"),
            " When posting stories a few features such as tagging, gifs and mentions on videos are not implemented in the browser version of Instagram website and thus not available on the app."
          ),
          buttons: [
            { label: "OK, GOT IT", onClick: this._onStoryLimitationsOkClick },
          ],
        });
      }
      _renderCropTip() {
        return Glamor.createElement(jW.Tip, {
          icon: "bulb",
          content: [
            Glamor.createElement(
              React.Fragment,
              null,
              Glamor.createElement("b", null, "Tips:"),
              " Recommended Instagram photo / video sizes and formats can be found in",
              " ",
              Glamor.createElement(
                "a",
                {
                  href: "https://inssist.com/knowledge-base/instagram-image-size-cheat-sheet",
                  target: "_blank",
                },
                "our guide"
              ),
              "."
            ),
            Glamor.createElement(
              React.Fragment,
              null,
              "You can pre-edit, crop or scale your photo with a free",
              " ",
              Glamor.createElement(
                "a",
                {
                  href: "https://www.iloveimg.com/crop-image",
                  target: "_blank",
                },
                "iloveimg"
              ),
              " ",
              "tool, and your video with",
              " ",
              Glamor.createElement(
                "a",
                { href: "https://ezgif.com/resize-video", target: "_blank" },
                "ezgif"
              ),
              " ",
              "tool."
            ),
          ],
        });
      }
      _renderScheduleTip() {
        return Glamor.createElement(jW.Tip, {
          icon: "bulb",
          content: [
            Glamor.createElement(
              React.Fragment,
              null,
              Glamor.createElement("b", null, "Tips:"),
              " A few features such as posting carousels and editing published posts are not available on Instagram Web client."
            ),
            Glamor.createElement(
              React.Fragment,
              null,
              "You can post carousels, edit posts and schedule posts for later with Post Later module on the left."
            ),
          ],
          buttons: [
            { label: "OK, GOT IT", onClick: this._onScheduleTipOkClick },
            { label: "SHOW ME, GURU", onClick: this._onScheduleTipShowClick },
          ],
        });
      }
    }
  );
  const {
      $igButtons: VW,
      $store: qW,
      $iframeBus: ZW,
      $analytics: YW,
      $ui: QW,
      $igView: KW,
      $reset: XW,
    } = app,
    JW = "ig-buttons-mediator.back",
    eV = "ig-buttons-mediator.refresh",
    tV = "ig-buttons-mediator.fullscreen-enter",
    rV = "ig-buttons-mediator.fullscreen-exit",
    nV = "ig-buttons-mediator.switch-to-day",
    oV = "ig-buttons-mediator.switch-to-night",
    aV = "ig-buttons-mediator.ghost-story-view-on",
    iV = "ig-buttons-mediator.ghost-story-view-off";
  QW.SvgIcon.registerSvgIcons([
    `<symbol id="${JW}" viewBox="0 0 40 40"><path fill="none" d="M0 0h40v40H0z"/><path d="M15.125 19.846l9.1-9.1-1.385-1.384-9.644 9.644a1.2 1.2 0 0 0 0 1.681l9.635 9.634 1.385-1.384z" fill="currentColor"/></symbol>`,
    `<symbol id="${eV}" viewBox="0 0 40 40"><path fill="none" d="M0 0h40v40H0z"/><path d="M30.378 18.7a.82.82 0 1 0-1.618.258v.015a9.022 9.022 0 1 1-2.24-4.582L22.896 15.6l.518 1.555 4.917-1.639a.82.82 0 0 0 .561-.778V9.819h-1.64v2.994a10.546 10.546 0 1 0 3.126 5.887z" fill="currentColor"/></symbol>`,
    `<symbol id="${tV}" viewBox="0 0 40 40"><path fill="none" d="M0 0h40v40H0z"/><path d="M28.163 26.952l-3.722-3.722-1.211 1.211 3.722 3.722H24.06v1.721h5.824V24.06h-1.721zm-3.722-10.179l3.722-3.725v2.892h1.721v-5.824H24.06v1.721h2.892l-3.722 3.721zm-8.883 6.457l-3.722 3.722V24.06h-1.72v5.824h5.824v-1.721h-2.892l3.725-3.722zm.382-11.393v-1.721h-5.824v5.824h1.721v-2.892l3.721 3.725 1.215-1.215-3.725-3.721z" fill="currentColor"/></symbol>`,
    `<symbol id="${rV}" viewBox="0 0 40 40"><path fill="none" d="M0 0h40v40H0z"/><path d="M24.951 26.162l3.722 3.722 1.211-1.211-3.722-3.722h2.892V23.23H23.23v5.824h1.721zm3.722-16.046l-3.722 3.725v-2.892H23.23v5.824h5.824v-1.721h-2.892l3.722-3.721zM11.332 29.884l3.722-3.722v2.892h1.72V23.23H10.95v1.721h2.892l-3.725 3.722zm-.382-14.832v1.721h5.824v-5.824h-1.721v2.892l-3.721-3.725-1.215 1.215 3.725 3.721z" fill="currentColor"/></symbol>`,
    `<symbol id="${nV}" viewBox="0 0 40 40"><g transform="translate(3444 7623)"><rect width="40" height="40" transform="translate(-3444 -7623)" fill="none"/><path d="M11.166,20.406h3.118l-1.561,5.045ZM7.535,18.6l2.7,1.56L6.36,23.745Zm7.811,1.515,2.673-1.606,1.259,5.129Zm-9.2-7.347a6.622,6.622,0,1,1,6.621,6.529A6.576,6.576,0,0,1,6.14,12.766Zm-.8,2.579,1.607,2.673L1.816,19.277ZM18.6,17.917l1.56-2.7,3.588,3.875Zm1.81-6.75,5.045,1.561-5.045,1.558ZM0,12.723l5.045-1.557v3.118ZM1.707,6.36,6.855,7.534l-1.56,2.7Zm16.8,1.074,5.129-1.261-3.524,3.933ZM6.174,1.816l3.932,3.522L7.434,6.945Zm9.042,3.479,3.875-3.589L17.917,6.854Zm-4.049-.25L12.727,0l1.557,5.045Z" transform="translate(-3436.759 -7615.715)" fill="currentColor"/></g></symbol>`,
    `<symbol id="${oV}" viewBox="0 0 40 40"><g transform="translate(3380 7623)"><rect width="40" height="40" transform="translate(-3380 -7623)" fill="none"/><g transform="translate(-3372.822 -7615.724)"><path d="M10.518,0a10.077,10.077,0,0,0-1.3.082A10.511,10.511,0,1,0,10.518,0ZM2.63,10.518A7.9,7.9,0,0,1,7.4,3.273a10.52,10.52,0,0,0,7.556,13.771A7.89,7.89,0,0,1,2.63,10.518Z" transform="translate(2.25 2.25)" fill="currentColor"/></g></g></symbol>`,
    `<symbol id="${aV}" viewBox="0 0 26 26"><defs><linearGradient id="brand" x1=".5" x2=".5" y2="1.048" gradientUnits="objectBoundingBox"><stop offset="0" stop-color="#f27633"/><stop offset=".477" stop-color="#e94153"/><stop offset="1" stop-color="#8f2483"/></linearGradient></defs><path d="M12.972 26a13.078 13.078 0 0 1-6.128-1.525.9.9 0 1 1 .847-1.583 11.3 11.3 0 0 0 7.842 1.021.9.9 0 0 1 .409 1.748 13.138 13.138 0 0 1-2.97.338Zm-8.34-3.316a.9.9 0 0 1-.618-.246 12.952 12.952 0 0 1-3.7-6.363.9.9 0 0 1 1.748-.423 11.161 11.161 0 0 0 3.191 5.484.9.9 0 0 1-.618 1.548ZM.9 12.691H.815A.9.9 0 0 1 0 11.71a12.886 12.886 0 0 1 1.152-4.2.9.9 0 0 1 1.63.758 11.091 11.091 0 0 0-.982 3.611.9.9 0 0 1-.894.812Zm3.771-7.6a.9.9 0 0 1-.691-1.466q.116-.147.244-.289A.9.9 0 1 1 5.58 4.514c-.072.082-.141.165-.211.248a.9.9 0 0 1-.694.328Zm14.518 19.2a.9.9 0 0 1-.463-1.667A11.2 11.2 0 0 0 12.972 1.8a.9.9 0 1 1 0-1.8 13 13 0 0 1 6.682 24.161.893.893 0 0 1-.461.127Z" fill="url(#brand)"/><path d="M12.877 7.5A4.061 4.061 0 0 0 10.1 8.847 4.315 4.315 0 0 0 9 11.8v5.67a.351.351 0 0 0 .056.191.336.336 0 0 0 .15.126.324.324 0 0 0 .192.02.33.33 0 0 0 .171-.094l.519-.4a.326.326 0 0 1 .233-.066.331.331 0 0 1 .215.114l.895 1.039a.326.326 0 0 0 .471 0l.849-.985a.333.333 0 0 1 .113-.085.325.325 0 0 1 .273 0 .334.334 0 0 1 .113.085l.849.985a.326.326 0 0 0 .471 0l.895-1.039a.33.33 0 0 1 .215-.114.326.326 0 0 1 .233.066l.519.4a.33.33 0 0 0 .171.094.324.324 0 0 0 .192-.02.336.336 0 0 0 .149-.126.352.352 0 0 0 .056-.193v-5.841a4.235 4.235 0 0 0-.316-1.608 4.133 4.133 0 0 0-.9-1.354 3.989 3.989 0 0 0-1.34-.886 3.891 3.891 0 0 0-1.567-.279Zm-1.21 4.812a.652.652 0 0 1-.37-.116.683.683 0 0 1-.246-.309.706.706 0 0 1-.038-.4.7.7 0 0 1 .182-.352.661.661 0 0 1 .341-.188.648.648 0 0 1 .385.039.671.671 0 0 1 .3.253.7.7 0 0 1-.083.868.656.656 0 0 1-.471.207Zm2.667 0a.652.652 0 0 1-.37-.116.684.684 0 0 1-.246-.309.706.706 0 0 1-.038-.4.7.7 0 0 1 .182-.352.661.661 0 0 1 .341-.188.648.648 0 0 1 .385.039.671.671 0 0 1 .3.253.7.7 0 0 1-.083.868.656.656 0 0 1-.472.207Z" fill="url(#brand)"/></symbol>`,
    `<symbol id="${iV}" viewBox="0 0 26 26"><path d="M12.972 26a13.078 13.078 0 0 1-6.128-1.525.9.9 0 1 1 .847-1.583 11.3 11.3 0 0 0 7.842 1.021.9.9 0 0 1 .409 1.748 13.138 13.138 0 0 1-2.97.338Zm-8.34-3.316a.9.9 0 0 1-.618-.246 12.952 12.952 0 0 1-3.7-6.363.9.9 0 0 1 1.748-.423 11.161 11.161 0 0 0 3.191 5.484.9.9 0 0 1-.618 1.548ZM.9 12.691H.815A.9.9 0 0 1 0 11.71a12.886 12.886 0 0 1 1.152-4.2.9.9 0 0 1 1.63.758 11.091 11.091 0 0 0-.982 3.611.9.9 0 0 1-.894.812Zm3.771-7.6a.9.9 0 0 1-.691-1.466q.116-.147.244-.289A.9.9 0 1 1 5.58 4.514c-.072.082-.141.165-.211.248a.9.9 0 0 1-.694.328Zm14.518 19.2a.9.9 0 0 1-.463-1.667A11.2 11.2 0 0 0 12.972 1.8a.9.9 0 1 1 0-1.8 13 13 0 0 1 6.682 24.161.893.893 0 0 1-.461.127Z" fill="currentColor"/><path d="M12.877 7.5A4.061 4.061 0 0 0 10.1 8.847 4.315 4.315 0 0 0 9 11.8v5.67a.351.351 0 0 0 .056.191.336.336 0 0 0 .15.126.324.324 0 0 0 .192.02.33.33 0 0 0 .171-.094l.519-.4a.326.326 0 0 1 .233-.066.331.331 0 0 1 .215.114l.895 1.039a.326.326 0 0 0 .471 0l.849-.985a.333.333 0 0 1 .113-.085.325.325 0 0 1 .273 0 .334.334 0 0 1 .113.085l.849.985a.326.326 0 0 0 .471 0l.895-1.039a.33.33 0 0 1 .215-.114.326.326 0 0 1 .233.066l.519.4a.33.33 0 0 0 .171.094.324.324 0 0 0 .192-.02.336.336 0 0 0 .149-.126.352.352 0 0 0 .056-.193v-5.841a4.235 4.235 0 0 0-.316-1.608 4.133 4.133 0 0 0-.9-1.354 3.989 3.989 0 0 0-1.34-.886 3.891 3.891 0 0 0-1.567-.279Zm-1.21 4.812a.652.652 0 0 1-.37-.116.683.683 0 0 1-.246-.309.706.706 0 0 1-.038-.4.7.7 0 0 1 .182-.352.661.661 0 0 1 .341-.188.648.648 0 0 1 .385.039.671.671 0 0 1 .3.253.7.7 0 0 1-.083.868.656.656 0 0 1-.471.207Zm2.667 0a.652.652 0 0 1-.37-.116.684.684 0 0 1-.246-.309.706.706 0 0 1-.038-.4.7.7 0 0 1 .182-.352.661.661 0 0 1 .341-.188.648.648 0 0 1 .385.039.671.671 0 0 1 .3.253.7.7 0 0 1-.083.868.656.656 0 0 1-.472.207Z" fill="currentColor"/></symbol>`,
  ]),
    (VW.Mediator = qW.connect((e) => ({
      isFullscreen: e.igView.fullscreen,
      ghostStoryViewEnabled: e.ghostStoryView.enabled,
    }))(
      QW.theme.ThemeAware(
        class extends QW.Component {
          constructor(...e) {
            var t;
            return (
              (t = super(...e)),
              (this._onBackClick = () => {
                YW.controller.sendEvent("user", "control:back-click"),
                  ZW.send("ig.back");
              }),
              (this._onRefreshClick = () => {
                YW.controller.sendEvent("user", "control:refresh-click"),
                  KW.controller.refreshIframe();
              }),
              (this._onFullscreenClick = () => {
                const e = qW.state;
                clearTimeout(this._wideScreenOffTimeout),
                  this.props.isFullscreen &&
                    "applied" === e.abTesting.wideScreenState &&
                    (this._wideScreenOffTimeout = this.setTimeout(() => {
                      YW.controller.sendEvent("user", "ab:widescreen-off"),
                        qW.transaction(
                          (e) => (e.abTesting.wideScreenState = "off")
                        );
                    }, 4e3));
                const t = this.props.isFullscreen
                  ? "fullscreen:exit"
                  : "fullscreen:enter";
                qW.transaction((e) => {
                  e.igView.fullscreen = !e.igView.fullscreen;
                }),
                  YW.controller.sendEvent("user", t),
                  ZW.send("ig.widescreen-toggled");
              }),
              (this._onToggleThemeClick = () => {
                QW.theme.toggleTheme();
              }),
              (this._onToggleGhostStoryViewClick = () => {
                qW.transaction((e) => {
                  e.ghostStoryView.enabled = !e.ghostStoryView.enabled;
                }),
                  qW.state.ghostStoryView.enabled
                    ? YW.controller.sendEvent(
                        "user",
                        "ghost-story-view:toggle-on"
                      )
                    : YW.controller.sendEvent(
                        "user",
                        "ghost-story-view:toggle-off"
                      );
              }),
              t
            );
          }
          render() {
            return Glamor.createElement(QW.IgButtons, {
              isHorizontal: this.props.isHorizontal,
              buttons: [
                { id: "back", icon: JW, onClick: this._onBackClick },
                {
                  id: "refresh",
                  icon: eV,
                  onClick: this._onRefreshClick,
                  onLongPress: () => {
                    XW.controller.reset(), location.reload();
                  },
                },
                {
                  id: "widescreen",
                  icon: this.props.isFullscreen ? rV : tV,
                  onClick: this._onFullscreenClick,
                },
                {
                  id: "theme",
                  icon: "night" === this.state.theme ? nV : oV,
                  onClick: this._onToggleThemeClick,
                },
                {
                  id: "story-ghost-view",
                  icon: this.props.ghostStoryViewEnabled ? aV : iV,
                  tooltip: {
                    title:
                      "GHOST STORY VIEW ‚Äì " +
                      (this.props.ghostStoryViewEnabled ? "ON" : "OFF"),
                    text: Glamor.createElement(
                      React.Fragment,
                      null,
                      "Stay anonymous while viewing Instagram stories (turned",
                      " ",
                      this.props.ghostStoryViewEnabled ? "on" : "off",
                      ")"
                    ),
                  },
                  onClick: this._onToggleGhostStoryViewClick,
                },
              ],
            });
          }
        }
      )
    ));
  const {
    $reels: sV,
    $store: lV,
    $iframeBus: cV,
    $analytics: uV,
    $billing: dV,
  } = app;
  function hV() {
    return lV.proxy.hasPro({ feature: "reels" });
  }
  function pV() {
    const e = lV.state;
    return {
      hasPro: true,
      freeReels: Math.max(0, 2 - e.billing.trial.reels),
      maxFreeReels: 2,
    };
  }
  function mV() {
    uV.controller.sendEvent("user", "reels:open-billing"),
      dV.controller.openBilling("reels");
  }
  sV.controller = {
    init: function () {
      cV.on("reels.is-pro", hV),
        cV.on("reels.get-trial-data", pV),
        cV.on("reels.open-billing", mV),
        cV.on("reels.creation-session-start", () => {
          lV.transaction((e) => {
            e.reels.creating = !0;
          });
        }),
        cV.on("reels.creation-session-end", () => {
          lV.transaction((e) => {
            e.reels.creating = !1;
          });
        }),
        cV.on("reels.submit-success", () => {
          uV.controller.sendEvent("user", "reels:submit", "mobile"),
            true
              ? uV.controller.sendEvent(
                  "user",
                  "pro-paid-usage:reels",
                  "mobile"
                )
              : lV.transaction((e) => {
                  e.billing.trial.reels += 1;
                });
        });
    },
  };
  const { $coverAssist: gV } = app;
  gV.defaultState = {
    shown: !1,
    loading: !0,
    videoUrl: null,
    coverUrl: null,
    selectedTabId: "auto",
    showGrid: !1,
    gridImages: [],
    frameGalleryImages: [],
    frameGallerySelectedImage: null,
    frameSelectImage: null,
    frameSelectValue: 0.5,
    frameUploadImage: null,
  };
  const { $coverAssist: fV } = app;
  fV.extractFramesFromVideo = async (e, t) =>
    new Promise((r) => {
      const n = document.createElement("canvas"),
        o = n.getContext("2d"),
        a = [],
        i = document.createElement("video");
      (i.src = e),
        (i.muted = !0),
        i.addEventListener("loadedmetadata", () => {
          (n.width = i.videoWidth), (n.height = i.videoHeight), s();
        }),
        i.addEventListener("timeupdate", () => {
          o.drawImage(i, 0, 0),
            n.toBlob((e) => {
              const t = URL.createObjectURL(e);
              a.push(t), s();
            }, "image/jpeg");
        });
      const s = () => {
        const e = i.duration / (t + 1),
          o = a.length;
        o < t ? (i.currentTime = (o + 1) * e) : (i.remove(), n.remove(), r(a));
      };
    });
  const {
    $coverAssist: vV,
    $store: bV,
    $iframeBus: yV,
    $analytics: wV,
    $billing: CV,
    $ui: kV,
  } = app;
  vV.PanelMediator = bV.connect((e) => ({
    loading: e.coverAssist.loading,
    selectedTabId: e.coverAssist.selectedTabId,
    showGrid: e.coverAssist.showGrid,
    showResetButton: !!e.coverAssist.coverUrl,
    coverUrl: e.coverAssist.coverUrl,
    gridImages: e.coverAssist.gridImages,
    videoUrl: e.coverAssist.videoUrl,
    frameGalleryImages: e.coverAssist.frameGalleryImages,
    frameGallerySelectedImage: e.coverAssist.frameGallerySelectedImage,
    frameSelectImage: e.coverAssist.frameSelectImage,
    frameSelectValue: e.coverAssist.frameSelectValue,
    frameUploadImage: e.coverAssist.frameUploadImage,
    hasCoverAssistFeature: bV.proxy.hasPro({ feature: "coverAssist" }),
    isCreatingReels: e.reels.creating,
  }))(
    class extends kV.Component {
      constructor(e) {
        super(e),
          (this._onCloseClick = () => {
            bV.transaction((e) => {
              e.coverAssist.shown = !1;
            });
          }),
          (this._onTabClick = (e) => {
            bV.transaction((t) => {
              (t.coverAssist.selectedTabId = e),
                this.props.hasCoverAssistFeature &&
                  ("auto" === e
                    ? (t.coverAssist.coverUrl =
                        t.coverAssist.frameGallerySelectedImage)
                    : "frame" === e
                    ? (t.coverAssist.coverUrl = t.coverAssist.frameSelectImage)
                    : "upload" === e &&
                      (t.coverAssist.coverUrl =
                        t.coverAssist.frameUploadImage));
            });
          }),
          (this._onUpgradeToProClick = () => {
            CV.controller.openBilling("cover-assist"),
              wV.controller.sendEvent(
                "user",
                "cover-assist:upgrade-to-pro-click"
              );
          }),
          (this._onResetClick = () => {
            bV.transaction((e) => {
              (e.coverAssist.selectedTabId = "auto"),
                (e.coverAssist.frameGallerySelectedImage = null),
                (e.coverAssist.coverUrl = null);
            });
          }),
          (this._onGridButtonClick = () => {
            bV.transaction((e) => {
              e.coverAssist.showGrid = !e.coverAssist.showGrid;
            });
          }),
          (this._onFrameGalleryImageClick = (e) => {
            bV.transaction((t) => {
              (t.coverAssist.frameGallerySelectedImage = e),
                this.props.hasCoverAssistFeature
                  ? (t.coverAssist.coverUrl = e)
                  : this._showUpsell();
            });
          }),
          (this._onFrameSelectValueChange = (e) => {
            bV.transaction((t) => {
              t.coverAssist.frameSelectValue = e;
            });
          }),
          (this._onFrameSelectImageSelect = (e) => {
            bV.transaction((t) => {
              "frame" === t.coverAssist.selectedTabId &&
                ((t.coverAssist.frameSelectImage = e),
                this.props.hasCoverAssistFeature
                  ? (t.coverAssist.coverUrl = e)
                  : this._showUpsell());
            });
          }),
          (this._onFrameUploadFileSelect = async (e) => {
            const t = URL.createObjectURL(e);
            bV.transaction((e) => {
              (e.coverAssist.frameUploadImage = t),
                this.props.hasCoverAssistFeature
                  ? (e.coverAssist.coverUrl = t)
                  : this._showUpsell();
            });
          }),
          (this._showUpsell = () => {
            setTimeout(() => {
              this.setState({ showUpsell: !0 });
            }, 500);
          }),
          (this._onUpsellOverlayClick = () => {
            this.setState({ showUpsell: !1 });
          }),
          (this.state = { showUpsell: !1, defaultIgCoverUrl: null }),
          yV.send("cover-assist.get-default-ig-cover-url", (e) => {
            this.setState({ defaultIgCoverUrl: e });
          });
      }
      render() {
        return Glamor.createElement(kV.CoverAssistPanel, {
          loading: this.props.loading,
          selectedTabId: this.props.selectedTabId,
          showGrid: this.props.showGrid,
          showResetButton: this.props.showResetButton,
          hasPro: this.props.hasCoverAssistFeature,
          resetDisabled: this.props.resetDisabled,
          frameGallery: this._getFrameGallery(),
          frameSelect: this._getFrameSelect(),
          frameUpload: this._getFrameUpload(),
          grid: this._getGrid(),
          upsellOverlay: this._getUpsellOverlay(),
          onCloseClick: this._onCloseClick,
          onTabClick: this._onTabClick,
          onUpgradeToProClick: this._onUpgradeToProClick,
          onResetClick: this._onResetClick,
          onGridButtonClick: this._onGridButtonClick,
        });
      }
      _getFrameGallery() {
        return Glamor.createElement(kV.CoverAssistFrameGallery, {
          images: this.props.frameGalleryImages,
          selectedImage: this.props.frameGallerySelectedImage,
          isReelsView: this.props.isCreatingReels,
          onImageClick: this._onFrameGalleryImageClick,
        });
      }
      _getFrameSelect() {
        return Glamor.createElement(kV.CoverAssistFrameSelect, {
          videoUrl: this.props.videoUrl,
          value: this.props.frameSelectValue,
          isReelsView: this.props.isCreatingReels,
          onValueChange: this._onFrameSelectValueChange,
          onImageSelect: this._onFrameSelectImageSelect,
        });
      }
      _getFrameUpload() {
        return Glamor.createElement(kV.CoverAssistFrameUpload, {
          image: this.props.frameUploadImage,
          isReelsView: this.props.isCreatingReels,
          onFileSelect: this._onFrameUploadFileSelect,
        });
      }
      _getGrid() {
        const e = [
          this.props.coverUrl || this.state.defaultIgCoverUrl,
          ...this.props.gridImages,
        ];
        return Glamor.createElement(kV.CoverAssistGrid, { images: e });
      }
      _getUpsellOverlay() {
        return Glamor.createElement(CV.UpsellOverlayMediator, {
          show: this.state.showUpsell,
          feature: "cover-assist",
          onOverlayClick: this._onUpsellOverlayClick,
        });
      }
    }
  );
  const {
    $coverAssist: SV,
    $store: EV,
    $bus: _V,
    $iframeBus: xV,
    $analytics: PV,
  } = app;
  async function TV(e) {
    if (
      (EV.transaction((e) => {
        Object.assign(e.coverAssist, SV.defaultState);
      }),
      !e)
    )
      return;
    const t = await SV.extractFramesFromVideo(e, 12),
      r = EV.state.auth.username,
      n = await _V.send("ig-api.fetch-user-posts", r, 14);
    let o = [];
    n.result && (o = n.result.map((e) => e.imgx)),
      EV.transaction((r) => {
        (r.coverAssist.loading = !1),
          (r.coverAssist.videoUrl = e),
          (r.coverAssist.frameGalleryImages = t),
          (r.coverAssist.frameGallerySelectedImage = null),
          (r.coverAssist.gridImages = o);
      });
  }
  function IV(e, { isCustomCover: t }) {
    const r = EV.state;
    if (!t) return;
    if ("video" !== e) return;
    const n = r.coverAssist.selectedTabId;
    "auto" === n
      ? PV.controller.sendEvent("user", "cover-assist:submit-cover-auto")
      : "frame" === n
      ? PV.controller.sendEvent("user", "cover-assist:submit-cover-frame")
      : "upload" === n &&
        PV.controller.sendEvent("user", "cover-assist:submit-cover-upload"),
      (function (e = 0) {
        true
          ? PV.controller.sendEvent("user", "pro-paid-usage:cover-assist")
          : EV.transaction((t) => {
              t.billing.trial.coverAssist += e;
            });
      })(1);
  }
  SV.controller = {
    init: function () {
      EV.model.observe(
        (e) => e.coverAssist.coverUrl,
        async (e) => {
          if (e) {
            const t = await fetch(e),
              r = await t.blob();
            xV.send("cover-assist.synch-cover", r);
          } else xV.send("cover-assist.synch-cover", null);
        }
      ),
        xV.on("new-post-extra.creation-video-change", TV),
        xV.on("ig.published", IV);
    },
  };
  const { $igInterceptor: GV, $ffmpeg: DV, $iframeBus: AV } = app;
  GV.bitrateController = {
    init: function () {
      AV.on("igInterceptor.adjustBitrate", this._adjustBitrate.bind(this));
    },
    _adjustBitrate: async function (e) {
      if (!e) return;
      const t = URL.createObjectURL(e),
        r = e.name.split(".").pop(),
        n = `video.${r}`,
        o = `output.${r}`;
      await DV.controller.addFile(n, t);
      if ((await DV.controller.getBitrate(n)) < 1e5) return;
      await DV.controller.run(
        [`-i ${n}`, "-c:v libx264", "-preset ultrafast", "output.mp4"].join(" ")
      );
      const a = await DV.controller.readFile(o, e.type);
      return (
        await DV.controller.removeFile(n), await DV.controller.removeFile(o), a
      );
    },
  };
  const { $igInterceptor: MV } = app;
  MV.controller = {
    init: function () {
      MV.bitrateController.init(), MV.metadataController.init();
    },
  };
  const { $igInterceptor: FV, $ffmpeg: RV, $iframeBus: LV } = app;
  FV.metadataController = {
    init: function () {
      LV.on("igInterceptor.stripMetadata", this._stripMetadata.bind(this));
    },
    _stripMetadata: async function (e) {
      if (!e) return;
      const t = URL.createObjectURL(e),
        r = e.name.split(".").pop(),
        n = `video.${r}`,
        o = `output.${r}`;
      await RV.controller.addFile(n, t),
        await RV.controller.run(
          [`-i ${n}`, "-map_metadata -1", "-c:v copy", "-c:a copy", o].join(" ")
        );
      const a = await RV.controller.readFile(o, e.type);
      return (
        await RV.controller.removeFile(n), await RV.controller.removeFile(o), a
      );
    },
  };
  const { $idb: BV, $bus: OV } = app;
  BV.controller = {
    init: async function () {
      Object.assign(BV, this._createApi("data")),
        (BV.on = this.on.bind(this)),
        (this._db = await this._open("inssist")),
        (this._handlers = { change: [], storageExceeded: [] }),
        OV.on("idb.change", () => this._call("change")),
        OV.on("idb.storageExceeded", () => this._call("storageExceeded")),
        await this._enablePersistentStorage();
    },
    on: function (e, t) {
      if (!this._handlers[e]) throw new Error(`unsupported event "${e}"`);
      this._handlers[e].push(t);
    },
    _createApi: function (e) {
      return {
        get: this._get.bind(this, e),
        has: this._has.bind(this, e),
        set: this._set.bind(this, e),
        keys: this._keys.bind(this, e),
        clear: this._clear.bind(this, e),
        remove: this._remove.bind(this, e),
      };
    },
    _get: async function (e, t, r = null) {
      return new Promise((n, o) => {
        const a = this._db.transaction([e], "readonly").objectStore(e).get(t);
        (a.onsuccess = () => {
          var e, t;
          return n(
            null !==
              (e =
                null === (t = a.result) || void 0 === t ? void 0 : t.value) &&
              void 0 !== e
              ? e
              : r
          );
        }),
          (a.onerror = () => o(a.error));
      });
    },
    _has: async function (e, t) {
      return new Promise((r, n) => {
        const o = this._db
          .transaction([e], "readonly")
          .objectStore(e)
          .getKey(t);
        (o.onsuccess = () => r(void 0 !== o.result)),
          (o.onerror = () => n(o.error));
      });
    },
    _set: async function (e, t, r) {
      await new Promise((n, o) => {
        const a = this._db.transaction([e], "readwrite"),
          i = a.objectStore(e).put({ id: t, value: r });
        (i.onsuccess = () => {
          OV.call("idb.change", { type: "set", key: t, value: r }),
            OV.send("idb.change", { type: "set", key: t, value: r }),
            n();
        }),
          (i.onerror = () => o(i.error)),
          (a.onabort = () => o(a.error)),
          (a.onabort = () => {
            "QuotaExceededError" === a.error.name &&
              (OV.call("idb.storageExceeded"), OV.send("idb.storageExceeded")),
              o(a.error);
          });
      });
    },
    _keys: async function (e) {
      return new Promise((t, r) => {
        const n = this._db
          .transaction([e], "readonly")
          .objectStore(e)
          .getAllKeys();
        (n.onsuccess = () => t(n.result)), (n.onerror = () => r(n.error));
      });
    },
    _clear: async function (e) {
      return new Promise((t, r) => {
        const n = this._db.transaction([e], "readwrite").objectStore(e).clear();
        (n.onsuccess = () => {
          OV.call("idb.change", { type: "clear" }),
            OV.send("idb.change", { type: "clear" }),
            t();
        }),
          (n.onerror = () => r(n.error));
      });
    },
    _remove: async function (e, t) {
      return new Promise((r, n) => {
        const o = this._db
          .transaction([e], "readwrite")
          .objectStore(e)
          .delete(t);
        (o.onsuccess = () => {
          OV.call("idb.change", { type: "remove", key: t }),
            OV.send("idb.change", { type: "remove", key: t }),
            r();
        }),
          (o.onerror = () => n(o.error));
      });
    },
    _open: async function (e) {
      return new Promise((t, r) => {
        const n = indexedDB.open(e, 1);
        (n.onsuccess = () => t(n.result)),
          (n.onerror = () => r(n.error)),
          (n.onupgradeneeded = () => {
            const e = n.result;
            new Set(e.objectStoreNames).has("data") ||
              e.createObjectStore("data", { keyPath: "id" });
          });
      });
    },
    _call: function (e) {
      this._handlers[e].forEach((e) => e());
    },
    _enablePersistentStorage: async function () {
      navigator.storage.persist && (await navigator.storage.persist());
    },
  };
  const { $webRequest: $V, $bus: NV, $utils: UV } = app;
  $V.controller = {
    init: async function () {
      const e = await UV.callAsync(chrome.tabs.getCurrent);
      await NV.send("webRequest.popupTabCreated", e.id);
    },
  };
  const { $network: HV, $shortid: zV, $sha256: jV } = app;
  HV.Sender = class e {
    constructor(e = {}) {
      this.options = e;
    }
    send(
      t,
      { params: r, query: n, body: o, method: a, headers: i, token: s } = {}
    ) {
      if (!t) throw new Error("url parameter is mandatory");
      if (this.options.by && this.options.secret) {
        const t = this.options.by,
          r = zV.generate(),
          o = e._hash(this.options.secret, r);
        n = { ...n, by: t, salt: r, hash: o };
      }
      return (
        (a = a || (o ? "POST" : "GET")),
        (o = JSON.stringify(o)),
        (t = `${this._inject(t, r)}?${this._encode(n)}`),
        this.options.urlPrefix &&
          !t.startsWith("http") &&
          (t = `${this.options.urlPrefix}${t}`),
        "POST" === a && (i = { ...i, "content-type": "application/json" }),
        s && (i = { ...i, Authorization: `Bearer ${s}` }),
        fetch(t, { body: o, method: a, headers: i }).then(e._toJson)
      );
    }
    _inject(e, t) {
      if (!t) return e;
      for (const r in t) {
        const n = t[r];
        e = e.replace(`:${r}`, encodeURIComponent(n));
      }
      return e;
    }
    _encode(e) {
      return e
        ? Object.keys(e)
            .map((t) => `${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`)
            .join("&")
        : "";
    }
    static _toJson(e) {
      return e.json();
    }
    static _hash(e, t) {
      return jV.calc(`${e}${t}`);
    }
  };
  /*! *****************************************************************************
  Copyright (c) Microsoft Corporation.
  
  Permission to use, copy, modify, and/or distribute this software for any
  purpose with or without fee is hereby granted.
  
  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
  REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
  INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  PERFORMANCE OF THIS SOFTWARE.
  ******************************************************************************/
  var WV = function (e, t) {
    return (WV =
      Object.setPrototypeOf ||
      ({ __proto__: [] } instanceof Array &&
        function (e, t) {
          e.__proto__ = t;
        }) ||
      function (e, t) {
        for (var r in t) t.hasOwnProperty(r) && (e[r] = t[r]);
      })(e, t);
  };
  function VV(e, t) {
    function r() {
      this.constructor = e;
    }
    WV(e, t),
      (e.prototype =
        null === t ? Object.create(t) : ((r.prototype = t.prototype), new r()));
  }
  var qV = function () {
    return (qV =
      Object.assign ||
      function (e) {
        for (var t, r = 1, n = arguments.length; r < n; r++)
          for (var o in (t = arguments[r]))
            Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
        return e;
      }).apply(this, arguments);
  };
  function ZV(e) {
    var t = "function" == typeof Symbol && Symbol.iterator,
      r = t && e[t],
      n = 0;
    if (r) return r.call(e);
    if (e && "number" == typeof e.length)
      return {
        next: function () {
          return (
            e && n >= e.length && (e = void 0), { value: e && e[n++], done: !e }
          );
        },
      };
    throw new TypeError(
      t ? "Object is not iterable." : "Symbol.iterator is not defined."
    );
  }
  function YV(e, t) {
    var r = "function" == typeof Symbol && e[Symbol.iterator];
    if (!r) return e;
    var n,
      o,
      a = r.call(e),
      i = [];
    try {
      for (; (void 0 === t || t-- > 0) && !(n = a.next()).done; )
        i.push(n.value);
    } catch (e) {
      o = { error: e };
    } finally {
      try {
        n && !n.done && (r = a.return) && r.call(a);
      } finally {
        if (o) throw o.error;
      }
    }
    return i;
  }
  function QV() {
    for (var e = [], t = 0; t < arguments.length; t++)
      e = e.concat(YV(arguments[t]));
    return e;
  }
  var KV = {};
  function XV(e) {
    switch (Object.prototype.toString.call(e)) {
      case "[object Error]":
      case "[object Exception]":
      case "[object DOMException]":
        return !0;
      default:
        return uq(e, Error);
    }
  }
  function JV(e) {
    return "[object ErrorEvent]" === Object.prototype.toString.call(e);
  }
  function eq(e) {
    return "[object DOMError]" === Object.prototype.toString.call(e);
  }
  function tq(e) {
    return "[object DOMException]" === Object.prototype.toString.call(e);
  }
  function rq(e) {
    return "[object String]" === Object.prototype.toString.call(e);
  }
  function nq(e) {
    return null === e || ("object" != typeof e && "function" != typeof e);
  }
  function oq(e) {
    return "[object Object]" === Object.prototype.toString.call(e);
  }
  function aq(e) {
    return "undefined" != typeof Event && uq(e, Event);
  }
  function iq(e) {
    return "undefined" != typeof Element && uq(e, Element);
  }
  function sq(e) {
    return "[object RegExp]" === Object.prototype.toString.call(e);
  }
  function lq(e) {
    return Boolean(e && e.then && "function" == typeof e.then);
  }
  function cq(e) {
    return (
      oq(e) &&
      "nativeEvent" in e &&
      "preventDefault" in e &&
      "stopPropagation" in e
    );
  }
  function uq(e, t) {
    try {
      return e instanceof t;
    } catch (e) {
      return !1;
    }
  }
  function dq(e) {
    try {
      for (
        var t = e, r = [], n = 0, o = 0, a = " > ".length, i = void 0;
        t &&
        n++ < 5 &&
        !(
          "html" === (i = hq(t)) ||
          (n > 1 && o + r.length * a + i.length >= 80)
        );

      )
        r.push(i), (o += i.length), (t = t.parentNode);
      return r.reverse().join(" > ");
    } catch (e) {
      return "<unknown>";
    }
  }
  function hq(e) {
    var t,
      r,
      n,
      o,
      a,
      i = e,
      s = [];
    if (!i || !i.tagName) return "";
    if (
      (s.push(i.tagName.toLowerCase()),
      i.id && s.push("#" + i.id),
      (t = i.className) && rq(t))
    )
      for (r = t.split(/\s+/), a = 0; a < r.length; a++) s.push("." + r[a]);
    var l = ["type", "name", "title", "alt"];
    for (a = 0; a < l.length; a++)
      (n = l[a]), (o = i.getAttribute(n)) && s.push("[" + n + '="' + o + '"]');
    return s.join("");
  }
  r(KV, "isError", function () {
    return XV;
  }),
    r(KV, "isErrorEvent", function () {
      return JV;
    }),
    r(KV, "isDOMError", function () {
      return eq;
    }),
    r(KV, "isDOMException", function () {
      return tq;
    }),
    r(KV, "isString", function () {
      return rq;
    }),
    r(KV, "isPrimitive", function () {
      return nq;
    }),
    r(KV, "isPlainObject", function () {
      return oq;
    }),
    r(KV, "isEvent", function () {
      return aq;
    }),
    r(KV, "isElement", function () {
      return iq;
    }),
    r(KV, "isRegExp", function () {
      return sq;
    }),
    r(KV, "isThenable", function () {
      return lq;
    }),
    r(KV, "isSyntheticEvent", function () {
      return cq;
    }),
    r(KV, "isInstanceOf", function () {
      return uq;
    }),
    r({}, "htmlTreeAsString", function () {
      return dq;
    });
  var pq =
    Object.setPrototypeOf ||
    ({ __proto__: [] } instanceof Array
      ? function (e, t) {
          return (e.__proto__ = t), e;
        }
      : function (e, t) {
          for (var r in t) e.hasOwnProperty(r) || (e[r] = t[r]);
          return e;
        });
  var mq = (function (e) {
    function t(t) {
      var r = this.constructor,
        n = e.call(this, t) || this;
      return (
        (n.message = t),
        (n.name = r.prototype.constructor.name),
        pq(n, r.prototype),
        n
      );
    }
    return VV(t, e), t;
  })(Error);
  r({}, "SentryError", function () {
    return mq;
  });
  var gq = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/,
    fq = "Invalid Dsn",
    vq = (function () {
      function e(e) {
        "string" == typeof e ? this._fromString(e) : this._fromComponents(e),
          this._validate();
      }
      return (
        (e.prototype.toString = function (e) {
          void 0 === e && (e = !1);
          var t = this,
            r = t.host,
            n = t.path,
            o = t.pass,
            a = t.port,
            i = t.projectId;
          return (
            t.protocol +
            "://" +
            t.user +
            (e && o ? ":" + o : "") +
            "@" +
            r +
            (a ? ":" + a : "") +
            "/" +
            (n ? n + "/" : n) +
            i
          );
        }),
        (e.prototype._fromString = function (e) {
          var t = gq.exec(e);
          if (!t) throw new mq(fq);
          var r = YV(t.slice(1), 6),
            n = r[0],
            o = r[1],
            a = r[2],
            i = void 0 === a ? "" : a,
            s = r[3],
            l = r[4],
            c = void 0 === l ? "" : l,
            u = "",
            d = r[5],
            h = d.split("/");
          if (
            (h.length > 1 && ((u = h.slice(0, -1).join("/")), (d = h.pop())), d)
          ) {
            var p = d.match(/^\d+/);
            p && (d = p[0]);
          }
          this._fromComponents({
            host: s,
            pass: i,
            path: u,
            projectId: d,
            port: c,
            protocol: n,
            user: o,
          });
        }),
        (e.prototype._fromComponents = function (e) {
          (this.protocol = e.protocol),
            (this.user = e.user),
            (this.pass = e.pass || ""),
            (this.host = e.host),
            (this.port = e.port || ""),
            (this.path = e.path || ""),
            (this.projectId = e.projectId);
        }),
        (e.prototype._validate = function () {
          var e = this;
          if (
            (["protocol", "user", "host", "projectId"].forEach(function (t) {
              if (!e[t]) throw new mq("Invalid Dsn: " + t + " missing");
            }),
            !this.projectId.match(/^\d+$/))
          )
            throw new mq("Invalid Dsn: Invalid projectId " + this.projectId);
          if ("http" !== this.protocol && "https" !== this.protocol)
            throw new mq("Invalid Dsn: Invalid protocol " + this.protocol);
          if (this.port && isNaN(parseInt(this.port, 10)))
            throw new mq("Invalid Dsn: Invalid port " + this.port);
        }),
        e
      );
    })();
  r({}, "Dsn", function () {
    return vq;
  });
  var bq = {},
    yq = {},
    wq = (function () {
      function e() {
        (this._hasWeakSet = "function" == typeof WeakSet),
          (this._inner = this._hasWeakSet ? new WeakSet() : []);
      }
      return (
        (e.prototype.memoize = function (e) {
          if (this._hasWeakSet)
            return !!this._inner.has(e) || (this._inner.add(e), !1);
          for (var t = 0; t < this._inner.length; t++) {
            if (this._inner[t] === e) return !0;
          }
          return this._inner.push(e), !1;
        }),
        (e.prototype.unmemoize = function (e) {
          if (this._hasWeakSet) this._inner.delete(e);
          else
            for (var t = 0; t < this._inner.length; t++)
              if (this._inner[t] === e) {
                this._inner.splice(t, 1);
                break;
              }
        }),
        e
      );
    })();
  r({}, "Memo", function () {
    return wq;
  });
  var Cq = "<anonymous>";
  function kq(e) {
    try {
      return (e && "function" == typeof e && e.name) || Cq;
    } catch (e) {
      return Cq;
    }
  }
  r({}, "getFunctionName", function () {
    return kq;
  });
  var Sq = {};
  function Eq(e, t) {
    return (
      void 0 === t && (t = 0),
      "string" != typeof e || 0 === t || e.length <= t
        ? e
        : e.substr(0, t) + "..."
    );
  }
  function _q(e, t) {
    var r = e,
      n = r.length;
    if (n <= 150) return r;
    t > n && (t = n);
    var o = Math.max(t - 60, 0);
    o < 5 && (o = 0);
    var a = Math.min(o + 140, n);
    return (
      a > n - 5 && (a = n),
      a === n && (o = Math.max(a - 140, 0)),
      (r = r.slice(o, a)),
      o > 0 && (r = "'{snip} " + r),
      a < n && (r += " {snip}"),
      r
    );
  }
  function xq(e, t) {
    if (!Array.isArray(e)) return "";
    for (var r = [], n = 0; n < e.length; n++) {
      var o = e[n];
      try {
        r.push(String(o));
      } catch (e) {
        r.push("[value cannot be serialized]");
      }
    }
    return r.join(t);
  }
  function Pq(e, t) {
    return (
      !!rq(e) &&
      (sq(t) ? t.test(e) : "string" == typeof t && -1 !== e.indexOf(t))
    );
  }
  function Tq(e, t, r) {
    if (t in e) {
      var n = e[t],
        o = r(n);
      if ("function" == typeof o)
        try {
          (o.prototype = o.prototype || {}),
            Object.defineProperties(o, {
              __sentry_original__: { enumerable: !1, value: n },
            });
        } catch (e) {}
      e[t] = o;
    }
  }
  function Iq(e) {
    return Object.keys(e)
      .map(function (t) {
        return encodeURIComponent(t) + "=" + encodeURIComponent(e[t]);
      })
      .join("&");
  }
  function Gq(e) {
    if (XV(e)) {
      var t = e,
        r = { message: t.message, name: t.name, stack: t.stack };
      for (var n in t)
        Object.prototype.hasOwnProperty.call(t, n) && (r[n] = t[n]);
      return r;
    }
    if (aq(e)) {
      var o = e,
        a = {};
      a.type = o.type;
      try {
        a.target = iq(o.target)
          ? dq(o.target)
          : Object.prototype.toString.call(o.target);
      } catch (e) {
        a.target = "<unknown>";
      }
      try {
        a.currentTarget = iq(o.currentTarget)
          ? dq(o.currentTarget)
          : Object.prototype.toString.call(o.currentTarget);
      } catch (e) {
        a.currentTarget = "<unknown>";
      }
      for (var n in ("undefined" != typeof CustomEvent &&
        uq(e, CustomEvent) &&
        (a.detail = o.detail),
      o))
        Object.prototype.hasOwnProperty.call(o, n) && (a[n] = o);
      return a;
    }
    return e;
  }
  function Dq(e) {
    return (function (e) {
      return ~-encodeURI(e).split(/%..|./).length;
    })(JSON.stringify(e));
  }
  function Aq(e, t, r) {
    void 0 === t && (t = 3), void 0 === r && (r = 102400);
    var n = Rq(e, t);
    return Dq(n) > r ? Aq(e, t - 1, r) : n;
  }
  function Mq(t, r) {
    return "domain" === r && t && "object" == typeof t && t._events
      ? "[Domain]"
      : "domainEmitter" === r
      ? "[DomainEmitter]"
      : void 0 !== e && t === e
      ? "[Global]"
      : "undefined" != typeof window && t === window
      ? "[Window]"
      : "undefined" != typeof document && t === document
      ? "[Document]"
      : cq(t)
      ? "[SyntheticEvent]"
      : "number" == typeof t && t != t
      ? "[NaN]"
      : void 0 === t
      ? "[undefined]"
      : "function" == typeof t
      ? "[Function: " + kq(t) + "]"
      : t;
  }
  function Fq(e, t, r, n) {
    if ((void 0 === r && (r = 1 / 0), void 0 === n && (n = new wq()), 0 === r))
      return (function (e) {
        var t = Object.prototype.toString.call(e);
        if ("string" == typeof e) return e;
        if ("[object Object]" === t) return "[Object]";
        if ("[object Array]" === t) return "[Array]";
        var r = Mq(e);
        return nq(r) ? r : t;
      })(t);
    if (null != t && "function" == typeof t.toJSON) return t.toJSON();
    var o = Mq(t, e);
    if (nq(o)) return o;
    var a = Gq(t),
      i = Array.isArray(t) ? [] : {};
    if (n.memoize(t)) return "[Circular ~]";
    for (var s in a)
      Object.prototype.hasOwnProperty.call(a, s) &&
        (i[s] = Fq(s, a[s], r - 1, n));
    return n.unmemoize(t), i;
  }
  function Rq(e, t) {
    try {
      return JSON.parse(
        JSON.stringify(e, function (e, r) {
          return Fq(e, r, t);
        })
      );
    } catch (e) {
      return "**non-serializable**";
    }
  }
  function Lq(e, t) {
    void 0 === t && (t = 40);
    var r = Object.keys(Gq(e));
    if ((r.sort(), !r.length)) return "[object has no keys]";
    if (r[0].length >= t) return Eq(r[0], t);
    for (var n = r.length; n > 0; n--) {
      var o = r.slice(0, n).join(", ");
      if (!(o.length > t)) return n === r.length ? o : Eq(o, t);
    }
    return "";
  }
  r(Sq, "truncate", function () {
    return Eq;
  }),
    r(Sq, "snipLine", function () {
      return _q;
    }),
    r(Sq, "safeJoin", function () {
      return xq;
    }),
    r(Sq, "isMatchingPattern", function () {
      return Pq;
    }),
    r(yq, "fill", function () {
      return Tq;
    }),
    r(yq, "urlEncode", function () {
      return Iq;
    }),
    r(yq, "normalizeToSize", function () {
      return Aq;
    }),
    r(yq, "normalize", function () {
      return Rq;
    }),
    r(yq, "extractExceptionKeysForMessage", function () {
      return Lq;
    });
  var Bq = function () {
      var e = this,
        t = { exports: this };
      e.__esModule = !0;
      var n = tg;
      function o() {
        return (
          "[object process]" ===
          Object.prototype.toString.call(void 0 !== n ? n : 0)
        );
      }
      function a(e, t) {
        return e.require(t);
      }
      r(e, "isNodeEnv", function () {
        return o;
      }),
        r(e, "dynamicRequire", function () {
          return a;
        });
      var i = ["cookies", "data", "headers", "method", "query_string", "url"];
      function s(e, r) {
        if ((void 0 === r && (r = i), !o()))
          throw new Error(
            "Can't get node request data outside of a node environment"
          );
        var n = {},
          s = e.headers || e.header || {},
          l = e.method,
          c = e.hostname || e.host || s.host || "<no host>",
          u =
            "https" === e.protocol || e.secure || (e.socket || {}).encrypted
              ? "https"
              : "http",
          d = e.originalUrl || e.url,
          h = u + "://" + c + d;
        return (
          r.forEach(function (r) {
            switch (r) {
              case "headers":
                n.headers = s;
                break;
              case "method":
                n.method = l;
                break;
              case "url":
                n.url = h;
                break;
              case "cookies":
                n.cookies = a(t, "cookie").parse(s.cookie || "");
                break;
              case "query_string":
                n.query_string = a(t, "url").parse(d || "", !1).query;
                break;
              case "data":
                if ("GET" === l || "HEAD" === l) break;
                void 0 !== e.body &&
                  (n.data = rq(e.body) ? e.body : JSON.stringify(Rq(e.body)));
                break;
              default:
                ({}).hasOwnProperty.call(e, r) && (n[r] = e[r]);
            }
          }),
          n
        );
      }
      return (
        r(e, "extractNodeRequestData", function () {
          return s;
        }),
        t.exports
      );
    }.call({}),
    Oq = {};
  function $q() {
    return Bq.isNodeEnv()
      ? e
      : "undefined" != typeof window
      ? window
      : "undefined" != typeof self
      ? self
      : Oq;
  }
  function Nq() {
    var e = $q(),
      t = e.crypto || e.msCrypto;
    if (void 0 !== t && t.getRandomValues) {
      var r = new Uint16Array(8);
      t.getRandomValues(r),
        (r[3] = (4095 & r[3]) | 16384),
        (r[4] = (16383 & r[4]) | 32768);
      var n = function (e) {
        for (var t = e.toString(16); t.length < 4; ) t = "0" + t;
        return t;
      };
      return (
        n(r[0]) +
        n(r[1]) +
        n(r[2]) +
        n(r[3]) +
        n(r[4]) +
        n(r[5]) +
        n(r[6]) +
        n(r[7])
      );
    }
    return "xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g, function (e) {
      var t = (16 * Math.random()) | 0;
      return ("x" === e ? t : (3 & t) | 8).toString(16);
    });
  }
  function Uq(e) {
    if (!e) return {};
    var t = e.match(
      /^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/
    );
    if (!t) return {};
    var r = t[6] || "",
      n = t[8] || "";
    return { host: t[4], path: t[5], protocol: t[2], relative: t[5] + r + n };
  }
  function Hq(e) {
    if (e.message) return e.message;
    if (e.exception && e.exception.values && e.exception.values[0]) {
      var t = e.exception.values[0];
      return t.type && t.value
        ? t.type + ": " + t.value
        : t.type || t.value || e.event_id || "<unknown>";
    }
    return e.event_id || "<unknown>";
  }
  function zq(e) {
    var t = $q();
    if (!("console" in t)) return e();
    var r = t.console,
      n = {};
    ["debug", "info", "warn", "error", "log", "assert"].forEach(function (e) {
      e in t.console &&
        r[e].__sentry_original__ &&
        ((n[e] = r[e]), (r[e] = r[e].__sentry_original__));
    });
    var o = e();
    return (
      Object.keys(n).forEach(function (e) {
        r[e] = n[e];
      }),
      o
    );
  }
  function jq(e, t, r) {
    (e.exception = e.exception || {}),
      (e.exception.values = e.exception.values || []),
      (e.exception.values[0] = e.exception.values[0] || {}),
      (e.exception.values[0].value = e.exception.values[0].value || t || ""),
      (e.exception.values[0].type = e.exception.values[0].type || r || "Error");
  }
  function Wq(e, t) {
    void 0 === t && (t = {});
    try {
      (e.exception.values[0].mechanism = e.exception.values[0].mechanism || {}),
        Object.keys(t).forEach(function (r) {
          e.exception.values[0].mechanism[r] = t[r];
        });
    } catch (e) {}
  }
  function Vq() {
    try {
      return document.location.href;
    } catch (e) {
      return "";
    }
  }
  r(bq, "getGlobalObject", function () {
    return $q;
  }),
    r(bq, "uuid4", function () {
      return Nq;
    }),
    r(bq, "parseUrl", function () {
      return Uq;
    }),
    r(bq, "getEventDescription", function () {
      return Hq;
    }),
    r(bq, "consoleSandbox", function () {
      return zq;
    }),
    r(bq, "addExceptionTypeValue", function () {
      return jq;
    }),
    r(bq, "addExceptionMechanism", function () {
      return Wq;
    }),
    r(bq, "getLocationHref", function () {
      return Vq;
    });
  function qq(e, t) {
    if (!t) return 6e4;
    var r = parseInt("" + t, 10);
    if (!isNaN(r)) return 1e3 * r;
    var n = Date.parse("" + t);
    return isNaN(n) ? 6e4 : n - e;
  }
  r(bq, "parseRetryAfterHeader", function () {
    return qq;
  });
  var Zq = $q(),
    Yq = (function () {
      function e() {
        this._enabled = !1;
      }
      return (
        (e.prototype.disable = function () {
          this._enabled = !1;
        }),
        (e.prototype.enable = function () {
          this._enabled = !0;
        }),
        (e.prototype.log = function () {
          for (var e = [], t = 0; t < arguments.length; t++)
            e[t] = arguments[t];
          this._enabled &&
            zq(function () {
              Zq.console.log("Sentry Logger [Log]: " + e.join(" "));
            });
        }),
        (e.prototype.warn = function () {
          for (var e = [], t = 0; t < arguments.length; t++)
            e[t] = arguments[t];
          this._enabled &&
            zq(function () {
              Zq.console.warn("Sentry Logger [Warn]: " + e.join(" "));
            });
        }),
        (e.prototype.error = function () {
          for (var e = [], t = 0; t < arguments.length; t++)
            e[t] = arguments[t];
          this._enabled &&
            zq(function () {
              Zq.console.error("Sentry Logger [Error]: " + e.join(" "));
            });
        }),
        e
      );
    })();
  Zq.__SENTRY__ = Zq.__SENTRY__ || {};
  var Qq = Zq.__SENTRY__.logger || (Zq.__SENTRY__.logger = new Yq());
  r({}, "logger", function () {
    return Qq;
  });
  var Kq = {};
  function Xq() {
    if (!("fetch" in $q())) return !1;
    try {
      return new Headers(), new Request(""), new Response(), !0;
    } catch (e) {
      return !1;
    }
  }
  function Jq(e) {
    return (
      e && /^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())
    );
  }
  function eZ() {
    if (!Xq()) return !1;
    var e = $q();
    if (Jq(e.fetch)) return !0;
    var t = !1,
      r = e.document;
    if (r && "function" == typeof r.createElement)
      try {
        var n = r.createElement("iframe");
        (n.hidden = !0),
          r.head.appendChild(n),
          n.contentWindow &&
            n.contentWindow.fetch &&
            (t = Jq(n.contentWindow.fetch)),
          r.head.removeChild(n);
      } catch (e) {
        Qq.warn(
          "Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",
          e
        );
      }
    return t;
  }
  function tZ() {
    if (!Xq()) return !1;
    try {
      return new Request("_", { referrerPolicy: "origin" }), !0;
    } catch (e) {
      return !1;
    }
  }
  function rZ() {
    var e = $q(),
      t = e.chrome,
      r = t && t.app && t.app.runtime,
      n = "history" in e && !!e.history.pushState && !!e.history.replaceState;
    return !r && n;
  }
  r(Kq, "supportsFetch", function () {
    return Xq;
  }),
    r(Kq, "supportsNativeFetch", function () {
      return eZ;
    }),
    r(Kq, "supportsReferrerPolicy", function () {
      return tZ;
    }),
    r(Kq, "supportsHistory", function () {
      return rZ;
    });
  var nZ,
    oZ = $q(),
    aZ = {},
    iZ = {};
  function sZ(e) {
    if (!iZ[e])
      switch (((iZ[e] = !0), e)) {
        case "console":
          !(function () {
            if (!("console" in oZ)) return;
            ["debug", "info", "warn", "error", "log", "assert"].forEach(
              function (e) {
                e in oZ.console &&
                  Tq(oZ.console, e, function (t) {
                    return function () {
                      for (var r = [], n = 0; n < arguments.length; n++)
                        r[n] = arguments[n];
                      cZ("console", { args: r, level: e }),
                        t && Function.prototype.apply.call(t, oZ.console, r);
                    };
                  });
              }
            );
          })();
          break;
        case "dom":
          !(function () {
            if (!("document" in oZ)) return;
            oZ.document.addEventListener(
              "click",
              gZ("click", cZ.bind(null, "dom")),
              !1
            ),
              oZ.document.addEventListener(
                "keypress",
                fZ(cZ.bind(null, "dom")),
                !1
              ),
              ["EventTarget", "Node"].forEach(function (e) {
                var t = oZ[e] && oZ[e].prototype;
                t &&
                  t.hasOwnProperty &&
                  t.hasOwnProperty("addEventListener") &&
                  (Tq(t, "addEventListener", function (e) {
                    return function (t, r, n) {
                      return (
                        r && r.handleEvent
                          ? ("click" === t &&
                              Tq(r, "handleEvent", function (e) {
                                return function (t) {
                                  return (
                                    gZ("click", cZ.bind(null, "dom"))(t),
                                    e.call(this, t)
                                  );
                                };
                              }),
                            "keypress" === t &&
                              Tq(r, "handleEvent", function (e) {
                                return function (t) {
                                  return (
                                    fZ(cZ.bind(null, "dom"))(t), e.call(this, t)
                                  );
                                };
                              }))
                          : ("click" === t &&
                              gZ("click", cZ.bind(null, "dom"), !0)(this),
                            "keypress" === t && fZ(cZ.bind(null, "dom"))(this)),
                        e.call(this, t, r, n)
                      );
                    };
                  }),
                  Tq(t, "removeEventListener", function (e) {
                    return function (t, r, n) {
                      try {
                        e.call(this, t, r.__sentry_wrapped__, n);
                      } catch (e) {}
                      return e.call(this, t, r, n);
                    };
                  }));
              });
          })();
          break;
        case "xhr":
          !(function () {
            if (!("XMLHttpRequest" in oZ)) return;
            var e = [],
              t = [],
              r = XMLHttpRequest.prototype;
            Tq(r, "open", function (r) {
              return function () {
                for (var n = [], o = 0; o < arguments.length; o++)
                  n[o] = arguments[o];
                var a = this,
                  i = n[1];
                (a.__sentry_xhr__ = {
                  method: rq(n[0]) ? n[0].toUpperCase() : n[0],
                  url: n[1],
                }),
                  rq(i) &&
                    "POST" === a.__sentry_xhr__.method &&
                    i.match(/sentry_key/) &&
                    (a.__sentry_own_request__ = !0);
                var s = function () {
                  if (4 === a.readyState) {
                    try {
                      a.__sentry_xhr__ &&
                        (a.__sentry_xhr__.status_code = a.status);
                    } catch (e) {}
                    try {
                      var r = e.indexOf(a);
                      if (-1 !== r) {
                        e.splice(r);
                        var o = t.splice(r)[0];
                        a.__sentry_xhr__ &&
                          void 0 !== o[0] &&
                          (a.__sentry_xhr__.body = o[0]);
                      }
                    } catch (e) {}
                    cZ("xhr", {
                      args: n,
                      endTimestamp: Date.now(),
                      startTimestamp: Date.now(),
                      xhr: a,
                    });
                  }
                };
                return (
                  "onreadystatechange" in a &&
                  "function" == typeof a.onreadystatechange
                    ? Tq(a, "onreadystatechange", function (e) {
                        return function () {
                          for (var t = [], r = 0; r < arguments.length; r++)
                            t[r] = arguments[r];
                          return s(), e.apply(a, t);
                        };
                      })
                    : a.addEventListener("readystatechange", s),
                  r.apply(a, n)
                );
              };
            }),
              Tq(r, "send", function (r) {
                return function () {
                  for (var n = [], o = 0; o < arguments.length; o++)
                    n[o] = arguments[o];
                  return (
                    e.push(this),
                    t.push(n),
                    cZ("xhr", {
                      args: n,
                      startTimestamp: Date.now(),
                      xhr: this,
                    }),
                    r.apply(this, n)
                  );
                };
              });
          })();
          break;
        case "fetch":
          !(function () {
            if (!eZ()) return;
            Tq(oZ, "fetch", function (e) {
              return function () {
                for (var t = [], r = 0; r < arguments.length; r++)
                  t[r] = arguments[r];
                var n = {
                  args: t,
                  fetchData: { method: uZ(t), url: dZ(t) },
                  startTimestamp: Date.now(),
                };
                return (
                  cZ("fetch", qV({}, n)),
                  e.apply(oZ, t).then(
                    function (e) {
                      return (
                        cZ(
                          "fetch",
                          qV(qV({}, n), {
                            endTimestamp: Date.now(),
                            response: e,
                          })
                        ),
                        e
                      );
                    },
                    function (e) {
                      throw (
                        (cZ(
                          "fetch",
                          qV(qV({}, n), { endTimestamp: Date.now(), error: e })
                        ),
                        e)
                      );
                    }
                  )
                );
              };
            });
          })();
          break;
        case "history":
          !(function () {
            if (!rZ()) return;
            var e = oZ.onpopstate;
            function t(e) {
              return function () {
                for (var t = [], r = 0; r < arguments.length; r++)
                  t[r] = arguments[r];
                var n = t.length > 2 ? t[2] : void 0;
                if (n) {
                  var o = nZ,
                    a = String(n);
                  (nZ = a), cZ("history", { from: o, to: a });
                }
                return e.apply(this, t);
              };
            }
            (oZ.onpopstate = function () {
              for (var t = [], r = 0; r < arguments.length; r++)
                t[r] = arguments[r];
              var n = oZ.location.href,
                o = nZ;
              if (((nZ = n), cZ("history", { from: o, to: n }), e))
                return e.apply(this, t);
            }),
              Tq(oZ.history, "pushState", t),
              Tq(oZ.history, "replaceState", t);
          })();
          break;
        case "error":
          (vZ = oZ.onerror),
            (oZ.onerror = function (e, t, r, n, o) {
              return (
                cZ("error", { column: n, error: o, line: r, msg: e, url: t }),
                !!vZ && vZ.apply(this, arguments)
              );
            });
          break;
        case "unhandledrejection":
          (bZ = oZ.onunhandledrejection),
            (oZ.onunhandledrejection = function (e) {
              return (
                cZ("unhandledrejection", e), !bZ || bZ.apply(this, arguments)
              );
            });
          break;
        default:
          Qq.warn("unknown instrumentation type:", e);
      }
  }
  function lZ(e) {
    e &&
      "string" == typeof e.type &&
      "function" == typeof e.callback &&
      ((aZ[e.type] = aZ[e.type] || []),
      aZ[e.type].push(e.callback),
      sZ(e.type));
  }
  function cZ(e, t) {
    var r, n;
    if (e && aZ[e])
      try {
        for (var o = ZV(aZ[e] || []), a = o.next(); !a.done; a = o.next()) {
          var i = a.value;
          try {
            i(t);
          } catch (t) {
            Qq.error(
              "Error while triggering instrumentation handler.\nType: " +
                e +
                "\nName: " +
                kq(i) +
                "\nError: " +
                t
            );
          }
        }
      } catch (e) {
        r = { error: e };
      } finally {
        try {
          a && !a.done && (n = o.return) && n.call(o);
        } finally {
          if (r) throw r.error;
        }
      }
  }
  function uZ(e) {
    return (
      void 0 === e && (e = []),
      "Request" in oZ && uq(e[0], Request) && e[0].method
        ? String(e[0].method).toUpperCase()
        : e[1] && e[1].method
        ? String(e[1].method).toUpperCase()
        : "GET"
    );
  }
  function dZ(e) {
    return (
      void 0 === e && (e = []),
      "string" == typeof e[0]
        ? e[0]
        : "Request" in oZ && uq(e[0], Request)
        ? e[0].url
        : String(e[0])
    );
  }
  r({}, "addInstrumentationHandler", function () {
    return lZ;
  });
  var hZ,
    pZ,
    mZ = 0;
  function gZ(e, t, r) {
    return (
      void 0 === r && (r = !1),
      function (n) {
        (hZ = void 0),
          n &&
            pZ !== n &&
            ((pZ = n),
            mZ && clearTimeout(mZ),
            r
              ? (mZ = setTimeout(function () {
                  t({ event: n, name: e });
                }))
              : t({ event: n, name: e }));
      }
    );
  }
  function fZ(e) {
    return function (t) {
      var r;
      try {
        r = t.target;
      } catch (e) {
        return;
      }
      var n = r && r.tagName;
      n &&
        ("INPUT" === n || "TEXTAREA" === n || r.isContentEditable) &&
        (hZ || gZ("input", e)(t),
        clearTimeout(hZ),
        (hZ = setTimeout(function () {
          hZ = void 0;
        }, 1e3)));
    };
  }
  var vZ = null;
  var bZ = null;
  var yZ, wZ;
  ((wZ = yZ || (yZ = {})).PENDING = "PENDING"),
    (wZ.RESOLVED = "RESOLVED"),
    (wZ.REJECTED = "REJECTED");
  var CZ = (function () {
    function e(e) {
      var t = this;
      (this._state = yZ.PENDING),
        (this._handlers = []),
        (this._resolve = function (e) {
          t._setResult(yZ.RESOLVED, e);
        }),
        (this._reject = function (e) {
          t._setResult(yZ.REJECTED, e);
        }),
        (this._setResult = function (e, r) {
          t._state === yZ.PENDING &&
            (lq(r)
              ? r.then(t._resolve, t._reject)
              : ((t._state = e), (t._value = r), t._executeHandlers()));
        }),
        (this._attachHandler = function (e) {
          (t._handlers = t._handlers.concat(e)), t._executeHandlers();
        }),
        (this._executeHandlers = function () {
          if (t._state !== yZ.PENDING) {
            var e = t._handlers.slice();
            (t._handlers = []),
              e.forEach(function (e) {
                e.done ||
                  (t._state === yZ.RESOLVED &&
                    e.onfulfilled &&
                    e.onfulfilled(t._value),
                  t._state === yZ.REJECTED &&
                    e.onrejected &&
                    e.onrejected(t._value),
                  (e.done = !0));
              });
          }
        });
      try {
        e(this._resolve, this._reject);
      } catch (e) {
        this._reject(e);
      }
    }
    return (
      (e.resolve = function (t) {
        return new e(function (e) {
          e(t);
        });
      }),
      (e.reject = function (t) {
        return new e(function (e, r) {
          r(t);
        });
      }),
      (e.all = function (t) {
        return new e(function (r, n) {
          if (Array.isArray(t))
            if (0 !== t.length) {
              var o = t.length,
                a = [];
              t.forEach(function (t, i) {
                e.resolve(t)
                  .then(function (e) {
                    (a[i] = e), 0 === (o -= 1) && r(a);
                  })
                  .then(null, n);
              });
            } else r([]);
          else n(new TypeError("Promise.all requires an array as input."));
        });
      }),
      (e.prototype.then = function (t, r) {
        var n = this;
        return new e(function (e, o) {
          n._attachHandler({
            done: !1,
            onfulfilled: function (r) {
              if (t)
                try {
                  return void e(t(r));
                } catch (e) {
                  return void o(e);
                }
              else e(r);
            },
            onrejected: function (t) {
              if (r)
                try {
                  return void e(r(t));
                } catch (e) {
                  return void o(e);
                }
              else o(t);
            },
          });
        });
      }),
      (e.prototype.catch = function (e) {
        return this.then(function (e) {
          return e;
        }, e);
      }),
      (e.prototype.finally = function (t) {
        var r = this;
        return new e(function (e, n) {
          var o, a;
          return r
            .then(
              function (e) {
                (a = !1), (o = e), t && t();
              },
              function (e) {
                (a = !0), (o = e), t && t();
              }
            )
            .then(function () {
              a ? n(o) : e(o);
            });
        });
      }),
      (e.prototype.toString = function () {
        return "[object SyncPromise]";
      }),
      e
    );
  })();
  r({}, "SyncPromise", function () {
    return CZ;
  });
  var kZ = (function () {
    function e(e) {
      (this._limit = e), (this._buffer = []);
    }
    return (
      (e.prototype.isReady = function () {
        return void 0 === this._limit || this.length() < this._limit;
      }),
      (e.prototype.add = function (e) {
        var t = this;
        return this.isReady()
          ? (-1 === this._buffer.indexOf(e) && this._buffer.push(e),
            e
              .then(function () {
                return t.remove(e);
              })
              .then(null, function () {
                return t.remove(e).then(null, function () {});
              }),
            e)
          : CZ.reject(
              new mq("Not adding Promise due to buffer limit reached.")
            );
      }),
      (e.prototype.remove = function (e) {
        return this._buffer.splice(this._buffer.indexOf(e), 1)[0];
      }),
      (e.prototype.length = function () {
        return this._buffer.length;
      }),
      (e.prototype.drain = function (e) {
        var t = this;
        return new CZ(function (r) {
          var n = setTimeout(function () {
            e && e > 0 && r(!1);
          }, e);
          CZ.all(t._buffer)
            .then(function () {
              clearTimeout(n), r(!0);
            })
            .then(null, function () {
              r(!0);
            });
        });
      }),
      e
    );
  })();
  r({}, "PromiseBuffer", function () {
    return kZ;
  });
  var SZ = function () {
      var e = this,
        t = { exports: this };
      e.__esModule = !0;
      var n = {
        nowSeconds: function () {
          return Date.now() / 1e3;
        },
      };
      var o = Bq.isNodeEnv()
          ? (function () {
              try {
                return Bq.dynamicRequire(t, "perf_hooks").performance;
              } catch (e) {
                return;
              }
            })()
          : (function () {
              var e = $q().performance;
              if (e && e.now)
                return {
                  now: function () {
                    return e.now();
                  },
                  timeOrigin: Date.now() - e.now(),
                };
            })(),
        a =
          void 0 === o
            ? n
            : {
                nowSeconds: function () {
                  return (o.timeOrigin + o.now()) / 1e3;
                },
              },
        i = n.nowSeconds.bind(n);
      r(e, "dateTimestampInSeconds", function () {
        return i;
      });
      var s = a.nowSeconds.bind(a);
      r(e, "timestampInSeconds", function () {
        return s;
      });
      var l = s;
      r(e, "timestampWithMs", function () {
        return l;
      });
      var c = void 0 !== o;
      r(e, "usingPerformanceAPI", function () {
        return c;
      });
      var u = (function () {
        var e = $q().performance;
        if (e)
          return e.timeOrigin
            ? e.timeOrigin
            : (e.timing && e.timing.navigationStart) || Date.now();
      })();
      return (
        r(e, "browserPerformanceTimeOrigin", function () {
          return u;
        }),
        t.exports
      );
    }.call({}),
    EZ = (function () {
      function e() {
        (this._notifyingListeners = !1),
          (this._scopeListeners = []),
          (this._eventProcessors = []),
          (this._breadcrumbs = []),
          (this._user = {}),
          (this._tags = {}),
          (this._extra = {}),
          (this._contexts = {});
      }
      return (
        (e.clone = function (t) {
          var r = new e();
          return (
            t &&
              ((r._breadcrumbs = QV(t._breadcrumbs)),
              (r._tags = qV({}, t._tags)),
              (r._extra = qV({}, t._extra)),
              (r._contexts = qV({}, t._contexts)),
              (r._user = t._user),
              (r._level = t._level),
              (r._span = t._span),
              (r._transactionName = t._transactionName),
              (r._fingerprint = t._fingerprint),
              (r._eventProcessors = QV(t._eventProcessors))),
            r
          );
        }),
        (e.prototype.addScopeListener = function (e) {
          this._scopeListeners.push(e);
        }),
        (e.prototype.addEventProcessor = function (e) {
          return this._eventProcessors.push(e), this;
        }),
        (e.prototype.setUser = function (e) {
          return (this._user = e || {}), this._notifyScopeListeners(), this;
        }),
        (e.prototype.setTags = function (e) {
          return (
            (this._tags = qV(qV({}, this._tags), e)),
            this._notifyScopeListeners(),
            this
          );
        }),
        (e.prototype.setTag = function (e, t) {
          var r;
          return (
            (this._tags = qV(qV({}, this._tags), (((r = {})[e] = t), r))),
            this._notifyScopeListeners(),
            this
          );
        }),
        (e.prototype.setExtras = function (e) {
          return (
            (this._extra = qV(qV({}, this._extra), e)),
            this._notifyScopeListeners(),
            this
          );
        }),
        (e.prototype.setExtra = function (e, t) {
          var r;
          return (
            (this._extra = qV(qV({}, this._extra), (((r = {})[e] = t), r))),
            this._notifyScopeListeners(),
            this
          );
        }),
        (e.prototype.setFingerprint = function (e) {
          return (this._fingerprint = e), this._notifyScopeListeners(), this;
        }),
        (e.prototype.setLevel = function (e) {
          return (this._level = e), this._notifyScopeListeners(), this;
        }),
        (e.prototype.setTransactionName = function (e) {
          return (
            (this._transactionName = e), this._notifyScopeListeners(), this
          );
        }),
        (e.prototype.setTransaction = function (e) {
          return this.setTransactionName(e);
        }),
        (e.prototype.setContext = function (e, t) {
          var r;
          return (
            null === t
              ? delete this._contexts[e]
              : (this._contexts = qV(
                  qV({}, this._contexts),
                  (((r = {})[e] = t), r)
                )),
            this._notifyScopeListeners(),
            this
          );
        }),
        (e.prototype.setSpan = function (e) {
          return (this._span = e), this._notifyScopeListeners(), this;
        }),
        (e.prototype.getSpan = function () {
          return this._span;
        }),
        (e.prototype.getTransaction = function () {
          var e,
            t,
            r,
            n,
            o = this.getSpan();
          return (null === (e = o) || void 0 === e ? void 0 : e.transaction)
            ? null === (t = o) || void 0 === t
              ? void 0
              : t.transaction
            : (
                null ===
                  (n =
                    null === (r = o) || void 0 === r
                      ? void 0
                      : r.spanRecorder) || void 0 === n
                  ? void 0
                  : n.spans[0]
              )
            ? o.spanRecorder.spans[0]
            : void 0;
        }),
        (e.prototype.update = function (t) {
          if (!t) return this;
          if ("function" == typeof t) {
            var r = t(this);
            return r instanceof e ? r : this;
          }
          return (
            t instanceof e
              ? ((this._tags = qV(qV({}, this._tags), t._tags)),
                (this._extra = qV(qV({}, this._extra), t._extra)),
                (this._contexts = qV(qV({}, this._contexts), t._contexts)),
                t._user && (this._user = t._user),
                t._level && (this._level = t._level),
                t._fingerprint && (this._fingerprint = t._fingerprint))
              : oq(t) &&
                ((t = t),
                (this._tags = qV(qV({}, this._tags), t.tags)),
                (this._extra = qV(qV({}, this._extra), t.extra)),
                (this._contexts = qV(qV({}, this._contexts), t.contexts)),
                t.user && (this._user = t.user),
                t.level && (this._level = t.level),
                t.fingerprint && (this._fingerprint = t.fingerprint)),
            this
          );
        }),
        (e.prototype.clear = function () {
          return (
            (this._breadcrumbs = []),
            (this._tags = {}),
            (this._extra = {}),
            (this._user = {}),
            (this._contexts = {}),
            (this._level = void 0),
            (this._transactionName = void 0),
            (this._fingerprint = void 0),
            (this._span = void 0),
            this._notifyScopeListeners(),
            this
          );
        }),
        (e.prototype.addBreadcrumb = function (e, t) {
          var r = qV({ timestamp: SZ.dateTimestampInSeconds() }, e);
          return (
            (this._breadcrumbs =
              void 0 !== t && t >= 0
                ? QV(this._breadcrumbs, [r]).slice(-t)
                : QV(this._breadcrumbs, [r])),
            this._notifyScopeListeners(),
            this
          );
        }),
        (e.prototype.clearBreadcrumbs = function () {
          return (this._breadcrumbs = []), this._notifyScopeListeners(), this;
        }),
        (e.prototype.applyToEvent = function (e, t) {
          return (
            this._extra &&
              Object.keys(this._extra).length &&
              (e.extra = qV(qV({}, this._extra), e.extra)),
            this._tags &&
              Object.keys(this._tags).length &&
              (e.tags = qV(qV({}, this._tags), e.tags)),
            this._user &&
              Object.keys(this._user).length &&
              (e.user = qV(qV({}, this._user), e.user)),
            this._contexts &&
              Object.keys(this._contexts).length &&
              (e.contexts = qV(qV({}, this._contexts), e.contexts)),
            this._level && (e.level = this._level),
            this._transactionName && (e.transaction = this._transactionName),
            this._span &&
              (e.contexts = qV(
                { trace: this._span.getTraceContext() },
                e.contexts
              )),
            this._applyFingerprint(e),
            (e.breadcrumbs = QV(e.breadcrumbs || [], this._breadcrumbs)),
            (e.breadcrumbs = e.breadcrumbs.length > 0 ? e.breadcrumbs : void 0),
            this._notifyEventProcessors(QV(_Z(), this._eventProcessors), e, t)
          );
        }),
        (e.prototype._notifyEventProcessors = function (e, t, r, n) {
          var o = this;
          return (
            void 0 === n && (n = 0),
            new CZ(function (a, i) {
              var s = e[n];
              if (null === t || "function" != typeof s) a(t);
              else {
                var l = s(qV({}, t), r);
                lq(l)
                  ? l
                      .then(function (t) {
                        return o._notifyEventProcessors(e, t, r, n + 1).then(a);
                      })
                      .then(null, i)
                  : o
                      ._notifyEventProcessors(e, l, r, n + 1)
                      .then(a)
                      .then(null, i);
              }
            })
          );
        }),
        (e.prototype._notifyScopeListeners = function () {
          var e = this;
          this._notifyingListeners ||
            ((this._notifyingListeners = !0),
            setTimeout(function () {
              e._scopeListeners.forEach(function (t) {
                t(e);
              }),
                (e._notifyingListeners = !1);
            }));
        }),
        (e.prototype._applyFingerprint = function (e) {
          (e.fingerprint = e.fingerprint
            ? Array.isArray(e.fingerprint)
              ? e.fingerprint
              : [e.fingerprint]
            : []),
            this._fingerprint &&
              (e.fingerprint = e.fingerprint.concat(this._fingerprint)),
            e.fingerprint && !e.fingerprint.length && delete e.fingerprint;
        }),
        e
      );
    })();
  function _Z() {
    var e = $q();
    return (
      (e.__SENTRY__ = e.__SENTRY__ || {}),
      (e.__SENTRY__.globalEventProcessors =
        e.__SENTRY__.globalEventProcessors || []),
      e.__SENTRY__.globalEventProcessors
    );
  }
  function xZ(e) {
    _Z().push(e);
  }
  var PZ = (function () {
    function e(e, t, r) {
      void 0 === t && (t = new EZ()),
        void 0 === r && (r = 3),
        (this._version = r),
        (this._stack = []),
        this._stack.push({ client: e, scope: t }),
        this.bindClient(e);
    }
    return (
      (e.prototype.isOlderThan = function (e) {
        return this._version < e;
      }),
      (e.prototype.bindClient = function (e) {
        (this.getStackTop().client = e),
          e && e.setupIntegrations && e.setupIntegrations();
      }),
      (e.prototype.pushScope = function () {
        var e = this.getStack(),
          t = e.length > 0 ? e[e.length - 1].scope : void 0,
          r = EZ.clone(t);
        return this.getStack().push({ client: this.getClient(), scope: r }), r;
      }),
      (e.prototype.popScope = function () {
        return void 0 !== this.getStack().pop();
      }),
      (e.prototype.withScope = function (e) {
        var t = this.pushScope();
        try {
          e(t);
        } finally {
          this.popScope();
        }
      }),
      (e.prototype.getClient = function () {
        return this.getStackTop().client;
      }),
      (e.prototype.getScope = function () {
        return this.getStackTop().scope;
      }),
      (e.prototype.getStack = function () {
        return this._stack;
      }),
      (e.prototype.getStackTop = function () {
        return this._stack[this._stack.length - 1];
      }),
      (e.prototype.captureException = function (e, t) {
        var r = (this._lastEventId = Nq()),
          n = t;
        if (!t) {
          var o = void 0;
          try {
            throw new Error("Sentry syntheticException");
          } catch (e) {
            o = e;
          }
          n = { originalException: e, syntheticException: o };
        }
        return (
          this._invokeClient(
            "captureException",
            e,
            qV(qV({}, n), { event_id: r })
          ),
          r
        );
      }),
      (e.prototype.captureMessage = function (e, t, r) {
        var n = (this._lastEventId = Nq()),
          o = r;
        if (!r) {
          var a = void 0;
          try {
            throw new Error(e);
          } catch (e) {
            a = e;
          }
          o = { originalException: e, syntheticException: a };
        }
        return (
          this._invokeClient(
            "captureMessage",
            e,
            t,
            qV(qV({}, o), { event_id: n })
          ),
          n
        );
      }),
      (e.prototype.captureEvent = function (e, t) {
        var r = (this._lastEventId = Nq());
        return (
          this._invokeClient("captureEvent", e, qV(qV({}, t), { event_id: r })),
          r
        );
      }),
      (e.prototype.lastEventId = function () {
        return this._lastEventId;
      }),
      (e.prototype.addBreadcrumb = function (e, t) {
        var r = this.getStackTop();
        if (r.scope && r.client) {
          var n = (r.client.getOptions && r.client.getOptions()) || {},
            o = n.beforeBreadcrumb,
            a = void 0 === o ? null : o,
            i = n.maxBreadcrumbs,
            s = void 0 === i ? 100 : i;
          if (!(s <= 0)) {
            var l = SZ.dateTimestampInSeconds(),
              c = qV({ timestamp: l }, e),
              u = a
                ? zq(function () {
                    return a(c, t);
                  })
                : c;
            null !== u && r.scope.addBreadcrumb(u, Math.min(s, 100));
          }
        }
      }),
      (e.prototype.setUser = function (e) {
        var t = this.getStackTop();
        t.scope && t.scope.setUser(e);
      }),
      (e.prototype.setTags = function (e) {
        var t = this.getStackTop();
        t.scope && t.scope.setTags(e);
      }),
      (e.prototype.setExtras = function (e) {
        var t = this.getStackTop();
        t.scope && t.scope.setExtras(e);
      }),
      (e.prototype.setTag = function (e, t) {
        var r = this.getStackTop();
        r.scope && r.scope.setTag(e, t);
      }),
      (e.prototype.setExtra = function (e, t) {
        var r = this.getStackTop();
        r.scope && r.scope.setExtra(e, t);
      }),
      (e.prototype.setContext = function (e, t) {
        var r = this.getStackTop();
        r.scope && r.scope.setContext(e, t);
      }),
      (e.prototype.configureScope = function (e) {
        var t = this.getStackTop();
        t.scope && t.client && e(t.scope);
      }),
      (e.prototype.run = function (e) {
        var t = IZ(this);
        try {
          e(this);
        } finally {
          IZ(t);
        }
      }),
      (e.prototype.getIntegration = function (e) {
        var t = this.getClient();
        if (!t) return null;
        try {
          return t.getIntegration(e);
        } catch (t) {
          return (
            Qq.warn(
              "Cannot retrieve integration " + e.id + " from the current Hub"
            ),
            null
          );
        }
      }),
      (e.prototype.startSpan = function (e) {
        return this._callExtensionMethod("startSpan", e);
      }),
      (e.prototype.startTransaction = function (e, t) {
        return this._callExtensionMethod("startTransaction", e, t);
      }),
      (e.prototype.traceHeaders = function () {
        return this._callExtensionMethod("traceHeaders");
      }),
      (e.prototype._invokeClient = function (e) {
        for (var t, r = [], n = 1; n < arguments.length; n++)
          r[n - 1] = arguments[n];
        var o = this.getStackTop();
        o &&
          o.client &&
          o.client[e] &&
          (t = o.client)[e].apply(t, QV(r, [o.scope]));
      }),
      (e.prototype._callExtensionMethod = function (e) {
        for (var t = [], r = 1; r < arguments.length; r++)
          t[r - 1] = arguments[r];
        var n = TZ(),
          o = n.__SENTRY__;
        if (o && o.extensions && "function" == typeof o.extensions[e])
          return o.extensions[e].apply(this, t);
        Qq.warn("Extension method " + e + " couldn't be found, doing nothing.");
      }),
      e
    );
  })();
  function TZ() {
    var e = $q();
    return (e.__SENTRY__ = e.__SENTRY__ || { extensions: {}, hub: void 0 }), e;
  }
  function IZ(e) {
    var t = TZ(),
      r = AZ(t);
    return MZ(t, e), r;
  }
  function GZ() {
    var e = TZ();
    return (
      (DZ(e) && !AZ(e).isOlderThan(3)) || MZ(e, new PZ()),
      Bq.isNodeEnv()
        ? (function (e) {
            try {
              var t =
                (n = TZ().__SENTRY__) &&
                n.extensions &&
                n.extensions.domain &&
                n.extensions.domain.active;
              if (!t) return AZ(e);
              if (!DZ(t) || AZ(t).isOlderThan(3)) {
                var r = AZ(e).getStackTop();
                MZ(t, new PZ(r.client, EZ.clone(r.scope)));
              }
              return AZ(t);
            } catch (t) {
              return AZ(e);
            }
            var n;
          })(e)
        : AZ(e)
    );
  }
  function DZ(e) {
    return !!(e && e.__SENTRY__ && e.__SENTRY__.hub);
  }
  function AZ(e) {
    return (
      (e && e.__SENTRY__ && e.__SENTRY__.hub) ||
        ((e.__SENTRY__ = e.__SENTRY__ || {}), (e.__SENTRY__.hub = new PZ())),
      e.__SENTRY__.hub
    );
  }
  function MZ(e, t) {
    return (
      !!e && ((e.__SENTRY__ = e.__SENTRY__ || {}), (e.__SENTRY__.hub = t), !0)
    );
  }
  function FZ(e) {
    for (var t = [], r = 1; r < arguments.length; r++) t[r - 1] = arguments[r];
    var n = GZ();
    if (n && n[e]) return n[e].apply(n, QV(t));
    throw new Error(
      "No hub defined or " +
        e +
        " was not found on the hub, please open a bug report."
    );
  }
  function RZ(e, t) {
    var r;
    try {
      throw new Error("Sentry syntheticException");
    } catch (e) {
      r = e;
    }
    return FZ("captureException", e, {
      captureContext: t,
      originalException: e,
      syntheticException: r,
    });
  }
  function LZ(e) {
    FZ("withScope", e);
  }
  var BZ = (function () {
      function e(e) {
        (this.dsn = e), (this._dsnObject = new vq(e));
      }
      return (
        (e.prototype.getDsn = function () {
          return this._dsnObject;
        }),
        (e.prototype.getBaseApiEndpoint = function () {
          var e = this._dsnObject,
            t = e.protocol ? e.protocol + ":" : "",
            r = e.port ? ":" + e.port : "";
          return t + "//" + e.host + r + (e.path ? "/" + e.path : "") + "/api/";
        }),
        (e.prototype.getStoreEndpoint = function () {
          return this._getIngestEndpoint("store");
        }),
        (e.prototype.getStoreEndpointWithUrlEncodedAuth = function () {
          return this.getStoreEndpoint() + "?" + this._encodedAuth();
        }),
        (e.prototype.getEnvelopeEndpointWithUrlEncodedAuth = function () {
          return this._getEnvelopeEndpoint() + "?" + this._encodedAuth();
        }),
        (e.prototype.getStoreEndpointPath = function () {
          var e = this._dsnObject;
          return (
            (e.path ? "/" + e.path : "") + "/api/" + e.projectId + "/store/"
          );
        }),
        (e.prototype.getRequestHeaders = function (e, t) {
          var r = this._dsnObject,
            n = ["Sentry sentry_version=7"];
          return (
            n.push("sentry_client=" + e + "/" + t),
            n.push("sentry_key=" + r.user),
            r.pass && n.push("sentry_secret=" + r.pass),
            {
              "Content-Type": "application/json",
              "X-Sentry-Auth": n.join(", "),
            }
          );
        }),
        (e.prototype.getReportDialogEndpoint = function (e) {
          void 0 === e && (e = {});
          var t = this._dsnObject,
            r = this.getBaseApiEndpoint() + "embed/error-page/",
            n = [];
          for (var o in (n.push("dsn=" + t.toString()), e))
            if ("user" === o) {
              if (!e.user) continue;
              e.user.name && n.push("name=" + encodeURIComponent(e.user.name)),
                e.user.email &&
                  n.push("email=" + encodeURIComponent(e.user.email));
            } else
              n.push(encodeURIComponent(o) + "=" + encodeURIComponent(e[o]));
          return n.length ? r + "?" + n.join("&") : r;
        }),
        (e.prototype._getEnvelopeEndpoint = function () {
          return this._getIngestEndpoint("envelope");
        }),
        (e.prototype._getIngestEndpoint = function (e) {
          return (
            "" +
            this.getBaseApiEndpoint() +
            this._dsnObject.projectId +
            "/" +
            e +
            "/"
          );
        }),
        (e.prototype._encodedAuth = function () {
          return Iq({ sentry_key: this._dsnObject.user, sentry_version: "7" });
        }),
        e
      );
    })(),
    OZ = [];
  function $Z(e) {
    var t = {};
    return (
      (function (e) {
        var t = (e.defaultIntegrations && QV(e.defaultIntegrations)) || [],
          r = e.integrations,
          n = [];
        if (Array.isArray(r)) {
          var o = r.map(function (e) {
              return e.name;
            }),
            a = [];
          t.forEach(function (e) {
            -1 === o.indexOf(e.name) &&
              -1 === a.indexOf(e.name) &&
              (n.push(e), a.push(e.name));
          }),
            r.forEach(function (e) {
              -1 === a.indexOf(e.name) && (n.push(e), a.push(e.name));
            });
        } else
          "function" == typeof r
            ? ((n = r(t)), (n = Array.isArray(n) ? n : [n]))
            : (n = QV(t));
        var i = n.map(function (e) {
            return e.name;
          }),
          s = "Debug";
        return (
          -1 !== i.indexOf(s) && n.push.apply(n, QV(n.splice(i.indexOf(s), 1))),
          n
        );
      })(e).forEach(function (e) {
        (t[e.name] = e),
          (function (e) {
            -1 === OZ.indexOf(e.name) &&
              (e.setupOnce(xZ, GZ),
              OZ.push(e.name),
              Qq.log("Integration installed: " + e.name));
          })(e);
      }),
      t
    );
  }
  var NZ,
    UZ,
    HZ,
    zZ,
    jZ = (function () {
      function e(e, t) {
        (this._integrations = {}),
          (this._processing = !1),
          (this._backend = new e(t)),
          (this._options = t),
          t.dsn && (this._dsn = new vq(t.dsn));
      }
      return (
        (e.prototype.captureException = function (e, t, r) {
          var n = this,
            o = t && t.event_id;
          return (
            (this._processing = !0),
            this._getBackend()
              .eventFromException(e, t)
              .then(function (e) {
                o = n.captureEvent(e, t, r);
              }),
            o
          );
        }),
        (e.prototype.captureMessage = function (e, t, r, n) {
          var o = this,
            a = r && r.event_id;
          return (
            (this._processing = !0),
            (nq(e)
              ? this._getBackend().eventFromMessage("" + e, t, r)
              : this._getBackend().eventFromException(e, r)
            ).then(function (e) {
              a = o.captureEvent(e, r, n);
            }),
            a
          );
        }),
        (e.prototype.captureEvent = function (e, t, r) {
          var n = this,
            o = t && t.event_id;
          return (
            (this._processing = !0),
            this._processEvent(e, t, r)
              .then(function (e) {
                (o = e && e.event_id), (n._processing = !1);
              })
              .then(null, function (e) {
                Qq.error(e), (n._processing = !1);
              }),
            o
          );
        }),
        (e.prototype.getDsn = function () {
          return this._dsn;
        }),
        (e.prototype.getOptions = function () {
          return this._options;
        }),
        (e.prototype.flush = function (e) {
          var t = this;
          return this._isClientProcessing(e).then(function (r) {
            return (
              clearInterval(r.interval),
              t
                ._getBackend()
                .getTransport()
                .close(e)
                .then(function (e) {
                  return r.ready && e;
                })
            );
          });
        }),
        (e.prototype.close = function (e) {
          var t = this;
          return this.flush(e).then(function (e) {
            return (t.getOptions().enabled = !1), e;
          });
        }),
        (e.prototype.setupIntegrations = function () {
          this._isEnabled() && (this._integrations = $Z(this._options));
        }),
        (e.prototype.getIntegration = function (e) {
          try {
            return this._integrations[e.id] || null;
          } catch (t) {
            return (
              Qq.warn(
                "Cannot retrieve integration " +
                  e.id +
                  " from the current Client"
              ),
              null
            );
          }
        }),
        (e.prototype._isClientProcessing = function (e) {
          var t = this;
          return new CZ(function (r) {
            var n = 0,
              o = 0;
            clearInterval(o),
              (o = setInterval(function () {
                t._processing
                  ? ((n += 1), e && n >= e && r({ interval: o, ready: !1 }))
                  : r({ interval: o, ready: !0 });
              }, 1));
          });
        }),
        (e.prototype._getBackend = function () {
          return this._backend;
        }),
        (e.prototype._isEnabled = function () {
          return !1 !== this.getOptions().enabled && void 0 !== this._dsn;
        }),
        (e.prototype._prepareEvent = function (e, t, r) {
          var n = this,
            o = this.getOptions().normalizeDepth,
            a = void 0 === o ? 3 : o,
            i = qV(qV({}, e), {
              event_id: e.event_id || (r && r.event_id ? r.event_id : Nq()),
              timestamp: e.timestamp || SZ.dateTimestampInSeconds(),
            });
          this._applyClientOptions(i), this._applyIntegrationsMetadata(i);
          var s = t;
          r && r.captureContext && (s = EZ.clone(s).update(r.captureContext));
          var l = CZ.resolve(i);
          return (
            s && (l = s.applyToEvent(i, r)),
            l.then(function (e) {
              return "number" == typeof a && a > 0
                ? n._normalizeEvent(e, a)
                : e;
            })
          );
        }),
        (e.prototype._normalizeEvent = function (e, t) {
          if (!e) return null;
          var r = qV(
            qV(
              qV(
                qV(
                  qV({}, e),
                  e.breadcrumbs && {
                    breadcrumbs: e.breadcrumbs.map(function (e) {
                      return qV(qV({}, e), e.data && { data: Rq(e.data, t) });
                    }),
                  }
                ),
                e.user && { user: Rq(e.user, t) }
              ),
              e.contexts && { contexts: Rq(e.contexts, t) }
            ),
            e.extra && { extra: Rq(e.extra, t) }
          );
          return (
            e.contexts &&
              e.contexts.trace &&
              (r.contexts.trace = e.contexts.trace),
            r
          );
        }),
        (e.prototype._applyClientOptions = function (e) {
          var t = this.getOptions(),
            r = t.environment,
            n = t.release,
            o = t.dist,
            a = t.maxValueLength,
            i = void 0 === a ? 250 : a;
          void 0 === e.environment && void 0 !== r && (e.environment = r),
            void 0 === e.release && void 0 !== n && (e.release = n),
            void 0 === e.dist && void 0 !== o && (e.dist = o),
            e.message && (e.message = Eq(e.message, i));
          var s = e.exception && e.exception.values && e.exception.values[0];
          s && s.value && (s.value = Eq(s.value, i));
          var l = e.request;
          l && l.url && (l.url = Eq(l.url, i));
        }),
        (e.prototype._applyIntegrationsMetadata = function (e) {
          var t = e.sdk,
            r = Object.keys(this._integrations);
          t && r.length > 0 && (t.integrations = r);
        }),
        (e.prototype._sendEvent = function (e) {
          this._getBackend().sendEvent(e);
        }),
        (e.prototype._processEvent = function (e, t, r) {
          var n = this,
            o = this.getOptions(),
            a = o.beforeSend,
            i = o.sampleRate;
          if (!this._isEnabled())
            return CZ.reject("SDK not enabled, will not send event.");
          var s = "transaction" === e.type;
          return !s && "number" == typeof i && Math.random() > i
            ? CZ.reject("This event has been sampled, will not send event.")
            : new CZ(function (o, i) {
                n._prepareEvent(e, r, t)
                  .then(function (e) {
                    if (null !== e) {
                      var r = e;
                      if ((t && t.data && !0 === t.data.__sentry__) || !a || s)
                        return n._sendEvent(r), void o(r);
                      var l = a(e, t);
                      if (void 0 === l)
                        Qq.error(
                          "`beforeSend` method has to return `null` or a valid event."
                        );
                      else if (lq(l)) n._handleAsyncBeforeSend(l, o, i);
                      else {
                        if (null === (r = l))
                          return (
                            Qq.log(
                              "`beforeSend` returned `null`, will not send event."
                            ),
                            void o(null)
                          );
                        n._sendEvent(r), o(r);
                      }
                    } else i("An event processor returned null, will not send event.");
                  })
                  .then(null, function (e) {
                    n.captureException(e, {
                      data: { __sentry__: !0 },
                      originalException: e,
                    }),
                      i(
                        "Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: " +
                          e
                      );
                  });
              });
        }),
        (e.prototype._handleAsyncBeforeSend = function (e, t, r) {
          var n = this;
          e.then(function (e) {
            null !== e
              ? (n._sendEvent(e), t(e))
              : r("`beforeSend` returned `null`, will not send event.");
          }).then(null, function (e) {
            r("beforeSend rejected with " + e);
          });
        }),
        e
      );
    })();
  ((UZ = NZ || (NZ = {})).Fatal = "fatal"),
    (UZ.Error = "error"),
    (UZ.Warning = "warning"),
    (UZ.Log = "log"),
    (UZ.Info = "info"),
    (UZ.Debug = "debug"),
    (UZ.Critical = "critical"),
    (function (e) {
      e.fromString = function (t) {
        switch (t) {
          case "debug":
            return e.Debug;
          case "info":
            return e.Info;
          case "warn":
          case "warning":
            return e.Warning;
          case "error":
            return e.Error;
          case "fatal":
            return e.Fatal;
          case "critical":
            return e.Critical;
          case "log":
          default:
            return e.Log;
        }
      };
    })(NZ || (NZ = {})),
    ((zZ = HZ || (HZ = {})).Unknown = "unknown"),
    (zZ.Skipped = "skipped"),
    (zZ.Success = "success"),
    (zZ.RateLimit = "rate_limit"),
    (zZ.Invalid = "invalid"),
    (zZ.Failed = "failed"),
    (function (e) {
      e.fromHttpCode = function (t) {
        return t >= 200 && t < 300
          ? e.Success
          : 429 === t
          ? e.RateLimit
          : t >= 400 && t < 500
          ? e.Invalid
          : t >= 500
          ? e.Failed
          : e.Unknown;
      };
    })(HZ || (HZ = {}));
  var WZ = (function () {
      function e() {}
      return (
        (e.prototype.sendEvent = function (e) {
          return CZ.resolve({
            reason:
              "NoopTransport: Event has been skipped because no Dsn is configured.",
            status: HZ.Skipped,
          });
        }),
        (e.prototype.close = function (e) {
          return CZ.resolve(!0);
        }),
        e
      );
    })(),
    VZ = (function () {
      function e(e) {
        (this._options = e),
          this._options.dsn ||
            Qq.warn("No DSN provided, backend will not do anything."),
          (this._transport = this._setupTransport());
      }
      return (
        (e.prototype.eventFromException = function (e, t) {
          throw new mq("Backend has to implement `eventFromException` method");
        }),
        (e.prototype.eventFromMessage = function (e, t, r) {
          throw new mq("Backend has to implement `eventFromMessage` method");
        }),
        (e.prototype.sendEvent = function (e) {
          this._transport.sendEvent(e).then(null, function (e) {
            Qq.error("Error while sending event: " + e);
          });
        }),
        (e.prototype.getTransport = function () {
          return this._transport;
        }),
        (e.prototype._setupTransport = function () {
          return new WZ();
        }),
        e
      );
    })();
  function qZ(e, t) {
    var r = "transaction" === e.type,
      n = {
        body: JSON.stringify(e),
        url: r
          ? t.getEnvelopeEndpointWithUrlEncodedAuth()
          : t.getStoreEndpointWithUrlEncodedAuth(),
      };
    if (r) {
      var o =
        JSON.stringify({
          event_id: e.event_id,
          sent_at: new Date().toISOString(),
        }) +
        "\n" +
        JSON.stringify({ type: e.type }) +
        "\n" +
        n.body;
      n.body = o;
    }
    return n;
  }
  var ZZ,
    YZ = {},
    QZ = (function () {
      function e() {
        this.name = e.id;
      }
      return (
        (e.prototype.setupOnce = function () {
          (ZZ = Function.prototype.toString),
            (Function.prototype.toString = function () {
              for (var e = [], t = 0; t < arguments.length; t++)
                e[t] = arguments[t];
              var r = this.__sentry_original__ || this;
              return ZZ.apply(r, e);
            });
        }),
        (e.id = "FunctionToString"),
        e
      );
    })(),
    KZ = [/^Script error\.?$/, /^Javascript error: Script error\.? on line 0$/],
    XZ = (function () {
      function e(t) {
        void 0 === t && (t = {}), (this._options = t), (this.name = e.id);
      }
      return (
        (e.prototype.setupOnce = function () {
          xZ(function (t) {
            var r = GZ();
            if (!r) return t;
            var n = r.getIntegration(e);
            if (n) {
              var o = r.getClient(),
                a = o ? o.getOptions() : {},
                i = n._mergeOptions(a);
              if (n._shouldDropEvent(t, i)) return null;
            }
            return t;
          });
        }),
        (e.prototype._shouldDropEvent = function (e, t) {
          return this._isSentryError(e, t)
            ? (Qq.warn(
                "Event dropped due to being internal Sentry Error.\nEvent: " +
                  Hq(e)
              ),
              !0)
            : this._isIgnoredError(e, t)
            ? (Qq.warn(
                "Event dropped due to being matched by `ignoreErrors` option.\nEvent: " +
                  Hq(e)
              ),
              !0)
            : this._isDeniedUrl(e, t)
            ? (Qq.warn(
                "Event dropped due to being matched by `denyUrls` option.\nEvent: " +
                  Hq(e) +
                  ".\nUrl: " +
                  this._getEventFilterUrl(e)
              ),
              !0)
            : !this._isAllowedUrl(e, t) &&
              (Qq.warn(
                "Event dropped due to not being matched by `allowUrls` option.\nEvent: " +
                  Hq(e) +
                  ".\nUrl: " +
                  this._getEventFilterUrl(e)
              ),
              !0);
        }),
        (e.prototype._isSentryError = function (e, t) {
          if (!t.ignoreInternal) return !1;
          try {
            return (
              (e &&
                e.exception &&
                e.exception.values &&
                e.exception.values[0] &&
                "SentryError" === e.exception.values[0].type) ||
              !1
            );
          } catch (e) {
            return !1;
          }
        }),
        (e.prototype._isIgnoredError = function (e, t) {
          return (
            !(!t.ignoreErrors || !t.ignoreErrors.length) &&
            this._getPossibleEventMessages(e).some(function (e) {
              return t.ignoreErrors.some(function (t) {
                return Pq(e, t);
              });
            })
          );
        }),
        (e.prototype._isDeniedUrl = function (e, t) {
          if (!t.denyUrls || !t.denyUrls.length) return !1;
          var r = this._getEventFilterUrl(e);
          return (
            !!r &&
            t.denyUrls.some(function (e) {
              return Pq(r, e);
            })
          );
        }),
        (e.prototype._isAllowedUrl = function (e, t) {
          if (!t.allowUrls || !t.allowUrls.length) return !0;
          var r = this._getEventFilterUrl(e);
          return (
            !r ||
            t.allowUrls.some(function (e) {
              return Pq(r, e);
            })
          );
        }),
        (e.prototype._mergeOptions = function (e) {
          return (
            void 0 === e && (e = {}),
            {
              allowUrls: QV(
                this._options.whitelistUrls || [],
                this._options.allowUrls || [],
                e.whitelistUrls || [],
                e.allowUrls || []
              ),
              denyUrls: QV(
                this._options.blacklistUrls || [],
                this._options.denyUrls || [],
                e.blacklistUrls || [],
                e.denyUrls || []
              ),
              ignoreErrors: QV(
                this._options.ignoreErrors || [],
                e.ignoreErrors || [],
                KZ
              ),
              ignoreInternal:
                void 0 === this._options.ignoreInternal ||
                this._options.ignoreInternal,
            }
          );
        }),
        (e.prototype._getPossibleEventMessages = function (e) {
          if (e.message) return [e.message];
          if (e.exception)
            try {
              var t = (e.exception.values && e.exception.values[0]) || {},
                r = t.type,
                n = void 0 === r ? "" : r,
                o = t.value,
                a = void 0 === o ? "" : o;
              return ["" + a, n + ": " + a];
            } catch (t) {
              return Qq.error("Cannot extract message for event " + Hq(e)), [];
            }
          return [];
        }),
        (e.prototype._getEventFilterUrl = function (e) {
          try {
            if (e.stacktrace) {
              var t = e.stacktrace.frames;
              return (t && t[t.length - 1].filename) || null;
            }
            if (e.exception) {
              var r =
                e.exception.values &&
                e.exception.values[0].stacktrace &&
                e.exception.values[0].stacktrace.frames;
              return (r && r[r.length - 1].filename) || null;
            }
            return null;
          } catch (t) {
            return Qq.error("Cannot extract url for event " + Hq(e)), null;
          }
        }),
        (e.id = "InboundFilters"),
        e
      );
    })();
  r(YZ, "FunctionToString", function () {
    return QZ;
  }),
    r(YZ, "InboundFilters", function () {
      return XZ;
    });
  var JZ = "?",
    eY =
      /^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,
    tY =
      /^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,
    rY =
      /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,
    nY = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i,
    oY = /\((\S*)(?::(\d+))(?::(\d+))\)/,
    aY = /Minified React error #\d+;/i;
  function iY(e) {
    var t = null,
      r = 0;
    e &&
      ("number" == typeof e.framesToPop
        ? (r = e.framesToPop)
        : aY.test(e.message) && (r = 1));
    try {
      if (
        (t = (function (e) {
          if (!e || !e.stacktrace) return null;
          for (
            var t,
              r = e.stacktrace,
              n = / line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,
              o =
                / line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\((.*)\))? in (.*):\s*$/i,
              a = r.split("\n"),
              i = [],
              s = 0;
            s < a.length;
            s += 2
          ) {
            var l = null;
            (t = n.exec(a[s]))
              ? (l = {
                  url: t[2],
                  func: t[3],
                  args: [],
                  line: +t[1],
                  column: null,
                })
              : (t = o.exec(a[s])) &&
                (l = {
                  url: t[6],
                  func: t[3] || t[4],
                  args: t[5] ? t[5].split(",") : [],
                  line: +t[1],
                  column: +t[2],
                }),
              l && (!l.func && l.line && (l.func = JZ), i.push(l));
          }
          if (!i.length) return null;
          return { message: lY(e), name: e.name, stack: i };
        })(e))
      )
        return sY(t, r);
    } catch (e) {}
    try {
      if (
        (t = (function (e) {
          if (!e || !e.stack) return null;
          for (
            var t, r, n, o = [], a = e.stack.split("\n"), i = 0;
            i < a.length;
            ++i
          ) {
            if ((r = eY.exec(a[i]))) {
              var s = r[2] && 0 === r[2].indexOf("native");
              r[2] &&
                0 === r[2].indexOf("eval") &&
                (t = oY.exec(r[2])) &&
                ((r[2] = t[1]), (r[3] = t[2]), (r[4] = t[3])),
                (n = {
                  url:
                    r[2] && 0 === r[2].indexOf("address at ")
                      ? r[2].substr("address at ".length)
                      : r[2],
                  func: r[1] || JZ,
                  args: s ? [r[2]] : [],
                  line: r[3] ? +r[3] : null,
                  column: r[4] ? +r[4] : null,
                });
            } else if ((r = rY.exec(a[i])))
              n = {
                url: r[2],
                func: r[1] || JZ,
                args: [],
                line: +r[3],
                column: r[4] ? +r[4] : null,
              };
            else {
              if (!(r = tY.exec(a[i]))) continue;
              r[3] && r[3].indexOf(" > eval") > -1 && (t = nY.exec(r[3]))
                ? ((r[1] = r[1] || "eval"),
                  (r[3] = t[1]),
                  (r[4] = t[2]),
                  (r[5] = ""))
                : 0 !== i ||
                  r[5] ||
                  void 0 === e.columnNumber ||
                  (o[0].column = e.columnNumber + 1),
                (n = {
                  url: r[3],
                  func: r[1] || JZ,
                  args: r[2] ? r[2].split(",") : [],
                  line: r[4] ? +r[4] : null,
                  column: r[5] ? +r[5] : null,
                });
            }
            !n.func && n.line && (n.func = JZ), o.push(n);
          }
          if (!o.length) return null;
          return { message: lY(e), name: e.name, stack: o };
        })(e))
      )
        return sY(t, r);
    } catch (e) {}
    return { message: lY(e), name: e && e.name, stack: [], failed: !0 };
  }
  function sY(e, t) {
    try {
      return qV(qV({}, e), { stack: e.stack.slice(t) });
    } catch (t) {
      return e;
    }
  }
  function lY(e) {
    var t = e && e.message;
    return t
      ? t.error && "string" == typeof t.error.message
        ? t.error.message
        : t
      : "No error message";
  }
  function cY(e) {
    var t = dY(e.stack),
      r = { type: e.name, value: e.message };
    return (
      t && t.length && (r.stacktrace = { frames: t }),
      void 0 === r.type &&
        "" === r.value &&
        (r.value = "Unrecoverable error caught"),
      r
    );
  }
  function uY(e) {
    return { exception: { values: [cY(e)] } };
  }
  function dY(e) {
    if (!e || !e.length) return [];
    var t = e,
      r = t[0].func || "",
      n = t[t.length - 1].func || "";
    return (
      (-1 === r.indexOf("captureMessage") &&
        -1 === r.indexOf("captureException")) ||
        (t = t.slice(1)),
      -1 !== n.indexOf("sentryWrapped") && (t = t.slice(0, -1)),
      t
        .slice(0, 50)
        .map(function (e) {
          return {
            colno: null === e.column ? void 0 : e.column,
            filename: e.url || t[0].url,
            function: e.func || "?",
            in_app: !0,
            lineno: null === e.line ? void 0 : e.line,
          };
        })
        .reverse()
    );
  }
  function hY(e, t, r) {
    var n;
    if ((void 0 === r && (r = {}), JV(e) && e.error))
      return (n = uY(iY((e = e.error))));
    if (eq(e) || tq(e)) {
      var o = e,
        a = o.name || (eq(o) ? "DOMError" : "DOMException"),
        i = o.message ? a + ": " + o.message : a;
      return jq((n = pY(i, t, r)), i), n;
    }
    return XV(e)
      ? (n = uY(iY(e)))
      : oq(e) || aq(e)
      ? (Wq(
          (n = (function (e, t, r) {
            var n = {
              exception: {
                values: [
                  {
                    type: aq(e)
                      ? e.constructor.name
                      : r
                      ? "UnhandledRejection"
                      : "Error",
                    value:
                      "Non-Error " +
                      (r ? "promise rejection" : "exception") +
                      " captured with keys: " +
                      Lq(e),
                  },
                ],
              },
              extra: { __serialized__: Aq(e) },
            };
            if (t) {
              var o = dY(iY(t).stack);
              n.stacktrace = { frames: o };
            }
            return n;
          })(e, t, r.rejection)),
          { synthetic: !0 }
        ),
        n)
      : (jq((n = pY(e, t, r)), "" + e, void 0), Wq(n, { synthetic: !0 }), n);
  }
  function pY(e, t, r) {
    void 0 === r && (r = {});
    var n = { message: e };
    if (r.attachStacktrace && t) {
      var o = dY(iY(t).stack);
      n.stacktrace = { frames: o };
    }
    return n;
  }
  var mY = {},
    gY = (function () {
      function e(e) {
        (this.options = e),
          (this._buffer = new kZ(30)),
          (this._api = new BZ(this.options.dsn)),
          (this.url = this._api.getStoreEndpointWithUrlEncodedAuth());
      }
      return (
        (e.prototype.sendEvent = function (e) {
          throw new mq("Transport Class has to implement `sendEvent` method");
        }),
        (e.prototype.close = function (e) {
          return this._buffer.drain(e);
        }),
        e
      );
    })(),
    fY = $q(),
    vY = (function (e) {
      function t() {
        var t = (null !== e && e.apply(this, arguments)) || this;
        return (t._disabledUntil = new Date(Date.now())), t;
      }
      return (
        VV(t, e),
        (t.prototype.sendEvent = function (e) {
          var t = this;
          if (new Date(Date.now()) < this._disabledUntil)
            return Promise.reject({
              event: e,
              reason:
                "Transport locked till " +
                this._disabledUntil +
                " due to too many requests.",
              status: 429,
            });
          var r = qZ(e, this._api),
            n = {
              body: r.body,
              method: "POST",
              referrerPolicy: tZ() ? "origin" : "",
            };
          return (
            void 0 !== this.options.fetchParameters &&
              Object.assign(n, this.options.fetchParameters),
            void 0 !== this.options.headers &&
              (n.headers = this.options.headers),
            this._buffer.add(
              new CZ(function (e, o) {
                fY.fetch(r.url, n)
                  .then(function (r) {
                    var n = HZ.fromHttpCode(r.status);
                    if (n !== HZ.Success) {
                      if (n === HZ.RateLimit) {
                        var a = Date.now(),
                          i = r.headers.get("Retry-After");
                        (t._disabledUntil = new Date(a + qq(a, i))),
                          Qq.warn(
                            "Too many requests, backing off till: " +
                              t._disabledUntil
                          );
                      }
                      o(r);
                    } else e({ status: n });
                  })
                  .catch(o);
              })
            )
          );
        }),
        t
      );
    })(gY),
    bY = (function (e) {
      function t() {
        var t = (null !== e && e.apply(this, arguments)) || this;
        return (t._disabledUntil = new Date(Date.now())), t;
      }
      return (
        VV(t, e),
        (t.prototype.sendEvent = function (e) {
          var t = this;
          if (new Date(Date.now()) < this._disabledUntil)
            return Promise.reject({
              event: e,
              reason:
                "Transport locked till " +
                this._disabledUntil +
                " due to too many requests.",
              status: 429,
            });
          var r = qZ(e, this._api);
          return this._buffer.add(
            new CZ(function (e, n) {
              var o = new XMLHttpRequest();
              for (var a in ((o.onreadystatechange = function () {
                if (4 === o.readyState) {
                  var r = HZ.fromHttpCode(o.status);
                  if (r !== HZ.Success) {
                    if (r === HZ.RateLimit) {
                      var a = Date.now(),
                        i = o.getResponseHeader("Retry-After");
                      (t._disabledUntil = new Date(a + qq(a, i))),
                        Qq.warn(
                          "Too many requests, backing off till: " +
                            t._disabledUntil
                        );
                    }
                    n(o);
                  } else e({ status: r });
                }
              }),
              o.open("POST", r.url),
              t.options.headers))
                t.options.headers.hasOwnProperty(a) &&
                  o.setRequestHeader(a, t.options.headers[a]);
              o.send(r.body);
            })
          );
        }),
        t
      );
    })(gY);
  r(mY, "BaseTransport", function () {
    return gY;
  }),
    r(mY, "FetchTransport", function () {
      return vY;
    }),
    r(mY, "XHRTransport", function () {
      return bY;
    });
  var yY = (function (e) {
      function t() {
        return (null !== e && e.apply(this, arguments)) || this;
      }
      return (
        VV(t, e),
        (t.prototype.eventFromException = function (e, t) {
          return (function (e, t, r) {
            var n = hY(t, (r && r.syntheticException) || void 0, {
              attachStacktrace: e.attachStacktrace,
            });
            return (
              Wq(n, { handled: !0, type: "generic" }),
              (n.level = NZ.Error),
              r && r.event_id && (n.event_id = r.event_id),
              CZ.resolve(n)
            );
          })(this._options, e, t);
        }),
        (t.prototype.eventFromMessage = function (e, t, r) {
          return (
            void 0 === t && (t = NZ.Info),
            (function (e, t, r, n) {
              void 0 === r && (r = NZ.Info);
              var o = pY(t, (n && n.syntheticException) || void 0, {
                attachStacktrace: e.attachStacktrace,
              });
              return (
                (o.level = r),
                n && n.event_id && (o.event_id = n.event_id),
                CZ.resolve(o)
              );
            })(this._options, e, t, r)
          );
        }),
        (t.prototype._setupTransport = function () {
          if (!this._options.dsn) return e.prototype._setupTransport.call(this);
          var t = qV(qV({}, this._options.transportOptions), {
            dsn: this._options.dsn,
          });
          return this._options.transport
            ? new this._options.transport(t)
            : Xq()
            ? new vY(t)
            : new bY(t);
        }),
        t
      );
    })(VZ),
    wY = 0;
  function CY() {
    return wY > 0;
  }
  function kY() {
    (wY += 1),
      setTimeout(function () {
        wY -= 1;
      });
  }
  function SY(e, t, r) {
    if ((void 0 === t && (t = {}), "function" != typeof e)) return e;
    try {
      if (e.__sentry__) return e;
      if (e.__sentry_wrapped__) return e.__sentry_wrapped__;
    } catch (t) {
      return e;
    }
    var n = function () {
      var n = Array.prototype.slice.call(arguments);
      try {
        r && "function" == typeof r && r.apply(this, arguments);
        var o = n.map(function (e) {
          return SY(e, t);
        });
        return e.handleEvent ? e.handleEvent.apply(this, o) : e.apply(this, o);
      } catch (e) {
        throw (
          (kY(),
          LZ(function (r) {
            r.addEventProcessor(function (e) {
              var r = qV({}, e);
              return (
                t.mechanism && (jq(r, void 0, void 0), Wq(r, t.mechanism)),
                (r.extra = qV(qV({}, r.extra), { arguments: n })),
                r
              );
            }),
              RZ(e);
          }),
          e)
        );
      }
    };
    try {
      for (var o in e)
        Object.prototype.hasOwnProperty.call(e, o) && (n[o] = e[o]);
    } catch (e) {}
    (e.prototype = e.prototype || {}),
      (n.prototype = e.prototype),
      Object.defineProperty(e, "__sentry_wrapped__", {
        enumerable: !1,
        value: n,
      }),
      Object.defineProperties(n, {
        __sentry__: { enumerable: !1, value: !0 },
        __sentry_original__: { enumerable: !1, value: e },
      });
    try {
      Object.getOwnPropertyDescriptor(n, "name").configurable &&
        Object.defineProperty(n, "name", {
          get: function () {
            return e.name;
          },
        });
    } catch (e) {}
    return n;
  }
  function EY(e) {
    if ((void 0 === e && (e = {}), e.eventId))
      if (e.dsn) {
        var t = document.createElement("script");
        (t.async = !0),
          (t.src = new BZ(e.dsn).getReportDialogEndpoint(e)),
          e.onLoad && (t.onload = e.onLoad),
          (document.head || document.body).appendChild(t);
      } else Qq.error("Missing dsn option in showReportDialog call");
    else Qq.error("Missing eventId option in showReportDialog call");
  }
  var _Y = {},
    xY = (function () {
      function e(t) {
        (this.name = e.id),
          (this._onErrorHandlerInstalled = !1),
          (this._onUnhandledRejectionHandlerInstalled = !1),
          (this._options = qV({ onerror: !0, onunhandledrejection: !0 }, t));
      }
      return (
        (e.prototype.setupOnce = function () {
          (Error.stackTraceLimit = 50),
            this._options.onerror &&
              (Qq.log("Global Handler attached: onerror"),
              this._installGlobalOnErrorHandler()),
            this._options.onunhandledrejection &&
              (Qq.log("Global Handler attached: onunhandledrejection"),
              this._installGlobalOnUnhandledRejectionHandler());
        }),
        (e.prototype._installGlobalOnErrorHandler = function () {
          var t = this;
          this._onErrorHandlerInstalled ||
            (lZ({
              callback: function (r) {
                var n = r.error,
                  o = GZ(),
                  a = o.getIntegration(e),
                  i = n && !0 === n.__sentry_own_request__;
                if (a && !CY() && !i) {
                  var s = o.getClient(),
                    l = nq(n)
                      ? t._eventFromIncompleteOnError(
                          r.msg,
                          r.url,
                          r.line,
                          r.column
                        )
                      : t._enhanceEventWithInitialFrame(
                          hY(n, void 0, {
                            attachStacktrace:
                              s && s.getOptions().attachStacktrace,
                            rejection: !1,
                          }),
                          r.url,
                          r.line,
                          r.column
                        );
                  Wq(l, { handled: !1, type: "onerror" }),
                    o.captureEvent(l, { originalException: n });
                }
              },
              type: "error",
            }),
            (this._onErrorHandlerInstalled = !0));
        }),
        (e.prototype._installGlobalOnUnhandledRejectionHandler = function () {
          var t = this;
          this._onUnhandledRejectionHandlerInstalled ||
            (lZ({
              callback: function (r) {
                var n = r;
                try {
                  "reason" in r
                    ? (n = r.reason)
                    : "detail" in r &&
                      "reason" in r.detail &&
                      (n = r.detail.reason);
                } catch (e) {}
                var o = GZ(),
                  a = o.getIntegration(e),
                  i = n && !0 === n.__sentry_own_request__;
                if (!a || CY() || i) return !0;
                var s = o.getClient(),
                  l = nq(n)
                    ? t._eventFromIncompleteRejection(n)
                    : hY(n, void 0, {
                        attachStacktrace: s && s.getOptions().attachStacktrace,
                        rejection: !0,
                      });
                (l.level = NZ.Error),
                  Wq(l, { handled: !1, type: "onunhandledrejection" }),
                  o.captureEvent(l, { originalException: n });
              },
              type: "unhandledrejection",
            }),
            (this._onUnhandledRejectionHandlerInstalled = !0));
        }),
        (e.prototype._eventFromIncompleteOnError = function (e, t, r, n) {
          var o,
            a = JV(e) ? e.message : e;
          if (rq(a)) {
            var i = a.match(
              /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i
            );
            i && ((o = i[1]), (a = i[2]));
          }
          var s = { exception: { values: [{ type: o || "Error", value: a }] } };
          return this._enhanceEventWithInitialFrame(s, t, r, n);
        }),
        (e.prototype._eventFromIncompleteRejection = function (e) {
          return {
            exception: {
              values: [
                {
                  type: "UnhandledRejection",
                  value:
                    "Non-Error promise rejection captured with value: " + e,
                },
              ],
            },
          };
        }),
        (e.prototype._enhanceEventWithInitialFrame = function (e, t, r, n) {
          (e.exception = e.exception || {}),
            (e.exception.values = e.exception.values || []),
            (e.exception.values[0] = e.exception.values[0] || {}),
            (e.exception.values[0].stacktrace =
              e.exception.values[0].stacktrace || {}),
            (e.exception.values[0].stacktrace.frames =
              e.exception.values[0].stacktrace.frames || []);
          var o = isNaN(parseInt(n, 10)) ? void 0 : n,
            a = isNaN(parseInt(r, 10)) ? void 0 : r,
            i = rq(t) && t.length > 0 ? t : Vq();
          return (
            0 === e.exception.values[0].stacktrace.frames.length &&
              e.exception.values[0].stacktrace.frames.push({
                colno: o,
                filename: i,
                function: "?",
                in_app: !0,
                lineno: a,
              }),
            e
          );
        }),
        (e.id = "GlobalHandlers"),
        e
      );
    })(),
    PY = [
      "EventTarget",
      "Window",
      "Node",
      "ApplicationCache",
      "AudioTrackList",
      "ChannelMergerNode",
      "CryptoOperation",
      "EventSource",
      "FileReader",
      "HTMLUnknownElement",
      "IDBDatabase",
      "IDBRequest",
      "IDBTransaction",
      "KeyOperation",
      "MediaController",
      "MessagePort",
      "ModalWindow",
      "Notification",
      "SVGElementInstance",
      "Screen",
      "TextTrack",
      "TextTrackCue",
      "TextTrackList",
      "WebSocket",
      "WebSocketWorker",
      "Worker",
      "XMLHttpRequest",
      "XMLHttpRequestEventTarget",
      "XMLHttpRequestUpload",
    ],
    TY = (function () {
      function e(t) {
        (this.name = e.id),
          (this._options = qV(
            {
              XMLHttpRequest: !0,
              eventTarget: !0,
              requestAnimationFrame: !0,
              setInterval: !0,
              setTimeout: !0,
            },
            t
          ));
      }
      return (
        (e.prototype.setupOnce = function () {
          var e = $q();
          (this._options.setTimeout &&
            Tq(e, "setTimeout", this._wrapTimeFunction.bind(this)),
          this._options.setInterval &&
            Tq(e, "setInterval", this._wrapTimeFunction.bind(this)),
          this._options.requestAnimationFrame &&
            Tq(e, "requestAnimationFrame", this._wrapRAF.bind(this)),
          this._options.XMLHttpRequest &&
            "XMLHttpRequest" in e &&
            Tq(XMLHttpRequest.prototype, "send", this._wrapXHR.bind(this)),
          this._options.eventTarget) &&
            (Array.isArray(this._options.eventTarget)
              ? this._options.eventTarget
              : PY
            ).forEach(this._wrapEventTarget.bind(this));
        }),
        (e.prototype._wrapTimeFunction = function (e) {
          return function () {
            for (var t = [], r = 0; r < arguments.length; r++)
              t[r] = arguments[r];
            var n = t[0];
            return (
              (t[0] = SY(n, {
                mechanism: {
                  data: { function: kq(e) },
                  handled: !0,
                  type: "instrument",
                },
              })),
              e.apply(this, t)
            );
          };
        }),
        (e.prototype._wrapRAF = function (e) {
          return function (t) {
            return e.call(
              this,
              SY(t, {
                mechanism: {
                  data: { function: "requestAnimationFrame", handler: kq(e) },
                  handled: !0,
                  type: "instrument",
                },
              })
            );
          };
        }),
        (e.prototype._wrapEventTarget = function (e) {
          var t = $q(),
            r = t[e] && t[e].prototype;
          r &&
            r.hasOwnProperty &&
            r.hasOwnProperty("addEventListener") &&
            (Tq(r, "addEventListener", function (t) {
              return function (r, n, o) {
                try {
                  "function" == typeof n.handleEvent &&
                    (n.handleEvent = SY(n.handleEvent.bind(n), {
                      mechanism: {
                        data: {
                          function: "handleEvent",
                          handler: kq(n),
                          target: e,
                        },
                        handled: !0,
                        type: "instrument",
                      },
                    }));
                } catch (e) {}
                return t.call(
                  this,
                  r,
                  SY(n, {
                    mechanism: {
                      data: {
                        function: "addEventListener",
                        handler: kq(n),
                        target: e,
                      },
                      handled: !0,
                      type: "instrument",
                    },
                  }),
                  o
                );
              };
            }),
            Tq(r, "removeEventListener", function (e) {
              return function (t, r, n) {
                try {
                  e.call(this, t, r.__sentry_wrapped__, n);
                } catch (e) {}
                return e.call(this, t, r, n);
              };
            }));
        }),
        (e.prototype._wrapXHR = function (e) {
          return function () {
            for (var t = [], r = 0; r < arguments.length; r++)
              t[r] = arguments[r];
            var n = this,
              o = ["onload", "onerror", "onprogress", "onreadystatechange"];
            return (
              o.forEach(function (e) {
                e in n &&
                  "function" == typeof n[e] &&
                  Tq(n, e, function (t) {
                    var r = {
                      mechanism: {
                        data: { function: e, handler: kq(t) },
                        handled: !0,
                        type: "instrument",
                      },
                    };
                    return (
                      t.__sentry_original__ &&
                        (r.mechanism.data.handler = kq(t.__sentry_original__)),
                      SY(t, r)
                    );
                  });
              }),
              e.apply(this, t)
            );
          };
        }),
        (e.id = "TryCatch"),
        e
      );
    })(),
    IY = (function () {
      function e(t) {
        (this.name = e.id),
          (this._options = qV(
            {
              console: !0,
              dom: !0,
              fetch: !0,
              history: !0,
              sentry: !0,
              xhr: !0,
            },
            t
          ));
      }
      return (
        (e.prototype.addSentryBreadcrumb = function (e) {
          this._options.sentry &&
            GZ().addBreadcrumb(
              {
                category:
                  "sentry." +
                  ("transaction" === e.type ? "transaction" : "event"),
                event_id: e.event_id,
                level: e.level,
                message: Hq(e),
              },
              { event: e }
            );
        }),
        (e.prototype.setupOnce = function () {
          var e = this;
          this._options.console &&
            lZ({
              callback: function () {
                for (var t = [], r = 0; r < arguments.length; r++)
                  t[r] = arguments[r];
                e._consoleBreadcrumb.apply(e, QV(t));
              },
              type: "console",
            }),
            this._options.dom &&
              lZ({
                callback: function () {
                  for (var t = [], r = 0; r < arguments.length; r++)
                    t[r] = arguments[r];
                  e._domBreadcrumb.apply(e, QV(t));
                },
                type: "dom",
              }),
            this._options.xhr &&
              lZ({
                callback: function () {
                  for (var t = [], r = 0; r < arguments.length; r++)
                    t[r] = arguments[r];
                  e._xhrBreadcrumb.apply(e, QV(t));
                },
                type: "xhr",
              }),
            this._options.fetch &&
              lZ({
                callback: function () {
                  for (var t = [], r = 0; r < arguments.length; r++)
                    t[r] = arguments[r];
                  e._fetchBreadcrumb.apply(e, QV(t));
                },
                type: "fetch",
              }),
            this._options.history &&
              lZ({
                callback: function () {
                  for (var t = [], r = 0; r < arguments.length; r++)
                    t[r] = arguments[r];
                  e._historyBreadcrumb.apply(e, QV(t));
                },
                type: "history",
              });
        }),
        (e.prototype._consoleBreadcrumb = function (e) {
          var t = {
            category: "console",
            data: { arguments: e.args, logger: "console" },
            level: NZ.fromString(e.level),
            message: xq(e.args, " "),
          };
          if ("assert" === e.level) {
            if (!1 !== e.args[0]) return;
            (t.message =
              "Assertion failed: " +
              (xq(e.args.slice(1), " ") || "console.assert")),
              (t.data.arguments = e.args.slice(1));
          }
          GZ().addBreadcrumb(t, { input: e.args, level: e.level });
        }),
        (e.prototype._domBreadcrumb = function (e) {
          var t;
          try {
            t = e.event.target ? dq(e.event.target) : dq(e.event);
          } catch (e) {
            t = "<unknown>";
          }
          0 !== t.length &&
            GZ().addBreadcrumb(
              { category: "ui." + e.name, message: t },
              { event: e.event, name: e.name }
            );
        }),
        (e.prototype._xhrBreadcrumb = function (e) {
          if (e.endTimestamp) {
            if (e.xhr.__sentry_own_request__) return;
            var t = e.xhr.__sentry_xhr__ || {},
              r = t.method,
              n = t.url,
              o = t.status_code,
              a = t.body;
            GZ().addBreadcrumb(
              {
                category: "xhr",
                data: { method: r, url: n, status_code: o },
                type: "http",
              },
              { xhr: e.xhr, input: a }
            );
          } else;
        }),
        (e.prototype._fetchBreadcrumb = function (e) {
          e.endTimestamp &&
            ((e.fetchData.url.match(/sentry_key/) &&
              "POST" === e.fetchData.method) ||
              (e.error
                ? GZ().addBreadcrumb(
                    {
                      category: "fetch",
                      data: e.fetchData,
                      level: NZ.Error,
                      type: "http",
                    },
                    { data: e.error, input: e.args }
                  )
                : GZ().addBreadcrumb(
                    {
                      category: "fetch",
                      data: qV(qV({}, e.fetchData), {
                        status_code: e.response.status,
                      }),
                      type: "http",
                    },
                    { input: e.args, response: e.response }
                  )));
        }),
        (e.prototype._historyBreadcrumb = function (e) {
          var t = $q(),
            r = e.from,
            n = e.to,
            o = Uq(t.location.href),
            a = Uq(r),
            i = Uq(n);
          a.path || (a = o),
            o.protocol === i.protocol && o.host === i.host && (n = i.relative),
            o.protocol === a.protocol && o.host === a.host && (r = a.relative),
            GZ().addBreadcrumb({
              category: "navigation",
              data: { from: r, to: n },
            });
        }),
        (e.id = "Breadcrumbs"),
        e
      );
    })(),
    GY = (function () {
      function e(t) {
        void 0 === t && (t = {}),
          (this.name = e.id),
          (this._key = t.key || "cause"),
          (this._limit = t.limit || 5);
      }
      return (
        (e.prototype.setupOnce = function () {
          xZ(function (t, r) {
            var n = GZ().getIntegration(e);
            return n ? n._handler(t, r) : t;
          });
        }),
        (e.prototype._handler = function (e, t) {
          if (
            !(
              e.exception &&
              e.exception.values &&
              t &&
              uq(t.originalException, Error)
            )
          )
            return e;
          var r = this._walkErrorTree(t.originalException, this._key);
          return (e.exception.values = QV(r, e.exception.values)), e;
        }),
        (e.prototype._walkErrorTree = function (e, t, r) {
          if (
            (void 0 === r && (r = []),
            !uq(e[t], Error) || r.length + 1 >= this._limit)
          )
            return r;
          var n = cY(iY(e[t]));
          return this._walkErrorTree(e[t], t, QV([n], r));
        }),
        (e.id = "LinkedErrors"),
        e
      );
    })(),
    DY = $q(),
    AY = (function () {
      function e() {
        this.name = e.id;
      }
      return (
        (e.prototype.setupOnce = function () {
          xZ(function (t) {
            var r, n, o;
            if (GZ().getIntegration(e)) {
              if (!DY.navigator && !DY.location && !DY.document) return t;
              var a =
                  (null === (r = t.request) || void 0 === r ? void 0 : r.url) ||
                  (null === (n = DY.location) || void 0 === n
                    ? void 0
                    : n.href),
                i = (DY.document || {}).referrer,
                s = (DY.navigator || {}).userAgent,
                l = qV(
                  qV(
                    qV(
                      {},
                      null === (o = t.request) || void 0 === o
                        ? void 0
                        : o.headers
                    ),
                    i && { Referer: i }
                  ),
                  s && { "User-Agent": s }
                ),
                c = qV(qV({}, a && { url: a }), { headers: l });
              return qV(qV({}, t), { request: c });
            }
            return t;
          });
        }),
        (e.id = "UserAgent"),
        e
      );
    })();
  r(_Y, "GlobalHandlers", function () {
    return xY;
  }),
    r(_Y, "TryCatch", function () {
      return TY;
    }),
    r(_Y, "Breadcrumbs", function () {
      return IY;
    }),
    r(_Y, "LinkedErrors", function () {
      return GY;
    }),
    r(_Y, "UserAgent", function () {
      return AY;
    });
  var MY = "5.25.0",
    FY = (function (e) {
      function t(t) {
        return void 0 === t && (t = {}), e.call(this, yY, t) || this;
      }
      return (
        VV(t, e),
        (t.prototype.showReportDialog = function (e) {
          void 0 === e && (e = {}),
            $q().document &&
              (this._isEnabled()
                ? EY(qV(qV({}, e), { dsn: e.dsn || this.getDsn() }))
                : Qq.error(
                    "Trying to call showReportDialog with Sentry Client disabled"
                  ));
        }),
        (t.prototype._prepareEvent = function (t, r, n) {
          return (
            (t.platform = t.platform || "javascript"),
            (t.sdk = qV(qV({}, t.sdk), {
              name: "sentry.javascript.browser",
              packages: QV((t.sdk && t.sdk.packages) || [], [
                { name: "npm:@sentry/browser", version: MY },
              ]),
              version: MY,
            })),
            e.prototype._prepareEvent.call(this, t, r, n)
          );
        }),
        (t.prototype._sendEvent = function (t) {
          var r = this.getIntegration(IY);
          r && r.addSentryBreadcrumb(t), e.prototype._sendEvent.call(this, t);
        }),
        t
      );
    })(jZ),
    RY = [
      new YZ.InboundFilters(),
      new YZ.FunctionToString(),
      new TY(),
      new IY(),
      new xY(),
      new GY(),
      new AY(),
    ];
  function LY(e) {
    if (
      (void 0 === e && (e = {}),
      void 0 === e.defaultIntegrations && (e.defaultIntegrations = RY),
      void 0 === e.release)
    ) {
      var t = $q();
      t.SENTRY_RELEASE &&
        t.SENTRY_RELEASE.id &&
        (e.release = t.SENTRY_RELEASE.id);
    }
    !(function (e, t) {
      !0 === t.debug && Qq.enable();
      var r = GZ(),
        n = new e(t);
      r.bindClient(n);
    })(FY, e);
  }
  const { $sentry: BY, $store: OY, $bus: $Y, $env: NY, $utils: UY } = app,
    HY = [
      "ResizeObserver loop limit exceeded",
      "Unable to preventDefault inside passive event listener",
      "Extension context invalidated.",
      "Invalid or unexpected token",
      "AbortError: The play() request was interrupted by a call to pause(). https://goo.gl/LdLk22",
      "InvalidStateError: Failed to execute 'transaction' on 'IDBDatabase'",
      "Timed out",
      "Failed to fetch",
    ];
  BY.controller = {
    throttle: !1,
    init: async function ({ throttleBy: e = 10 } = {}) {
      if (
        ((this.dsn =
          "https://bea0900834f541bca8157710f7fd31fe@sentry.io/1547551"),
        NY.is.development)
      )
        this.throttle = !1;
      else if (e <= 1) this.throttle = !1;
      else {
        let t = await UY.ls.get("sentry-user-hash");
        t ||
          ((t = Math.floor(1e13 * Math.random())),
          await UY.ls.set("sentry-user-hash", t)),
          (this.throttle = t % e != 0);
      }
      this._setup();
    },
    _setup: function () {
      NY.is.development ||
        LY({
          dsn: this.dsn,
          release: NY.version,
          debug: NY.is.development,
          ignoreErrors: HY,
          environment: NY.is.development
            ? "development"
            : NY.is.production
            ? "production"
            : "unknown",
          beforeSend: (e, t) => {
            if (NY.is.production && "debug" === e.level) return null;
            if (this.throttle) return null;
            const r = OY.model;
            if (r.store && r.state) {
              let t = { ...r.state, auth: { ...r.state.auth } };
              delete t.auth.cookies,
                (t = JSON.stringify(t)),
                (t = t.length > 102400 ? t.substr(0, 102400) + "..." : r.state),
                (e.extra = { ...(e.extra || {}), state: t });
            }
            const n = t.originalException,
              o = (n && n.message) || String(n);
            return o && HY.some((e) => o.includes(e)) ? null : e;
          },
        });
    },
    sendError: function (e, t = "error", r = null, n = null) {
      console.log("%csentry", "color: #c818dc", e, r),
        NY.is.bg &&
          $Y.send(
            "popup.log",
            "%csentry error [background]",
            "color: #c818dc",
            e,
            r
          ),
        "string" == typeof e && (e = new Error(e)),
        FZ("configureScope", (o) => {
          o.setFingerprint([e.message]), o.setLevel(t);
          const a = OY.model;
          if (
            (a.store &&
              a.state &&
              a.state.auth &&
              o.setUser({ username: a.state.auth.username }),
            r)
          )
            for (const e in r) {
              let t = r[e];
              "string" == typeof t &&
                t.length > 15500 &&
                (t = t.substr(0, 15500)),
                o.setExtra(e, t);
            }
          if (n)
            for (const e in n) {
              const t = n[e];
              o.setTag(e, t);
            }
        }),
        RZ(e);
    },
  };
  const { $i18n: zY } = app;
  zY.controller = {
    init: function () {
      globalThis.lo = this._lo;
    },
    _lo: function (e) {
      const t = chrome.i18n.getMessage(e);
      if ("" === t) throw new Error(`i18n: no message found for id '${e}'`);
      return t;
    },
  };
  const { $igFrame: jY } = app;
  jY.validateCaption = (e) => {
    const t = 2200,
      r = 30,
      n = 30,
      o = (e.match(/@[\p{L}\d_]+/gu) || []).length,
      a = (e.match(/#[\p{L}\d_]+/gu) || []).length;
    return e.length > t
      ? `Caption length exceeded: ${e.length} / ${t}`
      : o > r
      ? `Mention limit exceeded: ${o} / ${r}`
      : a > n
      ? `Hashtag limit exceeded: ${a} / ${n}`
      : null;
  };
  const { $igFrame: WY } = app;
  WY.controller = {
    init: function () {
      WY.creationController.init(),
        WY.widescreenController.init(),
        WY.extensionLinkController.init();
    },
  };
  const { $igFrame: VY, $store: qY, $ffmpeg: ZY, $iframeBus: YY } = app;
  VY.creationController = {
    init: function () {
      this._preloadFfmpeg();
    },
    observeStateDuringCreation: function (e, t) {
      let r, n;
      YY.on("ig.creation-session-start", () => {
        clearTimeout(n), (r = qY.model.observe(e, t));
      }),
        YY.on("ig.creation-session-end", () => {
          n = setTimeout(() => {
            r && r(), (r = null);
          }, 3e3);
        });
    },
    _preloadFfmpeg: function () {
      YY.on("ig.creation-session-start", function e({ isVideo: t }) {
        t && (ZY.controller.load(), YY.off("ig.creation-session-start", e));
      });
    },
  };
  const { $igFrame: QY, $iframeBus: KY } = app;
  QY.extensionLinkController = {
    init: function () {
      KY.on("ig.open-link", this._openLink.bind(this));
    },
    _openLink: function (e) {
      globalThis.electron
        ? window.open(e)
        : chrome.tabs.create({ url: e, active: !0 });
    },
  };
  const { $igFrame: XY, $utils: JY, $iframeBus: eQ } = app;
  XY.widescreenController = {
    init: function () {
      eQ.on(
        "ig.force-small-iframe-width",
        this._forceSmallIframeWidth.bind(this)
      );
    },
    _forceSmallIframeWidth: function (e) {
      JY.$('iframe[name^="inssist-ig"]').style.width = e ? "550px" : null;
    },
  };
  const { $eventBus: tQ } = app;
  tQ.controller = {
    init: function () {
      Object.assign(tQ, { send: rQ, on: nQ, once: oQ });
    },
  };
  function rQ(e, ...t) {
    const r = new CustomEvent(`__event-bus.${e}`, { detail: t });
    globalThis.dispatchEvent(r);
  }
  function nQ(e, t, { once: r = !1 } = {}) {
    globalThis.addEventListener(
      `__event-bus.${e}`,
      (e) => {
        const r = e.detail || [];
        t(...r);
      },
      { once: r }
    );
  }
  function oQ(e, t) {
    nQ(e, t, { once: !0 });
  }
  const { $sameSiteFix: aQ, $bus: iQ } = app;
  (aQ.controller = {
    init: async function () {
      await iQ.send("sameSiteFix.fixExistingCookies");
    },
  }),
    it();
  const {
    $startup: sQ,
    $abTesting: lQ,
    $analytics: cQ,
    $billing: uQ,
    $bus: dQ,
    $cleanup: hQ,
    $coverAssist: pQ,
    $dev: mQ,
    $env: gQ,
    $featureEncourage: fQ,
    $i18n: vQ,
    $idb: bQ,
    $iframeBus: yQ,
    $igApi: wQ,
    $inspiration: CQ,
    $later: kQ,
    $musicAssist: SQ,
    $newPostExtra: EQ,
    $popup: _Q,
    $reels: xQ,
    $sentry: PQ,
    $store: TQ,
    $tagAssist: IQ,
    $webRequest: GQ,
    $fusion: DQ,
    $theme: AQ,
    $rateUs: MQ,
    $igView: FQ,
    $dm: RQ,
    $storyAssist: LQ,
    $quickReplies: BQ,
    $cdnProxy: OQ,
    $igInterceptor: $Q,
    $ghostStoryView: NQ,
    $igFrame: UQ,
    $eventBus: HQ,
    $lodash: zQ,
    $sameSiteFix: jQ,
  } = app;
  (sQ.controller = {
    init: async function () {
      (window._ = zQ),
        (window.Glamor = ry),
        (window.React = ot),
        await dQ.controller.init(),
        await HQ.controller.init(),
        await gQ.controller.init(),
        await bQ.controller.init(),
        await TQ.controller.init(),
        await dQ.poll("statup.bgReady"),
        await _Q.chromeTabController.init(),
        await vQ.controller.init(),
        await PQ.controller.init(),
        await AQ.controller.init(),
        await DQ.controller.init(),
        await hQ.controller.cleanUpState(),
        await wQ.api.init(),
        await _Q.minVersionController.init(),
        await cQ.controller.init().sendPageview(),
        await MQ.controller.init(),
        await yQ.init(),
        await IQ.controller.init(),
        await mQ.controller.init(),
        await _Q.iframeStatsController.init(),
        await FQ.controller.init(),
        await BQ.controller.init(),
        await RQ.controller.init(),
        await fQ.controller.init(),
        await EQ.controller.init(),
        await pQ.controller.init(),
        await LQ.controller.init(),
        await SQ.controller.init(),
        await xQ.controller.init(),
        await uQ.controller.init(),
        await GQ.controller.init(),
        await OQ.controller.init(),
        await UQ.controller.init(),
        await $Q.controller.init(),
        await NQ.controller.init(),
        await lQ.controller.init(),
        await kQ.controller.init(),
        await CQ.controller.init(),
        await jQ.controller.init(),
        await _Q.injector.init(),
        dQ.send("popup.start"),
        dQ.on("popup.log", (...e) => console.log(...e)),
        dQ.on("startup.ppReady", () => !0),
        sQ.logDev("pp ready");
    },
  }),
    sQ.controller.init();
})();
