Файловый менеджер - Редактировать - /home/jogoso94/public_html/jogos/klondike_3/js/main.js
�азад
/* Platform.js <https://mths.be/platform> Copyright 2014-2018 Benjamin Tan <https://bnjmnt4n.now.sh/> Copyright 2011-2013 John-David Dalton Available under MIT license <https://mths.be/mit> */ (function() { function a(k) { k = String(k); return k.charAt(0).toUpperCase() + k.slice(1) } function d(k, L) { var w = -1, v = k ? k.length : 0; if ("number" == typeof v && -1 < v && v <= I) for (; ++w < v;) L(k[w], w, k); else f(k, L) } function b(k) { k = String(k).replace(/^ +| +$/g, ""); return /^(?:webOS|i(?:OS|P))/.test(k) ? k : a(k) } function f(k, L) { for (var w in k) G.call(k, w) && L(k[w], w, k) } function n(k) { return null == k ? a(k) : K.call(k).slice(8, -1) } function m(k, L) { var w = null != k ? typeof k[L] : "number"; return !/^(?:boolean|number|string|undefined)$/.test(w) && ("object" == w ? !!k[L] : !0) } function t(k) { return String(k).replace(/([ -])(?!$)/g, "$1?") } function r(k, L) { var w = null; d(k, function(v, A) { w = L(w, v, A, k) }); return w } function h(k) { function L(H) { return r(H, function(B, N) { var R = N.pattern || t(N); !B && (B = RegExp("\\b" + R + " *\\d+[.\\w_]*", "i").exec(k) || RegExp("\\b" + R + " *\\w+-[\\w]*", "i").exec(k) || RegExp("\\b" + R + "(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)", "i").exec(k)) && ((B = String(N.label && !RegExp(R, "i").test(N.label) ? N.label : B).split("/"))[1] && !/[\d.]+/.test(B[0]) && (B[0] += " " + B[1]), N = N.label || N, B = b(B[0].replace(RegExp(R, "i"), N).replace(RegExp("; *(?:" + N + "[_-])?", "i"), " ").replace(RegExp("(" + N + ")[-_.]?(\\w)", "i"), "$1 $2"))); return B }) } function w(H) { return r(H, function(B, N) { return B || (RegExp(N + "(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)", "i").exec(k) || 0)[1] || null }) } var v = x, A = k && "object" == typeof k && "String" != n(k); A && (v = k, k = null); var l = v.navigator || {}, u = l.userAgent || ""; k || (k = u); var O = A ? !!l.likeChrome : /\bChrome\b/.test(k) && !/internal|\n/i.test(K.toString()), P = A ? "Object" : "ScriptBridgingProxyObject", F = A ? "Object" : "Environment", S = A && v.java ? "JavaPackage" : n(v.java), ba = A ? "Object" : "RuntimeObject"; F = (S = /\bJava/.test(S) && v.java) && n(v.environment) == F; var T = S ? "a" : "\u03b1", Q = S ? "b" : "\u03b2", Z = v.document || {}, U = v.operamini || v.opera, X = z.test(X = A && U ? U["[[Class]]"] : n(U)) ? X : U = null, g, aa = k; A = []; var Y = null, V = k == u; u = V && U && "function" == typeof U.version && U.version(); var M = function(H) { return r(H, function(B, N) { return B || RegExp("\\b" + (N.pattern || t(N)) + "\\b", "i").exec(k) && (N.label || N) }) }([{ label: "EdgeHTML", pattern: "Edge" }, "Trident", { label: "WebKit", pattern: "AppleWebKit" }, "iCab", "Presto", "NetFront", "Tasman", "KHTML", "Gecko"]), y = function(H) { return r(H, function(B, N) { return B || RegExp("\\b" + (N.pattern || t(N)) + "\\b", "i").exec(k) && (N.label || N) }) }(["Adobe AIR", "Arora", "Avant Browser", "Breach", "Camino", "Electron", "Epiphany", "Fennec", "Flock", "Galeon", "GreenBrowser", "iCab", "Iceweasel", "K-Meleon", "Konqueror", "Lunascape", "Maxthon", { label: "Microsoft Edge", pattern: "Edge" }, "Midori", "Nook Browser", "PaleMoon", "PhantomJS", "Raven", "Rekonq", "RockMelt", { label: "Samsung Internet", pattern: "SamsungBrowser" }, "SeaMonkey", { label: "Silk", pattern: "(?:Cloud9|Silk-Accelerated)" }, "Sleipnir", "SlimBrowser", { label: "SRWare Iron", pattern: "Iron" }, "Sunrise", "Swiftfox", "Waterfox", "WebPositive", "Opera Mini", { label: "Opera Mini", pattern: "OPiOS" }, "Opera", { label: "Opera", pattern: "OPR" }, "Chrome", { label: "Chrome Mobile", pattern: "(?:CriOS|CrMo)" }, { label: "Firefox", pattern: "(?:Firefox|Minefield)" }, { label: "Firefox for iOS", pattern: "FxiOS" }, { label: "IE", pattern: "IEMobile" }, { label: "IE", pattern: "MSIE" }, "Safari" ]), c = L([{ label: "BlackBerry", pattern: "BB10" }, "BlackBerry", { label: "Galaxy S", pattern: "GT-I9000" }, { label: "Galaxy S2", pattern: "GT-I9100" }, { label: "Galaxy S3", pattern: "GT-I9300" }, { label: "Galaxy S4", pattern: "GT-I9500" }, { label: "Galaxy S5", pattern: "SM-G900" }, { label: "Galaxy S6", pattern: "SM-G920" }, { label: "Galaxy S6 Edge", pattern: "SM-G925" }, { label: "Galaxy S7", pattern: "SM-G930" }, { label: "Galaxy S7 Edge", pattern: "SM-G935" }, "Google TV", "Lumia", "iPad", "iPod", "iPhone", "Kindle", { label: "Kindle Fire", pattern: "(?:Cloud9|Silk-Accelerated)" }, "Nexus", "Nook", "PlayBook", "PlayStation Vita", "PlayStation", "TouchPad", "Transformer", { label: "Wii U", pattern: "WiiU" }, "Wii", "Xbox One", { label: "Xbox 360", pattern: "Xbox" }, "Xoom" ]), p = function(H) { return r(H, function(B, N, R) { return B || (N[c] || N[/^[a-z]+(?: +[a-z]+\b)*/i.exec(c)] || RegExp("\\b" + t(R) + "(?:\\b|\\w*\\d)", "i").exec(k)) && R }) }({ Apple: { iPad: 1, iPhone: 1, iPod: 1 }, Archos: {}, Amazon: { Kindle: 1, "Kindle Fire": 1 }, Asus: { Transformer: 1 }, "Barnes & Noble": { Nook: 1 }, BlackBerry: { PlayBook: 1 }, Google: { "Google TV": 1, Nexus: 1 }, HP: { TouchPad: 1 }, HTC: {}, LG: {}, Microsoft: { Xbox: 1, "Xbox One": 1 }, Motorola: { Xoom: 1 }, Nintendo: { "Wii U": 1, Wii: 1 }, Nokia: { Lumia: 1 }, Samsung: { "Galaxy S": 1, "Galaxy S2": 1, "Galaxy S3": 1, "Galaxy S4": 1 }, Sony: { PlayStation: 1, "PlayStation Vita": 1 } }), e = function(H) { return r(H, function(B, N) { var R = N.pattern || t(N); if (!B && (B = RegExp("\\b" + R + "(?:/[\\d.]+|[ \\w.]*)", "i").exec(k))) { var W = B, ca = N.label || N, da = { "10.0": "10", "6.4": "10 Technical Preview", "6.3": "8.1", "6.2": "8", "6.1": "Server 2008 R2 / 7", "6.0": "Server 2008 / Vista", "5.2": "Server 2003 / XP 64-bit", "5.1": "XP", "5.01": "2000 SP1", "5.0": "2000", "4.0": "NT", "4.90": "ME" }; R && ca && /^Win/i.test(W) && !/^Windows Phone /i.test(W) && (da = da[/[\d.]+$/.exec(W)]) && (W = "Windows " + da); W = String(W); R && ca && (W = W.replace(RegExp(R, "i"), ca)); B = W = b(W.replace(/ ce$/i, " CE").replace(/\bhpw/i, "web").replace(/\bMacintosh\b/, "Mac OS").replace(/_PowerPC\b/i, " OS").replace(/\b(OS X) [^ \d]+/i, "$1").replace(/\bMac (OS X)\b/, "$1").replace(/\/(\d)/, " $1").replace(/_/g, ".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i, "").replace(/\bx86\.64\b/gi, "x86_64").replace(/\b(Windows Phone) OS\b/, "$1").replace(/\b(Chrome OS \w+) [\d.]+\b/, "$1").split(" on ")[0]) } return B }) }(["Windows Phone", "Android", "CentOS", { label: "Chrome OS", pattern: "CrOS" }, "Debian", "Fedora", "FreeBSD", "Gentoo", "Haiku", "Kubuntu", "Linux Mint", "OpenBSD", "Red Hat", "SuSE", "Ubuntu", "Xubuntu", "Cygwin", "Symbian OS", "hpwOS", "webOS ", "webOS", "Tablet OS", "Tizen", "Linux", "Mac OS X", "Macintosh", "Mac", "Windows 98;", "Windows " ]); M && (M = [M]); p && !c && (c = L([p])); if (g = /\bGoogle TV\b/.exec(c)) c = g[0]; /\bSimulator\b/i.test(k) && (c = (c ? c + " " : "") + "Simulator"); "Opera Mini" == y && /\bOPiOS\b/.test(k) && A.push("running in Turbo/Uncompressed mode"); "IE" == y && /\blike iPhone OS\b/.test(k) ? (g = h(k.replace(/like iPhone OS/, "")), p = g.manufacturer, c = g.product) : /^iP/.test(c) ? (y || (y = "Safari"), e = "iOS" + ((g = / OS ([\d_]+)/i.exec(k)) ? " " + g[1].replace(/_/g, ".") : "")) : "Konqueror" != y || /buntu/i.test(e) ? p && "Google" != p && (/Chrome/.test(y) && !/\bMobile Safari\b/i.test(k) || /\bVita\b/.test(c)) || /\bAndroid\b/.test(e) && /^Chrome/.test(y) && /\bVersion\//i.test(k) ? (y = "Android Browser", e = /\bAndroid\b/.test(e) ? e : "Android") : "Silk" == y ? (/\bMobi/i.test(k) || (e = "Android", A.unshift("desktop mode")), /Accelerated *= *true/i.test(k) && A.unshift("accelerated")) : "PaleMoon" == y && (g = /\bFirefox\/([\d.]+)\b/.exec(k)) ? A.push("identifying as Firefox " + g[1]) : "Firefox" == y && (g = /\b(Mobile|Tablet|TV)\b/i.exec(k)) ? (e || (e = "Firefox OS"), c || (c = g[1])) : !y || (g = !/\bMinefield\b/i.test(k) && /\b(?:Firefox|Safari)\b/.exec(y)) ? (y && !c && /[\/,]|^[^(]+?\)/.test(k.slice(k.indexOf(g + "/") + 8)) && (y = null), (g = c || p || e) && (c || p || /\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(e)) && (y = /[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(e) ? e : g) + " Browser")) : "Electron" == y && (g = (/\bChrome\/([\d.]+)\b/.exec(k) || 0)[1]) && A.push("Chromium " + g) : e = "Kubuntu"; u || (u = w(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))", "Version", t(y), "(?:Firefox|Minefield|NetFront)" ])); if (g = "iCab" == M && 3 < parseFloat(u) && "WebKit" || /\bOpera\b/.test(y) && (/\bOPR\b/.test(k) ? "Blink" : "Presto") || /\b(?:Midori|Nook|Safari)\b/i.test(k) && !/^(?:Trident|EdgeHTML)$/.test(M) && "WebKit" || !M && /\bMSIE\b/i.test(k) && ("Mac OS" == e ? "Tasman" : "Trident") || "WebKit" == M && /\bPlayStation\b(?! Vita\b)/i.test(y) && "NetFront") M = [g]; "IE" == y && (g = (/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(k) || 0)[1]) ? (y += " Mobile", e = "Windows Phone " + (/\+$/.test(g) ? g : g + ".x"), A.unshift("desktop mode")) : /\bWPDesktop\b/i.test(k) ? (y = "IE Mobile", e = "Windows Phone 8.x", A.unshift("desktop mode"), u || (u = (/\brv:([\d.]+)/.exec(k) || 0)[1])) : "IE" != y && "Trident" == M && (g = /\brv:([\d.]+)/.exec(k)) && (y && A.push("identifying as " + y + (u ? " " + u : "")), y = "IE", u = g[1]); if (V) { if (m(v, "global")) if (S && (g = S.lang.System, aa = g.getProperty("os.arch"), e = e || g.getProperty("os.name") + " " + g.getProperty("os.version")), F) { try { u = v.require("ringo/engine").version.join("."), y = "RingoJS" } catch (H) { (g = v.system) && g.global.system == v.system && (y = "Narwhal", e || (e = g[0].os || null)) } y || (y = "Rhino") } else "object" == typeof v.process && !v.process.browser && (g = v.process) && ("object" == typeof g.versions && ("string" == typeof g.versions.electron ? (A.push("Node " + g.versions.node), y = "Electron", u = g.versions.electron) : "string" == typeof g.versions.nw && (A.push("Chromium " + u, "Node " + g.versions.node), y = "NW.js", u = g.versions.nw)), y || (y = "Node.js", aa = g.arch, e = g.platform, u = (u = /[\d.]+/.exec(g.version)) ? u[0] : null)); else n(g = v.runtime) == P ? (y = "Adobe AIR", e = g.flash.system.Capabilities.os) : n(g = v.phantom) == ba ? (y = "PhantomJS", u = (g = g.version || null) && g.major + "." + g.minor + "." + g.patch) : "number" == typeof Z.documentMode && (g = /\bTrident\/(\d+)/i.exec(k)) ? (u = [u, Z.documentMode], (g = +g[1] + 4) != u[1] && (A.push("IE " + u[1] + " mode"), M && (M[1] = ""), u[1] = g), u = "IE" == y ? String(u[1].toFixed(1)) : u[0]) : "number" == typeof Z.documentMode && /^(?:Chrome|Firefox)\b/.test(y) && (A.push("masking as " + y + " " + u), y = "IE", u = "11.0", M = ["Trident"], e = "Windows"); e = e && b(e) } u && (g = /(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(u) || /(?:alpha|beta)(?: ?\d)?/i.exec(k + ";" + (V && l.appMinorVersion)) || /\bMinefield\b/i.test(k) && "a") && (Y = /b/i.test(g) ? "beta" : "alpha", u = u.replace(RegExp(g + "\\+?$"), "") + ("beta" == Y ? Q : T) + (/\d+\+?/.exec(g) || "")); if ("Fennec" == y || "Firefox" == y && /\b(?:Android|Firefox OS)\b/.test(e)) y = "Firefox Mobile"; else if ("Maxthon" == y && u) u = u.replace(/\.[\d.]+/, ".x"); else if (/\bXbox\b/i.test(c)) "Xbox 360" == c && (e = null), "Xbox 360" == c && /\bIEMobile\b/.test(k) && A.unshift("mobile mode"); else if (!/^(?:Chrome|IE|Opera)$/.test(y) && (!y || c || /Browser|Mobi/.test(y)) || "Windows CE" != e && !/Mobi/i.test(k)) if ("IE" == y && V) try { null === v.external && A.unshift("platform preview") } catch (H) { A.unshift("embedded") } else(/\bBlackBerry\b/.test(c) || /\bBB10\b/.test(k)) && (g = (RegExp(c.replace(/ +/g, " *") + "/([.\\d]+)", "i").exec(k) || 0)[1] || u) ? (g = [g, /BB10/.test(k)], e = (g[1] ? (c = null, p = "BlackBerry") : "Device Software") + " " + g[0], u = null) : this != f && "Wii" != c && (V && U || /Opera/.test(y) && /\b(?:MSIE|Firefox)\b/i.test(k) || "Firefox" == y && /\bOS X (?:\d+\.){2,}/.test(e) || "IE" == y && (e && !/^Win/.test(e) && 5.5 < u || /\bWindows XP\b/.test(e) && 8 < u || 8 == u && !/\bTrident\b/.test(k))) && !z.test(g = h.call(f, k.replace(z, "") + ";")) && g.name && (g = "ing as " + g.name + ((g = g.version) ? " " + g : ""), z.test(y) ? (/\bIE\b/.test(g) && "Mac OS" == e && (e = null), g = "identify" + g) : (g = "mask" + g, y = X ? b(X.replace(/([a-z])([A-Z])/g, "$1 $2")) : "Opera", /\bIE\b/.test(g) && (e = null), V || (u = null)), M = ["Presto"], A.push(g)); else y += " Mobile"; if (g = (/\bAppleWebKit\/([\d.]+\+?)/i.exec(k) || 0)[1]) { g = [parseFloat(g.replace(/\.(\d)$/, ".0$1")), g]; if ("Safari" == y && "+" == g[1].slice(-1)) y = "WebKit Nightly", Y = "alpha", u = g[1].slice(0, -1); else if (u == g[1] || u == (g[2] = (/\bSafari\/([\d.]+\+?)/i.exec(k) || 0)[1])) u = null; g[1] = (/\bChrome\/([\d.]+)/i.exec(k) || 0)[1]; 537.36 == g[0] && 537.36 == g[2] && 28 <= parseFloat(g[1]) && "WebKit" == M && (M = ["Blink"]); V && (O || g[1]) ? (M && (M[1] = "like Chrome"), g = g[1] || (g = g[0], 530 > g ? 1 : 532 > g ? 2 : 532.05 > g ? 3 : 533 > g ? 4 : 534.03 > g ? 5 : 534.07 > g ? 6 : 534.1 > g ? 7 : 534.13 > g ? 8 : 534.16 > g ? 9 : 534.24 > g ? 10 : 534.3 > g ? 11 : 535.01 > g ? 12 : 535.02 > g ? "13+" : 535.07 > g ? 15 : 535.11 > g ? 16 : 535.19 > g ? 17 : 536.05 > g ? 18 : 536.1 > g ? 19 : 537.01 > g ? 20 : 537.11 > g ? "21+" : 537.13 > g ? 23 : 537.18 > g ? 24 : 537.24 > g ? 25 : 537.36 > g ? 26 : "Blink" != M ? "27" : "28")) : (M && (M[1] = "like Safari"), g = (g = g[0], 400 > g ? 1 : 500 > g ? 2 : 526 > g ? 3 : 533 > g ? 4 : 534 > g ? "4+" : 535 > g ? 5 : 537 > g ? 6 : 538 > g ? 7 : 601 > g ? 8 : "8")); M && (M[1] += " " + (g += "number" == typeof g ? ".x" : /[.+]/.test(g) ? "" : "+")); "Safari" == y && (!u || 45 < parseInt(u)) && (u = g) } "Opera" == y && (g = /\bzbov|zvav$/.exec(e)) ? (y += " ", A.unshift("desktop mode"), "zvav" == g ? (y += "Mini", u = null) : y += "Mobile", e = e.replace(RegExp(" *" + g + "$"), "")) : "Safari" == y && /\bChrome\b/.exec(M && M[1]) && (A.unshift("desktop mode"), y = "Chrome Mobile", u = null, /\bOS X\b/.test(e) ? (p = "Apple", e = "iOS 4.3+") : e = null); u && 0 == u.indexOf(g = /[\d.]+$/.exec(e)) && -1 < k.indexOf("/" + g + "-") && (e = String(e.replace(g, "")).replace(/^ +| +$/g, "")); M && !/\b(?:Avant|Nook)\b/.test(y) && (/Browser|Lunascape|Maxthon/.test(y) || "Safari" != y && /^iOS/.test(e) && /\bSafari\b/.test(M[1]) || /^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(y) && M[1]) && (g = M[M.length - 1]) && A.push(g); A.length && (A = ["(" + A.join("; ") + ")"]); p && c && 0 > c.indexOf(p) && A.push("on " + p); c && A.push((/^on /.test(A[A.length - 1]) ? "" : "on ") + c); if (e) { var J = (g = / ([\d.+]+)$/.exec(e)) && "/" == e.charAt(e.length - g[0].length - 1); e = { architecture: 32, family: g && !J ? e.replace(g[0], "") : e, version: g ? g[1] : null, toString: function() { var H = this.version; return this.family + (H && !J ? " " + H : "") + (64 == this.architecture ? " 64-bit" : "") } } }(g = /\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(aa)) && !/\bi686\b/i.test(aa) ? (e && (e.architecture = 64, e.family = e.family.replace(RegExp(" *" + g), "")), y && (/\bWOW64\b/i.test(k) || V && /\w(?:86|32)$/.test(l.cpuClass || l.platform) && !/\bWin64; x64\b/i.test(k)) && A.unshift("32-bit")) : e && /^OS X/.test(e.family) && "Chrome" == y && 39 <= parseFloat(u) && (e.architecture = 64); k || (k = null); v = {}; v.description = k; v.layout = M && M[0]; v.manufacturer = p; v.name = y; v.prerelease = Y; v.product = c; v.ua = k; v.version = y && u; v.os = e || { architecture: null, family: null, version: null, toString: function() { return "null" } }; v.parse = h; v.toString = function() { return this.description || "" }; v.version && A.unshift(u); v.name && A.unshift(y); e && y && (e != String(e).split(" ")[0] || e != y.split(" ")[0] && !c) && A.push(c ? "(" + e + ")" : "on " + e); A.length && (v.description = A.join(" ")); return v } var q = { "function": !0, object: !0 }, x = q[typeof window] && window || this, D = q[typeof exports] && exports; q = q[typeof module] && module && !module.nodeType && module; var C = D && q && "object" == typeof global && global; !C || C.global !== C && C.window !== C && C.self !== C || (x = C); var I = Math.pow(2, 53) - 1, z = /\bOpera/; C = Object.prototype; var G = C.hasOwnProperty, K = C.toString, E = h(); "function" == typeof define && "object" == typeof define.amd && define.amd ? (x.platform = E, define(function() { return E })) : D && q ? f(E, function(k, L) { D[L] = k }) : x.platform = E }).call(this); function buildIOSMeta() { for (var a = [{ name: "viewport", content: "width=device-width, height=device-height, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" }, { name: "apple-mobile-web-app-capable", content: "yes" }, { name: "apple-mobile-web-app-status-bar-style", content: "black" }], d = 0; d < a.length; d++) { var b = document.createElement("meta"); b.name = a[d].name; b.content = a[d].content; var f = window.document.head.querySelector('meta[name="' + b.name + '"]'); f && f.parentNode.removeChild(f); window.document.head.appendChild(b) } } function hideIOSFullscreenPanel() { jQuery(".xxx-ios-fullscreen-message").css("display", "none"); jQuery(".xxx-ios-fullscreen-scroll").css("display", "none"); jQuery(".xxx-game-iframe-full").removeClass("xxx-game-iframe-iphone-se") } function buildIOSFullscreenPanel() { jQuery("body").append('<div class="xxx-ios-fullscreen-message"><div class="xxx-ios-fullscreen-swipe"></div></div><div class="xxx-ios-fullscreen-scroll"></div>') } function showIOSFullscreenPanel() { jQuery(".xxx-ios-fullscreen-message").css("display", "block"); jQuery(".xxx-ios-fullscreen-scroll").css("display", "block") } function __iosResize() { window.scrollTo(0, 0); if ("iPhone" === platform.product) switch (window.devicePixelRatio) { case 2: switch (window.innerWidth) { case 568: 320 !== window.innerHeight && jQuery(".xxx-game-iframe-full").addClass("xxx-game-iframe-iphone-se"); break; case 667: 375 === window.innerHeight ? hideIOSFullscreenPanel() : showIOSFullscreenPanel(); break; default: hideIOSFullscreenPanel() } break; case 3: switch (window.innerWidth) { case 736: 414 === window.innerHeight ? hideIOSFullscreenPanel() : showIOSFullscreenPanel(); break; case 724: 375 === window.innerHeight ? hideIOSFullscreenPanel() : showIOSFullscreenPanel(); break; default: hideIOSFullscreenPanel() } break; default: hideIOSFullscreenPanel() } } function iosResize() { __iosResize(); setTimeout(function() { __iosResize() }, 500) } $(document).ready(function() { platform && "iPhone" === platform.product && (buildIOSFullscreenPanel(), buildIOSMeta()) }); jQuery(window).resize(function() { platform && "iPhone" === platform.product && iosResize() }); var s_iScaleFactor = 1, s_iOffsetX, s_iOffsetY, s_bIsIphone = !1, s_bFocus = !0; (function(a) { (jQuery.browser = jQuery.browser || {}).mobile = /android|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(ad|hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|tablet|treo|up\.(browser|link)|vodafone|wap|webos|windows (ce|phone)|xda|xiino/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|e\-|e\/|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(di|rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|xda(\-|2|g)|yas\-|your|zeto|zte\-/i.test(a.substr(0, 4)) })(navigator.userAgent || navigator.vendor || window.opera); $(window).resize(function() { sizeHandler() }); function trace(a) { console.log(a) } function getSize(a) { var d = a.toLowerCase(), b = window.document, f = b.documentElement; if (void 0 === window["inner" + a]) a = f["client" + a]; else if (window["inner" + a] != f["client" + a]) { var n = b.createElement("body"); n.id = "vpw-test-b"; n.style.cssText = "overflow:scroll"; var m = b.createElement("div"); m.id = "vpw-test-d"; m.style.cssText = "position:absolute;top:-1000px"; m.innerHTML = "<style>@media(" + d + ":" + f["client" + a] + "px){body#vpw-test-b div#vpw-test-d{" + d + ":7px!important}}</style>"; n.appendChild(m); f.insertBefore(n, b.head); a = 7 == m["offset" + a] ? f["client" + a] : window["inner" + a]; f.removeChild(n) } else a = window["inner" + a]; return a } window.addEventListener("orientationchange", onOrientationChange); function onOrientationChange() { window.matchMedia("(orientation: portrait)").matches && sizeHandler(); window.matchMedia("(orientation: landscape)").matches && sizeHandler() } function isChrome() { return /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor) } function isIOS() { if (isIpad()) return !0; for (var a = "iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";"); a.length;) if (navigator.platform === a.pop()) return s_bIsIphone = !0; return s_bIsIphone = !1 } function isIpad() { var a = -1 !== navigator.userAgent.toLowerCase().indexOf("ipad"); return !a && navigator.userAgent.match(/Mac/) && navigator.maxTouchPoints && 2 < navigator.maxTouchPoints ? !0 : a } function isMobile() { return isIpad() ? !0 : navigator.userAgent.match(/Android/i) || navigator.userAgent.match(/webOS/i) || navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPad/i) || navigator.userAgent.match(/iPod/i) || navigator.userAgent.match(/BlackBerry/i) || navigator.userAgent.match(/Windows Phone/i) ? !0 : !1 } function getIOSWindowHeight() { return document.documentElement.clientWidth / window.innerWidth * window.innerHeight } function getHeightOfIOSToolbars() { var a = (0 === window.orientation ? screen.height : screen.width) - getIOSWindowHeight(); return 1 < a ? a : 0 } function inIframe() { try { return window.self !== window.top } catch (a) { return !0 } } function sizeHandler() { window.scrollTo(0, 1); if ($("#canvas")) { var a = null !== platform.name && "safari" === platform.name.toLowerCase() ? getIOSWindowHeight() : getSize("Height"); var d = getSize("Width"); s_bFocus && _checkOrientation(d, a); var b = Math.min(a / CANVAS_HEIGHT, d / CANVAS_WIDTH), f = Math.round(CANVAS_WIDTH * b); b = Math.round(CANVAS_HEIGHT * b); if (b < a) { var n = a - b; b += n; f += CANVAS_WIDTH / CANVAS_HEIGHT * n } else f < d && (n = d - f, f += n, b += CANVAS_HEIGHT / CANVAS_WIDTH * n); n = a / 2 - b / 2; var m = d / 2 - f / 2, t = CANVAS_WIDTH / f; if (m * t < -EDGEBOARD_X || n * t < -EDGEBOARD_Y) b = Math.min(a / (CANVAS_HEIGHT - 2 * EDGEBOARD_Y), d / (CANVAS_WIDTH - 2 * EDGEBOARD_X)), f = Math.round(CANVAS_WIDTH * b), b = Math.round(CANVAS_HEIGHT * b), n = (a - b) / 2, m = (d - f) / 2, t = CANVAS_WIDTH / f; s_iOffsetX = -1 * m * t; s_iOffsetY = -1 * n * t; 0 <= n && (s_iOffsetY = 0); 0 <= m && (s_iOffsetX = 0); null !== s_oInterface && s_oInterface.refreshButtonPos(s_iOffsetX, s_iOffsetY); null !== s_oModeMenu && s_oModeMenu.refreshButtonPos(s_iOffsetX, s_iOffsetY); null !== s_oMenu && s_oMenu.refreshButtonPos(s_iOffsetX, s_iOffsetY); s_bIsIphone && s_oStage ? (canvas = document.getElementById("canvas"), s_oStage.canvas.width = 2 * f, s_oStage.canvas.height = 2 * b, canvas.style.width = f + "px", canvas.style.height = b + "px", s_iScaleFactor = 2 * Math.min(f / CANVAS_WIDTH, b / CANVAS_HEIGHT), s_oStage.scaleX = s_oStage.scaleY = s_iScaleFactor) : s_bMobile || isChrome() ? ($("#canvas").css("width", f + "px"), $("#canvas").css("height", b + "px")) : s_oStage && (s_oStage.canvas.width = f, s_oStage.canvas.height = b, s_iScaleFactor = Math.min(f / CANVAS_WIDTH, b / CANVAS_HEIGHT), s_oStage.scaleX = s_oStage.scaleY = s_iScaleFactor); 0 > n || (n = (a - b) / 2); $("#canvas").css("top", n + "px"); $("#canvas").css("left", m + "px"); fullscreenHandler() } } function _checkOrientation(a, d) { s_bMobile && ENABLE_CHECK_ORIENTATION && (a > d ? "landscape" === $(".orientation-msg-container").attr("data-orientation") ? ($(".orientation-msg-container").css("display", "none"), s_oMain.startUpdate()) : ($(".orientation-msg-container").css("display", "block"), s_oMain.stopUpdate()) : "portrait" === $(".orientation-msg-container").attr("data-orientation") ? ($(".orientation-msg-container").css("display", "none"), s_oMain.startUpdate()) : ($(".orientation-msg-container").css("display", "block"), s_oMain.stopUpdate())) } function playSound(a, d, b) { return !1 === DISABLE_SOUND_MOBILE || !1 === s_bMobile ? (s_aSounds[a].play(), s_aSounds[a].volume(d), s_aSounds[a].loop(b), s_aSounds[a]) : null } function stopSound(a) { !1 !== DISABLE_SOUND_MOBILE && !1 !== s_bMobile || s_aSounds[a].stop() } function setVolume(a, d) { !1 !== DISABLE_SOUND_MOBILE && !1 !== s_bMobile || s_aSounds[a].volume(d) } function setMute(a, d) { !1 !== DISABLE_SOUND_MOBILE && !1 !== s_bMobile || s_aSounds[a].mute(d) } function fadeSound(a, d, b, f) { !1 !== DISABLE_SOUND_MOBILE && !1 !== s_bMobile || s_aSounds[a].fade(d, b, f) } function soundPlaying(a) { if (!1 === DISABLE_SOUND_MOBILE || !1 === s_bMobile) return s_aSounds[a].playing() } function createBitmap(a, d, b) { var f = new createjs.Bitmap(a), n = new createjs.Shape; d && b ? n.graphics.beginFill("#fff").drawRect(0, 0, d, b) : n.graphics.beginFill("#ff0").drawRect(0, 0, a.width, a.height); f.hitArea = n; return f } function createSprite(a, d, b, f, n, m) { a = null !== d ? new createjs.Sprite(a, d) : new createjs.Sprite(a); d = new createjs.Shape; d.graphics.beginFill("#000000").drawRect(-b, -f, n, m); a.hitArea = d; return a } function pad(a, d, b) { a += ""; return a.length >= d ? a : Array(d - a.length + 1).join(b || "0") + a } function randomFloatBetween(a, d, b) { "undefined" === typeof b && (b = 2); return parseFloat(Math.min(a + Math.random() * (d - a), d).toFixed(b)) } function rotateVector2D(a, d) { var b = d.getX() * Math.cos(a) + d.getY() * Math.sin(a), f = d.getX() * -Math.sin(a) + d.getY() * Math.cos(a); d.set(b, f) } function tweenVectorsOnX(a, d, b) { return a + b * (d - a) } function shuffle(a) { for (var d = a.length, b, f; 0 !== d;) f = Math.floor(Math.random() * d), --d, b = a[d], a[d] = a[f], a[f] = b; return a } function bubbleSort(a) { do { var d = !1; for (var b = 0; b < a.length - 1; b++) a[b] > a[b + 1] && (d = a[b], a[b] = a[b + 1], a[b + 1] = d, d = !0) } while (d) } function compare(a, d) { return a.index > d.index ? -1 : a.index < d.index ? 1 : 0 } function easeLinear(a, d, b, f) { return b * a / f + d } function easeInQuad(a, d, b, f) { return b * (a /= f) * a + d } function easeInSine(a, d, b, f) { return -b * Math.cos(a / f * (Math.PI / 2)) + b + d } function easeInCubic(a, d, b, f) { return b * (a /= f) * a * a + d } function getTrajectoryPoint(a, d) { var b = new createjs.Point, f = (1 - a) * (1 - a), n = a * a; b.x = f * d.start.x + 2 * (1 - a) * a * d.traj.x + n * d.end.x; b.y = f * d.start.y + 2 * (1 - a) * a * d.traj.y + n * d.end.y; return b } function formatTime(a) { a /= 1E3; var d = Math.floor(a / 60); a = Math.floor(a - 60 * d); var b = ""; b = 10 > d ? b + ("0" + d + ":") : b + (d + ":"); return 10 > a ? b + ("0" + a) : b + a } function degreesToRadians(a) { return a * Math.PI / 180 } function checkRectCollision(a, d) { var b = getBounds(a, .9); var f = getBounds(d, .98); return calculateIntersection(b, f) } function calculateIntersection(a, d) { var b, f, n, m; var t = a.x + (b = a.width / 2); var r = a.y + (f = a.height / 2); var h = d.x + (n = d.width / 2); var q = d.y + (m = d.height / 2); t = Math.abs(t - h) - (b + n); r = Math.abs(r - q) - (f + m); return 0 > t && 0 > r ? (t = Math.min(Math.min(a.width, d.width), -t), r = Math.min(Math.min(a.height, d.height), -r), { x: Math.max(a.x, d.x), y: Math.max(a.y, d.y), width: t, height: r, rect1: a, rect2: d }) : null } function getBounds(a, d) { var b = { x: Infinity, y: Infinity, width: 0, height: 0 }; if (a instanceof createjs.Container) { b.x2 = -Infinity; b.y2 = -Infinity; var f = a.children, n = f.length, m; for (m = 0; m < n; m++) { var t = getBounds(f[m], 1); t.x < b.x && (b.x = t.x); t.y < b.y && (b.y = t.y); t.x + t.width > b.x2 && (b.x2 = t.x + t.width); t.y + t.height > b.y2 && (b.y2 = t.y + t.height) } Infinity == b.x && (b.x = 0); Infinity == b.y && (b.y = 0); Infinity == b.x2 && (b.x2 = 0); Infinity == b.y2 && (b.y2 = 0); b.width = b.x2 - b.x; b.height = b.y2 - b.y; delete b.x2; delete b.y2 } else { if (a instanceof createjs.Bitmap) { n = a.sourceRect || a.image; m = n.width * d; var r = n.height * d } else if (a instanceof createjs.Sprite) if (a.spriteSheet._frames && a.spriteSheet._frames[a.currentFrame] && a.spriteSheet._frames[a.currentFrame].image) { n = a.spriteSheet.getFrame(a.currentFrame); m = n.rect.width; r = n.rect.height; f = n.regX; var h = n.regY } else b.x = a.x || 0, b.y = a.y || 0; else b.x = a.x || 0, b.y = a.y || 0; f = f || 0; m = m || 0; h = h || 0; r = r || 0; b.regX = f; b.regY = h; n = a.localToGlobal(0 - f, 0 - h); t = a.localToGlobal(m - f, r - h); m = a.localToGlobal(m - f, 0 - h); f = a.localToGlobal(0 - f, r - h); b.x = Math.min(Math.min(Math.min(n.x, t.x), m.x), f.x); b.y = Math.min(Math.min(Math.min(n.y, t.y), m.y), f.y); b.width = Math.max(Math.max(Math.max(n.x, t.x), m.x), f.x) - b.x; b.height = Math.max(Math.max(Math.max(n.y, t.y), m.y), f.y) - b.y } return b } function NoClickDelay(a) { this.element = a; window.Touch && this.element.addEventListener("touchstart", this, !1) } function shuffle(a) { for (var d = a.length, b, f; 0 < d;) f = Math.floor(Math.random() * d), d--, b = a[d], a[d] = a[f], a[f] = b; return a } NoClickDelay.prototype = { handleEvent: function(a) { switch (a.type) { case "touchstart": this.onTouchStart(a); break; case "touchmove": this.onTouchMove(a); break; case "touchend": this.onTouchEnd(a) } }, onTouchStart: function(a) { a.preventDefault(); this.moved = !1; this.element.addEventListener("touchmove", this, !1); this.element.addEventListener("touchend", this, !1) }, onTouchMove: function(a) { this.moved = !0 }, onTouchEnd: function(a) { this.element.removeEventListener("touchmove", this, !1); this.element.removeEventListener("touchend", this, !1); if (!this.moved) { a = document.elementFromPoint(a.changedTouches[0].clientX, a.changedTouches[0].clientY); 3 == a.nodeType && (a = a.parentNode); var d = document.createEvent("MouseEvents"); d.initEvent("click", !0, !0); a.dispatchEvent(d) } } }; (function() { function a(b) { var f = { focus: "visible", focusin: "visible", pageshow: "visible", blur: "hidden", focusout: "hidden", pagehide: "hidden" }; b = b || window.event; b.type in f ? document.body.className = f[b.type] : (document.body.className = this[d] ? "hidden" : "visible", "hidden" === document.body.className ? (s_oMain.stopUpdate(), s_bFocus = !1) : (s_oMain.startUpdate(), s_bFocus = !0)) } var d = "hidden"; d in document ? document.addEventListener("visibilitychange", a) : (d = "mozHidden") in document ? document.addEventListener("mozvisibilitychange", a) : (d = "webkitHidden") in document ? document.addEventListener("webkitvisibilitychange", a) : (d = "msHidden") in document ? document.addEventListener("msvisibilitychange", a) : "onfocusin" in document ? document.onfocusin = document.onfocusout = a : window.onpageshow = window.onpagehide = window.onfocus = window.onblur = a })(); function ctlArcadeResume() { null !== s_oMain && s_oMain.startUpdate() } function ctlArcadePause() { null !== s_oMain && s_oMain.stopUpdate() } function getParamValue(a) { for (var d = window.location.search.substring(1).split("&"), b = 0; b < d.length; b++) { var f = d[b].split("="); if (f[0] == a) return f[1] } } var Util = { timestamp: function() { return (new Date).getTime() }, toInt: function(a, d) { if (null !== a) { var b = parseInt(a, 10); if (!isNaN(b)) return b } return Util.toInt(d, 0) }, toFloat: function(a, d) { if (null !== a) { var b = parseFloat(a); if (!isNaN(b)) return b } return Util.toFloat(d, 0) }, limit: function(a, d, b) { return Math.max(d, Math.min(a, b)) }, randomInt: function(a, d) { return Math.round(Util.interpolate(a, d, Math.random())) }, randomChoice: function(a) { return a[Util.randomInt(0, a.length - 1)] }, percentRemaining: function(a, d) { return a % d / d }, accelerate: function(a, d, b) { return a + d * b }, interpolate: function(a, d, b) { return a + (d - a) * b }, easeIn: function(a, d, b) { return a + (d - a) * Math.pow(b, 2) }, easeOut: function(a, d, b) { return a + (d - a) * (1 - Math.pow(1 - b, 2)) }, easeInOut: function(a, d, b) { return a + (d - a) * (-Math.cos(b * Math.PI) / 2 + .5) }, exponentialFog: function(a, d) { return 1 / Math.pow(Math.E, a * a * d) }, increase: function(a, d, b) { for (a += d; a >= b;) a -= b; for (; 0 > a;) a += b; return a }, project: function(a, d, b, f, n) { a.camera.x = -d; a.camera.y = a.world.y - b; a.camera.z = a.world.z - f; a.screen.scale = n / a.camera.z; a.screen.x = Math.round(HALF_CANVAS_WIDTH + a.screen.scale * a.camera.x * HALF_CANVAS_WIDTH); a.screen.y = Math.round(HALF_CANVAS_HEIGHT - a.screen.scale * a.camera.y * HALF_CANVAS_HEIGHT); a.screen.w = Math.round(a.screen.scale * ROAD_PER_HALF_CANVAS_WIDTH) }, overlap: function(a, d, b, f, n) { n = .5 * (n || 1); return !(a + d * n < b - f * n || a - d * n > b + f * n) } }; function fullscreenHandler() { ENABLE_FULLSCREEN && screenfull.isEnabled && (s_bFullscreen = screenfull.isFullscreen, null !== s_oInterface && s_oInterface.resetFullscreenBut(), null !== s_oModeMenu && s_oModeMenu.resetFullscreenBut(), null !== s_oMenu && s_oMenu.resetFullscreenBut()) } if (screenfull.isEnabled) screenfull.on("change", function() { s_bFullscreen = screenfull.isFullscreen; null !== s_oInterface && s_oInterface.resetFullscreenBut(); null !== s_oModeMenu && s_oModeMenu.resetFullscreenBut(); null !== s_oMenu && s_oMenu.resetFullscreenBut() }); function CSpriteLibrary() { var a = {}, d, b, f, n, m, t; this.init = function(r, h, q) { d = {}; f = b = 0; n = r; m = h; t = q }; this.addSprite = function(r, h) { if (!a.hasOwnProperty(r)) { var q = new Image; a[r] = d[r] = { szPath: h, oSprite: q, bLoaded: !1 }; b++ } }; this.getSprite = function(r) { return a.hasOwnProperty(r) ? a[r].oSprite : null }; this._onSpritesLoaded = function() { b = 0; m.call(t) }; this._onSpriteLoaded = function() { n.call(t); ++f === b && this._onSpritesLoaded() }; this.loadSprites = function() { for (var r in d) d[r].oSprite.oSpriteLibrary = this, d[r].oSprite.szKey = r, d[r].oSprite.onload = function() { this.oSpriteLibrary.setLoaded(this.szKey); this.oSpriteLibrary._onSpriteLoaded(this.szKey) }, d[r].oSprite.onerror = function(h) { var q = h.currentTarget; setTimeout(function() { d[q.szKey].oSprite.src = d[q.szKey].szPath }, 500) }, d[r].oSprite.src = d[r].szPath }; this.setLoaded = function(r) { a[r].bLoaded = !0 }; this.isLoaded = function(r) { return a[r].bLoaded }; this.getNumSprites = function() { return b } } var CANVAS_WIDTH = 1600, CANVAS_HEIGHT = 768, EDGEBOARD_X = 260, EDGEBOARD_Y = 0, FPS = 60, FPS_TIME = 1E3 / FPS, DISABLE_SOUND_MOBILE = !1, PRIMARY_FONT = "Arial", STATE_LOADING = 0, STATE_MENU = 1, STATE_HELP = 1, STATE_GAME = 3, STATE_GAME_WAITING_FOR_BET = 0, STATE_GAME_DEAL = 1, STATE_GAME_CHOOSE_HOLD = 2, STATE_GAME_DRAW = 3, STATE_GAME_EVALUATE = 4, ON_CARD_SHOWN = "ON_CARD_SHOWN", ON_CARD_HIDE = "ON_CARD_HIDE", ON_MOUSE_DOWN = 0, ON_MOUSE_UP = 1, ON_MOUSE_OVER = 2, ON_MOUSE_OUT = 3, ON_DRAG_START = 4, ON_DRAG_END = 5, ON_BUT_YES_DOWN = 6, SUIT_HEARTS = 0, SUIT_SPADES = 1, SUIT_DIAMONDS = 2, SUIT_CLUBS = 3, LABEL_EMPTY = 0, LABEL_HIDDEN = 1, LABEL_SHOWN = 2, DECK_CARD_OFFSET = 8, CARD_WIDTH = 150, CARD_HEIGHT = 234, LOSEPOINTS_TIMER, POINTS_TO_LOSE, POINTS_TO_SUIT, POINTS_TO_BOARD, SOUNDTRACK_VOLUME_IN_GAME = 1, ENABLE_FULLSCREEN, ENABLE_CHECK_ORIENTATION; function CPreloader() { var a, d, b, f, n, m, t, r, h; this._init = function() { s_oSpriteLibrary.init(this._onImagesLoaded, this._onAllImagesLoaded, this); s_oSpriteLibrary.addSprite("progress_bar", "./sprites/progress_bar.png"); s_oSpriteLibrary.addSprite("200x200", "./sprites/200x200.jpg"); s_oSpriteLibrary.loadSprites(); h = new createjs.Container; s_oStage.addChild(h) }; this.unload = function() { h.removeAllChildren() }; this._onImagesLoaded = function() {}; this._onAllImagesLoaded = function() { this.attachSprites(); s_oMain.preloaderReady() }; this.attachSprites = function() { var q = new createjs.Shape; q.graphics.beginFill("black").drawRect(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT); h.addChild(q); q = s_oSpriteLibrary.getSprite("200x200"); t = createBitmap(q); t.regX = .5 * q.width; t.regY = .5 * q.height; t.x = CANVAS_WIDTH / 2; t.y = CANVAS_HEIGHT / 2 - 180; h.addChild(t); r = new createjs.Shape; r.graphics.beginFill("rgba(0,0,0,0.01)").drawRoundRect(t.x - 100, t.y - 100, 200, 200, 10); h.addChild(r); t.mask = r; q = s_oSpriteLibrary.getSprite("progress_bar"); f = createBitmap(q); f.x = CANVAS_WIDTH / 2 - q.width / 2; f.y = CANVAS_HEIGHT / 2 + 50; h.addChild(f); a = q.width; d = q.height; n = new createjs.Shape; n.graphics.beginFill("rgba(0,0,0,0.01)").drawRect(f.x, f.y, 1, d); h.addChild(n); f.mask = n; b = new createjs.Text("", "30px " + PRIMARY_FONT, "#fff"); b.x = CANVAS_WIDTH / 2; b.y = CANVAS_HEIGHT / 2 + 100; b.textBaseline = "alphabetic"; b.textAlign = "center"; h.addChild(b); m = new createjs.Shape; m.graphics.beginFill("black").drawRect(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT); h.addChild(m); createjs.Tween.get(m).to({ alpha: 0 }, 500).call(function() { createjs.Tween.removeTweens(m); h.removeChild(m) }) }; this.refreshLoader = function(q) { b.text = q + "%"; 100 === q && (s_oMain._onRemovePreloader(), b.visible = !1, f.visible = !1); n.graphics.clear(); q = Math.floor(q * a / 100); n.graphics.beginFill("rgba(0,0,0,0.01)").drawRect(f.x, f.y, q, d) }; this._init() } function CCreditsPanel() { var a, d, b, f, n; this._init = function() { d = new createjs.Container; s_oStage.addChild(d); var m = s_oSpriteLibrary.getSprite("msg_box"); a = createBitmap(m); a.regX = m.width / 2; a.regY = m.height / 2; n = a.on("click", this._onLogoButRelease); d.addChild(a); d.x = CANVAS_WIDTH / 2; d.y = CANVAS_HEIGHT / 2; m = new createjs.Text("www.codethislab.com", " 34px " + PRIMARY_FONT, "#ffffff"); m.y = 190; m.textAlign = "center"; m.textBaseline = "middle"; m.lineWidth = 600; d.addChild(m); m = s_oSpriteLibrary.getSprite("ctl_logo"); f = createBitmap(m); f.y = -50; f.regX = m.width / 2; f.regY = m.height / 2; d.addChild(f); m = s_oSpriteLibrary.getSprite("but_exit"); b = new CGfxButton(314, -186, m, d); b.addEventListener(ON_MOUSE_UP, this.unload, this) }; this.unload = function() { b.setClickable(!1); s_oStage.removeChild(d); b.unload(); a.off("click", n) }; this._onLogoButRelease = function() { window.open("https://www.codethislab.com/", "_blank") }; this._init() } function CMain(a) { var d, b = 0, f = 0, n = STATE_LOADING, m, t; this.initContainer = function() { s_oCanvas = document.getElementById("canvas"); s_oStage = new createjs.Stage(s_oCanvas); s_bMobile = isMobile(); !1 === s_bMobile ? s_oStage.enableMouseOver(20) : createjs.Touch.enable(s_oStage, !0); s_iPrevTime = (new Date).getTime(); createjs.Ticker.addEventListener("tick", this._update); createjs.Ticker.framerate = FPS; navigator.userAgent.match(/Windows Phone/i) && (DISABLE_SOUND_MOBILE = !0); s_oSpriteLibrary = new CSpriteLibrary; m = new CPreloader; }; this.preloaderReady = function() { !1 !== DISABLE_SOUND_MOBILE && !1 !== s_bMobile || this._initSounds(); this._loadImages(); d = !0 }; this.soundLoaded = function() { b++; m.refreshLoader(Math.floor(b / f * 100)) }; this._initSounds = function() { Howler.mute(!s_bAudioActive); s_aSoundsInfo = []; s_aSoundsInfo.push({ path: "./sounds/", filename: "soundtrack", loop: !0, volume: 1, ingamename: "soundtrack" }); s_aSoundsInfo.push({ path: "./sounds/", filename: "card_dealing", loop: !1, volume: 1, ingamename: "card_dealing" }); s_aSoundsInfo.push({ path: "./sounds/", filename: "snap", loop: !1, volume: 1, ingamename: "snap" }); s_aSoundsInfo.push({ path: "./sounds/", filename: "press_button", loop: !1, volume: 1, ingamename: "click" }); s_aSoundsInfo.push({ path: "./sounds/", filename: "game_over", loop: !1, volume: 1, ingamename: "game_over" }); s_aSoundsInfo.push({ path: "./sounds/", filename: "card", loop: !1, volume: 1, ingamename: "card" }); f += s_aSoundsInfo.length; s_aSounds = []; for (var h = 0; h < s_aSoundsInfo.length; h++) this.tryToLoadSound(s_aSoundsInfo[h], !1) }; this.tryToLoadSound = function(h, q) { setTimeout(function() { s_aSounds[h.ingamename] = new Howl({ src: [h.path + h.filename + ".mp3"], autoplay: !1, preload: !0, loop: h.loop, volume: h.volume, onload: s_oMain.soundLoaded, onloaderror: function(x, D) { for (var C = 0; C < s_aSoundsInfo.length; C++) if (0 < s_aSounds[s_aSoundsInfo[C].ingamename]._sounds.length && x === s_aSounds[s_aSoundsInfo[C].ingamename]._sounds[0]._id) { s_oMain.tryToLoadSound(s_aSoundsInfo[C], !0); break } else document.querySelector("#block_game").style.display = "none" }, onplayerror: function(x) { for (var D = 0; D < s_aSoundsInfo.length; D++) if (x === s_aSounds[s_aSoundsInfo[D].ingamename]._sounds[0]._id) { s_aSounds[s_aSoundsInfo[D].ingamename].once("unlock", function() { s_aSounds[s_aSoundsInfo[D].ingamename].play(); "soundtrack" === s_aSoundsInfo[D].ingamename && null !== s_oGame && setVolume("soundtrack", SOUNDTRACK_VOLUME_IN_GAME) }); break } } }) }, q ? 200 : 0) }; this._loadImages = function() { s_oSpriteLibrary.init(this._onImagesLoaded, this._onAllImagesLoaded, this); s_oSpriteLibrary.addSprite("but_play", "./sprites/but_play.png"); s_oSpriteLibrary.addSprite("msg_box", "./sprites/msg_box.png"); s_oSpriteLibrary.addSprite("bg_menu", "./sprites/bg_menu.jpg"); s_oSpriteLibrary.addSprite("bg_difficulty", "./sprites/bg_difficulty.jpg"); s_oSpriteLibrary.addSprite("layout_panel", "./sprites/layout_panel.png"); s_oSpriteLibrary.addSprite("layout_1_card", "./sprites/layout_1_card.png"); s_oSpriteLibrary.addSprite("layout_3_card", "./sprites/layout_3_cards.png"); s_oSpriteLibrary.addSprite("bg_game", "./sprites/bg_game.jpg"); s_oSpriteLibrary.addSprite("bg_help", "./sprites/bg_help.png"); s_oSpriteLibrary.addSprite("arrow", "./sprites/arrow.png"); s_oSpriteLibrary.addSprite("but_no", "./sprites/but_no.png"); s_oSpriteLibrary.addSprite("but_yes", "./sprites/but_yes.png"); s_oSpriteLibrary.addSprite("ctl_logo", "./sprites/ctl_logo.png"); s_oSpriteLibrary.addSprite("but_info", "./sprites/but_info.png"); s_oSpriteLibrary.addSprite("but_fullscreen", "./sprites/but_fullscreen.png"); s_oSpriteLibrary.addSprite("but_exit", "./sprites/but_exit.png"); s_oSpriteLibrary.addSprite("audio_icon", "./sprites/audio_icon.png"); s_oSpriteLibrary.addSprite("but_help", "./sprites/but_help.png"); s_oSpriteLibrary.addSprite("but_restart", "./sprites/but_restart.png"); s_oSpriteLibrary.addSprite("time_display", "./sprites/time_display.png"); s_oSpriteLibrary.addSprite("score_display", "./sprites/score_display.png"); for (var h = 0; 53 > h; h++) s_oSpriteLibrary.addSprite("card_" + h, "./sprites/cards/card_" + h + ".png"); s_oSpriteLibrary.addSprite("but_return_cards", "./sprites/but_return_cards.png"); f += s_oSpriteLibrary.getNumSprites(); s_oSpriteLibrary.loadSprites() }; this._onImagesLoaded = function() { b++; m.refreshLoader(Math.floor(b / f * 100)) }; this._onAllImagesLoaded = function() {}; this.onAllPreloaderImagesLoaded = function() { this._loadImages() }; this._onRemovePreloader = function() { m.unload(); playSound("soundtrack", 1, !0); this.gotoMenu() }; this.gotoMenu = function() { new CMenu; n = STATE_MENU }; this.goToModeMenu = function() { new CModeMenu; n = STATE_MENU }; this.gotoGame = function(h) { s_bEasyMode = h; t = new CGame(r); n = STATE_GAME }; this.gotoHelp = function() { new CHelp; n = STATE_HELP }; this.stopUpdate = function() { d = !1; createjs.Ticker.paused = !0; $("#block_game").css("display", "block"); Howler.mute(!0) }; this.startUpdate = function() { s_iPrevTime = (new Date).getTime(); d = !0; createjs.Ticker.paused = !1; $("#block_game").css("display", "none"); s_bAudioActive && Howler.mute(!1) }; this._update = function(h) { if (!1 !== d) { var q = (new Date).getTime(); s_iTimeElaps = q - s_iPrevTime; s_iCntTime += s_iTimeElaps; s_iCntFps++; s_iPrevTime = q; 1E3 <= s_iCntTime && (s_iCurFps = s_iCntFps, s_iCntTime -= 1E3, s_iCntFps = 0); n === STATE_GAME && t.update(); s_oStage.update(h) } }; s_oMain = this; var r = a; ENABLE_FULLSCREEN = a.fullscreen; ENABLE_CHECK_ORIENTATION = a.check_orientation; s_bAudioActive = a.audio_enable_on_startup; this.initContainer() } var s_bMobile, s_bEasyMode, s_bAudioActive = !0, s_iCntTime = 0, s_iTimeElaps = 0, s_iPrevTime = 0, s_iCntFps = 0, s_iCurFps = 0, s_oDrawLayer, s_oStage, s_oMain, s_oSpriteLibrary, s_oSoundTrack, s_oCanvas, s_aSoundsInfo, s_bFullscreen = !1; function CTextButton(a, d, b, f, n, m, t, r) { var h, q, x, D, C, I, z; this._init = function(G, K, E, k, L, w, v, A) { h = []; q = []; var l = createBitmap(E), u = Math.ceil(v / 20); C = new createjs.Text(k, "bold " + v + "px " + L, "#000000"); C.textAlign = "center"; C.textBaseline = "alphabetic"; var O = C.getBounds(); C.x = E.width / 2 + u; C.y = Math.floor(E.height / 2) + O.height / 3 + u; D = new createjs.Text(k, "bold " + v + "px " + L, w); D.textAlign = "center"; D.textBaseline = "alphabetic"; O = D.getBounds(); D.x = E.width / 2; D.y = Math.floor(E.height / 2) + O.height / 3; x = new createjs.Container; x.x = G; x.y = K; x.regX = E.width / 2; x.regY = E.height / 2; x.addChild(l, C, D); A.addChild(x); this._initListener() }; this.unload = function() { x.off("mousedown", I); x.off("pressup", z); r.removeChild(x) }; this.setVisible = function(G) { x.visible = G }; this._initListener = function() { oParent = this; I = x.on("mousedown", this.buttonDown); z = x.on("pressup", this.buttonRelease) }; this.addEventListener = function(G, K, E) { h[G] = K; q[G] = E }; this.buttonRelease = function() { x.scaleX = 1; x.scaleY = 1; h[ON_MOUSE_UP] && h[ON_MOUSE_UP].call(q[ON_MOUSE_UP]) }; this.buttonDown = function() { x.scaleX = .9; x.scaleY = .9; h[ON_MOUSE_DOWN] && h[ON_MOUSE_DOWN].call(q[ON_MOUSE_DOWN]) }; this.setTextPosition = function(G) { D.y = G; C.y = G + 2 }; this.setPosition = function(G, K) { x.x = G; x.y = K }; this.setX = function(G) { x.x = G }; this.setY = function(G) { x.y = G }; this.getButtonImage = function() { return x }; this.getX = function() { return x.x }; this.getY = function() { return x.y }; this.removeStroke = function() { C.visible = !1 }; this._init(a, d, b, f, n, m, t, r); return this } function CToggle(a, d, b, f, n) { var m, t, r, h, q, x; this._init = function(D, C, I, z) { t = []; r = []; var G = new createjs.SpriteSheet({ images: [I], frames: { width: I.width / 2, height: I.height, regX: I.width / 2 / 2, regY: I.height / 2 }, animations: { state_true: [0], state_false: [1] } }); m = z; h = createSprite(G, "state_" + m, I.width / 2 / 2, I.height / 2, I.width / 2, I.height); h.x = D; h.y = C; h.stop(); s_bMobile || (h.cursor = "pointer"); n.addChild(h); this._initListener() }; this.unload = function() { h.off("mousedown", q); h.off("pressup", x); n.removeChild(h) }; this._initListener = function() { q = h.on("mousedown", this.buttonDown); x = h.on("pressup", this.buttonRelease) }; this.addEventListener = function(D, C, I) { t[D] = C; r[D] = I }; this.setActive = function(D) { m = D; h.gotoAndStop("state_" + m) }; this.buttonRelease = function() { h.scaleX = 1; h.scaleY = 1; playSound("click", 1, !1); m = !m; h.gotoAndStop("state_" + m); t[ON_MOUSE_UP] && t[ON_MOUSE_UP].call(r[ON_MOUSE_UP], m) }; this.buttonDown = function() { h.scaleX = .9; h.scaleY = .9; t[ON_MOUSE_DOWN] && t[ON_MOUSE_DOWN].call(r[ON_MOUSE_DOWN]) }; this.setPosition = function(D, C) { h.x = D; h.y = C }; this._init(a, d, b, f) } function CGfxButton(a, d, b, f) { var n, m, t, r, h = [], q, x, D, C; this._init = function(z, G, K, E) { n = !1; m = 1; t = []; r = []; q = createBitmap(K); q.x = z; q.y = G; q.scaleX = q.scaleY = m; q.regX = K.width / 2; q.regY = K.height / 2; E.addChild(q); this._initListener() }; this.unload = function() { createjs.Tween.removeTweens(q); s_bMobile ? q.off("mousedown", x) : (q.off("mousedown", x), q.off("mouseover", D)); q.off("pressup", C); f.removeChild(q) }; this.setVisible = function(z) { q.visible = z }; this.setClickable = function(z) { n = !z }; this._initListener = function() { s_bMobile ? x = q.on("mousedown", this.buttonDown) : (x = q.on("mousedown", this.buttonDown), D = q.on("mouseover", this.buttonOver)); C = q.on("pressup", this.buttonRelease) }; this.addEventListener = function(z, G, K) { t[z] = G; r[z] = K }; this.addEventListenerWithParams = function(z, G, K, E) { t[z] = G; r[z] = K; h = E }; this.buttonRelease = function() { n || (q.scaleX = m, q.scaleY = m, t[ON_MOUSE_UP] && t[ON_MOUSE_UP].call(r[ON_MOUSE_UP], h)) }; this.buttonDown = function() { n || (q.scaleX = .9 * m, q.scaleY = .9 * m, playSound("click", 1, !1), t[ON_MOUSE_DOWN] && t[ON_MOUSE_DOWN].call(r[ON_MOUSE_DOWN], h)) }; this.buttonOver = function(z) { s_bMobile || n || (z.target.cursor = "pointer") }; this.pulseAnimation = function() { createjs.Tween.get(q, { loop: -1 }).to({ scaleX: 1.1 * m, scaleY: 1.1 * m }, 850, createjs.Ease.quadOut).to({ scaleX: m, scaleY: m }, 650, createjs.Ease.quadIn) }; this.trembleAnimation = function() { createjs.Tween.get(q).to({ rotation: 5 }, 75, createjs.Ease.quadOut).to({ rotation: -5 }, 140, createjs.Ease.quadIn).to({ rotation: 0 }, 75, createjs.Ease.quadIn).wait(750).call(function() { I.trebleAnimation() }) }; this.setPosition = function(z, G) { q.x = z; q.y = G }; this.setX = function(z) { q.x = z }; this.setY = function(z) { q.y = z }; this.getButtonImage = function() { return q }; this.getX = function() { return q.x }; this.getY = function() { return q.y }; var I = this; this._init(a, d, b, f); return this } function CMenu() { var a, d, b, f, n, m, t, r, h, q, x, D, C = null, I = null; this._init = function() { t = createBitmap(s_oSpriteLibrary.getSprite("bg_menu")); s_oStage.addChild(t); var z = s_oSpriteLibrary.getSprite("but_play"); r = new CGfxButton(CANVAS_WIDTH / 2, CANVAS_HEIGHT - 150, z, s_oStage); r.addEventListener(ON_MOUSE_UP, this._onButPlayRelease, this); if (!1 === DISABLE_SOUND_MOBILE || !1 === s_bMobile) z = s_oSpriteLibrary.getSprite("audio_icon"), n = CANVAS_WIDTH - z.width / 4 - 10, m = z.height / 2 + 14, q = new CToggle(n, m, z, s_bAudioActive, s_oStage), q.addEventListener(ON_MOUSE_UP, this._onAudioToggle, this); z = s_oSpriteLibrary.getSprite("but_info"); b = z.width / 2 + 10; f = z.height / 2 + 14; x = new CGfxButton(b, f, z, s_oStage); x.addEventListener(ON_MOUSE_UP, this._onCreditsBut, this); z = window.document; var G = z.documentElement; C = G.requestFullscreen || G.mozRequestFullScreen || G.webkitRequestFullScreen || G.msRequestFullscreen; I = z.exitFullscreen || z.mozCancelFullScreen || z.webkitExitFullscreen || z.msExitFullscreen; !1 === ENABLE_FULLSCREEN && (C = !1); C && screenfull.isEnabled && (z = s_oSpriteLibrary.getSprite("but_fullscreen"), a = b + z.width / 2 + 12, d = z.height / 2 + 14, D = new CToggle(a, d, z, s_bFullscreen, s_oStage), D.addEventListener(ON_MOUSE_UP, this._onFullscreenRelease, this)); h = new createjs.Shape; h.graphics.beginFill("black").drawRect(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT); s_oStage.addChild(h); createjs.Tween.get(h).to({ alpha: 0 }, 1E3).call(function() { h.visible = !1 }); this.refreshButtonPos(s_iOffsetX, s_iOffsetY) }; this.refreshButtonPos = function(z, G) { !1 !== DISABLE_SOUND_MOBILE && !1 !== s_bMobile || q.setPosition(n - z, G + m); x.setPosition(b + z, G + f); C && screenfull.isEnabled && D.setPosition(a + z, d + G) }; this.unload = function() { r.unload(); r = null; x.unload(); if (!1 === DISABLE_SOUND_MOBILE || !1 === s_bMobile) q.unload(), q = null; C && screenfull.isEnabled && D.unload(); s_oStage.removeChild(t); s_oMenu = t = null }; this.resetFullscreenBut = function() { C && screenfull.isEnabled && D.setActive(s_bFullscreen) }; this._onFullscreenRelease = function() { s_bFullscreen ? I.call(window.document) : C.call(window.document.documentElement); sizeHandler() }; this._onCreditsBut = function() { new CCreditsPanel }; this._onAudioToggle = function() { Howler.mute(s_bAudioActive); s_bAudioActive = !s_bAudioActive }; this._onButPlayRelease = function() { this.unload(); s_oMain.goToModeMenu(); $(s_oMain).trigger("start_session") }; s_oMenu = this; this._init() } var s_oMenu = null; function CModeMenu() { var a, d, b, f, n, m, t, r, h, q, x, D, C, I, z, G, K, E = null, k = null; this._init = function() { t = createBitmap(s_oSpriteLibrary.getSprite("bg_difficulty")); s_oStage.addChild(t); var w = s_oSpriteLibrary.getSprite("layout_panel"), v = CANVAS_WIDTH / 4; r = new createjs.Container; r.x = v; r.y = 374; s_bMobile || (r.cursor = "pointer"); h = new createjs.Container; h.x = CANVAS_WIDTH - v - w.width; h.y = 374; s_bMobile || (h.cursor = "pointer"); w = s_oSpriteLibrary.getSprite("layout_panel"); q = createBitmap(w); r.addChild(q); x = createBitmap(s_oSpriteLibrary.getSprite("layout_1_card")); x.x = 35; x.y = 115; r.addChild(x); new CTLText(r, 11, 66, 226, 28, 28, "center", "#000", PRIMARY_FONT, 1, 0, 0, TEXT_MODE_1, !0, !0, !1, !1); new CTLText(r, 10, 65, 226, 28, 28, "center", "#fff", PRIMARY_FONT, 1, 0, 0, TEXT_MODE_1, !0, !0, !1, !1); new CTLText(r, 11, 8, 226, 34, 34, "center", "#000", PRIMARY_FONT, 1, 0, 0, TEXT_EASY, !0, !0, !1, !1); new CTLText(r, 10, 7, 226, 34, 34, "center", "#fff", PRIMARY_FONT, 1, 0, 0, TEXT_EASY, !0, !0, !1, !1); w = s_oSpriteLibrary.getSprite("layout_panel"); D = createBitmap(w); h.addChild(D); C = createBitmap(s_oSpriteLibrary.getSprite("layout_3_card")); C.x = 22; C.y = 115; h.addChild(C); new CTLText(h, 11, 66, 226, 28, 28, "center", "#000", PRIMARY_FONT, 1, 0, 0, TEXT_MODE_3, !0, !0, !1, !1); new CTLText(h, 10, 65, 226, 28, 28, "center", "#fff", PRIMARY_FONT, 1, 0, 0, TEXT_MODE_3, !0, !0, !1, !1); new CTLText(h, 11, 8, 226, 34, 34, "center", "#000", PRIMARY_FONT, 1, 0, 0, TEXT_NORMAL, !0, !0, !1, !1); new CTLText(h, 11, 8, 226, 34, 34, "center", "#fff", PRIMARY_FONT, 1, 0, 0, TEXT_NORMAL, !0, !0, !1, !1); new CTLText(s_oStage, CANVAS_WIDTH / 2 - 398, CANVAS_HEIGHT / 2 - 94, 800, 52, 52, "center", "#000", PRIMARY_FONT, 1, 0, 0, TEXT_TOP_MODE, !0, !0, !1, !1); new CTLText(s_oStage, CANVAS_WIDTH / 2 - 400, CANVAS_HEIGHT / 2 - 96, 800, 52, 52, "center", "#fff", PRIMARY_FONT, 1, 0, 0, TEXT_TOP_MODE, !0, !0, !1, !1); s_oStage.addChild(r); s_oStage.addChild(h); w = (new createjs.Graphics).beginFill("rgba(158,158,158,0.01)").drawRect(4, 0, 240, 250); v = new createjs.Shape(w); r.addChild(v); v.on("mousedown", this._resizeEasy); v.on("pressup", this._selectEasy); w = new createjs.Shape(w); h.addChild(w); w.on("mousedown", this._resizeNormal); w.on("pressup", this._selectNormal); w = s_oSpriteLibrary.getSprite("but_exit"); b = CANVAS_WIDTH - w.width / 2 - 10; f = w.height / 2 + 14; G = new CGfxButton(b, f, w, s_oStage); G.addEventListener(ON_MOUSE_UP, this._onExit, this); v = b - w.width - 10; if (!1 === DISABLE_SOUND_MOBILE || !1 === s_bMobile) w = s_oSpriteLibrary.getSprite("audio_icon"), n = v, m = w.height / 2 + 14, z = new CToggle(n, m, w, s_bAudioActive, s_oStage), z.addEventListener(ON_MOUSE_UP, this._onAudioToggle, this); w = window.document; v = w.documentElement; E = v.requestFullscreen || v.mozRequestFullScreen || v.webkitRequestFullScreen || v.msRequestFullscreen; k = w.exitFullscreen || w.mozCancelFullScreen || w.webkitExitFullscreen || w.msExitFullscreen; !1 === ENABLE_FULLSCREEN && (E = !1); E && screenfull.isEnabled && (w = s_oSpriteLibrary.getSprite("but_fullscreen"), a = w.width / 4 + 10, d = w.height / 2 + 14, K = new CToggle(a, d, w, s_bFullscreen, s_oStage), K.addEventListener(ON_MOUSE_UP, this._onFullscreenRelease, this)); I = new createjs.Shape; I.graphics.beginFill("black").drawRect(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT); s_oStage.addChild(I); createjs.Tween.get(I).to({ alpha: 0 }, 1E3).call(function() { I.visible = !1 }); this.refreshButtonPos(s_iOffsetX, s_iOffsetY) }; this.refreshButtonPos = function(w, v) { G.setPosition(b - w, v + f); !1 !== DISABLE_SOUND_MOBILE && !1 !== s_bMobile || z.setPosition(n - w, m); E && screenfull.isEnabled && K.setPosition(a + w, d + v) }; this._resizeEasy = function() { r.x += 10; r.y += 10; r.scaleX = .9; r.scaleY = .9 }; this._selectEasy = function() { playSound("click", 1, !1); L.unload(); s_oMain.gotoGame(!0) }; this._resizeNormal = function() { h.x += 10; h.y += 10; h.scaleX = .9; h.scaleY = .9 }; this._selectNormal = function() { playSound("click", 1, !1); L.unload(); s_oMain.gotoGame(!1) }; this.unload = function() { G.unload(); if (!1 === DISABLE_SOUND_MOBILE || !1 === s_bMobile) z.unload(), z = null; E && screenfull.isEnabled && K.unload(); s_oStage.removeChild(t, r, h); s_oModeMenu = t = null }; this.resetFullscreenBut = function() { E && screenfull.isEnabled && K.setActive(s_bFullscreen) }; this._onFullscreenRelease = function() { s_bFullscreen ? k.call(window.document) : E.call(window.document.documentElement); sizeHandler() }; this._onAudioToggle = function() { Howler.mute(s_bAudioActive); s_bAudioActive = !s_bAudioActive }; this._onExit = function() { s_oModeMenu.unload(); s_oMain.gotoMenu() }; var L = this; s_oModeMenu = this; this._init() } var s_oModeMenu = null; function CGame(a) { var d, b, f, n, m, t, r = !0, h, q = !0, x = !1, D, C, I, z, G, K, E, k, L, w, v, A, l, u, O, P, F, S, ba, T, Q, Z, U, X = null, g, aa, Y, V, M; this._init = function() { q = r = !0; h = x = !1; playSound("card_dealing", 1, !0); v = []; l = []; A = []; Q = []; Z = []; for (var c = 0; 4 > c; c++) Z[c] = 1; T = []; for (c = 0; 4 > c; c++) T[c] = 1; S = []; for (c = 0; 7 > c; c++) S[c] = null; for (c = 0; 7 > c; c++); G = I = C = D = 0; k = 26; K = 0; w = E = -1; L = 2; z = 0; u = []; for (c = 0; 7 > c; c++) for (var p = c; 7 > p; p++) u[z] = { x: 624 + 111 * p, y: 230 + 11 * c }, z++; O = [{ x: 312, y: 453 }, { x: 423, y: 453 }, { x: 312, y: 610 }, { x: 423, y: 610 }]; ba = []; for (c = 0; c < O.length; c++) ba[c] = new createjs.Rectangle(O[c].x - CARD_WIDTH / 2, O[c].y - CARD_HEIGHT / 2, CARD_WIDTH, CARD_HEIGHT); P = [{ x: 312, y: 231 }, { x: 420, y: 231 }, { x: 440, y: 261 }, { x: 460, y: 291 }]; F = []; for (c = 0; 19 > c; c++) for (F[c] = [], p = 0; 7 > p; p++) F[c][p] = { status: LABEL_EMPTY, oCard: null }; c = createBitmap(s_oSpriteLibrary.getSprite("bg_game")); s_oStage.addChild(c); c = createBitmap(s_oSpriteLibrary.getSprite("but_return_cards")); c.x = 275; c.y = 194; s_oStage.addChild(c); g = new createjs.Container; s_oStage.addChild(g); _oDeckContainer = new createjs.Container; s_oStage.addChild(_oDeckContainer); aa = new createjs.Container; c = (new createjs.Graphics).beginFill("rgba(158,158,158,0.01)").drawRect(267, 159, 90, 140); Y = new createjs.Shape(c); if (s_bEasyMode) Y.on("click", this._turnCard); else Y.on("click", this._turn3Card); aa.addChild(Y); s_oStage.addChild(aa); this._shuffleCard(); this._setBoard(); U = new CInterface; s_oStage.addEventListener("stagemousemove", this.dragCard, !1); s_oStage.addEventListener("stagemouseup", this.releaseCard, !1); $(s_oMain).trigger("start_level", 1) }; this._calculateScore = function(c, p) { this.updateScore(p); (new CScore).showScore(c.getPos(), p) }; this._calculateScoreOnDeck = function(c, p) { Z[c.getSuit()] === c.getRank() && (playSound("snap", 1, !1), this.updateScore(p), (new CScore).showScore(c.getPos(), p), Z[c.getSuit()]++) }; this.updateScore = function(c) { D += c; 0 > D && (D = 0) }; this.updateVisualScore = function() { U.refreshScore(D) }; this._shuffleCard = function() { for (var c = -1, p = [], e = 0; 52 > e; e++) { var J = (e + 1) % 13; 1 === J ? c++ : 0 === J && (J = 13); p.push({ fotogram: e, rank: J, suit: c }) } c = []; for (e = 0; e < p.length; e++) c[e] = p[e]; for (p = []; 0 < c.length;) p.push(c.splice(Math.round(Math.random() * (c.length - 1)), 1)[0]); for (e = 0; e < p.length; e++) v[e] = new CCard(P[0].x - e / DECK_CARD_OFFSET, P[0].y - e / DECK_CARD_OFFSET, g, p[e].fotogram, p[e].rank, p[e].suit) }; this.blockGame = function(c) { q = c }; this._setBoard = function() { for (var c = 0, p = v.length - 1, e = 0; 28 > e; e++) v[51 - e].moveCard(u[e].x, u[e].y, 100, c), v[51 - e].setType("board"), c += 100; for (e = 0; 7 > e; e++) for (c = e; 7 > c; c++) F[e][c].oCard = v[p], F[e][c].status = LABEL_HIDDEN, p--; for (e = 28; 52 > e; e++) l[51 - e] = v[51 - e] }; this.pickCard = function(c, p) { if (!q) if (q = !0, m = c.getPos().x, t = c.getPos().y, g.getChildIndex(c.getSprite()), f = p.stageX / s_iScaleFactor - m, n = p.stageY / s_iScaleFactor - t, "deck" === c.checkType()) { var e = c.saveInfo(); A[0] = new CCard(m, t, g, e.szFotogram, e.iRank, e.iSuit); A[0].setPointValue(c.saveInfo().bValue); A[0].instantShow(); M = c; c.setVisible(!1) } else if ("board" === c.checkType()) { for (var J = 0; 7 > J; J++) for (e = F.length - 1; 0 <= e; e--) F[e][J].oCard === c && (d = e, b = J); J = 0; for (e = d; e < F.length; e++) F[e][b].status === LABEL_SHOWN && J++; var H = []; for (e = 0; e < J; e++) H[e] = F[d + e][b].oCard.saveInfo(), A[e] = new CCard(m, t + e * k, g, H[e].szFotogram, H[e].iRank, H[e].iSuit), A[e].setPointValue(H[e].bValue), F[d + e][b].oCard.unload(), A[e].setType("board"), A[e].instantShow() } else e = c.saveInfo(), A[0] = new CCard(m, t, g, e.szFotogram, e.iRank, e.iSuit), A[0].setPointValue(c.saveInfo().bValue), A[0].setType("suit"), A[0].instantShow(), V = c, c.setVisible(!1) }; this.dragCard = function(c) { if (!r && 0 < A.length) for (var p = 0; p < A.length; p++) A[p].setPos(c.localX - f, c.localY - n + p * k) }; this.setPreviousCardVisible = function(c, p) { c.unload(); "suit" === p ? V.setVisible(!0) : M.setVisible(!0) }; this.releaseCard = function(c) { !1 === r && 0 < A.length && (q = !1, 1 === A.length && y._snapOnSuit(A), 13 === A[0].getRank() && y._snapOnBoardKing(A), x || y._checkCardCollision(A), A = [], x = !1) }; this._snapOnSuit = function(c) { for (var p = 0, e = -1, J = c[0].getLogicRect(), H = 0; H < ba.length; H++) { var B = J.intersection(ba[H]); null !== B && p < B.width * B.height && (p = B.width * B.height, e = H) } 0 > e || (c[0].getRank() === T[c[0].getSuit()] && e === c[0].getSuit() && "suit" !== c[0].checkType() && (c[0].stackInPlace(O[e].x, O[e].y), x = !0, T[c[0].getSuit()]++, "deck" === c[0].checkType() ? (l[E].unload(), l.splice(E, 1), c[0].setType("suit"), s_bEasyMode ? this._calculateScoreOnDeck(c[0], POINTS_TO_SUIT) : (this._setActiveCard(), this._calculateScoreOnDeck(c[0], 2 * POINTS_TO_SUIT)), c[0].setPointValue(!1)) : "board" === c[0].checkType() && (F[d][b].status = LABEL_EMPTY, c[0].setType("suit"), this._checkBoard(c), s_bEasyMode ? this._calculateScoreOnDeck(c[0], POINTS_TO_SUIT) : this._calculateScoreOnDeck(c[0], 2 * POINTS_TO_SUIT), c[0].setPointValue(!1))), 14 === T[0] && 14 === T[1] && 14 === T[2] && 14 === T[3] && s_oGame.gameOver()) }; this._snapOnBoardKing = function(c) { for (var p = 0, e = -1, J = c[0].getLogicRect(), H = 0; H < S.length; H++) if (null !== S[H]) { var B = J.intersection(S[H]); null !== B && p < B.width * B.height && (p = B.width * B.height, e = H) } if (!(0 > e)) { if ("deck" === c[0].checkType()) c[0].stackInPlace(u[e].x, u[e].y), F[0][e].status = LABEL_SHOWN, F[0][e].oCard = c[0], F[0][e].oCard.setType("board"), l[E].unload(), l.splice(E, 1), s_bEasyMode ? this._calculateScore(c[0], POINTS_TO_BOARD) : (this._setActiveCard(), this._calculateScore(c[0], 2 * POINTS_TO_BOARD)), playSound("snap", 1, !1), x = !0; else if ("board" === c[0].checkType()) { for (H = p = 0; H < c.length; H++) c[H].stackInPlace(u[e].x, u[e].y + H * k), F[H][e].status = LABEL_SHOWN, F[H][e].oCard = c[H], F[H][e].oCard.setType("board"), F[d + H][b].status = LABEL_EMPTY, x = !0, !0 === c[H].getPointValue() && (c[H].setPointValue(!1), p = s_bEasyMode ? p + POINTS_TO_BOARD : p + 2 * POINTS_TO_BOARD); 0 < p && (this._calculateScore(c[0], p), playSound("snap", 1, !1)) } else c[0].stackInPlace(u[e].x, u[e].y), F[0][e].status = LABEL_SHOWN, F[0][e].oCard = c[0], F[0][e].oCard.setType("board"), T[c[0].getSuit()]--; F[0][b].status === LABEL_EMPTY && (S[b] = new createjs.Rectangle(u[b].x - CARD_WIDTH / 2, u[b].y - CARD_HEIGHT / 2, CARD_WIDTH, CARD_HEIGHT)); this._checkBoard(c); S[e] = null } }; this._checkCardCollision = function(c) { for (var p = 0, e = [], J = [], H = 0; 7 > H; H++) for (var B = F.length - 1; 0 <= B; B--) if (F[B][H].status === LABEL_SHOWN) { e[p] = F[B][H].oCard.getLogicRect(); J[p] = { oCard: F[B][H].oCard, x: F[B][H].oCard.getPos().x, y: F[B][H].oCard.getPos().y, row: B, column: H }; p++; break } H = 0; p = -1; var N = c[0].getLogicRect(); for (B = 0; B < e.length; B++) { var R = N.intersection(e[B]); null !== R && H < R.width * R.height && (H = R.width * R.height, p = B) } if (0 > p) if ("deck" === c[0].checkType()) c[0].returnInPlace(m, t); else if ("board" === c[0].checkType()) for (B = 0; B < c.length; B++) c[B].stackInPlace(m, t + B * k), F[d + B][b].oCard = c[B]; else { c[0].returnInPlace(m, t); return } else if (1 === J[p].oCard.getRank() - c[0].getRank() && J[p].oCard.getColor() !== c[0].getColor()) { if ("deck" === c[0].checkType()) { c[0].stackInPlace(J[p].x, J[p].y + k); F[J[p].row + 1][J[p].column].status = LABEL_SHOWN; F[J[p].row + 1][J[p].column].oCard = c[0]; F[J[p].row + 1][J[p].column].oCard.setType("board"); l[E].unload(); l.splice(E, 1); s_bEasyMode ? this._calculateScore(c[0], POINTS_TO_BOARD) : (this._setActiveCard(), this._calculateScore(c[0], 2 * POINTS_TO_BOARD)); playSound("snap", 1, !1); c[0].setPointValue(!1); return } if ("board" === c[0].checkType()) { for (B = e = 0; B < c.length; B++) c[B].stackInPlace(J[p].x, J[p].y + k + B * k), F[J[p].row + 1 + B][J[p].column].status = LABEL_SHOWN, F[d + B][b].status = LABEL_EMPTY, F[J[p].row + 1 + B][J[p].column].oCard = c[B], !0 === c[B].getPointValue() && (c[B].setPointValue(!1), e = s_bEasyMode ? e + POINTS_TO_BOARD : e + 2 * POINTS_TO_BOARD); 0 < e && (this._calculateScore(c[0], e), playSound("snap", 1, !1)) } else { c[0].stackInPlace(J[p].x, J[p].y + k); F[J[p].row + 1][J[p].column].status = LABEL_SHOWN; F[J[p].row + 1][J[p].column].oCard = c[0]; F[J[p].row + 1][J[p].column].oCard.setType("board"); T[c[0].getSuit()]--; return } } else { if ("board" !== c[0].checkType()) { c[0].returnInPlace(m, t); return } for (B = 0; B < c.length; B++) c[B].stackInPlace(m, t + B * k), F[d + B][b].oCard = c[B] } this._checkBoard(c) }; this._checkBoard = function(c) { if ("deck" !== c[0].checkType()) { c = b; for (var p = F.length - 1; 0 <= p && F[p][c].status !== LABEL_SHOWN; p--) if (F[p][c].status === LABEL_HIDDEN) { F[p][c].oCard.showCard(); F[p][c].status = LABEL_SHOWN; break } F[0][c].status === LABEL_EMPTY && (S[c] = new createjs.Rectangle(u[c].x - CARD_WIDTH / 2, u[c].y - CARD_HEIGHT / 2, CARD_WIDTH, CARD_HEIGHT)) } }; this.autoMoveAce = function(c) { var p = []; p[0] = c; if (p[0].getRank() === T[c.getSuit()] && "board" === p[0].checkType()) { p[0].stackInPlace(O[p[0].getSuit()].x, O[p[0].getSuit()].y); for (var e = 0; 7 > e; e++) for (var J = F.length - 1; 0 <= J; J--) F[J][e].oCard === c && (d = J, b = e); F[d][b].status = LABEL_EMPTY; p[0].setType("suit"); this._checkBoard(p); T[c.getSuit()]++; playSound("snap", 1, !1); s_bEasyMode ? this._calculateScoreOnDeck(c, POINTS_TO_SUIT) : this._calculateScoreOnDeck(c, 2 * POINTS_TO_SUIT); c.setPointValue(!1) } else c.getRank() === T[c.getSuit()] && "deck" === c.checkType() && 1 === l[E].getRank() && (p[0].stackInPlace(O[c.getSuit()].x, O[c.getSuit()].y), p[0].setType("suit"), l.splice(E, 1), T[c.getSuit()]++, s_bEasyMode ? this._calculateScoreOnDeck(c, POINTS_TO_SUIT) : (this._setActiveCard(), this._calculateScoreOnDeck(c, 2 * POINTS_TO_SUIT)), playSound("snap", 1, !1), c.setPointValue(!1)); q = !1 }; this.scaleDepth = function(c) { g.setChildIndex(c, G); G++ }; this.scaleDepthWithIndex = function(c, p) { console.log("scaleDepthWithIndex " + p); g.setChildIndex(c, p) }; this._turn3Card = function() { if (!(r || 0 === l.length || q || 3 >= l.length && s_oGame.deckCardsAllTurned() && !s_oGame.thereAreUsableDeckCards())) { if (0 > w) { for (var c = G = 0; c < l.length; c++) l[c].setBack(), l[c].setPlaced(), l[c].setVisible(!0), l[c].setPos(P[0].x - c / DECK_CARD_OFFSET, P[0].y - c / DECK_CARD_OFFSET); Q = []; for (c = 0; c < l.length / 3; c++) Q[c] = l.length - 1 - 3 * c; w = Q.length - 1; bubbleSort(Q) } E = Q[w] - 2; 3 > l.length && (E = Q[w]); q = !0; if (w === Q.length - 1) { if (4 > l.length) { for (c = l.length - 1; 0 <= c; c--) { var p = 3; console.log("iDepthCount " + p); l[Q[w] - c].moveCardWithIndex(P[c + 1].x, P[c + 1].y, 150, 20 * c + 100 * c, p); l[Q[w] - c].showCard(); l[Q[w] - c].setActive(!1) } E = 0; l[E].setActive(!0); return } p = 3; for (c = 2; 0 <= c; c--) console.log("iDepthCount " + p), l[Q[w] - c].moveCardWithIndex(P[c + 1].x, P[c + 1].y, 150, 20 * c + 100 * c, p), l[Q[w] - c].showCard(), l[Q[w] - c].setActive(!1), p-- } else { p = L + 1; for (c = 0; c < p; c++) l[Q[w] + c + 1].setVisible(!1); 0 === w ? (c = Q[w] + 1, E = 0) : c = 3; p = 3; for (--c; 0 <= c; c--) l[Q[w] - c].moveCardWithIndex(P[c + 1].x, P[c + 1].y, 150, 20 * c + 100 * c, p), l[Q[w] - c].showCard(), l[Q[w] - c].setActive(!1), p-- } L = 2; l[E].setActive(!0); w-- } }; this.deckCardsAllTurned = function() { for (var c = 0; c < l.length; c++) if (!l[c].getTurnedValue()) return !1; return !0 }; this.thereAreUsableDeckCards = function() { for (var c = 0; c < l.length; c++) if (!l[c].getVisible()) return !0; return !1 }; this._setActiveCard = function() { L--; l.length !== E && (l[E].setActive(!0), 1 === l[E].getRank() && this.autoMoveAce(l[E])) }; this._turnCard = function() { if (0 !== l.length && !q) { E--; if (0 > E) { E = l.length - 1; for (var c = 0; c < l.length; c++) l[c].setBack(), l[c].setPlaced(), l[c].setPos(P[0].x - c / DECK_CARD_OFFSET, P[0].y - c / DECK_CARD_OFFSET) } E === l.length - 1 && (G = 0); q = !0; l[E].moveCard(P[1].x, P[1].y, 150, 0); l[E].showCard() } }; this.unload = function() { r = !1; stopSound("card_dealing"); for (var c = 0; c < v.length; c++) v[c].unload(); U.unload(); null !== X && X.unload(); createjs.Tween.removeAllTweens(); s_oStage.removeAllChildren() }; this.restartGame = function() { $(s_oMain).trigger("show_interlevel_ad"); this.unload(); this._init() }; this.pauseGame = function() { h = !h }; this.onExit = function() { this.unload(); s_oMain.gotoMenu() }; this._onExitHelp = function() { this.pauseGame(); $(s_oMain).trigger("show_interlevel_ad") }; this.gameOver = function() { playSound("game_over", 1, !1); X = new CEndPanel(s_oSpriteLibrary.getSprite("msg_box")); X.show(D); h = !1 }; this.update = function() { r && v[24].getPlaced() && (stopSound("card_dealing"), K++, 1 === K ? (v[51].showCard(), F[0][0].status = LABEL_SHOWN) : 10 === K ? (v[44].showCard(), F[1][1].status = LABEL_SHOWN) : 20 === K ? (v[38].showCard(), F[2][2].status = LABEL_SHOWN) : 30 === K ? (v[33].showCard(), F[3][3].status = LABEL_SHOWN) : 40 === K ? (v[29].showCard(), F[4][4].status = LABEL_SHOWN) : 50 === K ? (v[26].showCard(), F[5][5].status = LABEL_SHOWN) : 60 === K && (v[24].showCard(), F[6][6].status = LABEL_SHOWN, q = r = !1, h = !0, U.setVisibleButHelp(), s_iTimeElaps = 0)); h && (I += s_iTimeElaps, 5999E3 < I && (I = 5999E3), U.refreshTime(formatTime(I)), C += s_iTimeElaps, C > LOSEPOINTS_TIMER && (C = 0, (new CScore).removeScore(POINTS_TO_LOSE))) }; s_oGame = this; LOSEPOINTS_TIMER = a.timer_losepoint; POINTS_TO_LOSE = a.points_to_lose; POINTS_TO_SUIT = a.points_to_suit; POINTS_TO_BOARD = a.points_to_board; var y = this; this._init() } var s_oGame; function CInterface() { var a, d, b, f, n, m, t, r, h, q, x, D, C, I, z = null, G, K, E, k, L, w, v = null, A = null; this._init = function() { var l = s_oSpriteLibrary.getSprite("but_exit"); h = CANVAS_WIDTH - l.width / 2 - 10; q = l.height / 2 + 14; D = new CGfxButton(h, q, l, s_oStage); D.addEventListener(ON_MOUSE_UP, this._onExit, this); var u = h - l.width - 10; if (!1 === DISABLE_SOUND_MOBILE || !1 === s_bMobile) l = s_oSpriteLibrary.getSprite("audio_icon"), t = u, r = l.height / 2 + 14, x = new CToggle(t, r, l, s_bAudioActive, s_oStage), x.addEventListener(ON_MOUSE_UP, this._onAudioToggle, this), u = u - l.width / 2 - 10; l = s_oSpriteLibrary.getSprite("but_help"); n = u; m = l.height / 2 + 14; C = new CGfxButton(n, m, l, s_oStage); C.addEventListener(ON_MOUSE_UP, this._onButHelpRelease, this); C.setVisible(!1); u = u - l.width - 10; l = s_oSpriteLibrary.getSprite("but_restart"); b = u; f = l.height / 2 + 14; I = new CGfxButton(b, f, l, s_oStage); I.addEventListener(ON_MOUSE_UP, this._onButRestartRelease, this); u = u - l.width - 10; l = window.document; var O = l.documentElement; v = O.requestFullscreen || O.mozRequestFullScreen || O.webkitRequestFullScreen || O.msRequestFullscreen; A = l.exitFullscreen || l.mozCancelFullScreen || l.webkitExitFullscreen || l.msExitFullscreen; !1 === ENABLE_FULLSCREEN && (v = !1); v && screenfull.isEnabled && (l = s_oSpriteLibrary.getSprite("but_fullscreen"), a = u, d = l.height / 2 + 14, L = new CToggle(a, d, l, s_bFullscreen, s_oStage), L.addEventListener(ON_MOUSE_UP, this._onFullscreenRelease, this)); new CTLText(s_oStage, 250, 98, 80, 28, 24, "right", "#ffffff", PRIMARY_FONT, 1, 0, 0, TEXT_TIME, !0, !0, !1, !1); l = s_oSpriteLibrary.getSprite("time_display"); G = createBitmap(l); G.scaleX = 1.4; G.x = 332; G.y = 89; s_oStage.addChild(G); K = new CTLText(s_oStage, 342, 98, 70, 28, 24, "center", "#ffffff", PRIMARY_FONT, 1, 0, 0, "00:00", !0, !0, !1, !1); new CTLText(s_oStage, 440, 98, 80, 28, 24, "right", "#ffffff", PRIMARY_FONT, 1, 0, 0, TEXT_SCORE, !0, !0, !1, !1); l = s_oSpriteLibrary.getSprite("score_display"); E = createBitmap(l); E.x = 522; E.y = 89; s_oStage.addChild(E); k = new CTLText(s_oStage, 530, 98, 66, 28, 24, "right", "#ffffff", PRIMARY_FONT, 1, 0, 0, "0", !0, !0, !1, !1); w = new CAreYouSurePanel(s_oStage); w.addEventListener(ON_BUT_YES_DOWN, this._onConfirmExit); this.refreshButtonPos(s_iOffsetX, s_iOffsetY) }; this.refreshButtonPos = function(l, u) { D.setPosition(h - l, q); C.setPosition(n - l, m); I.setPosition(b - l, f); !1 !== DISABLE_SOUND_MOBILE && !1 !== s_bMobile || x.setPosition(t - l, r); v && screenfull.isEnabled && L.setPosition(a - l, d + u) }; this.unload = function() { if (!1 === DISABLE_SOUND_MOBILE || !1 === s_bMobile) x.unload(), x = null; v && screenfull.isEnabled && L.unload(); D.unload(); C.unload(); I.unload(); null !== z && z.unload(); s_oInterface = w = null }; this.refreshScore = function(l) { k.refreshText(l) }; this.refreshTime = function(l) { K.refreshText(l) }; this.setVisibleButHelp = function() { C.setVisible(!0) }; this._onButHelpRelease = function() { z = new CHelpPanel }; this._onButRestartRelease = function() { s_oGame.restartGame(); $(s_oMain).trigger("restart_level", 1); $(s_oMain).trigger("show_interlevel_ad") }; this.onExitFromHelp = function() { z.unload() }; this._onAudioToggle = function() { Howler.mute(s_bAudioActive); s_bAudioActive = !s_bAudioActive }; this.resetFullscreenBut = function() { v && screenfull.isEnabled && L.setActive(s_bFullscreen) }; this._onFullscreenRelease = function() { s_bFullscreen ? A.call(window.document) : v.call(window.document.documentElement); sizeHandler() }; this._onExit = function() { w.show() }; this._onConfirmExit = function() { s_oGame.onExit(); $(s_oMain).trigger("end_level", 1); $(s_oMain).trigger("end_session"); $(s_oMain).trigger("show_interlevel_ad") }; s_oInterface = this; this._init(); return this } var s_oInterface = null; function CHelpPanel() { var a, d, b, f, n, m, t; this._init = function() { n = new createjs.Container; n.alpha = 0; s_oStage.addChild(n); var h = this; a = createBitmap(s_oSpriteLibrary.getSprite("bg_help")); n.addChild(a); new CTLText(n, CANVAS_WIDTH / 2 - 348, CANVAS_HEIGHT / 2 - 178, 400, 150, 30, "center", "#000000", PRIMARY_FONT, 1, 0, 0, TEXT_HELP1, !0, !0, !0, !1); new CTLText(n, CANVAS_WIDTH / 2 - 350, CANVAS_HEIGHT / 2 - 180, 400, 150, 30, "center", "#fff", PRIMARY_FONT, 1, 0, 0, TEXT_HELP1, !0, !0, !0, !1); new CTLText(n, CANVAS_WIDTH / 2 - 348, CANVAS_HEIGHT / 2 + 52, 400, 150, 30, "center", "#000000", PRIMARY_FONT, 1, 0, 0, TEXT_HELP2, !0, !0, !0, !1); new CTLText(n, CANVAS_WIDTH / 2 - 350, CANVAS_HEIGHT / 2 + 50, 400, 150, 30, "center", "#fff", PRIMARY_FONT, 1, 0, 0, TEXT_HELP2, !0, !0, !0, !1); createjs.Tween.get(n).to({ alpha: 1 }, 700).call(function() { s_oGame.pauseGame() }); t = n.on("pressup", function() { h._onExitHelp() }); m = new createjs.Container; m.visible = 0; s_oStage.addChild(m); m.on("pressup", function() { h._onExitHelp() }); d = createBitmap(s_oSpriteLibrary.getSprite("msg_box")); m.addChild(d); new CTLText(m, CANVAS_WIDTH / 2 - 248, CANVAS_HEIGHT / 2 - 198, 500, 30, 30, "center", "#000000", PRIMARY_FONT, 1, 0, 0, TEXT_HELP1_PAGE2, !0, !0, !1, !1); new CTLText(m, CANVAS_WIDTH / 2 - 250, CANVAS_HEIGHT / 2 - 200, 500, 30, 30, "center", "#ffffff", PRIMARY_FONT, 1, 0, 0, TEXT_HELP1_PAGE2, !0, !0, !1, !1); new CTLText(m, CANVAS_WIDTH / 2 - 328, CANVAS_HEIGHT / 2 - 98, 660, 28, 28, "center", "#000000", PRIMARY_FONT, 1, 0, 0, TEXT_HELP2_PAGE2, !0, !0, !1, !1); new CTLText(m, CANVAS_WIDTH / 2 - 330, CANVAS_HEIGHT / 2 - 100, 660, 28, 28, "center", "#fff", PRIMARY_FONT, 1, 0, 0, TEXT_HELP2_PAGE2, !0, !0, !1, !1); new CTLText(m, CANVAS_WIDTH / 2 - 329, CANVAS_HEIGHT / 2 - 19, 660, 28, 28, "left", "#000000", PRIMARY_FONT, 1, 0, 0, "+" + POINTS_TO_SUIT + TEXT_WIN_PAGE2, !0, !0, !1, !1); new CTLText(m, CANVAS_WIDTH / 2 - 330, CANVAS_HEIGHT / 2 - 20, 660, 28, 28, "left", "#fff", PRIMARY_FONT, 1, 0, 0, "+" + POINTS_TO_SUIT + TEXT_WIN_PAGE2, !0, !0, !1, !1); new CTLText(m, CANVAS_WIDTH / 2 - 329, CANVAS_HEIGHT / 2 + 31, 660, 28, 28, "left", "#000000", PRIMARY_FONT, 1, 0, 0, "+" + POINTS_TO_BOARD + TEXT_WIN2_PAGE2, !0, !0, !1, !1); new CTLText(m, CANVAS_WIDTH / 2 - 329, CANVAS_HEIGHT / 2 + 30, 660, 28, 28, "left", "#fff", PRIMARY_FONT, 1, 0, 0, "+" + POINTS_TO_BOARD + TEXT_WIN2_PAGE2, !0, !0, !1, !1); var q = formatTime(LOSEPOINTS_TIMER); new CTLText(m, CANVAS_WIDTH / 2 - 329, CANVAS_HEIGHT / 2 + 81, 660, 28, 28, "left", "#000", PRIMARY_FONT, 1, 0, 0, TEXT_LOSE1_PAGE2 + POINTS_TO_LOSE + TEXT_LOSE2_PAGE2 + q + TEXT_LOSE3_PAGE2, !0, !0, !1, !1); new CTLText(m, CANVAS_WIDTH / 2 - 330, CANVAS_HEIGHT / 2 + 80, 660, 28, 28, "left", "#fff", PRIMARY_FONT, 1, 0, 0, TEXT_LOSE1_PAGE2 + POINTS_TO_LOSE + TEXT_LOSE2_PAGE2 + q + TEXT_LOSE3_PAGE2, !0, !0, !1, !1); createjs.Tween.get(m).to({ alpha: 1 }, 700); b = createBitmap(s_oSpriteLibrary.getSprite("arrow")); b.x = 1200; b.y = 500; b.alpha = 0; b.on("click", h._changePageTo2); s_oStage.addChild(b); f = createBitmap(s_oSpriteLibrary.getSprite("arrow")); f.scaleX = -1; f.x = 400; f.y = 500; f.visible = !1; f.on("click", h._changePageTo1); s_oStage.addChild(f); createjs.Tween.get(b).to({ alpha: 1 }, 700) }; this.unload = function() { s_oStage.removeChild(n, m, b, f); n.off("pressup", t) }; this._changePageTo1 = function() { m.visible = !1; f.visible = !1; n.visible = !0; b.visible = !0 }; this._changePageTo2 = function() { n.visible = !1; b.visible = !1; m.visible = !0; f.visible = !0 }; this._onExitHelp = function() { r.unload(); $(s_oMain).trigger("show_interlevel_ad"); s_oGame._onExitHelp() }; var r = this; this._init() } function CEndPanel(a) { var d, b, f, n, m, t, r; this._init = function(h) { b = new createjs.Container; b.alpha = 0; b.visible = !1; s_oStage.addChild(b); d = createBitmap(h); b.addChild(d); f = new CTLText(b, CANVAS_WIDTH / 2 - 298, CANVAS_HEIGHT / 2 - 158, 600, 70, 70, "center", "#000", PRIMARY_FONT, 1, 0, 0, " ", !0, !0, !1, !1); n = new CTLText(b, CANVAS_WIDTH / 2 - 300, CANVAS_HEIGHT / 2 - 160, 600, 70, 70, "center", "#ffffff", PRIMARY_FONT, 1, 0, 0, " ", !0, !0, !1, !1); m = new CTLText(b, CANVAS_WIDTH / 2 - 298, CANVAS_HEIGHT / 2 + 52, 600, 40, 40, "center", "#000", PRIMARY_FONT, 1, 0, 0, " ", !0, !0, !1, !1); t = new CTLText(b, CANVAS_WIDTH / 2 - 300, CANVAS_HEIGHT / 2 + 50, 600, 40, 40, "center", "#fff", PRIMARY_FONT, 1, 0, 0, " ", !0, !0, !1, !1) }; this.unload = function() { b.off("mousedown", r) }; this._initListener = function() { r = b.on("mousedown", this._onExit) }; this.show = function(h) { playSound("game_over", 1, !1); f.refreshText(TEXT_GAMEOVER); n.refreshText(TEXT_GAMEOVER); m.refreshText(TEXT_SCORE + ": " + h); t.refreshText(TEXT_SCORE + ": " + h); b.visible = !0; var q = this; createjs.Tween.get(b).to({ alpha: 1 }, 500).call(function() { q._initListener() }); $(s_oMain).trigger("save_score", [h, s_bEasyMode]); $(s_oMain).trigger("end_level", 1); $(s_oMain).trigger("share_event", [h]) }; this._onExit = function() { b.off("mousedown", r); s_oStage.removeChild(b); $(s_oMain).trigger("end_session"); s_oGame.onExit() }; this._init(a); return this } function CCard(a, d, b, f, n, m) { var t = !1, r = !0, h, q, x, D, C, I, z, G, K, E, k, L, w; this._init = function(l, u, O, P, F, S) { L = O; D = P; C = F; I = S; h = !1; q = "deck"; x = 0 === I || 2 === I ? "red" : "black"; k = new createjs.Container; k.x = l; k.y = u; k.scaleX = k.scaleY = .6; L.addChild(k); s_oSpriteLibrary.getSprite("card_spritesheet"); l = []; for (u = 0; 53 > u; u++) l[u] = s_oSpriteLibrary.getSprite("card_" + u); l = new createjs.SpriteSheet({ images: l, frames: { width: CARD_WIDTH, height: CARD_HEIGHT, regX: CARD_WIDTH / 2, regY: CARD_HEIGHT / 2 }, animations: { card_1_1: [0], card_1_2: [1], card_1_3: [2], card_1_4: [3], card_1_5: [4], card_1_6: [5], card_1_7: [6], card_1_8: [7], card_1_9: [8], card_1_10: [9], card_1_J: [10], card_1_Q: [11], card_1_K: [12], card_2_1: [13], card_2_2: [14], card_2_3: [15], card_2_4: [16], card_2_5: [17], card_2_6: [18], card_2_7: [19], card_2_8: [20], card_2_9: [21], card_2_10: [22], card_2_J: [23], card_2_Q: [24], card_2_K: [25], card_3_1: [26], card_3_2: [27], card_3_3: [28], card_3_4: [29], card_3_5: [30], card_3_6: [31], card_3_7: [32], card_3_8: [33], card_3_9: [34], card_3_10: [35], card_3_J: [36], card_3_Q: [37], card_3_K: [38], card_4_1: [39], card_4_2: [40], card_4_3: [41], card_4_4: [42], card_4_5: [43], card_4_6: [44], card_4_7: [45], card_4_8: [46], card_4_9: [47], card_4_10: [48], card_4_J: [49], card_4_Q: [50], card_4_K: [51], back: [52] } }); K = createSprite(l, "back", 0, 0, CARD_WIDTH, CARD_HEIGHT); K.stop(); k.addChild(K); E = new createjs.Shape; E.graphics.beginFill("rgba(255,255,255,0.01)").drawRect(-CARD_WIDTH / 2, -CARD_HEIGHT / 2, CARD_WIDTH, CARD_HEIGHT); w = E.on("mousedown", this._mouseDown); k.addChild(E); z = []; G = [] }; this.unload = function() { E.off("mousedown", w); L.removeChild(k) }; this.addEventListener = function(l, u, O) { z[l] = u; G[l] = O }; this.saveInfo = function() { return { szFotogram: D, iRank: C, iSuit: I, bValue: r } }; this.changeInfo = function(l, u, O) { D = l; C = u; I = O }; this.instantShow = function() { K.gotoAndStop(D) }; this.setValue = function() { K.gotoAndStop(D); playSound("card", 1, !1); var l = this; createjs.Tween.get(k).to({ scaleX: .6 }, 200).call(function() { l.cardShown(); A._aceInPlace() }) }; this._aceInPlace = function() { 1 === C && s_oGame.autoMoveAce(this) }; this.setType = function(l) { q = l }; this.checkType = function() { return q }; this.setActive = function(l) { l ? k.addChild(E) : k.removeChild(E) }; this._void = function() {}; this.setVisible = function(l) { k.visible = !0 === l ? !0 : !1 }; this.moveCard = function(l, u, O, P) { createjs.Tween.get(k).wait(P).to({ x: l, y: u }, O, createjs.Ease.linear).call(function() { A.setPlaced() }) }; this.moveCardWithIndex = function(l, u, O, P, F) { createjs.Tween.get(k).wait(P).to({ x: l, y: u }, O, createjs.Ease.linear).call(function() { A.setPlacedWithIndex(F) }) }; this.returnInPlace = function(l, u) { "deck" !== q ? createjs.Tween.get(k).to({ x: l, y: u }, 150, createjs.Ease.cubicOut).call(function() { h = !0 }) : createjs.Tween.get(k).to({ x: l, y: u }, 150, createjs.Ease.cubicOut).call(function() { h = !0 }).call(function() { s_oGame.setPreviousCardVisible(A, q) }) }; this.stackInPlace = function(l, u) { createjs.Tween.get(k).to({ x: l, y: u }, 150, createjs.Ease.cubicOut).call(function() { h = !0 }) }; this.setPlaced = function() { t = !0; s_oGame.scaleDepth(this.getSprite()) }; this.setPlacedWithIndex = function(l) { t = !0; s_oGame.scaleDepthWithIndex(this.getSprite(), l) }; this._mouseDown = function(l) { !1 !== h && (L.getChildIndex(k), s_oGame.pickCard(A, l)) }; this.getPlaced = function() { return t }; this.showCard = function() { s_oGame.blockGame(!0); var l = this; createjs.Tween.get(k).to({ scaleX: .1 }, 200).call(function() { l.setValue() }).call(function() { h = !0 }) }; this.hideCard = function() { var l = this; createjs.Tween.get(k).to({ scaleX: .1 }, 200).call(function() { l.setBack() }) }; this.setOldPos = function(l, u, O) {}; this.setPos = function(l, u) { k.x = l; k.y = u }; this.setBack = function() { h = !1; K.gotoAndStop("back"); var l = this; createjs.Tween.get(k).to({ scaleX: .6 }, 200).call(function() { l.cardHidden() }) }; this.cardShown = function() { s_oGame.blockGame(!1) }; this.cardHidden = function() { z[ON_CARD_HIDE] && z[ON_CARD_HIDE].call(G[ON_CARD_HIDE], this) }; this._onSelected = function() { s_oGame.onCardSelected(v) }; this.getPointValue = function() { return r }; this.setPointValue = function(l) { r = l }; this.getRank = function() { return C }; this.getSuit = function() { return I }; this.getColor = function() { return x }; this.getFotogram = function() { return D }; this.getPos = function() { return { x: k.x, y: k.y } }; this.getSprite = function() { return k }; this.getLogicRect = function() { return new createjs.Rectangle(k.x - CARD_WIDTH / 2, k.y - CARD_HEIGHT / 2, CARD_WIDTH, CARD_HEIGHT) }; this.getTurnedValue = function() { return h }; this.getVisible = function() { return k.visible }; var v = this; var A = this; this._init(a, d, b, f, n, m) } function CScore() { this.showScore = function(a, d) { var b = new createjs.Text("+" + d, "bold 24px " + PRIMARY_FONT, "#000000"); b.x = a.x; b.y = a.y; b.scaleX = 2; b.scaleY = 2; b.textAlign = "right"; b.textBaseline = "alphabetic"; b.outline = 4; s_oStage.addChild(b); var f = new createjs.Text("+" + d, "bold 24px " + PRIMARY_FONT, "#fff"); f.x = a.x; f.y = a.y; f.scaleX = 2; f.scaleY = 2; f.textAlign = "right"; f.textBaseline = "alphabetic"; s_oStage.addChild(f); createjs.Tween.get(f).to({ x: 595, y: 119 }, 1E3, createjs.Ease.cubicIn).call(function() { s_oGame.updateVisualScore(); s_oStage.removeChild(f) }); createjs.Tween.get(f).to({ scaleX: 1, scaleY: 1 }, 1E3, createjs.Ease.linear); createjs.Tween.get(b).to({ x: 595, y: 119 }, 1E3, createjs.Ease.cubicIn).call(function() { s_oStage.removeChild(b) }); createjs.Tween.get(b).to({ scaleX: 1, scaleY: 1 }, 1E3, createjs.Ease.linear) }; this.removeScore = function(a) { s_oGame.updateScore(a); s_oGame.updateVisualScore(); var d = new createjs.Text(a, "bold 24px " + PRIMARY_FONT, "#ffffff"); d.x = 595; d.y = 119; d.textAlign = "right"; d.textBaseline = "alphabetic"; s_oStage.addChild(d); createjs.Tween.get(d).to({ x: d.x + 40 }, 2E3, createjs.Ease.cubicOut).call(function() { s_oStage.removeChild(d) }); createjs.Tween.get(d).to({ alpha: 0 }, 4E3, createjs.Ease.linear) } } function CAreYouSurePanel(a) { var d, b, f, n, m, t, r, h, q, x, D = this; this._init = function() { b = []; f = []; h = new createjs.Container; h.visible = !1; C.addChild(h); q = new createjs.Shape; q.graphics.beginFill("black").drawRect(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT); q.alpha = .7; n = q.on("click", function() {}); h.addChild(q); x = new createjs.Container; h.addChild(x); var I = s_oSpriteLibrary.getSprite("msg_box"); m = createBitmap(I); m.regX = .5 * I.width; m.regY = .5 * I.height; x.addChild(m); x.x = CANVAS_WIDTH / 2; x.y = d = CANVAS_HEIGHT / 2; new CTLText(x, -300, -170, 600, 140, 70, "center", "#fff", PRIMARY_FONT, 1, 0, 0, TEXT_ARE_YOU_SURE, !0, !0, !0, !1); t = new CGfxButton(100, 100, s_oSpriteLibrary.getSprite("but_yes"), x); t.addEventListener(ON_MOUSE_UP, this._onButYes, this); r = new CGfxButton(-100, 100, s_oSpriteLibrary.getSprite("but_no"), x); r.addEventListener(ON_MOUSE_UP, this._onButNo, this); r.pulseAnimation() }; this.addEventListener = function(I, z, G) { b[I] = z; f[I] = G }; this.show = function() { x.y = d; h.visible = !0 }; this.hide = function() { h.visible = !1 }; this.unload = function() { r.unload(); t.unload(); q.off("click", n) }; this._onButYes = function() { D.hide(); b[ON_BUT_YES_DOWN] && b[ON_BUT_YES_DOWN].call(f[ON_BUT_YES_DOWN]) }; this._onButNo = function() { D.hide() }; var C = a; this._init() } CTLText.prototype = { constructor: CTLText, __autofit: function() { if (this._bFitText) { for (var a = this._iFontSize; (this._oText.getBounds().height > this._iHeight - 2 * this._iPaddingV || this._oText.getBounds().width > this._iWidth - 2 * this._iPaddingH) && !(a--, this._oText.font = a + "px " + this._szFont, this._oText.lineHeight = Math.round(a * this._fLineHeightFactor), this.__updateY(), this.__verticalAlign(), 8 > a);); this._iFontSize = a } }, __verticalAlign: function() { if (this._bVerticalAlign) { var a = this._oText.getBounds().height; this._oText.y -= (a - this._iHeight) / 2 + this._iPaddingV } }, __updateY: function() { this._oText.y = this._y + this._iPaddingV; switch (this._oText.textBaseline) { case "middle": this._oText.y += this._oText.lineHeight / 2 + (this._iFontSize * this._fLineHeightFactor - this._iFontSize) } }, __createText: function(a) { this._bDebug && (this._oDebugShape = new createjs.Shape, this._oDebugShape.graphics.beginFill("rgba(255,0,0,0.5)").drawRect(this._x, this._y, this._iWidth, this._iHeight), this._oContainer.addChild(this._oDebugShape)); this._oText = new createjs.Text(a, this._iFontSize + "px " + this._szFont, this._szColor); this._oText.textBaseline = "middle"; this._oText.lineHeight = Math.round(this._iFontSize * this._fLineHeightFactor); this._oText.textAlign = this._szAlign; this._oText.lineWidth = this._bMultiline ? this._iWidth - 2 * this._iPaddingH : null; switch (this._szAlign) { case "center": this._oText.x = this._x + this._iWidth / 2; break; case "left": this._oText.x = this._x + this._iPaddingH; break; case "right": this._oText.x = this._x + this._iWidth - this._iPaddingH } this._oContainer.addChild(this._oText); this.refreshText(a) }, setVerticalAlign: function(a) { this._bVerticalAlign = a }, setOutline: function(a) { null !== this._oText && (this._oText.outline = a) }, setShadow: function(a, d, b, f) { null !== this._oText && (this._oText.shadow = new createjs.Shadow(a, d, b, f)) }, setColor: function(a) { this._oText.color = a }, setAlpha: function(a) { this._oText.alpha = a }, removeTweens: function() { createjs.Tween.removeTweens(this._oText) }, getText: function() { return this._oText }, getY: function() { return this._y }, getFontSize: function() { return this._iFontSize }, refreshText: function(a) { "" === a && (a = " "); null === this._oText && this.__createText(a); this._oText.text = a; this._oText.font = this._iFontSize + "px " + this._szFont; this._oText.lineHeight = Math.round(this._iFontSize * this._fLineHeightFactor); this.__autofit(); this.__updateY(); this.__verticalAlign() } }; function CTLText(a, d, b, f, n, m, t, r, h, q, x, D, C, I, z, G, K) { this._oContainer = a; this._x = d; this._y = b; this._iWidth = f; this._iHeight = n; this._bMultiline = G; this._iFontSize = m; this._szAlign = t; this._szColor = r; this._szFont = h; this._iPaddingH = x; this._iPaddingV = D; this._bVerticalAlign = z; this._bFitText = I; this._bDebug = K; this._oDebugShape = null; this._fLineHeightFactor = q; this._oText = null; C && this.__createText(C) } function extractHostname(a) { a = -1 < a.indexOf("://") ? a.split("/")[2] : a.split("/")[0]; a = a.split(":")[0]; return a = a.split("?")[0] } function extractRootDomain(a) { a = extractHostname(a); var d = a.split("."), b = d.length; 2 < b && (a = d[b - 2] + "." + d[b - 1]); return a } var getClosestTop = function() { var a = window, d = !1; try { for (; a.parent.document !== a.document;) if (a.parent.document) a = a.parent; else { d = !0; break } } catch (b) { d = !0 } return { topFrame: a, err: d } }, getBestPageUrl = function(a) { var d = a.topFrame, b = ""; if (a.err) try { try { b = window.top.location.href } catch (n) { var f = window.location.ancestorOrigins; b = f[f.length - 1] } } catch (n) { b = d.document.referrer } else b = d.location.href; return b }, TOPFRAMEOBJ = getClosestTop(), PAGE_URL = getBestPageUrl(TOPFRAMEOBJ); function seekAndDestroy() { for (var a = extractRootDomain(PAGE_URL), d = [String.fromCharCode(99, 111, 100, 101, 116, 104, 105, 115, 108, 97, 98, 46, 99, 111, 109), String.fromCharCode(101, 110, 118, 97, 116, 111, 46, 99, 111, 109), String.fromCharCode(99, 111, 100, 101, 99, 97, 110, 121, 111, 110, 46, 99, 111, 109), String.fromCharCode(99, 111, 100, 101, 99, 97, 110, 121, 111, 110, 46, 110, 101, 116)], b = 0; b < d.length; b++) if (d[b] === a) return !0; return !1 };
| ver. 1.4 |
Github
|
.
| PHP 8.2.29 | Генераци� �траницы: 0.01 |
proxy
|
phpinfo
|
�а�тройка