diff --git a/hw4/README.md b/hw4/README.md new file mode 100644 index 0000000..40fc05e --- /dev/null +++ b/hw4/README.md @@ -0,0 +1,38 @@ +###### David Westgate 26 April 2024 +## HW4 for gensec +This application is a Langchain agent which intends to be helpful at de-obfuscating javascript code. On the web, obfuscated javascript code is common to minimize javascript source file size, before they are sent over the network to the client and also to limit the ability to reverse engineer the function of javascript running on the client from enterprise web applications. The application is programming to ingest javascript source files both from the local machine, as well as from URLs. + +### Setup + Run +Install python3, then +``` +cd hw4 +pip install -r requirnments.txt +python3 app.py +``` + +### Running +``` +python3 app.py +``` + +### Example Input +Test the ability to de-obfuscate a local javascript source +``` +test/test.js +``` +*Test file included is sourced from `https://www.gstatic.com/feedback/js/a3hbqvnh5213/api.js` licensed under Apache 2.0* + +Test the ability to de-obfuscate a javascript source from the web +``` +https://www.gstatic.com/feedback/js/a3hbqvnh5213/api.js +``` + +Test the ability to identify non-javascript source file locally, ineligable for de-obfuscation +``` +test/lorem.txt +``` + +Test the ability to identify non-javascript source file from the web, ineligable for de-obfuscation +``` +https://www.lipsum.com/index.html +``` \ No newline at end of file diff --git a/hw4/app.py b/hw4/app.py index 84c309d..e391479 100644 --- a/hw4/app.py +++ b/hw4/app.py @@ -1,24 +1,30 @@ -#derived from https://github.com/wu4f/cs410g-src/blob/main/05_CodeSummarize/01_python_parser.py +# derived from https://github.com/wu4f/cs410g-src/blob/main/05_CodeSummarize/01_python_parser.py from langchain_community.document_loaders.generic import GenericLoader from langchain_community.document_loaders.parsers import LanguageParser -from langchain_text_splitters import Language from langchain_openai import ChatOpenAI from langchain_core.runnables import RunnablePassthrough from langchain_core.prompts import PromptTemplate from langchain_core.output_parsers import StrOutputParser +from langchain_community.document_loaders import AsyncHtmlLoader from dotenv import load_dotenv -import readline +from validators import url +from time import time + load_dotenv() llm = ChatOpenAI(model_name="gpt-4-turbo", temperature=0) -def deobfuscate(path): - loader = GenericLoader.from_filesystem( + +def deobfuscate(path: str): + if url(path): + loader = AsyncHtmlLoader(path) + else: + loader = GenericLoader.from_filesystem( path, glob="*", suffixes=[".js"], parser=LanguageParser(), - ) + ) docs = loader.load() prompt1 = PromptTemplate.from_template( """You are an expert javascript de-obfuscater. Carefully analyze the following code and de-obduscate, by applying proper formatting, commenting, and re-naming as necessary. @@ -29,24 +35,25 @@ def deobfuscate(path): """ ) - chain = ( - {"text": RunnablePassthrough()} - | prompt1 - | llm - | StrOutputParser() - ) + chain = {"text": RunnablePassthrough()} | prompt1 | llm | StrOutputParser() output = "\n".join([d.page_content for d in docs]) result = chain.invoke(output) - return(result) + return result -print("Welcome to my javascript code de-obfuscator. Supply a local or web path to an obfuscated javascript file and I will attempt to de-obfuscate it.") + +print( + "Welcome to my javascript code de-obfuscator. Supply a local or web path to an obfuscated javascript file and I will attempt to de-obfuscate it." +) while True: try: - line = input("llm>> ") + line: str = input("llm>> ") if line: - result = deobfuscate(line) - print(result) + start_time = time() + result: str = deobfuscate(line) + end_time = time() + elapsed_time = round(end_time - start_time, 2) + print("\n",result,"\n\nElapsed time: ", elapsed_time, " seconds") else: break except Exception as e: diff --git a/hw4/requirnments.txt b/hw4/requirnments.txt index b94f762..dd8adce 100644 --- a/hw4/requirnments.txt +++ b/hw4/requirnments.txt @@ -1,6 +1,6 @@ -langchain langchain-community langchain_openai python-dotenv -unstructured -langchainhub +validators +esprima +time \ No newline at end of file diff --git a/hw4/test/lorem.txt b/hw4/test/lorem.txt new file mode 100644 index 0000000..08e00ed --- /dev/null +++ b/hw4/test/lorem.txt @@ -0,0 +1 @@ +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \ No newline at end of file diff --git a/hw4/test/test-fmt.js b/hw4/test/test-fmt.js index 271f87c..93eb5ec 100644 --- a/hw4/test/test-fmt.js +++ b/hw4/test/test-fmt.js @@ -1,235 +1,2291 @@ -! function() { - var e = { - 76141: function(e) { - e.exports = { - source_map: "hidden-source-map", - api_base: "https://api-iam.intercom.io", - public_path: "https://js.intercomcdn.com/", - sheets_proxy_path: "https://intercom-sheets.com/sheets_proxy", - sentry_proxy_path: "https://www.intercom-reporting.com/sentry/index.html", - install_mode_base: "https://app.intercom.com", - sentry_dsn: "https://f305de69cac64a84a494556d5303dc2d@app.getsentry.com/24287", - intersection_js: "https://js.intercomcdn.com/intersection/assets/app.js", - intersection_styles: "https://js.intercomcdn.com/intersection/assets/styles.js", - article_search_messenger_app_id: 27, - mode: "production" - } - } - }, - t = {}; +(function() { + 'use strict'; + var n; - function n(r) { - var o = t[r]; - if (void 0 !== o) return o.exports; - var i = t[r] = { - exports: {} + function aa(a) { + var b = 0; + return function() { + return b < a.length ? { + done: !1, + value: a[b++] + } : { + done: !0 + } + } + } + var r = "function" == typeof Object.defineProperties ? Object.defineProperty : function(a, b, c) { + if (a == Array.prototype || a == Object.prototype) return a; + a[b] = c.value; + return a + }; + + function ba(a) { + a = ["object" == typeof globalThis && globalThis, a, "object" == typeof window && window, "object" == typeof self && self, "object" == typeof global && global]; + for (var b = 0; b < a.length; ++b) { + var c = a[b]; + if (c && c.Math == Math) return c + } + throw Error("Cannot find global object"); + } + var t = ba(this); + + function u(a, b) { + if (b) a: { + var c = t;a = a.split("."); + for (var d = 0; d < a.length - 1; d++) { + var f = a[d]; + if (!(f in c)) break a; + c = c[f] + } + a = a[a.length - 1];d = c[a];b = b(d);b != d && null != b && r(c, a, { + configurable: !0, + writable: !0, + value: b + }) + } + } + u("Symbol", function(a) { + function b(h) { + if (this instanceof b) throw new TypeError("Symbol is not a constructor"); + return new c(d + (h || "") + "_" + f++, h) + } + + function c(h, e) { + this.g = h; + r(this, "description", { + configurable: !0, + writable: !0, + value: e + }) + } + if (a) return a; + c.prototype.toString = function() { + return this.g }; - return e[r](i, i.exports, n), i.exports - }! function() { - "use strict"; - var e = /iphone|ipad|ipod|android|blackberry|opera mini|iemobile/i, - t = [".intercom-lightweight-app-launcher", ".intercom-launcher-frame", "#intercom-container", ".intercom-messenger", ".intercom-notifications"]; + var d = "jscomp_symbol_" + (1E9 * Math.random() >>> 0) + "_", + f = 0; + return b + }); + u("Symbol.iterator", function(a) { + if (a) return a; + a = Symbol("Symbol.iterator"); + for (var b = "Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "), c = 0; c < b.length; c++) { + var d = t[b[c]]; + "function" === typeof d && "function" != typeof d.prototype[a] && r(d.prototype, a, { + configurable: !0, + writable: !0, + value: function() { + return ca(aa(this)) + } + }) + } + return a + }); - function r(e) { + function ca(a) { + a = { + next: a + }; + a[Symbol.iterator] = function() { + return this + }; + return a + } + + function da(a) { + return a.raw = a + } + + function w(a) { + var b = "undefined" != typeof Symbol && Symbol.iterator && a[Symbol.iterator]; + if (b) return b.call(a); + if ("number" == typeof a.length) return { + next: aa(a) + }; + throw Error(String(a) + " is not an iterable or ArrayLike"); + } + var ea = "function" == typeof Object.create ? Object.create : function(a) { + function b() {} + b.prototype = a; + return new b + }, + fa; + if ("function" == typeof Object.setPrototypeOf) fa = Object.setPrototypeOf; + else { + var ha; + a: { + var ia = { + a: !0 + }, + ja = {}; try { - if (!(e in window)) return !1; - var t = window[e]; - return null !== t && (t.setItem("intercom-test", "0"), t.removeItem("intercom-test"), !0) - } catch (e) { - return !1 + ja.__proto__ = ia; + ha = ja.a; + break a + } catch (a) {} + ha = !1 + } + fa = ha ? function(a, b) { + a.__proto__ = b; + if (a.__proto__ !== b) throw new TypeError(a + " is not extensible"); + return a + } : null + } + var ka = fa; + + function la(a, b) { + a.prototype = ea(b.prototype); + a.prototype.constructor = a; + if (ka) ka(a, b); + else + for (var c in b) + if ("prototype" != c) + if (Object.defineProperties) { + var d = Object.getOwnPropertyDescriptor(b, c); + d && Object.defineProperty(a, c, d) + } else a[c] = b[c]; + a.P = b.prototype + } + + function ma() { + this.l = !1; + this.h = null; + this.i = void 0; + this.g = 1; + this.u = 0; + this.j = null + } + + function na(a) { + if (a.l) throw new TypeError("Generator is already running"); + a.l = !0 + } + ma.prototype.s = function(a) { + this.i = a + }; + + function oa(a, b) { + a.j = { + W: b, + X: !0 + }; + a.g = a.u + } + ma.prototype.return = function(a) { + this.j = { + return: a + }; + this.g = this.u + }; + + function x(a, b, c) { + a.g = c; + return { + value: b + } + } + + function pa(a) { + this.g = new ma; + this.h = a + } + + function qa(a, b) { + na(a.g); + var c = a.g.h; + if (c) return ra(a, "return" in c ? c["return"] : function(d) { + return { + value: d, + done: !0 + } + }, b, a.g.return); + a.g.return(b); + return z(a) + } + + function ra(a, b, c, d) { + try { + var f = b.call(a.g.h, c); + if (!(f instanceof Object)) throw new TypeError("Iterator result " + f + " is not an object"); + if (!f.done) return a.g.l = !1, f; + var h = f.value + } catch (e) { + return a.g.h = null, oa(a.g, e), z(a) + } + a.g.h = null; + d.call(a.g, h); + return z(a) + } + + function z(a) { + for (; a.g.g;) try { + var b = a.h(a.g); + if (b) return a.g.l = !1, { + value: b.value, + done: !1 + } + } catch (c) { + a.g.i = void 0, oa(a.g, c) + } + a.g.l = !1; + if (a.g.j) { + b = a.g.j; + a.g.j = null; + if (b.X) throw b.W; + return { + value: b.return, + done: !0 } } + return { + value: void 0, + done: !0 + } + } - function o() { - var e = i().vendor || "", - t = i().userAgent || ""; - return 0 === e.indexOf("Apple") && /\sSafari\//.test(t) + function sa(a) { + this.next = function(b) { + na(a.g); + a.g.h ? b = ra(a, a.g.h.next, b, a.g.s) : (a.g.s(b), b = z(a)); + return b + }; + this.throw = function(b) { + na(a.g); + a.g.h ? b = ra(a, a.g.h["throw"], b, a.g.s) : (oa(a.g, b), b = z(a)); + return b + }; + this.return = function(b) { + return qa(a, b) + }; + this[Symbol.iterator] = function() { + return this + } + } + + function ta(a) { + function b(d) { + return a.next(d) } - function i() { - return navigator || {} + function c(d) { + return a.throw(d) } + return new Promise(function(d, f) { + function h(e) { + e.done ? d(e.value) : Promise.resolve(e.value).then(b, c).then(h, f) + } + h(a.next()) + }) + } - function a() { - var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : i().userAgent; - return /iPad|iPhone|iPod/.test(e) && !window.MSStream + function A(a) { + return ta(new sa(new pa(a))) + } + + function ua() { + for (var a = Number(this), b = [], c = a; c < arguments.length; c++) b[c - a] = arguments[c]; + return b + } + u("Promise", function(a) { + function b(e) { + this.g = 0; + this.i = void 0; + this.h = []; + this.u = !1; + var g = this.j(); + try { + e(g.resolve, g.reject) + } catch (k) { + g.reject(k) + } } function c() { - var e; - return (null === (e = function() { - if (a()) { - var e = i().appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/); - return { - major: parseInt(e[1], 10), - minor: parseInt(e[2], 10), - patch: parseInt(e[3] || 0, 10) + this.g = null + } + + function d(e) { + return e instanceof b ? e : new b(function(g) { + g(e) + }) + } + if (a) return a; + c.prototype.h = function(e) { + if (null == this.g) { + this.g = []; + var g = this; + this.i(function() { + g.l() + }) + } + this.g.push(e) + }; + var f = t.setTimeout; + c.prototype.i = function(e) { + f(e, 0) + }; + c.prototype.l = function() { + for (; this.g && this.g.length;) { + var e = this.g; + this.g = []; + for (var g = 0; g < e.length; ++g) { + var k = + e[g]; + e[g] = null; + try { + k() + } catch (l) { + this.j(l) } } - return null - }()) || void 0 === e ? void 0 : e.major) >= 15 - } - var s = { - hasXhr2Support: function() { - return "XMLHttpRequest" in window && "withCredentials" in new XMLHttpRequest - }, - hasLocalStorageSupport: function() { - return r("localStorage") - }, - hasSessionStorageSupport: function() { - return r("sessionStorage") - }, - hasFileSupport: function() { - return !!(window.FileReader && window.File && window.FileList && window.FormData) - }, - hasAudioSupport: function() { - var e = document.createElement("audio"); - return !!e.canPlayType && !!e.canPlayType("audio/mpeg;").replace(/^no$/, "") - }, - hasVisibilitySupport: function() { - return void 0 !== document.hidden || void 0 !== document.mozHidden || void 0 !== document.msHidden || void 0 !== document.webkitHidden - }, - messengerIsVisible: function() { - return t.some((function(e) { - var t = window.parent.document.querySelector(e); - if (t) { - var n = t.getBoundingClientRect(); - return n && n.width > 0 && n.height > 0 - } - })) - }, - messengerHasDisplayNoneSet: function() { - return t.some((function(e) { - var t = window.parent.document.querySelector(e); - if (t) { - var n = window.getComputedStyle(t); - return null === n || "none" === n.display - } - })) - }, - isMobileBrowser: function() { - var t = i().userAgent; - return !!t && (null !== t.match(e) && void 0 !== window.parent) - }, - isIOSFirefox: function() { - return !!i().userAgent.match("FxiOS") - }, - isFirefox: function() { - return !!i().userAgent.match("Firefox") - }, - isSafari: o, - isElectron: function() { - var e = i().userAgent || "", - t = window.parent || {}, - n = t.process && t.versions && t.versions.electron; - return /\sElectron\//.test(e) || n - }, - isIE: function() { - var e = i().userAgent || ""; - return e.indexOf("MSIE") > 0 || e.indexOf("Trident") > 0 - }, - isEdge: function() { - return (i().userAgent || "").indexOf("Edge") > 0 - }, - isNativeMobile: function() { - return i().isNativeMobile - }, - isChrome: function() { - var e = window.chrome, - t = i().vendor, - n = i().userAgent.indexOf("OPR") > -1, - r = i().userAgent.indexOf("Edge") > -1; - return !!i().userAgent.match("CriOS") || null != e && "Google Inc." === t && !1 === n && !1 === r - }, - isIOS: a, - isIOS15: c, - isIOS15Safari: function() { - var e = i().userAgent, - t = a(e), - n = !!e.match(/WebKit/i); - return t && n && !e.match(/CriOS/i) && c() - }, - isAndroid: function() { - var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : i().userAgent; - return e && e.toLowerCase().indexOf("android") > -1 - }, - isMacOS: function() { - return window.navigator.appVersion.indexOf("Mac") >= 0 + } + this.g = null + }; + c.prototype.j = function(e) { + this.i(function() { + throw e; + }) + }; + b.prototype.j = function() { + function e(l) { + return function(m) { + k || (k = !0, l.call(g, m)) } - }, - d = ["turbo:visit", "turbolinks:visit", "page:before-change"], - u = ["turbo:before-cache", "turbolinks:before-cache"], - m = ["turbo:load", "turbolinks:load", "page:change"]; - var p = function(e) { - var t = document.createElement("script"); - return t.type = "text/javascript", t.charset = "utf-8", t.src = e, t - }, - l = n(76141).public_path, - f = "".concat(l, "frame.934d26a2.js"), - h = "".concat(l, "vendor.10719702.js"), - w = "".concat(l, "frame-modern.3e73afb2.js"), - v = "".concat(l, "vendor-modern.07772018.js"), - g = "Intercom", - b = /bot|googlebot|crawler|spider|robot|crawling|facebookexternalhit/i, - y = function() { - return window[g] && window[g].booted - }, - S = function() { - var e, t = !!(e = navigator.userAgent.match(/Chrom(?:e|ium)\/([0-9\.]+)/)) && e[1]; - return !!t && t.split(".").map((function(e) { - return parseInt(e) - })) - }, - A = function() { - var e = document.querySelector('meta[name="referrer"]'), - t = e ? '') : "", - n = document.createElement("iframe"); - n.id = "intercom-frame", n.setAttribute("style", "position: absolute !important; opacity: 0 !important; width: 1px !important; height: 1px !important; top: 0 !important; left: 0 !important; border: none !important; display: block !important; z-index: -1 !important; pointer-events: none;"), o() && n.setAttribute("style", n.getAttribute("style") + "visibility: hidden;"), n.setAttribute("aria-hidden", "true"), n.setAttribute("tabIndex", "-1"), n.setAttribute("title", "Intercom"), document.body.appendChild(n), - function(e, t) { - var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : "en"; - if (s.isFirefox()) { - var r = e.contentDocument.open(); - r.write(""), r.close() - }! function(e, t) { - var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : "en"; - e.documentElement.innerHTML = t, e.documentElement.setAttribute("lang", n) - }(e.contentDocument, t, n) - }(n, '\n \n \n '.concat(t, "\n \n \n \n ")); - var r, i = !!(r = S()) && r[0] >= 81, - a = p(i ? w : f), - c = p(i ? v : h); - return n.contentDocument.head.appendChild(a), n.contentDocument.head.appendChild(c), window.__intercomAssignLocation = function(e) { - window.location.assign(e) - }, window.__intercomReloadLocation = function() { - window.location.reload() - }, n - }, - x = function() { - var e = document.getElementById("intercom-frame"); - e && e.parentNode && e.parentNode.removeChild(e), delete window.__intercomAssignLocation, delete window.__intercomReloadLocation - }, - _ = function() { - if (!window[g]) { - var e = function e() { - for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++) n[r] = arguments[r]; - e.q.push(n) - }; - e.q = [], window[g] = e + } + var g = this, + k = !1; + return { + resolve: e(this.D), + reject: e(this.l) + } + }; + b.prototype.D = function(e) { + if (e === this) this.l(new TypeError("A Promise cannot resolve to itself")); + else if (e instanceof b) this.G(e); + else { + a: switch (typeof e) { + case "object": + var g = null != e; + break a; + case "function": + g = !0; + break a; + default: + g = !1 } - }, - E = function() { - y() || (_(), A(), window[g].booted = !0) + g ? this.C(e) : this.s(e) + } + }; + b.prototype.C = function(e) { + var g = void 0; + try { + g = e.then + } catch (k) { + this.l(k); + return + } + "function" == typeof g ? this.H(g, e) : this.s(e) + }; + b.prototype.l = function(e) { + this.A(2, e) + }; + b.prototype.s = function(e) { + this.A(1, e) + }; + b.prototype.A = function(e, g) { + if (0 != this.g) throw Error("Cannot settle(" + e + ", " + g + "): Promise already settled in state" + this.g); + this.g = e; + this.i = g; + 2 === this.g && this.F(); + this.B() + }; + b.prototype.F = function() { + var e = this; + f(function() { + if (e.J()) { + var g = t.console; + "undefined" !== typeof g && g.error(e.i) + } + }, 1) + }; + b.prototype.J = + function() { + if (this.u) return !1; + var e = t.CustomEvent, + g = t.Event, + k = t.dispatchEvent; + if ("undefined" === typeof k) return !0; + "function" === typeof e ? e = new e("unhandledrejection", { + cancelable: !0 + }) : "function" === typeof g ? e = new g("unhandledrejection", { + cancelable: !0 + }) : (e = t.document.createEvent("CustomEvent"), e.initCustomEvent("unhandledrejection", !1, !0, e)); + e.promise = this; + e.reason = this.i; + return k(e) }; - "attachEvent" in window && !window.addEventListener || navigator && navigator.userAgent && /MSIE 9\.0/.test(navigator.userAgent) && window.addEventListener && !window.atob || "onpropertychange" in document && window.matchMedia && /MSIE 10\.0/.test(navigator.userAgent) || navigator && navigator.userAgent && b.test(navigator.userAgent) || window.isIntercomMessengerSheet || y() || (E(), function(e, t, n) { - m.forEach((function(t) { - document.addEventListener(t, e) - })), u.forEach((function(e) { - document.addEventListener(e, t) - })), d.forEach((function(e) { - document.addEventListener(e, n) + b.prototype.B = function() { + if (null != this.h) { + for (var e = 0; e < this.h.length; ++e) h.h(this.h[e]); + this.h = null + } + }; + var h = new c; + b.prototype.G = + function(e) { + var g = this.j(); + e.K(g.resolve, g.reject) + }; + b.prototype.H = function(e, g) { + var k = this.j(); + try { + e.call(g, k.resolve, k.reject) + } catch (l) { + k.reject(l) + } + }; + b.prototype.then = function(e, g) { + function k(q, v) { + return "function" == typeof q ? function(K) { + try { + l(q(K)) + } catch (y) { + m(y) + } + } : v + } + var l, m, p = new b(function(q, v) { + l = q; + m = v + }); + this.K(k(e, l), k(g, m)); + return p + }; + b.prototype.catch = function(e) { + return this.then(void 0, e) + }; + b.prototype.K = function(e, g) { + function k() { + switch (l.g) { + case 1: + e(l.i); + break; + case 2: + g(l.i); + break; + default: + throw Error("Unexpected state: " + + l.g); + } + } + var l = this; + null == this.h ? h.h(k) : this.h.push(k); + this.u = !0 + }; + b.resolve = d; + b.reject = function(e) { + return new b(function(g, k) { + k(e) + }) + }; + b.race = function(e) { + return new b(function(g, k) { + for (var l = w(e), m = l.next(); !m.done; m = l.next()) d(m.value).K(g, k) + }) + }; + b.all = function(e) { + var g = w(e), + k = g.next(); + return k.done ? d([]) : new b(function(l, m) { + function p(K) { + return function(y) { + q[K] = y; + v--; + 0 == v && l(q) + } + } + var q = [], + v = 0; + do q.push(void 0), v++, d(k.value).K(p(q.length - 1), m), k = g.next(); while (!k.done) + }) + }; + return b + }); + + function B(a, b) { + return Object.prototype.hasOwnProperty.call(a, b) + } + u("Array.prototype.find", function(a) { + return a ? a : function(b, c) { + a: { + var d = this;d instanceof String && (d = String(d)); + for (var f = d.length, h = 0; h < f; h++) { + var e = d[h]; + if (b.call(c, e, h, d)) { + b = e; + break a + } + } + b = void 0 + } + return b + } + }); + u("WeakMap", function(a) { + function b(k) { + this.g = (g += Math.random() + 1).toString(); + if (k) { + k = w(k); + for (var l; !(l = k.next()).done;) l = l.value, this.set(l[0], l[1]) + } + } + + function c() {} + + function d(k) { + var l = typeof k; + return "object" === l && null !== k || "function" === l + } + + function f(k) { + if (!B(k, e)) { + var l = new c; + r(k, e, { + value: l + }) + } + } + + function h(k) { + var l = Object[k]; + l && (Object[k] = function(m) { + if (m instanceof c) return m; + Object.isExtensible(m) && f(m); + return l(m) + }) + } + if (function() { + if (!a || !Object.seal) return !1; + try { + var k = Object.seal({}), + l = Object.seal({}), + m = new a([ + [k, 2], + [l, 3] + ]); + if (2 != m.get(k) || 3 != m.get(l)) return !1; + m.delete(k); + m.set(l, 4); + return !m.has(k) && 4 == m.get(l) + } catch (p) { + return !1 + } + }()) return a; + var e = "$jscomp_hidden_" + Math.random(); + h("freeze"); + h("preventExtensions"); + h("seal"); + var g = 0; + b.prototype.set = function(k, l) { + if (!d(k)) throw Error("Invalid WeakMap key"); + f(k); + if (!B(k, e)) throw Error("WeakMap key fail: " + k); + k[e][this.g] = l; + return this + }; + b.prototype.get = function(k) { + return d(k) && B(k, e) ? k[e][this.g] : void 0 + }; + b.prototype.has = function(k) { + return d(k) && B(k, + e) && B(k[e], this.g) + }; + b.prototype.delete = function(k) { + return d(k) && B(k, e) && B(k[e], this.g) ? delete k[e][this.g] : !1 + }; + return b + }); + u("Map", function(a) { + function b() { + var g = {}; + return g.v = g.next = g.head = g + } + + function c(g, k) { + var l = g[1]; + return ca(function() { + if (l) { + for (; l.head != g[1];) l = l.v; + for (; l.next != l.head;) return l = l.next, { + done: !1, + value: k(l) + }; + l = null + } + return { + done: !0, + value: void 0 + } + }) + } + + function d(g, k) { + var l = k && typeof k; + "object" == l || "function" == l ? h.has(k) ? l = h.get(k) : (l = "" + ++e, h.set(k, l)) : l = "p_" + k; + var m = g[0][l]; + if (m && B(g[0], l)) + for (g = 0; g < m.length; g++) { + var p = m[g]; + if (k !== k && p.key !== p.key || k === p.key) return { + id: l, + list: m, + index: g, + m: p + } + } + return { + id: l, + list: m, + index: -1, + m: void 0 + } + } + + function f(g) { + this[0] = {}; + this[1] = b(); + this.size = 0; + if (g) { + g = w(g); + for (var k; !(k = g.next()).done;) k = k.value, this.set(k[0], k[1]) + } + } + if (function() { + if (!a || "function" != typeof a || !a.prototype.entries || "function" != typeof Object.seal) return !1; + try { + var g = Object.seal({ + x: 4 + }), + k = new a(w([ + [g, "s"] + ])); + if ("s" != k.get(g) || 1 != k.size || k.get({ + x: 4 + }) || k.set({ + x: 4 + }, "t") != k || 2 != k.size) return !1; + var l = k.entries(), + m = l.next(); + if (m.done || m.value[0] != g || "s" != m.value[1]) return !1; + m = l.next(); + return m.done || 4 != m.value[0].x || + "t" != m.value[1] || !l.next().done ? !1 : !0 + } catch (p) { + return !1 + } + }()) return a; + var h = new WeakMap; + f.prototype.set = function(g, k) { + g = 0 === g ? 0 : g; + var l = d(this, g); + l.list || (l.list = this[0][l.id] = []); + l.m ? l.m.value = k : (l.m = { + next: this[1], + v: this[1].v, + head: this[1], + key: g, + value: k + }, l.list.push(l.m), this[1].v.next = l.m, this[1].v = l.m, this.size++); + return this + }; + f.prototype.delete = function(g) { + g = d(this, g); + return g.m && g.list ? (g.list.splice(g.index, 1), g.list.length || delete this[0][g.id], g.m.v.next = g.m.next, g.m.next.v = g.m.v, g.m.head = null, + this.size--, !0) : !1 + }; + f.prototype.clear = function() { + this[0] = {}; + this[1] = this[1].v = b(); + this.size = 0 + }; + f.prototype.has = function(g) { + return !!d(this, g).m + }; + f.prototype.get = function(g) { + return (g = d(this, g).m) && g.value + }; + f.prototype.entries = function() { + return c(this, function(g) { + return [g.key, g.value] + }) + }; + f.prototype.keys = function() { + return c(this, function(g) { + return g.key + }) + }; + f.prototype.values = function() { + return c(this, function(g) { + return g.value + }) + }; + f.prototype.forEach = function(g, k) { + for (var l = this.entries(), m; !(m = l.next()).done;) m = + m.value, g.call(k, m[1], m[0], this) + }; + f.prototype[Symbol.iterator] = f.prototype.entries; + var e = 0; + return f + }); + u("Object.values", function(a) { + return a ? a : function(b) { + var c = [], + d; + for (d in b) B(b, d) && c.push(b[d]); + return c + } + }); + u("Object.is", function(a) { + return a ? a : function(b, c) { + return b === c ? 0 !== b || 1 / b === 1 / c : b !== b && c !== c + } + }); + u("Array.prototype.includes", function(a) { + return a ? a : function(b, c) { + var d = this; + d instanceof String && (d = String(d)); + var f = d.length; + c = c || 0; + for (0 > c && (c = Math.max(c + f, 0)); c < f; c++) { + var h = d[c]; + if (h === b || Object.is(h, b)) return !0 + } + return !1 + } + }); + u("String.prototype.includes", function(a) { + return a ? a : function(b, c) { + if (null == this) throw new TypeError("The 'this' value for String.prototype.includes must not be null or undefined"); + if (b instanceof RegExp) throw new TypeError("First argument to String.prototype.includes must not be a regular expression"); + return -1 !== (this + "").indexOf(b, c || 0) + } + }); + + function va(a, b) { + a instanceof String && (a += ""); + var c = 0, + d = !1, + f = { + next: function() { + if (!d && c < a.length) { + var h = c++; + return { + value: b(h, a[h]), + done: !1 + } + } + d = !0; + return { + done: !0, + value: void 0 + } + } + }; + f[Symbol.iterator] = function() { + return f + }; + return f + } + u("Array.prototype.entries", function(a) { + return a ? a : function() { + return va(this, function(b, c) { + return [b, c] + }) + } + }); + u("Array.prototype.keys", function(a) { + return a ? a : function() { + return va(this, function(b) { + return b + }) + } + }); + u("Array.prototype.values", function(a) { + return a ? a : function() { + return va(this, function(b, c) { + return c + }) + } + }); + u("Array.from", function(a) { + return a ? a : function(b, c, d) { + c = null != c ? c : function(g) { + return g + }; + var f = [], + h = "undefined" != typeof Symbol && Symbol.iterator && b[Symbol.iterator]; + if ("function" == typeof h) { + b = h.call(b); + for (var e = 0; !(h = b.next()).done;) f.push(c.call(d, h.value, e++)) + } else + for (h = b.length, e = 0; e < h; e++) f.push(c.call(d, b[e], e)); + return f + } + }); + u("Object.entries", function(a) { + return a ? a : function(b) { + var c = [], + d; + for (d in b) B(b, d) && c.push([d, b[d]]); + return c + } + }); + u("String.prototype.replaceAll", function(a) { + return a ? a : function(b, c) { + if (b instanceof RegExp && !b.global) throw new TypeError("String.prototype.replaceAll called with a non-global RegExp argument."); + return b instanceof RegExp ? this.replace(b, c) : this.replace(new RegExp(String(b).replace(/([-()\[\]{}+?*.$\^|,:#> 14 & 1023; + return 0 === a ? 536870912 : a + }; + var ib = {}, + jb = {}; + + function kb(a) { + return !(!a || "object" !== typeof a || a.g !== jb) + } + + function lb(a) { + return null !== a && "object" === typeof a && !Array.isArray(a) && a.constructor === Object + } + + function mb(a, b, c) { + if (!Array.isArray(a) || a.length) return !1; + var d = L(a); + if (d & 1) return !0; + if (!(b && (Array.isArray(b) ? b.includes(c) : b.has(c)))) return !1; + N(a, d | 1); + return !0 + } + Object.freeze(new function() {}); + Object.freeze(new function() {}); + var nb; + + function ob(a) { + return a.displayName || a.name || "unknown type name" + }; + var pb; + + function qb(a, b) { + pb = b; + a = new a(b); + pb = void 0; + return a + } + + function rb(a, b, c) { + null == a && (a = pb); + pb = void 0; + if (null == a) { + var d = 96; + c ? (a = [c], d |= 512) : a = []; + b && (d = d & -16760833 | (b & 1023) << 14) + } else { + if (!Array.isArray(a)) throw Error("narr"); + d = L(a); + if (d & 2048) throw Error("farr"); + if (d & 64) return a; + d |= 64; + if (c && (d |= 512, c !== a[0])) throw Error("mid"); + a: { + c = a; + var f = c.length; + if (f) { + var h = f - 1; + if (lb(c[h])) { + d |= 256; + b = h - (+!!(d & 512) - 1); + if (1024 <= b) throw Error("pvtlmt"); + d = d & -16760833 | (b & 1023) << 14; + break a + } + } + if (b) { + b = Math.max(b, f - (+!!(d & 512) - 1)); + if (1024 < b) throw Error("spvt"); + d = d & -16760833 | (b & 1023) << + 14 + } + } + } + N(a, d); + return a + }; + + function sb(a) { + switch (typeof a) { + case "number": + return isFinite(a) ? a : String(a); + case "boolean": + return a ? 1 : 0; + case "object": + if (a) + if (Array.isArray(a)) { + if (mb(a, void 0, 0)) return + } else if (Ua && null != a && a instanceof Uint8Array) { + if (Va) { + for (var b = "", c = 0, d = a.length - 10240; c < d;) b += String.fromCharCode.apply(null, a.subarray(c, c += 10240)); + b += String.fromCharCode.apply(null, c ? a.subarray(c) : a); + a = btoa(b) + } else { + void 0 === b && (b = 0); + if (!I) { + I = {}; + c = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""); + d = ["+/=", + "+/", "-_=", "-_.", "-_" + ]; + for (var f = 0; 5 > f; f++) { + var h = c.concat(d[f].split("")); + Ta[f] = h; + for (var e = 0; e < h.length; e++) { + var g = h[e]; + void 0 === I[g] && (I[g] = e) + } + } + } + b = Ta[b]; + c = Array(Math.floor(a.length / 3)); + d = b[64] || ""; + for (f = h = 0; h < a.length - 2; h += 3) { + var k = a[h], + l = a[h + 1]; + g = a[h + 2]; + e = b[k >> 2]; + k = b[(k & 3) << 4 | l >> 4]; + l = b[(l & 15) << 2 | g >> 6]; + g = b[g & 63]; + c[f++] = "" + e + k + l + g + } + e = 0; + g = d; + switch (a.length - h) { + case 2: + e = a[h + 1], g = b[(e & 15) << 2] || d; + case 1: + a = a[h], c[f] = "" + b[a >> 2] + b[(a & 3) << 4 | e >> 4] + g + d + } + a = c.join("") + } + return a + } + } + return a + }; + + function tb(a, b, c) { + a = Array.prototype.slice.call(a); + var d = a.length, + f = b & 256 ? a[d - 1] : void 0; + d += f ? -1 : 0; + for (b = b & 512 ? 1 : 0; b < d; b++) a[b] = c(a[b]); + if (f) { + b = a[b] = {}; + for (var h in f) b[h] = c(f[h]) + } + return a + } + + function ub(a, b, c, d, f) { + if (null != a) { + if (Array.isArray(a)) a = mb(a, void 0, 0) ? void 0 : f && L(a) & 2 ? a : vb(a, b, c, void 0 !== d, f); + else if (lb(a)) { + var h = {}, + e; + for (e in a) h[e] = ub(a[e], b, c, d, f); + a = h + } else a = b(a, d); + return a + } + } + + function vb(a, b, c, d, f) { + var h = d || c ? L(a) : 0; + d = d ? !!(h & 32) : void 0; + a = Array.prototype.slice.call(a); + for (var e = 0; e < a.length; e++) a[e] = ub(a[e], b, c, d, f); + c && c(h, a); + return a + } + + function wb(a) { + return a.O === ib ? a.toJSON() : sb(a) + }; + + function xb(a, b, c) { + c = void 0 === c ? gb : c; + if (null != a) { + if (Ua && a instanceof Uint8Array) return b ? a : new Uint8Array(a); + if (Array.isArray(a)) { + var d = L(a); + if (d & 2) return a; + b && (b = 0 === d || !!(d & 32) && !(d & 64 || !(d & 16))); + return b ? N(a, (d | 34) & -12293) : vb(a, xb, d & 4 ? gb : c, !0, !0) + } + a.O === ib && (c = a.o, d = M(c), a = d & 2 ? a : qb(a.constructor, yb(c, d, !0))); + return a + } + } + + function yb(a, b, c) { + var d = c || b & 2 ? gb : fb, + f = !!(b & 32); + a = tb(a, b, function(h) { + return xb(h, f, d) + }); + eb(a, 32 | (c ? 2 : 0)); + return a + }; + + function zb(a, b, c, d) { + b = d + (+!!(b & 512) - 1); + if (!(0 > b || b >= a.length || b >= c)) return a[b] + } + + function Ab(a, b, c, d) { + if (-1 === c) return null; + var f = hb(b); + if (c >= f) { + if (b & 256) return a[a.length - 1][c] + } else { + var h = a.length; + if (d && b & 256 && (d = a[h - 1][c], null != d)) { + if (zb(a, b, f, c) && null != Xa) { + var e; + a = null != (e = nb) ? e : nb = {}; + e = a[Xa] || 0; + 4 <= e || (a[Xa] = e + 1, e = Error(), e.__closure__error__context__984382 || (e.__closure__error__context__984382 = {}), e.__closure__error__context__984382.severity = "incident", Ga(e)) + } + return d + } + return zb(a, b, f, c) + } + } + + function Bb(a, b, c, d, f) { + var h = hb(b); + if (c >= h || f) { + var e = b; + if (b & 256) f = a[a.length - 1]; + else { + if (null == d) return; + f = a[h + (+!!(b & 512) - 1)] = {}; + e |= 256 + } + f[c] = d; + c < h && (a[c + (+!!(b & 512) - 1)] = void 0); + e !== b && N(a, e) + } else a[c + (+!!(b & 512) - 1)] = d, b & 256 && (a = a[a.length - 1], c in a && delete a[c]) + } + + function O(a, b) { + var c = void 0 === c ? !1 : c; + a = a.o; + b = Ab(a, M(a), b); + b = null == b || "boolean" === typeof b ? b : "number" === typeof b ? !!b : void 0; + return null != b ? b : c + } + + function P(a, b, c) { + if (null != c && "boolean" !== typeof c) throw Error("Expected boolean but got " + za(c) + ": " + c); + var d = a.o, + f = M(d); + if (f & 2) throw Error(); + Bb(d, f, b, !1 === c ? void 0 : c); + return a + }; + + function Q(a, b, c) { + this.o = rb(a, b, c) + } + Q.prototype.toJSON = function() { + return Cb(this, vb(this.o, wb, void 0, void 0, !1), !0) + }; + Q.prototype.O = ib; + Q.prototype.toString = function() { + return Cb(this, this.o, !1).toString() + }; + + function Cb(a, b, c) { + var d = Ia ? void 0 : a.constructor.qa; + var f = M(c ? a.o : b); + a = b.length; + if (!a) return b; + var h; + if (lb(c = b[a - 1])) { + a: { + var e = c; + var g = {}, + k = !1, + l; + for (l in e) { + var m = e[l]; + if (Array.isArray(m)) { + var p = m; + if (mb(m, d, +l) || kb(m) && 0 === m.size) m = null; + m != p && (k = !0) + } + null != m ? g[l] = m : k = !0 + } + if (k) { + for (var q in g) { + e = g; + break a + } + e = null + } + } + e != c && (h = !0);a-- + } + for (l = +!!(f & 512) - 1; 0 < a; a--) { + q = a - 1; + c = b[q]; + q -= l; + if (!(null == c || mb(c, d, q) || kb(c) && 0 === c.size)) break; + var v = !0 + } + if (!h && !v) return b; + b = Array.prototype.slice.call(b, 0, a); + e && b.push(e); + return b + }; + try { + (new self.OffscreenCanvas(0, 0)).getContext("2d") + } catch (a) {}; + var Db = "constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "); + + function Eb(a, b) { + for (var c, d, f = 1; f < arguments.length; f++) { + d = arguments[f]; + for (c in d) a[c] = d[c]; + for (var h = 0; h < Db.length; h++) c = Db[h], Object.prototype.hasOwnProperty.call(d, c) && (a[c] = d[c]) + } + }; + var Fb; + + function Gb(a) { + this.g = a + } + Gb.prototype.toString = function() { + return this.g + "" + }; + var Hb = {}; + + function Ib(a) { + if (void 0 === Fb) { + var b = null; + var c = C.trustedTypes; + if (c && c.createPolicy) { + try { + b = c.createPolicy("uf-api#html", { + createHTML: Ea, + createScript: Ea, + createScriptURL: Ea + }) + } catch (d) { + C.console && C.console.error(d.message) + } + Fb = b + } else Fb = b + } + a = (b = Fb) ? b.createScriptURL(a) : a; + return new Gb(a, Hb) + }; + /* + + SPDX-License-Identifier: Apache-2.0 + */ + function R(a) { + this.g = a + } + R.prototype.toString = function() { + return this.g + }; + var Jb = new R("about:invalid#zClosurez"); + + function Kb(a) { + this.Y = a + } + + function S(a) { + return new Kb(function(b) { + return b.substr(0, a.length + 1).toLowerCase() === a + ":" + }) + } + var Lb = [S("data"), S("http"), S("https"), S("mailto"), S("ftp"), new Kb(function(a) { + return /^[^:]*([/?#]|$)/.test(a) + })]; + + function Mb(a) { + var b = void 0 === b ? Lb : b; + a: if (b = void 0 === b ? Lb : b, !(a instanceof R)) { + for (var c = 0; c < b.length; ++c) { + var d = b[c]; + if (d instanceof Kb && d.Y(a)) { + a = new R(a); + break a + } + } + a = void 0 + } + return a || Jb + } + var Nb = /^\s*(?!javascript:)(?:[\w+.-]+:|[^:/?#]*(?:[/?#]|$))/i; + + function Ob(a) { + var b = ua.apply(1, arguments); + if (0 === b.length) return Ib(a[0]); + for (var c = a[0], d = 0; d < b.length; d++) c += encodeURIComponent(b[d]) + a[d + 1]; + return Ib(c) + }; + + function Pb(a, b) { + if (b instanceof R) + if (b instanceof R) b = b.g; + else throw Error(""); + else b = Nb.test(b) ? b : void 0; + void 0 !== b && a.open(b, void 0, void 0) + } + + function Qb(a) { + var b, c; + return (a = null == (c = (b = a.document).querySelector) ? void 0 : c.call(b, "script[nonce]")) ? a.nonce || a.getAttribute("nonce") || "" : "" + }; + + function Rb(a, b) { + a.src = b instanceof Gb && b.constructor === Gb ? b.g : "type_error:TrustedResourceUrl"; + (b = Qb(a.ownerDocument && a.ownerDocument.defaultView || window)) && a.setAttribute("nonce", b) + }; + + function Sb(a, b, c) { + function d(g) { + g && b.appendChild("string" === typeof g ? a.createTextNode(g) : g) + } + for (var f = 1; f < c.length; f++) { + var h = c[f]; + if (!Aa(h) || D(h) && 0 < h.nodeType) d(h); + else { + a: { + if (h && "number" == typeof h.length) { + if (D(h)) { + var e = "function" == typeof h.item || "string" == typeof h.item; + break a + } + if ("function" === typeof h) { + e = "function" == typeof h.item; + break a + } + } + e = !1 + } + Oa(e ? Qa(h) : h, d) + } + } + } + + function Tb(a) { + var b = "SCRIPT"; + "application/xhtml+xml" === a.contentType && (b = b.toLowerCase()); + return a.createElement(b) + } + + function Ub(a) { + this.g = a || C.document || document + } + Ub.prototype.append = function(a, b) { + Sb(9 == a.nodeType ? a : a.ownerDocument || a.document, a, arguments) + }; + + function T() { + this.l = this.l; + this.u = this.u + } + T.prototype.l = !1; + T.prototype.isDisposed = function() { + return this.l + }; + T.prototype.I = function() { + if (this.u) + for (; this.u.length;) this.u.shift()() + }; + + function Vb(a, b) { + this.type = a; + this.g = this.target = b; + this.defaultPrevented = !1 + }; + var Wb = "closure_listenable_" + (1E6 * Math.random() | 0); + var Xb = 0; + + function Yb(a, b, c, d, f) { + this.listener = a; + this.proxy = null; + this.src = b; + this.type = c; + this.capture = !!d; + this.N = f; + this.key = ++Xb; + this.L = this.M = !1 + } + + function Zb(a) { + a.L = !0; + a.listener = null; + a.proxy = null; + a.src = null; + a.N = null + }; + + function $b(a) { + this.src = a; + this.g = {}; + this.h = 0 + } + $b.prototype.add = function(a, b, c, d, f) { + var h = a.toString(); + a = this.g[h]; + a || (a = this.g[h] = [], this.h++); + var e = ac(a, b, d, f); - 1 < e ? (b = a[e], c || (b.M = !1)) : (b = new Yb(b, this.src, h, !!d, f), b.M = c, a.push(b)); + return b + }; + + function bc(a, b) { + var c = b.type; + c in a.g && Pa(a.g[c], b) && (Zb(b), 0 == a.g[c].length && (delete a.g[c], a.h--)) + } + + function ac(a, b, c, d) { + for (var f = 0; f < a.length; ++f) { + var h = a[f]; + if (!h.L && h.listener == b && h.capture == !!c && h.N == d) return f + } + return -1 + }; + var cc = "closure_lm_" + (1E6 * Math.random() | 0), + dc = {}, + ec = 0; + + function fc(a, b, c, d, f) { + if (Array.isArray(b)) + for (var h = 0; h < b.length; h++) fc(a, b[h], c, d, f); + else(d = D(d) ? !!d.capture : !!d, c = gc(c), a && a[Wb]) ? (a = a.i, b = String(b).toString(), b in a.g && (h = a.g[b], c = ac(h, c, d, f), -1 < c && (Zb(h[c]), Array.prototype.splice.call(h, c, 1), 0 == h.length && (delete a.g[b], a.h--)))) : a && (a = hc(a)) && (b = a.g[b.toString()], a = -1, b && (a = ac(b, c, d, f)), (c = -1 < a ? b[a] : null) && "number" !== typeof c && c && !c.L && ((f = c.src) && f[Wb] ? bc(f.i, c) : (d = c.type, b = c.proxy, f.removeEventListener ? f.removeEventListener(d, b, c.capture) : + f.detachEvent ? f.detachEvent(d in dc ? dc[d] : dc[d] = "on" + d, b) : f.addListener && f.removeListener && f.removeListener(b), ec--, (d = hc(f)) ? (bc(d, c), 0 == d.h && (d.src = null, f[cc] = null)) : Zb(c)))) + } + + function hc(a) { + a = a[cc]; + return a instanceof $b ? a : null + } + var ic = "__closure_events_fn_" + (1E9 * Math.random() >>> 0); + + function gc(a) { + if ("function" === typeof a) return a; + a[ic] || (a[ic] = function(b) { + return a.handleEvent(b) + }); + return a[ic] + }; + + function U() { + T.call(this); + this.i = new $b(this); + this.U = this; + this.F = null + } + Da(U, T); + U.prototype[Wb] = !0; + U.prototype.removeEventListener = function(a, b, c, d) { + fc(this, a, b, c, d) + }; + + function V(a, b) { + var c = a.F; + if (c) { + var d = []; + for (var f = 1; c; c = c.F) d.push(c), ++f + } + a = a.U; + c = b.type || b; + "string" === typeof b ? b = new Vb(b, a) : b instanceof Vb ? b.target = b.target || a : (f = b, b = new Vb(c, a), Eb(b, f)); + f = !0; + if (d) + for (var h = d.length - 1; 0 <= h; h--) { + var e = b.g = d[h]; + f = jc(e, c, !0, b) && f + } + e = b.g = a; + f = jc(e, c, !0, b) && f; + f = jc(e, c, !1, b) && f; + if (d) + for (h = 0; h < d.length; h++) e = b.g = d[h], f = jc(e, c, !1, b) && f + } + U.prototype.I = function() { + U.P.I.call(this); + if (this.i) { + var a = this.i, + b = 0, + c; + for (c in a.g) { + for (var d = a.g[c], f = 0; f < d.length; f++) ++b, Zb(d[f]); + delete a.g[c]; + a.h-- + } + } + this.F = null + }; + + function jc(a, b, c, d) { + b = a.i.g[String(b)]; + if (!b) return !0; + b = b.concat(); + for (var f = !0, h = 0; h < b.length; ++h) { + var e = b[h]; + if (e && !e.L && e.capture == c) { + var g = e.listener, + k = e.N || e.src; + e.M && bc(a.i, e); + f = !1 !== g.call(k, d) && f + } + } + return f && !d.defaultPrevented + }; + + function kc(a) { + try { + return C.JSON.parse(a) + } catch (b) {} + a = String(a); + if (/^\s*$/.test(a) ? 0 : /^[\],:{}\s\u2028\u2029]*$/.test(a.replace(/\\["\\\/bfnrtu]/g, "@").replace(/(?:"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)[\s\u2028\u2029]*(?=:|,|]|}|$)/g, "]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g, ""))) try { + return eval("(" + a + ")") + } catch (b) {} + throw Error("Invalid JSON string: " + a); + }; + + function lc() {} + lc.prototype.g = null; + + function mc(a) { + var b; + (b = a.g) || (b = a.g = {}); + return b + }; + var nc; + + function oc() {} + Da(oc, lc); + nc = new oc; + + function pc(a, b, c) { + if ("function" === typeof a) c && (a = E(a, c)); + else if (a && "function" == typeof a.handleEvent) a = E(a.handleEvent, a); + else throw Error("Invalid listener argument"); + return 2147483647 < Number(b) ? -1 : C.setTimeout(a, b || 0) + }; + var qc = RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$"); + + function rc(a) { + U.call(this); + this.headers = new Map; + this.S = a || null; + this.h = !1; + this.B = this.g = null; + this.D = ""; + this.j = this.C = this.s = this.J = !1; + this.G = 0; + this.A = null; + this.R = ""; + this.H = !1 + } + Da(rc, U); + var sc = /^https?$/i, + tc = ["POST", "PUT"], + uc = []; + + function vc(a, b) { + var c = new rc; + uc.push(c); + b && c.i.add("complete", b, !1, void 0, void 0); + c.i.add("ready", c.V, !0, void 0, void 0); + c.G = 2E3; + c.H = !0; + wc(c, a) + } + n = rc.prototype; + n.V = function() { + this.l || (this.l = !0, this.I()); + Pa(uc, this) + }; + + function wc(a, b) { + var c = {}; + if (a.g) throw Error("[goog.net.XhrIo] Object is active with another request=" + a.D + "; newUri=" + b); + a.D = b; + a.J = !1; + a.h = !0; + a.g = new XMLHttpRequest; + a.B = a.S ? mc(a.S) : mc(nc); + a.g.onreadystatechange = E(a.T, a); + try { + a.C = !0, a.g.open("GET", String(b), !0), a.C = !1 + } catch (h) { + xc(a); + return + } + b = new Map(a.headers); + if (c) + if (Object.getPrototypeOf(c) === Object.prototype) + for (var d in c) b.set(d, c[d]); + else if ("function" === typeof c.keys && "function" === typeof c.get) { + d = w(c.keys()); + for (var f = d.next(); !f.done; f = d.next()) f = + f.value, b.set(f, c.get(f)) + } else throw Error("Unknown input type for opt_headers: " + String(c)); + c = Array.from(b.keys()).find(function(h) { + return "content-type" == h.toLowerCase() + }); + d = C.FormData && !1; + !(0 <= Na(tc, "GET")) || c || d || b.set("Content-Type", "application/x-www-form-urlencoded;charset=utf-8"); + b = w(b); + for (c = b.next(); !c.done; c = b.next()) d = w(c.value), c = d.next().value, d = d.next().value, a.g.setRequestHeader(c, d); + a.R && (a.g.responseType = a.R); + "withCredentials" in a.g && a.g.withCredentials !== a.H && (a.g.withCredentials = + a.H); + try { + yc(a), 0 < a.G && (a.A = pc(a.aa, a.G, a)), a.s = !0, a.g.send(""), a.s = !1 + } catch (h) { + xc(a) + } + } + n.aa = function() { + "undefined" != typeof wa && this.g && (V(this, "timeout"), this.abort(8)) + }; + + function xc(a) { + a.h = !1; + a.g && (a.j = !0, a.g.abort(), a.j = !1); + zc(a); + Ac(a) + } + + function zc(a) { + a.J || (a.J = !0, V(a, "complete"), V(a, "error")) + } + n.abort = function() { + this.g && this.h && (this.h = !1, this.j = !0, this.g.abort(), this.j = !1, V(this, "complete"), V(this, "abort"), Ac(this)) + }; + n.I = function() { + this.g && (this.h && (this.h = !1, this.j = !0, this.g.abort(), this.j = !1), Ac(this, !0)); + rc.P.I.call(this) + }; + n.T = function() { + this.isDisposed() || (this.C || this.s || this.j ? Bc(this) : this.Z()) + }; + n.Z = function() { + Bc(this) + }; + + function Bc(a) { + if (a.h && "undefined" != typeof wa && (!a.B[1] || 4 != (a.g ? a.g.readyState : 0) || 2 != Cc(a))) + if (a.s && 4 == (a.g ? a.g.readyState : 0)) pc(a.T, 0, a); + else if (V(a, "readystatechange"), 4 == (a.g ? a.g.readyState : 0)) { + a.h = !1; + try { + var b = Cc(a); + a: switch (b) { + case 200: + case 201: + case 202: + case 204: + case 206: + case 304: + case 1223: + var c = !0; + break a; + default: + c = !1 + } + var d; + if (!(d = c)) { + var f; + if (f = 0 === b) { + var h = String(a.D).match(qc)[1] || null; + !h && C.self && C.self.location && (h = C.self.location.protocol.slice(0, -1)); + f = !sc.test(h ? h.toLowerCase() : "") + } + d = + f + } + d ? (V(a, "complete"), V(a, "success")) : zc(a) + } finally { + Ac(a) + } + } + } + + function Ac(a, b) { + if (a.g) { + yc(a); + var c = a.g, + d = a.B[0] ? function() {} : null; + a.g = null; + a.B = null; + b || V(a, "ready"); + try { + c.onreadystatechange = d + } catch (f) {} + } + } + + function yc(a) { + a.A && (C.clearTimeout(a.A), a.A = null) + } + n.isActive = function() { + return !!this.g + }; + + function Cc(a) { + try { + return 2 < (a.g ? a.g.readyState : 0) ? a.g.status : -1 + } catch (b) { + return -1 + } + }; + + function W(a) { + this.o = rb(a) + } + la(W, Q); + n = W.prototype; + n.getEnableSsEngine = function() { + return O(this, 2) + }; + n.getEnableAwr = function() { + return O(this, 3) + }; + n.getAlohaAutoGaRollout = function() { + return O(this, 5) + }; + n.getEnableConfigurator = function() { + return O(this, 6) + }; + n.getEnableMweb = function() { + return O(this, 7) + }; + n.getEnableCtlConsentCheckbox = function() { + return O(this, 8) + }; + n.getEnableIframe = function() { + return O(this, 9) + }; + n.getEnableScreenshotNudge = function() { + return O(this, 10) + }; + n.getEnableWebStartupConfigEndpoint = function() { + return O(this, 11) + }; + n.getEnableJunkNudge = function() { + return O(this, 12) + }; + n.getEnableConfiguratorLocale = function() { + return O(this, 13) + }; + n.getEnableTinyNoPointer = function() { + return O(this, 14) + }; + n.getEnableSupportSessionLogging = function() { + return O(this, 15) + }; + n.getEnableFileUploadForScreenshot = function() { + return O(this, 16) + }; + n.getEnableDirectDeflectionForSingleCategory = function() { + return O(this, 17) + }; + n.getEnableImageSanitization = function() { + return O(this, 18) + }; + n.getEnableAlohaBinarySplit = function() { + return O(this, 19) + }; + n.getEnableDbFeedbackIntents = function() { + return O(this, 20) + }; + n.getEnableMarkMandatoryFieldsWithRequired = function() { + return O(this, 21) + }; + n.getEnableFeedbackCategoryCustomUi = function() { + return O(this, 22) + }; + n.getEnableRealtimeCtl = function() { + return O(this, 23) + }; + + function Dc(a) { + this.o = rb(a) + } + la(Dc, Q); + + function Ec(a) { + return Fc.some(function(b) { + return b.test(a) + }) + } + var Fc = [/https:\/\/sandbox\.google\.com\/tools\/feedback/, /https:\/\/feedback-frontend-qual[a-z0-9.]*\.google\.com\/inapp/, /https:\/\/feedback-frontend-qual[a-z0-9.]*\.google\.com\/tools\/feedback/, /https:\/\/.*\.googleusercontent\.com\/inapp/]; + var Gc = "af am ar-EG ar-JO ar-MA ar-SA ar-XB ar az be bg bn bs ca cs cy da de-AT de-CH de el en en-GB en-AU en-CA en-IE en-IN en-NZ en-SG en-XA en-XC en-ZA es es-419 es-AR es-BO es-CL es-CO es-CR es-DO es-EC es-GT es-HN es-MX es-NI es-PA es-PE es-PR es-PY es-SV es-US es-UY es-VE et eu fa fi fil fr-CA fr-CH fr gl gsw gu he hi hr hu hy id in is it iw ja ka kk km kn ko ky ln lo lt lv mk ml mn mo mr ms my nb ne nl no pa pl pt pt-BR pt-PT ro ru si sk sl sq sr-Latn sr sv sw ta te th tl tr uk ur uz vi zh zh-CN zh-HK zh-TW zu".split(" "); + + function Hc(a) { + var b; + return null == (b = a.formContent) ? void 0 : b.locale + }; + var Ic = da(["https://www.gstatic.com/uservoice/feedback/client/web/", "/main_light_binary.js"]), + Jc = da(["https://www.gstatic.com/uservoice/feedback/client/web/", "/main_binary__", ".js"]); + + function Kc(a, b) { + var c = Hc(a); + c = (c && Gc.includes(c) ? Hc(a) : "en").replaceAll("-", "_").toLowerCase(); + var d; + a = (null == (d = a.initializationData) ? 0 : d.useNightlyRelease) ? "nightly" : "live"; + var f; + return (null == b ? 0 : null == (f = b.getEnableAlohaBinarySplit) ? 0 : f.call(b)) ? Ob(Ic, a) : Ob(Jc, a, c) + }; + var Lc, Mc; + + function Nc(a, b, c, d) { + if (Lc) return Lc; + var f = Kc(a, d); + return Lc = b.feedbackV2GlobalObject ? Promise.resolve(b.feedbackV2GlobalObject) : new Promise(function(h, e) { + var g = Tb(document); + Rb(g, f); + g.onload = function() { + b.feedbackV2GlobalObject ? h(b.feedbackV2GlobalObject) : e("feedbackV2GlobalObject not found on window.") + }; + g.onerror = function() { + e("Feedback binary script tag failed to load: " + f.toString()) + }; + c.body.appendChild(g) + }) + } + + function Oc(a, b, c, d) { + if (Mc) return Mc; + var f = Kc(a, d); + return Mc = b.feedbackV2GlobalObject ? Promise.resolve(b.feedbackV2GlobalObject) : new Promise(function(h, e) { + var g = Tb(document); + Rb(g, f); + g.onload = function() { + b.feedbackV2GlobalObject ? h(b.feedbackV2GlobalObject) : e("feedbackV2GlobalObject not found on window.") + }; + g.onerror = function() { + e("Feedback binary script tag failed to load: " + f.toString()) + }; + c.body.appendChild(g) + }) + } + + function Pc(a, b, c, d, f) { + f = void 0 === f ? !0 : f; + var h, e, g, k, l; + return A(function(m) { + switch (m.g) { + case 1: + return h = Date.now(), x(m, Nc(a, c, d, b), 2); + case 2: + e = m.i; + if (!(f || (null == (k = a.initializationData) ? 0 : k.useNightlyRelease) || (null == (l = a.initializationData) ? 0 : l.isLocalServer))) { + g = e.initializeFeedbackClient(a, h, b); + m.g = 3; + break + } + return x(m, e.initializeFeedbackClientAsync(a, h, b), 4); + case 4: + g = m.i; + case 3: + return g.initiateAloha(), m.return(g) + } + }) + } + + function Qc(a, b, c, d) { + var f, h, e; + return A(function(g) { + if (1 == g.g) return f = Date.now(), x(g, Oc(a, c, d.document, b), 2); + if (3 != g.g) return h = g.i, x(g, h.initializeFeedbackClientAsync(a, f, b, d), 3); + e = g.i; + e.initiateAloha(); + return g.return(e) + }) + } + + function Rc(a, b, c) { + var d = !0; + d = void 0 === d ? !0 : d; + var f, h, e, g, k, l, m, p, q, v; + return A(function(K) { + f = c || C; + if (null == (h = b) ? 0 : null == (g = (e = h).getEnableAlohaBinarySplit) ? 0 : g.call(e)) { + k = f; + if (k.isFormOpened) throw l = Error("Form is either loading or already opened"), l.name = "DuplicateFormError", l; + k.isFormOpened = !0; + a.callbacks = a.callbacks || {}; + m = a.callbacks.onClose || function() {}; + a.callbacks.onClose = function(y) { + k.isFormOpened = !1; + m(y) + }; + try { + return K.return(Qc(a, b, k, f)) + } catch (y) { + throw k.isFormOpened = !1, y; + } + } else { + p = f; + if (p.isFormOpened) throw q = + Error("Form is either loading or already opened"), q.name = "DuplicateFormError", q; + p.isFormOpened = !0; + a.callbacks = a.callbacks || {}; + v = a.callbacks.onClose || function() {}; + a.callbacks.onClose = function(y) { + p.isFormOpened = !1; + v(y) + }; + try { + return K.return(Pc(a, b, p, f.document, d)) + } catch (y) { + throw p.isFormOpened = !1, y; + } + } + }) + }; + + function Sc(a, b) { + return A(function(c) { + return c.return(new Promise(function(d) { + var f = Tc(null != b ? b : "") + "/aloha_form_properties?productId=" + a; + vc(f, function(h) { + var e = h.target; + h = null; + try { + var g = JSON, + k = g.stringify; + if (e.g) { + var l = e.g.responseText; + 0 == l.indexOf(")]}'\n") && (l = l.substring(5)); + b: { + if (C.JSON) try { + var m = C.JSON.parse(l); + break b + } catch (v) {} + m = kc(l) + } + } else m = void 0; + var p = k.call(g, m); + if (null == p || "" == p) h = new Dc; + else { + var q = JSON.parse(p); + if (!Array.isArray(q)) throw Error("dnarr"); + eb(q, 32); + h = qb(Dc, q) + } + } catch (v) { + k = + new Dc; + m = new W; + m = P(m, 5, !0); + m = P(m, 2, !0); + m = P(m, 4, !1); + m = P(m, 8, !0); + m = P(m, 9, !0); + m = P(m, 7, !0); + m = P(m, 10, !0); + m = P(m, 12, !0); + m = P(m, 13, !1); + m = P(m, 14, !0); + m = P(m, 15, !0); + m = P(m, 20, !1); + if (null != m) { + if (!(m instanceof W)) throw Error("Expected instanceof " + ob(W) + " but got " + (m && ob(m.constructor))); + } else m = void 0; + p = k.o; + q = M(p); + if (q & 2) throw Error(); + Bb(p, q, 1, m); + h = k + } + d(h) + }) })) - }(E, x, (function() { - window[g]("shutdown", !1), delete window[g], x(), _() - }))) - }() -}(); \ No newline at end of file + }) + } + + function Tc(a) { + return Ec(a) ? a : "https://www.google.com/tools/feedback" + }; + + function Uc(a, b, c) { + a.timeOfStartCall = (new Date).getTime(); + var d = c || C, + f = d.document, + h = a.nonce || Qb(d); + h && !a.nonce && (a.nonce = h); + if ("help" == a.flow) { + var e = ya("document.location.href", d); + !a.helpCenterContext && e && (a.helpCenterContext = e.substring(0, 1200)); + e = !0; + if (b && JSON && JSON.stringify) { + var g = JSON.stringify(b); + (e = 1200 >= g.length) && (a.psdJson = g) + } + e || (b = { + invalidPsd: !0 + }) + } + b = [a, b, c]; + d.GOOGLE_FEEDBACK_START_ARGUMENTS = b; + c = a.feedbackServerUri || "//www.google.com/tools/feedback"; + if (e = d.GOOGLE_FEEDBACK_START) e.apply(d, + b); + else { + d = c + "/load.js?"; + for (var k in a) b = a[k], null == b || D(b) || (d += encodeURIComponent(k) + "=" + encodeURIComponent(b) + "&"); + a = f ? new Ub(9 == f.nodeType ? f : f.ownerDocument || f.document) : Fa || (Fa = new Ub); + a = Tb(a.g); + h && a.setAttribute("nonce", h); + h = Ib(d); + Rb(a, h); + f.body.appendChild(a) + } + } + + function Vc(a, b, c, d) { + var f, h; + A(function(e) { + f = c || C; + var g = "DEV" === a.serverEnvironment, + k = c || C; + k = a.nonce || Qb(k); + g = { + integrationKeys: { + productId: a.productId, + feedbackBucket: a.bucket, + triggerId: a.triggerId + }, + callbacks: { + onClose: a.callback, + onLoad: a.onLoadCallback + }, + formContent: { + locale: a.locale, + disableScreenshot: a.disableScreenshotting, + productDisplayName: void 0, + announcement: void 0, + issueCategories: void 0, + includeSeveritySelection: void 0, + customImageSrc: void 0, + thankYouMessage: void 0, + ra: void 0, + defaultFormInputValues: void 0, + defaultFormInputValuesString: void 0, + abuseLink: a.abuseLink, + additionalDataConsent: a.additionalDataConsent + }, + initializationData: { + isLocalServer: g, + nonce: k, + useNightlyRelease: g, + feedbackJsUrl: void 0, + feedbackCssUrl: void 0, + feedbackJsUrlSerialized: void 0, + feedbackCssUrlSerialized: void 0, + submissionServerUri: a.feedbackServerUri, + colorScheme: a.colorScheme + }, + extraData: { + productVersion: a.productVersion, + authUser: a.authuser, + configuratorId: a.configuratorId, + customZIndex: a.customZIndex, + tinyNoPointer: a.tinyNoPointer, + allowNonLoggedInFeedback: a.allowNonLoggedInFeedback, + enableAnonymousFeedback: a.enableAnonymousFeedback + } + }; + b && (k = new Map(Object.entries(b)), g.extraData.productSpecificData = k); + h = g; + return x(e, Rc(h, d, f), 0) + }) + } + + function Wc(a, b, c) { + try { + if ("help" === a.flow) { + var d = a.helpCenterPath.replace(/^\//, ""); + Pb(c || window, Mb("https://support.google.com/" + d)) + } else "submit" === a.flow ? Uc(a, b, c) : Sc(a.productId, a.feedbackServerUri).then(function(f) { + var h = void 0 === h ? !1 : h; + var e = f.o; + var g = M(e), + k = Ab(e, g, 1, h); + if (null != k && "object" === typeof k && k.O === ib) var l = k; + else if (Array.isArray(k)) { + var m = l = L(k); + 0 === m && (m |= g & 32); + m |= g & 2; + m !== l && N(k, m); + l = new W(k) + } else l = void 0; + l !== k && null != l && Bb(e, g, 1, l, h); + e = l; + null != e && (f = f.o, g = M(f), g & 2 || (k = e, l = k.o, + m = M(l), k = m & 2 ? qb(k.constructor, yb(l, m, !1)) : k, k !== e && (e = k, Bb(f, g, 1, e, h)))); + h = e; + f = !Sa || (null == h ? void 0 : h.getEnableMweb()); + e = !a.tinyNoPointer || (null == h ? void 0 : h.getEnableTinyNoPointer()); + !h || h.getAlohaAutoGaRollout() && f && e ? Vc(a, b, c, h) : Uc(a, b, c) + }, function(f) { + f && "DuplicateFormError" !== f.name && Uc(a, b, c) + }) + } catch (f) { + Vc(a, b, c, null) + } + } + var X = ["userfeedback", "api", "startFeedback"], + Y = C; + X[0] in Y || "undefined" == typeof Y.execScript || Y.execScript("var " + X[0]); + for (var Z; X.length && (Z = X.shift());) X.length || void 0 === Wc ? Y[Z] && Y[Z] !== Object.prototype[Z] ? Y = Y[Z] : Y = Y[Z] = {} : Y[Z] = Wc; +}).call(this); \ No newline at end of file diff --git a/hw4/test/test.js b/hw4/test/test.js index 9a0ed4c..d53b21e 100644 --- a/hw4/test/test.js +++ b/hw4/test/test.js @@ -1 +1,80 @@ -!function(){var e={76141:function(e){e.exports={source_map:"hidden-source-map",api_base:"https://api-iam.intercom.io",public_path:"https://js.intercomcdn.com/",sheets_proxy_path:"https://intercom-sheets.com/sheets_proxy",sentry_proxy_path:"https://www.intercom-reporting.com/sentry/index.html",install_mode_base:"https://app.intercom.com",sentry_dsn:"https://f305de69cac64a84a494556d5303dc2d@app.getsentry.com/24287",intersection_js:"https://js.intercomcdn.com/intersection/assets/app.js",intersection_styles:"https://js.intercomcdn.com/intersection/assets/styles.js",article_search_messenger_app_id:27,mode:"production"}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}!function(){"use strict";var e=/iphone|ipad|ipod|android|blackberry|opera mini|iemobile/i,t=[".intercom-lightweight-app-launcher",".intercom-launcher-frame","#intercom-container",".intercom-messenger",".intercom-notifications"];function r(e){try{if(!(e in window))return!1;var t=window[e];return null!==t&&(t.setItem("intercom-test","0"),t.removeItem("intercom-test"),!0)}catch(e){return!1}}function o(){var e=i().vendor||"",t=i().userAgent||"";return 0===e.indexOf("Apple")&&/\sSafari\//.test(t)}function i(){return navigator||{}}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i().userAgent;return/iPad|iPhone|iPod/.test(e)&&!window.MSStream}function c(){var e;return(null===(e=function(){if(a()){var e=i().appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);return{major:parseInt(e[1],10),minor:parseInt(e[2],10),patch:parseInt(e[3]||0,10)}}return null}())||void 0===e?void 0:e.major)>=15}var s={hasXhr2Support:function(){return"XMLHttpRequest"in window&&"withCredentials"in new XMLHttpRequest},hasLocalStorageSupport:function(){return r("localStorage")},hasSessionStorageSupport:function(){return r("sessionStorage")},hasFileSupport:function(){return!!(window.FileReader&&window.File&&window.FileList&&window.FormData)},hasAudioSupport:function(){var e=document.createElement("audio");return!!e.canPlayType&&!!e.canPlayType("audio/mpeg;").replace(/^no$/,"")},hasVisibilitySupport:function(){return void 0!==document.hidden||void 0!==document.mozHidden||void 0!==document.msHidden||void 0!==document.webkitHidden},messengerIsVisible:function(){return t.some((function(e){var t=window.parent.document.querySelector(e);if(t){var n=t.getBoundingClientRect();return n&&n.width>0&&n.height>0}}))},messengerHasDisplayNoneSet:function(){return t.some((function(e){var t=window.parent.document.querySelector(e);if(t){var n=window.getComputedStyle(t);return null===n||"none"===n.display}}))},isMobileBrowser:function(){var t=i().userAgent;return!!t&&(null!==t.match(e)&&void 0!==window.parent)},isIOSFirefox:function(){return!!i().userAgent.match("FxiOS")},isFirefox:function(){return!!i().userAgent.match("Firefox")},isSafari:o,isElectron:function(){var e=i().userAgent||"",t=window.parent||{},n=t.process&&t.versions&&t.versions.electron;return/\sElectron\//.test(e)||n},isIE:function(){var e=i().userAgent||"";return e.indexOf("MSIE")>0||e.indexOf("Trident")>0},isEdge:function(){return(i().userAgent||"").indexOf("Edge")>0},isNativeMobile:function(){return i().isNativeMobile},isChrome:function(){var e=window.chrome,t=i().vendor,n=i().userAgent.indexOf("OPR")>-1,r=i().userAgent.indexOf("Edge")>-1;return!!i().userAgent.match("CriOS")||null!=e&&"Google Inc."===t&&!1===n&&!1===r},isIOS:a,isIOS15:c,isIOS15Safari:function(){var e=i().userAgent,t=a(e),n=!!e.match(/WebKit/i);return t&&n&&!e.match(/CriOS/i)&&c()},isAndroid:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i().userAgent;return e&&e.toLowerCase().indexOf("android")>-1},isMacOS:function(){return window.navigator.appVersion.indexOf("Mac")>=0}},d=["turbo:visit","turbolinks:visit","page:before-change"],u=["turbo:before-cache","turbolinks:before-cache"],m=["turbo:load","turbolinks:load","page:change"];var p=function(e){var t=document.createElement("script");return t.type="text/javascript",t.charset="utf-8",t.src=e,t},l=n(76141).public_path,f="".concat(l,"frame.934d26a2.js"),h="".concat(l,"vendor.10719702.js"),w="".concat(l,"frame-modern.3e73afb2.js"),v="".concat(l,"vendor-modern.07772018.js"),g="Intercom",b=/bot|googlebot|crawler|spider|robot|crawling|facebookexternalhit/i,y=function(){return window[g]&&window[g].booted},S=function(){var e,t=!!(e=navigator.userAgent.match(/Chrom(?:e|ium)\/([0-9\.]+)/))&&e[1];return!!t&&t.split(".").map((function(e){return parseInt(e)}))},A=function(){var e=document.querySelector('meta[name="referrer"]'),t=e?''):"",n=document.createElement("iframe");n.id="intercom-frame",n.setAttribute("style","position: absolute !important; opacity: 0 !important; width: 1px !important; height: 1px !important; top: 0 !important; left: 0 !important; border: none !important; display: block !important; z-index: -1 !important; pointer-events: none;"),o()&&n.setAttribute("style",n.getAttribute("style")+"visibility: hidden;"),n.setAttribute("aria-hidden","true"),n.setAttribute("tabIndex","-1"),n.setAttribute("title","Intercom"),document.body.appendChild(n),function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en";if(s.isFirefox()){var r=e.contentDocument.open();r.write(""),r.close()}!function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en";e.documentElement.innerHTML=t,e.documentElement.setAttribute("lang",n)}(e.contentDocument,t,n)}(n,'\n \n \n '.concat(t,"\n \n \n \n "));var r,i=!!(r=S())&&r[0]>=81,a=p(i?w:f),c=p(i?v:h);return n.contentDocument.head.appendChild(a),n.contentDocument.head.appendChild(c),window.__intercomAssignLocation=function(e){window.location.assign(e)},window.__intercomReloadLocation=function(){window.location.reload()},n},x=function(){var e=document.getElementById("intercom-frame");e&&e.parentNode&&e.parentNode.removeChild(e),delete window.__intercomAssignLocation,delete window.__intercomReloadLocation},_=function(){if(!window[g]){var e=function e(){for(var t=arguments.length,n=new Array(t),r=0;r>>0)+"_",f=0;return b}); +u("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;cc&&(c=Math.max(c+f,0));c>14&1023;return 0===a?536870912:a};var ib={},jb={};function kb(a){return!(!a||"object"!==typeof a||a.g!==jb)}function lb(a){return null!==a&&"object"===typeof a&&!Array.isArray(a)&&a.constructor===Object}function mb(a,b,c){if(!Array.isArray(a)||a.length)return!1;var d=L(a);if(d&1)return!0;if(!(b&&(Array.isArray(b)?b.includes(c):b.has(c))))return!1;N(a,d|1);return!0}Object.freeze(new function(){});Object.freeze(new function(){});var nb;function ob(a){return a.displayName||a.name||"unknown type name"};var pb;function qb(a,b){pb=b;a=new a(b);pb=void 0;return a} +function rb(a,b,c){null==a&&(a=pb);pb=void 0;if(null==a){var d=96;c?(a=[c],d|=512):a=[];b&&(d=d&-16760833|(b&1023)<<14)}else{if(!Array.isArray(a))throw Error("narr");d=L(a);if(d&2048)throw Error("farr");if(d&64)return a;d|=64;if(c&&(d|=512,c!==a[0]))throw Error("mid");a:{c=a;var f=c.length;if(f){var h=f-1;if(lb(c[h])){d|=256;b=h-(+!!(d&512)-1);if(1024<=b)throw Error("pvtlmt");d=d&-16760833|(b&1023)<<14;break a}}if(b){b=Math.max(b,f-(+!!(d&512)-1));if(1024f;f++){var h=c.concat(d[f].split(""));Ta[f]=h;for(var e=0;e>2];k=b[(k&3)<<4|l>>4];l=b[(l&15)<<2|g>>6];g=b[g&63];c[f++]=""+e+k+l+g}e=0;g=d;switch(a.length-h){case 2:e=a[h+1],g=b[(e&15)<<2]||d;case 1:a=a[h],c[f]=""+b[a>>2]+b[(a&3)<<4|e>>4]+g+d}a=c.join("")}return a}}return a};function tb(a,b,c){a=Array.prototype.slice.call(a);var d=a.length,f=b&256?a[d-1]:void 0;d+=f?-1:0;for(b=b&512?1:0;bb||b>=a.length||b>=c))return a[b]}function Ab(a,b,c,d){if(-1===c)return null;var f=hb(b);if(c>=f){if(b&256)return a[a.length-1][c]}else{var h=a.length;if(d&&b&256&&(d=a[h-1][c],null!=d)){if(zb(a,b,f,c)&&null!=Xa){var e;a=null!=(e=nb)?e:nb={};e=a[Xa]||0;4<=e||(a[Xa]=e+1,e=Error(),e.__closure__error__context__984382||(e.__closure__error__context__984382={}),e.__closure__error__context__984382.severity="incident",Ga(e))}return d}return zb(a,b,f,c)}} +function Bb(a,b,c,d,f){var h=hb(b);if(c>=h||f){var e=b;if(b&256)f=a[a.length-1];else{if(null==d)return;f=a[h+(+!!(b&512)-1)]={};e|=256}f[c]=d;c>>0);function gc(a){if("function"===typeof a)return a;a[ic]||(a[ic]=function(b){return a.handleEvent(b)});return a[ic]};function U(){T.call(this);this.i=new $b(this);this.U=this;this.F=null}Da(U,T);U.prototype[Wb]=!0;U.prototype.removeEventListener=function(a,b,c,d){fc(this,a,b,c,d)}; +function V(a,b){var c=a.F;if(c){var d=[];for(var f=1;c;c=c.F)d.push(c),++f}a=a.U;c=b.type||b;"string"===typeof b?b=new Vb(b,a):b instanceof Vb?b.target=b.target||a:(f=b,b=new Vb(c,a),Eb(b,f));f=!0;if(d)for(var h=d.length-1;0<=h;h--){var e=b.g=d[h];f=jc(e,c,!0,b)&&f}e=b.g=a;f=jc(e,c,!0,b)&&f;f=jc(e,c,!1,b)&&f;if(d)for(h=0;h=g.length)&&(a.psdJson=g)}e||(b={invalidPsd:!0})}b=[a,b,c];d.GOOGLE_FEEDBACK_START_ARGUMENTS=b;c=a.feedbackServerUri||"//www.google.com/tools/feedback";if(e=d.GOOGLE_FEEDBACK_START)e.apply(d, +b);else{d=c+"/load.js?";for(var k in a)b=a[k],null==b||D(b)||(d+=encodeURIComponent(k)+"="+encodeURIComponent(b)+"&");a=f?new Ub(9==f.nodeType?f:f.ownerDocument||f.document):Fa||(Fa=new Ub);a=Tb(a.g);h&&a.setAttribute("nonce",h);h=Ib(d);Rb(a,h);f.body.appendChild(a)}} +function Vc(a,b,c,d){var f,h;A(function(e){f=c||C;var g="DEV"===a.serverEnvironment,k=c||C;k=a.nonce||Qb(k);g={integrationKeys:{productId:a.productId,feedbackBucket:a.bucket,triggerId:a.triggerId},callbacks:{onClose:a.callback,onLoad:a.onLoadCallback},formContent:{locale:a.locale,disableScreenshot:a.disableScreenshotting,productDisplayName:void 0,announcement:void 0,issueCategories:void 0,includeSeveritySelection:void 0,customImageSrc:void 0,thankYouMessage:void 0,ra:void 0,defaultFormInputValues:void 0, +defaultFormInputValuesString:void 0,abuseLink:a.abuseLink,additionalDataConsent:a.additionalDataConsent},initializationData:{isLocalServer:g,nonce:k,useNightlyRelease:g,feedbackJsUrl:void 0,feedbackCssUrl:void 0,feedbackJsUrlSerialized:void 0,feedbackCssUrlSerialized:void 0,submissionServerUri:a.feedbackServerUri,colorScheme:a.colorScheme},extraData:{productVersion:a.productVersion,authUser:a.authuser,configuratorId:a.configuratorId,customZIndex:a.customZIndex,tinyNoPointer:a.tinyNoPointer,allowNonLoggedInFeedback:a.allowNonLoggedInFeedback, +enableAnonymousFeedback:a.enableAnonymousFeedback}};b&&(k=new Map(Object.entries(b)),g.extraData.productSpecificData=k);h=g;return x(e,Rc(h,d,f),0)})} +function Wc(a,b,c){try{if("help"===a.flow){var d=a.helpCenterPath.replace(/^\//,"");Pb(c||window,Mb("https://support.google.com/"+d))}else"submit"===a.flow?Uc(a,b,c):Sc(a.productId,a.feedbackServerUri).then(function(f){var h=void 0===h?!1:h;var e=f.o;var g=M(e),k=Ab(e,g,1,h);if(null!=k&&"object"===typeof k&&k.O===ib)var l=k;else if(Array.isArray(k)){var m=l=L(k);0===m&&(m|=g&32);m|=g&2;m!==l&&N(k,m);l=new W(k)}else l=void 0;l!==k&&null!=l&&Bb(e,g,1,l,h);e=l;null!=e&&(f=f.o,g=M(f),g&2||(k=e,l=k.o, +m=M(l),k=m&2?qb(k.constructor,yb(l,m,!1)):k,k!==e&&(e=k,Bb(f,g,1,e,h))));h=e;f=!Sa||(null==h?void 0:h.getEnableMweb());e=!a.tinyNoPointer||(null==h?void 0:h.getEnableTinyNoPointer());!h||h.getAlohaAutoGaRollout()&&f&&e?Vc(a,b,c,h):Uc(a,b,c)},function(f){f&&"DuplicateFormError"!==f.name&&Uc(a,b,c)})}catch(f){Vc(a,b,c,null)}}var X=["userfeedback","api","startFeedback"],Y=C;X[0]in Y||"undefined"==typeof Y.execScript||Y.execScript("var "+X[0]); +for(var Z;X.length&&(Z=X.shift());)X.length||void 0===Wc?Y[Z]&&Y[Z]!==Object.prototype[Z]?Y=Y[Z]:Y=Y[Z]={}:Y[Z]=Wc;}).call(this); \ No newline at end of file