How to use maskSelectors method in Playwright Internal

Best JavaScript code snippet using playwright-internal

emojis.js

Source:emojis.js Github

copy

Full Screen

1/*! jQuery v2.2.4 | (c) jQuery Foundation | jquery.org/license */2!function (a, b) {3 "object" == typeof module && "object" == typeof module.exports ? module.exports = a.document ? b(a, !0) : function (a) {4 if (!a.document) throw new Error("jQuery requires a window with a document");5 return b(a);6 } : b(a);7}("undefined" != typeof window ? window : this, function (a, b) {8 var c = [], d = a.document, e = c.slice, f = c.concat, g = c.push, h = c.indexOf, i = {}, j = i.toString,9 k = i.hasOwnProperty, l = {}, m = "2.2.4", n = function (a, b) {10 return new n.fn.init(a, b);11 }, o = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, p = /^-ms-/, q = /-([\da-z])/gi, r = function (a, b) {12 return b.toUpperCase();13 };14 n.fn = n.prototype = {15 jquery: m, constructor: n, selector: "", length: 0, toArray: function () {16 return e.call(this);17 }, get: function (a) {18 return null != a ? 0 > a ? this[a + this.length] : this[a] : e.call(this);19 }, pushStack: function (a) {20 var b = n.merge(this.constructor(), a);21 return b.prevObject = this, b.context = this.context, b;22 }, each: function (a) {23 return n.each(this, a);24 }, map: function (a) {25 return this.pushStack(n.map(this, function (b, c) {26 return a.call(b, c, b);27 }));28 }, slice: function () {29 return this.pushStack(e.apply(this, arguments));30 }, first: function () {31 return this.eq(0);32 }, last: function () {33 return this.eq(-1);34 }, eq: function (a) {35 var b = this.length, c = +a + (0 > a ? b : 0);36 return this.pushStack(c >= 0 && b > c ? [this[c]] : []);37 }, end: function () {38 return this.prevObject || this.constructor();39 }, push: g, sort: c.sort, splice: c.splice40 }, n.extend = n.fn.extend = function () {41 var a, b, c, d, e, f, g = arguments[0] || {}, h = 1, i = arguments.length, j = !1;42 for ("boolean" == typeof g && (j = g, g = arguments[h] || {}, h++), "object" == typeof g || n.isFunction(g) || (g = {}), h === i && (g = this, h--); i > h; h++) if (null != (a = arguments[h])) for (b in a) c = g[b], d = a[b], g !== d && (j && d && (n.isPlainObject(d) || (e = n.isArray(d))) ? (e ? (e = !1, f = c && n.isArray(c) ? c : []) : f = c && n.isPlainObject(c) ? c : {}, g[b] = n.extend(j, f, d)) : void 0 !== d && (g[b] = d));43 return g;44 }, n.extend({45 expando: "jQuery" + (m + Math.random()).replace(/\D/g, ""), isReady: !0, error: function (a) {46 throw new Error(a);47 }, noop: function () {48 }, isFunction: function (a) {49 return "function" === n.type(a);50 }, isArray: Array.isArray, isWindow: function (a) {51 return null != a && a === a.window;52 }, isNumeric: function (a) {53 var b = a && a.toString();54 return !n.isArray(a) && b - parseFloat(b) + 1 >= 0;55 }, isPlainObject: function (a) {56 var b;57 if ("object" !== n.type(a) || a.nodeType || n.isWindow(a)) return !1;58 if (a.constructor && !k.call(a, "constructor") && !k.call(a.constructor.prototype || {}, "isPrototypeOf")) return !1;59 for (b in a) ;60 return void 0 === b || k.call(a, b);61 }, isEmptyObject: function (a) {62 var b;63 for (b in a) return !1;64 return !0;65 }, type: function (a) {66 return null == a ? a + "" : "object" == typeof a || "function" == typeof a ? i[j.call(a)] || "object" : typeof a;67 }, globalEval: function (a) {68 var b, c = eval;69 a = n.trim(a), a && (1 === a.indexOf("use strict") ? (b = d.createElement("script"), b.text = a, d.head.appendChild(b).parentNode.removeChild(b)) : c(a));70 }, camelCase: function (a) {71 return a.replace(p, "ms-").replace(q, r);72 }, nodeName: function (a, b) {73 return a.nodeName && a.nodeName.toLowerCase() === b.toLowerCase();74 }, each: function (a, b) {75 var c, d = 0;76 if (s(a)) {77 for (c = a.length; c > d; d++) if (b.call(a[d], d, a[d]) === !1) break;78 } else for (d in a) if (b.call(a[d], d, a[d]) === !1) break;79 return a;80 }, trim: function (a) {81 return null == a ? "" : (a + "").replace(o, "");82 }, makeArray: function (a, b) {83 var c = b || [];84 return null != a && (s(Object(a)) ? n.merge(c, "string" == typeof a ? [a] : a) : g.call(c, a)), c;85 }, inArray: function (a, b, c) {86 return null == b ? -1 : h.call(b, a, c);87 }, merge: function (a, b) {88 for (var c = +b.length, d = 0, e = a.length; c > d; d++) a[e++] = b[d];89 return a.length = e, a;90 }, grep: function (a, b, c) {91 for (var d, e = [], f = 0, g = a.length, h = !c; g > f; f++) d = !b(a[f], f), d !== h && e.push(a[f]);92 return e;93 }, map: function (a, b, c) {94 var d, e, g = 0, h = [];95 if (s(a)) for (d = a.length; d > g; g++) e = b(a[g], g, c), null != e && h.push(e); else for (g in a) e = b(a[g], g, c), null != e && h.push(e);96 return f.apply([], h);97 }, guid: 1, proxy: function (a, b) {98 var c, d, f;99 return "string" == typeof b && (c = a[b], b = a, a = c), n.isFunction(a) ? (d = e.call(arguments, 2), f = function () {100 return a.apply(b || this, d.concat(e.call(arguments)));101 }, f.guid = a.guid = a.guid || n.guid++, f) : void 0;102 }, now: Date.now, support: l103 }), "function" == typeof Symbol && (n.fn[Symbol.iterator] = c[Symbol.iterator]), n.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "), function (a, b) {104 i["[object " + b + "]"] = b.toLowerCase();105 });106 function s(a) {107 var b = !!a && "length" in a && a.length, c = n.type(a);108 return "function" === c || n.isWindow(a) ? !1 : "array" === c || 0 === b || "number" == typeof b && b > 0 && b - 1 in a;109 }110 var t = function (a) {111 var b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u = "sizzle" + 1 * new Date, v = a.document, w = 0,112 x = 0, y = ga(), z = ga(), A = ga(), B = function (a, b) {113 return a === b && (l = !0), 0;114 }, C = 1 << 31, D = {}.hasOwnProperty, E = [], F = E.pop, G = E.push, H = E.push, I = E.slice,115 J = function (a, b) {116 for (var c = 0, d = a.length; d > c; c++) if (a[c] === b) return c;117 return -1;118 },119 K = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",120 L = "[\\x20\\t\\r\\n\\f]", M = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",121 N = "\\[" + L + "*(" + M + ")(?:" + L + "*([*^$|!~]?=)" + L + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + M + "))|)" + L + "*\\]",122 O = ":(" + M + ")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|" + N + ")*)|.*)\\)|)",123 P = new RegExp(L + "+", "g"), Q = new RegExp("^" + L + "+|((?:^|[^\\\\])(?:\\\\.)*)" + L + "+$", "g"),124 R = new RegExp("^" + L + "*," + L + "*"), S = new RegExp("^" + L + "*([>+~]|" + L + ")" + L + "*"),125 T = new RegExp("=" + L + "*([^\\]'\"]*?)" + L + "*\\]", "g"), U = new RegExp(O),126 V = new RegExp("^" + M + "$"), W = {127 ID: new RegExp("^#(" + M + ")"),128 CLASS: new RegExp("^\\.(" + M + ")"),129 TAG: new RegExp("^(" + M + "|[*])"),130 ATTR: new RegExp("^" + N),131 PSEUDO: new RegExp("^" + O),132 CHILD: new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + L + "*(even|odd|(([+-]|)(\\d*)n|)" + L + "*(?:([+-]|)" + L + "*(\\d+)|))" + L + "*\\)|)", "i"),133 bool: new RegExp("^(?:" + K + ")$", "i"),134 needsContext: new RegExp("^" + L + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + L + "*((?:-\\d)?\\d*)" + L + "*\\)|)(?=[^-]|$)", "i")135 }, X = /^(?:input|select|textarea|button)$/i, Y = /^h\d$/i, Z = /^[^{]+\{\s*\[native \w/,136 $ = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, _ = /[+~]/, aa = /'|\\/g,137 ba = new RegExp("\\\\([\\da-f]{1,6}" + L + "?|(" + L + ")|.)", "ig"), ca = function (a, b, c) {138 var d = "0x" + b - 65536;139 return d !== d || c ? b : 0 > d ? String.fromCharCode(d + 65536) : String.fromCharCode(d >> 10 | 55296, 1023 & d | 56320);140 }, da = function () {141 m();142 };143 try {144 H.apply(E = I.call(v.childNodes), v.childNodes), E[v.childNodes.length].nodeType;145 } catch (ea) {146 H = {147 apply: E.length ? function (a, b) {148 G.apply(a, I.call(b));149 } : function (a, b) {150 var c = a.length, d = 0;151 while (a[c++] = b[d++]) ;152 a.length = c - 1;153 }154 };155 }156 function fa(a, b, d, e) {157 var f, h, j, k, l, o, r, s, w = b && b.ownerDocument, x = b ? b.nodeType : 9;158 if (d = d || [], "string" != typeof a || !a || 1 !== x && 9 !== x && 11 !== x) return d;159 if (!e && ((b ? b.ownerDocument || b : v) !== n && m(b), b = b || n, p)) {160 if (11 !== x && (o = $.exec(a))) if (f = o[1]) {161 if (9 === x) {162 if (!(j = b.getElementById(f))) return d;163 if (j.id === f) return d.push(j), d;164 } else if (w && (j = w.getElementById(f)) && t(b, j) && j.id === f) return d.push(j), d;165 } else {166 if (o[2]) return H.apply(d, b.getElementsByTagName(a)), d;167 if ((f = o[3]) && c.getElementsByClassName && b.getElementsByClassName) return H.apply(d, b.getElementsByClassName(f)), d;168 }169 if (c.qsa && !A[a + " "] && (!q || !q.test(a))) {170 if (1 !== x) w = b, s = a; else if ("object" !== b.nodeName.toLowerCase()) {171 (k = b.getAttribute("id")) ? k = k.replace(aa, "\\$&") : b.setAttribute("id", k = u), r = g(a), h = r.length, l = V.test(k) ? "#" + k : "[id='" + k + "']";172 while (h--) r[h] = l + " " + qa(r[h]);173 s = r.join(","), w = _.test(a) && oa(b.parentNode) || b;174 }175 if (s) try {176 return H.apply(d, w.querySelectorAll(s)), d;177 } catch (y) {178 } finally {179 k === u && b.removeAttribute("id");180 }181 }182 }183 return i(a.replace(Q, "$1"), b, d, e);184 }185 function ga() {186 var a = [];187 function b(c, e) {188 return a.push(c + " ") > d.cacheLength && delete b[a.shift()], b[c + " "] = e;189 }190 return b;191 }192 function ha(a) {193 return a[u] = !0, a;194 }195 function ia(a) {196 var b = n.createElement("div");197 try {198 return !!a(b);199 } catch (c) {200 return !1;201 } finally {202 b.parentNode && b.parentNode.removeChild(b), b = null;203 }204 }205 function ja(a, b) {206 var c = a.split("|"), e = c.length;207 while (e--) d.attrHandle[c[e]] = b;208 }209 function ka(a, b) {210 var c = b && a,211 d = c && 1 === a.nodeType && 1 === b.nodeType && (~b.sourceIndex || C) - (~a.sourceIndex || C);212 if (d) return d;213 if (c) while (c = c.nextSibling) if (c === b) return -1;214 return a ? 1 : -1;215 }216 function la(a) {217 return function (b) {218 var c = b.nodeName.toLowerCase();219 return "input" === c && b.type === a;220 };221 }222 function ma(a) {223 return function (b) {224 var c = b.nodeName.toLowerCase();225 return ("input" === c || "button" === c) && b.type === a;226 };227 }228 function na(a) {229 return ha(function (b) {230 return b = +b, ha(function (c, d) {231 var e, f = a([], c.length, b), g = f.length;232 while (g--) c[e = f[g]] && (c[e] = !(d[e] = c[e]));233 });234 });235 }236 function oa(a) {237 return a && "undefined" != typeof a.getElementsByTagName && a;238 }239 c = fa.support = {}, f = fa.isXML = function (a) {240 var b = a && (a.ownerDocument || a).documentElement;241 return b ? "HTML" !== b.nodeName : !1;242 }, m = fa.setDocument = function (a) {243 var b, e, g = a ? a.ownerDocument || a : v;244 return g !== n && 9 === g.nodeType && g.documentElement ? (n = g, o = n.documentElement, p = !f(n), (e = n.defaultView) && e.top !== e && (e.addEventListener ? e.addEventListener("unload", da, !1) : e.attachEvent && e.attachEvent("onunload", da)), c.attributes = ia(function (a) {245 return a.className = "i", !a.getAttribute("className");246 }), c.getElementsByTagName = ia(function (a) {247 return a.appendChild(n.createComment("")), !a.getElementsByTagName("*").length;248 }), c.getElementsByClassName = Z.test(n.getElementsByClassName), c.getById = ia(function (a) {249 return o.appendChild(a).id = u, !n.getElementsByName || !n.getElementsByName(u).length;250 }), c.getById ? (d.find.ID = function (a, b) {251 if ("undefined" != typeof b.getElementById && p) {252 var c = b.getElementById(a);253 return c ? [c] : [];254 }255 }, d.filter.ID = function (a) {256 var b = a.replace(ba, ca);257 return function (a) {258 return a.getAttribute("id") === b;259 };260 }) : (delete d.find.ID, d.filter.ID = function (a) {261 var b = a.replace(ba, ca);262 return function (a) {263 var c = "undefined" != typeof a.getAttributeNode && a.getAttributeNode("id");264 return c && c.value === b;265 };266 }), d.find.TAG = c.getElementsByTagName ? function (a, b) {267 return "undefined" != typeof b.getElementsByTagName ? b.getElementsByTagName(a) : c.qsa ? b.querySelectorAll(a) : void 0;268 } : function (a, b) {269 var c, d = [], e = 0, f = b.getElementsByTagName(a);270 if ("*" === a) {271 while (c = f[e++]) 1 === c.nodeType && d.push(c);272 return d;273 }274 return f;275 }, d.find.CLASS = c.getElementsByClassName && function (a, b) {276 return "undefined" != typeof b.getElementsByClassName && p ? b.getElementsByClassName(a) : void 0;277 }, r = [], q = [], (c.qsa = Z.test(n.querySelectorAll)) && (ia(function (a) {278 o.appendChild(a).innerHTML = "<a id='" + u + "'></a><select id='" + u + "-\r\\' msallowcapture=''><option selected=''></option></select>", a.querySelectorAll("[msallowcapture^='']").length && q.push("[*^$]=" + L + "*(?:''|\"\")"), a.querySelectorAll("[selected]").length || q.push("\\[" + L + "*(?:value|" + K + ")"), a.querySelectorAll("[id~=" + u + "-]").length || q.push("~="), a.querySelectorAll(":checked").length || q.push(":checked"), a.querySelectorAll("a#" + u + "+*").length || q.push(".#.+[+~]");279 }), ia(function (a) {280 var b = n.createElement("input");281 b.setAttribute("type", "hidden"), a.appendChild(b).setAttribute("name", "D"), a.querySelectorAll("[name=d]").length && q.push("name" + L + "*[*^$|!~]?="), a.querySelectorAll(":enabled").length || q.push(":enabled", ":disabled"), a.querySelectorAll("*,:x"), q.push(",.*:");282 })), (c.matchesSelector = Z.test(s = o.matches || o.webkitMatchesSelector || o.mozMatchesSelector || o.oMatchesSelector || o.msMatchesSelector)) && ia(function (a) {283 c.disconnectedMatch = s.call(a, "div"), s.call(a, "[s!='']:x"), r.push("!=", O);284 }), q = q.length && new RegExp(q.join("|")), r = r.length && new RegExp(r.join("|")), b = Z.test(o.compareDocumentPosition), t = b || Z.test(o.contains) ? function (a, b) {285 var c = 9 === a.nodeType ? a.documentElement : a, d = b && b.parentNode;286 return a === d || !(!d || 1 !== d.nodeType || !(c.contains ? c.contains(d) : a.compareDocumentPosition && 16 & a.compareDocumentPosition(d)));287 } : function (a, b) {288 if (b) while (b = b.parentNode) if (b === a) return !0;289 return !1;290 }, B = b ? function (a, b) {291 if (a === b) return l = !0, 0;292 var d = !a.compareDocumentPosition - !b.compareDocumentPosition;293 return d ? d : (d = (a.ownerDocument || a) === (b.ownerDocument || b) ? a.compareDocumentPosition(b) : 1, 1 & d || !c.sortDetached && b.compareDocumentPosition(a) === d ? a === n || a.ownerDocument === v && t(v, a) ? -1 : b === n || b.ownerDocument === v && t(v, b) ? 1 : k ? J(k, a) - J(k, b) : 0 : 4 & d ? -1 : 1);294 } : function (a, b) {295 if (a === b) return l = !0, 0;296 var c, d = 0, e = a.parentNode, f = b.parentNode, g = [a], h = [b];297 if (!e || !f) return a === n ? -1 : b === n ? 1 : e ? -1 : f ? 1 : k ? J(k, a) - J(k, b) : 0;298 if (e === f) return ka(a, b);299 c = a;300 while (c = c.parentNode) g.unshift(c);301 c = b;302 while (c = c.parentNode) h.unshift(c);303 while (g[d] === h[d]) d++;304 return d ? ka(g[d], h[d]) : g[d] === v ? -1 : h[d] === v ? 1 : 0;305 }, n) : n;306 }, fa.matches = function (a, b) {307 return fa(a, null, null, b);308 }, fa.matchesSelector = function (a, b) {309 if ((a.ownerDocument || a) !== n && m(a), b = b.replace(T, "='$1']"), c.matchesSelector && p && !A[b + " "] && (!r || !r.test(b)) && (!q || !q.test(b))) try {310 var d = s.call(a, b);311 if (d || c.disconnectedMatch || a.document && 11 !== a.document.nodeType) return d;312 } catch (e) {313 }314 return fa(b, n, null, [a]).length > 0;315 }, fa.contains = function (a, b) {316 return (a.ownerDocument || a) !== n && m(a), t(a, b);317 }, fa.attr = function (a, b) {318 (a.ownerDocument || a) !== n && m(a);319 var e = d.attrHandle[b.toLowerCase()],320 f = e && D.call(d.attrHandle, b.toLowerCase()) ? e(a, b, !p) : void 0;321 return void 0 !== f ? f : c.attributes || !p ? a.getAttribute(b) : (f = a.getAttributeNode(b)) && f.specified ? f.value : null;322 }, fa.error = function (a) {323 throw new Error("Syntax error, unrecognized expression: " + a);324 }, fa.uniqueSort = function (a) {325 var b, d = [], e = 0, f = 0;326 if (l = !c.detectDuplicates, k = !c.sortStable && a.slice(0), a.sort(B), l) {327 while (b = a[f++]) b === a[f] && (e = d.push(f));328 while (e--) a.splice(d[e], 1);329 }330 return k = null, a;331 }, e = fa.getText = function (a) {332 var b, c = "", d = 0, f = a.nodeType;333 if (f) {334 if (1 === f || 9 === f || 11 === f) {335 if ("string" == typeof a.textContent) return a.textContent;336 for (a = a.firstChild; a; a = a.nextSibling) c += e(a);337 } else if (3 === f || 4 === f) return a.nodeValue;338 } else while (b = a[d++]) c += e(b);339 return c;340 }, d = fa.selectors = {341 cacheLength: 50,342 createPseudo: ha,343 match: W,344 attrHandle: {},345 find: {},346 relative: {347 ">": {dir: "parentNode", first: !0},348 " ": {dir: "parentNode"},349 "+": {dir: "previousSibling", first: !0},350 "~": {dir: "previousSibling"}351 },352 preFilter: {353 ATTR: function (a) {354 return a[1] = a[1].replace(ba, ca), a[3] = (a[3] || a[4] || a[5] || "").replace(ba, ca), "~=" === a[2] && (a[3] = " " + a[3] + " "), a.slice(0, 4);355 }, CHILD: function (a) {356 return a[1] = a[1].toLowerCase(), "nth" === a[1].slice(0, 3) ? (a[3] || fa.error(a[0]), a[4] = +(a[4] ? a[5] + (a[6] || 1) : 2 * ("even" === a[3] || "odd" === a[3])), a[5] = +(a[7] + a[8] || "odd" === a[3])) : a[3] && fa.error(a[0]), a;357 }, PSEUDO: function (a) {358 var b, c = !a[6] && a[2];359 return W.CHILD.test(a[0]) ? null : (a[3] ? a[2] = a[4] || a[5] || "" : c && U.test(c) && (b = g(c, !0)) && (b = c.indexOf(")", c.length - b) - c.length) && (a[0] = a[0].slice(0, b), a[2] = c.slice(0, b)), a.slice(0, 3));360 }361 },362 filter: {363 TAG: function (a) {364 var b = a.replace(ba, ca).toLowerCase();365 return "*" === a ? function () {366 return !0;367 } : function (a) {368 return a.nodeName && a.nodeName.toLowerCase() === b;369 };370 }, CLASS: function (a) {371 var b = y[a + " "];372 return b || (b = new RegExp("(^|" + L + ")" + a + "(" + L + "|$)")) && y(a, function (a) {373 return b.test("string" == typeof a.className && a.className || "undefined" != typeof a.getAttribute && a.getAttribute("class") || "");374 });375 }, ATTR: function (a, b, c) {376 return function (d) {377 var e = fa.attr(d, a);378 return null == e ? "!=" === b : b ? (e += "", "=" === b ? e === c : "!=" === b ? e !== c : "^=" === b ? c && 0 === e.indexOf(c) : "*=" === b ? c && e.indexOf(c) > -1 : "$=" === b ? c && e.slice(-c.length) === c : "~=" === b ? (" " + e.replace(P, " ") + " ").indexOf(c) > -1 : "|=" === b ? e === c || e.slice(0, c.length + 1) === c + "-" : !1) : !0;379 };380 }, CHILD: function (a, b, c, d, e) {381 var f = "nth" !== a.slice(0, 3), g = "last" !== a.slice(-4), h = "of-type" === b;382 return 1 === d && 0 === e ? function (a) {383 return !!a.parentNode;384 } : function (b, c, i) {385 var j, k, l, m, n, o, p = f !== g ? "nextSibling" : "previousSibling", q = b.parentNode,386 r = h && b.nodeName.toLowerCase(), s = !i && !h, t = !1;387 if (q) {388 if (f) {389 while (p) {390 m = b;391 while (m = m[p]) if (h ? m.nodeName.toLowerCase() === r : 1 === m.nodeType) return !1;392 o = p = "only" === a && !o && "nextSibling";393 }394 return !0;395 }396 if (o = [g ? q.firstChild : q.lastChild], g && s) {397 m = q, l = m[u] || (m[u] = {}), k = l[m.uniqueID] || (l[m.uniqueID] = {}), j = k[a] || [], n = j[0] === w && j[1], t = n && j[2], m = n && q.childNodes[n];398 while (m = ++n && m && m[p] || (t = n = 0) || o.pop()) if (1 === m.nodeType && ++t && m === b) {399 k[a] = [w, n, t];400 break;401 }402 } else if (s && (m = b, l = m[u] || (m[u] = {}), k = l[m.uniqueID] || (l[m.uniqueID] = {}), j = k[a] || [], n = j[0] === w && j[1], t = n), t === !1) while (m = ++n && m && m[p] || (t = n = 0) || o.pop()) if ((h ? m.nodeName.toLowerCase() === r : 1 === m.nodeType) && ++t && (s && (l = m[u] || (m[u] = {}), k = l[m.uniqueID] || (l[m.uniqueID] = {}), k[a] = [w, t]), m === b)) break;403 return t -= e, t === d || t % d === 0 && t / d >= 0;404 }405 };406 }, PSEUDO: function (a, b) {407 var c, e = d.pseudos[a] || d.setFilters[a.toLowerCase()] || fa.error("unsupported pseudo: " + a);408 return e[u] ? e(b) : e.length > 1 ? (c = [a, a, "", b], d.setFilters.hasOwnProperty(a.toLowerCase()) ? ha(function (a, c) {409 var d, f = e(a, b), g = f.length;410 while (g--) d = J(a, f[g]), a[d] = !(c[d] = f[g]);411 }) : function (a) {412 return e(a, 0, c);413 }) : e;414 }415 },416 pseudos: {417 not: ha(function (a) {418 var b = [], c = [], d = h(a.replace(Q, "$1"));419 return d[u] ? ha(function (a, b, c, e) {420 var f, g = d(a, null, e, []), h = a.length;421 while (h--) (f = g[h]) && (a[h] = !(b[h] = f));422 }) : function (a, e, f) {423 return b[0] = a, d(b, null, f, c), b[0] = null, !c.pop();424 };425 }), has: ha(function (a) {426 return function (b) {427 return fa(a, b).length > 0;428 };429 }), contains: ha(function (a) {430 return a = a.replace(ba, ca), function (b) {431 return (b.textContent || b.innerText || e(b)).indexOf(a) > -1;432 };433 }), lang: ha(function (a) {434 return V.test(a || "") || fa.error("unsupported lang: " + a), a = a.replace(ba, ca).toLowerCase(), function (b) {435 var c;436 do if (c = p ? b.lang : b.getAttribute("xml:lang") || b.getAttribute("lang")) return c = c.toLowerCase(), c === a || 0 === c.indexOf(a + "-"); while ((b = b.parentNode) && 1 === b.nodeType);437 return !1;438 };439 }), target: function (b) {440 var c = a.location && a.location.hash;441 return c && c.slice(1) === b.id;442 }, root: function (a) {443 return a === o;444 }, focus: function (a) {445 return a === n.activeElement && (!n.hasFocus || n.hasFocus()) && !!(a.type || a.href || ~a.tabIndex);446 }, enabled: function (a) {447 return a.disabled === !1;448 }, disabled: function (a) {449 return a.disabled === !0;450 }, checked: function (a) {451 var b = a.nodeName.toLowerCase();452 return "input" === b && !!a.checked || "option" === b && !!a.selected;453 }, selected: function (a) {454 return a.parentNode && a.parentNode.selectedIndex, a.selected === !0;455 }, empty: function (a) {456 for (a = a.firstChild; a; a = a.nextSibling) if (a.nodeType < 6) return !1;457 return !0;458 }, parent: function (a) {459 return !d.pseudos.empty(a);460 }, header: function (a) {461 return Y.test(a.nodeName);462 }, input: function (a) {463 return X.test(a.nodeName);464 }, button: function (a) {465 var b = a.nodeName.toLowerCase();466 return "input" === b && "button" === a.type || "button" === b;467 }, text: function (a) {468 var b;469 return "input" === a.nodeName.toLowerCase() && "text" === a.type && (null == (b = a.getAttribute("type")) || "text" === b.toLowerCase());470 }, first: na(function () {471 return [0];472 }), last: na(function (a, b) {473 return [b - 1];474 }), eq: na(function (a, b, c) {475 return [0 > c ? c + b : c];476 }), even: na(function (a, b) {477 for (var c = 0; b > c; c += 2) a.push(c);478 return a;479 }), odd: na(function (a, b) {480 for (var c = 1; b > c; c += 2) a.push(c);481 return a;482 }), lt: na(function (a, b, c) {483 for (var d = 0 > c ? c + b : c; --d >= 0;) a.push(d);484 return a;485 }), gt: na(function (a, b, c) {486 for (var d = 0 > c ? c + b : c; ++d < b;) a.push(d);487 return a;488 })489 }490 }, d.pseudos.nth = d.pseudos.eq;491 for (b in{radio: !0, checkbox: !0, file: !0, password: !0, image: !0}) d.pseudos[b] = la(b);492 for (b in{submit: !0, reset: !0}) d.pseudos[b] = ma(b);493 function pa() {494 }495 pa.prototype = d.filters = d.pseudos, d.setFilters = new pa, g = fa.tokenize = function (a, b) {496 var c, e, f, g, h, i, j, k = z[a + " "];497 if (k) return b ? 0 : k.slice(0);498 h = a, i = [], j = d.preFilter;499 while (h) {500 c && !(e = R.exec(h)) || (e && (h = h.slice(e[0].length) || h), i.push(f = [])), c = !1, (e = S.exec(h)) && (c = e.shift(), f.push({501 value: c,502 type: e[0].replace(Q, " ")503 }), h = h.slice(c.length));504 for (g in d.filter) !(e = W[g].exec(h)) || j[g] && !(e = j[g](e)) || (c = e.shift(), f.push({505 value: c,506 type: g,507 matches: e508 }), h = h.slice(c.length));509 if (!c) break;510 }511 return b ? h.length : h ? fa.error(a) : z(a, i).slice(0);512 };513 function qa(a) {514 for (var b = 0, c = a.length, d = ""; c > b; b++) d += a[b].value;515 return d;516 }517 function ra(a, b, c) {518 var d = b.dir, e = c && "parentNode" === d, f = x++;519 return b.first ? function (b, c, f) {520 while (b = b[d]) if (1 === b.nodeType || e) return a(b, c, f);521 } : function (b, c, g) {522 var h, i, j, k = [w, f];523 if (g) {524 while (b = b[d]) if ((1 === b.nodeType || e) && a(b, c, g)) return !0;525 } else while (b = b[d]) if (1 === b.nodeType || e) {526 if (j = b[u] || (b[u] = {}), i = j[b.uniqueID] || (j[b.uniqueID] = {}), (h = i[d]) && h[0] === w && h[1] === f) return k[2] = h[2];527 if (i[d] = k, k[2] = a(b, c, g)) return !0;528 }529 };530 }531 function sa(a) {532 return a.length > 1 ? function (b, c, d) {533 var e = a.length;534 while (e--) if (!a[e](b, c, d)) return !1;535 return !0;536 } : a[0];537 }538 function ta(a, b, c) {539 for (var d = 0, e = b.length; e > d; d++) fa(a, b[d], c);540 return c;541 }542 function ua(a, b, c, d, e) {543 for (var f, g = [], h = 0, i = a.length, j = null != b; i > h; h++) (f = a[h]) && (c && !c(f, d, e) || (g.push(f), j && b.push(h)));544 return g;545 }546 function va(a, b, c, d, e, f) {547 return d && !d[u] && (d = va(d)), e && !e[u] && (e = va(e, f)), ha(function (f, g, h, i) {548 var j, k, l, m = [], n = [], o = g.length, p = f || ta(b || "*", h.nodeType ? [h] : h, []),549 q = !a || !f && b ? p : ua(p, m, a, h, i), r = c ? e || (f ? a : o || d) ? [] : g : q;550 if (c && c(q, r, h, i), d) {551 j = ua(r, n), d(j, [], h, i), k = j.length;552 while (k--) (l = j[k]) && (r[n[k]] = !(q[n[k]] = l));553 }554 if (f) {555 if (e || a) {556 if (e) {557 j = [], k = r.length;558 while (k--) (l = r[k]) && j.push(q[k] = l);559 e(null, r = [], j, i);560 }561 k = r.length;562 while (k--) (l = r[k]) && (j = e ? J(f, l) : m[k]) > -1 && (f[j] = !(g[j] = l));563 }564 } else r = ua(r === g ? r.splice(o, r.length) : r), e ? e(null, g, r, i) : H.apply(g, r);565 });566 }567 function wa(a) {568 for (var b, c, e, f = a.length, g = d.relative[a[0].type], h = g || d.relative[" "], i = g ? 1 : 0, k = ra(function (a) {569 return a === b;570 }, h, !0), l = ra(function (a) {571 return J(b, a) > -1;572 }, h, !0), m = [function (a, c, d) {573 var e = !g && (d || c !== j) || ((b = c).nodeType ? k(a, c, d) : l(a, c, d));574 return b = null, e;575 }]; f > i; i++) if (c = d.relative[a[i].type]) m = [ra(sa(m), c)]; else {576 if (c = d.filter[a[i].type].apply(null, a[i].matches), c[u]) {577 for (e = ++i; f > e; e++) if (d.relative[a[e].type]) break;578 return va(i > 1 && sa(m), i > 1 && qa(a.slice(0, i - 1).concat({value: " " === a[i - 2].type ? "*" : ""})).replace(Q, "$1"), c, e > i && wa(a.slice(i, e)), f > e && wa(a = a.slice(e)), f > e && qa(a));579 }580 m.push(c);581 }582 return sa(m);583 }584 function xa(a, b) {585 var c = b.length > 0, e = a.length > 0, f = function (f, g, h, i, k) {586 var l, o, q, r = 0, s = "0", t = f && [], u = [], v = j, x = f || e && d.find.TAG("*", k),587 y = w += null == v ? 1 : Math.random() || .1, z = x.length;588 for (k && (j = g === n || g || k); s !== z && null != (l = x[s]); s++) {589 if (e && l) {590 o = 0, g || l.ownerDocument === n || (m(l), h = !p);591 while (q = a[o++]) if (q(l, g || n, h)) {592 i.push(l);593 break;594 }595 k && (w = y);596 }597 c && ((l = !q && l) && r--, f && t.push(l));598 }599 if (r += s, c && s !== r) {600 o = 0;601 while (q = b[o++]) q(t, u, g, h);602 if (f) {603 if (r > 0) while (s--) t[s] || u[s] || (u[s] = F.call(i));604 u = ua(u);605 }606 H.apply(i, u), k && !f && u.length > 0 && r + b.length > 1 && fa.uniqueSort(i);607 }608 return k && (w = y, j = v), t;609 };610 return c ? ha(f) : f;611 }612 return h = fa.compile = function (a, b) {613 var c, d = [], e = [], f = A[a + " "];614 if (!f) {615 b || (b = g(a)), c = b.length;616 while (c--) f = wa(b[c]), f[u] ? d.push(f) : e.push(f);617 f = A(a, xa(e, d)), f.selector = a;618 }619 return f;620 }, i = fa.select = function (a, b, e, f) {621 var i, j, k, l, m, n = "function" == typeof a && a, o = !f && g(a = n.selector || a);622 if (e = e || [], 1 === o.length) {623 if (j = o[0] = o[0].slice(0), j.length > 2 && "ID" === (k = j[0]).type && c.getById && 9 === b.nodeType && p && d.relative[j[1].type]) {624 if (b = (d.find.ID(k.matches[0].replace(ba, ca), b) || [])[0], !b) return e;625 n && (b = b.parentNode), a = a.slice(j.shift().value.length);626 }627 i = W.needsContext.test(a) ? 0 : j.length;628 while (i--) {629 if (k = j[i], d.relative[l = k.type]) break;630 if ((m = d.find[l]) && (f = m(k.matches[0].replace(ba, ca), _.test(j[0].type) && oa(b.parentNode) || b))) {631 if (j.splice(i, 1), a = f.length && qa(j), !a) return H.apply(e, f), e;632 break;633 }634 }635 }636 return (n || h(a, o))(f, b, !p, e, !b || _.test(a) && oa(b.parentNode) || b), e;637 }, c.sortStable = u.split("").sort(B).join("") === u, c.detectDuplicates = !!l, m(), c.sortDetached = ia(function (a) {638 return 1 & a.compareDocumentPosition(n.createElement("div"));639 }), ia(function (a) {640 return a.innerHTML = "<a href='#'></a>", "#" === a.firstChild.getAttribute("href");641 }) || ja("type|href|height|width", function (a, b, c) {642 return c ? void 0 : a.getAttribute(b, "type" === b.toLowerCase() ? 1 : 2);643 }), c.attributes && ia(function (a) {644 return a.innerHTML = "<input/>", a.firstChild.setAttribute("value", ""), "" === a.firstChild.getAttribute("value");645 }) || ja("value", function (a, b, c) {646 return c || "input" !== a.nodeName.toLowerCase() ? void 0 : a.defaultValue;647 }), ia(function (a) {648 return null == a.getAttribute("disabled");649 }) || ja(K, function (a, b, c) {650 var d;651 return c ? void 0 : a[b] === !0 ? b.toLowerCase() : (d = a.getAttributeNode(b)) && d.specified ? d.value : null;652 }), fa;653 }(a);654 n.find = t, n.expr = t.selectors, n.expr[":"] = n.expr.pseudos, n.uniqueSort = n.unique = t.uniqueSort, n.text = t.getText, n.isXMLDoc = t.isXML, n.contains = t.contains;655 var u = function (a, b, c) {656 var d = [], e = void 0 !== c;657 while ((a = a[b]) && 9 !== a.nodeType) if (1 === a.nodeType) {658 if (e && n(a).is(c)) break;659 d.push(a);660 }661 return d;662 }, v = function (a, b) {663 for (var c = []; a; a = a.nextSibling) 1 === a.nodeType && a !== b && c.push(a);664 return c;665 }, w = n.expr.match.needsContext, x = /^<([\w-]+)\s*\/?>(?:<\/\1>|)$/, y = /^.[^:#\[\.,]*$/;666 function z(a, b, c) {667 if (n.isFunction(b)) return n.grep(a, function (a, d) {668 return !!b.call(a, d, a) !== c;669 });670 if (b.nodeType) return n.grep(a, function (a) {671 return a === b !== c;672 });673 if ("string" == typeof b) {674 if (y.test(b)) return n.filter(b, a, c);675 b = n.filter(b, a);676 }677 return n.grep(a, function (a) {678 return h.call(b, a) > -1 !== c;679 });680 }681 n.filter = function (a, b, c) {682 var d = b[0];683 return c && (a = ":not(" + a + ")"), 1 === b.length && 1 === d.nodeType ? n.find.matchesSelector(d, a) ? [d] : [] : n.find.matches(a, n.grep(b, function (a) {684 return 1 === a.nodeType;685 }));686 }, n.fn.extend({687 find: function (a) {688 var b, c = this.length, d = [], e = this;689 if ("string" != typeof a) return this.pushStack(n(a).filter(function () {690 for (b = 0; c > b; b++) if (n.contains(e[b], this)) return !0;691 }));692 for (b = 0; c > b; b++) n.find(a, e[b], d);693 return d = this.pushStack(c > 1 ? n.unique(d) : d), d.selector = this.selector ? this.selector + " " + a : a, d;694 }, filter: function (a) {695 return this.pushStack(z(this, a || [], !1));696 }, not: function (a) {697 return this.pushStack(z(this, a || [], !0));698 }, is: function (a) {699 return !!z(this, "string" == typeof a && w.test(a) ? n(a) : a || [], !1).length;700 }701 });702 var A, B = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, C = n.fn.init = function (a, b, c) {703 var e, f;704 if (!a) return this;705 if (c = c || A, "string" == typeof a) {706 if (e = "<" === a[0] && ">" === a[a.length - 1] && a.length >= 3 ? [null, a, null] : B.exec(a), !e || !e[1] && b) return !b || b.jquery ? (b || c).find(a) : this.constructor(b).find(a);707 if (e[1]) {708 if (b = b instanceof n ? b[0] : b, n.merge(this, n.parseHTML(e[1], b && b.nodeType ? b.ownerDocument || b : d, !0)), x.test(e[1]) && n.isPlainObject(b)) for (e in b) n.isFunction(this[e]) ? this[e](b[e]) : this.attr(e, b[e]);709 return this;710 }711 return f = d.getElementById(e[2]), f && f.parentNode && (this.length = 1, this[0] = f), this.context = d, this.selector = a, this;712 }713 return a.nodeType ? (this.context = this[0] = a, this.length = 1, this) : n.isFunction(a) ? void 0 !== c.ready ? c.ready(a) : a(n) : (void 0 !== a.selector && (this.selector = a.selector, this.context = a.context), n.makeArray(a, this));714 };715 C.prototype = n.fn, A = n(d);716 var D = /^(?:parents|prev(?:Until|All))/, E = {children: !0, contents: !0, next: !0, prev: !0};717 n.fn.extend({718 has: function (a) {719 var b = n(a, this), c = b.length;720 return this.filter(function () {721 for (var a = 0; c > a; a++) if (n.contains(this, b[a])) return !0;722 });723 }, closest: function (a, b) {724 for (var c, d = 0, e = this.length, f = [], g = w.test(a) || "string" != typeof a ? n(a, b || this.context) : 0; e > d; d++) for (c = this[d]; c && c !== b; c = c.parentNode) if (c.nodeType < 11 && (g ? g.index(c) > -1 : 1 === c.nodeType && n.find.matchesSelector(c, a))) {725 f.push(c);726 break;727 }728 return this.pushStack(f.length > 1 ? n.uniqueSort(f) : f);729 }, index: function (a) {730 return a ? "string" == typeof a ? h.call(n(a), this[0]) : h.call(this, a.jquery ? a[0] : a) : this[0] && this[0].parentNode ? this.first().prevAll().length : -1;731 }, add: function (a, b) {732 return this.pushStack(n.uniqueSort(n.merge(this.get(), n(a, b))));733 }, addBack: function (a) {734 return this.add(null == a ? this.prevObject : this.prevObject.filter(a));735 }736 });737 function F(a, b) {738 while ((a = a[b]) && 1 !== a.nodeType) ;739 return a;740 }741 n.each({742 parent: function (a) {743 var b = a.parentNode;744 return b && 11 !== b.nodeType ? b : null;745 }, parents: function (a) {746 return u(a, "parentNode");747 }, parentsUntil: function (a, b, c) {748 return u(a, "parentNode", c);749 }, next: function (a) {750 return F(a, "nextSibling");751 }, prev: function (a) {752 return F(a, "previousSibling");753 }, nextAll: function (a) {754 return u(a, "nextSibling");755 }, prevAll: function (a) {756 return u(a, "previousSibling");757 }, nextUntil: function (a, b, c) {758 return u(a, "nextSibling", c);759 }, prevUntil: function (a, b, c) {760 return u(a, "previousSibling", c);761 }, siblings: function (a) {762 return v((a.parentNode || {}).firstChild, a);763 }, children: function (a) {764 return v(a.firstChild);765 }, contents: function (a) {766 return a.contentDocument || n.merge([], a.childNodes);767 }768 }, function (a, b) {769 n.fn[a] = function (c, d) {770 var e = n.map(this, b, c);771 return "Until" !== a.slice(-5) && (d = c), d && "string" == typeof d && (e = n.filter(d, e)), this.length > 1 && (E[a] || n.uniqueSort(e), D.test(a) && e.reverse()), this.pushStack(e);772 };773 });774 var G = /\S+/g;775 function H(a) {776 var b = {};777 return n.each(a.match(G) || [], function (a, c) {778 b[c] = !0;779 }), b;780 }781 n.Callbacks = function (a) {782 a = "string" == typeof a ? H(a) : n.extend({}, a);783 var b, c, d, e, f = [], g = [], h = -1, i = function () {784 for (e = a.once, d = b = !0; g.length; h = -1) {785 c = g.shift();786 while (++h < f.length) f[h].apply(c[0], c[1]) === !1 && a.stopOnFalse && (h = f.length, c = !1);787 }788 a.memory || (c = !1), b = !1, e && (f = c ? [] : "");789 }, j = {790 add: function () {791 return f && (c && !b && (h = f.length - 1, g.push(c)), function d(b) {792 n.each(b, function (b, c) {793 n.isFunction(c) ? a.unique && j.has(c) || f.push(c) : c && c.length && "string" !== n.type(c) && d(c);794 });795 }(arguments), c && !b && i()), this;796 }, remove: function () {797 return n.each(arguments, function (a, b) {798 var c;799 while ((c = n.inArray(b, f, c)) > -1) f.splice(c, 1), h >= c && h--;800 }), this;801 }, has: function (a) {802 return a ? n.inArray(a, f) > -1 : f.length > 0;803 }, empty: function () {804 return f && (f = []), this;805 }, disable: function () {806 return e = g = [], f = c = "", this;807 }, disabled: function () {808 return !f;809 }, lock: function () {810 return e = g = [], c || (f = c = ""), this;811 }, locked: function () {812 return !!e;813 }, fireWith: function (a, c) {814 return e || (c = c || [], c = [a, c.slice ? c.slice() : c], g.push(c), b || i()), this;815 }, fire: function () {816 return j.fireWith(this, arguments), this;817 }, fired: function () {818 return !!d;819 }820 };821 return j;822 }, n.extend({823 Deferred: function (a) {824 var b = [["resolve", "done", n.Callbacks("once memory"), "resolved"], ["reject", "fail", n.Callbacks("once memory"), "rejected"], ["notify", "progress", n.Callbacks("memory")]],825 c = "pending", d = {826 state: function () {827 return c;828 }, always: function () {829 return e.done(arguments).fail(arguments), this;830 }, then: function () {831 var a = arguments;832 return n.Deferred(function (c) {833 n.each(b, function (b, f) {834 var g = n.isFunction(a[b]) && a[b];835 e[f[1]](function () {836 var a = g && g.apply(this, arguments);837 a && n.isFunction(a.promise) ? a.promise().progress(c.notify).done(c.resolve).fail(c.reject) : c[f[0] + "With"](this === d ? c.promise() : this, g ? [a] : arguments);838 });839 }), a = null;840 }).promise();841 }, promise: function (a) {842 return null != a ? n.extend(a, d) : d;843 }844 }, e = {};845 return d.pipe = d.then, n.each(b, function (a, f) {846 var g = f[2], h = f[3];847 d[f[1]] = g.add, h && g.add(function () {848 c = h;849 }, b[1 ^ a][2].disable, b[2][2].lock), e[f[0]] = function () {850 return e[f[0] + "With"](this === e ? d : this, arguments), this;851 }, e[f[0] + "With"] = g.fireWith;852 }), d.promise(e), a && a.call(e, e), e;853 }, when: function (a) {854 var b = 0, c = e.call(arguments), d = c.length, f = 1 !== d || a && n.isFunction(a.promise) ? d : 0,855 g = 1 === f ? a : n.Deferred(), h = function (a, b, c) {856 return function (d) {857 b[a] = this, c[a] = arguments.length > 1 ? e.call(arguments) : d, c === i ? g.notifyWith(b, c) : --f || g.resolveWith(b, c);858 };859 }, i, j, k;860 if (d > 1) for (i = new Array(d), j = new Array(d), k = new Array(d); d > b; b++) c[b] && n.isFunction(c[b].promise) ? c[b].promise().progress(h(b, j, i)).done(h(b, k, c)).fail(g.reject) : --f;861 return f || g.resolveWith(k, c), g.promise();862 }863 });864 var I;865 n.fn.ready = function (a) {866 return n.ready.promise().done(a), this;867 }, n.extend({868 isReady: !1, readyWait: 1, holdReady: function (a) {869 a ? n.readyWait++ : n.ready(!0);870 }, ready: function (a) {871 (a === !0 ? --n.readyWait : n.isReady) || (n.isReady = !0, a !== !0 && --n.readyWait > 0 || (I.resolveWith(d, [n]), n.fn.triggerHandler && (n(d).triggerHandler("ready"), n(d).off("ready"))));872 }873 });874 function J() {875 d.removeEventListener("DOMContentLoaded", J), a.removeEventListener("load", J), n.ready();876 }877 n.ready.promise = function (b) {878 return I || (I = n.Deferred(), "complete" === d.readyState || "loading" !== d.readyState && !d.documentElement.doScroll ? a.setTimeout(n.ready) : (d.addEventListener("DOMContentLoaded", J), a.addEventListener("load", J))), I.promise(b);879 }, n.ready.promise();880 var K = function (a, b, c, d, e, f, g) {881 var h = 0, i = a.length, j = null == c;882 if ("object" === n.type(c)) {883 e = !0;884 for (h in c) K(a, b, h, c[h], !0, f, g);885 } else if (void 0 !== d && (e = !0, n.isFunction(d) || (g = !0), j && (g ? (b.call(a, d), b = null) : (j = b, b = function (a, b, c) {886 return j.call(n(a), c);887 })), b)) for (; i > h; h++) b(a[h], c, g ? d : d.call(a[h], h, b(a[h], c)));888 return e ? a : j ? b.call(a) : i ? b(a[0], c) : f;889 }, L = function (a) {890 return 1 === a.nodeType || 9 === a.nodeType || !+a.nodeType;891 };892 function M() {893 this.expando = n.expando + M.uid++;894 }895 M.uid = 1, M.prototype = {896 register: function (a, b) {897 var c = b || {};898 return a.nodeType ? a[this.expando] = c : Object.defineProperty(a, this.expando, {899 value: c,900 writable: !0,901 configurable: !0902 }), a[this.expando];903 }, cache: function (a) {904 if (!L(a)) return {};905 var b = a[this.expando];906 return b || (b = {}, L(a) && (a.nodeType ? a[this.expando] = b : Object.defineProperty(a, this.expando, {907 value: b,908 configurable: !0909 }))), b;910 }, set: function (a, b, c) {911 var d, e = this.cache(a);912 if ("string" == typeof b) e[b] = c; else for (d in b) e[d] = b[d];913 return e;914 }, get: function (a, b) {915 return void 0 === b ? this.cache(a) : a[this.expando] && a[this.expando][b];916 }, access: function (a, b, c) {917 var d;918 return void 0 === b || b && "string" == typeof b && void 0 === c ? (d = this.get(a, b), void 0 !== d ? d : this.get(a, n.camelCase(b))) : (this.set(a, b, c), void 0 !== c ? c : b);919 }, remove: function (a, b) {920 var c, d, e, f = a[this.expando];921 if (void 0 !== f) {922 if (void 0 === b) this.register(a); else {923 n.isArray(b) ? d = b.concat(b.map(n.camelCase)) : (e = n.camelCase(b), b in f ? d = [b, e] : (d = e, d = d in f ? [d] : d.match(G) || [])), c = d.length;924 while (c--) delete f[d[c]];925 }926 (void 0 === b || n.isEmptyObject(f)) && (a.nodeType ? a[this.expando] = void 0 : delete a[this.expando]);927 }928 }, hasData: function (a) {929 var b = a[this.expando];930 return void 0 !== b && !n.isEmptyObject(b);931 }932 };933 var N = new M, O = new M, P = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, Q = /[A-Z]/g;934 function R(a, b, c) {935 var d;936 if (void 0 === c && 1 === a.nodeType) if (d = "data-" + b.replace(Q, "-$&").toLowerCase(), c = a.getAttribute(d), "string" == typeof c) {937 try {938 c = "true" === c ? !0 : "false" === c ? !1 : "null" === c ? null : +c + "" === c ? +c : P.test(c) ? n.parseJSON(c) : c;939 } catch (e) {940 }941 O.set(a, b, c);942 } else c = void 0;943 return c;944 }945 n.extend({946 hasData: function (a) {947 return O.hasData(a) || N.hasData(a);948 }, data: function (a, b, c) {949 return O.access(a, b, c);950 }, removeData: function (a, b) {951 O.remove(a, b);952 }, _data: function (a, b, c) {953 return N.access(a, b, c);954 }, _removeData: function (a, b) {955 N.remove(a, b);956 }957 }), n.fn.extend({958 data: function (a, b) {959 var c, d, e, f = this[0], g = f && f.attributes;960 if (void 0 === a) {961 if (this.length && (e = O.get(f), 1 === f.nodeType && !N.get(f, "hasDataAttrs"))) {962 c = g.length;963 while (c--) g[c] && (d = g[c].name, 0 === d.indexOf("data-") && (d = n.camelCase(d.slice(5)), R(f, d, e[d])));964 N.set(f, "hasDataAttrs", !0);965 }966 return e;967 }968 return "object" == typeof a ? this.each(function () {969 O.set(this, a);970 }) : K(this, function (b) {971 var c, d;972 if (f && void 0 === b) {973 if (c = O.get(f, a) || O.get(f, a.replace(Q, "-$&").toLowerCase()), void 0 !== c) return c;974 if (d = n.camelCase(a), c = O.get(f, d), void 0 !== c) return c;975 if (c = R(f, d, void 0), void 0 !== c) return c;976 } else d = n.camelCase(a), this.each(function () {977 var c = O.get(this, d);978 O.set(this, d, b), a.indexOf("-") > -1 && void 0 !== c && O.set(this, a, b);979 });980 }, null, b, arguments.length > 1, null, !0);981 }, removeData: function (a) {982 return this.each(function () {983 O.remove(this, a);984 });985 }986 }), n.extend({987 queue: function (a, b, c) {988 var d;989 return a ? (b = (b || "fx") + "queue", d = N.get(a, b), c && (!d || n.isArray(c) ? d = N.access(a, b, n.makeArray(c)) : d.push(c)), d || []) : void 0;990 }, dequeue: function (a, b) {991 b = b || "fx";992 var c = n.queue(a, b), d = c.length, e = c.shift(), f = n._queueHooks(a, b), g = function () {993 n.dequeue(a, b);994 };995 "inprogress" === e && (e = c.shift(), d--), e && ("fx" === b && c.unshift("inprogress"), delete f.stop, e.call(a, g, f)), !d && f && f.empty.fire();996 }, _queueHooks: function (a, b) {997 var c = b + "queueHooks";998 return N.get(a, c) || N.access(a, c, {999 empty: n.Callbacks("once memory").add(function () {1000 N.remove(a, [b + "queue", c]);1001 })1002 });1003 }1004 }), n.fn.extend({1005 queue: function (a, b) {1006 var c = 2;1007 return "string" != typeof a && (b = a, a = "fx", c--), arguments.length < c ? n.queue(this[0], a) : void 0 === b ? this : this.each(function () {1008 var c = n.queue(this, a, b);1009 n._queueHooks(this, a), "fx" === a && "inprogress" !== c[0] && n.dequeue(this, a);1010 });1011 }, dequeue: function (a) {1012 return this.each(function () {1013 n.dequeue(this, a);1014 });1015 }, clearQueue: function (a) {1016 return this.queue(a || "fx", []);1017 }, promise: function (a, b) {1018 var c, d = 1, e = n.Deferred(), f = this, g = this.length, h = function () {1019 --d || e.resolveWith(f, [f]);1020 };1021 "string" != typeof a && (b = a, a = void 0), a = a || "fx";1022 while (g--) c = N.get(f[g], a + "queueHooks"), c && c.empty && (d++, c.empty.add(h));1023 return h(), e.promise(b);1024 }1025 });1026 var S = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, T = new RegExp("^(?:([+-])=|)(" + S + ")([a-z%]*)$", "i"),1027 U = ["Top", "Right", "Bottom", "Left"], V = function (a, b) {1028 return a = b || a, "none" === n.css(a, "display") || !n.contains(a.ownerDocument, a);1029 };1030 function W(a, b, c, d) {1031 var e, f = 1, g = 20, h = d ? function () {1032 return d.cur();1033 } : function () {1034 return n.css(a, b, "");1035 }, i = h(), j = c && c[3] || (n.cssNumber[b] ? "" : "px"),1036 k = (n.cssNumber[b] || "px" !== j && +i) && T.exec(n.css(a, b));1037 if (k && k[3] !== j) {1038 j = j || k[3], c = c || [], k = +i || 1;1039 do f = f || ".5", k /= f, n.style(a, b, k + j); while (f !== (f = h() / i) && 1 !== f && --g);1040 }1041 return c && (k = +k || +i || 0, e = c[1] ? k + (c[1] + 1) * c[2] : +c[2], d && (d.unit = j, d.start = k, d.end = e)), e;1042 }1043 var X = /^(?:checkbox|radio)$/i, Y = /<([\w:-]+)/, Z = /^$|\/(?:java|ecma)script/i, $ = {1044 option: [1, "<select multiple='multiple'>", "</select>"],1045 thead: [1, "<table>", "</table>"],1046 col: [2, "<table><colgroup>", "</colgroup></table>"],1047 tr: [2, "<table><tbody>", "</tbody></table>"],1048 td: [3, "<table><tbody><tr>", "</tr></tbody></table>"],1049 _default: [0, "", ""]1050 };1051 $.optgroup = $.option, $.tbody = $.tfoot = $.colgroup = $.caption = $.thead, $.th = $.td;1052 function _(a, b) {1053 var c = "undefined" != typeof a.getElementsByTagName ? a.getElementsByTagName(b || "*") : "undefined" != typeof a.querySelectorAll ? a.querySelectorAll(b || "*") : [];1054 return void 0 === b || b && n.nodeName(a, b) ? n.merge([a], c) : c;1055 }1056 function aa(a, b) {1057 for (var c = 0, d = a.length; d > c; c++) N.set(a[c], "globalEval", !b || N.get(b[c], "globalEval"));1058 }1059 var ba = /<|&#?\w+;/;1060 function ca(a, b, c, d, e) {1061 for (var f, g, h, i, j, k, l = b.createDocumentFragment(), m = [], o = 0, p = a.length; p > o; o++) if (f = a[o], f || 0 === f) if ("object" === n.type(f)) n.merge(m, f.nodeType ? [f] : f); else if (ba.test(f)) {1062 g = g || l.appendChild(b.createElement("div")), h = (Y.exec(f) || ["", ""])[1].toLowerCase(), i = $[h] || $._default, g.innerHTML = i[1] + n.htmlPrefilter(f) + i[2], k = i[0];1063 while (k--) g = g.lastChild;1064 n.merge(m, g.childNodes), g = l.firstChild, g.textContent = "";1065 } else m.push(b.createTextNode(f));1066 l.textContent = "", o = 0;1067 while (f = m[o++]) if (d && n.inArray(f, d) > -1) e && e.push(f); else if (j = n.contains(f.ownerDocument, f), g = _(l.appendChild(f), "script"), j && aa(g), c) {1068 k = 0;1069 while (f = g[k++]) Z.test(f.type || "") && c.push(f);1070 }1071 return l;1072 }1073 !function () {1074 var a = d.createDocumentFragment(), b = a.appendChild(d.createElement("div")), c = d.createElement("input");1075 c.setAttribute("type", "radio"), c.setAttribute("checked", "checked"), c.setAttribute("name", "t"), b.appendChild(c), l.checkClone = b.cloneNode(!0).cloneNode(!0).lastChild.checked, b.innerHTML = "<textarea>x</textarea>", l.noCloneChecked = !!b.cloneNode(!0).lastChild.defaultValue;1076 }();1077 var da = /^key/, ea = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, fa = /^([^.]*)(?:\.(.+)|)/;1078 function ga() {1079 return !0;1080 }1081 function ha() {1082 return !1;1083 }1084 function ia() {1085 try {1086 return d.activeElement;1087 } catch (a) {1088 }1089 }1090 function ja(a, b, c, d, e, f) {1091 var g, h;1092 if ("object" == typeof b) {1093 "string" != typeof c && (d = d || c, c = void 0);1094 for (h in b) ja(a, h, c, d, b[h], f);1095 return a;1096 }1097 if (null == d && null == e ? (e = c, d = c = void 0) : null == e && ("string" == typeof c ? (e = d, d = void 0) : (e = d, d = c, c = void 0)), e === !1) e = ha; else if (!e) return a;1098 return 1 === f && (g = e, e = function (a) {1099 return n().off(a), g.apply(this, arguments);1100 }, e.guid = g.guid || (g.guid = n.guid++)), a.each(function () {1101 n.event.add(this, b, e, d, c);1102 });1103 }1104 n.event = {1105 global: {},1106 add: function (a, b, c, d, e) {1107 var f, g, h, i, j, k, l, m, o, p, q, r = N.get(a);1108 if (r) {1109 c.handler && (f = c, c = f.handler, e = f.selector), c.guid || (c.guid = n.guid++), (i = r.events) || (i = r.events = {}), (g = r.handle) || (g = r.handle = function (b) {1110 return "undefined" != typeof n && n.event.triggered !== b.type ? n.event.dispatch.apply(a, arguments) : void 0;1111 }), b = (b || "").match(G) || [""], j = b.length;1112 while (j--) h = fa.exec(b[j]) || [], o = q = h[1], p = (h[2] || "").split(".").sort(), o && (l = n.event.special[o] || {}, o = (e ? l.delegateType : l.bindType) || o, l = n.event.special[o] || {}, k = n.extend({1113 type: o,1114 origType: q,1115 data: d,1116 handler: c,1117 guid: c.guid,1118 selector: e,1119 needsContext: e && n.expr.match.needsContext.test(e),1120 namespace: p.join(".")1121 }, f), (m = i[o]) || (m = i[o] = [], m.delegateCount = 0, l.setup && l.setup.call(a, d, p, g) !== !1 || a.addEventListener && a.addEventListener(o, g)), l.add && (l.add.call(a, k), k.handler.guid || (k.handler.guid = c.guid)), e ? m.splice(m.delegateCount++, 0, k) : m.push(k), n.event.global[o] = !0);1122 }1123 },1124 remove: function (a, b, c, d, e) {1125 var f, g, h, i, j, k, l, m, o, p, q, r = N.hasData(a) && N.get(a);1126 if (r && (i = r.events)) {1127 b = (b || "").match(G) || [""], j = b.length;1128 while (j--) if (h = fa.exec(b[j]) || [], o = q = h[1], p = (h[2] || "").split(".").sort(), o) {1129 l = n.event.special[o] || {}, o = (d ? l.delegateType : l.bindType) || o, m = i[o] || [], h = h[2] && new RegExp("(^|\\.)" + p.join("\\.(?:.*\\.|)") + "(\\.|$)"), g = f = m.length;1130 while (f--) k = m[f], !e && q !== k.origType || c && c.guid !== k.guid || h && !h.test(k.namespace) || d && d !== k.selector && ("**" !== d || !k.selector) || (m.splice(f, 1), k.selector && m.delegateCount--, l.remove && l.remove.call(a, k));1131 g && !m.length && (l.teardown && l.teardown.call(a, p, r.handle) !== !1 || n.removeEvent(a, o, r.handle), delete i[o]);1132 } else for (o in i) n.event.remove(a, o + b[j], c, d, !0);1133 n.isEmptyObject(i) && N.remove(a, "handle events");1134 }1135 },1136 dispatch: function (a) {1137 a = n.event.fix(a);1138 var b, c, d, f, g, h = [], i = e.call(arguments), j = (N.get(this, "events") || {})[a.type] || [],1139 k = n.event.special[a.type] || {};1140 if (i[0] = a, a.delegateTarget = this, !k.preDispatch || k.preDispatch.call(this, a) !== !1) {1141 h = n.event.handlers.call(this, a, j), b = 0;1142 while ((f = h[b++]) && !a.isPropagationStopped()) {1143 a.currentTarget = f.elem, c = 0;1144 while ((g = f.handlers[c++]) && !a.isImmediatePropagationStopped()) a.rnamespace && !a.rnamespace.test(g.namespace) || (a.handleObj = g, a.data = g.data, d = ((n.event.special[g.origType] || {}).handle || g.handler).apply(f.elem, i), void 0 !== d && (a.result = d) === !1 && (a.preventDefault(), a.stopPropagation()));1145 }1146 return k.postDispatch && k.postDispatch.call(this, a), a.result;1147 }1148 },1149 handlers: function (a, b) {1150 var c, d, e, f, g = [], h = b.delegateCount, i = a.target;1151 if (h && i.nodeType && ("click" !== a.type || isNaN(a.button) || a.button < 1)) for (; i !== this; i = i.parentNode || this) if (1 === i.nodeType && (i.disabled !== !0 || "click" !== a.type)) {1152 for (d = [], c = 0; h > c; c++) f = b[c], e = f.selector + " ", void 0 === d[e] && (d[e] = f.needsContext ? n(e, this).index(i) > -1 : n.find(e, this, null, [i]).length), d[e] && d.push(f);1153 d.length && g.push({elem: i, handlers: d});1154 }1155 return h < b.length && g.push({elem: this, handlers: b.slice(h)}), g;1156 },1157 props: "altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),1158 fixHooks: {},1159 keyHooks: {1160 props: "char charCode key keyCode".split(" "), filter: function (a, b) {1161 return null == a.which && (a.which = null != b.charCode ? b.charCode : b.keyCode), a;1162 }1163 },1164 mouseHooks: {1165 props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),1166 filter: function (a, b) {1167 var c, e, f, g = b.button;1168 return null == a.pageX && null != b.clientX && (c = a.target.ownerDocument || d, e = c.documentElement, f = c.body, a.pageX = b.clientX + (e && e.scrollLeft || f && f.scrollLeft || 0) - (e && e.clientLeft || f && f.clientLeft || 0), a.pageY = b.clientY + (e && e.scrollTop || f && f.scrollTop || 0) - (e && e.clientTop || f && f.clientTop || 0)), a.which || void 0 === g || (a.which = 1 & g ? 1 : 2 & g ? 3 : 4 & g ? 2 : 0), a;1169 }1170 },1171 fix: function (a) {1172 if (a[n.expando]) return a;1173 var b, c, e, f = a.type, g = a, h = this.fixHooks[f];1174 h || (this.fixHooks[f] = h = ea.test(f) ? this.mouseHooks : da.test(f) ? this.keyHooks : {}), e = h.props ? this.props.concat(h.props) : this.props, a = new n.Event(g), b = e.length;1175 while (b--) c = e[b], a[c] = g[c];1176 return a.target || (a.target = d), 3 === a.target.nodeType && (a.target = a.target.parentNode), h.filter ? h.filter(a, g) : a;1177 },1178 special: {1179 load: {noBubble: !0}, focus: {1180 trigger: function () {1181 return this !== ia() && this.focus ? (this.focus(), !1) : void 0;1182 }, delegateType: "focusin"1183 }, blur: {1184 trigger: function () {1185 return this === ia() && this.blur ? (this.blur(), !1) : void 0;1186 }, delegateType: "focusout"1187 }, click: {1188 trigger: function () {1189 return "checkbox" === this.type && this.click && n.nodeName(this, "input") ? (this.click(), !1) : void 0;1190 }, _default: function (a) {1191 return n.nodeName(a.target, "a");1192 }1193 }, beforeunload: {1194 postDispatch: function (a) {1195 void 0 !== a.result && a.originalEvent && (a.originalEvent.returnValue = a.result);1196 }1197 }1198 }1199 }, n.removeEvent = function (a, b, c) {1200 a.removeEventListener && a.removeEventListener(b, c);1201 }, n.Event = function (a, b) {1202 return this instanceof n.Event ? (a && a.type ? (this.originalEvent = a, this.type = a.type, this.isDefaultPrevented = a.defaultPrevented || void 0 === a.defaultPrevented && a.returnValue === !1 ? ga : ha) : this.type = a, b && n.extend(this, b), this.timeStamp = a && a.timeStamp || n.now(), void(this[n.expando] = !0)) : new n.Event(a, b);1203 }, n.Event.prototype = {1204 constructor: n.Event,1205 isDefaultPrevented: ha,1206 isPropagationStopped: ha,1207 isImmediatePropagationStopped: ha,1208 isSimulated: !1,1209 preventDefault: function () {1210 var a = this.originalEvent;1211 this.isDefaultPrevented = ga, a && !this.isSimulated && a.preventDefault();1212 },1213 stopPropagation: function () {1214 var a = this.originalEvent;1215 this.isPropagationStopped = ga, a && !this.isSimulated && a.stopPropagation();1216 },1217 stopImmediatePropagation: function () {1218 var a = this.originalEvent;1219 this.isImmediatePropagationStopped = ga, a && !this.isSimulated && a.stopImmediatePropagation(), this.stopPropagation();1220 }1221 }, n.each({1222 mouseenter: "mouseover",1223 mouseleave: "mouseout",1224 pointerenter: "pointerover",1225 pointerleave: "pointerout"1226 }, function (a, b) {1227 n.event.special[a] = {1228 delegateType: b, bindType: b, handle: function (a) {1229 var c, d = this, e = a.relatedTarget, f = a.handleObj;1230 return e && (e === d || n.contains(d, e)) || (a.type = f.origType, c = f.handler.apply(this, arguments), a.type = b), c;1231 }1232 };1233 }), n.fn.extend({1234 on: function (a, b, c, d) {1235 return ja(this, a, b, c, d);1236 }, one: function (a, b, c, d) {1237 return ja(this, a, b, c, d, 1);1238 }, off: function (a, b, c) {1239 var d, e;1240 if (a && a.preventDefault && a.handleObj) return d = a.handleObj, n(a.delegateTarget).off(d.namespace ? d.origType + "." + d.namespace : d.origType, d.selector, d.handler), this;1241 if ("object" == typeof a) {1242 for (e in a) this.off(e, b, a[e]);1243 return this;1244 }1245 return b !== !1 && "function" != typeof b || (c = b, b = void 0), c === !1 && (c = ha), this.each(function () {1246 n.event.remove(this, a, c, b);1247 });1248 }1249 });1250 var ka = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi, la = /<script|<style|<link/i,1251 ma = /checked\s*(?:[^=]|=\s*.checked.)/i, na = /^true\/(.*)/, oa = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;1252 function pa(a, b) {1253 return n.nodeName(a, "table") && n.nodeName(11 !== b.nodeType ? b : b.firstChild, "tr") ? a.getElementsByTagName("tbody")[0] || a.appendChild(a.ownerDocument.createElement("tbody")) : a;1254 }1255 function qa(a) {1256 return a.type = (null !== a.getAttribute("type")) + "/" + a.type, a;1257 }1258 function ra(a) {1259 var b = na.exec(a.type);1260 return b ? a.type = b[1] : a.removeAttribute("type"), a;1261 }1262 function sa(a, b) {1263 var c, d, e, f, g, h, i, j;1264 if (1 === b.nodeType) {1265 if (N.hasData(a) && (f = N.access(a), g = N.set(b, f), j = f.events)) {1266 delete g.handle, g.events = {};1267 for (e in j) for (c = 0, d = j[e].length; d > c; c++) n.event.add(b, e, j[e][c]);1268 }1269 O.hasData(a) && (h = O.access(a), i = n.extend({}, h), O.set(b, i));1270 }1271 }1272 function ta(a, b) {1273 var c = b.nodeName.toLowerCase();1274 "input" === c && X.test(a.type) ? b.checked = a.checked : "input" !== c && "textarea" !== c || (b.defaultValue = a.defaultValue);1275 }1276 function ua(a, b, c, d) {1277 b = f.apply([], b);1278 var e, g, h, i, j, k, m = 0, o = a.length, p = o - 1, q = b[0], r = n.isFunction(q);1279 if (r || o > 1 && "string" == typeof q && !l.checkClone && ma.test(q)) return a.each(function (e) {1280 var f = a.eq(e);1281 r && (b[0] = q.call(this, e, f.html())), ua(f, b, c, d);1282 });1283 if (o && (e = ca(b, a[0].ownerDocument, !1, a, d), g = e.firstChild, 1 === e.childNodes.length && (e = g), g || d)) {1284 for (h = n.map(_(e, "script"), qa), i = h.length; o > m; m++) j = e, m !== p && (j = n.clone(j, !0, !0), i && n.merge(h, _(j, "script"))), c.call(a[m], j, m);1285 if (i) for (k = h[h.length - 1].ownerDocument, n.map(h, ra), m = 0; i > m; m++) j = h[m], Z.test(j.type || "") && !N.access(j, "globalEval") && n.contains(k, j) && (j.src ? n._evalUrl && n._evalUrl(j.src) : n.globalEval(j.textContent.replace(oa, "")));1286 }1287 return a;1288 }1289 function va(a, b, c) {1290 for (var d, e = b ? n.filter(b, a) : a, f = 0; null != (d = e[f]); f++) c || 1 !== d.nodeType || n.cleanData(_(d)), d.parentNode && (c && n.contains(d.ownerDocument, d) && aa(_(d, "script")), d.parentNode.removeChild(d));1291 return a;1292 }1293 n.extend({1294 htmlPrefilter: function (a) {1295 return a.replace(ka, "<$1></$2>");1296 }, clone: function (a, b, c) {1297 var d, e, f, g, h = a.cloneNode(!0), i = n.contains(a.ownerDocument, a);1298 if (!(l.noCloneChecked || 1 !== a.nodeType && 11 !== a.nodeType || n.isXMLDoc(a))) for (g = _(h), f = _(a), d = 0, e = f.length; e > d; d++) ta(f[d], g[d]);1299 if (b) if (c) for (f = f || _(a), g = g || _(h), d = 0, e = f.length; e > d; d++) sa(f[d], g[d]); else sa(a, h);1300 return g = _(h, "script"), g.length > 0 && aa(g, !i && _(a, "script")), h;1301 }, cleanData: function (a) {1302 for (var b, c, d, e = n.event.special, f = 0; void 0 !== (c = a[f]); f++) if (L(c)) {1303 if (b = c[N.expando]) {1304 if (b.events) for (d in b.events) e[d] ? n.event.remove(c, d) : n.removeEvent(c, d, b.handle);1305 c[N.expando] = void 0;1306 }1307 c[O.expando] && (c[O.expando] = void 0);1308 }1309 }1310 }), n.fn.extend({1311 domManip: ua, detach: function (a) {1312 return va(this, a, !0);1313 }, remove: function (a) {1314 return va(this, a);1315 }, text: function (a) {1316 return K(this, function (a) {1317 return void 0 === a ? n.text(this) : this.empty().each(function () {1318 1 !== this.nodeType && 11 !== this.nodeType && 9 !== this.nodeType || (this.textContent = a);1319 });1320 }, null, a, arguments.length);1321 }, append: function () {1322 return ua(this, arguments, function (a) {1323 if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) {1324 var b = pa(this, a);1325 b.appendChild(a);1326 }1327 });1328 }, prepend: function () {1329 return ua(this, arguments, function (a) {1330 if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) {1331 var b = pa(this, a);1332 b.insertBefore(a, b.firstChild);1333 }1334 });1335 }, before: function () {1336 return ua(this, arguments, function (a) {1337 this.parentNode && this.parentNode.insertBefore(a, this);1338 });1339 }, after: function () {1340 return ua(this, arguments, function (a) {1341 this.parentNode && this.parentNode.insertBefore(a, this.nextSibling);1342 });1343 }, empty: function () {1344 for (var a, b = 0; null != (a = this[b]); b++) 1 === a.nodeType && (n.cleanData(_(a, !1)), a.textContent = "");1345 return this;1346 }, clone: function (a, b) {1347 return a = null == a ? !1 : a, b = null == b ? a : b, this.map(function () {1348 return n.clone(this, a, b);1349 });1350 }, html: function (a) {1351 return K(this, function (a) {1352 var b = this[0] || {}, c = 0, d = this.length;1353 if (void 0 === a && 1 === b.nodeType) return b.innerHTML;1354 if ("string" == typeof a && !la.test(a) && !$[(Y.exec(a) || ["", ""])[1].toLowerCase()]) {1355 a = n.htmlPrefilter(a);1356 try {1357 for (; d > c; c++) b = this[c] || {}, 1 === b.nodeType && (n.cleanData(_(b, !1)), b.innerHTML = a);1358 b = 0;1359 } catch (e) {1360 }1361 }1362 b && this.empty().append(a);1363 }, null, a, arguments.length);1364 }, replaceWith: function () {1365 var a = [];1366 return ua(this, arguments, function (b) {1367 var c = this.parentNode;1368 n.inArray(this, a) < 0 && (n.cleanData(_(this)), c && c.replaceChild(b, this));1369 }, a);1370 }1371 }), n.each({1372 appendTo: "append",1373 prependTo: "prepend",1374 insertBefore: "before",1375 insertAfter: "after",1376 replaceAll: "replaceWith"1377 }, function (a, b) {1378 n.fn[a] = function (a) {1379 for (var c, d = [], e = n(a), f = e.length - 1, h = 0; f >= h; h++) c = h === f ? this : this.clone(!0), n(e[h])[b](c), g.apply(d, c.get());1380 return this.pushStack(d);1381 };1382 });1383 var wa, xa = {HTML: "block", BODY: "block"};1384 function ya(a, b) {1385 var c = n(b.createElement(a)).appendTo(b.body), d = n.css(c[0], "display");1386 return c.detach(), d;1387 }1388 function za(a) {1389 var b = d, c = xa[a];1390 return c || (c = ya(a, b), "none" !== c && c || (wa = (wa || n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement), b = wa[0].contentDocument, b.write(), b.close(), c = ya(a, b), wa.detach()), xa[a] = c), c;1391 }1392 var Aa = /^margin/, Ba = new RegExp("^(" + S + ")(?!px)[a-z%]+$", "i"), Ca = function (b) {1393 var c = b.ownerDocument.defaultView;1394 return c && c.opener || (c = a), c.getComputedStyle(b);1395 }, Da = function (a, b, c, d) {1396 var e, f, g = {};1397 for (f in b) g[f] = a.style[f], a.style[f] = b[f];1398 e = c.apply(a, d || []);1399 for (f in b) a.style[f] = g[f];1400 return e;1401 }, Ea = d.documentElement;1402 !function () {1403 var b, c, e, f, g = d.createElement("div"), h = d.createElement("div");1404 if (h.style) {1405 h.style.backgroundClip = "content-box", h.cloneNode(!0).style.backgroundClip = "", l.clearCloneStyle = "content-box" === h.style.backgroundClip, g.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute", g.appendChild(h);1406 function i() {1407 h.style.cssText = "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%", h.innerHTML = "", Ea.appendChild(g);1408 var d = a.getComputedStyle(h);1409 b = "1%" !== d.top, f = "2px" === d.marginLeft, c = "4px" === d.width, h.style.marginRight = "50%", e = "4px" === d.marginRight, Ea.removeChild(g);1410 }1411 n.extend(l, {1412 pixelPosition: function () {1413 return i(), b;1414 }, boxSizingReliable: function () {1415 return null == c && i(), c;1416 }, pixelMarginRight: function () {1417 return null == c && i(), e;1418 }, reliableMarginLeft: function () {1419 return null == c && i(), f;1420 }, reliableMarginRight: function () {1421 var b, c = h.appendChild(d.createElement("div"));1422 return c.style.cssText = h.style.cssText = "-webkit-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0", c.style.marginRight = c.style.width = "0", h.style.width = "1px", Ea.appendChild(g), b = !parseFloat(a.getComputedStyle(c).marginRight), Ea.removeChild(g), h.removeChild(c), b;1423 }1424 });1425 }1426 }();1427 function Fa(a, b, c) {1428 var d, e, f, g, h = a.style;1429 return c = c || Ca(a), g = c ? c.getPropertyValue(b) || c[b] : void 0, "" !== g && void 0 !== g || n.contains(a.ownerDocument, a) || (g = n.style(a, b)), c && !l.pixelMarginRight() && Ba.test(g) && Aa.test(b) && (d = h.width, e = h.minWidth, f = h.maxWidth, h.minWidth = h.maxWidth = h.width = g, g = c.width, h.width = d, h.minWidth = e, h.maxWidth = f), void 0 !== g ? g + "" : g;1430 }1431 function Ga(a, b) {1432 return {1433 get: function () {1434 return a() ? void delete this.get : (this.get = b).apply(this, arguments);1435 }1436 };1437 }1438 var Ha = /^(none|table(?!-c[ea]).+)/, Ia = {position: "absolute", visibility: "hidden", display: "block"},1439 Ja = {letterSpacing: "0", fontWeight: "400"}, Ka = ["Webkit", "O", "Moz", "ms"],1440 La = d.createElement("div").style;1441 function Ma(a) {1442 if (a in La) return a;1443 var b = a[0].toUpperCase() + a.slice(1), c = Ka.length;1444 while (c--) if (a = Ka[c] + b, a in La) return a;1445 }1446 function Na(a, b, c) {1447 var d = T.exec(b);1448 return d ? Math.max(0, d[2] - (c || 0)) + (d[3] || "px") : b;1449 }1450 function Oa(a, b, c, d, e) {1451 for (var f = c === (d ? "border" : "content") ? 4 : "width" === b ? 1 : 0, g = 0; 4 > f; f += 2) "margin" === c && (g += n.css(a, c + U[f], !0, e)), d ? ("content" === c && (g -= n.css(a, "padding" + U[f], !0, e)), "margin" !== c && (g -= n.css(a, "border" + U[f] + "Width", !0, e))) : (g += n.css(a, "padding" + U[f], !0, e), "padding" !== c && (g += n.css(a, "border" + U[f] + "Width", !0, e)));1452 return g;1453 }1454 function Pa(a, b, c) {1455 var d = !0, e = "width" === b ? a.offsetWidth : a.offsetHeight, f = Ca(a),1456 g = "border-box" === n.css(a, "boxSizing", !1, f);1457 if (0 >= e || null == e) {1458 if (e = Fa(a, b, f), (0 > e || null == e) && (e = a.style[b]), Ba.test(e)) return e;1459 d = g && (l.boxSizingReliable() || e === a.style[b]), e = parseFloat(e) || 0;1460 }1461 return e + Oa(a, b, c || (g ? "border" : "content"), d, f) + "px";1462 }1463 function Qa(a, b) {1464 for (var c, d, e, f = [], g = 0, h = a.length; h > g; g++) d = a[g], d.style && (f[g] = N.get(d, "olddisplay"), c = d.style.display, b ? (f[g] || "none" !== c || (d.style.display = ""), "" === d.style.display && V(d) && (f[g] = N.access(d, "olddisplay", za(d.nodeName)))) : (e = V(d), "none" === c && e || N.set(d, "olddisplay", e ? c : n.css(d, "display"))));1465 for (g = 0; h > g; g++) d = a[g], d.style && (b && "none" !== d.style.display && "" !== d.style.display || (d.style.display = b ? f[g] || "" : "none"));1466 return a;1467 }1468 n.extend({1469 cssHooks: {1470 opacity: {1471 get: function (a, b) {1472 if (b) {1473 var c = Fa(a, "opacity");1474 return "" === c ? "1" : c;1475 }1476 }1477 }1478 },1479 cssNumber: {1480 animationIterationCount: !0,1481 columnCount: !0,1482 fillOpacity: !0,1483 flexGrow: !0,1484 flexShrink: !0,1485 fontWeight: !0,1486 lineHeight: !0,1487 opacity: !0,1488 order: !0,1489 orphans: !0,1490 widows: !0,1491 zIndex: !0,1492 zoom: !01493 },1494 cssProps: {"float": "cssFloat"},1495 style: function (a, b, c, d) {1496 if (a && 3 !== a.nodeType && 8 !== a.nodeType && a.style) {1497 var e, f, g, h = n.camelCase(b), i = a.style;1498 return b = n.cssProps[h] || (n.cssProps[h] = Ma(h) || h), g = n.cssHooks[b] || n.cssHooks[h], void 0 === c ? g && "get" in g && void 0 !== (e = g.get(a, !1, d)) ? e : i[b] : (f = typeof c, "string" === f && (e = T.exec(c)) && e[1] && (c = W(a, b, e), f = "number"), null != c && c === c && ("number" === f && (c += e && e[3] || (n.cssNumber[h] ? "" : "px")), l.clearCloneStyle || "" !== c || 0 !== b.indexOf("background") || (i[b] = "inherit"), g && "set" in g && void 0 === (c = g.set(a, c, d)) || (i[b] = c)), void 0);1499 }1500 },1501 css: function (a, b, c, d) {1502 var e, f, g, h = n.camelCase(b);1503 return b = n.cssProps[h] || (n.cssProps[h] = Ma(h) || h), g = n.cssHooks[b] || n.cssHooks[h], g && "get" in g && (e = g.get(a, !0, c)), void 0 === e && (e = Fa(a, b, d)), "normal" === e && b in Ja && (e = Ja[b]), "" === c || c ? (f = parseFloat(e), c === !0 || isFinite(f) ? f || 0 : e) : e;1504 }1505 }), n.each(["height", "width"], function (a, b) {1506 n.cssHooks[b] = {1507 get: function (a, c, d) {1508 return c ? Ha.test(n.css(a, "display")) && 0 === a.offsetWidth ? Da(a, Ia, function () {1509 return Pa(a, b, d);1510 }) : Pa(a, b, d) : void 0;1511 }, set: function (a, c, d) {1512 var e, f = d && Ca(a), g = d && Oa(a, b, d, "border-box" === n.css(a, "boxSizing", !1, f), f);1513 return g && (e = T.exec(c)) && "px" !== (e[3] || "px") && (a.style[b] = c, c = n.css(a, b)), Na(a, c, g);1514 }1515 };1516 }), n.cssHooks.marginLeft = Ga(l.reliableMarginLeft, function (a, b) {1517 return b ? (parseFloat(Fa(a, "marginLeft")) || a.getBoundingClientRect().left - Da(a, {marginLeft: 0}, function () {1518 return a.getBoundingClientRect().left;1519 })) + "px" : void 0;1520 }), n.cssHooks.marginRight = Ga(l.reliableMarginRight, function (a, b) {1521 return b ? Da(a, {display: "inline-block"}, Fa, [a, "marginRight"]) : void 0;1522 }), n.each({margin: "", padding: "", border: "Width"}, function (a, b) {1523 n.cssHooks[a + b] = {1524 expand: function (c) {1525 for (var d = 0, e = {}, f = "string" == typeof c ? c.split(" ") : [c]; 4 > d; d++) e[a + U[d] + b] = f[d] || f[d - 2] || f[0];1526 return e;1527 }1528 }, Aa.test(a) || (n.cssHooks[a + b].set = Na);1529 }), n.fn.extend({1530 css: function (a, b) {1531 return K(this, function (a, b, c) {1532 var d, e, f = {}, g = 0;1533 if (n.isArray(b)) {1534 for (d = Ca(a), e = b.length; e > g; g++) f[b[g]] = n.css(a, b[g], !1, d);1535 return f;1536 }1537 return void 0 !== c ? n.style(a, b, c) : n.css(a, b);1538 }, a, b, arguments.length > 1);1539 }, show: function () {1540 return Qa(this, !0);1541 }, hide: function () {1542 return Qa(this);1543 }, toggle: function (a) {1544 return "boolean" == typeof a ? a ? this.show() : this.hide() : this.each(function () {1545 V(this) ? n(this).show() : n(this).hide();1546 });1547 }1548 });1549 function Ra(a, b, c, d, e) {1550 return new Ra.prototype.init(a, b, c, d, e);1551 }1552 n.Tween = Ra, Ra.prototype = {1553 constructor: Ra, init: function (a, b, c, d, e, f) {1554 this.elem = a, this.prop = c, this.easing = e || n.easing._default, this.options = b, this.start = this.now = this.cur(), this.end = d, this.unit = f || (n.cssNumber[c] ? "" : "px");1555 }, cur: function () {1556 var a = Ra.propHooks[this.prop];1557 return a && a.get ? a.get(this) : Ra.propHooks._default.get(this);1558 }, run: function (a) {1559 var b, c = Ra.propHooks[this.prop];1560 return this.options.duration ? this.pos = b = n.easing[this.easing](a, this.options.duration * a, 0, 1, this.options.duration) : this.pos = b = a, this.now = (this.end - this.start) * b + this.start, this.options.step && this.options.step.call(this.elem, this.now, this), c && c.set ? c.set(this) : Ra.propHooks._default.set(this), this;1561 }1562 }, Ra.prototype.init.prototype = Ra.prototype, Ra.propHooks = {1563 _default: {1564 get: function (a) {1565 var b;1566 return 1 !== a.elem.nodeType || null != a.elem[a.prop] && null == a.elem.style[a.prop] ? a.elem[a.prop] : (b = n.css(a.elem, a.prop, ""), b && "auto" !== b ? b : 0);1567 }, set: function (a) {1568 n.fx.step[a.prop] ? n.fx.step[a.prop](a) : 1 !== a.elem.nodeType || null == a.elem.style[n.cssProps[a.prop]] && !n.cssHooks[a.prop] ? a.elem[a.prop] = a.now : n.style(a.elem, a.prop, a.now + a.unit);1569 }1570 }1571 }, Ra.propHooks.scrollTop = Ra.propHooks.scrollLeft = {1572 set: function (a) {1573 a.elem.nodeType && a.elem.parentNode && (a.elem[a.prop] = a.now);1574 }1575 }, n.easing = {1576 linear: function (a) {1577 return a;1578 }, swing: function (a) {1579 return .5 - Math.cos(a * Math.PI) / 2;1580 }, _default: "swing"1581 }, n.fx = Ra.prototype.init, n.fx.step = {};1582 var Sa, Ta, Ua = /^(?:toggle|show|hide)$/, Va = /queueHooks$/;1583 function Wa() {1584 return a.setTimeout(function () {1585 Sa = void 0;1586 }), Sa = n.now();1587 }1588 function Xa(a, b) {1589 var c, d = 0, e = {height: a};1590 for (b = b ? 1 : 0; 4 > d; d += 2 - b) c = U[d], e["margin" + c] = e["padding" + c] = a;1591 return b && (e.opacity = e.width = a), e;1592 }1593 function Ya(a, b, c) {1594 for (var d, e = (_a.tweeners[b] || []).concat(_a.tweeners["*"]), f = 0, g = e.length; g > f; f++) if (d = e[f].call(c, b, a)) return d;1595 }1596 function Za(a, b, c) {1597 var d, e, f, g, h, i, j, k, l = this, m = {}, o = a.style, p = a.nodeType && V(a), q = N.get(a, "fxshow");1598 c.queue || (h = n._queueHooks(a, "fx"), null == h.unqueued && (h.unqueued = 0, i = h.empty.fire, h.empty.fire = function () {1599 h.unqueued || i();1600 }), h.unqueued++, l.always(function () {1601 l.always(function () {1602 h.unqueued--, n.queue(a, "fx").length || h.empty.fire();1603 });1604 })), 1 === a.nodeType && ("height" in b || "width" in b) && (c.overflow = [o.overflow, o.overflowX, o.overflowY], j = n.css(a, "display"), k = "none" === j ? N.get(a, "olddisplay") || za(a.nodeName) : j, "inline" === k && "none" === n.css(a, "float") && (o.display = "inline-block")), c.overflow && (o.overflow = "hidden", l.always(function () {1605 o.overflow = c.overflow[0], o.overflowX = c.overflow[1], o.overflowY = c.overflow[2];1606 }));1607 for (d in b) if (e = b[d], Ua.exec(e)) {1608 if (delete b[d], f = f || "toggle" === e, e === (p ? "hide" : "show")) {1609 if ("show" !== e || !q || void 0 === q[d]) continue;1610 p = !0;1611 }1612 m[d] = q && q[d] || n.style(a, d);1613 } else j = void 0;1614 if (n.isEmptyObject(m)) "inline" === ("none" === j ? za(a.nodeName) : j) && (o.display = j); else {1615 q ? "hidden" in q && (p = q.hidden) : q = N.access(a, "fxshow", {}), f && (q.hidden = !p), p ? n(a).show() : l.done(function () {1616 n(a).hide();1617 }), l.done(function () {1618 var b;1619 N.remove(a, "fxshow");1620 for (b in m) n.style(a, b, m[b]);1621 });1622 for (d in m) g = Ya(p ? q[d] : 0, d, l), d in q || (q[d] = g.start, p && (g.end = g.start, g.start = "width" === d || "height" === d ? 1 : 0));1623 }1624 }1625 function $a(a, b) {1626 var c, d, e, f, g;1627 for (c in a) if (d = n.camelCase(c), e = b[d], f = a[c], n.isArray(f) && (e = f[1], f = a[c] = f[0]), c !== d && (a[d] = f, delete a[c]), g = n.cssHooks[d], g && "expand" in g) {1628 f = g.expand(f), delete a[d];1629 for (c in f) c in a || (a[c] = f[c], b[c] = e);1630 } else b[d] = e;1631 }1632 function _a(a, b, c) {1633 var d, e, f = 0, g = _a.prefilters.length, h = n.Deferred().always(function () {1634 delete i.elem;1635 }), i = function () {1636 if (e) return !1;1637 for (var b = Sa || Wa(), c = Math.max(0, j.startTime + j.duration - b), d = c / j.duration || 0, f = 1 - d, g = 0, i = j.tweens.length; i > g; g++) j.tweens[g].run(f);1638 return h.notifyWith(a, [j, f, c]), 1 > f && i ? c : (h.resolveWith(a, [j]), !1);1639 }, j = h.promise({1640 elem: a,1641 props: n.extend({}, b),1642 opts: n.extend(!0, {specialEasing: {}, easing: n.easing._default}, c),1643 originalProperties: b,1644 originalOptions: c,1645 startTime: Sa || Wa(),1646 duration: c.duration,1647 tweens: [],1648 createTween: function (b, c) {1649 var d = n.Tween(a, j.opts, b, c, j.opts.specialEasing[b] || j.opts.easing);1650 return j.tweens.push(d), d;1651 },1652 stop: function (b) {1653 var c = 0, d = b ? j.tweens.length : 0;1654 if (e) return this;1655 for (e = !0; d > c; c++) j.tweens[c].run(1);1656 return b ? (h.notifyWith(a, [j, 1, 0]), h.resolveWith(a, [j, b])) : h.rejectWith(a, [j, b]), this;1657 }1658 }), k = j.props;1659 for ($a(k, j.opts.specialEasing); g > f; f++) if (d = _a.prefilters[f].call(j, a, k, j.opts)) return n.isFunction(d.stop) && (n._queueHooks(j.elem, j.opts.queue).stop = n.proxy(d.stop, d)), d;1660 return n.map(k, Ya, j), n.isFunction(j.opts.start) && j.opts.start.call(a, j), n.fx.timer(n.extend(i, {1661 elem: a,1662 anim: j,1663 queue: j.opts.queue1664 })), j.progress(j.opts.progress).done(j.opts.done, j.opts.complete).fail(j.opts.fail).always(j.opts.always);1665 }1666 n.Animation = n.extend(_a, {1667 tweeners: {1668 "*": [function (a, b) {1669 var c = this.createTween(a, b);1670 return W(c.elem, a, T.exec(b), c), c;1671 }]1672 }, tweener: function (a, b) {1673 n.isFunction(a) ? (b = a, a = ["*"]) : a = a.match(G);1674 for (var c, d = 0, e = a.length; e > d; d++) c = a[d], _a.tweeners[c] = _a.tweeners[c] || [], _a.tweeners[c].unshift(b);1675 }, prefilters: [Za], prefilter: function (a, b) {1676 b ? _a.prefilters.unshift(a) : _a.prefilters.push(a);1677 }1678 }), n.speed = function (a, b, c) {1679 var d = a && "object" == typeof a ? n.extend({}, a) : {1680 complete: c || !c && b || n.isFunction(a) && a,1681 duration: a,1682 easing: c && b || b && !n.isFunction(b) && b1683 };1684 return d.duration = n.fx.off ? 0 : "number" == typeof d.duration ? d.duration : d.duration in n.fx.speeds ? n.fx.speeds[d.duration] : n.fx.speeds._default, null != d.queue && d.queue !== !0 || (d.queue = "fx"), d.old = d.complete, d.complete = function () {1685 n.isFunction(d.old) && d.old.call(this), d.queue && n.dequeue(this, d.queue);1686 }, d;1687 }, n.fn.extend({1688 fadeTo: function (a, b, c, d) {1689 return this.filter(V).css("opacity", 0).show().end().animate({opacity: b}, a, c, d);1690 }, animate: function (a, b, c, d) {1691 var e = n.isEmptyObject(a), f = n.speed(b, c, d), g = function () {1692 var b = _a(this, n.extend({}, a), f);1693 (e || N.get(this, "finish")) && b.stop(!0);1694 };1695 return g.finish = g, e || f.queue === !1 ? this.each(g) : this.queue(f.queue, g);1696 }, stop: function (a, b, c) {1697 var d = function (a) {1698 var b = a.stop;1699 delete a.stop, b(c);1700 };1701 return "string" != typeof a && (c = b, b = a, a = void 0), b && a !== !1 && this.queue(a || "fx", []), this.each(function () {1702 var b = !0, e = null != a && a + "queueHooks", f = n.timers, g = N.get(this);1703 if (e) g[e] && g[e].stop && d(g[e]); else for (e in g) g[e] && g[e].stop && Va.test(e) && d(g[e]);1704 for (e = f.length; e--;) f[e].elem !== this || null != a && f[e].queue !== a || (f[e].anim.stop(c), b = !1, f.splice(e, 1));1705 !b && c || n.dequeue(this, a);1706 });1707 }, finish: function (a) {1708 return a !== !1 && (a = a || "fx"), this.each(function () {1709 var b, c = N.get(this), d = c[a + "queue"], e = c[a + "queueHooks"], f = n.timers, g = d ? d.length : 0;1710 for (c.finish = !0, n.queue(this, a, []), e && e.stop && e.stop.call(this, !0), b = f.length; b--;) f[b].elem === this && f[b].queue === a && (f[b].anim.stop(!0), f.splice(b, 1));1711 for (b = 0; g > b; b++) d[b] && d[b].finish && d[b].finish.call(this);1712 delete c.finish;1713 });1714 }1715 }), n.each(["toggle", "show", "hide"], function (a, b) {1716 var c = n.fn[b];1717 n.fn[b] = function (a, d, e) {1718 return null == a || "boolean" == typeof a ? c.apply(this, arguments) : this.animate(Xa(b, !0), a, d, e);1719 };1720 }), n.each({1721 slideDown: Xa("show"),1722 slideUp: Xa("hide"),1723 slideToggle: Xa("toggle"),1724 fadeIn: {opacity: "show"},1725 fadeOut: {opacity: "hide"},1726 fadeToggle: {opacity: "toggle"}1727 }, function (a, b) {1728 n.fn[a] = function (a, c, d) {1729 return this.animate(b, a, c, d);1730 };1731 }), n.timers = [], n.fx.tick = function () {1732 var a, b = 0, c = n.timers;1733 for (Sa = n.now(); b < c.length; b++) a = c[b], a() || c[b] !== a || c.splice(b--, 1);1734 c.length || n.fx.stop(), Sa = void 0;1735 }, n.fx.timer = function (a) {1736 n.timers.push(a), a() ? n.fx.start() : n.timers.pop();1737 }, n.fx.interval = 13, n.fx.start = function () {1738 Ta || (Ta = a.setInterval(n.fx.tick, n.fx.interval));1739 }, n.fx.stop = function () {1740 a.clearInterval(Ta), Ta = null;1741 }, n.fx.speeds = {slow: 600, fast: 200, _default: 400}, n.fn.delay = function (b, c) {1742 return b = n.fx ? n.fx.speeds[b] || b : b, c = c || "fx", this.queue(c, function (c, d) {1743 var e = a.setTimeout(c, b);1744 d.stop = function () {1745 a.clearTimeout(e);1746 };1747 });1748 }, function () {1749 var a = d.createElement("input"), b = d.createElement("select"), c = b.appendChild(d.createElement("option"));1750 a.type = "checkbox", l.checkOn = "" !== a.value, l.optSelected = c.selected, b.disabled = !0, l.optDisabled = !c.disabled, a = d.createElement("input"), a.value = "t", a.type = "radio", l.radioValue = "t" === a.value;1751 }();1752 var ab, bb = n.expr.attrHandle;1753 n.fn.extend({1754 attr: function (a, b) {1755 return K(this, n.attr, a, b, arguments.length > 1);1756 }, removeAttr: function (a) {1757 return this.each(function () {1758 n.removeAttr(this, a);1759 });1760 }1761 }), n.extend({1762 attr: function (a, b, c) {1763 var d, e, f = a.nodeType;1764 if (3 !== f && 8 !== f && 2 !== f) return "undefined" == typeof a.getAttribute ? n.prop(a, b, c) : (1 === f && n.isXMLDoc(a) || (b = b.toLowerCase(), e = n.attrHooks[b] || (n.expr.match.bool.test(b) ? ab : void 0)), void 0 !== c ? null === c ? void n.removeAttr(a, b) : e && "set" in e && void 0 !== (d = e.set(a, c, b)) ? d : (a.setAttribute(b, c + ""), c) : e && "get" in e && null !== (d = e.get(a, b)) ? d : (d = n.find.attr(a, b), null == d ? void 0 : d));1765 }, attrHooks: {1766 type: {1767 set: function (a, b) {1768 if (!l.radioValue && "radio" === b && n.nodeName(a, "input")) {1769 var c = a.value;1770 return a.setAttribute("type", b), c && (a.value = c), b;1771 }1772 }1773 }1774 }, removeAttr: function (a, b) {1775 var c, d, e = 0, f = b && b.match(G);1776 if (f && 1 === a.nodeType) while (c = f[e++]) d = n.propFix[c] || c, n.expr.match.bool.test(c) && (a[d] = !1), a.removeAttribute(c);1777 }1778 }), ab = {1779 set: function (a, b, c) {1780 return b === !1 ? n.removeAttr(a, c) : a.setAttribute(c, c), c;1781 }1782 }, n.each(n.expr.match.bool.source.match(/\w+/g), function (a, b) {1783 var c = bb[b] || n.find.attr;1784 bb[b] = function (a, b, d) {1785 var e, f;1786 return d || (f = bb[b], bb[b] = e, e = null != c(a, b, d) ? b.toLowerCase() : null, bb[b] = f), e;1787 };1788 });1789 var cb = /^(?:input|select|textarea|button)$/i, db = /^(?:a|area)$/i;1790 n.fn.extend({1791 prop: function (a, b) {1792 return K(this, n.prop, a, b, arguments.length > 1);1793 }, removeProp: function (a) {1794 return this.each(function () {1795 delete this[n.propFix[a] || a];1796 });1797 }1798 }), n.extend({1799 prop: function (a, b, c) {1800 var d, e, f = a.nodeType;1801 if (3 !== f && 8 !== f && 2 !== f) return 1 === f && n.isXMLDoc(a) || (b = n.propFix[b] || b, e = n.propHooks[b]), void 0 !== c ? e && "set" in e && void 0 !== (d = e.set(a, c, b)) ? d : a[b] = c : e && "get" in e && null !== (d = e.get(a, b)) ? d : a[b];1802 }, propHooks: {1803 tabIndex: {1804 get: function (a) {1805 var b = n.find.attr(a, "tabindex");1806 return b ? parseInt(b, 10) : cb.test(a.nodeName) || db.test(a.nodeName) && a.href ? 0 : -1;1807 }1808 }1809 }, propFix: {"for": "htmlFor", "class": "className"}1810 }), l.optSelected || (n.propHooks.selected = {1811 get: function (a) {1812 var b = a.parentNode;1813 return b && b.parentNode && b.parentNode.selectedIndex, null;1814 }, set: function (a) {1815 var b = a.parentNode;1816 b && (b.selectedIndex, b.parentNode && b.parentNode.selectedIndex);1817 }1818 }), n.each(["tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable"], function () {1819 n.propFix[this.toLowerCase()] = this;1820 });1821 var eb = /[\t\r\n\f]/g;1822 function fb(a) {1823 return a.getAttribute && a.getAttribute("class") || "";1824 }1825 n.fn.extend({1826 addClass: function (a) {1827 var b, c, d, e, f, g, h, i = 0;1828 if (n.isFunction(a)) return this.each(function (b) {1829 n(this).addClass(a.call(this, b, fb(this)));1830 });1831 if ("string" == typeof a && a) {1832 b = a.match(G) || [];1833 while (c = this[i++]) if (e = fb(c), d = 1 === c.nodeType && (" " + e + " ").replace(eb, " ")) {1834 g = 0;1835 while (f = b[g++]) d.indexOf(" " + f + " ") < 0 && (d += f + " ");1836 h = n.trim(d), e !== h && c.setAttribute("class", h);1837 }1838 }1839 return this;1840 }, removeClass: function (a) {1841 var b, c, d, e, f, g, h, i = 0;1842 if (n.isFunction(a)) return this.each(function (b) {1843 n(this).removeClass(a.call(this, b, fb(this)));1844 });1845 if (!arguments.length) return this.attr("class", "");1846 if ("string" == typeof a && a) {1847 b = a.match(G) || [];1848 while (c = this[i++]) if (e = fb(c), d = 1 === c.nodeType && (" " + e + " ").replace(eb, " ")) {1849 g = 0;1850 while (f = b[g++]) while (d.indexOf(" " + f + " ") > -1) d = d.replace(" " + f + " ", " ");1851 h = n.trim(d), e !== h && c.setAttribute("class", h);1852 }1853 }1854 return this;1855 }, toggleClass: function (a, b) {1856 var c = typeof a;1857 return "boolean" == typeof b && "string" === c ? b ? this.addClass(a) : this.removeClass(a) : n.isFunction(a) ? this.each(function (c) {1858 n(this).toggleClass(a.call(this, c, fb(this), b), b);1859 }) : this.each(function () {1860 var b, d, e, f;1861 if ("string" === c) {1862 d = 0, e = n(this), f = a.match(G) || [];1863 while (b = f[d++]) e.hasClass(b) ? e.removeClass(b) : e.addClass(b);1864 } else void 0 !== a && "boolean" !== c || (b = fb(this), b && N.set(this, "__className__", b), this.setAttribute && this.setAttribute("class", b || a === !1 ? "" : N.get(this, "__className__") || ""));1865 });1866 }, hasClass: function (a) {1867 var b, c, d = 0;1868 b = " " + a + " ";1869 while (c = this[d++]) if (1 === c.nodeType && (" " + fb(c) + " ").replace(eb, " ").indexOf(b) > -1) return !0;1870 return !1;1871 }1872 });1873 var gb = /\r/g, hb = /[\x20\t\r\n\f]+/g;1874 n.fn.extend({1875 val: function (a) {1876 var b, c, d, e = this[0];1877 {1878 if (arguments.length) return d = n.isFunction(a), this.each(function (c) {1879 var e;1880 1 === this.nodeType && (e = d ? a.call(this, c, n(this).val()) : a, null == e ? e = "" : "number" == typeof e ? e += "" : n.isArray(e) && (e = n.map(e, function (a) {1881 return null == a ? "" : a + "";1882 })), b = n.valHooks[this.type] || n.valHooks[this.nodeName.toLowerCase()], b && "set" in b && void 0 !== b.set(this, e, "value") || (this.value = e));1883 });1884 if (e) return b = n.valHooks[e.type] || n.valHooks[e.nodeName.toLowerCase()], b && "get" in b && void 0 !== (c = b.get(e, "value")) ? c : (c = e.value, "string" == typeof c ? c.replace(gb, "") : null == c ? "" : c);1885 }1886 }1887 }), n.extend({1888 valHooks: {1889 option: {1890 get: function (a) {1891 var b = n.find.attr(a, "value");1892 return null != b ? b : n.trim(n.text(a)).replace(hb, " ");1893 }1894 }, select: {1895 get: function (a) {1896 for (var b, c, d = a.options, e = a.selectedIndex, f = "select-one" === a.type || 0 > e, g = f ? null : [], h = f ? e + 1 : d.length, i = 0 > e ? h : f ? e : 0; h > i; i++) if (c = d[i], (c.selected || i === e) && (l.optDisabled ? !c.disabled : null === c.getAttribute("disabled")) && (!c.parentNode.disabled || !n.nodeName(c.parentNode, "optgroup"))) {1897 if (b = n(c).val(), f) return b;1898 g.push(b);1899 }1900 return g;1901 }, set: function (a, b) {1902 var c, d, e = a.options, f = n.makeArray(b), g = e.length;1903 while (g--) d = e[g], (d.selected = n.inArray(n.valHooks.option.get(d), f) > -1) && (c = !0);1904 return c || (a.selectedIndex = -1), f;1905 }1906 }1907 }1908 }), n.each(["radio", "checkbox"], function () {1909 n.valHooks[this] = {1910 set: function (a, b) {1911 return n.isArray(b) ? a.checked = n.inArray(n(a).val(), b) > -1 : void 0;1912 }1913 }, l.checkOn || (n.valHooks[this].get = function (a) {1914 return null === a.getAttribute("value") ? "on" : a.value;1915 });1916 });1917 var ib = /^(?:focusinfocus|focusoutblur)$/;1918 n.extend(n.event, {1919 trigger: function (b, c, e, f) {1920 var g, h, i, j, l, m, o, p = [e || d], q = k.call(b, "type") ? b.type : b,1921 r = k.call(b, "namespace") ? b.namespace.split(".") : [];1922 if (h = i = e = e || d, 3 !== e.nodeType && 8 !== e.nodeType && !ib.test(q + n.event.triggered) && (q.indexOf(".") > -1 && (r = q.split("."), q = r.shift(), r.sort()), l = q.indexOf(":") < 0 && "on" + q, b = b[n.expando] ? b : new n.Event(q, "object" == typeof b && b), b.isTrigger = f ? 2 : 3, b.namespace = r.join("."), b.rnamespace = b.namespace ? new RegExp("(^|\\.)" + r.join("\\.(?:.*\\.|)") + "(\\.|$)") : null, b.result = void 0, b.target || (b.target = e), c = null == c ? [b] : n.makeArray(c, [b]), o = n.event.special[q] || {}, f || !o.trigger || o.trigger.apply(e, c) !== !1)) {1923 if (!f && !o.noBubble && !n.isWindow(e)) {1924 for (j = o.delegateType || q, ib.test(j + q) || (h = h.parentNode); h; h = h.parentNode) p.push(h), i = h;1925 i === (e.ownerDocument || d) && p.push(i.defaultView || i.parentWindow || a);1926 }1927 g = 0;1928 while ((h = p[g++]) && !b.isPropagationStopped()) b.type = g > 1 ? j : o.bindType || q, m = (N.get(h, "events") || {})[b.type] && N.get(h, "handle"), m && m.apply(h, c), m = l && h[l], m && m.apply && L(h) && (b.result = m.apply(h, c), b.result === !1 && b.preventDefault());1929 return b.type = q, f || b.isDefaultPrevented() || o._default && o._default.apply(p.pop(), c) !== !1 || !L(e) || l && n.isFunction(e[q]) && !n.isWindow(e) && (i = e[l], i && (e[l] = null), n.event.triggered = q, e[q](), n.event.triggered = void 0, i && (e[l] = i)), b.result;1930 }1931 }, simulate: function (a, b, c) {1932 var d = n.extend(new n.Event, c, {type: a, isSimulated: !0});1933 n.event.trigger(d, null, b);1934 }1935 }), n.fn.extend({1936 trigger: function (a, b) {1937 return this.each(function () {1938 n.event.trigger(a, b, this);1939 });1940 }, triggerHandler: function (a, b) {1941 var c = this[0];1942 return c ? n.event.trigger(a, b, c, !0) : void 0;1943 }1944 }), n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "), function (a, b) {1945 n.fn[b] = function (a, c) {1946 return arguments.length > 0 ? this.on(b, null, a, c) : this.trigger(b);1947 };1948 }), n.fn.extend({1949 hover: function (a, b) {1950 return this.mouseenter(a).mouseleave(b || a);1951 }1952 }), l.focusin = "onfocusin" in a, l.focusin || n.each({focus: "focusin", blur: "focusout"}, function (a, b) {1953 var c = function (a) {1954 n.event.simulate(b, a.target, n.event.fix(a));1955 };1956 n.event.special[b] = {1957 setup: function () {1958 var d = this.ownerDocument || this, e = N.access(d, b);1959 e || d.addEventListener(a, c, !0), N.access(d, b, (e || 0) + 1);1960 }, teardown: function () {1961 var d = this.ownerDocument || this, e = N.access(d, b) - 1;1962 e ? N.access(d, b, e) : (d.removeEventListener(a, c, !0), N.remove(d, b));1963 }1964 };1965 });1966 var jb = a.location, kb = n.now(), lb = /\?/;1967 n.parseJSON = function (a) {1968 return JSON.parse(a + "");1969 }, n.parseXML = function (b) {1970 var c;1971 if (!b || "string" != typeof b) return null;1972 try {1973 c = (new a.DOMParser).parseFromString(b, "text/xml");1974 } catch (d) {1975 c = void 0;1976 }1977 return c && !c.getElementsByTagName("parsererror").length || n.error("Invalid XML: " + b), c;1978 };1979 var mb = /#.*$/, nb = /([?&])_=[^&]*/, ob = /^(.*?):[ \t]*([^\r\n]*)$/gm,1980 pb = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, qb = /^(?:GET|HEAD)$/, rb = /^\/\//, sb = {},1981 tb = {}, ub = "*/".concat("*"), vb = d.createElement("a");1982 vb.href = jb.href;1983 function wb(a) {1984 return function (b, c) {1985 "string" != typeof b && (c = b, b = "*");1986 var d, e = 0, f = b.toLowerCase().match(G) || [];1987 if (n.isFunction(c)) while (d = f[e++]) "+" === d[0] ? (d = d.slice(1) || "*", (a[d] = a[d] || []).unshift(c)) : (a[d] = a[d] || []).push(c);1988 };1989 }1990 function xb(a, b, c, d) {1991 var e = {}, f = a === tb;1992 function g(h) {1993 var i;1994 return e[h] = !0, n.each(a[h] || [], function (a, h) {1995 var j = h(b, c, d);1996 return "string" != typeof j || f || e[j] ? f ? !(i = j) : void 0 : (b.dataTypes.unshift(j), g(j), !1);1997 }), i;1998 }1999 return g(b.dataTypes[0]) || !e["*"] && g("*");2000 }2001 function yb(a, b) {2002 var c, d, e = n.ajaxSettings.flatOptions || {};2003 for (c in b) void 0 !== b[c] && ((e[c] ? a : d || (d = {}))[c] = b[c]);2004 return d && n.extend(!0, a, d), a;2005 }2006 function zb(a, b, c) {2007 var d, e, f, g, h = a.contents, i = a.dataTypes;2008 while ("*" === i[0]) i.shift(), void 0 === d && (d = a.mimeType || b.getResponseHeader("Content-Type"));2009 if (d) for (e in h) if (h[e] && h[e].test(d)) {2010 i.unshift(e);2011 break;2012 }2013 if (i[0] in c) f = i[0]; else {2014 for (e in c) {2015 if (!i[0] || a.converters[e + " " + i[0]]) {2016 f = e;2017 break;2018 }2019 g || (g = e);2020 }2021 f = f || g;2022 }2023 return f ? (f !== i[0] && i.unshift(f), c[f]) : void 0;2024 }2025 function Ab(a, b, c, d) {2026 var e, f, g, h, i, j = {}, k = a.dataTypes.slice();2027 if (k[1]) for (g in a.converters) j[g.toLowerCase()] = a.converters[g];2028 f = k.shift();2029 while (f) if (a.responseFields[f] && (c[a.responseFields[f]] = b), !i && d && a.dataFilter && (b = a.dataFilter(b, a.dataType)), i = f, f = k.shift()) if ("*" === f) f = i; else if ("*" !== i && i !== f) {2030 if (g = j[i + " " + f] || j["* " + f], !g) for (e in j) if (h = e.split(" "), h[1] === f && (g = j[i + " " + h[0]] || j["* " + h[0]])) {2031 g === !0 ? g = j[e] : j[e] !== !0 && (f = h[0], k.unshift(h[1]));2032 break;2033 }2034 if (g !== !0) if (g && a["throws"]) b = g(b); else try {2035 b = g(b);2036 } catch (l) {2037 return {state: "parsererror", error: g ? l : "No conversion from " + i + " to " + f};2038 }2039 }2040 return {state: "success", data: b};2041 }2042 n.extend({2043 active: 0,2044 lastModified: {},2045 etag: {},2046 ajaxSettings: {2047 url: jb.href,2048 type: "GET",2049 isLocal: pb.test(jb.protocol),2050 global: !0,2051 processData: !0,2052 async: !0,2053 contentType: "application/x-www-form-urlencoded; charset=UTF-8",2054 accepts: {2055 "*": ub,2056 text: "text/plain",2057 html: "text/html",2058 xml: "application/xml, text/xml",2059 json: "application/json, text/javascript"2060 },2061 contents: {xml: /\bxml\b/, html: /\bhtml/, json: /\bjson\b/},2062 responseFields: {xml: "responseXML", text: "responseText", json: "responseJSON"},2063 converters: {"* text": String, "text html": !0, "text json": n.parseJSON, "text xml": n.parseXML},2064 flatOptions: {url: !0, context: !0}2065 },2066 ajaxSetup: function (a, b) {2067 return b ? yb(yb(a, n.ajaxSettings), b) : yb(n.ajaxSettings, a);2068 },2069 ajaxPrefilter: wb(sb),2070 ajaxTransport: wb(tb),2071 ajax: function (b, c) {2072 "object" == typeof b && (c = b, b = void 0), c = c || {};2073 var e, f, g, h, i, j, k, l, m = n.ajaxSetup({}, c), o = m.context || m,2074 p = m.context && (o.nodeType || o.jquery) ? n(o) : n.event, q = n.Deferred(),2075 r = n.Callbacks("once memory"), s = m.statusCode || {}, t = {}, u = {}, v = 0, w = "canceled", x = {2076 readyState: 0, getResponseHeader: function (a) {2077 var b;2078 if (2 === v) {2079 if (!h) {2080 h = {};2081 while (b = ob.exec(g)) h[b[1].toLowerCase()] = b[2];2082 }2083 b = h[a.toLowerCase()];2084 }2085 return null == b ? null : b;2086 }, getAllResponseHeaders: function () {2087 return 2 === v ? g : null;2088 }, setRequestHeader: function (a, b) {2089 var c = a.toLowerCase();2090 return v || (a = u[c] = u[c] || a, t[a] = b), this;2091 }, overrideMimeType: function (a) {2092 return v || (m.mimeType = a), this;2093 }, statusCode: function (a) {2094 var b;2095 if (a) if (2 > v) for (b in a) s[b] = [s[b], a[b]]; else x.always(a[x.status]);2096 return this;2097 }, abort: function (a) {2098 var b = a || w;2099 return e && e.abort(b), z(0, b), this;2100 }2101 };2102 if (q.promise(x).complete = r.add, x.success = x.done, x.error = x.fail, m.url = ((b || m.url || jb.href) + "").replace(mb, "").replace(rb, jb.protocol + "//"), m.type = c.method || c.type || m.method || m.type, m.dataTypes = n.trim(m.dataType || "*").toLowerCase().match(G) || [""], null == m.crossDomain) {2103 j = d.createElement("a");2104 try {2105 j.href = m.url, j.href = j.href, m.crossDomain = vb.protocol + "//" + vb.host != j.protocol + "//" + j.host;2106 } catch (y) {2107 m.crossDomain = !0;2108 }2109 }2110 if (m.data && m.processData && "string" != typeof m.data && (m.data = n.param(m.data, m.traditional)), xb(sb, m, c, x), 2 === v) return x;2111 k = n.event && m.global, k && 0 === n.active++ && n.event.trigger("ajaxStart"), m.type = m.type.toUpperCase(), m.hasContent = !qb.test(m.type), f = m.url, m.hasContent || (m.data && (f = m.url += (lb.test(f) ? "&" : "?") + m.data, delete m.data), m.cache === !1 && (m.url = nb.test(f) ? f.replace(nb, "$1_=" + kb++) : f + (lb.test(f) ? "&" : "?") + "_=" + kb++)), m.ifModified && (n.lastModified[f] && x.setRequestHeader("If-Modified-Since", n.lastModified[f]), n.etag[f] && x.setRequestHeader("If-None-Match", n.etag[f])), (m.data && m.hasContent && m.contentType !== !1 || c.contentType) && x.setRequestHeader("Content-Type", m.contentType), x.setRequestHeader("Accept", m.dataTypes[0] && m.accepts[m.dataTypes[0]] ? m.accepts[m.dataTypes[0]] + ("*" !== m.dataTypes[0] ? ", " + ub + "; q=0.01" : "") : m.accepts["*"]);2112 for (l in m.headers) x.setRequestHeader(l, m.headers[l]);2113 if (m.beforeSend && (m.beforeSend.call(o, x, m) === !1 || 2 === v)) return x.abort();2114 w = "abort";2115 for (l in{success: 1, error: 1, complete: 1}) x[l](m[l]);2116 if (e = xb(tb, m, c, x)) {2117 if (x.readyState = 1, k && p.trigger("ajaxSend", [x, m]), 2 === v) return x;2118 m.async && m.timeout > 0 && (i = a.setTimeout(function () {2119 x.abort("timeout");2120 }, m.timeout));2121 try {2122 v = 1, e.send(t, z);2123 } catch (y) {2124 if (!(2 > v)) throw y;2125 z(-1, y);2126 }2127 } else z(-1, "No Transport");2128 function z(b, c, d, h) {2129 var j, l, t, u, w, y = c;2130 2 !== v && (v = 2, i && a.clearTimeout(i), e = void 0, g = h || "", x.readyState = b > 0 ? 4 : 0, j = b >= 200 && 300 > b || 304 === b, d && (u = zb(m, x, d)), u = Ab(m, u, x, j), j ? (m.ifModified && (w = x.getResponseHeader("Last-Modified"), w && (n.lastModified[f] = w), w = x.getResponseHeader("etag"), w && (n.etag[f] = w)), 204 === b || "HEAD" === m.type ? y = "nocontent" : 304 === b ? y = "notmodified" : (y = u.state, l = u.data, t = u.error, j = !t)) : (t = y, !b && y || (y = "error", 0 > b && (b = 0))), x.status = b, x.statusText = (c || y) + "", j ? q.resolveWith(o, [l, y, x]) : q.rejectWith(o, [x, y, t]), x.statusCode(s), s = void 0, k && p.trigger(j ? "ajaxSuccess" : "ajaxError", [x, m, j ? l : t]), r.fireWith(o, [x, y]), k && (p.trigger("ajaxComplete", [x, m]), --n.active || n.event.trigger("ajaxStop")));2131 }2132 return x;2133 },2134 getJSON: function (a, b, c) {2135 return n.get(a, b, c, "json");2136 },2137 getScript: function (a, b) {2138 return n.get(a, void 0, b, "script");2139 }2140 }), n.each(["get", "post"], function (a, b) {2141 n[b] = function (a, c, d, e) {2142 return n.isFunction(c) && (e = e || d, d = c, c = void 0), n.ajax(n.extend({2143 url: a,2144 type: b,2145 dataType: e,2146 data: c,2147 success: d2148 }, n.isPlainObject(a) && a));2149 };2150 }), n._evalUrl = function (a) {2151 return n.ajax({url: a, type: "GET", dataType: "script", async: !1, global: !1, "throws": !0});2152 }, n.fn.extend({2153 wrapAll: function (a) {2154 var b;2155 return n.isFunction(a) ? this.each(function (b) {2156 n(this).wrapAll(a.call(this, b));2157 }) : (this[0] && (b = n(a, this[0].ownerDocument).eq(0).clone(!0), this[0].parentNode && b.insertBefore(this[0]), b.map(function () {2158 var a = this;2159 while (a.firstElementChild) a = a.firstElementChild;2160 return a;2161 }).append(this)), this);2162 }, wrapInner: function (a) {2163 return n.isFunction(a) ? this.each(function (b) {2164 n(this).wrapInner(a.call(this, b));2165 }) : this.each(function () {2166 var b = n(this), c = b.contents();2167 c.length ? c.wrapAll(a) : b.append(a);2168 });2169 }, wrap: function (a) {2170 var b = n.isFunction(a);2171 return this.each(function (c) {2172 n(this).wrapAll(b ? a.call(this, c) : a);2173 });2174 }, unwrap: function () {2175 return this.parent().each(function () {2176 n.nodeName(this, "body") || n(this).replaceWith(this.childNodes);2177 }).end();2178 }2179 }), n.expr.filters.hidden = function (a) {2180 return !n.expr.filters.visible(a);2181 }, n.expr.filters.visible = function (a) {2182 return a.offsetWidth > 0 || a.offsetHeight > 0 || a.getClientRects().length > 0;2183 };2184 var Bb = /%20/g, Cb = /\[\]$/, Db = /\r?\n/g, Eb = /^(?:submit|button|image|reset|file)$/i,2185 Fb = /^(?:input|select|textarea|keygen)/i;2186 function Gb(a, b, c, d) {2187 var e;2188 if (n.isArray(b)) n.each(b, function (b, e) {2189 c || Cb.test(a) ? d(a, e) : Gb(a + "[" + ("object" == typeof e && null != e ? b : "") + "]", e, c, d);2190 }); else if (c || "object" !== n.type(b)) d(a, b); else for (e in b) Gb(a + "[" + e + "]", b[e], c, d);2191 }2192 n.param = function (a, b) {2193 var c, d = [], e = function (a, b) {2194 b = n.isFunction(b) ? b() : null == b ? "" : b, d[d.length] = encodeURIComponent(a) + "=" + encodeURIComponent(b);2195 };2196 if (void 0 === b && (b = n.ajaxSettings && n.ajaxSettings.traditional), n.isArray(a) || a.jquery && !n.isPlainObject(a)) n.each(a, function () {2197 e(this.name, this.value);2198 }); else for (c in a) Gb(c, a[c], b, e);2199 return d.join("&").replace(Bb, "+");2200 }, n.fn.extend({2201 serialize: function () {2202 return n.param(this.serializeArray());2203 }, serializeArray: function () {2204 return this.map(function () {2205 var a = n.prop(this, "elements");2206 return a ? n.makeArray(a) : this;2207 }).filter(function () {2208 var a = this.type;2209 return this.name && !n(this).is(":disabled") && Fb.test(this.nodeName) && !Eb.test(a) && (this.checked || !X.test(a));2210 }).map(function (a, b) {2211 var c = n(this).val();2212 return null == c ? null : n.isArray(c) ? n.map(c, function (a) {2213 return {name: b.name, value: a.replace(Db, "\r\n")};2214 }) : {name: b.name, value: c.replace(Db, "\r\n")};2215 }).get();2216 }2217 }), n.ajaxSettings.xhr = function () {2218 try {2219 return new a.XMLHttpRequest;2220 } catch (b) {2221 }2222 };2223 var Hb = {0: 200, 1223: 204}, Ib = n.ajaxSettings.xhr();2224 l.cors = !!Ib && "withCredentials" in Ib, l.ajax = Ib = !!Ib, n.ajaxTransport(function (b) {2225 var c, d;2226 return l.cors || Ib && !b.crossDomain ? {2227 send: function (e, f) {2228 var g, h = b.xhr();2229 if (h.open(b.type, b.url, b.async, b.username, b.password), b.xhrFields) for (g in b.xhrFields) h[g] = b.xhrFields[g];2230 b.mimeType && h.overrideMimeType && h.overrideMimeType(b.mimeType), b.crossDomain || e["X-Requested-With"] || (e["X-Requested-With"] = "XMLHttpRequest");2231 for (g in e) h.setRequestHeader(g, e[g]);2232 c = function (a) {2233 return function () {2234 c && (c = d = h.onload = h.onerror = h.onabort = h.onreadystatechange = null, "abort" === a ? h.abort() : "error" === a ? "number" != typeof h.status ? f(0, "error") : f(h.status, h.statusText) : f(Hb[h.status] || h.status, h.statusText, "text" !== (h.responseType || "text") || "string" != typeof h.responseText ? {binary: h.response} : {text: h.responseText}, h.getAllResponseHeaders()));2235 };2236 }, h.onload = c(), d = h.onerror = c("error"), void 0 !== h.onabort ? h.onabort = d : h.onreadystatechange = function () {2237 4 === h.readyState && a.setTimeout(function () {2238 c && d();2239 });2240 }, c = c("abort");2241 try {2242 h.send(b.hasContent && b.data || null);2243 } catch (i) {2244 if (c) throw i;2245 }2246 }, abort: function () {2247 c && c();2248 }2249 } : void 0;2250 }), n.ajaxSetup({2251 accepts: {script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},2252 contents: {script: /\b(?:java|ecma)script\b/},2253 converters: {2254 "text script": function (a) {2255 return n.globalEval(a), a;2256 }2257 }2258 }), n.ajaxPrefilter("script", function (a) {2259 void 0 === a.cache && (a.cache = !1), a.crossDomain && (a.type = "GET");2260 }), n.ajaxTransport("script", function (a) {2261 if (a.crossDomain) {2262 var b, c;2263 return {2264 send: function (e, f) {2265 b = n("<script>").prop({charset: a.scriptCharset, src: a.url}).on("load error", c = function (a) {2266 b.remove(), c = null, a && f("error" === a.type ? 404 : 200, a.type);2267 }), d.head.appendChild(b[0]);2268 }, abort: function () {2269 c && c();2270 }2271 };2272 }2273 });2274 var Jb = [], Kb = /(=)\?(?=&|$)|\?\?/;2275 n.ajaxSetup({2276 jsonp: "callback", jsonpCallback: function () {2277 var a = Jb.pop() || n.expando + "_" + kb++;2278 return this[a] = !0, a;2279 }2280 }), n.ajaxPrefilter("json jsonp", function (b, c, d) {2281 var e, f, g,2282 h = b.jsonp !== !1 && (Kb.test(b.url) ? "url" : "string" == typeof b.data && 0 === (b.contentType || "").indexOf("application/x-www-form-urlencoded") && Kb.test(b.data) && "data");2283 return h || "jsonp" === b.dataTypes[0] ? (e = b.jsonpCallback = n.isFunction(b.jsonpCallback) ? b.jsonpCallback() : b.jsonpCallback, h ? b[h] = b[h].replace(Kb, "$1" + e) : b.jsonp !== !1 && (b.url += (lb.test(b.url) ? "&" : "?") + b.jsonp + "=" + e), b.converters["script json"] = function () {2284 return g || n.error(e + " was not called"), g[0];2285 }, b.dataTypes[0] = "json", f = a[e], a[e] = function () {2286 g = arguments;2287 }, d.always(function () {2288 void 0 === f ? n(a).removeProp(e) : a[e] = f, b[e] && (b.jsonpCallback = c.jsonpCallback, Jb.push(e)), g && n.isFunction(f) && f(g[0]), g = f = void 0;2289 }), "script") : void 0;2290 }), n.parseHTML = function (a, b, c) {2291 if (!a || "string" != typeof a) return null;2292 "boolean" == typeof b && (c = b, b = !1), b = b || d;2293 var e = x.exec(a), f = !c && [];2294 return e ? [b.createElement(e[1])] : (e = ca([a], b, f), f && f.length && n(f).remove(), n.merge([], e.childNodes));2295 };2296 var Lb = n.fn.load;2297 n.fn.load = function (a, b, c) {2298 if ("string" != typeof a && Lb) return Lb.apply(this, arguments);2299 var d, e, f, g = this, h = a.indexOf(" ");2300 return h > -1 && (d = n.trim(a.slice(h)), a = a.slice(0, h)), n.isFunction(b) ? (c = b, b = void 0) : b && "object" == typeof b && (e = "POST"), g.length > 0 && n.ajax({2301 url: a,2302 type: e || "GET",2303 dataType: "html",2304 data: b2305 }).done(function (a) {2306 f = arguments, g.html(d ? n("<div>").append(n.parseHTML(a)).find(d) : a);2307 }).always(c && function (a, b) {2308 g.each(function () {2309 c.apply(this, f || [a.responseText, b, a]);2310 });2311 }), this;2312 }, n.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"], function (a, b) {2313 n.fn[b] = function (a) {2314 return this.on(b, a);2315 };2316 }), n.expr.filters.animated = function (a) {2317 return n.grep(n.timers, function (b) {2318 return a === b.elem;2319 }).length;2320 };2321 function Mb(a) {2322 return n.isWindow(a) ? a : 9 === a.nodeType && a.defaultView;2323 }2324 n.offset = {2325 setOffset: function (a, b, c) {2326 var d, e, f, g, h, i, j, k = n.css(a, "position"), l = n(a), m = {};2327 "static" === k && (a.style.position = "relative"), h = l.offset(), f = n.css(a, "top"), i = n.css(a, "left"), j = ("absolute" === k || "fixed" === k) && (f + i).indexOf("auto") > -1, j ? (d = l.position(), g = d.top, e = d.left) : (g = parseFloat(f) || 0, e = parseFloat(i) || 0), n.isFunction(b) && (b = b.call(a, c, n.extend({}, h))), null != b.top && (m.top = b.top - h.top + g), null != b.left && (m.left = b.left - h.left + e), "using" in b ? b.using.call(a, m) : l.css(m);2328 }2329 }, n.fn.extend({2330 offset: function (a) {2331 if (arguments.length) return void 0 === a ? this : this.each(function (b) {2332 n.offset.setOffset(this, a, b);2333 });2334 var b, c, d = this[0], e = {top: 0, left: 0}, f = d && d.ownerDocument;2335 if (f) return b = f.documentElement, n.contains(b, d) ? (e = d.getBoundingClientRect(), c = Mb(f), {2336 top: e.top + c.pageYOffset - b.clientTop,2337 left: e.left + c.pageXOffset - b.clientLeft2338 }) : e;2339 }, position: function () {2340 if (this[0]) {2341 var a, b, c = this[0], d = {top: 0, left: 0};2342 return "fixed" === n.css(c, "position") ? b = c.getBoundingClientRect() : (a = this.offsetParent(), b = this.offset(), n.nodeName(a[0], "html") || (d = a.offset()), d.top += n.css(a[0], "borderTopWidth", !0), d.left += n.css(a[0], "borderLeftWidth", !0)), {2343 top: b.top - d.top - n.css(c, "marginTop", !0),2344 left: b.left - d.left - n.css(c, "marginLeft", !0)2345 };2346 }2347 }, offsetParent: function () {2348 return this.map(function () {2349 var a = this.offsetParent;2350 while (a && "static" === n.css(a, "position")) a = a.offsetParent;2351 return a || Ea;2352 });2353 }2354 }), n.each({scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function (a, b) {2355 var c = "pageYOffset" === b;2356 n.fn[a] = function (d) {2357 return K(this, function (a, d, e) {2358 var f = Mb(a);2359 return void 0 === e ? f ? f[b] : a[d] : void(f ? f.scrollTo(c ? f.pageXOffset : e, c ? e : f.pageYOffset) : a[d] = e);2360 }, a, d, arguments.length);2361 };2362 }), n.each(["top", "left"], function (a, b) {2363 n.cssHooks[b] = Ga(l.pixelPosition, function (a, c) {2364 return c ? (c = Fa(a, b), Ba.test(c) ? n(a).position()[b] + "px" : c) : void 0;2365 });2366 }), n.each({Height: "height", Width: "width"}, function (a, b) {2367 n.each({padding: "inner" + a, content: b, "": "outer" + a}, function (c, d) {2368 n.fn[d] = function (d, e) {2369 var f = arguments.length && (c || "boolean" != typeof d),2370 g = c || (d === !0 || e === !0 ? "margin" : "border");2371 return K(this, function (b, c, d) {2372 var e;2373 return n.isWindow(b) ? b.document.documentElement["client" + a] : 9 === b.nodeType ? (e = b.documentElement, Math.max(b.body["scroll" + a], e["scroll" + a], b.body["offset" + a], e["offset" + a], e["client" + a])) : void 0 === d ? n.css(b, c, g) : n.style(b, c, d, g);2374 }, b, f ? d : void 0, f, null);2375 };2376 });2377 }), n.fn.extend({2378 bind: function (a, b, c) {2379 return this.on(a, null, b, c);2380 }, unbind: function (a, b) {2381 return this.off(a, null, b);2382 }, delegate: function (a, b, c, d) {2383 return this.on(b, a, c, d);2384 }, undelegate: function (a, b, c) {2385 return 1 === arguments.length ? this.off(a, "**") : this.off(b, a || "**", c);2386 }, size: function () {2387 return this.length;2388 }2389 }), n.fn.andSelf = n.fn.addBack, "function" == typeof define && define.amd && define("jquery", [], function () {2390 return n;2391 });2392 var Nb = a.jQuery, Ob = a.$;2393 return n.noConflict = function (b) {2394 return a.$ === n && (a.$ = Ob), b && a.jQuery === n && (a.jQuery = Nb), n;2395 }, b || (a.jQuery = a.$ = n), n;2396});2397var srv = function () {2398 var show_log = !1, user_touching = !1,2399 isIE = document.documentMode && (8 == document.documentMode || 9 == document.documentMode),2400 eventsHandlers = {form_loaded: []},2401 touch_css = {"-ms-touch-action": "manipulation", "touch-action": "manipulation"},2402 isPreview = -1 < document.location.pathname.indexOf("/survey/manage/preview/"),2403 PUBLIC_LANDING = -1 < document.location.pathname.indexOf("/survey/public/take-survey/"),2404 LOCATION_REF = PUBLIC_LANDING ? document.location.href + (document.querySelector("#public-survey-page-querystring") && document.querySelector("#public-survey-page-querystring").value) : document.location.href,2405 ALL_KEYS = [], FROM_DOMAIN = "", FIRST_INIT = !0, PM_INIT = !1;2406 function base() {2407 return {2408 current_block: "",2409 resize_int: 0,2410 modalFirst: !0,2411 modal_open: !1,2412 modal_dismissed: !1,2413 followUpId: !1,2414 sendMode: "insert",2415 hide_on_init: [],2416 lock_submit: !1,2417 required_when_visible: [],2418 version: "1.3",2419 domain: "mopinion",2420 div_name: "surveyContent",2421 remote: !0,2422 outer_modal: "",2423 prev_page: "",2424 next_page: "",2425 current_page: 1,2426 page_count: 1,2427 page_history: {},2428 rules_set: [],2429 show_progress: !1,2430 window_viewport: "",2431 document_title: "",2432 form_completion_ratio: 0,2433 trigger_method: "passive",2434 is_loading: !0,2435 show_button: !1,2436 cookie_expire: 365,2437 slider: {},2438 button: {},2439 ga_id: "",2440 error_messages: {2441 deflt: "Something went wrong",2442 required: "This field is required",2443 required_multi: "All fields are required",2444 invalid_number: "This is not a valid number",2445 invalid_phone: "This is not a valid phone number",2446 invalid_email: "This is not a valid email address",2447 too_short: "The answer is too short",2448 too_long: "The answer is too long"2449 }2450 };2451 }2452 function opener(e) {2453 var r, t, a = (e = e || {}).key;2454 if (void 0 === a) return srv.log("Formkey required", !0, "warn"), !1;2455 if (srv.hasOwnProperty(a)) {2456 r = a, (t = function () {2457 setTimeout(function () {2458 srv[r].is_loading ? t() : (srv[r] = __MS.extend({}, srv[r], e), "proactive" === srv[r].trigger_method || "exit" === srv[r].trigger_method || "force" === srv[r].trigger_method || "preview" === srv[r].trigger_method ? "slide" == srv[r].slider.type ? srv.preloadSlider(r, "open") : srv.openModal(!0, r) : "passive" === srv[r].trigger_method && void 0 === srv[r].survey_properties && srv.showButton(r));2459 }, 50);2460 })();2461 } else srv.hasOwnProperty(a) || srv.loadSurvey(e, function () {2462 srv.open(e);2463 });2464 }2465 function loadSurvey(e, r) {2466 if ("true" == getCookie("Mopinion_Debug") && (this.show_log = !0), !srv.hasOwnProperty(e.key) || srv[e.key].is_loading) {2467 if ("object" != typeof e) return srv.log("Form key required", !0, "warn"), !1;2468 FROM_DOMAIN ? e.domain = FROM_DOMAIN : FROM_DOMAIN = e.domain;2469 var t = e.key;2470 if (-1 == ALL_KEYS.indexOf(t) && ALL_KEYS.push(t), void 0 === e.testMode && (e.testMode = !1), this[t] = __MS.extend({}, base(), e), this[t].url = "https://" + this[t].domain + "/survey/public/stream?key=" + t + "&domain=" + this[t].domain, void 0 !== e.modal ? (this[t].outer_modal = e.modal, this[t].url += "&modal=" + this[t].outer_modal) : this[t].outer_modal = !0, this[t].url += "&version=" + this[t].version, !this[t].div_name) return srv.log("Output div is not set", !0, "warn"), !1;2471 if (srv.log("Loading Mopinion Feedback Form with key " + t, !1, "info"), FIRST_INIT) this.loadjQuery(t), FIRST_INIT = !1; else {2472 var a = this, s = function () {2473 "function" == typeof srv.jQuery ? a.loadJSON(t, r) : setTimeout(s, 50);2474 };2475 s();2476 }2477 } else "function" == typeof r && r();2478 }2479 function loadjQuery(e, r) {2480 var t = this, a = "https://" + this[e].domain + "/assets/js/jquery-2.2.4.min.js", s = function () {2481 return void 0 !== window.jQuery ? "jQuery" : void 0 !== window.$ && window.$.fn && window.$.fn.jquery ? "$" : void 0;2482 }, o = s();2483 o ? !function (e) {2484 var r = e.split(".");2485 if (1 < r.length) {2486 if (1 == Number(r[0])) {2487 if (10 <= Number(r[1])) return !0;2488 } else if (2 <= Number(r[0])) return !0;2489 return !1;2490 }2491 return !1;2492 }(window[s()].fn.jquery) ? srv.appendScript(a, "SRVQUERY", !1, !1, function () {2493 t.loadjQueryHandler(!0, e, r);2494 }) : (t.jQuery = window[o], t.loadHelpers(e), t.loadJSON(e, r)) : srv.appendScript(a, "SRVQUERY", !1, !1, function () {2495 t.loadjQueryHandler(!1, e, r);2496 });2497 }2498 function loadjQueryHandler(e, r, t) {2499 e ? srv.jQuery = window.jQuery.noConflict(!0) : (jQuery = window.jQuery.noConflict(!0), srv.jQuery = jQuery), this.loadHelpers(r), this.loadJSON(r, t);2500 }2501 function loadHelpers(e) {2502 var r = "https://" + srv[e].domain;2503 if (isIE) {2504 var t = r + "/assets/surveys/" + srv[e].version + "/js/jquery.xdomainrequest.min.js";2505 this.appendScript(t, "#XDOMAINHELPER#", !1, "jQuery");2506 }2507 document.documentMode < 9 && (srv.appendScript(r + "/assets/js/selectivzr.min.js", "selectivzr"), srv.appendScript(r + "/assets/js/html5shiv.min.js", "html5shiv"), srv.appendScript(r + "/assets/js/respond.min.js", "respond"), srv.appendStyle(r + "/assets/css/surveys/survey-IE8.css", "ie8style"));2508 }2509 function loadJSON(e, r) {2510 r = "function" == typeof r && r, this.appendScript(srv[e].url, "SRVvars" + e, !1, !1, r);2511 }2512 function generateHTML(e, a) {2513 var r = !1, t = current_block.properties, s = t.elements || !1, o = t.required, n = "req",2514 i = t.format ? t.format : "", l = t.placeholder ? t.placeholder : "", d = current_block.id, c = t.value,2515 u = srv.jQuery("<span>").addClass("required-mark").html("*"), v = "section_break" === e ? "h3" : "legend",2516 p = "section_break" === e ? "section-title" : "block-title";2517 if (current_block.tooltip) {2518 r = srv.jQuery("<a>").addClass("tooltip").attr("href", "#").css(touch_css).html(' <i class="fa fa-question"></i> <span>' + current_block.tooltip + "</span>");2519 p += " has-tooltip";2520 }2521 var f = srv.jQuery("<" + v + ">").addClass(p).html(current_block.title).append(r);2522 if (o && f.append(u), $block = srv.jQuery("<div>").attr("id", d).addClass("control-group question").append(f), "input" === e) X = srv.jQuery("<input>").attr("id", e + "_" + d).attr("type", "text").addClass(i).prop("placeholder", l).css(touch_css).val(c), o && X.addClass(n), iOSTest("fixed_positioning") && X.on("focus", function (e) {2523 srv[a].outer_modal || srv.callParentWindow({fn: '(function(){ srv.jQuery("[data-key=' + a + ']").closest(".surveyWindowWrap").css({top:srv.jQuery(document).scrollTop(),bottom:"auto"}) })'});2524 }).on("blur", function (e) {2525 srv[a].outer_modal || srv.callParentWindow({fn: '(function(){ srv.jQuery("[data-key=' + a + ']").closest(".surveyWindowWrap").css({position:"fixed",top:0,bottom:0}); setTimeout(function() { srv.resizeForm({update:true}); },100); })'});2526 }), iOSTest("scroll_on_input") && X.on("focus", function (e) {2527 if (!srv[a].outer_modal) {2528 var r = "slide" == srv[a].slider.type ? 'srv.jQuery("[data-key=' + a + ']").closest(".surveySliderScroller")' : 'srv.jQuery("[data-key=' + a + ']").closest(".surveyWindowWrap")';2529 setTimeout(function () {2530 srv.callParentWindow({fn: "(function() { srv.scrollPos = " + r + '.scrollTop(); srv.jQuery(window).on("scroll.fix_scroll", function() { srv.scrollTop = ' + r + ".scrollTop() }); })"});2531 });2532 }2533 }).on("input", function (e) {2534 if (!srv[a].outer_modal) {2535 var r = "slide" == srv[a].slider.type ? 'srv.jQuery("[data-key=' + a + ']").closest(".surveySliderScroller")' : 'srv.jQuery("[data-key=' + a + ']").closest(".surveyWindowWrap")';2536 srv.callParentWindow({fn: "(function() { " + r + ".scrollTop(srv.scrollPos) })"});2537 }2538 }).on("blur", function () {2539 srv[a].outer_modal || srv.callParentWindow({fn: '(function() { srv.jQuery(window).off("scroll.fix_scroll") })'});2540 }), $block.append(X); else if ("textarea" === e) X = srv.jQuery("<textarea>").attr("id", e + "_" + d).addClass(i).prop("placeholder", l).css(touch_css).html(c), iOSTest("fixed_positioning") && X.on("focus", function (e) {2541 srv[a].outer_modal || srv.callParentWindow({fn: '(function(){ srv.jQuery("[data-key=' + a + ']").closest(".surveyWindowWrap").css({top:srv.jQuery(document).scrollTop(),bottom:"auto"}) })'});2542 }).on("blur", function (e) {2543 srv[a].outer_modal || srv.callParentWindow({fn: '(function(){ srv.jQuery("[data-key=' + a + ']").closest(".surveyWindowWrap").css({position:"fixed",top:0,bottom:0}); setTimeout(function() { srv.resizeForm({update:true}); },100); })'});2544 }), iOSTest("scroll_on_input") && X.on("focus", function (e) {2545 if (!srv[a].outer_modal) {2546 var r = "slide" == srv[a].slider.type ? 'srv.jQuery("[data-key=' + a + ']").closest(".surveySliderScroller")' : 'srv.jQuery("[data-key=' + a + ']").closest(".surveyWindowWrap")';2547 setTimeout(function () {2548 srv.callParentWindow({fn: "(function() { srv.scrollPos = " + r + '.scrollTop(); srv.jQuery(window).on("scroll.fix_scroll", function() { srv.scrollTop = ' + r + ".scrollTop() }); })"});2549 });2550 }2551 }).on("input", function (e) {2552 if (!srv[a].outer_modal) {2553 var r = "slide" == srv[a].slider.type ? 'srv.jQuery("[data-key=' + a + ']").closest(".surveySliderScroller")' : 'srv.jQuery("[data-key=' + a + ']").closest(".surveyWindowWrap")';2554 srv.callParentWindow({fn: "(function() { " + r + ".scrollTop(srv.scrollPos) })"});2555 }2556 }).on("blur", function () {2557 srv[a].outer_modal || srv.callParentWindow({fn: '(function() { srv.jQuery(window).off("scroll.fix_scroll") })'});2558 }), o && X.addClass(n), $block.append(X); else if ("select" === e) {2559 for (var y in X = srv.jQuery("<select>").attr("id", e + "_" + d), o && X.addClass(n), "" != l && (X.attr("data-placeholder", "true"), $placeholder = srv.jQuery("<option>").addClass("option_placeholder").attr({2560 id: "option_" + d + "_0",2561 disabled: !02562 }).prop("selected", !0).val("").css(touch_css).html(l), X.append($placeholder)), s) {2563 "function" != typeof(k = s[y]) && (Pe = srv.jQuery("<option>").attr("id", "option_" + d + "_" + y).val(k.label).css(touch_css).html(k.label), t.selected == y && Pe.prop("selected", !0), X.append(Pe));2564 }2565 (_ = void 0 !== t.setScoreCookie && t.setScoreCookie) && X.on("change", function () {2566 var e = X.parents(".control-group").attr("id");2567 srv[a].outer_modal ? srv.setCookie("MSanswer." + a + "." + e, X.find("option:selected").val(), 0, "/", void 0, !1) : srv.callParentWindow({fn: "srv.setCookie('MSanswer." + a + "." + e + "','" + X.find("option:selected").val() + "',0,'/',undefined,false )"});2568 }), $block.append(X);2569 } else if (-1 < ["checkbox", "radio", "category", "gcr"].indexOf(e)) {2570 var m = "radio" === e ? "rdo_" : "chk_", h = "category" === e || "gcr" === e ? "radio" : e,2571 _ = void 0 !== t.setScoreCookie && t.setScoreCookie;2572 if ("gcr" == e) var g = !!t.reverseScore && t.reverseScore; else g = !1;2573 var b = {}, j = !1;2574 for (var y in X = srv.jQuery("<div>"), s) {2575 var k = s[y], Q = !1, w = d + "_" + y;2576 if ("function" != typeof k) {2577 if (k.icon) Q = srv.jQuery("<i>").addClass(k.icon);2578 var C = k.value || k.label,2579 S = srv.jQuery("<input>").attr("type", h).attr("id", e + "_" + w).attr("name", e + "Group_" + d).on("click", function () {2580 srv.setValue(this, e + "_" + d, "radio" !== h);2581 }).css(touch_css).val(C);2582 isActive(y, current_block) && (S.prop("checked", "checked"), b[m + y] = k.label, 0, j = !0);2583 var x = srv.jQuery("<label>").attr("id", "label_" + w).attr("for", e + "_" + w).addClass(e + " inline").append(Q).css(touch_css).append(" " + k.label),2584 T = srv.jQuery("<div>").addClass(e + "-wrapper").append(S).append(x);2585 1 == t.show_as_buttons && (T.addClass("button"), X.addClass("button-container")), X.append(T);2586 }2587 }2588 var M = j ? JSON.stringify(b) : "";2589 I = srv.jQuery("<input>").attr("type", "hidden").attr("id", e + "_" + d).on("blur", function () {2590 showError(srv.jQuery(this), __MS.validateField(this));2591 }).val(M), o && I.addClass(n), _ && I.on("change", function () {2592 var e = I.parents(".control-group").attr("id");2593 srv[a].outer_modal ? srv.setCookie("MSanswer." + a + "." + e, I.val(), 0, "/", void 0, !1) : srv.callParentWindow({fn: "srv.setCookie('MSanswer." + a + "." + e + "','" + I.val() + "',0,'/',undefined,false )"});2594 }), $block.addClass("clearfix").append(X).append(I).append('<p class="clearfix"></p>'), "gcr" == e && g && setTimeout(function () {2595 var e = jQuery("#gcr_" + d + "_1").parent(), r = jQuery("#gcr_" + d + "_2").parent(),2596 t = jQuery("#gcr_" + d + "_3").parent();2597 r.insertBefore(e), t.insertBefore(r);2598 });2599 } else if ("thumbs" === e) {2600 X = srv.jQuery("<div>").addClass("button-container thumbs-container");2601 var E = "", P = "";2602 for (var y in s) {2603 var $ = getPreselectValue("thumbs", a);2604 (Z = t.preselectScore && $ && $ == s[y].value) && (E = s[y].value, P = d);2605 var N = srv.jQuery("<div>").addClass("thumbs-wrapper button"),2606 O = srv.jQuery("<input>").attr("type", "radio").attr("id", "thumbs_" + d + "_" + y).attr("name", "thumbsGroup_" + d).attr("value", s[y].value).on("click", function () {2607 srv.setValue(this, e + "_" + d);2608 }).prop("checked", Z),2609 W = srv.jQuery("<label>").addClass("label_thumbs_" + s[y].value).attr("id", "label_thumbs_" + d + "_" + y).attr("for", "thumbs_" + d + "_" + y).css(touch_css).html('<i class="fa ' + s[y].icon + '" aria-hidden="true"></i>');2610 s[y].label && t.labelsAsValue && W.append('<span class="thumbs_lbl_' + y + '">' + s[y].label + "</span>"), N.append(O, W), X.append(N);2611 }2612 if (I = srv.jQuery("<input>").attr("type", "hidden").attr("id", e + "_" + d).on("blur", function () {2613 showError(srv.jQuery(this), __MS.validateField(this));2614 }), (_ = void 0 !== t.setScoreCookie && t.setScoreCookie) && I.on("change", function () {2615 var e = I.parents(".control-group").attr("id");2616 srv[a].outer_modal ? srv.setCookie("MSanswer." + a + "." + e, I.val(), 0, "/", void 0, !1) : srv.callParentWindow({fn: "srv.setCookie('MSanswer." + a + "." + e + "','" + I.val() + "',0,'/',undefined,false )"});2617 }), "" !== E) {2618 I.val(E);2619 var L = !!sessionStorage.getItem("emailscore");2620 srv.jQuery(document).one("mopinion_ready", function (e) {2621 e.detail.key === a && setTimeout(function () {2622 jQuery("#thumbs_" + P).trigger("change"), L || (srv.send(!1, a), sessionStorage.setItem("emailscore", !0));2623 }, 500);2624 });2625 }2626 o && I.addClass(n), $block.append(X).append(I);2627 } else if ("rating" === e) {2628 var A = srv.jQuery("<div>").addClass("choice-row"),2629 I = srv.jQuery("<input>").attr("type", "hidden").attr("id", "rating_" + d);2630 (_ = void 0 !== t.setScoreCookie && t.setScoreCookie) && I.on("change", function () {2631 var e = I.parents(".control-group").attr("id");2632 srv[a].outer_modal ? setCookie("MSanswer." + a + "." + e, I.val(), "session", "/", void 0, !1) : srv.callParentWindow({fn: "srv.setCookie('MSanswer." + a + "." + e + "','" + I.val() + "','session','/',undefined,false )"});2633 });2634 E = "", P = "";2635 if (o && I.addClass(n), "numeric" == t.type) {2636 var F = t.includeZero ? 0 : 1;2637 for (M = t.checked && "number" == typeof t.checked[0] ? t.checked[0] : "", y = F; y < parseInt(t.scale) + 1; y++) {2638 $ = getPreselectValue("score", a);2639 (Z = t.preselectScore && $ && $ == y) && (E = y, P = d);2640 w = d + "_" + y;2641 var B = srv.jQuery("<input>").attr("type", "radio").attr("id", "rating_" + w).attr("name", "radioGroup_" + d).prop("checked", Z).on("click", function () {2642 srv.setValue(this, e + "_" + d);2643 }).css(touch_css).val(y);2644 t.checked && t.checked[0] == y && B.prop("checked", !0);2645 var q = srv.jQuery("<label>").attr("id", "label_" + w).attr("for", "rating_" + w).css(touch_css).html(y),2646 R = srv.jQuery("<div>").addClass("rating-choice").append(B).append(q);2647 A.append(R);2648 }2649 X = srv.jQuery("<div>").addClass("rating-group numeric").append('<span class="rating-prefix"></span>').append(A).append('<span class="rating-suffix"></span>');2650 } else if ("bar" == t.type) {2651 for (M = "", y = 1; y < 6; y++) {2652 if (1 == y) var H = "--"; else if (2 == y) H = "-"; else if (3 == y) H = "0"; else if (4 == y) H = "+"; else if (5 == y) H = "++";2653 w = d + "_" + y, B = srv.jQuery("<input>").attr("type", "radio").attr("id", "rating_" + w).attr("name", "radioGroup_" + d).on("click", function () {2654 srv.setValue(this, e + "_" + d);2655 }).css(touch_css).val(y), q = srv.jQuery("<label>").attr("id", "label_" + w).attr("for", "rating_" + w).css(touch_css).html("<span>" + H + "</span>"), R = srv.jQuery("<div>").addClass("rating-choice").append(B).append(q);2656 A.append(R);2657 }2658 X = srv.jQuery("<div>").addClass("rating-group bar").append('<span class="rating-prefix"></span>').append(A).append('<span class="rating-suffix"></span>');2659 } else if ("emoji" == t.type) {2660 for (var V = ["angry", "sad", "neutral", "happy", "extra-happy"], D = ($ = getPreselectValue("smiley", a), 0); D < V.length; D++) {2661 y = Number(D) + 1;2662 (Z = t.preselectScore && $ && $ == y) && (E = y, P = d);2663 w = d + "_" + y, B = srv.jQuery("<input>").attr("type", "radio").attr("id", "rating_" + w).prop("checked", Z).attr("name", "radioGroup_" + d).on("click", function () {2664 srv.setValue(this, e + "_" + d);2665 }).css(touch_css);2666 t.labelsAsValue ? B.val(t.emoji[y].label) : B.val(y);2667 q = srv.jQuery("<label>").attr("id", "label_" + w).attr("for", "rating_" + w).css(touch_css);2668 if (t.showCaptions && q.attr("data-label", t.emoji[y].label), supportsSvg()) !function (r, t) {2669 srv.jQuery.ajax({2670 url: "https://" + srv[a].domain + "/assets/img/surveys/emoji/" + t + ".svg",2671 type: "get",2672 dataType: "text"2673 }).done(function (e) {2674 r.addClass("emoji-" + t).html(e);2675 });2676 }(q, V[D]); else srv[a].jQuery("<img>").attr({2677 src: "https://" + srv[a].domain + "/assets/img/surveys/emoji/" + V[D] + ".png",2678 height: "100%",2679 width: "100%"2680 }).appendTo(q);2681 R = srv.jQuery("<div>").addClass("rating-choice").append(B).append(q);2682 A.append(R);2683 }2684 X = srv.jQuery("<div>").addClass("rating-group emoji").append('<span class="rating-prefix"></span>').append(A).append('<span class="rating-suffix"></span>'), t.showCaptions && X.addClass("show-labels");2685 } else {2686 var z = t.checked;2687 M = "";2688 $ = getPreselectValue("score", a);2689 for (var y in s) {2690 if ("function" != typeof(k = s[y])) {2691 var U = t.labelsAsValue && "" !== k.label ? k.label : y;2692 (Z = t.preselectScore && $ && $ == y) && (E = y, P = d);2693 R = srv.jQuery("<input>").attr("type", "radio").attr("id", "Jrating").attr("name", "Jrating").prop("title", k.label).prop("checked", Z).css(touch_css).val(U);2694 z && z[0] == y && (R.attr("checked", "checked"), M = z[0]), A.append(R);2695 }2696 }2697 X = srv.jQuery("<div>").attr("id", "star_rating_" + d).addClass("rating-group stars").append('<span class="rating-prefix"></span>').append(A).append('<span class="rating-suffix"></span>');2698 var Y = function (e) {2699 var r = srv.jQuery("#rating_" + d);2700 __MS.validateField(r[0]), enableNext(e);2701 }, G = {2702 type: "rating",2703 block_id: d,2704 showCaptions: !!t.showCaptions,2705 callback: Y,2706 callback_data: a,2707 hidden: I2708 };2709 srv.makeStars(X, G);2710 }2711 if ("" !== E) {2712 I.val(E);2713 L = !!sessionStorage.getItem("emailscore");2714 srv.jQuery(document).one("mopinion_ready", function (e) {2715 e.detail.key === a && setTimeout(function () {2716 "stars" == t.type && srv.jQuery("#star_rating_" + d).find('.ui-stars-star[data-value="' + E + '"]').click();2717 jQuery("#rating_" + P).trigger("change"), L || (srv.send(!1, a), sessionStorage.setItem("emailscore", !0));2718 }, 500);2719 });2720 } else M && I.val(M);2721 $block.append(I).append(X);2722 } else if ("nps" === e) {2723 M = "";2724 var J = srv.jQuery("<div>").addClass("choice-row");2725 E = "", P = "", g = !!t.reverseScore && t.reverseScore, _ = void 0 !== t.setScoreCookie && t.setScoreCookie;2726 if (g) for (y = 10; 0 <= y; y--) {2727 $ = getPreselectValue("nps", a);2728 (Z = t.preselectScore && $ && $ == y) && (E = y, P = d);2729 w = d + "_" + y, S = srv.jQuery("<input>").attr("type", "radio").attr("id", "nps_" + w).attr("name", "radioGroup_" + d).prop("checked", Z).on("click", function () {2730 srv.setValue(this, e + "_" + d);2731 }).css(touch_css).val(y);2732 isActive(y, current_block) && (S.prop("checked", "checked"), M = y);2733 x = srv.jQuery("<label>").attr("for", "nps_" + w).attr("id", "label_" + w).css(touch_css).html(y);2734 var K = srv.jQuery("<div>").addClass("nps-choice").append(S).append(x);2735 J.append(K);2736 } else for (y = 0; y < 11; y++) {2737 var Z;2738 $ = getPreselectValue("nps", a);2739 (Z = t.preselectScore && $ && $ == y) && (E = y, P = d);2740 w = d + "_" + y, S = srv.jQuery("<input>").attr("type", "radio").attr("id", "nps_" + w).attr("name", "radioGroup_" + d).prop("checked", Z).on("click", function () {2741 srv.setValue(this, e + "_" + d);2742 }).css(touch_css).val(y);2743 isActive(y, current_block) && (S.prop("checked", "checked"), M = y);2744 x = srv.jQuery("<label>").attr("for", "nps_" + w).attr("id", "label_" + w).css(touch_css).html(y), K = srv.jQuery("<div>").addClass("nps-choice").append(S).append(x);2745 J.append(K);2746 }2747 var X = srv.jQuery("<div>").addClass("rating-group nps-group").append(J);2748 I = srv.jQuery("<input>").attr("type", "hidden").attr("id", e + "_" + d).on("click", function () {2749 showError(srv.jQuery(this), __MS.validateField(this));2750 }).val(M);2751 if (o && I.addClass(n), _ && I.on("change", function () {2752 var e = I.parents(".control-group").attr("id");2753 srv[a].outer_modal ? setCookie("MSanswer." + a + "." + e, I.val(), "session", "/", void 0, !1) : srv.callParentWindow({fn: "srv.setCookie('MSanswer." + a + "." + e + "','" + I.val() + "','session','/',undefined,false )"});2754 }), $block.append(X).append(I), "" !== E) {2755 I.val(E);2756 L = !!sessionStorage.getItem("emailscore");2757 srv.jQuery(document).one("mopinion_ready", function (e) {2758 e.detail.key === a && setTimeout(function () {2759 jQuery("#nps_" + P).trigger("change"), L || (srv.send(!1, a), sessionStorage.setItem("emailscore", !0));2760 }, 500);2761 });2762 }2763 } else if ("ces" === e) {2764 z = t.checked, M = "", g = !!t.reverseScore && t.reverseScore, _ = void 0 !== t.setScoreCookie && t.setScoreCookie, A = srv.jQuery("<div>").addClass("choice-row");2765 for (var y in s) {2766 if ("function" != typeof(k = s[y])) {2767 checked = !1, z && z[0] == y && (checked = !0, M = z[0]);2768 R = srv.jQuery("<input>").attr("type", "radio").attr("id", "Jrating").attr("name", "Jrating").prop("title", k.label).css(touch_css).val(y);2769 checked && R.attr("checked", checked), A.append(R);2770 }2771 }2772 Y = function (e) {2773 var r = srv.jQuery("#ces_" + d);2774 __MS.validateField(r[0]), enableNext(e);2775 };2776 X = srv.jQuery("<div>").attr("id", "ces_rating_" + d).addClass("rating-group ces").append('<span class="ces-prefix"></span>').append(A).append('<span class="ces-suffix"></span>'), I = srv.jQuery("<input>").attr("type", "hidden").attr("id", "ces_" + d).val(M), _ && I.on("change", function () {2777 var e = I.parents(".control-group").attr("id");2778 srv[a].outer_modal ? setCookie("MSanswer." + a + "." + e, I.val(), "session", "/", void 0, !1) : srv.callParentWindow({fn: "srv.setCookie('MSanswer." + a + "." + e + "','" + I.val() + "','session','/',undefined,false )"});2779 }), o && I.addClass(n);2780 G = {type: "ces", block_id: d, showCaptions: !!t.showCaptions, callback: Y, callback_data: a, hidden: I};2781 srv.makeStars(X, G), $block.append(X).append(I), g && setTimeout(function () {2782 for (y = 1; y <= 5; y++) {2783 var e = jQuery("#ces_rating_" + d + ' div[data-value="' + y + '"]'),2784 r = jQuery("#ces_rating_" + d + ' div[data-value="' + (y - 1) + '"]');2785 e.insertBefore(r);2786 }2787 jQuery("#ces_rating_" + d).addClass("reversed");2788 });2789 } else if ("section_break" === e) X = srv.jQuery("<div>").attr("id", "section_description_" + d).addClass("section-description").html(t.description), $block.addClass("section").append(X); else if ("matrix" === e) {2790 var ee = t.values, re = t.weights, te = srv.jQuery("<th>").addClass("matrix-subject-label"),2791 ae = srv.jQuery("<tr>").append(te), se = srv.jQuery("<thead>").append(ae), oe = srv.jQuery("<tbody>");2792 for (var ne in ee) if ("function" != typeof ee[ne]) {2793 var ie = srv.jQuery("<th>").addClass("matrix-answer-label").html("<div><span>" + ee[ne].label + "</span></div>");2794 ae.append(ie);2795 }2796 for (var le in ae.append('<th class="matrix-spacer"></th>'), re) if ("function" != typeof re[le]) {2797 var de = srv.jQuery("<th>").addClass("matrix-answer-label").html("<div><span>" + re[le].label + "</span></div>");2798 ae.append(de);2799 }2800 for (var y in s) {2801 if ("function" != typeof(k = s[y])) {2802 var ce = srv.jQuery("<td>").addClass("matrix-subject").html(k.label);2803 je = srv.jQuery("<tr>").append(ce);2804 I = srv.jQuery("<input>").attr("type", "hidden").attr("id", "matrix_" + d + "_" + y).on("blur", function () {2805 showError(srv.jQuery(this), __MS.validateField(this));2806 });2807 for (var ne in o && I.addClass(n), ee) if ("function" != typeof ee[ne]) {2808 var ue = srv.jQuery("<input>").attr("type", "radio").attr("name", "matrix_" + d + "_" + y + "_value").attr("id", "matrix_" + d + "_" + y + "_value_" + ne).attr("title", ee[ne].label).on("click", function () {2809 setMatrix(this);2810 }).css(touch_css).val(ee[ne].label),2811 ve = srv.jQuery("<label>").attr("for", "matrix_" + d + "_" + y + "_value_" + ne).css(touch_css),2812 pe = srv.jQuery("<div>").addClass("matrix-answer-inner").append(ue).append(ve),2813 fe = srv.jQuery("<td>").addClass("matrix-answer").attr("data-label", ee[ne].label).append(pe);2814 je.append(fe);2815 }2816 for (var le in je.append('<td class="matrix-spacer"></td>'), re) if ("function" != typeof re[le]) {2817 var ye = srv.jQuery("<input>").attr("type", "radio").attr("name", "matrix_" + d + "_" + y + "_weight").attr("id", "matrix_" + d + "_" + y + "_weight_" + le).attr("title", re[le].label).on("click", function () {2818 setMatrix(this);2819 }).css(touch_css).val(re[le].label),2820 me = srv.jQuery("<label>").attr("for", "matrix_" + d + "_" + y + "_weight_" + le).css(touch_css),2821 he = srv.jQuery("<div>").addClass("matrix-answer-inner").append(ye).append(me),2822 _e = srv.jQuery("<td>").addClass("matrix-answer").attr("data-label", re[le].label).append(he);2823 je.append(_e);2824 }2825 je.append(I), oe.append(je);2826 }2827 }2828 X = srv.jQuery("<div>").attr("id", "matrix_" + d).addClass("matrix-group");2829 var ge = srv.jQuery("<table>").addClass("table table-striped matrix-table").append(se).append(oe);2830 X.append(ge), $block.append(X);2831 } else if ("likert" === e) {2832 ee = t.values, te = srv.jQuery("<th>").addClass("likert-subject-label"), ae = srv.jQuery("<tr>").append(te), se = srv.jQuery("<thead>").append(ae), oe = srv.jQuery("<tbody>");2833 for (var ne in ee) if ("function" != typeof ee[ne]) {2834 var be = srv.jQuery("<th>").addClass("likert-answer-label").html("<div><span>" + ee[ne].label + "</span></div>");2835 ae.append(be);2836 }2837 for (var y in s) {2838 if ("function" != typeof(k = s[y])) {2839 ce = srv.jQuery("<td>").addClass("likert-subject").html(k.label), I = srv.jQuery("<input>").attr("type", "hidden").attr("id", "likert_" + d + "_" + y).on("blur", function () {2840 showError(srv.jQuery(this), __MS.validateField(this));2841 });2842 o && I.addClass(n);2843 var je = srv.jQuery("<tr>").append(ce);2844 for (var ne in ee) {2845 C = ee[ne];2846 var ke = srv.jQuery("<input>").attr("type", "radio").attr("name", "likert_" + d + "_" + y).attr("id", "likert_" + d + "_" + y + "_rdo_" + ne).attr("title", C.label).on("click", function () {2847 setLikert(this);2848 }).css(touch_css).val(C.label),2849 Qe = srv.jQuery("<label>").attr("for", "likert_" + d + "_" + y + "_rdo_" + ne).css(touch_css),2850 we = srv.jQuery("<div>").addClass("likert-answer-inner").append(ke).append(Qe);2851 $cell = srv.jQuery("<td>").addClass("likert-answer").attr("data-label", C.label).append(we), je.append($cell);2852 }2853 je.append(I), oe.append(je);2854 }2855 }2856 X = srv.jQuery("<div>").attr("id", "likert_" + d).addClass("likert-group"), ge = srv.jQuery("<table>").addClass("table table-striped likert-table").append(se).append(oe);2857 X.append(ge), $block.append(X);2858 } else if ("contact" === e) {2859 var Ce = srv.jQuery("<div>").addClass("contact-wrapper");2860 if (s.name.show) {2861 var Se = srv.jQuery("<div>").addClass("name-wrapper");2862 if (s.title.show) {2863 var xe = srv.jQuery("<select>").attr("id", "contact_" + d + "_title").attr("data-contact", !0).addClass("span2").css(touch_css),2864 Te = Object.keys(s.title.options)[0];2865 for (var Me in"" !== s.title.options[Te] && (s.title.options[0] = ""), s.title.required && (xe.addClass(n), f.append(u)), s.title.options) {2866 var Ee = s.title.options[Me], Pe = srv.jQuery("<option>").val(Ee).html(Ee);2867 xe.append(Pe);2868 }2869 xe = srv.jQuery("<div>").addClass("title").append(xe);2870 Se.append(xe);2871 }2872 if (s.name.combine) name_placeholder = s.name.placeholder || ""; else {2873 var $e = srv.jQuery("<input>").attr("id", "contact_" + d + "_firstname").attr("data-contact", !0).attr("type", "text").attr("placeholder", s.name.subelements.firstname.placeholder || "").css(touch_css);2874 s.name.required && $e.addClass(n), $e = srv.jQuery("<div>").append($e), Se.append($e), name_placeholder = s.name.subelements.lastname.placeholder || "";2875 }2876 var Ne = srv.jQuery("<input>").attr("id", "contact_" + d + "_name").attr("data-contact", !0).attr("type", "text").attr("placeholder", name_placeholder).css(touch_css);2877 s.name.required && (Ne.addClass(n), f.append(u)), Ne = srv.jQuery("<div>").append(Ne), Se.append(Ne);2878 }2879 if (s.email.show) {2880 var Oe = srv.jQuery("<input>").attr("id", "contact_" + d + "_email").attr("type", "text").attr("data-contact", !0).attr("placeholder", s.email.placeholder || "").addClass("email").css(touch_css);2881 s.email.required && Oe.addClass(n), Oe = srv.jQuery("<div>").append(Oe);2882 var We = srv.jQuery("<div>").addClass("email-wrapper").append(Oe);2883 }2884 if (s.phone.show) {2885 var Le = srv.jQuery("<input>").attr("id", "contact_" + d + "_phone").attr("type", "text").attr("data-contact", !0).attr("placeholder", s.phone.placeholder || "").addClass("phone").css(touch_css);2886 if (s.phone.required && Le.addClass(n), s.phone2.show) {2887 var Ae = srv.jQuery("<input>").attr("id", "contact_" + d + "_phone2").attr("type", "text").attr("data-contact", !0).attr("placeholder", s.phone2.placeholder || "").addClass("phone").css(touch_css);2888 s.phone2.required && Ae.addClass(n), Ae = srv.jQuery("<div>").append(Ae);2889 }2890 Le = srv.jQuery("<div>").append(Le);2891 var Ie = srv.jQuery("<div>").addClass("phone-wrapper").append(Le).append(Ae);2892 }2893 Ce.append(Se).append(We).append(Ie), $block.append(Ce);2894 } else if ("screenshot" === e) {2895 X = jQuery("<div>").attr("id", "screenshot_element_" + d).addClass("section-screenshot").html('<i class="fa fa-camera"></i>').on("click", function (e) {2896 e.preventDefault();2897 var r = srv[a].block_params[d].properties.hasOwnProperty("maskedSelectors") ? srv[a].block_params[d].properties.maskedSelectors : [];2898 srv[a].outer_modal ? setTimeout(function () {2899 srv.initCapture({embedded: !0, block_id: d, key: a, maskSelectors: r});2900 }) : setTimeout(function () {2901 srv.callParentWindow({2902 fn: "srv.initCapture",2903 data: {block_id: d, supportsPointerEvents: supportsPointerEvents(), key: a, maskedSelectors: r}2904 });2905 });2906 });2907 srv.jQuery("<div>").addClass("remove-capture").html('<i class="fa fa-times"></i>').appendTo(X), srv.jQuery("<div>").addClass("detect-capture").html('<i class="fa fa-check"></i>').appendTo(X);2908 $block.addClass("section").append(X), 1 == t.bottomScreen && ($block.addClass("absolute"), r && X.addClass("tooltip").append('<span class="tooltip">' + current_block.tooltip + "</span>"), o && X.append(u));2909 srv.jQuery("<input>").attr({2910 type: "hidden",2911 id: "dom_" + d2912 }).prependTo($block), srv.jQuery("<input>").attr({type: "hidden", id: "selector_" + d}).prependTo($block);2913 var Fe = srv.jQuery("<input>").attr({type: "hidden", id: "screenshot_" + d}).on("blur", function () {2914 showError(srv.jQuery(this), __MS.validateField(this));2915 }).prependTo($block);2916 o && Fe.addClass(n);2917 } else if ("link" === e) {2918 var Be = current_block.properties.hyperlinkhref || "", qe = current_block.properties.hyperlinktext || "";2919 if (current_block.properties.show_as_buttons) var Re = "btn"; else Re = "";2920 if (Be.indexOf("http://") < 0 && Be.indexOf("https://") < 0) var He = current_block.properties.hyperlinkprotocol || ""; else He = "";2921 if ("link" == current_block.properties.linktype) qe = qe.replace("/*", '<a href="' + He + Be + '" class="' + Re + '" target="_blank">').replace("*/", "</a>"); else if ("function" == current_block.properties.linktype) {2922 var Ve = current_block.properties.linktype_function;2923 qe = "close_modal" == Ve ? qe.replace("/*", "<a href='javascript:;' onclick='srv.callParentWindow({fn:\"srv.closeModal\",data:\"" + a + "\"})' class='" + Re + "' >").replace("*/", "</a>") : "close_embedded" == Ve ? qe.replace("/*", "<a href='javascript:;' onclick=\"srv.jQuery('.close_custom_bg').click();\" class='" + Re + "' >").replace("*/", "</a>") : "next_page" == Ve ? qe.replace("/*", "<a href='javascript:;' onclick='srv.nextPage(false,\"" + a + "\")' class='" + Re + "' >").replace("*/", "</a>") : "prev_page" == Ve ? qe.replace("/*", "<a href='javascript:;' onclick='srv.prevPage(false,\"" + a + "\")' class='" + Re + "' >").replace("*/", "</a>") : qe.replace("/*", '<span data-attr="unknown function"').replace("*/", "</span>");2924 } else qe = qe.replace("/*", '<a href="' + He + Be + '" class="' + Re + '" target="_blank">').replace("*/", "</a>");2925 X = srv.jQuery("<div>").attr("id", "link_" + d).addClass("link_block").append(qe), "link" == current_block.properties.linktype && X.on("click", function () {2926 srv.callParentWindow({2927 fn: "srv.triggerEvent",2928 data: {event: "redirect", key: a, formName: srv[a].survey_properties.name, url: He + Be}2929 });2930 }), $block.append(X);2931 } else if ("website_data" === e) {2932 for (var y in s) {2933 var De = s[y], ze = e + "_" + De.type + "_" + d + "_" + y;2934 ze = ze.replace(/\W/g, "");2935 srv.jQuery("<input>").attr({type: "hidden", id: ze, name: ze}).appendTo($block);2936 if (srv[a].outer_modal || PUBLIC_LANDING) fetchVariable({2937 type: De.type,2938 value: De.value,2939 hidden_id: ze,2940 embedded: !0,2941 key: a2942 }); else {2943 var Ue = {type: De.type, value: encodeURIComponent(De.value), hidden_id: ze, key: a};2944 Ue = JSON.stringify(Ue), srv.callParentWindow({fn: "srv.fetchVariable", data: Ue});2945 }2946 }2947 $block.css("display", "none");2948 } else $block = srv.jQuery("<div>").html("[unknown type]");2949 return $block;2950 }2951 function buildForm(l) {2952 var e = srv[l].error_messages, r = srv[l].survey_text;2953 e.deflt = r.deflt ? r.deflt : "Something went wrong", e.required = r.required ? r.required : "This field is required", e.required_multi = r.required_multi ? r.required_multi : "All fields are required", e.invalid_number = r.invalid_number ? r.invalid_number : "This is not a valid number", e.invalid_phone = r.invalid_phone ? r.invalid_phone : "This is not a valid phone number", e.invalid_email = r.invalid_email ? r.invalid_email : "This is not a valid email address", e.too_short = r.too_short ? r.too_short : "The answer is too short", e.too_long = r.too_long ? r.too_long : "The answer is too long", themeClass = srv[l].theme_class || "", srv.jQuery(document).one("touchstart", function () {2954 user_touching = !0;2955 }), supportsPointerEvents(!0);2956 var t = srv.jQuery("#" + this[l].div_name);2957 if (t.addClass("mopinion-survey-content"), !srv[l].outer_modal || !t.find('[data-key="' + l + '"]').length) {2958 var a = !1;2959 if (void 0 !== srv[l].survey_properties) {2960 var s = !1, o = !1, d = !1, n = srv.jQuery("<div>").attr("id", "lastPage").addClass("last-page").css({2961 "min-height": "100px",2962 display: "none"2963 }).html(srv[l].survey_properties.exit_content),2964 i = srv.jQuery("<div>").addClass("completed-anim").append('<i class="fa fa-check"></i>');2965 n.prepend(i);2966 var c = srv.jQuery("<div>");2967 if (!this[l].outer_modal) {2968 s = srv.jQuery("<div>").attr("id", "surveyHead"), o = srv.jQuery("<div>").attr("id", "surveyFoot");2969 if (srv[l].survey_properties.footer && o.html("<p>" + srv[l].survey_properties.footer + "</p>"), "" != srv[l].survey_properties.logo) var u = srv.jQuery("<img>").attr("id", "customerLogo").attr("src", srv[l].survey_properties.logo);2970 var v = srv.jQuery("<div>").attr("id", "surveyTitle").addClass("srv-title main-title").html("<h1>" + srv[l].survey_properties.title + "</h1>");2971 s.append(u).append(v);2972 }2973 $page = srv.jQuery("<div>").attr("id", "page1"), srv.jQuery(srv[l].block_layout).each(function (e, r) {2974 if (current_block = srv[l].block_params[r], "object" == typeof current_block) {2975 if ("page_break" !== current_block.typeName) 1 == current_block.properties.bottomScreen ? (d = jQuery(srv.generateHTML(current_block.typeName, l)), current_block.properties.hide_on_init && srv[l].hide_on_init.push(current_block.typeName + "_" + current_block.id)) : ($block = jQuery(srv.generateHTML(current_block.typeName, l)), current_block.properties.hide_on_init && srv[l].hide_on_init.push(current_block.typeName + "_" + current_block.id), $page.append($block)); else {2976 srv[l].page_count++;2977 var t = current_block.properties,2978 a = srv[l].survey_properties.advanced.hideSubNavigation ? "none" : "inline-block",2979 s = srv.jQuery("<div>").addClass("form-actions");2980 if (s.append("<span>" + current_block.title + "</span>"), 1 != t.isFirst && "" !== srv.jQuery.trim(t.prevLabel) && (_ = srv.jQuery("<button>").attr({2981 id: "btn_prev_" + current_block.id,2982 style: "display:" + a2983 }).addClass("btn btn-previous pull-left").on("click", function () {2984 srv.prevPage(!1, l);2985 }).css(touch_css).html(t.prevLabel), s.append(_)), $next_btn = srv.jQuery("<button>").attr({2986 id: "btn_next_" + current_block.id,2987 style: "display:" + a2988 }).addClass("btn btn-next pull-right").on("click", function () {2989 srv.nextPage(!1, l);2990 }).css(touch_css).html(t.nextLabel), void 0 !== t.isAction && 1 == t.isAction && $next_btn.addClass("btn-primary btn-submit"), t.autopost) {2991 var o, n = $page[0].children.length, i = $page[0].children[n - 1].childNodes;2992 for (e = 0; e < i.length; e++) ("hidden" == (o = i[e]).type && null === o.id.match(/checkbox/gi) || null !== o.id.match(/select/gi)) && (s.addClass("autopost"), $node = srv.jQuery(o), $node.on("change.autopost", function () {2993 srv.nextPage(!1, l);2994 var e = srv[l].current_page, r = srv[l].current_page - 1;2995 jQuery("#page" + r + " .form-actions").removeClass("autopost"), jQuery(this).off("change.autopost"), setTimeout(function () {2996 0 !== jQuery(".alert.alert-danger").length && jQuery("#page" + e + " .form-actions").removeClass("autopost");2997 });2998 }));2999 }3000 s.append($next_btn), $page.append(s), c.append($page), $page = srv.jQuery("<div>").attr("id", "page" + srv[l].page_count).addClass("page-break").css("display", "none");3001 }3002 updateQuestionCount(current_block, l);3003 }3004 });3005 var p = this.getLanguage("btnSubmitText", l),3006 f = srv[l].survey_properties.advanced.hideNavigation ? "none" : "inline-block",3007 y = srv.jQuery("<button>").attr({3008 id: "surveySubmitBtn",3009 style: "display:" + f3010 }).addClass("btn btn-primary btn-submit pull-right").on("click", function () {3011 srv.submitSurvey(l);3012 }).css(touch_css).html(p), m = srv.jQuery("<div>").addClass("form-actions");3013 if (1 < this[l].page_count) {3014 var h = this.getLanguage("btnLastBackText", l),3015 _ = srv.jQuery("<button>").addClass("btn btn-previous").attr("style", "display:" + f).on("click", function () {3016 srv.prevPage(!1, l);3017 }).html(h);3018 m.append(_);3019 }3020 if (m.append(y), $page.append(m), c.append($page), this[l].survey_properties.advanced.showProgressbar) {3021 var g = srv.jQuery("<div>").attr("id", "progress").addClass("progress");3022 if (this[l].survey_properties.advanced.toggleDotview) {3023 g.addClass("dot-layout");3024 for (var b = this[l].page_count, j = 1; j <= b; j++) {3025 var k = 1 == j ? " active" : "", Q = j == b ? " last" : "", w = 100 / (b - 1),3026 C = jQuery("<div>").addClass("progress-dot").text(j);3027 jQuery("<div>").addClass("progress-wrap" + k + Q).css("width", w + "%").attr("data-pagecount", j).append(C).appendTo(g);3028 }3029 jQuery('.progress_dot[data-pagecount="1"]').addClass("active");3030 } else g.addClass("bar-layout").append('<div id="progressBar" class="bar" style="width: 0%;"></div>');3031 }3032 var S = srv.jQuery("<div>").append(s).append(g).append(c).append(n).append(o).css("opacity", "0");3033 srv[l].outer_modal ? S.addClass("is-embed") : "slide" == srv[l].slider.type ? S.addClass("mopinion-slide") : S.addClass("is-modal"), S.attr("data-key", l).addClass("mopinion-survey-output " + themeClass), d && S.append(d), srv[l].initBlockRules(), srv[l].initSurveyRules(), srv[l].outer_modal || resizeListener("surveyContent", l), a = !0;3034 } else if (this[l].outer_modal) {3035 if ("slide" !== srv[l].slider.type && srv[l].show_button && (S = srv.showButton(l)), isPreview && (srv.jQuery("#surveyPreviewButtonValue").html(!srv[l].button || srv[l].button.hide ? "Yes" : "No"), !srv[l].button || srv[l].button.hide)) {3036 var x = srv.jQuery("<button>").addClass("force-modal-btn").html("Force open").css(touch_css).on("click", function () {3037 srv.openModal(!0, !1);3038 });3039 srv.jQuery("#surveyPreviewButtonValue").append(x);3040 }3041 } else S = srv.jQuery("<div>").addClass("alert alert-error").html("Error loading survey");3042 for (var T in t.append(S), srv[l].survey_text.errors) srv[l].error_messages[T] = srv[l].survey_text.errors[T];3043 for (var j in srv.jQuery("input[type=text], textarea").keyup(function () {3044 enableNext(l);3045 }), srv.jQuery("input[type=checkbox], input[type=radio]").click(function () {3046 enableNext(l);3047 }), srv.jQuery("input[type=text], textarea").blur(function () {3048 showError(srv.jQuery(this), __MS.validateField(this));3049 }), srv.jQuery("select").change(function () {3050 showError(srv.jQuery(this), __MS.validateField(this)), enableNext(l);3051 }), void 0 !== srv[l].survey_properties && "disable" == srv[l].survey_properties.advanced.next_button_behaviour ? srv.jQuery(".btn-next, #surveySubmitBtn").prop("disabled", !0) : void 0 !== srv[l].survey_properties && "hide" == srv[l].survey_properties.advanced.next_button_behaviour && srv.jQuery(".btn-next, #surveySubmitBtn").hide(), srv[l].hide_on_init) hideBlock(srv[l].hide_on_init[j], !1, !1, l);3052 if (initPostMessage(l), srv.getMeta({key: l}), isPreview && "-" == srv.jQuery("#surveyPreviewMessageContent").html() && srv.jQuery("#surveyPreviewMessageContent").html("All good!"), srv[l].outer_modal || __MS.hammerTime(), t.find("select").length) {3053 var M = t.find("select");3054 srv.niceSelect(M, !1, l), M.each(function (e, r) {3055 srv.jQuery(r);3056 });3057 }3058 if (setTimeout(function () {3059 enableNext(l);3060 }, 500), S && setTimeout(function () {3061 S.animate({opacity: 1}, {3062 duration: 225, display: "block", complete: function () {3063 srv.jQuery("#branding").addClass("anim").attr("style", "display:block!important;text-align:center;");3064 }3065 });3066 }), srv[l].is_loading = !1, "slide" === srv[l].slider.type && (srv[l].outer_modal && srv.preloadSlider(l, !1), srv[l].outer_modal || t.closest("#surveyBody").addClass("mopinion-slide")), a && srv[l].outer_modal) {3067 EventInitializer("form_loaded");3068 var E = "";3069 try {3070 E = srv[l].survey_properties.name;3071 } catch (T) {3072 }3073 srv.triggerEvent({event: "loaded", key: l, formName: E}), srv.triggerEvent({3074 event: "ready",3075 key: l,3076 formName: E3077 });3078 } else if (a && !srv[l].outer_modal) {3079 E = "";3080 try {3081 E = srv[l].survey_properties.name;3082 } catch (T) {3083 }3084 srv.triggerEvent({event: "ready", key: l, formName: E}), srv.callParentWindow({3085 fn: "srv.triggerEvent",3086 data: {event: "ready", key: l, formName: E}3087 });3088 }3089 if (!srv[l].outer_modal && void 0 !== srv[l].survey_properties && srv[l].survey_properties.advanced.hasOwnProperty("analytics_integration") && setTimeout(function () {3090 addAnalytics(srv[l].survey_properties.advanced.analytics_integration, l);3091 }, 500), PUBLIC_LANDING) landingIframe(!!srv[l].survey_properties.advanced.enableCustomBackground, !!srv[l].survey_properties.advanced.landingspageTransparency, srv[l].survey_properties.advanced.landingspageTheme ? srv[l].survey_properties.advanced.landingspageTheme : "dark", !!srv[l].survey_properties.advanced.landingspageClose && srv[l].survey_properties.advanced.landingspageClose);3092 }3093 }3094 function EventHandler(e, r) {3095 srv.eventsHandlers[e].push(r);3096 }3097 function EventInitializer(e) {3098 for (var r in srv.eventsHandlers[e]) {3099 var t = srv.eventsHandlers[e][r];3100 "function" == typeof t && setTimeout(t, 350);3101 }3102 }3103 function triggerEvent(e) {3104 var r = e.element || document;3105 if ("function" == typeof CustomEvent) {3106 var t = new CustomEvent("mopinion_" + e.event, {bubbles: !1, detail: e});3107 r.dispatchEvent(t);3108 } else {3109 (t = document.createEvent("CustomEvent")).initCustomEvent("mopinion_" + e.event, !1, !1, e), r.dispatchEvent(t);3110 }3111 }3112 function landingIframe(e, r, t, a) {3113 var s = getParameterByName("mail_url", LOCATION_REF);3114 if (s && e && (null !== s.match(/^https?:\/\/[a-zA-Z0-9]+\.[a-zA-Z]+/gi) || null !== s.match(/^https?:\/\/www\.[a-zA-Z0-9]+\.[a-zA-Z]+/gi) || null !== s.match(/^https?:\/\/[a-zA-Z]+\.[a-zA-Z0-9]+\.[a-zA-Z]+/gi))) {3115 var o = jQuery("<iframe>").attr({src: s, id: "mailUrl"}).addClass("bg__mailing_Iframe"),3116 n = jQuery("<a>").addClass("close_custom_bg").addClass(t).attr({href: "javascript:;"}).on("click", function () {3117 jQuery("#surveyWrap").remove(), jQuery(this).remove(), jQuery("#mailUrl").css("z-index", "1001"), jQuery("html,body").css("overflow", "hidden"), jQuery("#publicSurveyBody").removeClass("dark light transparent");3118 });3119 if (a) jQuery("<span>").addClass("close_custom_bg_lbl").addClass(t).html(a).appendTo(n);3120 jQuery("#publicSurveyBody").addClass("customBackground").addClass(t).append(o, n), r && jQuery("#publicSurveyBody").addClass("transparent");3121 } else s && e && window.console && console.log("The given url seems to be incorrect: " + s);3122 }3123 function appendScript(e, r, t, a, s) {3124 var o = document.getElementsByTagName("head")[0], n = document.getElementById(r);3125 n && o.removeChild(n);3126 var i = document.createElement("script");3127 if (i.type = "text/javascript", i.id = r, i.src = e, t) for (var l in t) i[l] = t[l];3128 if (a) var d = window.setInterval(function () {3129 srv.log("waiting for " + a + " to load"), "function" == typeof window[a] && (srv.log(a + " loaded"), !0, window.clearInterval(d), o.appendChild(i));3130 }, 10); else o.appendChild(i);3131 if ("function" == typeof s) {3132 var c = !1;3133 i.onload = i.onreadystatechange = function () {3134 if (!(c || this.readyState && "loaded" !== this.readyState && "complete" !== this.readyState)) {3135 c = !0;3136 try {3137 s();3138 } catch (e) {3139 }3140 }3141 };3142 }3143 }3144 function appendStyle(e, r) {3145 var t = document.getElementsByTagName("head")[0];3146 if (!document.getElementById(r)) {3147 var a = document.createElement("link");3148 a.type = "text/css", a.rel = "stylesheet", a.id = r, a.href = e, t.appendChild(a);3149 }3150 }3151 function log(e, r, t) {3152 if (t && "log" != t) {3153 if ("warn" == t) {3154 if (this.show_log || !0 === r) try {3155 console.warn(e);3156 } catch (e) {3157 }3158 } else if ("info" == t) {3159 if (this.show_log || !0 === r) try {3160 console.info(e);3161 } catch (e) {3162 }3163 } else if ("error" == t) throw new Error(e);3164 } else if (this.show_log || !0 === r) try {3165 console.log(e);3166 } catch (e) {3167 }3168 }3169 function prevPage(e, r) {3170 srv.log("page_nr " + e);3171 var t = srv.jQuery('[data-key="' + r + '"]');3172 this[r].page_history[this[r].current_page] ? (srv.log("getting page from history"), this[r].prev_page = this[r].page_history[this[r].current_page]) : srv.log("natural flow"), $curr_page_div = t.find("#page" + this[r].current_page), $new_page_div = t.find("#page" + this[r].prev_page), this[r].next_page = this[r].current_page, $new_page_div.css("display", "block"), $curr_page_div.css("display", "none"), this[r].current_page = this[r].prev_page, this[r].prev_page--, updateProgress(r), updateHeader(r), scrollToSurveyElement(0, r);3173 }3174 function nextPage(e, r) {3175 if (srv[r].lock_submit) return !1;3176 var t = srv[r].page_map[this[r].current_page], a = __MS.validateAll(t, showError),3177 s = srv.jQuery('[data-key="' + r + '"]');3178 if (a) {3179 if (srv[r].form_completion_ratio = Math.round(srv[r].current_page / srv[r].page_count * 100), scroll_top = 0, this[r].prev_page = this[r].current_page, $prev_page_div = s.find("#page" + this[r].prev_page), this[r].next_page && (e = this[r].next_page, this[r].page_history[this[r].next_page] = this[r].current_page), e ? this[r].current_page = e : this[r].current_page++, -1 == e) s.find("#lastPage").css("display", "block").find(".completed-anim").addClass("do-anim"), s.find("#surveyTitle h1").text(this.getLanguage("lastPageTitle", r)), s.find("#surveyDescription").css("display", "none"), s.find("#lastPage").parent().find(".control-group").length && s.find("#lastPage").parent().find(".control-group").css("display", "none"); else {3180 s.find("#page" + this[r].current_page).css("display", "block");3181 this.send(!1, r);3182 }3183 $prev_page_div.css("display", "none"), this[r].next_page = !1;3184 } else srv.log(srv[r].error_messages.deflt, !1, "warn"), first_error = srv.jQuery("#" + __MS.errors[0]).parent(), scroll_top = first_error.offset().top;3185 updateProgress(r), updateHeader(r), scrollToSurveyElement(scroll_top, r), enableNext(r);3186 }3187 function updateQuestionCount(e, r) {3188 "matrix" == e.typeName || "likert" == e.typeName ? srv[r].question_count = srv[r].question_count + Object.keys(e.properties.elements).length : "section_break" != e.typeName && "page_break" != e.typeName && srv[r].question_count++;3189 }3190 function updateHeader(e) {3191 var r = srv.jQuery('[data-key="' + e + '"]');3192 1 < srv[e].current_page || srv[e].current_page < 0 ? r.find("#surveyDescription").css("display", "none") : (r.find("#surveyTitle").css("display", "block"), r.find("#surveyDescription").css("display", "block"));3193 }3194 function updateProgress(e) {3195 if (srv[e].outer_modal || srv.jQuery("html").removeClass(function (e, r) {3196 return (r.match(/(^|\s)mopinion-onpage-\S+/g) || []).join(" ");3197 }).addClass("mopinion-onpage-" + (-1 == srv[e].current_page ? "last" : srv[e].current_page)), -1 == srv[e].current_page) 100, srv.jQuery("#progress").remove(); else if (srv[e].survey_properties.advanced.toggleDotview) srv.jQuery(".progress-wrap").removeClass("active completed"), srv.jQuery('.progress-wrap[data-pagecount="' + srv[e].current_page + '"]').addClass("active"), srv.jQuery('.progress-wrap[data-pagecount="' + srv[e].current_page + '"]').prevAll().addClass("completed"); else {3198 var r = srv[e].form_completion_ratio;3199 srv.jQuery("#progress").children(".bar").css("width", r + "%");3200 }3201 }3202 function setValue(e, r, t) {3203 var a = srv.jQuery("#" + r);3204 if ($id_nr = r.replace(e.type + "_", ""), "checkbox" == e.type) {3205 $new_value = {};3206 a.val().split(",");3207 srv.jQuery("input[name=" + e.name + "]:checked").each(function (e, r) {3208 var t = r.id.split("_"), a = t[t.length - 1];3209 r.value && ($new_value["ch_" + a] = r.value);3210 }), a.val(JSON.stringify($new_value)), "{}" == a.val() && a.val("");3211 } else if (t) {3212 var s = e.id.split("_"), o = s[s.length - 1];3213 $new_value = {}, $new_value["rdo_" + o] = e.value, a.val(JSON.stringify($new_value));3214 } else a.val(e.value);3215 a.val(a.val()).trigger("change"), showError(a, {state: !0}), __MS.unsetError(a);3216 }3217 function send(a, s) {3218 var o = srv.jQuery('[data-key="' + s + '"]');3219 setLock(s);3220 var n = function (e) {3221 if (1 != srv[s].testMode) return e.code = 200, e.msg = "Everything is allright. No ...really its ok, believe me. (please...)", void t(e);3222 var r = "Failed to send survey!";3223 (e.verbose || !1) && (r += "\n\nCode:" + e.code + "\nMessage:" + e.error), srv.log(r, !0), clearLock(s), o.find("#surveySubmitBtn").removeClass("is-submitting").removeClass("btn-primary").addClass("btn-danger").html('<i class="fa fa-exclamation-circle"></i> Failed!, click to retry.').prop("disabled", !1);3224 }, t = function (e) {3225 if (srv.log("Api Response:\n Code:" + e.code + "\n" + e.msg, !1, "info"), srv[s].lock_submit = !1, clearLock(s), e && 200 == e.code) if (e.id && (srv[s].followUpId = e.id, srv[s].sendMode = "upsert"), a) {3226 srv[s].outer_modal ? setCookies({type: "sent", key: s}) : srv.callParentWindow({3227 fn: "srv.setCookies",3228 data: {type: "sent", key: s}3229 });3230 var r = {timeout: srv[s].survey_properties.timeout};3231 srv[s].survey_properties.notify && srv[s].survey_properties.notify.send && (notify = srv[s].survey_properties.notify, r.to = srv.jQuery("#" + srv[s].survey_properties.notification_email).val(), r.subject = notify.subject || "", r.sender = notify.sender || "", r.message = notify.message || "", o.find("#lastPage").html(srv[s].survey_properties.exit_content.replace("%email%", r.to)), o.find("#lastPage").prepend('<div class="completed-anim do-anim"><i class="fa fa-check"></i></div>')), srv[s].survey_properties.modal && o.find("#lastPage").append('<div id="autoClose" class="countdown muted" style="position:absolute; bottom:40px; right:20px;">window closes in <span id="countdown"></span> seconds</div>'), postSubmit(r, s);3232 var t = {event: "feedback_sent", key: s, formName: srv[s].survey_properties.name};3233 e.data && e.data.data && srv[s].survey_properties.advanced.return_feedback && (t.feedback = srv.jQuery.map(e.data.data, function (r) {3234 var e = Object.keys(srv[s].block_params).filter(function (e) {3235 return srv[s].block_params[e].import_var == r.label;3236 })[0], t = "";3237 try {3238 t = srv[s].block_params[e].title;3239 } catch (e) {3240 }3241 if ("image" !== r.type && "dom" !== r.type) return srv.jQuery.extend(r, {title: t});3242 })), srv[s].outer_modal ? (srv.triggerEvent(t), srv.clearCaptureEvents(s)) : (srv.callParentWindow({3243 fn: "srv.triggerEvent",3244 data: t3245 }), srv.callParentWindow({3246 fn: "srv.clearCaptureEvents",3247 data: s3248 })), "slide" === srv[s].slider.type && setTimeout(function () {3249 srv.callParentWindow({fn: "srv.closeSlider", data: s}), setTimeout(location.reload(), 750);3250 }, 5e3);3251 } else {3252 t = {event: "next", key: s, formName: srv[s].survey_properties.name};3253 e.data && e.data.data && srv[s].survey_properties.advanced.return_feedback && (t.feedback = srv.jQuery.map(e.data.data, function (r) {3254 var e = Object.keys(srv[s].block_params).filter(function (e) {3255 return srv[s].block_params[e].import_var == r.label;3256 })[0], t = "";3257 try {3258 t = srv[s].block_params[e].title;3259 } catch (e) {3260 }3261 if ("image" !== r.type && "dom" !== r.type) return srv.jQuery.extend(r, {title: t});3262 })), srv[s].outer_modal ? srv.triggerEvent(t) : srv.callParentWindow({fn: "srv.triggerEvent", data: t});3263 } else n(e);3264 }, i = {feedback: []};3265 srv.jQuery(srv[s].survey_send_options.data).each(function (e, r) {3266 if (r) {3267 var t = r.by_name ? srv.jQuery('input[name="' + r.field + '"]:checked') : srv.jQuery("#" + r.field),3268 a = "checkbox" == t.attr("type") ? t.prop("checked") : t.val();3269 i.feedback.push({label: r.label, value: a, type: r.type});3270 }3271 }), !1 !== srv[s].survey_send_options.force_customer && i.feedback.push({3272 value: srv[s].survey_send_options.force_customer.value,3273 type: "customer",3274 label: srv[s].survey_send_options.force_customer.label3275 }), i.feedback.push({value: navigator.userAgent, type: "agent", label: "User Agent"});3276 var r = getParameterByName("parent", document.location), l = "";3277 if (r) try {3278 l = document.location.href.split("&parent=")[1].split("&cip=")[0];3279 } catch (e) {3280 l = r;3281 } else l = LOCATION_REF;3282 i.feedback.push({value: l, type: "url", label: "url"}), i.feedback.push({3283 value: srv[s].document_title,3284 type: "category",3285 label: "Page title"3286 }), i.feedback.push({3287 value: 1,3288 type: "role",3289 label: "Role"3290 }), i.feedback.push({3291 value: srv[s].survey_properties.name,3292 type: "category",3293 label: "Survey"3294 }), i.feedback.push({3295 value: srv[s].window_viewport,3296 type: "viewport",3297 label: "Viewport"3298 }), srv[s].trigger_method && i.feedback.push({3299 value: srv[s].trigger_method,3300 type: "category",3301 label: "Form trigger"3302 }), i.feedback.push({3303 value: srv[s].form_completion_ratio,3304 type: "form_completion",3305 label: "Form completion percentage"3306 }), "insert" !== srv[s].sendMode && i.feedback.push({value: srv[s].followUpId, type: "id", label: "Survey ID"});3307 var e = {3308 token: srv[s].survey_send_options.token,3309 domain: srv[s].survey_send_options.domain,3310 surveyId: srv[s].survey_properties.id,3311 ip: srv[s].cip || 0,3312 data: i,3313 mode: srv[s].sendMode3314 };3315 srv[s].survey_send_options.preview ? (srv.log("Preview mode, not sending"), clearLock(s)) : this.request("send", e, t, n, !1, s);3316 }3317 function request(e, r, t, a, s, o) {3318 a || (a = function () {3319 srv.log("Error processing request", !0, "warn");3320 });3321 var n = "https://" + srv[o].domain;3322 srv.jQuery.ajax({3323 async: !0,3324 url: n + "/survey/public/" + e,3325 dataType: "json",3326 type: "POST",3327 data: r,3328 error: a,3329 success: t3330 });3331 }3332 function submitSurvey(e) {3333 if (srv[e].lock_submit) return !1;3334 var r = srv.jQuery('[data-key="' + e + '"]');3335 r.find("#surveySubmitBtn").prop("disabled", !0);3336 var t = srv[e].page_map[this[e].current_page];3337 __MS.validateAll(t, showError) ? (r.find("#surveySubmitBtn").data("buttonContent", r.find("#surveySubmitBtn").html()).html('<i class="fa fa-refresh"></i>').addClass("btn-primary").removeClass("btn-danger").addClass("is-submitting"), srv[e].form_completion_ratio = Math.round(srv[e].current_page / srv[e].page_count * 100), this.send(!0, e)) : (srv.log(srv[e].error_messages.deflt, !1, "warn"), r.find("#surveySubmitBtn").prop("disabled", !1), first_error = srv.jQuery("#" + __MS.errors[0]).parent(), scroll_top = first_error.offset().top, scrollToSurveyElement(scroll_top, e));3338 }3339 function openModal(e, r) {3340 if (!r) {3341 if (1 !== ALL_KEYS.length) {3342 try {3343 srv.log("Key needed when multiple forms are initialized", !0, "warn");3344 } catch (e) {3345 }3346 return;3347 }3348 r = ALL_KEYS[0];3349 }3350 if (-1 != ALL_KEYS.indexOf(r)) {3351 if ("slide" !== srv[r].slider.type) {3352 if (getCookie("MSopened") == r && !e || srv[r].modal_open) {3353 var t = "Not opening, reason: ";3354 srv[r].modal_open ? t += "Already open" : getCookie("MSopened") == r && (t += "Got a cookie, and not forced by user"), isPreview && srv.jQuery("#surveyPreviewMessageContent").html(t), srv.log(t);3355 } else {3356 e && srv.log("User forced opening of modal", !1, "info"), srv[r].modalFirst = !0;3357 var a = srv.jQuery("#" + srv[r].div_name), s = srv.jQuery("<div>").attr("id", "surveyMask"),3358 o = srv.jQuery("<div>").attr("id", "surveyModalLoader").addClass("survey-modal-loader").append('<svg class="circular-spin" viewBox="25 25 50 50"><circle class="stroke-path" cx="50" cy="50" r="20" fill="none" stroke-width="2" stroke-miterlimit="10"/></svg>'),3359 n = "https://" + srv[r].domain + "/survey/public/modal?&key=" + r + "&domain=" + srv[r].domain + "&version=" + srv[r].version + "&parent=" + document.location,3360 i = srv.jQuery("<div>").attr({3361 id: "surveyWindowWrap",3362 "data-parent-for": r3363 }).addClass("surveyWindowWrap").css({3364 position: "fixed",3365 top: 0,3366 left: 0,3367 right: 0,3368 "z-index": 2000000001,3369 bottom: 0,3370 "overflow-y": "auto",3371 "-webkit-overflow-scrolling": "touch",3372 "backface-visibility": "hidden",3373 width: "100%",3374 "min-height": "100%"3375 }).on("click", function () {3376 s.click();3377 }),3378 l = srv.jQuery("<iframe>").attr("id", "surveyWindow").attr("data-key", r).attr("src", n).attr("frameBorder", !1).attr("allowTransparency", !0).addClass("surveyWindow").css({3379 border: "none",3380 "border-radius": "2px",3381 position: "absolute",3382 top: "50px",3383 left: 0,3384 right: 0,3385 "margin-left": "auto",3386 "margin-right": "auto",3387 "max-width": "480px",3388 "z-index": 2000000001,3389 "margin-bottom": 50,3390 "box-shadow": "0 8px 17px 0 rgba(0,0,0,0.2)",3391 opacity: 03392 }).appendTo(i);3393 handleIframeWidth(l), a.append(s).append(o), s.animate({opacity: .15}, {3394 complete: function () {3395 srv.jQuery("html,body").addClass("mopinion-modal-active"), a.append(i);3396 var e = "";3397 try {3398 e = srv[r].outerProperties.name;3399 } catch (e) {3400 }3401 srv.triggerEvent({event: "shown", key: r, formName: e}), s.on("click", function () {3402 srv.closeModal(r);3403 }), srv[r].modal_open = !0, setCookies({type: "open", key: r}), srv.hideLoader();3404 }3405 }), srv.jQuery(window).on("resize orientationchange", function () {3406 handleIframeWidth(l);3407 });3408 }3409 return !0;3410 }3411 srv.openSlider(e, r);3412 } else srv.open({key: r, show_button: !1, trigger_method: "force"});3413 }3414 function closeModal(r) {3415 if ("slide" !== srv[r].slider.type) {3416 var t = srv.jQuery("#surveyMask"), e = srv.jQuery('[data-key="' + r + '"]'),3417 a = e.closest(".surveyWindowWrap");3418 srv.clearCaptureEvents(r), e.animate({opacity: 0}, {3419 duration: 300, complete: function () {3420 srv[r].modalFirst = !1, a.remove(), t.animate({opacity: 0}, {3421 duration: 300, complete: function () {3422 t.remove(), srv[r].modal_dismissed = !0, srv[r].modal_open = !1, srv.hideLoader(), srv.jQuery("html,body").removeClass("mopinion-modal-active");3423 var e = "";3424 try {3425 e = srv[r].outerProperties.name;3426 } catch (e) {3427 }3428 srv.triggerEvent({event: "hidden", key: r, formName: e});3429 }3430 });3431 }3432 });3433 } else srv.closeSlider(r);3434 }3435 function hideLoader() {3436 srv.jQuery("#surveyModalLoader").fadeOut(500).promise().done(function () {3437 srv.jQuery(this).remove();3438 });3439 }3440 function setCookies(e) {3441 2 == srv.cookie_level ? path = document.location.href : 1 == srv.cookie_level ? path = document.location.pathname : path = "/";3442 var r = e.key, t = e.type, a = srv[r].cookie_expire || 365;3443 "open" === t ? (setCookie("MSopened", r, a, path, void 0, !1), setCookie("MSopened." + r, !0, a, path, void 0, !1)) : "sent" === t && (setCookie("MSFeedbackSent", r, a, path, void 0, !1), setCookie("MSFeedbackSent." + r, !0, a, path, void 0, !1));3444 }3445 function setCookie(e, r, t, a, s, o) {3446 var n = new Date;3447 n.setTime(n.getTime()), t && (t = 1e3 * t * 60 * 60 * 24);3448 var i = new Date(n.getTime() + t);3449 document.cookie = e + "=" + escape(r) + (t ? ";expires=" + i.toGMTString() : "") + (a ? ";path=" + a : "") + (s ? ";domain=" + s : "") + (o ? ";secure" : "");3450 }3451 function getCookie(e) {3452 var r, t, a, s = document.cookie.split(";");3453 for (r = 0; r < s.length; r++) if (t = s[r].substr(0, s[r].indexOf("=")), a = s[r].substr(s[r].indexOf("=") + 1), (t = t.replace(/^\s+|\s+$/g, "")) == e) return unescape(a);3454 }3455 function handleIframeWidth(e) {3456 var r, t = srv.jQuery(window).width();3457 (e = !(!__MS.isDOM(e) && !__MS.isDOM(e[0])) && e) && (1200 < t ? r = "40%" : 992 < t && t < 1201 ? r = "45%" : t < 993 && 768 < t ? r = "50%" : t < 769 && 544 < t ? r = "70%" : t < 545 && (r = "90%"), e.css({width: r}));3458 }3459 function resizeListener(r, t) {3460 var a = function (e) {3461 if ("number" == typeof e && srv[t]) {3462 srv[t].form_height = e;3463 try {3464 srv.callParentWindow({fn: "srv.resizeForm", data: {height: e, key: t}});3465 } catch (e) {3466 }3467 }3468 };3469 srv.jQuery(window).on("orientationchange", function () {3470 setTimeout(function () {3471 var e = document.getElementById(r).parentNode.offsetHeight;3472 a(e);3473 });3474 });3475 var s = setInterval(function () {3476 if (document.getElementById(r)) {3477 var e = document.getElementById(r).parentNode.offsetHeight;3478 e !== srv[t].form_height && a(e);3479 } else clearInterval(s);3480 }, 10);3481 }3482 function callParentWindow(e, r) {3483 r || (r = srv.getParameterByName("parent", document.location.href) || "*"), "function" == typeof window.postMessage && (isIE && (e = JSON.stringify(e)), parent.postMessage(e, r));3484 }3485 function callChildWindow(e, r) {3486 var t, a;3487 a = r ? (t = document.querySelector('[data-key="' + r + '"]')).getAttribute("src") : (t = document.getElementById("surveyWindow")).getAttribute("src"), "function" == typeof window.postMessage && t && "IFRAME" === t.nodeName && (isIE && (e = JSON.stringify(e)), t.contentWindow.postMessage(e, a));3488 }3489 function initPostMessage(key) {3490 var url_match;3491 if (PM_INIT) return !0;3492 if (srv[key].outer_modal) {3493 var url_match = "https://" + srv[key].domain;3494 PM_INIT = !0;3495 } else {3496 var url_match = srv.getParameterByName("parent", document.location.href).split("/");3497 3 < url_match.length && (url_match = url_match[0] + "//" + url_match[2]);3498 }3499 var receiveMessage = function (event) {3500 if (event.data && event.origin === url_match) if ("object" == typeof event.data) {3501 if (event.data.fn) {3502 var fn = eval(event.data.fn), data = event.data.data;3503 "function" == typeof fn && fn(data);3504 }3505 } else try {3506 var parsed = JSON.parse(event.data);3507 if (parsed.fn) {3508 var fn = eval(parsed.fn), data = parsed.data;3509 "function" == typeof fn && fn(data);3510 }3511 } catch (e) {3512 var fn = eval(event.data.fn), data = event.data.data;3513 "function" != typeof fn || "string" != typeof data && void 0 !== data || fn(data);3514 }3515 };3516 void 0 !== window.addEventListener ? window.addEventListener("message", receiveMessage, !1) : window.attachEvent("onmessage", receiveMessage);3517 }3518 var resizeForm = debounce(function (e) {3519 var r = e.key;3520 if (r) {3521 var t = srv.jQuery('[data-key="' + r + '"]'), a = t.closest(".surveySliderScroller");3522 if (e.update) {3523 if (1 == e.update) s = t.outerHeight() + 1;3524 } else var s = parseInt(e.height, 10) + 1;3525 var o = function () {3526 return .9 * srv.jQuery(window).height() < s;3527 };3528 srv[r] && srv[r].modalFirst ? (a.length && o() ? a.css("overflow-y", "scroll") : a.length && a.css("overflow-y", "hidden"), t.stop().animate({3529 opacity: 1,3530 height: s3531 }, {3532 duration: 225, complete: function () {3533 srv[r].modalFirst = !1;3534 }3535 }), srv[r].form_height = s) : srv[r] && e.height && !srv[r].modalFirst && (a.length && o() ? a.css("overflow-y", "scroll") : a.length && a.css("overflow-y", "hidden"), t.stop().animate({height: s}, {3536 duration: 225,3537 complete: function () {3538 srv.log("Srv height set", !1, "info");3539 }3540 }), srv[r].form_height = s);3541 }3542 }, 100);3543 function getLanguage(e, r) {3544 return void 0 !== srv[r].survey_text && void 0 !== srv[r].survey_text[e] ? srv[r].survey_text[e] : "[" + e + "]";3545 }3546 function addButton(e, r) {3547 var t = srv[e].button, a = t.content || srv.getLanguage("btnOpenText", e), s = t.style || "tab",3548 o = t.position || "right", n = srv.jQuery("<i>").addClass("fa " + t.icon).css({marginRight: "10px"}) || "",3549 i = srv[e].theme_class || "", l = "" != t.icon ? "" : "no_btn_icon";3550 return "slide" !== srv[e].slider.type ? srv.jQuery("<button>").addClass("btn-open-survey btn btn-primary").addClass(s + " " + s + "-" + o + " " + i + " " + l).on("click", function () {3551 srv.openModal(!0, e);3552 }).css("visibility", "hidden").css(touch_css).attr("data-button-for", e).html(a).prepend(n) : srv.jQuery("<button>").attr({3553 type: "button",3554 id: "openSliderButton",3555 "data-button-for": e3556 }).addClass("btn btn-open-slider " + i).html('<i class="fa ' + t.icon + '"></i>').on("click", function () {3557 srv[e].modal_open ? srv.closeSlider(e) : srv.openSlider(!0, e);3558 });3559 }3560 function showButton(e) {3561 var r = srv.jQuery("#" + srv[e].div_name);3562 if (e && !r.find('[data-button-for="' + e + '"]').length) {3563 srv.log("Adding feedback button", !1, "info");3564 var t = this.addButton(e);3565 "slide" !== srv[e].slider.type ? r.append(t) : r.find('[data-button-for="' + e + '"]').length || r.find('[data-key="' + e + '"]').length ? r.find('[data-key="' + e + '"]').length && srv.jQuery('[data-key="' + e + '"]').closest(".surveyWindowWrap").append(t) : srv.preloadSlider(e, !1, !0), setTimeout(function () {3566 t.addClass("allow-button");3567 }, 300);3568 }3569 }3570 function removeButton(e) {3571 srv.jQuery("#" + srv[e].div_name + ' [data-button-for="' + e + '"]').remove();3572 }3573 function isActive(e, r) {3574 var t = "select" === r.typeName ? r.properties.selected : r.properties.checked;3575 for (var a in t) if ("function" != typeof t[a] && "function" != typeof t[a] && t[a] == e) return !0;3576 return !1;3577 }3578 function debounce(a, s, o) {3579 var n;3580 return function () {3581 var e = this, r = arguments, t = o && !n;3582 clearTimeout(n), n = setTimeout(function () {3583 n = null, o || a.apply(e, r);3584 }, s), t && a.apply(e, r);3585 };3586 }3587 function cleanArray(e) {3588 var r = [];3589 for (var t in e) "function" != typeof e[t] && void 0 !== e[t] && r.push(e[t]);3590 return r;3591 }3592 function rand() {3593 return ("00000" + (16777216 * Math.random() << 0).toString(16)).substr(-6).toUpperCase();3594 }3595 function unsetRequirement(e, r) {3596 var t = srv.jQuery("#" + e);3597 t.hasClass("req") && (t.removeClass("error"), t.parent().removeClass("error"), -1 == srv[r].required_when_visible.indexOf(e) && srv[r].required_when_visible.push(e), delete __MS.errors[__MS.errors.indexOf(e)], __MS.errors = cleanArray(__MS.errors), t.removeClass("req"));3598 }3599 function setRequirement(e, r) {3600 var t = srv.jQuery("#" + e);3601 -1 < srv[r].required_when_visible.indexOf(e) && t.addClass("req");3602 }3603 function unhideBlock(r, t) {3604 if (-1 < r.indexOf("contact_") ? ($initial_block = srv.jQuery('*[id^="' + r + '"]'), $block = $initial_block.closest(".contact-wrapper"), $block_elements = jQuery('*[id^="contact_' + $block.parent().attr("id") + '"]')) : ((-1 < r.indexOf("matrix_") || -1 < r.indexOf("likert_")) && ($block_elements = srv.jQuery('input[type="hidden"][id^="' + r + '"]')), $block = srv.jQuery("#" + r)), $block) {3605 if (-1 < r.indexOf("section_break")) return $block = srv.jQuery("#" + r.split("_")[2]), void $block.css("display", "block");3606 $block.hasClass("contact-wrapper") || $block.hasClass("matrix-group") || $block.hasClass("likert-group") ? $block_elements.each(function (e, r) {3607 setRequirement(r.id, t);3608 }) : setRequirement(r, t);3609 try {3610 $block.parent().css("display", "block");3611 } catch (e) {3612 srv.log("block:" + r + " not found");3613 }3614 }3615 }3616 function hideBlock(e, a, s, o) {3617 if ("function" != typeof e && (-1 < e.indexOf("contact_") ? ($initial_block = srv.jQuery('*[id^="' + e + '"]'), $block = $initial_block.closest(".contact-wrapper"), $block_elements = jQuery('*[id^="contact_' + $block.parent().attr("id") + '"]')) : ((-1 < e.indexOf("matrix_") || -1 < e.indexOf("likert_")) && ($block_elements = srv.jQuery('input[type="hidden"][id^="' + e + '"]')), $block = srv.jQuery("#" + e)), $block)) if (-1 < e.indexOf("section_break")) $block = srv.jQuery("#" + e.split("_")[2]), $block.css("display", "none"); else {3618 var r = $block.parent();3619 r.css("display", "none"), r.removeClass("error"), $block.removeClass("error"), $block.hasClass("contact-wrapper") || $block.hasClass("matrix-group") || $block.hasClass("likert-group") ? $block_elements.each(function (e, r) {3620 if (unsetRequirement(r.id, o), a) {3621 var t = srv.jQuery(r);3622 t.not(":checkbox,:radio").val(""), t.prop("checked", !1), t.is("select") && srv.niceSelect(t, "update", o), s && t.trigger(s);3623 }3624 }) : (unsetRequirement(e, o), a && (r.find("input").not(":checkbox,:radio").val(""), r.find("input").prop("checked", !1), r.find(".ui-stars-star").removeClass("ui-stars-star-on"), "select" == e.split("_")[0] && ($block.val(""), srv.niceSelect($block, "update", o)), s && $block.trigger(s)));3625 }3626 }3627 function setPrefill(r, t, e, a) {3628 var s;3629 ($block = srv.jQuery("#" + r), $block) && (null !== r.match(/section_break/gi) && (r = r.replace("section_break", "section_description")), "url_query" == e ? s = getParameterByName(t, LOCATION_REF) : "cookie" == e ? s = getCookie(t) : "url" == e ? (-1 < document.referrer.indexOf(t) || -1 < LOCATION_REF.indexOf(t)) && ("show" === a ? srv.jQuery("#" + r).closest(".control-group").show() : srv.jQuery("#" + r).closest(".control-group").hide()) : "title" == e ? setTimeout(function () {3630 var e = jQuery("[data-key]").attr("data-key");3631 -1 < srv[e].document_title.indexOf(t) && ("show" === a ? srv.jQuery("#" + r).closest(".control-group").show() : srv.jQuery("#" + r).closest(".control-group").hide());3632 }) : e && "fixed" != e || (s = key), $block.val(decodeURIComponent(s)), "" !== $block.val() && $block.trigger("blur"));3633 }3634 function setNextPage(e, r) {3635 for (var t in srv[r].next_page = parseInt(e), srv[r].page_history) t == e || srv[r].page_history[t] == srv[r].current_page && delete srv[r].page_history[t];3636 }3637 function showError(e, r) {3638 e instanceof jQuery == 0 && (e = srv.jQuery(e));3639 var t = e.closest("[data-key]").attr("data-key"), a = e.parent(), s = e.attr("id");3640 if ("TR" == a[0].nodeName) {3641 var o = s.split("_"), n = o[0] + "_" + o[1];3642 a = srv.jQuery("#" + n), s = n;3643 r.code = "required_multi", __MS.unsetError(e), r.state ? __MS.unsetError(a) : __MS.setError(a);3644 } else if (e.parents(".contact-wrapper")[0]) a = e.parent();3645 if (srv.jQuery("#" + s + "_error")[0] && srv.jQuery("#" + s + "_error").remove(), !r.state && -1 != __MS.errors.indexOf(s)) {3646 var i = srv.jQuery("<div>").attr("id", s + "_error").addClass("alert alert-danger").html(r.code && srv[t].error_messages[r.code] ? srv[t].error_messages[r.code] : srv[t].error_messages.deflt);3647 a.append(i);3648 }3649 }3650 function postSubmit(e, r) {3651 srv.nextPage(-1, r);3652 getParameterByName("parent", document.location.href);3653 if (e.to) {3654 var t = {surveyKey: r, email: e.to};3655 srv.request("notify-user", t, function (e) {3656 srv.log(e);3657 }, function () {3658 srv.log("Failed to send notification", !0, "error");3659 }, !0, r);3660 }3661 var a = srv.jQuery('[data-key="' + r + '"]');3662 if (0 < e.timeout && !srv.jQuery(window.frameElement).hasClass("preview_embed")) {3663 var s = e.timeout;3664 a.find("#countdown").html(e.timeout / 1e3);3665 var o = setInterval(function () {3666 s -= 1e3, a.find("#countdown").html(s / 1e3), s <= 0 && (clearInterval(o), srv.callParentWindow({3667 fn: "srv.closeModal",3668 data: r3669 }));3670 }, 1e3);3671 } else a.find("#autoClose").remove();3672 }3673 function getParameterByName(e, r) {3674 e = e.replace(/[\[]/, "[").replace(/[\]]/, "]");3675 var t = new RegExp("[?&]" + e + "=([^&#]*)").exec(r);3676 return null == t ? "" : decodeURIComponent(t[1].replace(/\+/g, " "));3677 }3678 function setLikert(e) {3679 var r = srv.jQuery("#" + e.name);3680 r.val(e.value), showError(r, {state: !0}), __MS.unsetError(r);3681 }3682 function setMatrix(e) {3683 var r = e.name.split("_"),3684 t = srv.jQuery('input[name="' + r[0] + "_" + r[1] + "_" + r[2] + '_value"]:checked').val(),3685 a = srv.jQuery('input[name="' + r[0] + "_" + r[1] + "_" + r[2] + '_weight"]:checked').val(),3686 s = srv.jQuery("#" + r[0] + "_" + r[1] + "_" + r[2]);3687 if (t && a) {3688 var o = JSON.stringify({value: t, weights: a});3689 s.val(o), showError(s, {state: !0}), __MS.unsetError(s);3690 }3691 }3692 function initCapture(l) {3693 var i;3694 if (!(l = l || {}).embedded) {3695 srv.jQuery("html,body").removeClass("mopinion-modal-active");3696 var e = srv.jQuery('[data-key="' + l.key + '"]');3697 e.addClass("screen-capture-active"), e.closest(".surveyWindowWrap").addClass("screen-capture-active"), srv.jQuery("#surveyMask").addClass("screen-capture-active");3698 }3699 function d(e, r) {3700 if (srv.jQuery("#mopinion_dimmer_overlay").remove(), e) var t = e[0].getBoundingClientRect();3701 var a = srv.jQuery("<div>").attr({3702 id: "mopinion_dimmer_overlay",3703 "data-dimmer-for": l.key3704 }).addClass(srv[l.key].theme_class || "");3705 l.embedded && a.addClass("is-embedded");3706 srv.jQuery("<div>").addClass("dimmer-border").appendTo(a);3707 var s = srv.jQuery("<div>").addClass("dimmer-actions").appendTo(a);3708 srv.jQuery("<div>").html(r ? '<i class="fa fa-check" style="margin-right:10px"></i>' + srv.getLanguage("screenCaptureSelected", l.key) : (user_touching ? '<i class="fa fa-hand-pointer-o" style="margin-right:10px"></i>' : '<i class="fa fa-mouse-pointer" style="margin-right:10px"></i>') + srv.getLanguage("screenCaptureText", l.key)).appendTo(s), srv.jQuery("<div>").html("&times;").addClass("dimmer-cancel").on("click", function (e) {3709 e.stopPropagation(), setTimeout(function () {3710 srv.clearCaptureEvents(l.key), l.embedded ? srv.clearCaptureValues({3711 block_id: l.block_id,3712 key: l.key3713 }) : (srv.showModalPostCapture(l.key), srv.callChildWindow({3714 fn: "srv.clearCaptureValues",3715 data: {block_id: l.block_id, key: l.key}3716 }, l.key));3717 });3718 }).appendTo(s);3719 if (e) {3720 if (!l.embedded && !0 === l.supportsPointerEvents) srv.jQuery("<div>").css({3721 position: "fixed",3722 background: "rgba(0,0,0,.3)",3723 top: 0,3724 height: t.top,3725 left: 0,3726 right: 0,3727 pointerEvents: "none"3728 }).appendTo(a), srv.jQuery("<div>").css({3729 position: "fixed",3730 background: "rgba(0,0,0,.3)",3731 top: t.bottom,3732 bottom: 0,3733 left: 0,3734 right: 0,3735 pointerEvents: "none"3736 }).appendTo(a), srv.jQuery("<div>").css({3737 position: "fixed",3738 background: "rgba(0,0,0,.3)",3739 top: t.top,3740 height: t.height,3741 left: 0,3742 width: t.left,3743 pointerEvents: "none"3744 }).appendTo(a), srv.jQuery("<div>").css({3745 position: "fixed",3746 background: "rgba(0,0,0,.3)",3747 top: t.top,3748 height: t.height,3749 width: srv.jQuery(window).width() - t.right,3750 right: 0,3751 pointerEvents: "none"3752 }).appendTo(a);3753 var o = srv.jQuery("<div>").addClass("dimmer-highlight").css({3754 position: "fixed",3755 top: t.top - 3,3756 left: t.left - 3,3757 height: t.height + 6,3758 width: t.width + 63759 }).appendTo(a);3760 if (user_touching && !r) srv.jQuery("<button>").attr({type: "button"}).text(srv.getLanguage("screenCaptureTouchBtnText", l.key)).addClass("btn-select-touch").on("click", function (e) {3761 e.preventDefault(), e.stopPropagation(), srv.jQuery(this).trigger("click.mopinion_screencapture", {selected: !0});3762 }).appendTo(o);3763 r && o.addClass("dimmer-selected"), srv.jQuery("body").append(a);3764 } else {3765 srv.jQuery("<div>").css({3766 position: "fixed",3767 background: "rgba(0,0,0,.3)",3768 top: 0,3769 bottom: 0,3770 left: 0,3771 right: 0,3772 pointerEvents: "none"3773 }).appendTo(a);3774 var n = srv.jQuery("<div>").addClass("capture-hint").appendTo(a), i = srv.jQuery("<i>").appendTo(n);3775 user_touching ? i.addClass("fa fa-hand-pointer-o") : i.addClass("fa fa-mouse-pointer");3776 srv.jQuery("<div>").text(srv.getLanguage("screenCaptureHint", l.key)).appendTo(n);3777 srv.jQuery("body").append(a);3778 }3779 }3780 setTimeout(function () {3781 srv.jQuery(document).on("mousemove.mopinion_screencapture", function (e) {3782 user_touching || d(srv.jQuery(e.target));3783 }), srv.jQuery("*").on("click.mopinion_screencapture", function (e, r) {3784 if (e.preventDefault(), e.stopPropagation(), srv.jQuery(document).off("mousemove.mopinion_screencapture"), r || (i = e.target), srv.jQuery(window).off("scroll.mopinion_screencapture").on("scroll.mopinion_screencapture", function (e) {3785 !user_touching || r ? d(srv.jQuery(i), !0) : d(srv.jQuery(i));3786 }), !user_touching || r && r.selected) {3787 srv.jQuery("#mopinion_dimmer_overlay").remove(), srv.jQuery("[data-mopinion-screen-capture]").removeAttr("data-mopinion-screen-capture");3788 var t = (s = i, o = srv.jQuery(s).clone(), n = ["[data-mop-supress]"], l.maskedSelectors.length && (n = n.concat(l.maskedSelectors)), n.forEach(function (e) {3789 if (o.is(e)) o.html("***"); else try {3790 o.find(e).html("***");3791 } catch (e) {3792 }3793 }), o.find("input").each(function (e, r) {3794 var t = srv.jQuery(r);3795 try {3796 t.attr("value", "***");3797 } catch (e) {3798 }3799 try {3800 t.attr("checked", !1);3801 } catch (e) {3802 }3803 }), o.find("select").each(function (e, r) {3804 var t = srv.jQuery(r);3805 try {3806 t.find("option:selected").removeAttr("selected");3807 } catch (e) {3808 }3809 }), o.find("textarea").each(function (e) {3810 srv.jQuery(e).text("***");3811 }), srv.jQuery.trim(o.prop("outerHTML")).replace(/(\r\n|\n|\r)/gm, " "));3812 srv.jQuery(i).attr("data-mopinion-screen-capture", "");3813 var a = function () {3814 var r = srv.jQuery("html").clone(), e = ["[data-mop-supress]"];3815 l.maskedSelectors.length && (e = e.concat(l.maskedSelectors)), r.find("input").each(function (e, r) {3816 var t = srv.jQuery(r);3817 try {3818 t.attr("value", "***");3819 } catch (e) {3820 }3821 try {3822 t.attr("checked", !1);3823 } catch (e) {3824 }3825 try {3826 t.attr("data-mopinion-mask-input", "");3827 } catch (e) {3828 }3829 }), r.find("select").each(function (e, r) {3830 var t = srv.jQuery(r);3831 try {3832 t.attr("data-mopinion-mask-input", "");3833 } catch (e) {3834 }3835 try {3836 t.find("option:selected").removeAttr("selected");3837 } catch (e) {3838 }3839 }), r.find("textarea").each(function (e) {3840 var r = srv.jQuery(e);3841 try {3842 r.text("***").attr("data-mopinion-mask-input");3843 } catch (e) {3844 }3845 }), e.forEach(function (e) {3846 try {3847 r.find(e).attr("data-mopinion-mask-extra", "");3848 } catch (e) {3849 }3850 });3851 var t = srv.jQuery("<base>").attr("href", location.origin);3852 if (r.find("head").find("base").length) {3853 if (r.find("head").find("base").length) {3854 var a = r.find("head").find("base").attr("href"), s = srv.jQuery("<base>");3855 if (-1 === a.indexOf(location.origin)) {3856 var o = "/" === a.charAt(0) ? location.origin + a : location.origin + "/" + a;3857 s.attr("href", o);3858 } else s.attr("href", a);3859 r.find("head").find("base").remove(), r.find("head").prepend(s);3860 }3861 } else r.find("head").prepend(t);3862 return srv.jQuery.trim(r.prop("outerHTML")).replace(/(\r\n|\n|\r)/gm, " ");3863 }();3864 d(srv.jQuery(i), !0), srv.jQuery("*").off("click.mopinion_screencapture"), l.embedded ? srv.catchCapture({3865 dom: a,3866 selector: t,3867 block_id: l.block_id,3868 key: l.key3869 }) : srv.callChildWindow({3870 fn: "srv.catchCapture",3871 data: {dom: a, selector: t, block_id: l.block_id, key: l.key}3872 }, l.key);3873 } else d(srv.jQuery(i));3874 var s, o, n;3875 });3876 }, 150), d();3877 }3878 function clearCaptureEvents(e) {3879 setTimeout(function () {3880 srv.jQuery("#mopinion_dimmer_overlay").remove(), srv.jQuery("*").off("click.mopinion_screencapture"), srv.jQuery(document).off("mousemove.mopinion_screencapture"), srv.jQuery(window).off("scroll.mopinion_screencapture"), srv.jQuery("[data-mopinion-screen-capture]").removeAttr("data-mopinion-screen-capture");3881 });3882 }3883 function clearCaptureValues(e) {3884 srv.jQuery("#screenshot_" + e.block_id).val("").trigger("change"), srv.jQuery("#dom_" + e.block_id).val(""), srv.jQuery("#selector_" + e.block_id).val(""), srv.jQuery("#" + e.block_id).removeClass("screen-captured"), __MS.validateField(srv.jQuery("#screenshot_" + e.block_id)[0]);3885 }3886 function toHTMLEntities(e) {3887 return e.replace(/./gm, function (e) {3888 return "&#" + e.charCodeAt(0) + ";";3889 });3890 }3891 function fromHTMLEntities(e) {3892 return (e + "").replace(/&#\d+;/gm, function (e) {3893 return String.fromCharCode(e.match(/\d+/gm)[0]);3894 });3895 }3896 function catchCapture(e) {3897 e = e || {}, srv.log("Screen capture caught for block :" + e.block_id);3898 var r = fromHTMLEntities(e.selector), t = encodeQuotes(e.dom);3899 srv.jQuery("#selector_" + e.block_id).val(r), srv.jQuery("#dom_" + e.block_id).val(t), srv.jQuery("#screenshot_" + e.block_id).val("https://mopinion-visual-feedback.s3-eu-west-1.amazonaws.com/camera-icon.png").trigger("change"), __MS.validateField(srv.jQuery("#screenshot_" + e.block_id)[0]), e.embedded || srv.callParentWindow({3900 fn: "srv.showModalPostCapture",3901 data: e.key3902 }), 0 < r.length && 0 < t.length ? srv.jQuery("#" + e.block_id).addClass("screen-captured") : srv.jQuery("#" + e.block_id).removeClass("screen-captured");3903 }3904 function showModalPostCapture(e) {3905 "slide" !== srv[e].slider.type ? srv.jQuery("html,body").addClass("mopinion-modal-active") : srv.jQuery("html,body").addClass("mopinion-slider-active");3906 var r = srv.jQuery('[data-key="' + e + '"]');3907 r.removeClass("screen-capture-active"), r.closest(".surveyWindowWrap").removeClass("screen-capture-active"), srv.jQuery("#surveyMask").removeClass("screen-capture-active");3908 }3909 function userIdle(r, t) {3910 idleTimer = null, idleState = !1, srv.jQuery("*").bind("mousemove keydown scroll", function (e) {3911 clearTimeout(idleTimer), idleState, idleState = !1, idleTimer = setTimeout(function () {3912 srv.log("You've been idle for " + r / 1e3 + " seconds.");3913 var e = new Function(t + "()");3914 srv[key].modal_open || srv[key].modal_dismissed || e(), idleState = !0;3915 }, r);3916 }), srv.jQuery("body").trigger("mousemove");3917 }3918 function userExit(e, r) {3919 var t = !1, a = new Function(r + "()");3920 srv.jQuery(document).bind("mouseout", function (e) {3921 if (e = e || window.event, mouseFrom = e.relatedTarget || e.toElement, !mouseFrom || "HTML" == mouseFrom.nodeName) var r = e.pageY < 100;3922 modal_open || modal_dismissed || !t || r && (t = !1, a());3923 }), setTimeout(function () {3924 t = !0;3925 }, e);3926 }3927 function proActiveOpen(e, r) {3928 var t = new Function(r + "()");3929 setTimeout(function () {3930 modal_open || modal_dismissed ? srv.log("already opened or dismissed") : t();3931 }, e);3932 }3933 function triggerForUrl(e, r) {3934 var t = document.location.href, a = !!r;3935 for (var s in e = JSON.parse(e) || {}) if ("function" != typeof e[s]) {3936 var o = e[s];3937 if ("function" != typeof o) {3938 var n = new RegExp(o, "g");3939 t.match(n) && (a = !r);3940 }3941 }3942 return a;3943 }3944 function scrollToFormPos(e) {3945 var r = e.position, t = e.key, a = srv.jQuery('[data-key="' + t + '"]'),3946 s = "slide" !== srv[t].slider.type ? a.closest(".surveyWindowWrap") : a.closest(".surveySliderScroller");3947 "IFRAME" === !a[0].nodeName && (s = srv.jQuery("html, body"), r = 0 == r ? a.offset().top : r), setTimeout(function () {3948 s.animate({scrollTop: r}, 225);3949 }, 50);3950 }3951 function enableNext(e) {3952 if (void 0 !== srv[e].survey_properties && 0 == srv[e].survey_properties.advanced.next_button_behaviour || void 0 === srv[e].required_map) return !1;3953 var r = srv[e].required_map[srv[e].current_page];3954 all_filled = !0, srv.jQuery(r).each(function (e, r) {3955 var t = srv.jQuery("#" + r);3956 t && (void 0 === t.val() || "" == srv.jQuery.trim(t.val())) && srv.jQuery(t).parent().is(":visible") && (all_filled = !1);3957 });3958 var t = srv.jQuery('[data-key="' + e + '"]').find("#page" + srv[e].current_page),3959 a = t.find("#surveySubmitBtn")[0] ? t.find("#surveySubmitBtn") : t.find(".btn-next");3960 "disable" == srv[e].survey_properties.advanced.next_button_behaviour ? a.prop("disabled", !all_filled) : "hide" == srv[e].survey_properties.advanced.next_button_behaviour && a.toggle(all_filled);3961 }3962 function scrollToSurveyElement(e, r) {3963 window != window.top ? srv.callParentWindow({3964 fn: "srv.scrollToFormPos",3965 data: {position: e, key: r}3966 }) : scrollToFormPos({position: e, key: r});3967 }3968 function transitionEnd() {3969 var e, r, t = document.createElement("div"), a = {3970 transition: "transitionend",3971 OTransition: "oTransitionEnd",3972 MozTransition: "transitionend",3973 WebkitTransition: "webkitTransitionEnd"3974 };3975 for (e in a) if (void 0 !== t.style[e]) {3976 r = a[e];3977 break;3978 }3979 return void 0 !== r ? r : "notransition";3980 }3981 function setLock(e) {3982 srv[e].lock_submit = !0, srv.jQuery('[data-key="' + e + '"]').find(".btn-next, .btn-submit").prop("disabled", !0);3983 }3984 function clearLock(e) {3985 srv[e].lock_submit = !1, srv.jQuery('[data-key="' + e + '"]').find(".btn-next, .btn-submit").prop("disabled", !1);3986 }3987 function makeStars(e, i) {3988 var l, r = e.find('input[type="radio"]'),3989 d = (i = i || {}).hidden || srv.jQuery("#" + i.type + "_" + i.block_id),3990 c = document.createDocumentFragment(), u = !1;3991 i.showCaptions && (u = srv.jQuery("<span>").addClass("caption")), r.each(function (e, r) {3992 var t = srv.jQuery(r), a = t.val(), s = t.attr("title"), o = e + 1,3993 n = srv.jQuery("<div>").attr("data-value", a).attr("data-title", s).addClass("ui-stars-star").addClass("star_" + o).on("mouseenter", function () {3994 srv.jQuery(this).removeClass("ui-stars-star-on").siblings(".ui-stars-star").removeClass("ui-stars-star-on"), srv.jQuery(this).addClass("ui-stars-star-hover").prevAll(".ui-stars-star").addClass("ui-stars-star-hover"), u && u.text(srv.jQuery(this).attr("data-title"));3995 }).on("mouseleave", function () {3996 srv.jQuery(this).removeClass("ui-stars-star-hover").prevAll(".ui-stars-star").removeClass("ui-stars-star-hover"), l && l.addClass("ui-stars-star-on").prevAll(".ui-stars-star").addClass("ui-stars-star-on"), u && !l ? u.text("") : u && l && u.text(l.attr("data-title"));3997 }).on("click", function () {3998 var e = srv.jQuery(this).attr("data-value");3999 if (d.val(e).trigger("change"), l = srv.jQuery(this), srv.jQuery(this).siblings(".ui-stars-star").removeClass("ui-stars-star-on ui-stars-star-hover"), srv.jQuery(this).addClass("ui-stars-star-on").prevAll(".ui-stars-star").addClass("ui-stars-star-on"), i.callback && "function" == typeof i.callback) {4000 var r = i.callback_data || "";4001 i.callback(r);4002 }4003 }).appendTo(c);4004 srv.jQuery("<a>").text(a).appendTo(n);4005 t.remove();4006 }), u && u.appendTo(c), e.append(c);4007 }4008 function niceSelect(e, r, t) {4009 var a = srv.jQuery("#" + this[t].div_name);4010 function s(e) {4011 e.after(srv.jQuery("<div></div>").addClass("nice-select").addClass(e.attr("class") || "").addClass(e.attr("disabled") ? "disabled" : "").attr("tabindex", e.attr("disabled") ? null : "0").html('<span class="current"></span><ul class="list"></ul>'));4012 var a = e.next(), r = e.find("option"), t = e.find("option:selected");4013 a.find(".current").html(t.data("display") || t.text()), r.each(function (e) {4014 var r = srv.jQuery(this), t = r.data("display");4015 a.find("ul").append(srv.jQuery("<li></li>").attr("data-value", r.val()).attr("data-display", t || null).addClass("option" + (r.is(":selected") ? " selected" : "") + (r.is(":disabled") ? " disabled" : "")).html(r.text()));4016 });4017 }4018 "string" != typeof r ? (e.each(function () {4019 var e = srv.jQuery(this);4020 e.hide(), e.next().hasClass("nice-select") || s(e);4021 }), a.off(".nice_select"), a.on("click.nice_select", ".nice-select", function (e) {4022 var r = srv.jQuery(this);4023 if (srv.jQuery(".nice-select").not(r).removeClass("open"), r.toggleClass("open"), r.hasClass("open")) {4024 r.find(".option"), r.find(".focus").removeClass("focus"), r.find(".selected").addClass("focus");4025 var t = srv.jQuery(window).height(), a = r.offset().top + r.outerHeight();4026 t - a < 250 ? r.find(".list").css({maxHeight: t - a - 10}) : r.find(".list").css({maxHeight: ""});4027 } else r.focus();4028 }), a.on("click.nice_select", function (e) {4029 0 === srv.jQuery(e.target).closest(".nice-select").length && srv.jQuery(".nice-select").removeClass("open").find(".option");4030 }), a.on("click.nice_select", ".nice-select .option:not(.disabled)", function (e) {4031 var r = srv.jQuery(this), t = r.closest(".nice-select");4032 t.find(".selected").removeClass("selected"), r.addClass("selected");4033 var a = r.data("display") || r.text();4034 t.find(".current").text(a), t.prev("select").val(r.data("value")).trigger("change");4035 }), a.on("keydown.nice_select", ".nice-select", function (e) {4036 var r = srv.jQuery(this), t = srv.jQuery(r.find(".focus") || r.find(".list .option.selected"));4037 if (32 == e.keyCode || 13 == e.keyCode) return r.hasClass("open") ? t.trigger("click") : r.trigger("click"), !1;4038 if (40 == e.keyCode) {4039 if (r.hasClass("open")) {4040 var a = t.nextAll(".option:not(.disabled)").first();4041 0 < a.length && (r.find(".focus").removeClass("focus"), a.addClass("focus"));4042 } else r.trigger("click");4043 return !1;4044 }4045 if (38 == e.keyCode) {4046 if (r.hasClass("open")) {4047 var s = t.prevAll(".option:not(.disabled)").first();4048 0 < s.length && (r.find(".focus").removeClass("focus"), s.addClass("focus"));4049 } else r.trigger("click");4050 return !1;4051 }4052 if (27 == e.keyCode) r.hasClass("open") && r.trigger("click"); else if (9 == e.keyCode && r.hasClass("open")) return !1;4053 })) : "update" == r ? e.each(function () {4054 var e = srv.jQuery(this), r = srv.jQuery(this).next(".nice-select"), t = r.hasClass("open");4055 r.length && (r.remove(), s(e), t && e.next().trigger("click"));4056 }) : "destroy" == r ? (e.each(function () {4057 var e = srv.jQuery(this), r = srv.jQuery(this).next(".nice-select");4058 r.length && (r.remove(), e.css("display", ""));4059 }), 0 == srv.jQuery(".nice-select").length && a.off(".nice_select")) : console.log('Method "' + r + '" does not exist.');4060 }4061 function getMeta(e) {4062 var r = e.key;4063 if (e.passback) return srv[r].window_viewport = e.viewport, srv[r].document_title = e.title, srv[r].trigger_method = e.trigger_method, void(srv[r].ga_id = e.ga_id);4064 if (srv[r].outer_modal) {4065 srv[r].window_viewport = srv.jQuery(window).width() + "x" + srv.jQuery(window).height(), srv[r].document_title = document.title || "";4066 try {4067 srv[r].ga_id = ga.getAll()[0].get("trackingId");4068 } catch (e) {4069 }4070 } else srv.callParentWindow({fn: "srv.returnMeta", data: {key: r}});4071 }4072 function returnMeta(e) {4073 var r = e.key || "", t = srv.jQuery(window).width() + "x" + srv.jQuery(window).height(), a = "";4074 try {4075 a = ga.getAll()[0].get("trackingId");4076 } catch (e) {4077 }4078 srv.callChildWindow({4079 fn: "srv.getMeta",4080 data: {4081 viewport: t,4082 title: document.title,4083 trigger_method: srv[r].trigger_method || "",4084 key: r,4085 ga_id: a,4086 passback: !04087 }4088 }, r);4089 }4090 function supportsPointerEvents(e) {4091 var r = document.createElement("a").style;4092 return r.cssText = "pointer-events:auto", "auto" === r.pointerEvents || (e && srv.jQuery("html").addClass("no-csspointerevents"), !1);4093 }4094 function supportsSvg() {4095 return document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image", "1.1");4096 }4097 function encodeQuotes(e) {4098 var r = {'"': "&quot;", "'": "&#039;"};4099 return e.replace(/["']/g, function (e) {4100 return r[e];4101 });4102 }4103 function iOSTest(e) {4104 var r = parseFloat(("" + (/CPU.*OS ([0-9_]{1,5})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent) || [0, ""])[1]).replace("undefined", "3_2").replace("_", ".").replace("_", "")) || !1;4105 return e ? "fixed_positioning" === e ? !(!r || r && /CriOS/i.test(navigator.userAgent)) && r < 10.3 : "scroll_on_input" === e ? 10.2 < r : void 0 : r;4106 }4107 function fetchVariable(obj) {4108 if ("string" == typeof obj && (obj = decodeURIComponent(obj)), "object" != typeof obj) try {4109 obj = JSON.parse(obj);4110 } catch (e) {4111 }4112 var key = obj.key, type = obj.type, value = obj.value, hidden_id = obj.hidden_id;4113 srv.log("Fetching " + type + " data from :" + value, "info");4114 var passback = "";4115 if ("css_selector" === type) {4116 var $selector;4117 try {4118 $selector = srv.jQuery(value.replace(/"/g, "'"));4119 } catch (e) {4120 }4121 $selector && (passback = "INPUT" === $selector.prop("nodeName") || "TEXTAREA" === $selector.prop("nodeName") ? $selector.val() : srv.jQuery.trim($selector.text()));4122 } else if ("js" === type) {4123 var js_var;4124 try {4125 js_var = eval(value);4126 } catch (e) {4127 }4128 if (void 0 !== js_var) {4129 if ("object" == typeof js_var) try {4130 js_var = JSON.stringify(js_var);4131 } catch (e) {4132 }4133 "string" != typeof js_var && "number" != typeof js_var || (passback = js_var);4134 }4135 } else if ("cookie" === type) {4136 var cookie_val = getCookie(value);4137 cookie_val && "string" == typeof cookie_val && (passback = cookie_val);4138 } else if ("url_parameter" === type) {4139 var url_param = getParameterByName(value, LOCATION_REF);4140 url_param && "string" == typeof url_param && (passback = url_param);4141 }4142 if (passback) if (srv.log("Data found from " + type + ": " + value, "info"), obj.embedded) if (srv.jQuery("#" + hidden_id).length) srv.jQuery("#" + hidden_id).val(passback); else var poll = setInterval(function () {4143 srv.jQuery("#" + hidden_id).length && (clearInterval(poll), srv.jQuery("#" + hidden_id).val(passback));4144 }, 50); else srv.callChildWindow({4145 fn: "(function(obj) {srv.jQuery('#'+obj.hidden_id).val(obj.data)})",4146 data: {hidden_id: hidden_id, data: passback}4147 }, key); else srv.log("No data found from " + type + ": " + value, "info");4148 }4149 function preloadSlider(t, e, r) {4150 if (srv.jQuery('[data-key="' + t + '"]').length && !srv[t].is_loading) return "open" === e && srv.openSlider(!0, t), !0;4151 if (!srv[t].is_loading) {4152 var a = srv.jQuery("#" + srv[t].div_name), s = srv.jQuery("<div>").attr({4153 id: "surveyWindowWrap",4154 "data-parent-for": t4155 }).addClass("surveyWindowWrap").css({4156 position: "fixed",4157 zIndex: 2000000001,4158 "backface-visibility": "hidden"4159 }).addClass("mopinion-slider slide-" + srv[t].slider.position),4160 o = "https://" + srv[t].domain + "/survey/public/modal?&key=" + t + "&domain=" + srv[t].domain + "&version=" + srv[t].version + "&parent=" + document.location,4161 n = srv.jQuery("<div>").attr("id", "surveySliderScroller").addClass("surveySliderScroller").css({4162 maxHeight: "90vh",4163 overflowY: "hidden",4164 "-ms-overflow-style": "-ms-autohiding-scrollbar",4165 "-webkit-overflow-scrolling": "touch"4166 }).appendTo(s),4167 i = (srv.jQuery("<iframe>").attr("id", "surveyWindow").attr("src", o).attr("frameBorder", !1).attr("allowTransparency", !0).attr("data-key", t).addClass("surveyWindow").css({4168 border: "none",4169 borderRadius: "2px",4170 width: "100%",4171 background: "rgba(255,255,255,0.01)"4172 }).appendTo(n), {});4173 if ("right" === srv[t].slider.position ? i = {4174 top: "10%",4175 top: "calc(10% + 5px)",4176 bottom: "auto",4177 left: "auto",4178 right: 0,4179 transform: "translateX(100%)"4180 } : "bottom-right" === srv[t].slider.position ? i = {4181 top: "auto",4182 bottom: "-5px",4183 left: "auto",4184 right: "2.5%",4185 transform: "translateY(100%)"4186 } : "bottom-left" === srv[t].slider.position ? i = {4187 top: "auto",4188 bottom: "-5px",4189 left: "2.5%",4190 right: "auto",4191 transform: "translateY(100%)"4192 } : "left" === srv[t].slider.position && (i = {4193 top: "10%",4194 top: "calc(10% + 5px)",4195 left: 0,4196 right: "auto",4197 transform: "translateX(-100%)"4198 }), r || srv[t].show_button) {4199 var l = srv.addButton(t);4200 l.appendTo(s), setTimeout(function () {4201 l.addClass("allow-button");4202 }, 300);4203 }4204 return s.css(i).appendTo(a), sliderWidth(s), srv.jQuery(window).on("resize orientationchange", function () {4205 sliderWidth(s);4206 }), "open" === e && srv.jQuery(document).on("mopinion_loaded", function e(r) {4207 r.detail.key === t && r.detail.iframe && (srv.openSlider(!0, t), srv.jQuery(document).off("mopinion_loaded", e));4208 }), !0;4209 }4210 }4211 function openSlider(e, r) {4212 if (!r) {4213 if (1 !== ALL_KEYS.length) {4214 try {4215 srv.log("Key needed when multiple forms are initialized", !0, "warn");4216 } catch (e) {4217 }4218 return;4219 }4220 r = ALL_KEYS[0];4221 }4222 if (getCookie("MSopened") == r && !e || srv[r].modal_open) {4223 var t = "Not opening, reason: ";4224 srv[r].modal_open ? t += "Already open" : getCookie("MSopened") == r && (t += "Got a cookie, and not forced by user"), isPreview && srv.jQuery("#surveyPreviewMessageContent").html(t), srv.log(t);4225 } else {4226 e && srv.log("User forced opening of modal", !1, "info");4227 var a = srv.jQuery('[data-key="' + r + '"]'), s = a.closest(".surveyWindowWrap");4228 if (!a.length) return void srv.preloadSlider(r, "open");4229 srv[r].modalFirst = !0, animateTranslate(s, {4230 from: -1 < ["right", "bottom-left", "bottom-right"].indexOf(srv[r].slider.position) ? "100" : "-100",4231 to: "0",4232 type: -1 < ["left", "right"].indexOf(srv[r].slider.position) ? "x" : "y"4233 }, function () {4234 srv.jQuery("html,body").addClass("mopinion-slider-active"), srv[r].modal_open = !0, srv.triggerEvent({4235 event: "shown",4236 key: r4237 }), setCookies({type: "open", key: r});4238 });4239 }4240 return !0;4241 }4242 function closeSlider(e) {4243 if (srv[e].modal_open) {4244 var r = srv.jQuery('[data-key="' + e + '"]').closest(".surveyWindowWrap");4245 srv.clearCaptureEvents(e), animateTranslate(r, {4246 to: -1 < ["right", "bottom-left", "bottom-right"].indexOf(srv[e].slider.position) ? "100" : "-100",4247 type: -1 < ["left", "right"].indexOf(srv[e].slider.position) ? "x" : "y"4248 }, function () {4249 srv[e].modalFirst = !1;4250 var t = srv[e].modal_open = !1;4251 srv.jQuery.each(srv.ALL_KEYS, function (e, r) {4252 srv[r].modal_open && (t = !0);4253 }), t || srv.jQuery("html,body").removeClass("mopinion-slider-active"), srv.triggerEvent({4254 event: "hidden",4255 key: e4256 });4257 });4258 }4259 }4260 function sliderWidth(e) {4261 var r = srv.jQuery(window).width();4262 $iframe = !(!__MS.isDOM(e) && !__MS.isDOM(e[0])) && e, $iframe && (1200 < r ? frameWidth = "425px" : 992 < r && r < 1201 ? frameWidth = "380px" : r < 993 && 768 < r ? frameWidth = "380px" : r < 769 && 544 < r ? frameWidth = "320px" : r < 545 && (frameWidth = "260px"), $iframe.css({width: frameWidth}));4263 }4264 function animateTranslate(t, e, r) {4265 if (t && "object" == typeof e) {4266 var a = "y" != e.type ? "translateX" : "translateY", s = e.unit ? e.unit : "%", o = e.from || 0;4267 srv.jQuery({noop: o}).animate({noop: e.to}, {4268 duration: e.duration || 225, step: function (e, r) {4269 t.css("transform", a + "(" + e + s + ")");4270 }, complete: r || !14271 });4272 }4273 }4274 function clearForm(e) {4275 var r = srv.jQuery('[data-key="' + e + '"]'), t = r.closest(".surveyWindowWrap"),4276 a = srv.jQuery('[data-button-for="' + e + '"]');4277 return r.remove(), t.remove(), a.remove(), srv.jQuery("#SRVvars" + e).remove(), -1 < ALL_KEYS.indexOf(e) && ALL_KEYS.splice(ALL_KEYS.indexOf(e), 1), delete srv[e], srv.log("Form " + e + " cleared."), !0;4278 }4279 function getPreselectValue(e, r) {4280 return !!r && srv.getParameterByName(e, LOCATION_REF);4281 }4282 function loadWebFonts(e, r) {4283 if ("string" == typeof e && (e = [].concat(e)), e instanceof Array) {4284 var t = srv.jQuery.map(e, function (e) {4285 if (e && !fontIsLoaded(e)) return e;4286 });4287 if (t.length) {4288 var a = srv.jQuery.map(t, function (e) {4289 return e.replace(/ /g, "+");4290 }).join("|");4291 srv.log("Loading fonts: " + t.join(", "), !1, "info");4292 var s = "https://fonts.mopinion.com/css?family=" + a;4293 srv.appendStyle(s, "CUSTOMSRVFONTS" + r);4294 }4295 }4296 }4297 function fontIsLoaded(e) {4298 if (document.fonts && "function" == typeof document.fonts.check && window.chrome) return document.fonts.check("12px " + e);4299 var r = document.createElement("span");4300 r.innerHTML = "giItT1WQy@!-/#", r.style.position = "absolute", r.style.left = "-10000px", r.style.top = "-10000px", r.style.fontSize = "300px", r.style.fontFamily = "sans-serif", r.style.fontVariant = "normal", r.style.fontStyle = "normal", r.style.fontWeight = "normal", r.style.letterSpacing = "0", document.body.appendChild(r);4301 var t = r.offsetWidth;4302 r.style.fontFamily = e + ", sans-serif";4303 var a = r.offsetWidth !== t;4304 return r.parentNode.removeChild(r), a;4305 }4306 function addAnalytics(e, r) {4307 var t, a, s, o, n, i = e.GA_TRACKING_ID || srv[r].ga_id || "";4308 !e.TYPE && e.load_analytics && i ? (srv.appendScript("https://www.googletagmanager.com/gtag/js?id=" + i), window.dataLayer = window.dataLayer || [], window.gtag = function () {4309 dataLayer.push(arguments);4310 }, gtag("js", new Date), gtag("config", i)) : "analytics.js" === e.TYPE && e.load_analytics && i && (t = window, a = document, s = "ga", t.GoogleAnalyticsObject = s, t.ga = t.ga || function () {4311 (t.ga.q = t.ga.q || []).push(arguments);4312 }, t.ga.l = 1 * new Date, o = a.createElement("script"), n = a.getElementsByTagName("script")[0], o.async = 1, o.src = "https://www.google-analytics.com/analytics.js", n.parentNode.insertBefore(o, n), ga("create", i, "auto"), ga("send", "pageview"));4313 }4314 var Sobject = {};4315 Sobject.resizeListener = resizeListener, Sobject.callParentWindow = callParentWindow, Sobject.callChildWindow = callChildWindow, Sobject.resizeForm = resizeForm, Sobject.send = send, Sobject.appendScript = appendScript, Sobject.appendStyle = appendStyle, Sobject.loadHelpers = loadHelpers, Sobject.loadSurvey = loadSurvey, Sobject.loadJSON = loadJSON, Sobject.buildForm = buildForm, Sobject.generateHTML = generateHTML, Sobject.log = log, Sobject.prevPage = prevPage, Sobject.nextPage = nextPage, Sobject.setValue = setValue, Sobject.submitSurvey = submitSurvey, Sobject.openModal = openModal, Sobject.closeModal = closeModal, Sobject.hideLoader = hideLoader, Sobject.request = request, Sobject.updateProgress = updateProgress, Sobject.getLanguage = getLanguage, Sobject.removeButton = removeButton, Sobject.addButton = addButton, Sobject.showButton = showButton, Sobject.getParameterByName = getParameterByName, Sobject.makeStars = makeStars, Sobject.niceSelect = niceSelect, Sobject.setCookie = setCookie, Sobject.getCookie = getCookie, Sobject.setCookies = setCookies, Sobject.triggerEvent = triggerEvent, Sobject.on = EventHandler, Sobject.initEvent = EventInitializer, Sobject.loadjQuery = loadjQuery, Sobject.loadjQueryHandler = loadjQueryHandler, Sobject.proActiveOpen = proActiveOpen, Sobject.userExit = userExit, Sobject.triggerForUrl = triggerForUrl, Sobject.setPrefill = setPrefill, Sobject.hideBlock = hideBlock, Sobject.unhideBlock = unhideBlock, Sobject.scrollToFormPos = scrollToFormPos, Sobject.initCapture = initCapture, Sobject.catchCapture = catchCapture, Sobject.showModalPostCapture = showModalPostCapture, Sobject.clearCaptureEvents = clearCaptureEvents, Sobject.clearCaptureValues = clearCaptureValues, Sobject.getMeta = getMeta, Sobject.returnMeta = returnMeta, Sobject.fetchVariable = fetchVariable, Sobject.open = opener, Sobject.clearForm = clearForm, Sobject.loadWebFonts = loadWebFonts, Sobject.preloadSlider = preloadSlider, Sobject.openSlider = openSlider, Sobject.closeSlider = closeSlider, Sobject.sliderWidth = sliderWidth, Sobject.show_log = show_log, Sobject.ALL_KEYS = ALL_KEYS, Sobject.PUBLIC_LANDING = PUBLIC_LANDING, Sobject.LOCATION_REF = LOCATION_REF, Sobject.eventsHandlers = eventsHandlers;4316 try {4317 srv.log("loading Surveys " + version, !1, "info");4318 } catch (e) {4319 }4320 return Sobject;4321}(), mopinion = srv, __MS = function () {4322 MSobject = {};4323 var h = new RegExp(/^len[0-9]+/), _ = new RegExp(/^max_len[0-9]+/),4324 g = (new RegExp(/^(((0)[1-9]{2}[0-9][-]?[1-9][0-9]{5})|((\+31|0|0031)[1-9][0-9][-]?[1-9][0-9]{6}))|((\\+31|0|0031)6){1}[-]?[1-9]{1}[0-9]{7}$/), new RegExp(/^[1-9][0-9]{3}[\s]?[A-Za-z]{2}$/i), new RegExp(/^(\+){0,1}[0-9-.\(\)]{6,25}$/));4325 function b(e) {4326 var r = e.indexOf("@"), t = e.lastIndexOf(".");4327 return !(r < 1 || t < r + 2 || t + 2 >= e.length);4328 }4329 function j(e, r) {4330 for (var t = 0; t < e.length; t++) if ("string" == typeof r) {4331 if (e[t] == r) return !0;4332 } else if ("object" == typeof r && e[t].match(r)) return !0;4333 return !1;4334 }4335 return Array.prototype.indexOf || (Array.prototype.indexOf = function (e) {4336 for (var r = 0; r < this.length; r++) if (this[r] === e) return r;4337 return -1;4338 }), "function" != typeof window.CustomEvent && (window.customEvent = function (e, r) {4339 r = r || {bubbles: !1, cancelable: !1, detail: void 0};4340 var t = document.createEvent("CustomEvent");4341 return t.initCustomEvent(e, r.bubbles, r.cancelable, r.detail), t;4342 }), MSobject.inArray = j, MSobject.log = function (e, r, t) {4343 if (t && "log" != t) {4344 if ("warn" == t) {4345 if (srv.show_log || !0 === r) try {4346 console.warn(e);4347 } catch (e) {4348 }4349 } else if ("info" == t) {4350 if (srv.show_log || !0 === r) try {4351 console.info(e);4352 } catch (e) {4353 }4354 } else if ("error" == t) throw new Error(e);4355 } else if (srv.show_log || !0 === r) try {4356 console.log(e);4357 } catch (e) {4358 }4359 }, MSobject.validateAll = function (r, t) {4360 var a = !0;4361 if (r) {4362 var s = [];4363 for (var o in r) "string" == typeof r[o] && jQuery("#" + r[o]).hasClass("req") && s.push(jQuery("#" + r[o])[0]);4364 } else s = jQuery(".req").toArray();4365 for (var n = 0; n < s.length; n++) {4366 var i = s[n];4367 if (-1 != navigator.userAgent.indexOf("MSIE 8.0") ? (setTimeout(function () {4368 "object" == typeof i && i.focus();4369 }, 0), setTimeout(function () {4370 "object" == typeof i && i.blur();4371 }, 0)) : (i.focus(), i.blur()), "" == i.value || null == i.value || -1 != i.className.indexOf("numeric") && 0 == i.value || -1 != i.className.indexOf("phone") && !i.value.match(g)) {4372 var l = __MS.validateField(i);4373 t && t(i, l), a = !1;4374 }4375 "checkbox" == i.type && (__MS.unsetError(i), i.checked || (__MS.setError(i), a = !1));4376 }4377 if (0 != this.errors.length) if (r) for (e in this.errors) "function" != typeof this.errors[e] && -1 < r.indexOf(this.errors[e]) && (a = !1); else a = !1;4378 return a;4379 }, MSobject.validateEmail = b, MSobject.validateField = function (e, r, t) {4380 if ($field = jQuery(e), $field[0]) {4381 var a, s = !0, o = !1, n = !1, i = !0, l = !0, d = !0, c = !1, u = e.className.split(" "),4382 v = $field.hasClass("email"), p = $field.hasClass("numeric"), f = $field.hasClass("phone"),4383 y = $field.hasClass("req");4384 if (j(u, h) || j(u, _)) for (var m = 0; m < u.length; m++) -1 < u[m].search(h) && (n = u[m].replace("len", "")), -1 < u[m].search(_) && (o = u[m].replace("max_len", ""));4385 return jQuery.trim(e.value).length < n ? (s = !1, a = "too_short") : !1 !== o && jQuery.trim(e.value).length > o && e.value !== r && (s = !1, a = "too_long"), f && $field.val() != r && "" !== jQuery.trim($field.val()) && (e.value.match(g) || (d = !1)), p && $field.val() !== r && "" !== jQuery.trim($field.val()) && ((parseInt($field.val()) || parseFloat($field.val())) && isFinite($field.val()) && 0 != parseFloat($field.val()) || (l = !1)), v && "" !== jQuery.trim($field.val()) && (i = b($field.val())), !1 === l || !1 === i || !1 === d || !1 === s || ("" === jQuery.trim($field.val()) || null === $field.val() || $field.val() === r) && y ? (null !== r && "" === jQuery.trim($field.val()) && void 0 !== r && $field.val(r), i ? d ? l ? a || (a = "required") : a = "invalid_number" : a = "invalid_phone" : a = "invalid_email", __MS.setError($field), c = !1) : (__MS.unsetError($field), c = !0), return_obj = {4386 state: c,4387 code: a4388 };4389 }4390 }, MSobject.setError = function (e) {4391 var r = e.attr("id");4392 jQuery("#" + r + "_error_style"), j(this.errors, r) || this.errors.push(r), e.addClass("error"), e.parent().addClass("error");4393 }, MSobject.unsetError = function (e) {4394 e instanceof jQuery == 0 && (e = jQuery(e));4395 var t = e.attr("id"), a = this.errors;4396 e.removeClass("error"), e.parent().removeClass("error"), jQuery("#" + t + "_error").remove(), jQuery(a).each(function (e, r) {4397 r == t && delete a[e];4398 }), this.errors = function (e) {4399 var r = [];4400 for (var t in e) "function" != typeof e[t] && void 0 !== e[t] && r.push(e[t]);4401 return r;4402 }(a);4403 }, MSobject.getCookie = function (e) {4404 var r, t, a, s = document.cookie.split(";");4405 for (r = 0; r < s.length; r++) if (t = s[r].substr(0, s[r].indexOf("=")), a = s[r].substr(s[r].indexOf("=") + 1), (t = t.replace(/^\s+|\s+$/g, "")) == e) return unescape(a);4406 }, MSobject.setCookie = function (e, r, t, a, s) {4407 var o = new Date;4408 -1 == t ? (o.setMonth(o.getMonth() - 1), cexp = "expires=" + o + ";") : 1 == t ? (o.setMonth(o.getMonth() + 1), cexp = "expires=" + o + ";") : cexp = "", cpath = a ? "path=" + a + ";" : "path=" + document.location.pathname + ";", cdomain = s ? "domain=" + s + ";" : "";4409 var n = e + "=" + r + ";" + cexp + cpath + cdomain;4410 document.cookie = n;4411 }, MSobject.isDOM = function (e) {4412 return "HTMLElement" in window ? e && e instanceof HTMLElement : !(!e || "object" != typeof e || 1 !== e.nodeType || !e.nodeName);4413 }, MSobject.hammerTime = function () {4414 var e = window.MutationObserver || window.WebKitMutationObserver,4415 r = "ontouchstart" in window || window.DocumentTouch && document instanceof DocumentTouch;4416 if (void 0 === document.documentElement.style["touch-action"] && !document.documentElement.style["-ms-touch-action"] && r && e) {4417 window.Hammer = window.Hammer || {};4418 var t = /touch-action[:][\s]*(none)[^;'"]*/, a = /touch-action[:][\s]*(manipulation)[^;'"]*/,4419 s = /touch-action/, o = !!navigator.userAgent.match(/(iPad|iPhone|iPod)/g), n = function () {4420 try {4421 var e = document.createElement("canvas");4422 return !(!window.WebGLRenderingContext || !e.getContext("webgl") && !e.getContext("experimental-webgl"));4423 } catch (e) {4424 return !1;4425 }4426 }() && o;4427 window.Hammer.time = {4428 getTouchAction: function (e) {4429 return this.checkStyleString(e.getAttribute("style"));4430 }, checkStyleString: function (e) {4431 if (s.test(e)) return t.test(e) ? "none" : !a.test(e) || "manipulation";4432 }, shouldHammer: function (e) {4433 var r = this.hasParent(e.target);4434 return !(!r || n && !(Date.now() - e.target.lastStart < 125)) && r;4435 }, touchHandler: function (e) {4436 var r = e.target.getBoundingClientRect(), t = r.top !== this.pos.top || r.left !== this.pos.left,4437 a = this.shouldHammer(e);4438 ("none" === a || !1 === t && "manipulation" === a) && ("touchend" === e.type && (e.target.focus(), setTimeout(function () {4439 e.target.click();4440 }, 0)), e.preventDefault()), this.scrolled = !1, delete e.target.lastStart;4441 }, touchStart: function (e) {4442 this.pos = e.target.getBoundingClientRect(), n && this.hasParent(e.target) && (e.target.lastStart = Date.now());4443 }, styleWatcher: function (e) {4444 e.forEach(this.styleUpdater, this);4445 }, styleUpdater: function (e) {4446 if (e.target.updateNext) e.target.updateNext = !1; else {4447 var r = this.getTouchAction(e.target);4448 r ? "none" !== r && (e.target.hadTouchNone = !1) : !r && (e.oldValue && this.checkStyleString(e.oldValue) || e.target.hadTouchNone) && (e.target.hadTouchNone = !0, e.target.updateNext = !1, e.target.setAttribute("style", e.target.getAttribute("style") + " touch-action: none;"));4449 }4450 }, hasParent: function (e) {4451 for (var r, t = e; t && t.parentNode; t = t.parentNode) if (r = this.getTouchAction(t)) return r;4452 return !1;4453 }, installStartEvents: function () {4454 document.addEventListener("touchstart", this.touchStart.bind(this)), document.addEventListener("mousedown", this.touchStart.bind(this));4455 }, installEndEvents: function () {4456 document.addEventListener("touchend", this.touchHandler.bind(this), !0), document.addEventListener("mouseup", this.touchHandler.bind(this), !0);4457 }, installObserver: function () {4458 this.observer = new e(this.styleWatcher.bind(this)).observe(document, {4459 subtree: !0,4460 attributes: !0,4461 attributeOldValue: !0,4462 attributeFilter: ["style"]4463 });4464 }, install: function () {4465 this.installEndEvents(), this.installStartEvents(), this.installObserver();4466 }4467 }, window.Hammer.time.install();4468 }4469 }, MSobject.extend = function (e) {4470 e = e || {};4471 for (var r = 1; r < arguments.length; r++) if (arguments[r]) for (var t in arguments[r]) arguments[r].hasOwnProperty(t) && (e[t] = arguments[r][t]);4472 return e;4473 }, MSobject.errors = [], MSobject;...

Full Screen

Full Screen

frames.js

Source:frames.js Github

copy

Full Screen

...616 const result = await arrayHandle.evaluateExpressionAndWaitForSignals(expression, isFunction, true, arg);617 arrayHandle.dispose();618 return result;619 }620 async maskSelectors(selectors) {621 const context = await this._utilityContext();622 const injectedScript = await context.injectedScript();623 await injectedScript.evaluate((injected, {624 parsed625 }) => {626 injected.maskSelectors(parsed);627 }, {628 parsed: selectors629 });630 }631 async querySelectorAll(selector) {632 const pair = await this.resolveFrameForSelectorNoWait(selector, {});633 if (!pair) return [];634 return this._page.selectors._queryAll(pair.frame, pair.info, undefined, true635 /* adoptToMain */636 );637 }638 async queryCount(selector) {639 const pair = await this.resolveFrameForSelectorNoWait(selector);640 if (!pair) throw new Error(`Error: failed to find frame for selector "${selector}"`);...

Full Screen

Full Screen

screenshotter.js

Source:screenshotter.js Github

copy

Full Screen

...203 if (pair) framesToParsedSelectors.set(pair.frame, pair.info.parsed);204 }));205 progress.throwIfAborted(); // Avoid extra work.206 await Promise.all([...framesToParsedSelectors.keys()].map(async frame => {207 await frame.maskSelectors(framesToParsedSelectors.get(frame));208 }));209 progress.cleanupWhenAborted(() => this._page.hideHighlight());210 return true;211 }212 async _screenshot(progress, format, documentRect, viewportRect, fitsViewport, options) {213 if (options.__testHookBeforeScreenshot) await options.__testHookBeforeScreenshot();214 progress.throwIfAborted(); // Screenshotting is expensive - avoid extra work.215 const shouldSetDefaultBackground = options.omitBackground && format === 'png';216 if (shouldSetDefaultBackground) {217 await this._page._delegate.setBackgroundColor({218 r: 0,219 g: 0,220 b: 0,221 a: 0...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1const { maskSelectors } = require('@playwright/test/lib/utils/instrument');2const { chromium } = require('playwright');3(async () => {4 const browser = await chromium.launch();5 const context = await browser.newContext();6 const page = await context.newPage();7 await page.fill('#search', 'Hello World');8 await page.click('text=Get Started');9 await page.screenshot({ path: `screenshot.png` });10 await browser.close();11})();12const { maskSelectors } = require('@playwright/test/lib/utils/instrument');13const { chromium } = require('playwright');14(async () => {15 const browser = await chromium.launch();16 const context = await browser.newContext();17 const page = await context.newPage();18 await page.fill('#search', 'Hello World');19 await page.click('text=Get Started');20 await page.screenshot({ path: `screenshot.png` });21 await browser.close();22})();23const maskedSelectors = maskSelectors(['#search', 'text=Get Started'], {

Full Screen

Using AI Code Generation

copy

Full Screen

1const { maskSelectors } = require('@playwright/test/lib/utils/stackTrace');2const stack = new Error().stack;3console.log(maskSelectors(stack));4const { maskSelectors } = require('@playwright/test/lib/utils/stackTrace');5const stack = new Error().stack;6console.log(maskSelectors(stack, { maskOptions: { rootDir: __dirname } }));

Full Screen

Using AI Code Generation

copy

Full Screen

1const { maskSelectors } = require('@playwright/test/lib/utils/selectorMasking');2const masked = maskSelectors('div[data-testid="foo"]', ['div[data-testid="foo"]']);3console.log(masked);4const { maskSelectors } = require('@playwright/test/lib/utils/selectorMasking');5const masked = maskSelectors('div[data-testid="foo"]', ['div[data-testid="foo"]']);6console.log(masked);7const { maskSelectors } = require('@playwright/test/lib/utils/selectorMasking');8const masked = maskSelectors('div[data-testid="foo"]', ['div[data-testid="foo"]']);9console.log(masked);10const { maskSelectors } = require('@playwright/test/lib/utils/selectorMasking');11const masked = maskSelectors('div[data-testid="foo"]', ['div[data-testid="foo"]']);12console.log(masked);13const { maskSelectors } = require('@playwright/test/lib/utils/selectorMasking');14const masked = maskSelectors('div[data-testid="foo"]', ['div[data-testid="foo"]']);15console.log(masked);16const { maskSelectors } = require('@playwright/test/lib/utils/selectorMasking');17const masked = maskSelectors('div[data-testid="foo"]', ['div[data-testid="foo"]']);18console.log(masked);19const { maskSelectors } = require('@playwright/test/lib/utils/selectorMasking');20const masked = maskSelectors('div[data-testid="foo"]', ['div[data-testid="foo"]']);21console.log(masked);

Full Screen

Using AI Code Generation

copy

Full Screen

1const { chromium } = require('playwright');2const { maskSelectors } = require('playwright/lib/server/recorder/recorderUtils');3(async () => {4 const browser = await chromium.launch();5 const context = await browser.newContext();6 const page = await context.newPage();7 const element = await page.$('a[href="/docs"]');8 const maskedSelector = maskSelectors([await element.getAttribute('href')], page);9 console.log(maskedSelector);10 await browser.close();11})();

Full Screen

Using AI Code Generation

copy

Full Screen

1const { maskSelectors } = require('@playwright/test/lib/utils/selectorEngine');2console.log(maskSelectors('div#id.class1.class2', ['class1', 'class2']));3const { maskSelectors } = require('@playwright/test/lib/utils/selectorEngine');4console.log(maskSelectors('div#id.class1.class2', ['class1', 'class2'], ''));5const { maskSelectors } = require('@playwright/test/lib/utils/selectorEngine');6console.log(maskSelectors('div#id.class1.class2', ['class1', 'class2'], 'class'));7const { maskSelectors } = require('@playwright/test/lib/utils/selectorEngine');8console.log(maskSelectors('div#id.class1.class2', ['class1', 'class2'], 'class1'));9const { maskSelectors } = require('@playwright/test/lib/utils/selectorEngine');10console.log(maskSelectors('div#id.class1.class2', ['class1', 'class2'], 'class2'));11const { maskSelectors } = require('@playwright/test/lib/utils/selectorEngine');12console.log(maskSelectors('div#id.class1.class2', ['class1', 'class2'], 'class3'));13const { maskSelectors } = require('@playwright/test/lib/utils/selectorEngine');14console.log(maskSelectors('div#id.class1.class2', ['class1', 'class2'], 'class1 class2'));15const { maskSelectors } = require('@playwright/test/lib/utils

Full Screen

Using AI Code Generation

copy

Full Screen

1const { maskSelectors } = require('playwright/lib/server/dom.js');2const masked = maskSelectors('div[data-test="test"]', ['data-test']);3const { maskText } = require('playwright/lib/server/dom.js');4const masked = maskText('div[data-test="test"]', 'test');5const { parseSelector } = require('playwright/lib/server/dom.js');6const parsed = parseSelector('div[data-test="test"]');7const { serializeAsCallArgument } = require('playwright/lib/server/serializers.js');8const serialized = serializeAsCallArgument('test');9const { serializeError } = require('playwright/lib/server/serializers.js');10const serialized = serializeError(new Error('Error'));11const { serializeResult } = require('playwright/lib/server/serializers.js');12const serialized = serializeResult('test');13const { serializeValue } = require('playwright/lib/server/serializers.js');14const serialized = serializeValue('test');15const { setDebugMode } = require('playwright/lib/server/supplements.js');16const debugMode = setDebugMode(true);

Full Screen

Using AI Code Generation

copy

Full Screen

1const {chromium} = require('playwright');2const { maskSelectors } = require('@playwright/test/lib/utils/maskSelectors');3const mask = maskSelectors('test.js', [4]);5const unmask = maskSelectors('test.js', [6]);7(async () => {8 const browser = await chromium.launch({ headless: false });9 const page = await browser.newPage();10 const context = await browser.newContext();11 const page2 = await context.newPage();12 await page.click(mask('.selector1'));13 await page2.click(unmask('.selector2'));14 await browser.close();15})();

Full Screen

Playwright tutorial

LambdaTest’s Playwright tutorial will give you a broader idea about the Playwright automation framework, its unique features, and use cases with examples to exceed your understanding of Playwright testing. This tutorial will give A to Z guidance, from installing the Playwright framework to some best practices and advanced concepts.

Chapters:

  1. What is Playwright : Playwright is comparatively new but has gained good popularity. Get to know some history of the Playwright with some interesting facts connected with it.
  2. How To Install Playwright : Learn in detail about what basic configuration and dependencies are required for installing Playwright and run a test. Get a step-by-step direction for installing the Playwright automation framework.
  3. Playwright Futuristic Features: Launched in 2020, Playwright gained huge popularity quickly because of some obliging features such as Playwright Test Generator and Inspector, Playwright Reporter, Playwright auto-waiting mechanism and etc. Read up on those features to master Playwright testing.
  4. What is Component Testing: Component testing in Playwright is a unique feature that allows a tester to test a single component of a web application without integrating them with other elements. Learn how to perform Component testing on the Playwright automation framework.
  5. Inputs And Buttons In Playwright: Every website has Input boxes and buttons; learn about testing inputs and buttons with different scenarios and examples.
  6. Functions and Selectors in Playwright: Learn how to launch the Chromium browser with Playwright. Also, gain a better understanding of some important functions like “BrowserContext,” which allows you to run multiple browser sessions, and “newPage” which interacts with a page.
  7. Handling Alerts and Dropdowns in Playwright : Playwright interact with different types of alerts and pop-ups, such as simple, confirmation, and prompt, and different types of dropdowns, such as single selector and multi-selector get your hands-on with handling alerts and dropdown in Playright testing.
  8. Playwright vs Puppeteer: Get to know about the difference between two testing frameworks and how they are different than one another, which browsers they support, and what features they provide.
  9. Run Playwright Tests on LambdaTest: Playwright testing with LambdaTest leverages test performance to the utmost. You can run multiple Playwright tests in Parallel with the LammbdaTest test cloud. Get a step-by-step guide to run your Playwright test on the LambdaTest platform.
  10. Playwright Python Tutorial: Playwright automation framework support all major languages such as Python, JavaScript, TypeScript, .NET and etc. However, there are various advantages to Python end-to-end testing with Playwright because of its versatile utility. Get the hang of Playwright python testing with this chapter.
  11. Playwright End To End Testing Tutorial: Get your hands on with Playwright end-to-end testing and learn to use some exciting features such as TraceViewer, Debugging, Networking, Component testing, Visual testing, and many more.
  12. Playwright Video Tutorial: Watch the video tutorials on Playwright testing from experts and get a consecutive in-depth explanation of Playwright automation testing.

Run Playwright Internal automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful