UNPKG

@glance-networks/agent-plugin

Version:

Glance Networks Agent Plugin

1,267 lines (1,264 loc) 1.34 MB
import * as React from "react"; import React__default, { useState, useEffect, useRef, useMemo, cloneElement, useLayoutEffect, useCallback } from "react"; import { createPortal } from "react-dom"; function getDefaultExportFromCjs(e) { return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; } var jsxRuntime = { exports: {} }, reactJsxRuntime_production_min = {}; /** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var hasRequiredReactJsxRuntime_production_min; function requireReactJsxRuntime_production_min() { if (hasRequiredReactJsxRuntime_production_min) return reactJsxRuntime_production_min; hasRequiredReactJsxRuntime_production_min = 1; var e = React__default, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, o = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 }; function a(s, l, d) { var u, c = {}, f = null, g = null; d !== void 0 && (f = "" + d), l.key !== void 0 && (f = "" + l.key), l.ref !== void 0 && (g = l.ref); for (u in l) r.call(l, u) && !i.hasOwnProperty(u) && (c[u] = l[u]); if (s && s.defaultProps) for (u in l = s.defaultProps, l) c[u] === void 0 && (c[u] = l[u]); return { $$typeof: t, type: s, key: f, ref: g, props: c, _owner: o.current }; } return reactJsxRuntime_production_min.Fragment = n, reactJsxRuntime_production_min.jsx = a, reactJsxRuntime_production_min.jsxs = a, reactJsxRuntime_production_min; } var reactJsxRuntime_development = {}; /** * @license React * react-jsx-runtime.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var hasRequiredReactJsxRuntime_development; function requireReactJsxRuntime_development() { return hasRequiredReactJsxRuntime_development || (hasRequiredReactJsxRuntime_development = 1, process.env.NODE_ENV !== "production" && function() { var e = React__default, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), a = Symbol.for("react.provider"), s = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), c = Symbol.for("react.memo"), f = Symbol.for("react.lazy"), g = Symbol.for("react.offscreen"), p = Symbol.iterator, m = "@@iterator"; function h(_) { if (_ === null || typeof _ != "object") return null; var j = p && _[p] || _[m]; return typeof j == "function" ? j : null; } var C = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; function b(_) { { for (var j = arguments.length, W = new Array(j > 1 ? j - 1 : 0), $ = 1; $ < j; $++) W[$ - 1] = arguments[$]; L("error", _, W); } } function L(_, j, W) { { var $ = C.ReactDebugCurrentFrame, ie = $.getStackAddendum(); ie !== "" && (j += "%s", W = W.concat([ie])); var se = W.map(function(re) { return String(re); }); se.unshift("Warning: " + j), Function.prototype.apply.call(console[_], console, se); } } var v = !1, y = !1, S = !1, F = !1, Z = !1, w; w = Symbol.for("react.module.reference"); function P(_) { return !!(typeof _ == "string" || typeof _ == "function" || _ === r || _ === i || Z || _ === o || _ === d || _ === u || F || _ === g || v || y || S || typeof _ == "object" && _ !== null && (_.$$typeof === f || _.$$typeof === c || _.$$typeof === a || _.$$typeof === s || _.$$typeof === l || // This needs to include all possible module reference object // types supported by any Flight configuration anywhere since // we don't know which Flight build this will end up being used // with. _.$$typeof === w || _.getModuleId !== void 0)); } function H(_, j, W) { var $ = _.displayName; if ($) return $; var ie = j.displayName || j.name || ""; return ie !== "" ? W + "(" + ie + ")" : W; } function A(_) { return _.displayName || "Context"; } function R(_) { if (_ == null) return null; if (typeof _.tag == "number" && b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof _ == "function") return _.displayName || _.name || null; if (typeof _ == "string") return _; switch (_) { case r: return "Fragment"; case n: return "Portal"; case i: return "Profiler"; case o: return "StrictMode"; case d: return "Suspense"; case u: return "SuspenseList"; } if (typeof _ == "object") switch (_.$$typeof) { case s: var j = _; return A(j) + ".Consumer"; case a: var W = _; return A(W._context) + ".Provider"; case l: return H(_, _.render, "ForwardRef"); case c: var $ = _.displayName || null; return $ !== null ? $ : R(_.type) || "Memo"; case f: { var ie = _, se = ie._payload, re = ie._init; try { return R(re(se)); } catch { return null; } } } return null; } var E = Object.assign, N = 0, G, T, D, B, k, M, J; function O() { } O.__reactDisabledLog = !0; function K() { { if (N === 0) { G = console.log, T = console.info, D = console.warn, B = console.error, k = console.group, M = console.groupCollapsed, J = console.groupEnd; var _ = { configurable: !0, enumerable: !0, value: O, writable: !0 }; Object.defineProperties(console, { info: _, log: _, warn: _, error: _, group: _, groupCollapsed: _, groupEnd: _ }); } N++; } } function V() { { if (N--, N === 0) { var _ = { configurable: !0, enumerable: !0, writable: !0 }; Object.defineProperties(console, { log: E({}, _, { value: G }), info: E({}, _, { value: T }), warn: E({}, _, { value: D }), error: E({}, _, { value: B }), group: E({}, _, { value: k }), groupCollapsed: E({}, _, { value: M }), groupEnd: E({}, _, { value: J }) }); } N < 0 && b("disabledDepth fell below zero. This is a bug in React. Please file an issue."); } } var Y = C.ReactCurrentDispatcher, q; function I(_, j, W) { { if (q === void 0) try { throw Error(); } catch (ie) { var $ = ie.stack.trim().match(/\n( *(at )?)/); q = $ && $[1] || ""; } return ` ` + q + _; } } var ee = !1, X; { var ne = typeof WeakMap == "function" ? WeakMap : Map; X = new ne(); } function z(_, j) { if (!_ || ee) return ""; { var W = X.get(_); if (W !== void 0) return W; } var $; ee = !0; var ie = Error.prepareStackTrace; Error.prepareStackTrace = void 0; var se; se = Y.current, Y.current = null, K(); try { if (j) { var re = function() { throw Error(); }; if (Object.defineProperty(re.prototype, "props", { set: function() { throw Error(); } }), typeof Reflect == "object" && Reflect.construct) { try { Reflect.construct(re, []); } catch (me) { $ = me; } Reflect.construct(_, [], re); } else { try { re.call(); } catch (me) { $ = me; } _.call(re.prototype); } } else { try { throw Error(); } catch (me) { $ = me; } _(); } } catch (me) { if (me && $ && typeof me.stack == "string") { for (var te = me.stack.split(` `), pe = $.stack.split(` `), de = te.length - 1, ce = pe.length - 1; de >= 1 && ce >= 0 && te[de] !== pe[ce]; ) ce--; for (; de >= 1 && ce >= 0; de--, ce--) if (te[de] !== pe[ce]) { if (de !== 1 || ce !== 1) do if (de--, ce--, ce < 0 || te[de] !== pe[ce]) { var _e = ` ` + te[de].replace(" at new ", " at "); return _.displayName && _e.includes("<anonymous>") && (_e = _e.replace("<anonymous>", _.displayName)), typeof _ == "function" && X.set(_, _e), _e; } while (de >= 1 && ce >= 0); break; } } } finally { ee = !1, Y.current = se, V(), Error.prepareStackTrace = ie; } var xe = _ ? _.displayName || _.name : "", Se = xe ? I(xe) : ""; return typeof _ == "function" && X.set(_, Se), Se; } function fe(_, j, W) { return z(_, !1); } function ge(_) { var j = _.prototype; return !!(j && j.isReactComponent); } function U(_, j, W) { if (_ == null) return ""; if (typeof _ == "function") return z(_, ge(_)); if (typeof _ == "string") return I(_); switch (_) { case d: return I("Suspense"); case u: return I("SuspenseList"); } if (typeof _ == "object") switch (_.$$typeof) { case l: return fe(_.render); case c: return U(_.type, j, W); case f: { var $ = _, ie = $._payload, se = $._init; try { return U(se(ie), j, W); } catch { } } } return ""; } var Le = Object.prototype.hasOwnProperty, ke = {}, oe = C.ReactDebugCurrentFrame; function le(_) { if (_) { var j = _._owner, W = U(_.type, _._source, j ? j.type : null); oe.setExtraStackFrame(W); } else oe.setExtraStackFrame(null); } function he(_, j, W, $, ie) { { var se = Function.call.bind(Le); for (var re in _) if (se(_, re)) { var te = void 0; try { if (typeof _[re] != "function") { var pe = Error(($ || "React class") + ": " + W + " type `" + re + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof _[re] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); throw pe.name = "Invariant Violation", pe; } te = _[re](j, re, $, W, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); } catch (de) { te = de; } te && !(te instanceof Error) && (le(ie), b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", $ || "React class", W, re, typeof te), le(null)), te instanceof Error && !(te.message in ke) && (ke[te.message] = !0, le(ie), b("Failed %s type: %s", W, te.message), le(null)); } } } var be = Array.isArray; function ve(_) { return be(_); } function we(_) { { var j = typeof Symbol == "function" && Symbol.toStringTag, W = j && _[Symbol.toStringTag] || _.constructor.name || "Object"; return W; } } function Re(_) { try { return Ae(_), !1; } catch { return !0; } } function Ae(_) { return "" + _; } function Pe(_) { if (Re(_)) return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", we(_)), Ae(_); } var Ne = C.ReactCurrentOwner, Ge = { key: !0, ref: !0, __self: !0, __source: !0 }, Ie, Te; function He(_) { if (Le.call(_, "ref")) { var j = Object.getOwnPropertyDescriptor(_, "ref").get; if (j && j.isReactWarning) return !1; } return _.ref !== void 0; } function Ve(_) { if (Le.call(_, "key")) { var j = Object.getOwnPropertyDescriptor(_, "key").get; if (j && j.isReactWarning) return !1; } return _.key !== void 0; } function Oe(_, j) { typeof _.ref == "string" && Ne.current; } function Ce(_, j) { { var W = function() { Ie || (Ie = !0, b("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", j)); }; W.isReactWarning = !0, Object.defineProperty(_, "key", { get: W, configurable: !0 }); } } function De(_, j) { { var W = function() { Te || (Te = !0, b("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", j)); }; W.isReactWarning = !0, Object.defineProperty(_, "ref", { get: W, configurable: !0 }); } } var Q = function(_, j, W, $, ie, se, re) { var te = { // This tag allows us to uniquely identify this as a React Element $$typeof: t, // Built-in properties that belong on the element type: _, key: j, ref: W, props: re, // Record the component responsible for creating this element. _owner: se }; return te._store = {}, Object.defineProperty(te._store, "validated", { configurable: !1, enumerable: !1, writable: !0, value: !1 }), Object.defineProperty(te, "_self", { configurable: !1, enumerable: !1, writable: !1, value: $ }), Object.defineProperty(te, "_source", { configurable: !1, enumerable: !1, writable: !1, value: ie }), Object.freeze && (Object.freeze(te.props), Object.freeze(te)), te; }; function ae(_, j, W, $, ie) { { var se, re = {}, te = null, pe = null; W !== void 0 && (Pe(W), te = "" + W), Ve(j) && (Pe(j.key), te = "" + j.key), He(j) && (pe = j.ref, Oe(j, ie)); for (se in j) Le.call(j, se) && !Ge.hasOwnProperty(se) && (re[se] = j[se]); if (_ && _.defaultProps) { var de = _.defaultProps; for (se in de) re[se] === void 0 && (re[se] = de[se]); } if (te || pe) { var ce = typeof _ == "function" ? _.displayName || _.name || "Unknown" : _; te && Ce(re, ce), pe && De(re, ce); } return Q(_, te, pe, ie, $, Ne.current, re); } } var ue = C.ReactCurrentOwner, ye = C.ReactDebugCurrentFrame; function Ee(_) { if (_) { var j = _._owner, W = U(_.type, _._source, j ? j.type : null); ye.setExtraStackFrame(W); } else ye.setExtraStackFrame(null); } var Me; Me = !1; function Fe(_) { return typeof _ == "object" && _ !== null && _.$$typeof === t; } function Ze() { { if (ue.current) { var _ = R(ue.current.type); if (_) return ` Check the render method of \`` + _ + "`."; } return ""; } } function Ke(_) { return ""; } var Ue = {}; function Ye(_) { { var j = Ze(); if (!j) { var W = typeof _ == "string" ? _ : _.displayName || _.name; W && (j = ` Check the top-level render call using <` + W + ">."); } return j; } } function Be(_, j) { { if (!_._store || _._store.validated || _.key != null) return; _._store.validated = !0; var W = Ye(j); if (Ue[W]) return; Ue[W] = !0; var $ = ""; _ && _._owner && _._owner !== ue.current && ($ = " It was passed a child from " + R(_._owner.type) + "."), Ee(_), b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', W, $), Ee(null); } } function ze(_, j) { { if (typeof _ != "object") return; if (ve(_)) for (var W = 0; W < _.length; W++) { var $ = _[W]; Fe($) && Be($, j); } else if (Fe(_)) _._store && (_._store.validated = !0); else if (_) { var ie = h(_); if (typeof ie == "function" && ie !== _.entries) for (var se = ie.call(_), re; !(re = se.next()).done; ) Fe(re.value) && Be(re.value, j); } } } function Je(_) { { var j = _.type; if (j == null || typeof j == "string") return; var W; if (typeof j == "function") W = j.propTypes; else if (typeof j == "object" && (j.$$typeof === l || // Note: Memo only checks outer props here. // Inner props are checked in the reconciler. j.$$typeof === c)) W = j.propTypes; else return; if (W) { var $ = R(j); he(W, _.props, "prop", $, _); } else if (j.PropTypes !== void 0 && !Me) { Me = !0; var ie = R(j); b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", ie || "Unknown"); } typeof j.getDefaultProps == "function" && !j.getDefaultProps.isReactClassApproved && b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); } } function Xe(_) { { for (var j = Object.keys(_.props), W = 0; W < j.length; W++) { var $ = j[W]; if ($ !== "children" && $ !== "key") { Ee(_), b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", $), Ee(null); break; } } _.ref !== null && (Ee(_), b("Invalid attribute `ref` supplied to `React.Fragment`."), Ee(null)); } } var We = {}; function qe(_, j, W, $, ie, se) { { var re = P(_); if (!re) { var te = ""; (_ === void 0 || typeof _ == "object" && _ !== null && Object.keys(_).length === 0) && (te += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."); var pe = Ke(); pe ? te += pe : te += Ze(); var de; _ === null ? de = "null" : ve(_) ? de = "array" : _ !== void 0 && _.$$typeof === t ? (de = "<" + (R(_.type) || "Unknown") + " />", te = " Did you accidentally export a JSX literal instead of a component?") : de = typeof _, b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", de, te); } var ce = ae(_, j, W, ie, se); if (ce == null) return ce; if (re) { var _e = j.children; if (_e !== void 0) if ($) if (ve(_e)) { for (var xe = 0; xe < _e.length; xe++) ze(_e[xe], _); Object.freeze && Object.freeze(_e); } else b("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."); else ze(_e, _); } if (Le.call(j, "key")) { var Se = R(_), me = Object.keys(j).filter(function(rt) { return rt !== "key"; }), je = me.length > 0 ? "{key: someKey, " + me.join(": ..., ") + ": ...}" : "{key: someKey}"; if (!We[Se + je]) { var nt = me.length > 0 ? "{" + me.join(": ..., ") + ": ...}" : "{}"; b(`A props object containing a "key" prop is being spread into JSX: let props = %s; <%s {...props} /> React keys must be passed directly to JSX without using spread: let props = %s; <%s key={someKey} {...props} />`, je, Se, nt, Se), We[Se + je] = !0; } } return _ === r ? Xe(ce) : Je(ce), ce; } } function Qe(_, j, W) { return qe(_, j, W, !0); } function $e(_, j, W) { return qe(_, j, W, !1); } var et = $e, tt = Qe; reactJsxRuntime_development.Fragment = r, reactJsxRuntime_development.jsx = et, reactJsxRuntime_development.jsxs = tt; }()), reactJsxRuntime_development; } process.env.NODE_ENV === "production" ? jsxRuntime.exports = requireReactJsxRuntime_production_min() : jsxRuntime.exports = requireReactJsxRuntime_development(); var jsxRuntimeExports = jsxRuntime.exports; const Cobrowse = (e) => /* @__PURE__ */ jsxRuntimeExports.jsx( "iframe", { src: e.url, className: "glance-cobrowse-iframe", title: "Cobrowse", referrerPolicy: "no-referrer-when-downgrade", allowFullScreen: !0, allow: "camera *;microphone *" } ), baseurl = { dw1: "dw1.myglance.org", dw2: "dw2.myglance.org", dw3: "dw3.myglance.org", dw4: "dw4.myglance.org", qa: "qa.myglance.org", staging: "www.myglance.net", beta: "beta.glance.net", production: "www.glance.net" }, Logo$1 = (e) => { const t = e.color || "#019ada"; return /* @__PURE__ */ jsxRuntimeExports.jsxs( "svg", { className: "glance-logo", id: "uuid-3dcb1d1f-954e-41f3-87a8-da702614a98d", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 191 294", children: [ /* @__PURE__ */ jsxRuntimeExports.jsx( "rect", { className: "uuid-872a4a21-0cac-4dba-9ba0-c09d2a317485", fill: t, x: "105", y: "105", width: "84", height: "84" } ), /* @__PURE__ */ jsxRuntimeExports.jsx( "path", { className: "uuid-872a4a21-0cac-4dba-9ba0-c09d2a317485", fill: t, d: "m105,209h84c0,46.361-37.639,84-84,84h0v-84h0Z" } ), /* @__PURE__ */ jsxRuntimeExports.jsx( "path", { className: "uuid-872a4a21-0cac-4dba-9ba0-c09d2a317485", fill: t, d: "m105,1h0c46.361,0,84,37.639,84,84h-84V1h0Z" } ), /* @__PURE__ */ jsxRuntimeExports.jsx( "path", { className: "uuid-872a4a21-0cac-4dba-9ba0-c09d2a317485", fill: t, d: "m1,105h84v84h0C38.639,189,1,151.361,1,105h0Z" } ), /* @__PURE__ */ jsxRuntimeExports.jsx( "path", { className: "uuid-872a4a21-0cac-4dba-9ba0-c09d2a317485", fill: t, d: "m1,209h84v84h0c-46.361,0-84-37.639-84-84h0Z" } ), /* @__PURE__ */ jsxRuntimeExports.jsx( "path", { className: "uuid-872a4a21-0cac-4dba-9ba0-c09d2a317485", fill: t, d: "m85,1h0v84H1C1,38.639,38.639,1,85,1Z" } ) ] } ); }, sessionInvite = async (e, t) => { const n = `https://${e.baseUrl}/api/SessionInvitation/smsInvite?groupid=${e.groupId}`, r = { Authorization: `Bearer GKEY ${e.groupId}&${encodeURIComponent( e.puid )}&${e.loginKey}`, "Content-Type": "application/json" }, o = await fetch(n, { method: "POST", headers: r, body: JSON.stringify(t) }); if (o?.ok) return o.json(); { const i = new Error("ExternalServiceError"); if (o?.status) { const a = await o.json(); ["ExternalError", "InvalidParameter"].includes(a?.code) && (i.name = "ExternalServiceHandledError", i.message = a?.detail); } return new Promise((a, s) => { s(i); }); } }, GlanceAgent = function() { var goog = goog || {}; goog.global = this || self, goog.exportPath_ = function(e, t, n, r) { e = e.split("."), r = r || goog.global, e[0] in r || typeof r.execScript > "u" || r.execScript("var " + e[0]); for (var o; e.length && (o = e.shift()); ) if (e.length || t === void 0) r = r[o] && r[o] !== Object.prototype[o] ? r[o] : r[o] = {}; else if (!n && goog.isObject(t) && goog.isObject(r[o])) for (var i in t) t.hasOwnProperty(i) && (r[o][i] = t[i]); else r[o] = t; }, goog.define = function(e, t) { return t; }, goog.FEATURESET_YEAR = 2012, goog.DEBUG = !0, goog.LOCALE = "en", goog.TRUSTED_SITE = !0, goog.DISALLOW_TEST_ONLY_CODE = !goog.DEBUG, goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING = !1, goog.provide = function(e) { if (goog.isInModuleLoader_()) throw Error("goog.provide cannot be used within a module."); goog.constructNamespace_(e); }, goog.constructNamespace_ = function(e, t, n) { goog.exportPath_(e, t, n); }, goog.getScriptNonce = function(e) { return e && e != goog.global ? goog.getScriptNonce_(e.document) : (goog.cspNonce_ === null && (goog.cspNonce_ = goog.getScriptNonce_(goog.global.document)), goog.cspNonce_); }, goog.NONCE_PATTERN_ = /^[\w+/_-]+[=]{0,2}$/, goog.cspNonce_ = null, goog.getScriptNonce_ = function(e) { return (e = e.querySelector && e.querySelector("script[nonce]")) && (e = e.nonce || e.getAttribute("nonce")) && goog.NONCE_PATTERN_.test(e) ? e : ""; }, goog.VALID_MODULE_RE_ = /^[a-zA-Z_$][a-zA-Z0-9._$]*$/, goog.module = function(e) { if (typeof e != "string" || !e || e.search(goog.VALID_MODULE_RE_) == -1) throw Error("Invalid module identifier"); if (!goog.isInGoogModuleLoader_()) throw Error( "Module " + e + " has been loaded incorrectly. Note, modules cannot be loaded as normal scripts. They require some kind of pre-processing step. You're likely trying to load a module via a script tag or as a part of a concatenated bundle without rewriting the module. For more info see: https://github.com/google/closure-library/wiki/goog.module:-an-ES6-module-like-alternative-to-goog.provide." ); if (goog.moduleLoaderState_.moduleName) throw Error("goog.module may only be called once per module."); goog.moduleLoaderState_.moduleName = e; }, goog.module.get = function(e) { return goog.module.getInternal_(e); }, goog.module.getInternal_ = function(e) { return null; }, goog.ModuleType = { ES6: "es6", GOOG: "goog" }, goog.moduleLoaderState_ = null, goog.isInModuleLoader_ = function() { return goog.isInGoogModuleLoader_() || goog.isInEs6ModuleLoader_(); }, goog.isInGoogModuleLoader_ = function() { return !!goog.moduleLoaderState_ && goog.moduleLoaderState_.type == goog.ModuleType.GOOG; }, goog.isInEs6ModuleLoader_ = function() { if (goog.moduleLoaderState_ && goog.moduleLoaderState_.type == goog.ModuleType.ES6) return !0; var e = goog.global.$jscomp; return e ? typeof e.getCurrentModulePath != "function" ? !1 : !!e.getCurrentModulePath() : !1; }, goog.module.declareLegacyNamespace = function() { goog.moduleLoaderState_.declareLegacyNamespace = !0; }, goog.declareModuleId = function(e) { if (goog.moduleLoaderState_) goog.moduleLoaderState_.moduleName = e; else { var t = goog.global.$jscomp; if (!t || typeof t.getCurrentModulePath != "function") throw Error( 'Module with namespace "' + e + '" has been loaded incorrectly.' ); t = t.require( t.getCurrentModulePath() ), goog.loadedModules_[e] = { exports: t, type: goog.ModuleType.ES6, moduleId: e }; } }, goog.setTestOnly = function(e) { if (goog.DISALLOW_TEST_ONLY_CODE) throw e = e || "", Error( "Importing test-only code into non-debug environment" + (e ? ": " + e : ".") ); }, goog.forwardDeclare = function(e) { }, goog.getObjectByName = function(e, t) { e = e.split("."), t = t || goog.global; for (var n = 0; n < e.length; n++) if (t = t[e[n]], t == null) return null; return t; }, goog.addDependency = function(e, t, n, r) { }, goog.ENABLE_DEBUG_LOADER = !0, goog.logToConsole_ = function(e) { goog.global.console && goog.global.console.error(e); }, goog.require = function(e) { }, goog.requireType = function(e) { return {}; }, goog.basePath = "", goog.nullFunction = function() { }, goog.abstractMethod = function() { throw Error("unimplemented abstract method"); }, goog.addSingletonGetter = function(e) { e.instance_ = void 0, e.getInstance = function() { return e.instance_ ? e.instance_ : (goog.DEBUG && (goog.instantiatedSingletons_[goog.instantiatedSingletons_.length] = e), e.instance_ = new e()); }; }, goog.instantiatedSingletons_ = [], goog.LOAD_MODULE_USING_EVAL = !0, goog.SEAL_MODULE_EXPORTS = goog.DEBUG, goog.loadedModules_ = {}, goog.DEPENDENCIES_ENABLED = !1, goog.TRANSPILE = "detect", goog.ASSUME_ES_MODULES_TRANSPILED = !1, goog.TRANSPILE_TO_LANGUAGE = "", goog.TRANSPILER = "transpile.js", goog.hasBadLetScoping = null, goog.loadModule = function(e) { var t = goog.moduleLoaderState_; try { goog.moduleLoaderState_ = { moduleName: "", declareLegacyNamespace: !1, type: goog.ModuleType.GOOG }; var n = {}, r = n; if (typeof e == "function") r = e.call(void 0, r); else if (typeof e == "string") r = goog.loadModuleFromSource_.call( void 0, r, e ); else throw Error("Invalid module definition"); var o = goog.moduleLoaderState_.moduleName; if (typeof o == "string" && o) goog.moduleLoaderState_.declareLegacyNamespace ? goog.constructNamespace_( o, r, n !== r ) : goog.SEAL_MODULE_EXPORTS && Object.seal && typeof r == "object" && r != null && Object.seal(r), goog.loadedModules_[o] = { exports: r, type: goog.ModuleType.GOOG, moduleId: goog.moduleLoaderState_.moduleName }; else throw Error('Invalid module name "' + o + '"'); } finally { goog.moduleLoaderState_ = t; } }, goog.loadModuleFromSource_ = function($exports$$, $JSCompiler_OptimizeArgumentsArray_p0$$) { return eval( goog.CLOSURE_EVAL_PREFILTER_.createScript( $JSCompiler_OptimizeArgumentsArray_p0$$ ) ), $exports$$; }, goog.normalizePath_ = function(e) { e = e.split("/"); for (var t = 0; t < e.length; ) e[t] == "." ? e.splice(t, 1) : t && e[t] == ".." && e[t - 1] && e[t - 1] != ".." ? e.splice(--t, 2) : t++; return e.join("/"); }, goog.loadFileSync_ = function(e) { if (goog.global.CLOSURE_LOAD_FILE_SYNC) return goog.global.CLOSURE_LOAD_FILE_SYNC(e); try { var t = new goog.global.XMLHttpRequest(); return t.open("get", e, !1), t.send(), t.status == 0 || t.status == 200 ? t.responseText : null; } catch { return null; } }, goog.transpile_ = function(e, t, n) { var r = goog.global.$jscomp; r || (goog.global.$jscomp = r = {}); var o = r.transpile; if (!o) { var i = goog.basePath + goog.TRANSPILER, a = goog.loadFileSync_(i); if (a) { if (function() { (0, eval)(a + ` //# sourceURL=` + i); }.call(goog.global), goog.global.$gwtExport && goog.global.$gwtExport.$jscomp && !goog.global.$gwtExport.$jscomp.transpile) throw Error( 'The transpiler did not properly export the "transpile" method. $gwtExport: ' + JSON.stringify(goog.global.$gwtExport) ); goog.global.$jscomp.transpile = goog.global.$gwtExport.$jscomp.transpile, r = goog.global.$jscomp, o = r.transpile; } } return o || (o = r.transpile = function(s, l) { return goog.logToConsole_( l + " requires transpilation but no transpiler was found." ), s; }), o(e, t, n); }, goog.typeOf = function(e) { var t = typeof e; return t != "object" ? t : e ? Array.isArray(e) ? "array" : t : "null"; }, goog.isArrayLike = function(e) { var t = goog.typeOf(e); return t == "array" || t == "object" && typeof e.length == "number"; }, goog.isDateLike = function(e) { return goog.isObject(e) && typeof e.getFullYear == "function"; }, goog.isObject = function(e) { var t = typeof e; return t == "object" && e != null || t == "function"; }, goog.getUid = function(e) { return Object.prototype.hasOwnProperty.call(e, goog.UID_PROPERTY_) && e[goog.UID_PROPERTY_] || (e[goog.UID_PROPERTY_] = ++goog.uidCounter_); }, goog.hasUid = function(e) { return !!e[goog.UID_PROPERTY_]; }, goog.removeUid = function(e) { e !== null && "removeAttribute" in e && e.removeAttribute(goog.UID_PROPERTY_); try { delete e[goog.UID_PROPERTY_]; } catch { } }, goog.UID_PROPERTY_ = "closure_uid_" + (1e9 * Math.random() >>> 0), goog.uidCounter_ = 0, goog.cloneObject = function(e) { var t = goog.typeOf(e); if (t == "object" || t == "array") { if (typeof e.clone == "function") return e.clone(); t = t == "array" ? [] : {}; for (var n in e) t[n] = goog.cloneObject(e[n]); return t; } return e; }, goog.bindNative_ = function(e, t, n) { return e.call.apply(e.bind, arguments); }, goog.bindJs_ = function(e, t, n) { if (!e) throw Error(); if (2 < arguments.length) { var r = Array.prototype.slice.call(arguments, 2); return function() { var o = Array.prototype.slice.call(arguments); return Array.prototype.unshift.apply(o, r), e.apply(t, o); }; } return function() { return e.apply(t, arguments); }; }, goog.bind = function(e, t, n) { return Function.prototype.bind && Function.prototype.bind.toString().indexOf("native code") != -1 ? goog.bind = goog.bindNative_ : goog.bind = goog.bindJs_, goog.bind.apply(null, arguments); }, goog.partial = function(e, t) { var n = Array.prototype.slice.call(arguments, 1); return function() { var r = n.slice(); return r.push.apply(r, arguments), e.apply(this, r); }; }, goog.mixin = function(e, t) { for (var n in t) e[n] = t[n]; }, goog.now = function() { return Date.now(); }, goog.globalEval = function(e) { (0, eval)(e); }, goog.getCssName = function(e, t) { if (String(e).charAt(0) == ".") throw Error( 'className passed in goog.getCssName must not start with ".". You passed: ' + e ); var n = function(o) { return goog.cssNameMapping_[o] || o; }, r = function(o) { o = o.split("-"); for (var i = [], a = 0; a < o.length; a++) i.push(n(o[a])); return i.join("-"); }; return r = goog.cssNameMapping_ ? goog.cssNameMappingStyle_ == "BY_WHOLE" ? n : r : function(o) { return o; }, e = t ? e + "-" + r(t) : r(e), goog.global.CLOSURE_CSS_NAME_MAP_FN ? goog.global.CLOSURE_CSS_NAME_MAP_FN(e) : e; }, goog.setCssNameMapping = function(e, t) { goog.cssNameMapping_ = e, goog.cssNameMappingStyle_ = t; }, goog.getMsg = function(e, t, n) { return n && n.html && (e = e.replace(/</g, "&lt;")), n && n.unescapeHtmlEntities && (e = e.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&apos;/g, "'").replace(/&quot;/g, '"').replace(/&amp;/g, "&")), t && (e = e.replace(/\{\$([^}]+)}/g, function(r, o) { return t != null && o in t ? t[o] : r; })), e; }, goog.getMsgWithFallback = function(e, t) { return e; }, goog.exportSymbol = function(e, t, n) { goog.exportPath_(e, t, !0, n); }, goog.exportProperty = function(e, t, n) { e[t] = n; }, goog.inherits = function(e, t) { function n() { } n.prototype = t.prototype, e.superClass_ = t.prototype, e.prototype = new n(), e.prototype.constructor = e, e.base = function(r, o, i) { for (var a = Array(arguments.length - 2), s = 2; s < arguments.length; s++) a[s - 2] = arguments[s]; return t.prototype[o].apply(r, a); }; }, goog.scope = function(e) { if (goog.isInModuleLoader_()) throw Error("goog.scope is not supported within a module."); e.call(goog.global); }, goog.defineClass = function(e, t) { var n = t.constructor, r = t.statics; return n && n != Object.prototype.constructor || (n = function() { throw Error( "cannot instantiate an interface (no constructor defined)." ); }), n = goog.defineClass.createSealingConstructor_( n, e ), e && goog.inherits(n, e), delete t.constructor, delete t.statics, goog.defineClass.applyProperties_(n.prototype, t), r != null && (r instanceof Function ? r(n) : goog.defineClass.applyProperties_(n, r)), n; }, goog.defineClass.SEAL_CLASS_INSTANCES = goog.DEBUG, goog.defineClass.createSealingConstructor_ = function(e, t) { return goog.defineClass.SEAL_CLASS_INSTANCES ? function() { var n = e.apply(this, arguments) || this; return n[goog.UID_PROPERTY_] = n[goog.UID_PROPERTY_], n; } : e; }, goog.defineClass.OBJECT_PROTOTYPE_FIELDS_ = "constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split( " " ), goog.defineClass.applyProperties_ = function(e, t) { for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]); for (var r = 0; r < goog.defineClass.OBJECT_PROTOTYPE_FIELDS_.length; r++) n = goog.defineClass.OBJECT_PROTOTYPE_FIELDS_[r], Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]); }, goog.TRUSTED_TYPES_POLICY_NAME = "goog", goog.identity_ = function(e) { return e; }, goog.createTrustedTypesPolicy = function(e) { var t = null, n = goog.global.trustedTypes; if (!n || !n.createPolicy) return t; try { t = n.createPolicy(e, { createHTML: goog.identity_, createScript: goog.identity_, createScriptURL: goog.identity_ }); } catch (r) { goog.logToConsole_(r.message); } return t; }; var CONFIG = "debug", GLANCE_VERSION = "6.3.0.2", GCommon = { Defs: {} }; GCommon.Defs.Version = GLANCE_VERSION.split(".").slice(0, 3).join("."), GCommon.Defs.Config = CONFIG, GCommon.Type = {}, GCommon.Domain = {}, GCommon.Domain.set = function() { document.domain = window.location.host.split(".").splice(-2).join("."); }, GCommon.Domain.match = function(e, t) { return e.match(new RegExp("\\." + t + "$", "i")) !== null; }, GCommon.Domain.getGlanceDomain = function() { return document.domain.split(".").splice(-2).join("."); }, GCommon.Geometry = {}, GCommon.Geometry.Rect = function(e) { this.top = e.top, this.left = e.left, this.right = e.right, this.bottom = e.bottom; }, GCommon.Geometry.Rect.prototype.Union = function(e) { this.left = Math.min(this.left, e.left), this.top = Math.min(this.top, e.top), this.right = Math.max(this.right, e.right), this.bottom = Math.max(this.bottom, e.bottom); }, GCommon.Geometry.Rect.prototype.width = function() { return this.right - this.left; }, GCommon.Geometry.Rect.prototype.height = function() { return this.bottom - this.top; }, GCommon.Time = {}, GCommon.Time.UTCNow = function() { var e = /* @__PURE__ */ new Date(); return e.getUTCFullYear() + "/" + (e.getUTCMonth() + 1) + "/" + e.getUTCDate() + " " + GCommon.String.zeropad(e.getUTCHours(), 2) + ":" + GCommon.String.zeropad(e.getUTCMinutes(), 2) + ":" + GCommon.String.zeropad(e.getUTCSeconds(), 2); }, GCommon.Time.Timer = function() { this.set(); }, GCommon.Time.Timer.prototype.elapsed = function(e) { var t = (/* @__PURE__ */ new Date()).getTime(), n = t - this.t; return e && (this.t = t), n; }, GCommon.Time.Timer.prototype.set = function() { this.t = (/* @__PURE__ */ new Date()).getTime(); }, GCommon.String = {}, GCommon.String.zeropad = function(e, t) { for (e = e.toString(); e.length < t; ) e = "0" + e; return e; }, GCommon.String.queryStringParam = function(e, t) { return e = new RegExp("[\\?&]" + t + "=([^&#]*)").exec( e ), e === null ? "" : e[1]; }, GCommon.String.queryString = function(e) { var t = []; return Object.keys(e).forEach(function(n) { t.push(n + "=" + e[n]); }), t.join("&"); }, GCommon.Url = window.URL || window.webkitURL, Uint8Array.prototype.slice || (Uint8Array.prototype.slice = function(e, t) { return new Uint8Array(this.subarray(e, t)); }), ArrayBuffer.prototype.slice || (ArrayBuffer.prototype.slice = function(e, t) { if (e === void 0 && (e = 0), t === void 0 && (t = this.byteLength), e = Math.floor(e), t = Math.floor(t), 0 > e && (e += this.byteLength), 0 > t && (t += this.byteLength), e = Math.min(Math.max(0, e), this.byteLength), t = Math.min(Math.max(0, t), this.byteLength), 0 >= t - e) return new ArrayBuffer(0); var n = new ArrayBuffer(t - e), r = new Uint8Array(n); return e = new Uint8Array(this, e, t - e), r.set(e), n; }), GCommon.Browser = function() { var e = navigator.userAgent.toLowerCase(), t = navigator.platform.toLowerCase(), n = e.match(/(edge)[\s\/:]([\w\d\.]+)?/) || e.match( /(opera|ie|firefox|chrome|version)[\s\/:]([\w\d\.]+)?.*?(safari|version[\s\/:]([\w\d\.]+)|$)/ ) || e.match(/(rv):([\w\d\.]+)/) || [null, "unknown", 0]; return n[1] === "rv" && (n[1] = "ie"), { name: n[1] === "version" ? n[3] : n[1], version: n[1] === "ie" && document.documentMode || parseFloat(n[1] === "opera" && n[4] ? n[4] : n[2]), platform: e.match(/ip(?:ad|od|hone)/) ? "ios" : (e.match(/(?:webos|android)/) || t.match(/mac|win|linux/) || ["other"])[0] }; }(), GCommon.Elem = {}, GCommon.Elem.makeUnselectable = function(e) { e.on("selectstart dragstart", function(t) { return t.preventDefault(), !1; }); }; var INFOLOG = GCommon.Defs.Config === "Debug" && !0; GCommon.Log = {}, GCommon.Log.logstring = function(e) { for (var t = "", n = 0; n < e.length; n++) t += (typeof e[n] == "object" ? JSON.stringify(e[n]) : e[n]) + " "; return t.replace(/[\r\n]/g, " ").replace("<", "&lt;").replace(">", "&gt;"); }, GCommon.Log.log = function(e) { window.console && window.console.log && (!window.GLANCE_COBROWSE || !window.GLANCE_COBROWSE.disableLogging) && window.console.log(GCommon.Log.logstring(arguments)); }, GCommon.Log.error = function(e) { window.console && window.console.error && window.console.error(GCommon.Log.logstring(arguments)); }, GCommon.Defs.Config === "Debug" && (GCommon.Log.debuglog = function(e, t) { t = Array.prototype.slice.call(t), t.unshift(e), window.console && window.console.log && window.console.log(GCommon.Log.logstring(t)); }), GCommon.Log.msglog = function(e) { }, GCommon.Log.commlog = function(e) { }, GCommon.Log.paintlog = function(e) { }, GCommon.Log.eventslog = function(e) { }, GCommon.Log.infolog = INFOLOG ? function(e) { GCommon.Log.debuglog("INFO:", arguments); } : function(e) { }, GCommon.Log.framelog = function(e) { }, GCommon.Log.drawlog = function(e) { }, GCommon.Log.rclog = function(e) { }, GCommon.Log.statslog = function(e) { }, GCommon.Diags = {}, GCommon.Diags.blobToString = function(e) { return new Promise(function(t, n) { n = new FileReader(), n.onload = function() { var r = new Uint8Array(this.result); t(r.toString()); }, n.readAsArrayBuffer(e); }); }, GCommon.assert = GCommon.Defs.Config === "Debug" ? function(e) { if (!e) throw Error("assert failed"); } : function(e) { }, GCommon.Stats = {}, GCommon.Stats.tracker = function(e, t, n) { this.stats = {}, this.statcounts = {}, this.stattypes = {}, this.interval = e, this.logfunc = t, this.notifyfunc = n; var r = this; 0 < e && window.setInterval(function() { r.report(); }, 1e3 * e); }, GCommon.Stats.tracker.statType = { STAT_AVERAGE: 0, STAT_PERSEC: 1, STAT_TOTAL: 2 }, GCommon.Stats.tracker.prototype.track = function(e, t, n) { this.stattypes[e] = n, this.stats[e] = this.stats[e] || 0, this.stats[e] += t, this.statcounts[e] = (this.statcounts[e] || 0) + 1; }, GCommon.Stats.tracker.prototype.report = function() { if (this.notifyfunc && this.notifyfunc(), this.logfunc) for (var e in this.stats) switch (this.stattypes[e]) { case GCommon.Stats.tracker.statType.STAT_AVERAGE: this.logfunc( Math.round( this.stats[e] / this.statcounts[e] * 100 ) / 100, "average", e ); break; case GCommon.Stats.tracker.statType.STAT_PERSEC: this.logfunc( Math.round(this.stats[e] / this.interval * 100) / 100, e + "/sec" ); break; case GCommon.Stats.tracker.statType.STAT_TOTAL: this.logfunc(Math.round(100 * this.stats[e]) / 100, e); } this.stats = {}, this.statcounts = {}; }, GCommon.EventListeners = function() { this._listeners = {}; }, GCommon.EventListeners.prototype.add = function(e, t) { this._listeners[e] || (this._listeners[e] = this._listeners[e] || [], this._listeners[e].push(t)); }, GCommon.EventListeners.prototype.remove = function(e, t) { e = this._listeners[e], e !== void 0 && (t = e.indexOf( t ), 0 <= t && e.splice(t, 1)); }, GCommon.EventListeners.prototype.fire = function(e, t) { GCommon.Log.eventslog( "fire ", e, " ", t ? JSON.stringify(t) : "" ); var n = this._listeners[e], r = !0; if (n === void 0) return !0; for (e = 0; e < n.length; e++) n[e](t) || (r = !1); return r; }; var GlanceLogger = { sanitize: function(e) { return e.replace(/[\r\n]/g, " ").replace("<", "&lt;"); }, _log: function(e, ...t) { !window.console || !window.console[e] || window.GLANCE_COBROWSE && window.GLANCE_COBROWSE.disableLogging || (t = t.map((n) => { if (typeof n == "object") try { n = JSON.stringify(n); } catch (r) { console.error(r), n = "unable to convert object to string"; } return typeof n == "string" ? GlanceLogger.sanitize(n) : n; }), window.console[e](...t)); }, log: function(...e) { GlanceLogger._log("log", ...e); }, error: function(...e) { GlanceLogger._log("error", ...e); } }, diffslog = function() { }, diffdetlog = function() { }, preslog = function(...e) { GlanceLogger.log("PRES:", ...e); }, scrolllog = function() { }, eventslog = function() { }; function errorlog(...e) { GlanceLogger.error("GLANCE:", ...e); } var GLANCE = GLANCE || {}; GLANCE.Lib = GLANCE.Lib || {}, GLANCE.VERSION = "6.3.0.2", GLANCE.PATCH = "", window.GLANCE = window.GLANCE || {}, window.GLANCE.VERSION = GLANCE.VERSION, window.GLANCE.PATCH = GLANCE.PATCH, window.GLANCE.Lib = window.GLANCE.Lib || {}, GLANCE.Lib.KEYTYPE = { RANDOM: "GLANCE_KEYTYPE_RANDOM" }, GLANCE.Lib.KEYTYPE = { RANDOM: "GLANCE_KEYTYPE_RANDOM" }, GLANCE.Lib.MESSAGES = { GLANCE_INVOKE_MSG: "glance_invoke", GLANCE_SCREENSHARE: "glance_screenshare", GLANCE_SCREENSHAREPREVIEW: "glance_screensharepreview", GLANCE_VISITOR_SCREENSHAREPREVIEW: "glance_visitor_screensharepreview", GLANCE_AGENTVIDEO: "glance_agentvideo", GLANCE_VIDEOPREVIEW: "glance_videopreview" }, GLANCE.Lib.Const = { GID: "data-gid", GCID: "data-gcid", SDID: "data-sdid" }, GLANCE.Lib.scriptId = function(e) { return ("glance_" + e).toLowerCase(); }, GLANCE.Lib.CallFlags = { None: 0, Reconnect: 1, Reverse: 2, Declined: 4, Rcrequested: 8, Closing: 16, Beta: 32, MultipleGuestsOk: 64, Anonymous: 128, Showback: 256, GuestNameRequired: 512, GuestEmailRequired: 1024, GuestPhoneRequired: 2048, GuestNameHidden: 4096, GuestEmailHidden: 8192, GuestPhoneHidden: 16384, GuestInfo: 32256, Encrypt: 32768, ForceAjax: 65536, Persist: 131072, PresenceStart: 262144, StagingSession: 524288, HDAgentVideoEnabled: 2097152 }, GLANCE.Lib.IntVersion = function() { var e = GLANCE.VERSION.split("."); return 1e6 * parseInt(e[0]) + 1e3 * parseInt(e[1]) + parseInt(e[2]); }(), GLANCE.Lib.VideoJoinURL = function(e, t) { return t = t || "clip", `https://${URL.toString().includes("[native code]") ? new URL(e).hostname : GLANCE.Lib.GElement.nativeInstance("URL", e).hostname}/viv/VideoPlayer.html?offer=${e}&scaling=${t}&noendpage=1&guestid={guestid}&conntype={role}`;