var ClixtellRecorder = function () { var e = function () { var e = (String.fromCharCode, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="), t = { cmp: function (r) { if (null == r) return ""; var o = t._trp(r, 6, function (t) { return e.charAt(t) }); switch (o.length % 4) { default: case 0: return o; case 1: return o + "==="; case 2: return o + "=="; case 3: return o + "=" } }, _trp: function (e, t, r) { if (null == e) return ""; var o, n, a, i = {}, c = {}, l = "", s = "", d = "", u = 2, p = 3, h = 2, f = [], m = 0, w = 0; for (a = 0; a < e.length; a += 1)if (l = e.charAt(a), Object.prototype.hasOwnProperty.call(i, l) || (i[l] = p++ , c[l] = !0), s = d + l, Object.prototype.hasOwnProperty.call(i, s)) d = s; else { if (Object.prototype.hasOwnProperty.call(c, d)) { if (d.charCodeAt(0) < 256) { for (o = 0; o < h; o++)m <<= 1, w == t - 1 ? (w = 0, f.push(r(m)), m = 0) : w++; for (n = d.charCodeAt(0), o = 0; o < 8; o++)m = m << 1 | 1 & n, w == t - 1 ? (w = 0, f.push(r(m)), m = 0) : w++ , n >>= 1 } else { for (n = 1, o = 0; o < h; o++)m = m << 1 | n, w == t - 1 ? (w = 0, f.push(r(m)), m = 0) : w++ , n = 0; for (n = d.charCodeAt(0), o = 0; o < 16; o++)m = m << 1 | 1 & n, w == t - 1 ? (w = 0, f.push(r(m)), m = 0) : w++ , n >>= 1 } u-- , 0 == u && (u = Math.pow(2, h), h++), delete c[d] } else for (n = i[d], o = 0; o < h; o++)m = m << 1 | 1 & n, w == t - 1 ? (w = 0, f.push(r(m)), m = 0) : w++ , n >>= 1; u-- , 0 == u && (u = Math.pow(2, h), h++), i[s] = p++ , d = String(l) } if ("" !== d) { if (Object.prototype.hasOwnProperty.call(c, d)) { if (d.charCodeAt(0) < 256) { for (o = 0; o < h; o++)m <<= 1, w == t - 1 ? (w = 0, f.push(r(m)), m = 0) : w++; for (n = d.charCodeAt(0), o = 0; o < 8; o++)m = m << 1 | 1 & n, w == t - 1 ? (w = 0, f.push(r(m)), m = 0) : w++ , n >>= 1 } else { for (n = 1, o = 0; o < h; o++)m = m << 1 | n, w == t - 1 ? (w = 0, f.push(r(m)), m = 0) : w++ , n = 0; for (n = d.charCodeAt(0), o = 0; o < 16; o++)m = m << 1 | 1 & n, w == t - 1 ? (w = 0, f.push(r(m)), m = 0) : w++ , n >>= 1 } u-- , 0 == u && (u = Math.pow(2, h), h++), delete c[d] } else for (n = i[d], o = 0; o < h; o++)m = m << 1 | 1 & n, w == t - 1 ? (w = 0, f.push(r(m)), m = 0) : w++ , n >>= 1; u-- , 0 == u && (u = Math.pow(2, h), h++) } for (n = 2, o = 0; o < h; o++)m = m << 1 | 1 & n, w == t - 1 ? (w = 0, f.push(r(m)), m = 0) : w++ , n >>= 1; for (; ;) { if (m <<= 1, w == t - 1) { f.push(r(m)); break } w++ } return f.join("") } }; return t }(), t = [], r = null, o = null, n = function () { var n = { RecordingId: r, SessionId: o, Actions: t }, a = document.location.protocol; "http" == a && "https" == a || (a = "https:"); var i = new XMLHttpRequest; i.open("POST", a + "//recorder.clixtell.com/record", !0), i.setRequestHeader("Content-Type", "application/json;charset=UTF-8"), i.send(e.cmp(JSON.stringify(n))), t = [] }, a = function (e, r) { t.length >= 100 && n(); var o = {}; if (o.type = e, o.time = (new Date).getTime(), "unload" == e || "beforeunload" == e) n(); else { switch (e) { case "new": var a = Math.max(document.documentElement.clientWidth, window.innerWidth || 0), i = Math.max(document.documentElement.clientHeight, window.innerHeight || 0); o.URL = window.location.href, o.UserAgent = navigator.userAgent, o.Width = a, o.Height = i; break; case "start": break; case "mousemove": o.x = r.x, o.y = r.y; break; case "scroll": o.top = window.scrollY; break; case "click": o.x = r.pageX, o.y = r.pageY; break; case "touchstart": o.x = r.touches[0].pageX, o.y = r.touches[0].pageY; break; case "resize": var a = Math.max(document.documentElement.clientWidth, window.innerWidth || 0), i = Math.max(document.documentElement.clientHeight, window.innerHeight || 0); o.w = a, o.h = i; break; case "keyup": var c = ""; if (r instanceof KeyboardEvent) if (r.target.id) c = "#" + r.target.id; else { for (var l = "", s = r.path.length - 1; s >= 0; s--)r.path[s].nodeName && (l += " " + r.path[s].nodeName.toLowerCase()); l = l.replace("#document html", ""); var d = Array.prototype.slice.call(document.querySelectorAll(l)); if (d.length > 1) { var u = d.indexOf(r.target); c = l + "|" + u } else c = l } o.target = c, o.value = r.target.value }t.push(o) } }, i = ["mousemove", "scroll", "click", "contextmenu", "beforeunload", "unload", "keyup", "resize", "touchstart"], c = function () { if ("undefined" == typeof Clixtell) throw "Failed to initialize Clixtell Recorder. No Clixtell Tracking Script"; if (!window.isClixtellRecording) { window.isClixtellRecording = !0, o = "undefined" != typeof Clixtell ? Clixtell.sessionId : null; var c = new XMLHttpRequest; c.onreadystatechange = function () { if (c.readyState == XMLHttpRequest.DONE) { var e = JSON.parse(c.responseText); if (e.record) { r = e.recordingId, a("start"), n(); for (var t in i) window.addEventListener(i[t], function (e) { a(e.type, e) }, !1) } } }, a("new"); var l = { RecordingId: null, SessionId: o, Actions: t }, s = document.location.protocol; "http" == s && "https" == s || (s = "https:"), c.open("POST", s + "//recorder.clixtell.com/record", !0), c.setRequestHeader("Content-Type", "application/json;charset=UTF-8"), c.send(e.cmp(JSON.stringify(l))), t = [] } }; c() }();