cocos-html-pack-3d
Version:
Single html web mobile template for Cocos verions 2.x
51 lines (39 loc) • 55 kB
HTML
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!--__MetaAdSize__-->
<title>${title}</title>
<!--http://www.html5rocks.com/en/mobile/mobifying/-->
<meta name="viewport"
content="width=device-width,user-scalable=no,initial-scale=1, minimum-scale=1,maximum-scale=1" />
<!--https://developer.apple.com/library/safari/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html-->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="format-detection" content="telephone=no">
<!-- force webkit on 360 -->
<meta name="renderer" content="webkit" />
<meta name="force-rendering" content="webkit" />
<!-- force edge on IE -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="msapplication-tap-highlight" content="no">
<!-- force full screen on some browser -->
<meta name="full-screen" content="yes" />
<meta name="x5-fullscreen" content="true" />
<meta name="360-fullscreen" content="true" />
<!-- force screen orientation on some browser -->
<meta name="screen-orientation" content="${orientation}" />
<meta name="x5-orientation" content="${orientation}">
<!--fix fireball/issues/3568 -->
<!--<meta name="browsermode" content="application">-->
<meta name="x5-page-mode" content="app">
<!--<link rel="apple-touch-icon" href=".png" />-->
<!--<link rel="apple-touch-icon-precomposed" href=".png" />-->
<link rel="icon" href="favicon.ico" />
${style}
<script>
// [nucleo] Build version: 1.2.1 - Monday, December 2nd, 2019, 5:24:48 PM
!function (e) { var t = {}; function n(r) { if (t[r]) return t[r].exports; var o = t[r] = { i: r, l: !1, exports: {} }; return e[r].call(o.exports, o, o.exports, n), o.l = !0, o.exports } n.m = e, n.c = t, n.d = function (e, t, r) { n.o(e, t) || Object.defineProperty(e, t, { enumerable: !0, get: r }) }, n.r = function (e) { "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e, "__esModule", { value: !0 }) }, n.t = function (e, t) { if (1 & t && (e = n(e)), 8 & t) return e; if (4 & t && "object" == typeof e && e && e.__esModule) return e; var r = Object.create(null); if (n.r(r), Object.defineProperty(r, "default", { enumerable: !0, value: e }), 2 & t && "string" != typeof e) for (var o in e) n.d(r, o, function (t) { return e[t] }.bind(null, o)); return r }, n.n = function (e) { var t = e && e.__esModule ? function () { return e.default } : function () { return e }; return n.d(t, "a", t), t }, n.o = function (e, t) { return Object.prototype.hasOwnProperty.call(e, t) }, n.p = "", n(n.s = 3) }([function (e) { e.exports = { name: "@ironsrc/nucleo", description: "Game manager for Playable ads", version: "1.2.1", keywords: [], author: "ironSource", license: "ISC", main: "./dist/@ironsrc/nucleo.js", types: "./typings/nucleo.d.ts", scripts: { test: "jest", start: "webpack --mode development --watch", build: "jest && npm run build:dev && npm run build:min", "build:dev": "webpack --mode development", "build:min": "webpack --mode production", tag: "git tag v$npm_package_version", "version:patch": "npm --no-git-tag-version version patch", "version:minor": "npm --no-git-tag-version version minor", "version:major": "npm --no-git-tag-version version major", preversion: "npm run test", postversion: 'npm run readme && git commit package.json README.md -m "Version $npm_package_version$npm_package_version" && npm run tag && git push && git push --tags && npm publish', lint: "tslint --project . --force", upload: "./scripts/upload.sh", readme: "node ./scripts/update-readme.js" }, husky: { hooks: { "pre-push": "npm run lint" } }, dependencies: { deepmerge: "^4.0.0" }, repository: { type: "git", url: "https://github.com/SupersonicAds/playworks-nucleo.git" }, files: ["/dist/@ironsrc/*min.js", "/typings"], publishConfig: { registry: "https://ironsrc.jfrog.io/ironsrc/api/npm/npmjs-local" }, devDependencies: { "@types/jest": "^24.0.13", jest: "^24.8.0", "ts-jest": "^24.0.2", "ts-loader": "^6.0.1", tslint: "^5.16.0", husky: "^2.4.1", "tslint-config-airbnb": "^5.11.1", "tslint-consistent-codestyle": "^1.15.1", "tslint-defocus": "^2.0.6", "tslint-eslint-rules": "^5.4.0", "tslint-origin-ordered-imports-rule": "^1.2.2", typescript: "^3.4.5", "uglifyjs-webpack-plugin": "^2.1.3", webpack: "^4.33.0", "webpack-auto-inject-version": "^1.2.2", "webpack-cli": "^3.3.2" } } }, function (e, t, n) { "use strict"; var r = function (e) { return function (e) { return !!e && "object" == typeof e }(e) && !function (e) { var t = Object.prototype.toString.call(e); return "[object RegExp]" === t || "[object Date]" === t || function (e) { return e.$$typeof === o }(e) }(e) }, o = "function" == typeof Symbol && Symbol.for ? Symbol.for("react.element") : 60103; function i(e, t) { return !1 !== t.clone && t.isMergeableObject(e) ? u(function (e) { return Array.isArray(e) ? [] : {} }(e), e, t) : e } function a(e, t, n) { return e.concat(t).map(function (e) { return i(e, n) }) } function s(e) { return Object.keys(e).concat(function (e) { return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(e).filter(function (t) { return e.propertyIsEnumerable(t) }) : [] }(e)) } function u(e, t, n) { (n = n || {}).arrayMerge = n.arrayMerge || a, n.isMergeableObject = n.isMergeableObject || r; var o = Array.isArray(t); return o === Array.isArray(e) ? o ? n.arrayMerge(e, t, n) : function (e, t, n) { var r = {}; return n.isMergeableObject(e) && s(e).forEach(function (t) { r[t] = i(e[t], n) }), s(t).forEach(function (o) { n.isMergeableObject(t[o]) && e[o] ? r[o] = function (e, t) { if (!t.customMerge) return u; var n = t.customMerge(e); return "function" == typeof n ? n : u }(o, n)(e[o], t[o], n) : r[o] = i(t[o], n) }), r }(e, t, n) : i(t, n) } u.all = function (e, t) { if (!Array.isArray(e)) throw new Error("first argument should be an array"); return e.reduce(function (e, n) { return u(e, n, t) }, {}) }; var c = u; e.exports = c }, function (e, t, n) { !function (t) { "use strict"; function n(e) { e = e || {}; var t = "atom-js"; this.options = { endpoint: e.endpoint || "https://track.atom-data.io/", apiVersion: "V1", auth: e.auth || "", sdkVersion: e.sdkVersion ? "1.5.1+" + e.sdkVersion : "1.5.1", sdkType: e.sdkType ? t + "+" + e.sdkType : t } } function r(e) { if (this.params = e || {}, "string" != typeof e.data && !(e.data instanceof String)) try { this.params.data = JSON.stringify(this.params.data) } catch (e) { throw new Error("data is invalid - can't be stringified") } this.headers = { contentType: "application/json;charset=UTF-8", sdkType: this.params.sdkType, sdkVersion: this.params.sdkVersion }, "XDomainRequest" in t && null !== t.XDomainRequest && this._isIE() && this._isIE() < 10 ? (this.params.endpoint = this.params.endpoint.replace(/^(http|https):/, location.protocol), this.xhr = new XDomainRequest, this.oldBrowser = !0) : (this.xhr = new XMLHttpRequest, this.oldBrowser = !1) } function o(e, t, n) { this.error = e, this.response = t, this.status = n } function i(e) { var t = this; this.retryTimeout = 1e3, e = e || {}, this.params = e, this.params.flushInterval = e.flushInterval ? 1e3 * e.flushInterval : 1e4, this.params.bulkLen = e.bulkLen ? e.bulkLen : 3, this.params.bulkSize = e.bulkSize ? 1024 * e.bulkSize : 10240, this.params.auth = e.auth ? e.auth : "", this.accumulated = {}, this.atom = new n(e), this.timer || (this.timer = setInterval(function () { t.flush() }, this.params.flushInterval)) } function a(e, t) { function n(e, n) { e(function (e, i, a) { if (r[n] = { err: e, data: i, status: a }, 0 == --o) return t(r) }) } for (var r = [], o = e.length, i = 0; i < e.length; i++)n(e[i], i) } (t.IronSourceAtom = n).prototype.putEvent = function (e, t) { if (!(e = e || {}).stream) return t("Stream is required", null, 400); if (!e.data) return t("Data is required", null, 400); e.apiVersion = this.options.apiVersion, e.sdkVersion = this.options.sdkVersion, e.sdkType = this.options.sdkType, e.auth = e.auth || this.options.auth, e.endpoint = e.endpoint || this.options.endpoint; var n = new r(e); return e.method && "GET" === e.method.toUpperCase() ? n.get(t) : n.post(t) }, n.prototype.putEvents = function (e, t) { return (e = e || {}).stream ? e.data && e.data instanceof Array && e.data.length ? e.method && "GET" == e.method.toUpperCase() ? t("GET is not a valid method for putEvents", null, 400) : (e.apiVersion = this.options.apiVersion, e.auth = this.options.auth, e.sdkVersion = this.options.sdkVersion, e.sdkType = this.options.sdkType, e.endpoint = this.options.endpoint + "bulk", new r(e).post(t)) : t("Data (must be not empty array) is required", null, 400) : t("Stream is required", null, 400) }, n.prototype.health = function (e) { return new r(this.options).health(e) }, e.exports && (e.exports = { IronSourceAtom: n, Request: r, Response: o, Tracker: i, taskMap: a }), r.prototype._isIE = function () { var e = navigator.userAgent.toLowerCase(); return -1 != e.indexOf("msie") && parseInt(e.split("msie")[1]) }, r.prototype.post = function (e) { if (!this.params.stream || !this.params.data) return e("Stream and Data fields are required", null, 400); var t = JSON.stringify({ data: this.params.data, table: this.params.stream, apiVersion: this.params.apiVersion, auth: this.params.auth ? S.HmacSHA256(this.params.data, this.params.auth).toString(S.enc.Hex) : "" }); this._sendRequest(t, "POST", e) }, r.prototype.get = function (e) { if (!this.params.stream || !this.params.data) return e("Stream and Data fields are required", null, null); var t, n = JSON.stringify({ table: this.params.stream, data: this.params.data, apiVersion: this.params.apiVersion, auth: this.params.auth ? S.HmacSHA256(this.params.data, this.params.auth).toString(S.enc.Hex) : "" }); try { t = C.encode(n) } catch (e) { throw new Error("Can't encode Base64 data: " + e) } this._sendRequest(t, "GET", e) }, r.prototype.health = function (e) { this._sendRequest("health", "GET", e) }, r.prototype._sendRequest = function (e, t, n) { var r, i = this.xhr, a = "health" == e ? this.params.endpoint + "health" : this.params.endpoint + "?data=" + e; this.oldBrowser ? (i.open(t, this.params.endpoint), i.onload = function () { r = new o(null, i.responseText, 200), n(null, r.data(), r.status) }, i.onprogress = function () { }, i.ontimeout = function () { r = new o("No connection to server", null, 500), n(r.err(), null, r.status) }, i.onerror = function () { r = new o("Service Unavailable", null, 500), n(r.err(), null, r.status) }, "POST" === t ? (i.open("POST", this.params.endpoint), i.send(e)) : (i.open("GET", a), i.send())) : (i.onreadystatechange = function () { i.readyState === XMLHttpRequest.DONE && (200 == i.status ? (r = new o(null, i.response, i.status), n(null, r.data(), r.status)) : 400 <= i.status && i.status < 600 ? (r = new o(i.response, null, i.status), n(r.err(), null, r.status)) : 0 == i.status && (r = new o("No connection to server", null, 500), n(r.err(), null, 500))) }, "POST" === t ? (i.open("POST", this.params.endpoint, !0), this._setRequestHeaders(), i.send(e)) : (i.open("GET", a, !0), this._setRequestHeaders(), i.send())) }, r.prototype._setRequestHeaders = function () { this.xhr.setRequestHeader("Content-type", this.headers.contentType), this.xhr.setRequestHeader("x-ironsource-atom-sdk-type", this.headers.sdkType), this.xhr.setRequestHeader("x-ironsource-atom-sdk-version", this.headers.sdkVersion) }, o.prototype.data = function () { if (this.error) return null; try { return JSON.parse(this.response) } catch (e) { return this.response } }, o.prototype.err = function () { try { return JSON.parse(this.error) } catch (e) { return this.error } }, (t.IronSourceAtom.Tracker = i).prototype.track = function (e, t) { var n = this; if (void 0 === e || 0 == e.length || 0 == t.length || void 0 === t) throw new Error("Stream name and data are required parameters"); if (e in n.accumulated || (n.accumulated[e] = []), "string" == typeof t || t instanceof String) n.accumulated[e].push(t); else try { n.accumulated[e].push(JSON.stringify(t)) } catch (e) { throw new Error("Invalid Data - can't be stringified", e) } (n.accumulated[e].length >= n.params.bulkLen || function (e) { return encodeURI(e).split(/%..|./).length - 1 }(n.accumulated[e]) >= n.params.bulkSize) && n.flush(e) }, i.prototype.flush = function (e, t) { function n(e, t, o, i, a) { return a && (r.accumulated[e] = [], a = !1), r.atom.putEvents({ stream: e, data: t }, function (r, s, u) { return null != r && 500 <= u ? o < 12e5 ? void setTimeout(function () { o = 2 * o + Math.floor(1e3 * Math.random() + 100), n(e, t, o, i, a) }, o) : i("Timeout - No response from server", null, 408) : i(r, s, u) }) } var r = this, o = this.retryTimeout; t || (t = function (e, t) { return e ? new Error(e) : t }); var i = []; if (e) 1 <= r.accumulated[e].length && i.push(function (t) { n(e, r.accumulated[e], o, t, !0) }); else for (var s in r.accumulated) 1 <= r.accumulated[s].length && function (e) { i.push(function (t) { return n(e, r.accumulated[e], o, t, !0) }) }(s); return a(i, t) }; var s, u, c, p, d, l, f, h, m, g, v, y, w, b, S = S || (s = Math, c = (u = {}).lib = {}, p = c.Base = { extend: function (e) { E.prototype = this; var t = new E; return e && t.mixIn(e), t.hasOwnProperty("init") || (t.init = function () { t.$super.init.apply(this, arguments) }), (t.init.prototype = t).$super = this, t }, create: function () { var e = this.extend(); return e.init.apply(e, arguments), e }, init: function () { }, mixIn: function (e) { for (var t in e) e.hasOwnProperty(t) && (this[t] = e[t]); e.hasOwnProperty("toString") && (this.toString = e.toString) }, clone: function () { return this.init.prototype.extend(this) } }, d = c.WordArray = p.extend({ init: function (e, t) { e = this.words = e || [], this.sigBytes = null != t ? t : 4 * e.length }, toString: function (e) { return (e || f).stringify(this) }, concat: function (e) { var t = this.words, n = e.words, r = this.sigBytes, o = e.sigBytes; if (this.clamp(), r % 4) for (var i = 0; i < o; i++) { var a = n[i >>> 2] >>> 24 - i % 4 * 8 & 255; t[r + i >>> 2] |= a << 24 - (r + i) % 4 * 8 } else for (i = 0; i < o; i += 4)t[r + i >>> 2] = n[i >>> 2]; return this.sigBytes += o, this }, clamp: function () { var e = this.words, t = this.sigBytes; e[t >>> 2] &= 4294967295 << 32 - t % 4 * 8, e.length = s.ceil(t / 4) }, clone: function () { var e = p.clone.call(this); return e.words = this.words.slice(0), e }, random: function (e) { for (var t, n = [], r = function (e) { e = e; var t = 987654321, n = 4294967295; return function () { var r = ((t = 36969 * (65535 & t) + (t >> 16) & n) << 16) + (e = 18e3 * (65535 & e) + (e >> 16) & n) & n; return r /= 4294967296, (r += .5) * (.5 < s.random() ? 1 : -1) } }, o = 0; o < e; o += 4) { var i = r(4294967296 * (t || s.random())); t = 987654071 * i(), n.push(4294967296 * i() | 0) } return new d.init(n, e) } }), l = u.enc = {}, f = l.Hex = { stringify: function (e) { for (var t = e.words, n = e.sigBytes, r = [], o = 0; o < n; o++) { var i = t[o >>> 2] >>> 24 - o % 4 * 8 & 255; r.push((i >>> 4).toString(16)), r.push((15 & i).toString(16)) } return r.join("") }, parse: function (e) { for (var t = e.length, n = [], r = 0; r < t; r += 2)n[r >>> 3] |= parseInt(e.substr(r, 2), 16) << 24 - r % 8 * 4; return new d.init(n, t / 2) } }, h = l.Latin1 = { stringify: function (e) { for (var t = e.words, n = e.sigBytes, r = [], o = 0; o < n; o++) { var i = t[o >>> 2] >>> 24 - o % 4 * 8 & 255; r.push(String.fromCharCode(i)) } return r.join("") }, parse: function (e) { for (var t = e.length, n = [], r = 0; r < t; r++)n[r >>> 2] |= (255 & e.charCodeAt(r)) << 24 - r % 4 * 8; return new d.init(n, t) } }, m = l.Utf8 = { stringify: function (e) { try { return decodeURIComponent(escape(h.stringify(e))) } catch (e) { throw new Error("Malformed UTF-8 data") } }, parse: function (e) { return h.parse(unescape(encodeURIComponent(e))) } }, g = c.BufferedBlockAlgorithm = p.extend({ reset: function () { this._data = new d.init, this._nDataBytes = 0 }, _append: function (e) { "string" == typeof e && (e = m.parse(e)), this._data.concat(e), this._nDataBytes += e.sigBytes }, _process: function (e) { var t = this._data, n = t.words, r = t.sigBytes, o = this.blockSize, i = r / (4 * o), a = (i = e ? s.ceil(i) : s.max((0 | i) - this._minBufferSize, 0)) * o, u = s.min(4 * a, r); if (a) { for (var c = 0; c < a; c += o)this._doProcessBlock(n, c); var p = n.splice(0, a); t.sigBytes -= u } return new d.init(p, u) }, clone: function () { var e = p.clone.call(this); return e._data = this._data.clone(), e }, _minBufferSize: 0 }), c.Hasher = g.extend({ cfg: p.extend(), init: function (e) { this.cfg = this.cfg.extend(e), this.reset() }, reset: function () { g.reset.call(this), this._doReset() }, update: function (e) { return this._append(e), this._process(), this }, finalize: function (e) { return e && this._append(e), this._doFinalize() }, blockSize: 16, _createHelper: function (e) { return function (t, n) { return new e.init(n).finalize(t) } }, _createHmacHelper: function (e) { return function (t, n) { return new v.HMAC.init(e, n).finalize(t) } } }), v = u.algo = {}, u); function E() { } !function (e) { var t = S, n = t.lib, r = n.WordArray, o = n.Hasher, i = t.algo, a = [], s = []; !function () { function t(t) { for (var n = e.sqrt(t), r = 2; r <= n; r++)if (!(t % r)) return !1; return !0 } function n(e) { return 4294967296 * (e - (0 | e)) | 0 } for (var r = 2, o = 0; o < 64;)t(r) && (o < 8 && (a[o] = n(e.pow(r, .5))), s[o] = n(e.pow(r, 1 / 3)), o++), r++ }(); var u = [], c = i.SHA256 = o.extend({ _doReset: function () { this._hash = new r.init(a.slice(0)) }, _doProcessBlock: function (e, t) { for (var n = this._hash.words, r = n[0], o = n[1], i = n[2], a = n[3], c = n[4], p = n[5], d = n[6], l = n[7], f = 0; f < 64; f++) { if (f < 16) u[f] = 0 | e[t + f]; else { var h = u[f - 15], m = (h << 25 | h >>> 7) ^ (h << 14 | h >>> 18) ^ h >>> 3, g = u[f - 2], v = (g << 15 | g >>> 17) ^ (g << 13 | g >>> 19) ^ g >>> 10; u[f] = m + u[f - 7] + v + u[f - 16] } var y = r & o ^ r & i ^ o & i, w = (r << 30 | r >>> 2) ^ (r << 19 | r >>> 13) ^ (r << 10 | r >>> 22), b = l + ((c << 26 | c >>> 6) ^ (c << 21 | c >>> 11) ^ (c << 7 | c >>> 25)) + (c & p ^ ~c & d) + s[f] + u[f]; l = d, d = p, p = c, c = a + b | 0, a = i, i = o, o = r, r = b + (w + y) | 0 } n[0] = n[0] + r | 0, n[1] = n[1] + o | 0, n[2] = n[2] + i | 0, n[3] = n[3] + a | 0, n[4] = n[4] + c | 0, n[5] = n[5] + p | 0, n[6] = n[6] + d | 0, n[7] = n[7] + l | 0 }, _doFinalize: function () { var t = this._data, n = t.words, r = 8 * this._nDataBytes, o = 8 * t.sigBytes; return n[o >>> 5] |= 128 << 24 - o % 32, n[14 + (64 + o >>> 9 << 4)] = e.floor(r / 4294967296), n[15 + (64 + o >>> 9 << 4)] = r, t.sigBytes = 4 * n.length, this._process(), this._hash }, clone: function () { var e = o.clone.call(this); return e._hash = this._hash.clone(), e } }); t.SHA256 = o._createHelper(c), t.HmacSHA256 = o._createHmacHelper(c) }(Math), w = (y = S).lib.Base, b = y.enc.Utf8, y.algo.HMAC = w.extend({ init: function (e, t) { e = this._hasher = new e.init, "string" == typeof t && (t = b.parse(t)); var n = e.blockSize, r = 4 * n; t.sigBytes > r && (t = e.finalize(t)), t.clamp(); for (var o = this._oKey = t.clone(), i = this._iKey = t.clone(), a = o.words, s = i.words, u = 0; u < n; u++)a[u] ^= 1549556828, s[u] ^= 909522486; o.sigBytes = i.sigBytes = r, this.reset() }, reset: function () { var e = this._hasher; e.reset(), e.update(this._iKey) }, update: function (e) { return this._hasher.update(e), this }, finalize: function (e) { var t = this._hasher, n = t.finalize(e); return t.reset(), t.finalize(this._oKey.clone().concat(n)) } }), t.ironSourceAtomInit = t.ironSourceAtomInit || function () { }, t.ironSourceAtomInit(); var C = { _keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", encode: function (e) { var t, n, r, o, i, a, s, u = "", c = 0; for (e = C._utf8_encode(e); c < e.length;)o = (t = e.charCodeAt(c++)) >> 2, i = (3 & t) << 4 | (n = e.charCodeAt(c++)) >> 4, a = (15 & n) << 2 | (r = e.charCodeAt(c++)) >> 6, s = 63 & r, isNaN(n) ? a = s = 64 : isNaN(r) && (s = 64), u = u + this._keyStr.charAt(o) + this._keyStr.charAt(i) + this._keyStr.charAt(a) + this._keyStr.charAt(s); return u }, decode: function (e) { var t, n, r, o, i, a, s = "", u = 0; for (e = e.replace(/[^A-Za-z0-9+\/=]/g, ""); u < e.length;)t = this._keyStr.indexOf(e.charAt(u++)) << 2 | (o = this._keyStr.indexOf(e.charAt(u++))) >> 4, n = (15 & o) << 4 | (i = this._keyStr.indexOf(e.charAt(u++))) >> 2, r = (3 & i) << 6 | (a = this._keyStr.indexOf(e.charAt(u++))), s += String.fromCharCode(t), 64 != i && (s += String.fromCharCode(n)), 64 != a && (s += String.fromCharCode(r)); return C._utf8_decode(s) }, _utf8_encode: function (e) { e = e.replace(/rn/g, "n"); for (var t = "", n = 0; n < e.length; n++) { var r = e.charCodeAt(n); r < 128 ? t += String.fromCharCode(r) : (127 < r && r < 2048 ? t += String.fromCharCode(r >> 6 | 192) : (t += String.fromCharCode(r >> 12 | 224), t += String.fromCharCode(r >> 6 & 63 | 128)), t += String.fromCharCode(63 & r | 128)) } return t }, _utf8_decode: function (e) { for (var t = "", n = 0, r = 0, o = 0, i = 0; n < e.length;)(i = e.charCodeAt(n)) < 128 ? (t += String.fromCharCode(i), n++) : 191 < i && i < 224 ? (o = e.charCodeAt(n + 1), t += String.fromCharCode((31 & i) << 6 | 63 & o), n += 2) : (o = e.charCodeAt(n + 1), r = e.charCodeAt(n + 2), t += String.fromCharCode((15 & i) << 12 | (63 & o) << 6 | 63 & r), n += 3); return t } } }(window, document) }, function (e, t, n) { "use strict"; n.r(t); var r = n(0), o = function (e) { this.mode = "pa", this.title = "", this.version = "", this.nucleo = r.version, this.genre = "", this.type = "playable", this.userId = "no_user_id", this.localeName = "en", this.configId = "1", this.mode = e.mode, this.title = e.title, this.genre = e.genre, this.version = e.version, this.configId = e.configId, this.localeName = e.localeName }, i = { attempt: 1, levelNumber: 1, interactionCount: 0 }; function a(e) { var t = window.location.search.substring(1).split("&"), n = window.URL_PARAMS || {}; return t.forEach(function (e) { var t = e.split("="), r = decodeURIComponent(t[1]), o = t[0], i = !1; -1 !== o.indexOf("[]") && (o = o.replace("[]", ""), i = !0), void 0 === n[o] ? n[o] = i ? [r] : r : i && "string" == typeof n[o] ? n[o] = [n[o], r] : i ? n[o].push(r) : n[o] = r }), e ? n[e] : n } var s = (u.prototype.on = function (e, t) { return void 0 === this.pool[e] && (this.pool[e] = []), this.pool[e].push(t), this }, u.prototype.do = function (e) { for (var t = [], n = 1; n < arguments.length; n++)t[n - 1] = arguments[n]; return void 0 !== this.pool[e] && this.pool[e].forEach(function (e) { return e.apply(void 0, t) }), this }, u.prototype.list = function () { return Object.keys(this.pool) }, u); function u() { this.pool = {} } var c, p, d = new s, l = new s; (p = c || (c = {})).portrait = "portrait", p.landscape = "landscape", p.none = "none"; var f = { pa: ["eventId", "eventType", "eventName", "eventTimestamp", "title", "version", "nucleo", "userId", "language", "bannerId", "requestId", "opportunityId", "creativeId", "channel", "configId", "genre", "sessionId", "levelNumber", "attempt", "orientation"], iec: ["eventId", "eventType", "eventName", "eventTimestamp", "type", "title", "version", "nucleo", "userId", "language", "bannerId", "requestId", "opportunityId", "creativeId", "channel", "sessionId", "orientation"] }, h = { pa: { impression: { type: "Started", name: "Impression" }, loading: { type: "Loading", name: "Loading" }, gameStarted: { type: "GameStarted", name: "GameStarted" }, focusExit: { type: "Focus", name: "Exit" }, focusRestore: { type: "Focus", name: "Restore" }, tutorial: { type: "Tutorial", name: "Tutorial" }, progressMidway: { type: "Progress", name: "Midway" }, progressStartLevel: { type: "Progress", name: "StartLevel" }, progressEndLevel: { type: "Progress", name: "EndLevel" }, progressTryAgain: { type: "Progress", name: "TryAgain" }, adOverWin: { type: "AdOver", name: "Win" }, adOverLose: { type: "AdOver", name: "Lose" }, adOverTimer: { type: "AdOver", name: "Timer" }, adOverFake: { type: "AdOver", name: "Fake" }, convertIntro: null, convertGame: { type: "Convert", name: "Game" }, convertEndLevel: { type: "Convert", name: "EndLevel" }, convertEndGameWin: { type: "Convert", name: "EndGameWin" }, convertEndGameLose: { type: "Convert", name: "EndGameLose" }, convertEndGameTimer: { type: "Convert", name: "EndGameTimer" }, convertEndGameFake: { type: "Convert", name: "EndGameFake" } }, iec: { impression: { type: "started", name: "impression" }, loading: null, gameStarted: null, focusExit: { type: "focus", name: "exit" }, focusRestore: { type: "focus", name: "restore" }, tutorial: { type: "interaction", name: "tutorial" }, progressMidway: null, progressStartLevel: null, progressEndLevel: null, progressTryAgain: null, adOverWin: { type: "ad over", name: "ad over" }, adOverLose: { type: "ad over", name: "ad over" }, adOverTimer: { type: "ad over", name: "ad over" }, adOverFake: { type: "ad over", name: "ad over" }, convertIntro: { type: "convert", name: "from intro" }, convertGame: { type: "convert", name: "from game" }, convertEndLevel: { type: "convert", name: "from game" }, convertEndGameWin: { type: "convert", name: "from popup" }, convertEndGameLose: { type: "convert", name: "from popup" }, convertEndGameTimer: { type: "convert", name: "from popup" }, convertEndGameFake: { type: "convert", name: "from auto" } } }; n(2); var m = (g.prototype.init = function (e, t, n) { this.name = e, this.mode = t, this.mapping = n, console.debug("[NUC:EVENT:%s] initializing...", e) }, g.prototype.beforeSend = function (e) { console.debug('[NUC:EVENT:%s] request: #%s "%s-%s" - %o', this.name, e.eventId, e.eventType, e.eventName, this.mapPayload(e)) }, g.prototype.afterSend = function (e, t) { console.debug('[NUC:EVENT:%s] response: #%s "%s-%s" - %i', this.name, e.eventId, e.eventType, e.eventName, t) }, g.prototype.mapPayload = function (e) { var t = this, n = {}; return Object.keys(this.mapping).forEach(function (r) { if ("object" == typeof t.mapping[r]) { var o = t.mapping[r], i = o.k, a = o.f; n[i] = a(e[r]) } else n[t.mapping[r]] = e[r] }), n }, g); function g() { this.mapping = {} } var v, y, w = (v = function (e, t) { return (v = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (e, t) { e.__proto__ = t } || function (e, t) { for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]) })(e, t) }, function (e, t) { function n() { this.constructor = e } v(e, t), e.prototype = null === t ? Object.create(t) : (n.prototype = t.prototype, new n) }), b = { endpoint: "https://track.atom-data.io/" }; function S() { var e = null !== y && y.apply(this, arguments) || this; return e.atomMapping = { eventId: "event_id", eventType: "event_type", eventName: "event_name", eventTimestamp: { k: "event_timestamp", f: function (e) { return new Date(e.getTime() - 6e4 * e.getTimezoneOffset()).toISOString().slice(0, 19).replace("T", " ") } }, type: "type", title: "title", version: "version", nucleo: "nucleo", userId: "user_id", language: "language", bannerId: "banner_id", requestId: "request_id", opportunityId: "opportunity_id", creativeId: "creative_id", channel: "channel", configId: { k: "config", f: function (e) { return isNaN(Number(e)) ? 1 : Number(e) } }, configDesc: "config_desc", genre: "genre", sessionId: "session_id", levelNumber: "level_number", attempt: "attempt", orientation: "device_orientation" }, e.streams = { pa: "is.innovation_studio_playable", iec: "is.innovation_studio_iec" }, e } var E = { atom: (w(S, y = m), S.prototype.init = function (e) { y.prototype.init.call(this, "ATOM", e, this.atomMapping), this.ironsourceAtom = new IronSourceAtom(b), this.ironsourceAtom || console.error("[NUC:EVENT:ATOM] instance is undefined"), this.streams[e] || console.error('[NUC:EVENT:ATOM] Can\'t find stream for mode "%s"', e) }, S.prototype.send = function (e) { var t = this; "iec" === this.mode && (e.title = e.title.toLowerCase()), this.beforeSend(e), this.ironsourceAtom.putEvent({ stream: this.streams[this.mode], data: this.mapPayload(e) }, function () { for (var n = [], r = 0; r < arguments.length; r++)n[r] = arguments[r]; return t.afterSend(e, n[2]) }) }, S) }, C = function () { return (C = Object.assign || function (e) { for (var t, n = 1, r = arguments.length; n < r; n++)for (var o in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]); return e }).apply(this, arguments) }; function O() { this.eventId = 0 } var I = new (O.prototype.init = function (e, t) { this.eventFunnel = function (e) { return h[e] }(t.mode), this.eventFieldset = function (e) { return f[e] }(t.mode), this.eventProviders = e.map(function (e) { return function (e, t) { var n = new E[t]; return n.init(e), n }(t.mode, e) }), this.basePayload = { title: t.title, version: function (e) { var t = e.split("."); return parseInt(t[0] + (1 < t[1].length ? t[1] : "0" + t[1]), 10) }(t.version), nucleo: t.nucleo, userId: t.userId, type: t.type, language: t.localeName, genre: t.genre, sessionId: this.generateSessionId() } }, O.prototype.updatePayload = function (e) { this.mutablePayload = C({}, this.mutablePayload, e) }, O.prototype.sendEvent = function (e, t) { var n = this, r = this.eventFunnel[e]; r && this.eventProviders.forEach(function (e) { return e.send(n.getPayload(r.type, r.name, t)) }) }, O.prototype.sendCustomEvent = function (e, t, n) { var r = this; this.eventProviders.forEach(function (o) { return o.send(r.getPayload(e, t, n)) }) }, O.prototype.getPayload = function (e, t, n) { var r = C({}, this.basePayload, this.mutablePayload, { eventType: e, eventName: t, eventId: ++this.eventId, eventTimestamp: new Date }, n), o = {}; return this.eventFieldset.forEach(function (e) { o[e] = r[e] }), o }, O.prototype.generateSessionId = function () { return Math.floor(Date.now().valueOf() + 3e14 * Math.random()) }, O); function _() { console.debug("[NUC:PROTOCOL:DEMO] Initializing...") } function R() { console.debug("[NUC:PROTOCOL:DAPI] Initializing..."); var e = document.createElement("script"); e.async = !0, e.appendChild(document.createTextNode('function getScript(e,i){var n=document.createElement("script");n.type="text/javascript",n.async=!0,i&&(n.onload=i),n.src=e,document.head.appendChild(n)}function parseMessage(e){var i=e.data,n=i.indexOf(DOLLAR_PREFIX+RECEIVE_MSG_PREFIX);if(-1!==n){var t=i.slice(n+2);return getMessageParams(t)}return{}}function getMessageParams(e){var i,n=[],t=e.split("/"),a=t.length;if(-1===e.indexOf(RECEIVE_MSG_PREFIX)){if(a>=2&&a%2===0)for(i=0;a>i;i+=2)n[t[i]]=t.length<i+1?null:decodeURIComponent(t[i+1])}else{var o=e.split(RECEIVE_MSG_PREFIX);void 0!==o[1]&&(n=JSON&&JSON.parse(o[1]))}return n}function getDapi(e){var i=parseMessage(e);if(!i||i.name===GET_DAPI_URL_MSG_NAME){var n=i.data;getScript(n,onDapiReceived)}}function invokeDapiListeners(){for(var e in dapiEventsPool)dapiEventsPool.hasOwnProperty(e)&&dapi.addEventListener(e,dapiEventsPool[e])}function onDapiReceived(){dapi=window.dapi,window.removeEventListener("message",getDapi),invokeDapiListeners()}function init(){window.dapi.isDemoDapi&&(window.parent.postMessage(DOLLAR_PREFIX+SEND_MSG_PREFIX+JSON.stringify({state:"getDapiUrl"}),"*"),window.addEventListener("message",getDapi,!1))}var DOLLAR_PREFIX="$$",RECEIVE_MSG_PREFIX="DAPI_SERVICE:",SEND_MSG_PREFIX="DAPI_AD:",GET_DAPI_URL_MSG_NAME="connection.getDapiUrl",dapiEventsPool={},dapi=window.dapi||{isReady:function(){return!1},addEventListener:function(e,i){dapiEventsPool[e]=i},removeEventListener:function(e){delete dapiEventsPool[e]},isDemoDapi:!0};init();')), document.head.appendChild(e) } function A() { console.debug("[NUC:PROTOCOL:MRAID] Initializing..."); var e = document.createElement("script"); e.src = "mraid.js", document.head.appendChild(e), this.readyCallbacks = [] } var P = { demo: (_.prototype.triggerEvent = function (e) { console.debug("[NUC:PROTOCOL:DEMO] Trigger event: %s", e) }, _.prototype.onReady = function (e) { e() }, _.prototype.onViewableChange = function (e) { e() }, _.prototype.onResize = function (e) { var t = this; window.addEventListener("resize", function () { return e(t.getScreenSize()) }, !1) }, _.prototype.onAudioVolumeChange = function (e) { e() }, _.prototype.isReady = function () { return !0 }, _.prototype.isViewable = function () { return !0 }, _.prototype.getScreenSize = function () { return { width: window.innerWidth, height: window.innerHeight } }, _.prototype.getAdData = function () { return { opportunityId: "", requestId: "", bannerId: "", creativeId: "", campaignId: "", productType: "rv" } }, _.prototype.getDeviceData = function () { return { os: navigator ? navigator.platform : "", osVersion: navigator && navigator.appVersion ? navigator.appVersion.split(" ")[0] : "", deviceId: "", deviceLanguage: navigator && (navigator.language || "").split("-")[0].toLowerCase() || "", apiLevel: "" } }, _.prototype.getAudioVolume = function () { return 100 }, _.prototype.open = function (e) { e ? console.debug("[NUC:PROTOCOL:DEMO] Opening URL: %s", e) : console.debug("[NUC:PROTOCOL:DEMO] Opening store") }, _), dapi: (R.prototype.triggerEvent = function (e) { window.dapi.triggerEvent && (console.debug("[NUC:PROTOCOL:DAPI] Trigger event: %s", e), window.dapi.triggerEvent(e)) }, R.prototype.onReady = function (e) { window.dapi.addEventListener("ready", e) }, R.prototype.onViewableChange = function (e) { window.dapi.addEventListener("viewableChange", function () { return e(window.dapi.isViewable()) }) }, R.prototype.onResize = function (e) { window.dapi.addEventListener("adResized", e) }, R.prototype.onAudioVolumeChange = function (e) { window.dapi.addEventListener("audioVolumeChange", e) }, R.prototype.isReady = function () { return window.dapi.isReady() }, R.prototype.isViewable = function () { return !!window.dapi.isViewable && window.dapi.isViewable() }, R.prototype.getScreenSize = function () { return window.dapi.getScreenSize() }, R.prototype.getAdData = function () { var e = window.dapi.getAdData() || {}; return { opportunityId: e.opportunityId || "", requestId: e.requestId || "", bannerId: e.bannerId || "", creativeId: e.creativeId || "", campaignId: e.campaignId || "", productType: "interstitial" === (e.productType || "").toLowerCase() ? "is" : "rv" } }, R.prototype.getDeviceData = function () { var e = window.dapi.getDeviceData() || {}; return { os: e.os || "", osVersion: e.osVersion || "", deviceId: e.deviceId || "", deviceLanguage: (e.deviceLanguage || "").split("-")[0].toLowerCase() || "", apiLevel: e.apiLevel || "" } }, R.prototype.getAudioVolume = function () { return window.dapi.getAudioVolume() }, R.prototype.open = function (e) { e ? (console.debug("[NUC:PROTOCOL:DAPI] Opening URL: %s", e), window.dapi.open(e)) : (console.debug("[NUC:PROTOCOL:DAPI] Opening store"), window.dapi.openStoreUrl()) }, R), mraid: (A.prototype.getAdData = function () { return { bannerId: "", campaignId: "", creativeId: "", opportunityId: "", productType: "rv", requestId: "" } }, A.prototype.getAudioVolume = function () { return window.mraid.getAudioVolume ? window.mraid.getAudioVolume() : 100 }, A.prototype.getDeviceData = function () { var e = /iP(hone|od|ad)/.test(window.navigator.platform) ? "ios" : "android"; return { os: e, osVersion: function (e) { if ("ios" === e) { var t = window.navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/); return (parseInt(t && t[1], 10) || "").toString() } var n = window.navigator.userAgent.toLowerCase().match(/android\s([0-9\.]*)/); return (n && n[1] && parseInt(n[1].split(".")[0], 10) || "").toString() }(e), deviceId: "", deviceLanguage: (window.navigator && window.navigator.language || "").split("-")[0].toLowerCase() || "", apiLevel: "" } }, A.prototype.getScreenSize = function () { return window.mraid.getMaxSize() }, A.prototype.isReady = function () { return "default" === window.mraid.getState() }, A.prototype.isViewable = function () { return window.mraid.isViewable() }, A.prototype.onAudioVolumeChange = function (e) { window.mraid.addEventListener("audioVolumeChange", e) }, A.prototype.onReady = function (e) { 0 === this.readyCallbacks.length && (this.readyBindFunction = this.onReadyInternal.bind(this), window.mraid.addEventListener("ready", this.readyBindFunction)), this.readyCallbacks.push(e) }, A.prototype.onReadyInternal = function () { window.mraid.removeEventListener("ready", this.readyBindFunction), this.readyCallbacks.forEach(function (e) { e() }) }, A.prototype.onResize = function (e) { window.mraid.addEventListener("sizeChange", function (t) { t || (t = window.mraid.getMaxSize()), e(t) }) }, A.prototype.onViewableChange = function (e) { window.mraid.addEventListener("viewableChange", e) }, A.prototype.open = function (e) { e ? (console.debug("[NUC:PROTOCOL:MRAID] Opening URL: %s", e), window.mraid.open(e)) : (console.debug("[NUC:PROTOCOL:MRAID] Opening store"), window.mraid.openStoreUrl()) }, A.prototype.triggerEvent = function (e) { console.debug("[NUC:PROTOCOL:MRAID] Trigger event not supported.") }, A) }; function T() { } function k() { return L.protocol } var L = new (T.prototype.init = function (e) { this.protocolInstance = function (e) { return console.debug('[NUC:PROTOCOL] Init - "%s"', e), new P[e] }(e) }, Object.defineProperty(T.prototype, "protocol", { get: function () { return this.protocolInstance }, enumerable: !0, configurable: !0 }), T), D = "progress", V = !1, N = !1, j = function () { return null }, M = function (e) { j = e }; function G() { } var U = new (G.prototype.ready = function () { j() }, G.prototype.autoplay = function () { this.checkIsReady("autoplay()") && (N = !0) }, G.prototype.interaction = function () { this.checkIsReady("interaction()") && (0 === i.interactionCount && (k().triggerEvent("interaction"), I.sendEvent("tutorial", i)), i.interactionCount++) }, G.prototype.startLevel = function () { this.checkIsReady("startLevel()") && ("endLevel" === D && i.levelNumber++, "endLevel" !== D && "tryAgain" !== D || (D = "progress", I.sendEvent("progressStartLevel", i))) }, G.prototype.endLevel = function () { this.checkIsReady("endLevel()") && (D = "endLevel", I.sendEvent("progressEndLevel", i)) }, G.prototype.midwayProgress = function () { this.checkIsReady("midwayProgress()") && I.sendEvent("progressMidway", i) }, G.prototype.endGame = function (e) { if (this.checkIsReady("endGame('" + e + "')")) { var t = this.getEndGameEvent(e); D = t.state, I.sendEvent(t.funnel, i) } }, G.prototype.tryAgain = function () { this.checkIsReady("tryAgain()") && (I.sendEvent("progressTryAgain", i), i.attempt++, D = "tryAgain") }, G.prototype.convert = function (e) { this.checkIsReady("convert(" + (e || "") + ")") && (I.sendEvent(this.getConvertEventName(), i), k().open(e)) }, G.prototype.getEndGameEvent = function (e) { return { win: { state: "endGameWin", funnel: "adOverWin" }, lose: { state: "endGameLose", funnel: "adOverLose" }, timer: { state: "endGameTimer", funnel: "adOverTimer" }, fake: { state: "endGameFake", funnel: "adOverFake" } }[e] }, G.prototype.getConvertEventName = function () { return { progress: i.interactionCount || N ? "convertGame" : "convertIntro", endLevel: "convertEndLevel", endGameWin: "convertEndGameWin", endGameLose: "convertEndGameLose", endGameTimer: "convertEndGameTimer", endGameFake: "convertEndGameFake" }[D] }, G.prototype.checkIsReady = function (e) { return !!V || (console.warn("[NUC:TRIGGER] You triggered trigger.%s before callback.onStart() was called", e), !1) }, G); function x() { } var z = new (x.prototype.onImpression = function (e) { l.on("impression", e) }, x.prototype.onDeviceData = function (e) { l.on("deviceData", e) }, x.prototype.onStart = function (e) { l.on("start", e) }, x.prototype.onResize = function (e) { l.on("resize", e) }, x.prototype.onPause = function (e) { l.on("pause", e) }, x.prototype.onResume = function (e) { l.on("resume", e) }, x.prototype.onMute = function (e) { l.on("mute", e) }, x.prototype.onUnmute = function (e) { l.on("unmute", e) }, x), q = n(1); function B(e, t) { return void 0 === e && (e = {}), void 0 === t && (t = {}), q.all([e, t], { arrayMerge: function (e, t, n) { return t } }) } var F, H, W = function () { this.id = "", this.description = "", this.data = {} }, X = ($.enrichCustomConfig = function (e, t) { return "string" == typeof e ? t : B(t, e) }, $.build = function (e, t, n) { if (void 0 !== t) { var r = $.enrichCustomConfig(e, t); return n && (r.data = function (e, t) { var n = B(e, e[t]); return delete n[t], n }(r.data, n)), new $(r) } }, Object.defineProperty($.prototype, "description", { get: function () { return this._description }, enumerable: !0, configurable: !0 }), Object.defineProperty($.prototype, "id", { get: function () { return this._id }, enumerable: !0, configurable: !0 }), $.prototype.get = function (e, t) { if (e.includes(".")) { var n = e.split(".").reduce(function (e, t) { return e[t] }, this._data); if (n) return n } return void 0 !== this._data[e] ? this._data[e] : t }, $); function $(e) { var t = e.id, n = e.data, r = e.description; this._id = t, this._data = n, this._description = r } function J() { this.protocol = "dapi", this.name = "ironSource" } (H = F || (F = {})).ironSource = "ironSource", H.AppLovin = "AppLovin", H.demo = "demo"; var K = { ironSource: J, AppLovin: function () { this.protocol = "mraid", this.name = "AppLovin" }, demo: function () { this.protocol = "demo", this.name = "Demo" } }, Y = function () { return (Y = Object.assign || function (e) { for (var t, n = 1, r = arguments.length; n < r; n++)for (var o in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]); return e }).apply(this, arguments) }, Z = ["atom"]; function Q() { var e = this; this.currentScreenSize = { width: 0, height: 0 }, this.currentState = { width: 0, height: 0, visible: !1 }, this.timestamp = { nucleoStarted: (new Date).getTime(), protocolReady: 0, firstVisible: 0, gameReadyToStart: 0, gameStarted: 0 }, console.info("[NUC:CORE] Nucleo started! Version: %s", r.version), M(function () { return e.playableReady() }) } var ee = new (Object.defineProperty(Q.prototype, "config", { get: function () { return this._config }, enumerable: !0, configurable: !0 }), Q.prototype.init = function (e) { var t = this, n = new o(e), r = function (e) { return new (K[e] || J) }((a().demo ? "demo" : a().network) || e.network); L.init(r.protocol), I.init(Z, n), k().isReady() ? (console.debug("[NUC:CORE] Protocol already loaded"), this.onProtocolReady(e)) : (console.debug("[NUC:CORE] Waiting for protocol"), k().onReady(function () { return t.onProtocolReady(e) })), console.debug("[NUC:CORE] Initialized: %o", n) }, Q.prototype.createConfig = function (e, t) { return X.build(e.customGameConfig, function (e) { if (e && e.fields) { for (var t = new W, n = 0, r = e.fields; n < r.length; n++) { var o = r[n]; t.data[o.key] = o.defaultValue } return t } }(e.gameConfig), t) }, Q.prototype.tryStart = function () { k().isViewable() && this.timestamp.gameReadyToStart && !this.timestamp.gameStarted && (V = !0, this.timestamp.gameStarted = (new Date).getTime(), console.debug("[NUC:CORE] Start:\nProtocol ready: %sms\nFirst visible: %sms\nGame ready: %sms\nGame started: %sms", this.timestamp.protocolReady - this.timestamp.nucleoStarted, this.timestamp.firstVisible - this.timestamp.nucleoStarted, this.timestamp.gameReadyToStart - this.timestamp.nucleoStarted, this.timestamp.gameStarted - this.timestamp.nucleoStarted), function () { var e = k().getScreenSize(), t = e.width, n = e.height, r = 0 === k().getAudioVolume(); l.do("start", t, n, r) }(), this.timestamp.gameReadyToStart > this.timestamp.firstVisible && I.sendEvent("loading", Y({}, i, { eventTimestamp: new Date(this.timestamp.gameReadyToStart) })), I.sendEvent("gameStarted", i)) }, Q.prototype.fetchAdData = function () { var e = k().getAdData(); return { bannerId: e.bannerId, requestId: e.requestId, opportunityId: e.opportunityId, creativeId: e.creativeId, channel: e.productType.toLowerCase() } }, Q.prototype.onProtocolReady = function (e) { var t = this; console.debug("[NUC:CORE] Protocol ready"); var n = this.fetchAdData(); I.updatePayload(n), this._config = this.createConfig(e, n.channel), I.updatePayload({ configId: this._config ? this._config.id : e.configId, configDesc: this._config ? this._config.description : "" }), l.do("deviceData", k().getDeviceData()), this.timestamp.protocolReady = (new Date).getTime(), k().onAudioVolumeChange(function (e) { return t.onAudioVolumeChange(e) }), k().onViewableChange(function (e) { return t.onViewableChange(e) }), k().onResize(function (e) { var n = e.width, r = e.height; return t.onResize(n, r) }), k().isViewable() && this.firstVisible(), this.tryStart() }, Q.prototype.onAudioVolumeChange = function (e) { 0 < e ? l.do("unmute") : l.do("mute") }, Q.prototype.onViewableChange = function (e) { e && !this.timestamp.gameStarted ? (this.firstVisible(), this.tryStart()) : e && this.timestamp.gameStarted && !this.currentState.visible ? this.resume() : !e && this.timestamp.gameStarted && this.currentState.visible && this.pause(), this.currentState.visible = e }, Q.prototype.onResize = function (e, t) { e === this.currentState.width && t === this.currentState.height || (this.currentState.width = e, this.currentState.height = t, I.updatePayload({ orientation: function (e, t) { return e < t ? c.portrait : c.landscape }(e, t) }), console.debug("[NUC:CORE] Resize: %ix%i", e, t), function () { var e = k().getScreenSize(), t = e.width, n = e.height; l.do("resize", t, n) }()) }, Q.prototype.firstVisible = function () { this.timestamp.firstVisible || (console.debug("[NUC:CORE] First visible"), this.currentState.visible = !0, this.timestamp.firstVisible = (new Date).getTime(), function () { var e = k().getScreenSize(), t = e.width, n = e.height, r = 0 === k().getAudioVolume(); l.do("impression", t, n, r) }(), I.sendEvent("impression", Y({}, i, { eventTimestamp: new Date(this.timestamp.firstVisible) }))) }, Q.prototype.pause = function () { console.debug("[NUC:CORE] Pause"), I.sendEvent("focusExit", i), l.do("pause") }, Q.prototype.resume = function () { console.debug("[NUC:CORE] Resume"), I.sendEvent("focusRestore", i), l.do("resume") }, Q.prototype.playableReady = function () { console.debug("[NUC:CORE] Game ready"), this.timestamp.gameReadyToStart = (new Date).getTime(), this.tryStart() }, Q), te = function () { return (te = Object.assign || function (e) { for (var t, n = 1, r = arguments.length; n < r; n++)for (var o in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]); return e }).apply(this, arguments) }, ne = (re.prototype.init = function (e, t, n, r, o) { void 0 === o && (o = {}); var i = o.gameConfig, s = o.network; this._metaConfig = i, this._version = r, ee.init({ mode: e, title: t, genre: n, version: r, gameConfig: i, customGameConfig: "$_BAKEME_$", network: s, configId: (a("config") || "1").replace("config", ""), localeName: a("lang") || "en" }) }, Object.defineProperty(re.prototype, "version", { get: function () { return this._version }, enumerable: !0, configurable: !0 }), Object.defineProperty(re.prototype, "metaConfig", { get: function () { return this._metaConfig }, enumerable: !0, configurable: !0 }), Object.defineProperty(re.prototype, "config", { get: function () { return ee.config }, enumerable: !0, configurable: !0 }), Object.defineProperty(re.prototype, "callback", { get: function () { return z }, enumerable: !0, configurable: !0 }), Object.defineProperty(re.prototype, "trigger", { get: function () { return U }, enumerable: !0, configurable: !0 }), Object.defineProperty(re.prototype, "utils", { get: function () { return { getUrlParams: a, eventPool: d } }, enumerable: !0, configurable: !0 }), Object.defineProperty(re.prototype, "status", { get: function () { return te({}, i) }, enumerable: !0, configurable: !0 }), Object.defineProperty(re.prototype, "protocol", { get: function () { return { isViewable: function () { return k().isViewable() }, getScreenSize: function () { return k().getScreenSize() }, getAdData: function () { return k().getAdData() }, getDeviceData: function () { return k().getDeviceData() }, getAudioVolume: function () { return k().getAudioVolume() }, triggerEvent: function (e) { return k().triggerEvent(e) }, open: function (e) { return k().open(e) } } }, enumerable: !0, configurable: !0 }), Object.defineProperty(re.prototype, "event", { get: function () { return { send: function (e, t, n) { var r = te({}, n, i); I.sendCustomEvent(e, t, r) }, updatePayload: function (e) { I.updatePayload(e) } } }, enumerable: !0, configurable: !0 }), re); function re() { } window.NUC = new ne }]);
</script>
<script>
function getScript(e, i) { var n = document.createElement("script"); n.type = "text/javascript", n.async = !0, i && (n.onload = i), n.src = e, document.head.appendChild(n) } function parseMessage(e) { var i = e.data, n = i.indexOf(DOLLAR_PREFIX + RECEIVE_MSG_PREFIX); if (-1 !== n) { var t = i.slice(n + 2); return getMessageParams(t) } return {} } function getMessageParams(e) { var i, n = [], t = e.split("/"), a = t.length; if (-1 === e.indexOf(RECEIVE_MSG_PREFIX)) { if (a >= 2 && a % 2 === 0) for (i = 0; a > i; i += 2)n[t[i]] = t.length < i + 1 ? null : decodeURIComponent(t[i + 1]) } else { var o = e.split(RECEIVE_MSG_PREFIX); void 0 !== o[1] && (n = JSON && JSON.parse(o[1])) } return n } function getDapi(e) { var i = parseMessage(e); if (!i || i.name === GET_DAPI_URL_MSG_NAME) { var n = i.data; getScript(n, onDapiReceived) } } function invokeDapiListeners() { for (var e in dapiEventsPool) dapiEventsPool.hasOwnProperty(e) && dapi.addEventListen