Файловый менеджер - Редактировать - /home/jogoso94/public_html/jogos/jigsaw_deluxe/js/main.js
�азад
/* TweenJS Visit http://createjs.com/ for documentation, updates and examples. Copyright (c) 2010 gskinner.com, inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. screenfull v5.0.0 - 2019-09-09 (c) Sindre Sorhus; MIT License 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> */ this.createjs = this.createjs || {}; createjs.extend = function(c, b) { function a() { this.constructor = c } a.prototype = b.prototype; return c.prototype = new a }; this.createjs = this.createjs || {}; createjs.promote = function(c, b) { var a = c.prototype, e = Object.getPrototypeOf && Object.getPrototypeOf(a) || a.__proto__; if (e) { a[(b += "_") + "constructor"] = e.constructor; for (var d in e) a.hasOwnProperty(d) && "function" == typeof e[d] && (a[b + d] = e[d]) } return c }; this.createjs = this.createjs || {}; createjs.deprecate = function(c, b) { return function() { var a = "Deprecated property or method '" + b + "'. See docs for info."; console && (console.warn ? console.warn(a) : console.log(a)); return c && c.apply(this, arguments) } }; this.createjs = this.createjs || {}; (function() { function c(a, e, d) { this.type = a; this.currentTarget = this.target = null; this.eventPhase = 0; this.bubbles = !!e; this.cancelable = !!d; this.timeStamp = (new Date).getTime(); this.removed = this.immediatePropagationStopped = this.propagationStopped = this.defaultPrevented = !1 } var b = c.prototype; b.preventDefault = function() { this.defaultPrevented = this.cancelable && !0 }; b.stopPropagation = function() { this.propagationStopped = !0 }; b.stopImmediatePropagation = function() { this.immediatePropagationStopped = this.propagationStopped = !0 }; b.remove = function() { this.removed = !0 }; b.clone = function() { return new c(this.type, this.bubbles, this.cancelable) }; b.set = function(a) { for (var e in a) this[e] = a[e]; return this }; b.toString = function() { return "[Event (type=" + this.type + ")]" }; createjs.Event = c })(); this.createjs = this.createjs || {}; (function() { function c() { this._captureListeners = this._listeners = null } var b = c.prototype; c.initialize = function(a) { a.addEventListener = b.addEventListener; a.on = b.on; a.removeEventListener = a.off = b.removeEventListener; a.removeAllEventListeners = b.removeAllEventListeners; a.hasEventListener = b.hasEventListener; a.dispatchEvent = b.dispatchEvent; a._dispatchEvent = b._dispatchEvent; a.willTrigger = b.willTrigger }; b.addEventListener = function(a, e, d) { var f = d ? this._captureListeners = this._captureListeners || {} : this._listeners = this._listeners || {}; var g = f[a]; g && this.removeEventListener(a, e, d); (g = f[a]) ? g.push(e): f[a] = [e]; return e }; b.on = function(a, e, d, f, g, h) { e.handleEvent && (d = d || e, e = e.handleEvent); d = d || this; return this.addEventListener(a, function(l) { e.call(d, l, g); f && l.remove() }, h) }; b.removeEventListener = function(a, e, d) { if (d = d ? this._captureListeners : this._listeners) { var f = d[a]; if (f) for (var g = 0, h = f.length; g < h; g++) if (f[g] == e) { 1 == h ? delete d[a] : f.splice(g, 1); break } } }; b.off = b.removeEventListener; b.removeAllEventListeners = function(a) { a ? (this._listeners && delete this._listeners[a], this._captureListeners && delete this._captureListeners[a]) : this._listeners = this._captureListeners = null }; b.dispatchEvent = function(a, e, d) { if ("string" == typeof a) { var f = this._listeners; if (!(e || f && f[a])) return !0; a = new createjs.Event(a, e, d) } else a.target && a.clone && (a = a.clone()); try { a.target = this } catch (g) {} if (a.bubbles && this.parent) { d = this; for (e = [d]; d.parent;) e.push(d = d.parent); f = e.length; for (d = f - 1; 0 <= d && !a.propagationStopped; d--) e[d]._dispatchEvent(a, 1 + (0 == d)); for (d = 1; d < f && !a.propagationStopped; d++) e[d]._dispatchEvent(a, 3) } else this._dispatchEvent(a, 2); return !a.defaultPrevented }; b.hasEventListener = function(a) { var e = this._listeners, d = this._captureListeners; return !!(e && e[a] || d && d[a]) }; b.willTrigger = function(a) { for (var e = this; e;) { if (e.hasEventListener(a)) return !0; e = e.parent } return !1 }; b.toString = function() { return "[EventDispatcher]" }; b._dispatchEvent = function(a, e) { var d, f, g = 2 >= e ? this._captureListeners : this._listeners; if (a && g && (f = g[a.type]) && (d = f.length)) { try { a.currentTarget = this } catch (l) {} try { a.eventPhase = e | 0 } catch (l) {} a.removed = !1; f = f.slice(); for (g = 0; g < d && !a.immediatePropagationStopped; g++) { var h = f[g]; h.handleEvent ? h.handleEvent(a) : h(a); a.removed && (this.off(a.type, h, 1 == e), a.removed = !1) } } 2 === e && this._dispatchEvent(a, 2.1) }; createjs.EventDispatcher = c })(); this.createjs = this.createjs || {}; (function() { function c() { throw "Ticker cannot be instantiated."; } c.RAF_SYNCHED = "synched"; c.RAF = "raf"; c.TIMEOUT = "timeout"; c.timingMode = null; c.maxDelta = 0; c.paused = !1; c.removeEventListener = null; c.removeAllEventListeners = null; c.dispatchEvent = null; c.hasEventListener = null; c._listeners = null; createjs.EventDispatcher.initialize(c); c._addEventListener = c.addEventListener; c.addEventListener = function() { !c._inited && c.init(); return c._addEventListener.apply(c, arguments) }; c._inited = !1; c._startTime = 0; c._pausedTime = 0; c._ticks = 0; c._pausedTicks = 0; c._interval = 50; c._lastTime = 0; c._times = null; c._tickTimes = null; c._timerId = null; c._raf = !0; c._setInterval = function(e) { c._interval = e; c._inited && c._setupTick() }; c.setInterval = createjs.deprecate(c._setInterval, "Ticker.setInterval"); c._getInterval = function() { return c._interval }; c.getInterval = createjs.deprecate(c._getInterval, "Ticker.getInterval"); c._setFPS = function(e) { c._setInterval(1E3 / e) }; c.setFPS = createjs.deprecate(c._setFPS, "Ticker.setFPS"); c._getFPS = function() { return 1E3 / c._interval }; c.getFPS = createjs.deprecate(c._getFPS, "Ticker.getFPS"); try { Object.defineProperties(c, { interval: { get: c._getInterval, set: c._setInterval }, framerate: { get: c._getFPS, set: c._setFPS } }) } catch (e) { console.log(e) } c.init = function() { c._inited || (c._inited = !0, c._times = [], c._tickTimes = [], c._startTime = c._getTime(), c._times.push(c._lastTime = 0), c.interval = c._interval) }; c.reset = function() { if (c._raf) { var e = window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || window.oCancelAnimationFrame || window.msCancelAnimationFrame; e && e(c._timerId) } else clearTimeout(c._timerId); c.removeAllEventListeners("tick"); c._timerId = c._times = c._tickTimes = null; c._startTime = c._lastTime = c._ticks = c._pausedTime = 0; c._inited = !1 }; c.getMeasuredTickTime = function(e) { var d = 0, f = c._tickTimes; if (!f || 1 > f.length) return -1; e = Math.min(f.length, e || c._getFPS() | 0); for (var g = 0; g < e; g++) d += f[g]; return d / e }; c.getMeasuredFPS = function(e) { var d = c._times; if (!d || 2 > d.length) return -1; e = Math.min(d.length - 1, e || c._getFPS() | 0); return 1E3 / ((d[0] - d[e]) / e) }; c.getTime = function(e) { return c._startTime ? c._getTime() - (e ? c._pausedTime : 0) : -1 }; c.getEventTime = function(e) { return c._startTime ? (c._lastTime || c._startTime) - (e ? c._pausedTime : 0) : -1 }; c.getTicks = function(e) { return c._ticks - (e ? c._pausedTicks : 0) }; c._handleSynch = function() { c._timerId = null; c._setupTick(); c._getTime() - c._lastTime >= .97 * (c._interval - 1) && c._tick() }; c._handleRAF = function() { c._timerId = null; c._setupTick(); c._tick() }; c._handleTimeout = function() { c._timerId = null; c._setupTick(); c._tick() }; c._setupTick = function() { if (null == c._timerId) { var e = c.timingMode; if (e == c.RAF_SYNCHED || e == c.RAF) { var d = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame; if (d) { c._timerId = d(e == c.RAF ? c._handleRAF : c._handleSynch); c._raf = !0; return } } c._raf = !1; c._timerId = setTimeout(c._handleTimeout, c._interval) } }; c._tick = function() { var e = c.paused, d = c._getTime(), f = d - c._lastTime; c._lastTime = d; c._ticks++; e && (c._pausedTicks++, c._pausedTime += f); if (c.hasEventListener("tick")) { var g = new createjs.Event("tick"), h = c.maxDelta; g.delta = h && f > h ? h : f; g.paused = e; g.time = d; g.runTime = d - c._pausedTime; c.dispatchEvent(g) } for (c._tickTimes.unshift(c._getTime() - d); 100 < c._tickTimes.length;) c._tickTimes.pop(); for (c._times.unshift(d); 100 < c._times.length;) c._times.pop() }; var b = window, a = b.performance.now || b.performance.mozNow || b.performance.msNow || b.performance.oNow || b.performance.webkitNow; c._getTime = function() { return (a && a.call(b.performance) || (new Date).getTime()) - c._startTime }; createjs.Ticker = c })(); this.createjs = this.createjs || {}; (function() { function c(a) { this.EventDispatcher_constructor(); this.ignoreGlobalPause = !1; this.loop = 0; this.bounce = this.reversed = this.useTicks = !1; this.timeScale = 1; this.position = this.duration = 0; this.rawPosition = -1; this._paused = !0; this._labelList = this._labels = this._parent = this._prev = this._next = null; a && (this.useTicks = !!a.useTicks, this.ignoreGlobalPause = !!a.ignoreGlobalPause, this.loop = !0 === a.loop ? -1 : a.loop || 0, this.reversed = !!a.reversed, this.bounce = !!a.bounce, this.timeScale = a.timeScale || 1, a.onChange && this.addEventListener("change", a.onChange), a.onComplete && this.addEventListener("complete", a.onComplete)) } var b = createjs.extend(c, createjs.EventDispatcher); b._setPaused = function(a) { createjs.Tween._register(this, a); return this }; b.setPaused = createjs.deprecate(b._setPaused, "AbstractTween.setPaused"); b._getPaused = function() { return this._paused }; b.getPaused = createjs.deprecate(b._getPaused, "AbstactTween.getPaused"); b._getCurrentLabel = function(a) { var e = this.getLabels(); null == a && (a = this.position); for (var d = 0, f = e.length; d < f && !(a < e[d].position); d++); return 0 === d ? null : e[d - 1].label }; b.getCurrentLabel = createjs.deprecate(b._getCurrentLabel, "AbstractTween.getCurrentLabel"); try { Object.defineProperties(b, { paused: { set: b._setPaused, get: b._getPaused }, currentLabel: { get: b._getCurrentLabel } }) } catch (a) {} b.advance = function(a, e) { this.setPosition(this.rawPosition + a * this.timeScale, e) }; b.setPosition = function(a, e, d, f) { var g = this.duration, h = this.loop, l = this.rawPosition, n = 0; 0 > a && (a = 0); if (0 === g) { var m = !0; if (-1 !== l) return m } else { var u = a / g | 0; n = a - u * g; (m = -1 !== h && a >= h * g + g) && (a = (n = g) * (u = h) + g); if (a === l) return m; !this.reversed !== !(this.bounce && u % 2) && (n = g - n) } this.position = n; this.rawPosition = a; this._updatePosition(d, m); m && (this.paused = !0); f && f(this); e || this._runActions(l, a, d, !d && -1 === l); this.dispatchEvent("change"); m && this.dispatchEvent("complete") }; b.calculatePosition = function(a) { var e = this.duration, d = this.loop, f = 0; if (0 === e) return 0; - 1 !== d && a >= d * e + e ? (a = e, f = d) : 0 > a ? a = 0 : (f = a / e | 0, a -= f * e); return !this.reversed !== !(this.bounce && f % 2) ? e - a : a }; b.getLabels = function() { var a = this._labelList; if (!a) { a = this._labelList = []; var e = this._labels, d; for (d in e) a.push({ label: d, position: e[d] }); a.sort(function(f, g) { return f.position - g.position }) } return a }; b.setLabels = function(a) { this._labels = a; this._labelList = null }; b.addLabel = function(a, e) { this._labels || (this._labels = {}); this._labels[a] = e; var d = this._labelList; if (d) { for (var f = 0, g = d.length; f < g && !(e < d[f].position); f++); d.splice(f, 0, { label: a, position: e }) } }; b.gotoAndPlay = function(a) { this.paused = !1; this._goto(a) }; b.gotoAndStop = function(a) { this.paused = !0; this._goto(a) }; b.resolve = function(a) { var e = Number(a); isNaN(e) && (e = this._labels && this._labels[a]); return e }; b.toString = function() { return "[AbstractTween]" }; b.clone = function() { throw "AbstractTween can not be cloned."; }; b._init = function(a) { a && a.paused || (this.paused = !1); a && null != a.position && this.setPosition(a.position) }; b._updatePosition = function(a, e) {}; b._goto = function(a) { a = this.resolve(a); null != a && this.setPosition(a, !1, !0) }; b._runActions = function(a, e, d, f) { if (this._actionHead || this.tweens) { var g = this.duration, h = this.reversed, l = this.bounce, n = this.loop, m, u, p; if (0 === g) { var z = m = u = p = 0; h = l = !1 } else z = a / g | 0, m = e / g | 0, u = a - z * g, p = e - m * g; - 1 !== n && (m > n && (p = g, m = n), z > n && (u = g, z = n)); if (d) return this._runActionsRange(p, p, d, f); if (z !== m || u !== p || d || f) { -1 === z && (z = u = 0); a = a <= e; e = z; do { n = e === z ? u : a ? 0 : g; var q = e === m ? p : a ? g : 0; !h !== !(l && e % 2) && (n = g - n, q = g - q); if ((!l || e === z || n !== q) && this._runActionsRange(n, q, d, f || e !== z && !l)) return !0; f = !1 } while (a && ++e <= m || !a && --e >= m) } } }; b._runActionsRange = function(a, e, d, f) {}; createjs.AbstractTween = createjs.promote(c, "EventDispatcher") })(); this.createjs = this.createjs || {}; (function() { function c(d, f) { this.AbstractTween_constructor(f); this.pluginData = null; this.target = d; this.passive = !1; this._stepTail = this._stepHead = new b(null, 0, 0, {}, null, !0); this._stepPosition = 0; this._injected = this._pluginIds = this._plugins = this._actionTail = this._actionHead = null; f && (this.pluginData = f.pluginData, f.override && c.removeTweens(d)); this.pluginData || (this.pluginData = {}); this._init(f) } function b(d, f, g, h, l, n) { this.next = null; this.prev = d; this.t = f; this.d = g; this.props = h; this.ease = l; this.passive = n; this.index = d ? d.index + 1 : 0 } function a(d, f, g, h, l) { this.next = null; this.prev = d; this.t = f; this.d = 0; this.scope = g; this.funct = h; this.params = l } var e = createjs.extend(c, createjs.AbstractTween); c.IGNORE = {}; c._tweens = []; c._plugins = null; c._tweenHead = null; c._tweenTail = null; c.get = function(d, f) { return new c(d, f) }; c.tick = function(d, f) { for (var g = c._tweenHead; g;) { var h = g._next; f && !g.ignoreGlobalPause || g._paused || g.advance(g.useTicks ? 1 : d); g = h } }; c.handleEvent = function(d) { "tick" === d.type && this.tick(d.delta, d.paused) }; c.removeTweens = function(d) { if (d.tweenjs_count) { for (var f = c._tweenHead; f;) { var g = f._next; f.target === d && c._register(f, !0); f = g } d.tweenjs_count = 0 } }; c.removeAllTweens = function() { for (var d = c._tweenHead; d;) { var f = d._next; d._paused = !0; d.target && (d.target.tweenjs_count = 0); d._next = d._prev = null; d = f } c._tweenHead = c._tweenTail = null }; c.hasActiveTweens = function(d) { return d ? !!d.tweenjs_count : !!c._tweenHead }; c._installPlugin = function(d) { for (var f = d.priority = d.priority || 0, g = c._plugins = c._plugins || [], h = 0, l = g.length; h < l && !(f < g[h].priority); h++); g.splice(h, 0, d) }; c._register = function(d, f) { var g = d.target; if (!f && d._paused) g && (g.tweenjs_count = g.tweenjs_count ? g.tweenjs_count + 1 : 1), (g = c._tweenTail) ? (c._tweenTail = g._next = d, d._prev = g) : c._tweenHead = c._tweenTail = d, !c._inited && createjs.Ticker && (createjs.Ticker.addEventListener("tick", c), c._inited = !0); else if (f && !d._paused) { g && g.tweenjs_count--; g = d._next; var h = d._prev; g ? g._prev = h : c._tweenTail = h; h ? h._next = g : c._tweenHead = g; d._next = d._prev = null } d._paused = f }; e.wait = function(d, f) { 0 < d && this._addStep(+d, this._stepTail.props, null, f); return this }; e.to = function(d, f, g) { if (null == f || 0 > f) f = 0; f = this._addStep(+f, null, g); this._appendProps(d, f); return this }; e.label = function(d) { this.addLabel(d, this.duration); return this }; e.call = function(d, f, g) { return this._addAction(g || this.target, d, f || [this]) }; e.set = function(d, f) { return this._addAction(f || this.target, this._set, [d]) }; e.play = function(d) { return this._addAction(d || this, this._set, [{ paused: !1 }]) }; e.pause = function(d) { return this._addAction(d || this, this._set, [{ paused: !0 }]) }; e.w = e.wait; e.t = e.to; e.c = e.call; e.s = e.set; e.toString = function() { return "[Tween]" }; e.clone = function() { throw "Tween can not be cloned."; }; e._addPlugin = function(d) { var f = this._pluginIds || (this._pluginIds = {}), g = d.ID; if (g && !f[g]) { f[g] = !0; f = this._plugins || (this._plugins = []); g = d.priority || 0; for (var h = 0, l = f.length; h < l; h++) if (g < f[h].priority) { f.splice(h, 0, d); return } f.push(d) } }; e._updatePosition = function(d, f) { var g = this._stepHead.next, h = this.position, l = this.duration; if (this.target && g) { for (var n = g.next; n && n.t <= h;) g = g.next, n = g.next; this._updateTargetProps(g, f ? 0 === l ? 1 : h / l : (h - g.t) / g.d, f) } this._stepPosition = g ? h - g.t : 0 }; e._updateTargetProps = function(d, f, g) { if (!(this.passive = !!d.passive)) { var h, l = d.prev.props, n = d.props; if (h = d.ease) f = h(f, 0, 1, 1); h = this._plugins; var m; a: for (m in l) { var u = l[m]; var p = n[m]; u = u !== p && "number" === typeof u ? u + (p - u) * f : 1 <= f ? p : u; if (h) { p = 0; for (var z = h.length; p < z; p++) { var q = h[p].change(this, d, m, u, f, g); if (q === c.IGNORE) continue a; void 0 !== q && (u = q) } } this.target[m] = u } } }; e._runActionsRange = function(d, f, g, h) { var l = (g = d > f) ? this._actionTail : this._actionHead, n = f, m = d; g && (n = d, m = f); for (var u = this.position; l;) { var p = l.t; if (p === f || p > m && p < n || h && p === d) if (l.funct.apply(l.scope, l.params), u !== this.position) return !0; l = g ? l.prev : l.next } }; e._appendProps = function(d, f, g) { var h = this._stepHead.props, l = this.target, n = c._plugins, m, u, p = f.prev, z = p.props, q = f.props || (f.props = this._cloneProps(z)), C = {}; for (m in d) if (d.hasOwnProperty(m) && (C[m] = q[m] = d[m], void 0 === h[m])) { var A = void 0; if (n) for (u = n.length - 1; 0 <= u; u--) { var v = n[u].init(this, m, A); void 0 !== v && (A = v); if (A === c.IGNORE) { delete q[m]; delete C[m]; break } } A !== c.IGNORE && (void 0 === A && (A = l[m]), z[m] = void 0 === A ? null : A) } for (m in C) { var k; for (d = p; (k = d) && (d = k.prev);) if (d.props !== k.props) { if (void 0 !== d.props[m]) break; d.props[m] = z[m] } } if (!1 !== g && (n = this._plugins)) for (u = n.length - 1; 0 <= u; u--) n[u].step(this, f, C); if (g = this._injected) this._injected = null, this._appendProps(g, f, !1) }; e._injectProp = function(d, f) { (this._injected || (this._injected = {}))[d] = f }; e._addStep = function(d, f, g, h) { f = new b(this._stepTail, this.duration, d, f, g, h || !1); this.duration += d; return this._stepTail = this._stepTail.next = f }; e._addAction = function(d, f, g) { d = new a(this._actionTail, this.duration, d, f, g); this._actionTail ? this._actionTail.next = d : this._actionHead = d; this._actionTail = d; return this }; e._set = function(d) { for (var f in d) this[f] = d[f] }; e._cloneProps = function(d) { var f = {}, g; for (g in d) f[g] = d[g]; return f }; createjs.Tween = createjs.promote(c, "AbstractTween") })(); this.createjs = this.createjs || {}; (function() { function c(a) { if (a instanceof Array || null == a && 1 < arguments.length) { var e = a; var d = arguments[1]; a = arguments[2] } else a && (e = a.tweens, d = a.labels); this.AbstractTween_constructor(a); this.tweens = []; e && this.addTween.apply(this, e); this.setLabels(d); this._init(a) } var b = createjs.extend(c, createjs.AbstractTween); b.addTween = function(a) { a._parent && a._parent.removeTween(a); var e = arguments.length; if (1 < e) { for (var d = 0; d < e; d++) this.addTween(arguments[d]); return arguments[e - 1] } if (0 === e) return null; this.tweens.push(a); a._parent = this; a.paused = !0; e = a.duration; 0 < a.loop && (e *= a.loop + 1); e > this.duration && (this.duration = e); 0 <= this.rawPosition && a.setPosition(this.rawPosition); return a }; b.removeTween = function(a) { var e = arguments.length; if (1 < e) { for (var d = !0, f = 0; f < e; f++) d = d && this.removeTween(arguments[f]); return d } if (0 === e) return !0; e = this.tweens; for (f = e.length; f--;) if (e[f] === a) return e.splice(f, 1), a._parent = null, a.duration >= this.duration && this.updateDuration(), !0; return !1 }; b.updateDuration = function() { for (var a = this.duration = 0, e = this.tweens.length; a < e; a++) { var d = this.tweens[a], f = d.duration; 0 < d.loop && (f *= d.loop + 1); f > this.duration && (this.duration = f) } }; b.toString = function() { return "[Timeline]" }; b.clone = function() { throw "Timeline can not be cloned."; }; b._updatePosition = function(a, e) { for (var d = this.position, f = 0, g = this.tweens.length; f < g; f++) this.tweens[f].setPosition(d, !0, a) }; b._runActionsRange = function(a, e, d, f) { for (var g = this.position, h = 0, l = this.tweens.length; h < l; h++) if (this.tweens[h]._runActions(a, e, d, f), g !== this.position) return !0 }; createjs.Timeline = createjs.promote(c, "AbstractTween") })(); this.createjs = this.createjs || {}; (function() { function c() { throw "Ease cannot be instantiated."; } c.linear = function(b) { return b }; c.none = c.linear; c.get = function(b) { -1 > b ? b = -1 : 1 < b && (b = 1); return function(a) { return 0 == b ? a : 0 > b ? a * (a * -b + 1 + b) : a * ((2 - a) * b + (1 - b)) } }; c.getPowIn = function(b) { return function(a) { return Math.pow(a, b) } }; c.getPowOut = function(b) { return function(a) { return 1 - Math.pow(1 - a, b) } }; c.getPowInOut = function(b) { return function(a) { return 1 > (a *= 2) ? .5 * Math.pow(a, b) : 1 - .5 * Math.abs(Math.pow(2 - a, b)) } }; c.quadIn = c.getPowIn(2); c.quadOut = c.getPowOut(2); c.quadInOut = c.getPowInOut(2); c.cubicIn = c.getPowIn(3); c.cubicOut = c.getPowOut(3); c.cubicInOut = c.getPowInOut(3); c.quartIn = c.getPowIn(4); c.quartOut = c.getPowOut(4); c.quartInOut = c.getPowInOut(4); c.quintIn = c.getPowIn(5); c.quintOut = c.getPowOut(5); c.quintInOut = c.getPowInOut(5); c.sineIn = function(b) { return 1 - Math.cos(b * Math.PI / 2) }; c.sineOut = function(b) { return Math.sin(b * Math.PI / 2) }; c.sineInOut = function(b) { return -.5 * (Math.cos(Math.PI * b) - 1) }; c.getBackIn = function(b) { return function(a) { return a * a * ((b + 1) * a - b) } }; c.backIn = c.getBackIn(1.7); c.getBackOut = function(b) { return function(a) { return --a * a * ((b + 1) * a + b) + 1 } }; c.backOut = c.getBackOut(1.7); c.getBackInOut = function(b) { b *= 1.525; return function(a) { return 1 > (a *= 2) ? .5 * a * a * ((b + 1) * a - b) : .5 * ((a -= 2) * a * ((b + 1) * a + b) + 2) } }; c.backInOut = c.getBackInOut(1.7); c.circIn = function(b) { return -(Math.sqrt(1 - b * b) - 1) }; c.circOut = function(b) { return Math.sqrt(1 - --b * b) }; c.circInOut = function(b) { return 1 > (b *= 2) ? -.5 * (Math.sqrt(1 - b * b) - 1) : .5 * (Math.sqrt(1 - (b -= 2) * b) + 1) }; c.bounceIn = function(b) { return 1 - c.bounceOut(1 - b) }; c.bounceOut = function(b) { return b < 1 / 2.75 ? 7.5625 * b * b : b < 2 / 2.75 ? 7.5625 * (b -= 1.5 / 2.75) * b + .75 : b < 2.5 / 2.75 ? 7.5625 * (b -= 2.25 / 2.75) * b + .9375 : 7.5625 * (b -= 2.625 / 2.75) * b + .984375 }; c.bounceInOut = function(b) { return .5 > b ? .5 * c.bounceIn(2 * b) : .5 * c.bounceOut(2 * b - 1) + .5 }; c.getElasticIn = function(b, a) { var e = 2 * Math.PI; return function(d) { if (0 == d || 1 == d) return d; var f = a / e * Math.asin(1 / b); return -(b * Math.pow(2, 10 * --d) * Math.sin((d - f) * e / a)) } }; c.elasticIn = c.getElasticIn(1, .3); c.getElasticOut = function(b, a) { var e = 2 * Math.PI; return function(d) { return 0 == d || 1 == d ? d : b * Math.pow(2, -10 * d) * Math.sin((d - a / e * Math.asin(1 / b)) * e / a) + 1 } }; c.elasticOut = c.getElasticOut(1, .3); c.getElasticInOut = function(b, a) { var e = 2 * Math.PI; return function(d) { var f = a / e * Math.asin(1 / b); return 1 > (d *= 2) ? -.5 * b * Math.pow(2, 10 * --d) * Math.sin((d - f) * e / a) : b * Math.pow(2, -10 * --d) * Math.sin((d - f) * e / a) * .5 + 1 } }; c.elasticInOut = c.getElasticInOut(1, .3 * 1.5); createjs.Ease = c })(); this.createjs = this.createjs || {}; (function() { function c() { throw "MotionGuidePlugin cannot be instantiated."; } c.priority = 0; c.ID = "MotionGuide"; c.install = function() { createjs.Tween._installPlugin(c); return createjs.Tween.IGNORE }; c.init = function(b, a, e) { "guide" == a && b._addPlugin(c) }; c.step = function(b, a, e) { for (var d in e) if ("guide" === d) { var f = a.props.guide, g = c._solveGuideData(e.guide, f); f.valid = !g; var h = f.endData; b._injectProp("x", h.x); b._injectProp("y", h.y); if (g || !f.orient) break; f.startOffsetRot = (void 0 === a.prev.props.rotation ? b.target.rotation || 0 : a.prev.props.rotation) - f.startData.rotation; if ("fixed" == f.orient) f.endAbsRot = h.rotation + f.startOffsetRot, f.deltaRotation = 0; else { g = void 0 === e.rotation ? b.target.rotation || 0 : e.rotation; h = g - f.endData.rotation - f.startOffsetRot; var l = h % 360; f.endAbsRot = g; switch (f.orient) { case "auto": f.deltaRotation = h; break; case "cw": f.deltaRotation = (l + 360) % 360 + 360 * Math.abs(h / 360 | 0); break; case "ccw": f.deltaRotation = (l - 360) % 360 + -360 * Math.abs(h / 360 | 0) } } b._injectProp("rotation", f.endAbsRot) } }; c.change = function(b, a, e, d, f, g) { if ((d = a.props.guide) && a.props !== a.prev.props && d !== a.prev.props.guide) { if ("guide" === e && !d.valid || "x" == e || "y" == e || "rotation" === e && d.orient) return createjs.Tween.IGNORE; c._ratioToPositionData(f, d, b.target) } }; c.debug = function(b, a, e) { b = b.guide || b; var d = c._findPathProblems(b); d && console.error("MotionGuidePlugin Error found: \n" + d); if (!a) return d; var f, g = b.path, h = g.length; a.save(); a.lineCap = "round"; a.lineJoin = "miter"; a.beginPath(); a.moveTo(g[0], g[1]); for (f = 2; f < h; f += 4) a.quadraticCurveTo(g[f], g[f + 1], g[f + 2], g[f + 3]); a.strokeStyle = "black"; a.lineWidth = 4.5; a.stroke(); a.strokeStyle = "white"; a.lineWidth = 3; a.stroke(); a.closePath(); g = e.length; if (e && g) { h = {}; var l = {}; c._solveGuideData(b, h); for (f = 0; f < g; f++) h.orient = "fixed", c._ratioToPositionData(e[f], h, l), a.beginPath(), a.moveTo(l.x, l.y), a.lineTo(l.x + 9 * Math.cos(.0174533 * l.rotation), l.y + 9 * Math.sin(.0174533 * l.rotation)), a.strokeStyle = "black", a.lineWidth = 4.5, a.stroke(), a.strokeStyle = "red", a.lineWidth = 3, a.stroke(), a.closePath() } a.restore(); return d }; c._solveGuideData = function(b, a) { var e; if (e = c.debug(b)) return e; var d = a.path = b.path; a.orient = b.orient; a.subLines = []; a.totalLength = 0; a.startOffsetRot = 0; a.deltaRotation = 0; a.startData = { ratio: 0 }; a.endData = { ratio: 1 }; a.animSpan = 1; var f = d.length, g, h = {}; var l = d[0]; var n = d[1]; for (e = 2; e < f; e += 4) { var m = d[e]; var u = d[e + 1]; var p = d[e + 2]; var z = d[e + 3]; var q = { weightings: [], estLength: 0, portion: 0 }, C = l; var A = n; for (g = 1; 10 >= g; g++) c._getParamsForCurve(l, n, m, u, p, z, g / 10, !1, h), C = h.x - C, A = h.y - A, A = Math.sqrt(C * C + A * A), q.weightings.push(A), q.estLength += A, C = h.x, A = h.y; a.totalLength += q.estLength; for (g = 0; 10 > g; g++) A = q.estLength, q.weightings[g] /= A; a.subLines.push(q); l = p; n = z } A = a.totalLength; d = a.subLines.length; for (e = 0; e < d; e++) a.subLines[e].portion = a.subLines[e].estLength / A; e = isNaN(b.start) ? 0 : b.start; d = isNaN(b.end) ? 1 : b.end; c._ratioToPositionData(e, a, a.startData); c._ratioToPositionData(d, a, a.endData); a.startData.ratio = e; a.endData.ratio = d; a.animSpan = a.endData.ratio - a.startData.ratio }; c._ratioToPositionData = function(b, a, e) { var d = a.subLines, f, g = 0, h = b * a.animSpan + a.startData.ratio; var l = d.length; for (f = 0; f < l; f++) { var n = d[f].portion; if (g + n >= h) { var m = f; break } g += n } void 0 === m && (m = l - 1, g -= n); d = d[m].weightings; var u = n; l = d.length; for (f = 0; f < l; f++) { n = d[f] * u; if (g + n >= h) break; g += n } m = 4 * m + 2; l = a.path; c._getParamsForCurve(l[m - 2], l[m - 1], l[m], l[m + 1], l[m + 2], l[m + 3], f / 10 + (h - g) / n * .1, a.orient, e); a.orient && (e.rotation = .99999 <= b && 1.00001 >= b && void 0 !== a.endAbsRot ? a.endAbsRot : e.rotation + (a.startOffsetRot + b * a.deltaRotation)); return e }; c._getParamsForCurve = function(b, a, e, d, f, g, h, l, n) { var m = 1 - h; n.x = m * m * b + 2 * m * h * e + h * h * f; n.y = m * m * a + 2 * m * h * d + h * h * g; l && (n.rotation = 57.2957795 * Math.atan2((d - a) * m + (g - d) * h, (e - b) * m + (f - e) * h)) }; c._findPathProblems = function(b) { var a = b.path, e = a && a.length || 0; if (6 > e || (e - 2) % 4) return "\tCannot parse 'path' array due to invalid number of entries in path. There should be an odd number of points, at least 3 points, and 2 entries per point (x & y). See 'CanvasRenderingContext2D.quadraticCurveTo' for details as 'path' models a quadratic bezier.\n\nOnly [ " + (e + " ] values found. Expected: " + Math.max(4 * Math.ceil((e - 2) / 4) + 2, 6)); for (var d = 0; d < e; d++) if (isNaN(a[d])) return "All data in path array must be numeric"; a = b.start; if (isNaN(a) && void 0 !== a) return "'start' out of bounds. Expected 0 to 1, got: " + a; a = b.end; if (isNaN(a) && void 0 !== a) return "'end' out of bounds. Expected 0 to 1, got: " + a; if ((b = b.orient) && "fixed" != b && "auto" != b && "cw" != b && "ccw" != b) return 'Invalid orientation value. Expected ["fixed", "auto", "cw", "ccw", undefined], got: ' + b }; createjs.MotionGuidePlugin = c })(); this.createjs = this.createjs || {}; (function() { var c = createjs.TweenJS = createjs.TweenJS || {}; c.version = "1.0.0"; c.buildDate = "Thu, 14 Sep 2017 19:47:47 GMT" })(); ! function() { var c = "undefined" != typeof window && void 0 !== window.document ? window.document : {}, b = "undefined" != typeof module && module.exports, a = function() { for (var f, g = ["requestFullscreen exitFullscreen fullscreenElement fullscreenEnabled fullscreenchange fullscreenerror".split(" "), "webkitRequestFullscreen webkitExitFullscreen webkitFullscreenElement webkitFullscreenEnabled webkitfullscreenchange webkitfullscreenerror".split(" "), "webkitRequestFullScreen webkitCancelFullScreen webkitCurrentFullScreenElement webkitCancelFullScreen webkitfullscreenchange webkitfullscreenerror".split(" "), "mozRequestFullScreen mozCancelFullScreen mozFullScreenElement mozFullScreenEnabled mozfullscreenchange mozfullscreenerror".split(" "), "msRequestFullscreen msExitFullscreen msFullscreenElement msFullscreenEnabled MSFullscreenChange MSFullscreenError".split(" ") ], h = 0, l = g.length, n = {}; h < l; h++) if ((f = g[h]) && f[1] in c) { for (h = 0; h < f.length; h++) n[g[0][h]] = f[h]; return n } return !1 }(), e = { change: a.fullscreenchange, error: a.fullscreenerror }, d = { request: function(f) { return new Promise(function(g, h) { var l = function() { this.off("change", l); g() }.bind(this); this.on("change", l); f = f || c.documentElement; Promise.resolve(f[a.requestFullscreen]())["catch"](h) }.bind(this)) }, exit: function() { return new Promise(function(f, g) { if (this.isFullscreen) { var h = function() { this.off("change", h); f() }.bind(this); this.on("change", h); Promise.resolve(c[a.exitFullscreen]())["catch"](g) } else f() }.bind(this)) }, toggle: function(f) { return this.isFullscreen ? this.exit() : this.request(f) }, onchange: function(f) { this.on("change", f) }, onerror: function(f) { this.on("error", f) }, on: function(f, g) { var h = e[f]; h && c.addEventListener(h, g, !1) }, off: function(f, g) { var h = e[f]; h && c.removeEventListener(h, g, !1) }, raw: a }; a ? (Object.defineProperties(d, { isFullscreen: { get: function() { return !!c[a.fullscreenElement] } }, element: { enumerable: !0, get: function() { return c[a.fullscreenElement] } }, isEnabled: { enumerable: !0, get: function() { return !!c[a.fullscreenEnabled] } } }), b ? module.exports = d : window.screenfull = d) : b ? module.exports = { isEnabled: !1 } : window.screenfull = { isEnabled: !1 } }(); (function() { function c(k) { k = String(k); return k.charAt(0).toUpperCase() + k.slice(1) } function b(k, w) { var y = -1, t = k ? k.length : 0; if ("number" == typeof t && -1 < t && t <= z) for (; ++y < t;) w(k[y], y, k); else e(k, w) } function a(k) { k = String(k).replace(/^ +| +$/g, ""); return /^(?:webOS|i(?:OS|P))/.test(k) ? k : c(k) } function e(k, w) { for (var y in k) C.call(k, y) && w(k[y], y, k) } function d(k) { return null == k ? c(k) : A.call(k).slice(8, -1) } function f(k, w) { var y = null != k ? typeof k[w] : "number"; return !/^(?:boolean|number|string|undefined)$/.test(y) && ("object" == y ? !!k[w] : !0) } function g(k) { return String(k).replace(/([ -])(?!$)/g, "$1?") } function h(k, w) { var y = null; b(k, function(t, x) { y = w(y, t, x, k) }); return y } function l(k) { function w(R) { return h(R, function(N, M) { var S = M.pattern || g(M); !N && (N = RegExp("\\b" + S + " *\\d+[.\\w_]*", "i").exec(k) || RegExp("\\b" + S + " *\\w+-[\\w]*", "i").exec(k) || RegExp("\\b" + S + "(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)", "i").exec(k)) && ((N = String(M.label && !RegExp(S, "i").test(M.label) ? M.label : N).split("/"))[1] && !/[\d.]+/.test(N[0]) && (N[0] += " " + N[1]), M = M.label || M, N = a(N[0].replace(RegExp(S, "i"), M).replace(RegExp("; *(?:" + M + "[_-])?", "i"), " ").replace(RegExp("(" + M + ")[-_.]?(\\w)", "i"), "$1 $2"))); return N }) } function y(R) { return h(R, function(N, M) { return N || (RegExp(M + "(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)", "i").exec(k) || 0)[1] || null }) } var t = m, x = k && "object" == typeof k && "String" != d(k); x && (t = k, k = null); var I = t.navigator || {}, B = I.userAgent || ""; k || (k = B); var P = x ? !!I.likeChrome : /\bChrome\b/.test(k) && !/internal|\n/i.test(A.toString()), F = x ? "Object" : "ScriptBridgingProxyObject", O = x ? "Object" : "Environment", G = x && t.java ? "JavaPackage" : d(t.java), Z = x ? "Object" : "RuntimeObject"; O = (G = /\bJava/.test(G) && t.java) && d(t.environment) == O; var aa = G ? "a" : "\u03b1", E = G ? "b" : "\u03b2", J = t.document || {}, Q = t.operamini || t.opera, W = q.test(W = x && Q ? Q["[[Class]]"] : d(Q)) ? W : Q = null, r, X = k; x = []; var Y = null, U = k == B; B = U && Q && "function" == typeof Q.version && Q.version(); var K = function(R) { return h(R, function(N, M) { return N || RegExp("\\b" + (M.pattern || g(M)) + "\\b", "i").exec(k) && (M.label || M) }) }([{ label: "EdgeHTML", pattern: "Edge" }, "Trident", { label: "WebKit", pattern: "AppleWebKit" }, "iCab", "Presto", "NetFront", "Tasman", "KHTML", "Gecko"]), D = function(R) { return h(R, function(N, M) { return N || RegExp("\\b" + (M.pattern || g(M)) + "\\b", "i").exec(k) && (M.label || M) }) }(["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" ]), L = w([{ 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" ]), T = function(R) { return h(R, function(N, M, S) { return N || (M[L] || M[/^[a-z]+(?: +[a-z]+\b)*/i.exec(L)] || RegExp("\\b" + g(S) + "(?:\\b|\\w*\\d)", "i").exec(k)) && S }) }({ 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 } }), H = function(R) { return h(R, function(N, M) { var S = M.pattern || g(M); if (!N && (N = RegExp("\\b" + S + "(?:/[\\d.]+|[ \\w.]*)", "i").exec(k))) { var V = N, ba = M.label || M, ca = { "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" }; S && ba && /^Win/i.test(V) && !/^Windows Phone /i.test(V) && (ca = ca[/[\d.]+$/.exec(V)]) && (V = "Windows " + ca); V = String(V); S && ba && (V = V.replace(RegExp(S, "i"), ba)); N = V = a(V.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 N }) }(["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 " ]); K && (K = [K]); T && !L && (L = w([T])); if (r = /\bGoogle TV\b/.exec(L)) L = r[0]; /\bSimulator\b/i.test(k) && (L = (L ? L + " " : "") + "Simulator"); "Opera Mini" == D && /\bOPiOS\b/.test(k) && x.push("running in Turbo/Uncompressed mode"); "IE" == D && /\blike iPhone OS\b/.test(k) ? (r = l(k.replace(/like iPhone OS/, "")), T = r.manufacturer, L = r.product) : /^iP/.test(L) ? (D || (D = "Safari"), H = "iOS" + ((r = / OS ([\d_]+)/i.exec(k)) ? " " + r[1].replace(/_/g, ".") : "")) : "Konqueror" != D || /buntu/i.test(H) ? T && "Google" != T && (/Chrome/.test(D) && !/\bMobile Safari\b/i.test(k) || /\bVita\b/.test(L)) || /\bAndroid\b/.test(H) && /^Chrome/.test(D) && /\bVersion\//i.test(k) ? (D = "Android Browser", H = /\bAndroid\b/.test(H) ? H : "Android") : "Silk" == D ? (/\bMobi/i.test(k) || (H = "Android", x.unshift("desktop mode")), /Accelerated *= *true/i.test(k) && x.unshift("accelerated")) : "PaleMoon" == D && (r = /\bFirefox\/([\d.]+)\b/.exec(k)) ? x.push("identifying as Firefox " + r[1]) : "Firefox" == D && (r = /\b(Mobile|Tablet|TV)\b/i.exec(k)) ? (H || (H = "Firefox OS"), L || (L = r[1])) : !D || (r = !/\bMinefield\b/i.test(k) && /\b(?:Firefox|Safari)\b/.exec(D)) ? (D && !L && /[\/,]|^[^(]+?\)/.test(k.slice(k.indexOf(r + "/") + 8)) && (D = null), (r = L || T || H) && (L || T || /\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(H)) && (D = /[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(H) ? H : r) + " Browser")) : "Electron" == D && (r = (/\bChrome\/([\d.]+)\b/.exec(k) || 0)[1]) && x.push("Chromium " + r) : H = "Kubuntu"; B || (B = y(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))", "Version", g(D), "(?:Firefox|Minefield|NetFront)" ])); if (r = "iCab" == K && 3 < parseFloat(B) && "WebKit" || /\bOpera\b/.test(D) && (/\bOPR\b/.test(k) ? "Blink" : "Presto") || /\b(?:Midori|Nook|Safari)\b/i.test(k) && !/^(?:Trident|EdgeHTML)$/.test(K) && "WebKit" || !K && /\bMSIE\b/i.test(k) && ("Mac OS" == H ? "Tasman" : "Trident") || "WebKit" == K && /\bPlayStation\b(?! Vita\b)/i.test(D) && "NetFront") K = [r]; "IE" == D && (r = (/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(k) || 0)[1]) ? (D += " Mobile", H = "Windows Phone " + (/\+$/.test(r) ? r : r + ".x"), x.unshift("desktop mode")) : /\bWPDesktop\b/i.test(k) ? (D = "IE Mobile", H = "Windows Phone 8.x", x.unshift("desktop mode"), B || (B = (/\brv:([\d.]+)/.exec(k) || 0)[1])) : "IE" != D && "Trident" == K && (r = /\brv:([\d.]+)/.exec(k)) && (D && x.push("identifying as " + D + (B ? " " + B : "")), D = "IE", B = r[1]); if (U) { if (f(t, "global")) if (G && (r = G.lang.System, X = r.getProperty("os.arch"), H = H || r.getProperty("os.name") + " " + r.getProperty("os.version")), O) { try { B = t.require("ringo/engine").version.join("."), D = "RingoJS" } catch (R) { (r = t.system) && r.global.system == t.system && (D = "Narwhal", H || (H = r[0].os || null)) } D || (D = "Rhino") } else "object" == typeof t.process && !t.process.browser && (r = t.process) && ("object" == typeof r.versions && ("string" == typeof r.versions.electron ? (x.push("Node " + r.versions.node), D = "Electron", B = r.versions.electron) : "string" == typeof r.versions.nw && (x.push("Chromium " + B, "Node " + r.versions.node), D = "NW.js", B = r.versions.nw)), D || (D = "Node.js", X = r.arch, H = r.platform, B = (B = /[\d.]+/.exec(r.version)) ? B[0] : null)); else d(r = t.runtime) == F ? (D = "Adobe AIR", H = r.flash.system.Capabilities.os) : d(r = t.phantom) == Z ? (D = "PhantomJS", B = (r = r.version || null) && r.major + "." + r.minor + "." + r.patch) : "number" == typeof J.documentMode && (r = /\bTrident\/(\d+)/i.exec(k)) ? (B = [B, J.documentMode], (r = +r[1] + 4) != B[1] && (x.push("IE " + B[1] + " mode"), K && (K[1] = ""), B[1] = r), B = "IE" == D ? String(B[1].toFixed(1)) : B[0]) : "number" == typeof J.documentMode && /^(?:Chrome|Firefox)\b/.test(D) && (x.push("masking as " + D + " " + B), D = "IE", B = "11.0", K = ["Trident"], H = "Windows"); H = H && a(H) } B && (r = /(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(B) || /(?:alpha|beta)(?: ?\d)?/i.exec(k + ";" + (U && I.appMinorVersion)) || /\bMinefield\b/i.test(k) && "a") && (Y = /b/i.test(r) ? "beta" : "alpha", B = B.replace(RegExp(r + "\\+?$"), "") + ("beta" == Y ? E : aa) + (/\d+\+?/.exec(r) || "")); if ("Fennec" == D || "Firefox" == D && /\b(?:Android|Firefox OS)\b/.test(H)) D = "Firefox Mobile"; else if ("Maxthon" == D && B) B = B.replace(/\.[\d.]+/, ".x"); else if (/\bXbox\b/i.test(L)) "Xbox 360" == L && (H = null), "Xbox 360" == L && /\bIEMobile\b/.test(k) && x.unshift("mobile mode"); else if (!/^(?:Chrome|IE|Opera)$/.test(D) && (!D || L || /Browser|Mobi/.test(D)) || "Windows CE" != H && !/Mobi/i.test(k)) if ("IE" == D && U) try { null === t.external && x.unshift("platform preview") } catch (R) { x.unshift("embedded") } else(/\bBlackBerry\b/.test(L) || /\bBB10\b/.test(k)) && (r = (RegExp(L.replace(/ +/g, " *") + "/([.\\d]+)", "i").exec(k) || 0)[1] || B) ? (r = [r, /BB10/.test(k)], H = (r[1] ? (L = null, T = "BlackBerry") : "Device Software") + " " + r[0], B = null) : this != e && "Wii" != L && (U && Q || /Opera/.test(D) && /\b(?:MSIE|Firefox)\b/i.test(k) || "Firefox" == D && /\bOS X (?:\d+\.){2,}/.test(H) || "IE" == D && (H && !/^Win/.test(H) && 5.5 < B || /\bWindows XP\b/.test(H) && 8 < B || 8 == B && !/\bTrident\b/.test(k))) && !q.test(r = l.call(e, k.replace(q, "") + ";")) && r.name && (r = "ing as " + r.name + ((r = r.version) ? " " + r : ""), q.test(D) ? (/\bIE\b/.test(r) && "Mac OS" == H && (H = null), r = "identify" + r) : (r = "mask" + r, D = W ? a(W.replace(/([a-z])([A-Z])/g, "$1 $2")) : "Opera", /\bIE\b/.test(r) && (H = null), U || (B = null)), K = ["Presto"], x.push(r)); else D += " Mobile"; if (r = (/\bAppleWebKit\/([\d.]+\+?)/i.exec(k) || 0)[1]) { r = [parseFloat(r.replace(/\.(\d)$/, ".0$1")), r]; if ("Safari" == D && "+" == r[1].slice(-1)) D = "WebKit Nightly", Y = "alpha", B = r[1].slice(0, -1); else if (B == r[1] || B == (r[2] = (/\bSafari\/([\d.]+\+?)/i.exec(k) || 0)[1])) B = null; r[1] = (/\bChrome\/([\d.]+)/i.exec(k) || 0)[1]; 537.36 == r[0] && 537.36 == r[2] && 28 <= parseFloat(r[1]) && "WebKit" == K && (K = ["Blink"]); U && (P || r[1]) ? (K && (K[1] = "like Chrome"), r = r[1] || (r = r[0], 530 > r ? 1 : 532 > r ? 2 : 532.05 > r ? 3 : 533 > r ? 4 : 534.03 > r ? 5 : 534.07 > r ? 6 : 534.1 > r ? 7 : 534.13 > r ? 8 : 534.16 > r ? 9 : 534.24 > r ? 10 : 534.3 > r ? 11 : 535.01 > r ? 12 : 535.02 > r ? "13+" : 535.07 > r ? 15 : 535.11 > r ? 16 : 535.19 > r ? 17 : 536.05 > r ? 18 : 536.1 > r ? 19 : 537.01 > r ? 20 : 537.11 > r ? "21+" : 537.13 > r ? 23 : 537.18 > r ? 24 : 537.24 > r ? 25 : 537.36 > r ? 26 : "Blink" != K ? "27" : "28")) : (K && (K[1] = "like Safari"), r = (r = r[0], 400 > r ? 1 : 500 > r ? 2 : 526 > r ? 3 : 533 > r ? 4 : 534 > r ? "4+" : 535 > r ? 5 : 537 > r ? 6 : 538 > r ? 7 : 601 > r ? 8 : "8")); K && (K[1] += " " + (r += "number" == typeof r ? ".x" : /[.+]/.test(r) ? "" : "+")); "Safari" == D && (!B || 45 < parseInt(B)) && (B = r) } "Opera" == D && (r = /\bzbov|zvav$/.exec(H)) ? (D += " ", x.unshift("desktop mode"), "zvav" == r ? (D += "Mini", B = null) : D += "Mobile", H = H.replace(RegExp(" *" + r + "$"), "")) : "Safari" == D && /\bChrome\b/.exec(K && K[1]) && (x.unshift("desktop mode"), D = "Chrome Mobile", B = null, /\bOS X\b/.test(H) ? (T = "Apple", H = "iOS 4.3+") : H = null); B && 0 == B.indexOf(r = /[\d.]+$/.exec(H)) && -1 < k.indexOf("/" + r + "-") && (H = String(H.replace(r, "")).replace(/^ +| +$/g, "")); K && !/\b(?:Avant|Nook)\b/.test(D) && (/Browser|Lunascape|Maxthon/.test(D) || "Safari" != D && /^iOS/.test(H) && /\bSafari\b/.test(K[1]) || /^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(D) && K[1]) && (r = K[K.length - 1]) && x.push(r); x.length && (x = ["(" + x.join("; ") + ")"]); T && L && 0 > L.indexOf(T) && x.push("on " + T); L && x.push((/^on /.test(x[x.length - 1]) ? "" : "on ") + L); if (H) { var da = (r = / ([\d.+]+)$/.exec(H)) && "/" == H.charAt(H.length - r[0].length - 1); H = { architecture: 32, family: r && !da ? H.replace(r[0], "") : H, version: r ? r[1] : null, toString: function() { var R = this.version; return this.family + (R && !da ? " " + R : "") + (64 == this.architecture ? " 64-bit" : "") } } }(r = /\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(X)) && !/\bi686\b/i.test(X) ? (H && (H.architecture = 64, H.family = H.family.replace(RegExp(" *" + r), "")), D && (/\bWOW64\b/i.test(k) || U && /\w(?:86|32)$/.test(I.cpuClass || I.platform) && !/\bWin64; x64\b/i.test(k)) && x.unshift("32-bit")) : H && /^OS X/.test(H.family) && "Chrome" == D && 39 <= parseFloat(B) && (H.architecture = 64); k || (k = null); t = {}; t.description = k; t.layout = K && K[0]; t.manufacturer = T; t.name = D; t.prerelease = Y; t.product = L; t.ua = k; t.version = D && B; t.os = H || { architecture: null, family: null, version: null, toString: function() { return "null" } }; t.parse = l; t.toString = function() { return this.description || "" }; t.version && x.unshift(B); t.name && x.unshift(D); H && D && (H != String(H).split(" ")[0] || H != D.split(" ")[0] && !L) && x.push(L ? "(" + H + ")" : "on " + H); x.length && (t.description = x.join(" ")); return t } var n = { "function": !0, object: !0 }, m = n[typeof window] && window || this, u = n[typeof exports] && exports; n = n[typeof module] && module && !module.nodeType && module; var p = u && n && "object" == typeof global && global; !p || p.global !== p && p.window !== p && p.self !== p || (m = p); var z = Math.pow(2, 53) - 1, q = /\bOpera/; p = Object.prototype; var C = p.hasOwnProperty, A = p.toString, v = l(); "function" == typeof define && "object" == typeof define.amd && define.amd ? (m.platform = v, define(function() { return v })) : u && n ? e(v, function(k, w) { u[w] = k }) : m.platform = v }).call(this); function buildIOSMeta() { for (var c = [{ 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" }], b = 0; b < c.length; b++) { var a = document.createElement("meta"); a.name = c[b].name; a.content = c[b].content; var e = window.document.head.querySelector('meta[name="' + a.name + '"]'); e && e.parentNode.removeChild(e); window.document.head.appendChild(a) } } 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); console.log(window.devicePixelRatio); console.log(window.innerWidth); console.log(window.innerHeight); 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; case 808: 414 === 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; case 808: 414 === window.innerHeight ? hideIOSFullscreenPanel() : showIOSFullscreenPanel(); break; default: hideIOSFullscreenPanel() } break; default: hideIOSFullscreenPanel() } } function iosResize() { __iosResize(); setTimeout(function() { __iosResize() }, 500) } function iosInIframe() { try { return window.self !== window.top } catch (c) { return !0 } } function isIOSLessThen13() { var c = platform.os, b = c.family.toLowerCase(); c = parseFloat(c.version); return "ios" === b && 13 > c ? !0 : !1 } $(document).ready(function() { platform && "iPhone" === platform.product && "safari" === platform.name.toLowerCase() && isIOSLessThen13() && !iosInIframe() && (buildIOSFullscreenPanel(), buildIOSMeta()) }); jQuery(window).resize(function() { platform && "iPhone" === platform.product && "safari" === platform.name.toLowerCase() && isIOSLessThen13() && !iosInIframe() && iosResize() }); var s_iScaleFactor = 1, s_bIsIphone = !1, s_iOffsetX, s_iOffsetY, s_bFocus = !0; (function(c) { (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(c) || /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(c.substr(0, 4)) })(navigator.userAgent || navigator.vendor || window.opera); $(window).resize(function() { sizeHandler() }); function trace(c) { console.log(c) } function getSize(c) { var b = c.toLowerCase(), a = window.document, e = a.documentElement; if (void 0 === window["inner" + c]) c = e["client" + c]; else if (window["inner" + c] != e["client" + c]) { var d = a.createElement("body"); d.id = "vpw-test-b"; d.style.cssText = "overflow:scroll"; var f = a.createElement("div"); f.id = "vpw-test-d"; f.style.cssText = "position:absolute;top:-1000px"; f.innerHTML = "<style>@media(" + b + ":" + e["client" + c] + "px){body#vpw-test-b div#vpw-test-d{" + b + ":7px!important}}</style>"; d.appendChild(f); e.insertBefore(d, a.head); c = 7 == f["offset" + c] ? e["client" + c] : window["inner" + c]; e.removeChild(d) } else c = window["inner" + c]; return c } 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 isIphone() { return -1 !== navigator.userAgent.toLowerCase().indexOf("iphone") ? !0 : !1 } function isIOS() { var c = "iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";"); if (-1 !== navigator.userAgent.toLowerCase().indexOf("iphone")) return s_bIsIphone = !0; for (; c.length;) if (navigator.platform === c.pop()) return !0; return s_bIsIphone = !1 } function getIOSWindowHeight() { return document.documentElement.clientWidth / window.innerWidth * window.innerHeight } function getHeightOfIOSToolbars() { var c = (0 === window.orientation ? screen.height : screen.width) - getIOSWindowHeight(); return 1 < c ? c : 0 } function isIpad() { var c = -1 !== navigator.userAgent.toLowerCase().indexOf("ipad"); return !c && navigator.userAgent.match(/Mac/) && navigator.maxTouchPoints && 2 < navigator.maxTouchPoints ? !0 : c } function isMobile() { return isIpad() ? !0 : jQuery.browser.mobile } function sizeHandler() { window.scrollTo(0, 1); if ($("#canvas")) { var c = null !== platform.name && "safari" === platform.name.toLowerCase() ? getIOSWindowHeight() : getSize("Height"); var b = getSize("Width"); s_bFocus && _checkOrientation(b, c); var a = Math.min(c / CANVAS_HEIGHT, b / CANVAS_WIDTH), e = Math.round(CANVAS_WIDTH * a); a = Math.round(CANVAS_HEIGHT * a); if (a < c) { var d = c - a; a += d; e += CANVAS_WIDTH / CANVAS_HEIGHT * d } else e < b && (d = b - e, e += d, a += CANVAS_HEIGHT / CANVAS_WIDTH * d); d = c / 2 - a / 2; var f = b / 2 - e / 2, g = CANVAS_WIDTH / e; if (f * g < -EDGEBOARD_X || d * g < -EDGEBOARD_Y) a = Math.min(c / (CANVAS_HEIGHT - 2 * EDGEBOARD_Y), b / (CANVAS_WIDTH - 2 * EDGEBOARD_X)), e = Math.round(CANVAS_WIDTH * a), a = Math.round(CANVAS_HEIGHT * a), d = (c - a) / 2, f = (b - e) / 2, g = CANVAS_WIDTH / e; s_iOffsetX = -1 * f * g; s_iOffsetY = -1 * d * g; 0 <= d && (s_iOffsetY = 0); 0 <= f && (s_iOffsetX = 0); null !== s_oInterface && s_oInterface.refreshButtonPos(s_iOffsetX, s_iOffsetY); null !== s_oMenu && s_oMenu.refreshButtonPos(s_iOffsetX, s_iOffsetY); null !== s_oChooseImagePanel && s_oChooseImagePanel.refreshButtonPos(s_iOffsetX, s_iOffsetY); null !== s_oChooseDifficultyPanel && s_oChooseDifficultyPanel.refreshButtonPos(s_iOffsetX, s_iOffsetY); s_bIsIphone ? (canvas = document.getElementById("canvas"), s_oStage.canvas.width = 2 * e, s_oStage.canvas.height = 2 * a, canvas.style.width = e + "px", canvas.style.height = a + "px", s_oStage.scaleX = s_oStage.scaleY = s_iScaleFactor = 2 * Math.min(e / CANVAS_WIDTH, a / CANVAS_HEIGHT)) : s_bMobile || isChrome() ? ($("#canvas").css("width", e + "px"), $("#canvas").css("height", a + "px")) : (s_oStage.canvas.width = e, s_oStage.canvas.height = a, s_iScaleFactor = Math.min(e / CANVAS_WIDTH, a / CANVAS_HEIGHT), s_oStage.scaleX = s_oStage.scaleY = s_iScaleFactor); 0 > d || (d = (c - a) / 2); $("#canvas").css("top", d + "px"); $("#canvas").css("left", f + "px"); fullscreenHandler() } } function _checkOrientation(c, b) { s_bMobile && ENABLE_CHECK_ORIENTATION && (c > b ? "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(c, b, a) { return !1 === DISABLE_SOUND_MOBILE || !1 === s_bMobile ? (s_aSounds[c].play(), s_aSounds[c].volume(b), s_aSounds[c].loop(a), s_aSounds[c]) : null } function stopSound(c) { !1 !== DISABLE_SOUND_MOBILE && !1 !== s_bMobile || s_aSounds[c].stop() } function setVolume(c, b) { !1 !== DISABLE_SOUND_MOBILE && !1 !== s_bMobile || s_aSounds[c].volume(b) } function setMute(c, b) { !1 !== DISABLE_SOUND_MOBILE && !1 !== s_bMobile || s_aSounds[c].mute(b) } function createBitmap(c, b, a) { var e = new createjs.Bitmap(c), d = new createjs.Shape; b && a ? d.graphics.beginFill("#fff").drawRect(0, 0, b, a) : d.graphics.beginFill("#ff0").drawRect(0, 0, c.width, c.height); e.hitArea = d; return e } function createSprite(c, b, a, e, d, f) { c = null !== b ? new createjs.Sprite(c, b) : new createjs.Sprite(c); b = new createjs.Shape; b.graphics.beginFill("#000000").drawRect(-a, -e, d, f); c.hitArea = b; return c } function randomFloatBetween(c, b, a) { "undefined" === typeof a && (a = 2); return parseFloat(Math.min(c + Math.random() * (b - c), b).toFixed(a)) } function rotateVector2D(c, b) { var a = b.getX() * Math.cos(c) + b.getY() * Math.sin(c), e = b.getX() * -Math.sin(c) + b.getY() * Math.cos(c); b.set(a, e) } function tweenVectorsOnX(c, b, a) { return c + a * (b - c) } function shuffle(c) { for (var b = c.length, a, e; 0 !== b;) e = Math.floor(Math.random() * b), --b, a = c[b], c[b] = c[e], c[e] = a; return c } function bubbleSort(c) { do { var b = !1; for (var a = 0; a < c.length - 1; a++) c[a] > c[a + 1] && (b = c[a], c[a] = c[a + 1], c[a + 1] = b, b = !0) } while (b) } function compare(c, b) { return c.index > b.index ? -1 : c.index < b.index ? 1 : 0 } function easeLinear(c, b, a, e) { return a * c / e + b } function easeInQuad(c, b, a, e) { return a * (c /= e) * c + b } function easeInSine(c, b, a, e) { return -a * Math.cos(c / e * (Math.PI / 2)) + a + b } function easeInCubic(c, b, a, e) { return a * (c /= e) * c * c + b } function getTrajectoryPoint(c, b) { var a = new createjs.Point, e = (1 - c) * (1 - c), d = c * c; a.x = e * b.start.x + 2 * (1 - c) * c * b.traj.x + d * b.end.x; a.y = e * b.start.y + 2 * (1 - c) * c * b.traj.y + d * b.end.y; return a } function formatTime(c) { c /= 1E3; var b = Math.floor(c / 60); c = Math.floor(c - 60 * b); var a = ""; a = 10 > b ? a + ("0" + b + ":") : a + (b + ":"); return 10 > c ? a + ("0" + c) : a + c } function degreesToRadians(c) { return c * Math.PI / 180 } function distance(c, b) { return Math.sqrt((b.x - c.x) * (b.x - c.x) + (b.y - c.y) * (b.y - c.y)) } function distance2(c, b) { return (b.x - c.x) * (b.x - c.x) + (b.y - c.y) * (b.y - c.y) } function NoClickDelay(c) { this.element = c; window.Touch && this.element.addEventListener("touchstart", this, !1) } function shuffle(c) { for (var b = c.length, a, e; 0 < b;) e = Math.floor(Math.random() * b), b--, a = c[b], c[b] = c[e], c[e] = a; return c } NoClickDelay.prototype = { handleEvent: function(c) { switch (c.type) { case "touchstart": this.onTouchStart(c); break; case "touchmove": this.onTouchMove(c); break; case "touchend": this.onTouchEnd(c) } }, onTouchStart: function(c) { c.preventDefault(); this.moved = !1; this.element.addEventListener("touchmove", this, !1); this.element.addEventListener("touchend", this, !1) }, onTouchMove: function(c) { this.moved = !0 }, onTouchEnd: function(c) { this.element.removeEventListener("touchmove", this, !1); this.element.removeEventListener("touchend", this, !1); if (!this.moved) { c = document.elementFromPoint(c.changedTouches[0].clientX, c.changedTouches[0].clientY); 3 == c.nodeType && (c = c.parentNode); var b = document.createEvent("MouseEvents"); b.initEvent("click", !0, !0); c.dispatchEvent(b) } } }; (function() { function c(a) { var e = { focus: "visible", focusin: "visible", pageshow: "visible", blur: "hidden", focusout: "hidden", pagehide: "hidden" }; a = a || window.event; a.type in e ? document.body.className = e[a.type] : (document.body.className = this[b] ? "hidden" : "visible", "hidden" === document.body.className ? (s_oMain.stopUpdate(), s_bFocus = !1) : (s_oMain.startUpdate(), s_bFocus = !0)) } var b = "hidden"; b in document ? document.addEventListener("visibilitychange", c) : (b = "mozHidden") in document ? document.addEventListener("mozvisibilitychange", c) : (b = "webkitHidden") in document ? document.addEventListener("webkitvisibilitychange", c) : (b = "msHidden") in document ? document.addEventListener("msvisibilitychange", c) : "onfocusin" in document ? document.onfocusin = document.onfocusout = c : window.onpageshow = window.onpagehide = window.onfocus = window.onblur = c })(); function ctlArcadeResume() { null !== s_oMain && s_oMain.startUpdate() } function ctlArcadePause() { null !== s_oMain && s_oMain.stopUpdate() } function getParamValue(c) { for (var b = window.location.search.substring(1).split("&"), a = 0; a < b.length; a++) { var e = b[a].split("="); if (e[0] == c) return e[1] } } function fullscreenHandler() { ENABLE_FULLSCREEN && screenfull.isEnabled && (s_bFullscreen = screenfull.isFullscreen, null !== s_oInterface && s_oInterface.resetFullscreenBut(), null !== s_oMenu && s_oMenu.resetFullscreenBut(), null !== s_oChooseImagePanel && s_oChooseImagePanel.resetFullscreenBut(), null !== s_oChooseDifficultyPanel && s_oChooseDifficultyPanel.resetFullscreenBut()) } if (screenfull.isEnabled) screenfull.on("change", function() { s_bFullscreen = screenfull.isFullscreen; null !== s_oInterface && s_oInterface.resetFullscreenBut(); null !== s_oMenu && s_oMenu.resetFullscreenBut(); null !== s_oChooseImagePanel && s_oChooseImagePanel.resetFullscreenBut(); null !== s_oChooseDifficultyPanel && s_oChooseDifficultyPanel.resetFullscreenBut() }); function CSpriteLibrary() { var c = {}, b, a, e, d, f, g; this.init = function(h, l, n) { b = {}; e = a = 0; d = h; f = l; g = n }; this.addSprite = function(h, l) { if (c.hasOwnProperty(h)) return !1; var n = new Image; c[h] = b[h] = { szPath: l, oSprite: n, bLoaded: !1 }; a++; return !0 }; this.getSprite = function(h) { return c.hasOwnProperty(h) ? c[h].oSprite : null }; this._onSpritesLoaded = function() { a = 0; f.call(g) }; this._onSpriteLoaded = function() { d.call(g); ++e === a && this._onSpritesLoaded() }; this.loadSprites = function() { for (var h in b) b[h].oSprite.oSpriteLibrary = this, b[h].oSprite.szKey = h, b[h].oSprite.onload = function() { this.oSpriteLibrary.setLoaded(this.szKey); this.oSpriteLibrary._onSpriteLoaded(this.szKey) }, b[h].oSprite.onerror = function(l) { var n = l.currentTarget; setTimeout(function() { b[n.szKey].oSprite.src = b[n.szKey].szPath }, 500) }, b[h].oSprite.src = b[h].szPath }; this.setLoaded = function(h) { c[h].bLoaded = !0 }; this.isLoaded = function(h) { return c[h].bLoaded }; this.getNumSprites = function() { return a } } var CANVAS_WIDTH = 1920, CANVAS_HEIGHT = 1080, EDGEBOARD_X = 250, EDGEBOARD_Y = 80, FPS = 30, FPS_TIME = 1E3 / FPS, DISABLE_SOUND_MOBILE = !1, PRIMARY_FONT = "comfortaa", GAME_Y_OFFSET = 6, TIME_LOOP_WAIT = 2E3, STATE_LOADING = 0, STATE_MENU = 1, STATE_CHOOSE_IMAGE = 2, STATE_CHOOSE_DIFFICULTY = 3, STATE_HELP = 4, STATE_GAME = 5, 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_RELEASE_YES = 6, ON_RELEASE_NO = 7, IMAGE_WIDTH = 800, IMAGE_HEIGHT = 800, BOARD_X = 535, BOARD_Y = 140, LOGIC_CIRCLE_RADIUS = [35, 24, 16, 12], NUM_ROWS_PAGE_LEVEL = 1, NUM_COLS_PAGE_LEVEL = 3, NUM_IMAGES, TIME_FADE_OUT_PIECES = 1500, PIECE_ROTATIONS = [0, 45, 90, 135, 180, 225], DIFFICULTY = [16, 36, 64, 100], JOINT_IN = 0, JOINT_OUT = 1, JOINT_ABSENT = 2, JOINT_UP = "up", JOINT_RIGHT = "right", JOINT_DOWN = "down", JOINT_LEFT = "left", ENABLE_FULLSCREEN, ENABLE_CHECK_ORIENTATION, SOUNDTRACK_VOLUME_IN_GAME = 1, ENABLE_ROT_PIECE, ENABLE_PREVIEW, TEXT_PRELOADER_CONTINUE = "START", TEXT_CHOOSE_IMAGE = "CHOOSE AN IMAGE", TEXT_CHOOSE_DIFFICULTY = "CHOOSE NUMBER OF PIECES", TEXT_PIECES = "PIECES", TEXT_SCORE = "SCORE", TEXT_COMPLETED = "JIGSAW COMPLETED!", TEXT_TIME = "TIME", TEXT_ARE_YOU_SURE = "ARE YOU SURE?", TEXT_DEVELOPED = "developed by", TEXT_SHARE_IMAGE = "200x200.jpg", TEXT_SHARE_TITLE = "Congratulations!", TEXT_SHARE_MSG1 = "You collected <strong>", TEXT_SHARE_MSG2 = " points</strong>!<br><br>Share your score with your friends!", TEXT_SHARE_SHARE1 = "My score is ", TEXT_SHARE_SHARE2 = " points! Can you do better"; function CPreloader() { var c, b, a, e, d, f, g, h, l, n; 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.addSprite("but_start", "./sprites/but_start.png"); s_oSpriteLibrary.loadSprites(); n = new createjs.Container; s_oStage.addChild(n) }; this.unload = function() { n.removeAllChildren(); l.unload() }; this._onImagesLoaded = function() {}; this._onAllImagesLoaded = function() { this.attachSprites(); s_oMain.preloaderReady() }; this.attachSprites = function() { var m = new createjs.Shape; m.graphics.beginFill("black").drawRect(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT); n.addChild(m); m = s_oSpriteLibrary.getSprite("200x200"); g = createBitmap(m); g.regX = .5 * m.width; g.regY = .5 * m.height; g.x = CANVAS_WIDTH / 2; g.y = CANVAS_HEIGHT / 2 - 180; n.addChild(g); h = new createjs.Shape; h.graphics.beginFill("rgba(0,0,0,0.01)").drawRoundRect(g.x - 100, g.y - 100, 200, 200, 10); n.addChild(h); g.mask = h; m = s_oSpriteLibrary.getSprite("progress_bar"); e = createBitmap(m); e.x = CANVAS_WIDTH / 2 - m.width / 2; e.y = CANVAS_HEIGHT / 2 + 50; n.addChild(e); c = m.width; b = m.height; d = new createjs.Shape; d.graphics.beginFill("rgba(0,0,0,0.01)").drawRect(e.x, e.y, 1, b); n.addChild(d); e.mask = d; a = new createjs.Text("", "30px " + PRIMARY_FONT, "#fff"); a.x = CANVAS_WIDTH / 2; a.y = CANVAS_HEIGHT / 2 + 100; a.textBaseline = "alphabetic"; a.textAlign = "center"; n.addChild(a); m = s_oSpriteLibrary.getSprite("but_start"); l = new CTextButton(CANVAS_WIDTH / 2, CANVAS_HEIGHT / 2, m, TEXT_PRELOADER_CONTINUE, "Arial", "#000", 50, n); l.addEventListener(ON_MOUSE_UP, this._onButStartRelease, this); l.setVisible(!1); l.removeStroke(); f = new createjs.Shape; f.graphics.beginFill("black").drawRect(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT); n.addChild(f); createjs.Tween.get(f).to({ alpha: 0 }, 500).call(function() { createjs.Tween.removeTweens(f); n.removeChild(f) }) }; this._onButStartRelease = function() { s_oMain._allResourcesLoaded() }; this.refreshLoader = function(m) { a.text = m + "%"; 100 === m && (s_oMain._allResourcesLoaded(), a.visible = !1, e.visible = !1); d.graphics.clear(); m = Math.floor(m * c / 100); d.graphics.beginFill("rgba(0,0,0,0.01)").drawRect(e.x, e.y, m, b) }; this._init() } function CMain(c) { var b, a = 0, e = 0, d = STATE_LOADING, f, g; this.initContainer = function() { s_oCanvas = document.getElementById("canvas"); s_oStage = new createjs.Stage(s_oCanvas); createjs.Touch.enable(s_oStage, !0); s_bMobile = jQuery.browser.mobile; !1 === s_bMobile && (s_oStage.enableMouseOver(20), s_bMobile = isMobile()); 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; f = new CPreloader; }; this.preloaderReady = function() { s_oMain._loadImages(); !1 !== DISABLE_SOUND_MOBILE && !1 !== s_bMobile || s_oMain._initSounds() }; this.soundLoaded = function() { a++; f.refreshLoader(Math.floor(a / e * 100)) }; this._initSounds = function() { Howler.mute(!s_bAudioActive); s_aSoundsInfo = []; s_aSoundsInfo.push({ path: "./sounds/", filename: "win", loop: !1, volume: 1, ingamename: "win" }); s_aSoundsInfo.push({ path: "./sounds/", filename: "click", loop: !1, volume: 1, ingamename: "click" }); s_aSoundsInfo.push({ path: "./sounds/", filename: "snap", loop: !1, volume: 1, ingamename: "snap" }); s_aSoundsInfo.push({ path: "./sounds/", filename: "place", loop: !1, volume: 1, ingamename: "place" }); e += s_aSoundsInfo.length; s_aSounds = []; for (var l = 0; l < s_aSoundsInfo.length; l++) this.tryToLoadSound(s_aSoundsInfo[l], !1) }; this.tryToLoadSound = function(l, n) { setTimeout(function() { s_aSounds[l.ingamename] = new Howl({ src: [l.path + l.filename + ".mp3"], autoplay: !1, preload: !0, loop: l.loop, volume: l.volume, onload: s_oMain.soundLoaded, onloaderror: function(m, u) { for (var p = 0; p < s_aSoundsInfo.length; p++) if (m === s_aSounds[s_aSoundsInfo[p].ingamename]._sounds[0]._id) { s_oMain.tryToLoadSound(s_aSoundsInfo[p], !0); break } }, onplayerror: function(m) { for (var u = 0; u < s_aSoundsInfo.length; u++) if (m === s_aSounds[s_aSoundsInfo[u].ingamename]._sounds[0]._id) { s_aSounds[s_aSoundsInfo[u].ingamename].once("unlock", function() { s_aSounds[s_aSoundsInfo[u].ingamename].play(); "soundtrack" === s_aSoundsInfo[u].ingamename && null !== s_oGame && setVolume("soundtrack", SOUNDTRACK_VOLUME_IN_GAME) }); break } } }) }, n ? 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("but_credits", "./sprites/but_credits.png"); s_oSpriteLibrary.addSprite("ctl_logo", "./sprites/ctl_logo.png"); s_oSpriteLibrary.addSprite("bg_menu", "./sprites/bg_menu.jpg"); s_oSpriteLibrary.addSprite("bg_game", "./sprites/bg_game.jpg"); s_oSpriteLibrary.addSprite("but_exit", "./sprites/but_exit.png"); s_oSpriteLibrary.addSprite("audio_icon", "./sprites/audio_icon.png"); s_oSpriteLibrary.addSprite("but_fullscreen", "./sprites/but_fullscreen.png"); s_oSpriteLibrary.addSprite("frame", "./sprites/frame.png"); s_oSpriteLibrary.addSprite("but_preview", "./sprites/but_preview.png"); s_oSpriteLibrary.addSprite("but_restart", "./sprites/but_restart.png"); s_oSpriteLibrary.addSprite("but_level", "./sprites/but_level.png"); s_oSpriteLibrary.addSprite("arrow_left", "./sprites/arrow_left.png"); s_oSpriteLibrary.addSprite("arrow_right", "./sprites/arrow_right.png"); s_oSpriteLibrary.addSprite("but_yes", "./sprites/but_yes.png"); s_oSpriteLibrary.addSprite("but_no", "./sprites/but_no.png"); s_oSpriteLibrary.addSprite("but_home", "./sprites/but_home.png"); s_oSpriteLibrary.addSprite("toggle_rotation", "./sprites/toggle_rotation.png"); for (var l = 1; l < NUM_IMAGES + 1; l++) s_oSpriteLibrary.addSprite("image_" + l, "./sprites/image_" + l + ".jpg"); for (l = 0; 4 > l; l++) s_oSpriteLibrary.addSprite("difficulty_" + l, "./sprites/difficulty_" + l + ".png"); for (l = 0; l < DIFFICULTY.length; l++) for (var n = 0; n < DIFFICULTY[l]; n++) s_oSpriteLibrary.addSprite("piece_" + n + "of" + DIFFICULTY[l], "./sprites/difficulty_" + l + "/piece_" + n + ".png"), s_oSpriteLibrary.addSprite("effect_piece_" + n + "of" + DIFFICULTY[l], "./sprites/difficulty_" + l + "/effect_piece_" + n + ".png"); e += s_oSpriteLibrary.getNumSprites(); s_oSpriteLibrary.loadSprites() }; this._onImagesLoaded = function() { a++; f.refreshLoader(Math.floor(a / e * 100)) }; this._allResourcesLoaded = function() { f.unload(); s_oMain.gotoMenu(); s_oGameSettings = new CGameSettings }; this._onAllImagesLoaded = function() {}; this.onAllPreloaderImagesLoaded = function() { this._loadImages() }; this.gotoMenu = function() { new CMenu; d = STATE_MENU }; this.gotoChooseImage = function() { new CChooseImagePanel; d = STATE_CHOOSE_IMAGE }; this.gotoChooseDifficulty = function() { new CChooseDifficultyPanel; d = STATE_CHOOSE_DIFFICULTY }; this.gotoGame = function(l) { g = new CGame(l, h); d = STATE_GAME }; this.gotoHelp = function() { new CHelp; d = STATE_HELP }; this.stopUpdate = function() { b = !1; createjs.Ticker.paused = !0; $("#block_game").css("display", "block"); !1 !== DISABLE_SOUND_MOBILE && !1 !== s_bMobile || Howler.mute(!0) }; this.startUpdate = function() { s_iPrevTime = (new Date).getTime(); b = !0; createjs.Ticker.paused = !1; $("#block_game").css("display", "none"); (!1 === DISABLE_SOUND_MOBILE || !1 === s_bMobile) && s_bAudioActive && Howler.mute(!1) }; this._update = function(l) { if (!1 !== b) { var n = (new Date).getTime(); s_iTimeElaps = n - s_iPrevTime; s_iCntTime += s_iTimeElaps; s_iCntFps++; s_iPrevTime = n; 1E3 <= s_iCntTime && (s_iCurFps = s_iCntFps, s_iCntTime -= 1E3, s_iCntFps = 0); d === STATE_GAME && g.update(); s_oStage.update(l) } }; s_oMain = this; var h = c; NUM_IMAGES = c.num_images; ENABLE_FULLSCREEN = c.fullscreen; ENABLE_CHECK_ORIENTATION = c.check_orientation; s_bAudioActive = c.audio_enable_on_startup; ENABLE_ROT_PIECE = c.enable_rotation; ENABLE_PREVIEW = c.enable_preview; this.initContainer() } var s_bMobile, s_bAudioActive = !0, s_iCntTime = 0, s_iTimeElaps = 0, s_iPrevTime = 0, s_iCntFps = 0, s_iCurFps = 0, s_oStage, s_oMain, s_oSpriteLibrary, s_oCanvas, s_oGameSettings, s_bFullscreen = !1, s_szImageSelected, s_aSounds, s_aSoundsInfo; function CToggle(c, b, a, e, d) { var f, g, h, l, n, m, u, p; this._init = function(q, C, A, v) { h = []; l = []; var k = new createjs.SpriteSheet({ images: [A], frames: { width: A.width / 2, height: A.height, regX: A.width / 2 / 2, regY: A.height / 2 }, animations: { state_true: [0], state_false: [1] } }); g = v; f = !1; p = createSprite(k, "state_" + g, A.width / 2 / 2, A.height / 2, A.width / 2, A.height); p.x = q; p.y = C; p.stop(); z.addChild(p); this._initListener() }; this.unload = function() { p.off("mousedown", n); p.off("pressup", m); s_bMobile || p.off("mouseover", u); z.removeChild(p) }; this._initListener = function() { n = p.on("mousedown", this.buttonDown); m = p.on("pressup", this.buttonRelease); s_bMobile || (u = p.on("mouseover", this.buttonOver)) }; this.addEventListener = function(q, C, A) { h[q] = C; l[q] = A }; this.setActive = function(q) { g = q; p.gotoAndStop("state_" + g) }; this.enable = function() { f = !1 }; this.disable = function() { f = !0 }; this.buttonRelease = function() { f || (p.scaleX = 1, p.scaleY = 1, playSound("click", 1, !1), g = !g, p.gotoAndStop("state_" + g), h[ON_MOUSE_UP] && h[ON_MOUSE_UP].call(l[ON_MOUSE_UP], g)) }; this.buttonDown = function() { f || (p.scaleX = .9, p.scaleY = .9, h[ON_MOUSE_DOWN] && h[ON_MOUSE_DOWN].call(l[ON_MOUSE_DOWN])) }; this.buttonOver = function(q) { f || s_bMobile || (q.target.cursor = "pointer") }; this.setPosition = function(q, C) { p.x = q; p.y = C }; var z = d; this._init(c, b, a, e) } function CGfxButton(c, b, a, e) { var d, f, g, h, l, n, m, u, p; this._init = function(q, C, A, v) { d = !1; f = 1; h = []; l = []; p = createBitmap(A); p.x = q; p.y = C; p.scaleX = p.scaleY = f; p.regX = A.width / 2; p.regY = A.height / 2; v.addChild(p); this._initListener() }; this.unload = function() { p.off("mousedown", n); p.off("pressup", m); s_bMobile || p.off("mouseover", u); e.removeChild(p) }; this.setVisible = function(q) { p.visible = q }; this.enable = function() { d = !1 }; this.disable = function() { d = !0 }; this._initListener = function() { n = p.on("mousedown", this.buttonDown); m = p.on("pressup", this.buttonRelease); s_bMobile || (u = p.on("mouseover", this.buttonOver)) }; this.addEventListener = function(q, C, A) { h[q] = C; l[q] = A }; this.addEventListenerWithParams = function(q, C, A, v) { h[q] = C; l[q] = A; g = v }; this.buttonRelease = function() { d || (p.scaleX = f, p.scaleY = f, h[ON_MOUSE_UP] && h[ON_MOUSE_UP].call(l[ON_MOUSE_UP], g)) }; this.buttonDown = function() { d || (p.scaleX = .9 * f, p.scaleY = .9 * f, playSound("click", 1, !1), h[ON_MOUSE_DOWN] && h[ON_MOUSE_DOWN].call(l[ON_MOUSE_DOWN], g)) }; this.buttonOver = function(q) { s_bMobile || d || (q.target.cursor = "pointer") }; this.inversePulse = function() { createjs.Tween.get(p).to({ scaleX: 1.1 * f, scaleY: 1.1 * f }, 1050, createjs.Ease.quadOut).to({ scaleX: f, scaleY: f }, 850, createjs.Ease.quadIn).call(function() { z.inversePulse() }) }; this.pulseAnimation = function() { createjs.Tween.get(p).to({ scaleX: .9 * f, scaleY: .9 * f }, 850, createjs.Ease.quadOut).to({ scaleX: f, scaleY: f }, 650, createjs.Ease.quadIn).call(function() { z.pulseAnimation() }) }; this.trembleAnimation = function() { createjs.Tween.get(p).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() { z.trebleAnimation() }) }; this.setPosition = function(q, C) { p.x = q; p.y = C }; this.setX = function(q) { p.x = q }; this.setY = function(q) { p.y = q }; this.getButtonImage = function() { return p }; this.getX = function() { return p.x }; this.getY = function() { return p.y }; var z = this; this._init(c, b, a, e); return this } function CTextButton(c, b, a, e, d, f, g, h) { var l, n, m, u, p, z, q; this._init = function(C, A, v, k, w, y, t, x) { l = []; n = []; var I = createBitmap(v), B = Math.ceil(t / 20); p = new createjs.Text(k, t + "px " + w, "#000000"); p.textAlign = "center"; p.textBaseline = "alphabetic"; var P = p.getBounds(); p.x = v.width / 2 + B; p.y = Math.floor(v.height / 2) + P.height / 3 + B; u = new createjs.Text(k, t + "px " + w, y); u.textAlign = "center"; u.textBaseline = "alphabetic"; P = u.getBounds(); u.x = v.width / 2; u.y = Math.floor(v.height / 2) + P.height / 3; m = new createjs.Container; m.x = C; m.y = A; m.regX = v.width / 2; m.regY = v.height / 2; m.addChild(I, p, u); s_bMobile || (m.cursor = "pointer"); x.addChild(m); this._initListener() }; this.unload = function() { m.off("mousedown", z); m.off("pressup", q); h.removeChild(m) }; this.setVisible = function(C) { m.visible = C }; this._initListener = function() { oParent = this; z = m.on("mousedown", this.buttonDown); q = m.on("pressup", this.buttonRelease) }; this.addEventListener = function(C, A, v) { l[C] = A; n[C] = v }; this.buttonRelease = function() { m.scaleX = 1; m.scaleY = 1; l[ON_MOUSE_UP] && l[ON_MOUSE_UP].call(n[ON_MOUSE_UP]) }; this.buttonDown = function() { m.scaleX = .9; m.scaleY = .9; l[ON_MOUSE_DOWN] && l[ON_MOUSE_DOWN].call(n[ON_MOUSE_DOWN]) }; this.setTextPosition = function(C) { u.y = C; p.y = C + 2 }; this.setPosition = function(C, A) { m.x = C; m.y = A }; this.setX = function(C) { m.x = C }; this.setY = function(C) { m.y = C }; this.getButtonImage = function() { return m }; this.getX = function() { return m.x }; this.getY = function() { return m.y }; this.removeStroke = function() { p.visible = !1 }; this._init(c, b, a, e, d, f, g, h); return this } function CMenu() { var c, b, a, e, d, f, g, h, l, n, m, u, p = null, z = null; this._init = function() { g = createBitmap(s_oSpriteLibrary.getSprite("bg_menu")); s_oStage.addChild(g); var q = s_oSpriteLibrary.getSprite("but_play"); h = new CGfxButton(CANVAS_WIDTH / 2, CANVAS_HEIGHT / 2 + 110, q, s_oStage); h.addEventListener(ON_MOUSE_UP, this._onButPlayRelease, this); h.inversePulse(); if (!1 === DISABLE_SOUND_MOBILE || !1 === s_bMobile) q = s_oSpriteLibrary.getSprite("audio_icon"), d = CANVAS_WIDTH - q.height / 2 - 10, f = q.height / 2 + 10, n = new CToggle(d, f, q, s_bAudioActive, s_oStage), n.addEventListener(ON_MOUSE_UP, this._onAudioToggle, this); q = s_oSpriteLibrary.getSprite("but_credits"); a = q.height / 2 + 10; e = q.height / 2 + 10; m = new CGfxButton(a, e, q, s_oStage); m.addEventListener(ON_MOUSE_UP, this._onButCreditRelease, this); q = window.document; var C = q.documentElement; p = C.requestFullscreen || C.mozRequestFullScreen || C.webkitRequestFullScreen || C.msRequestFullscreen; z = q.exitFullscreen || q.mozCancelFullScreen || q.webkitExitFullscreen || q.msExitFullscreen; !1 === ENABLE_FULLSCREEN && (p = !1); p && screenfull.isEnabled && (q = s_oSpriteLibrary.getSprite("but_fullscreen"), c = a + q.width / 2 + 10, b = e, u = new CToggle(c, b, q, s_bFullscreen, s_oStage), u.addEventListener(ON_MOUSE_UP, this._onFullscreenRelease, this)); l = new createjs.Shape; l.graphics.beginFill("black").drawRect(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT); s_oStage.addChild(l); createjs.Tween.get(l).to({ alpha: 0 }, 1E3).call(function() { l.visible = !1 }); this.refreshButtonPos(s_iOffsetX, s_iOffsetY) }; this.unload = function() { h.unload(); h = null; m.unload(); if (!1 === DISABLE_SOUND_MOBILE || !1 === s_bMobile) n.unload(), n = null; p && screenfull.isEnabled && u.unload(); s_oStage.removeAllChildren(); s_oMenu = g = null }; this.refreshButtonPos = function(q, C) { m.setPosition(a + q, C + e); !1 !== DISABLE_SOUND_MOBILE && !1 !== s_bMobile || n.setPosition(d - q, C + f); p && screenfull.isEnabled && u.setPosition(c + q, b + C) }; this.resetFullscreenBut = function() { p && screenfull.isEnabled && u.setActive(s_bFullscreen) }; this._onAudioToggle = function() { Howler.mute(s_bAudioActive); s_bAudioActive = !s_bAudioActive }; this._onButPlayRelease = function() { this.unload(); $(s_oMain).trigger("start_session"); s_oMain.gotoChooseImage() }; this._onButCreditRelease = function() { new CCreditsPanel }; this._onFullscreenRelease = function() { s_bFullscreen ? z.call(window.document) : p.call(window.document.documentElement); sizeHandler() }; s_oMenu = this; this._init() } var s_oMenu = null; function CGame(c, b) { var a, e, d, f, g, h, l, n, m, u, p, z, q, C = null, A; this._init = function(v) { a = !0; e = DIFFICULTY[v]; h = g = 0; l = s_szImageSelected; var k = createBitmap(s_oSpriteLibrary.getSprite("bg_game")); s_oStage.addChild(k); k = createBitmap(s_oSpriteLibrary.getSprite("frame")); k.x = BOARD_X - 5; k.y = BOARD_Y - 5; s_oStage.addChild(k); A = createBitmap(s_oSpriteLibrary.getSprite(l)); A.x = BOARD_X; A.y = BOARD_Y; A.alpha = .5; A.visible = !1; s_oStage.addChild(A); this._createShufflePoints(); this._attachImage(v); this._initJoints(); q = new CInterface; setTimeout(function() { s_oGame.shuffleBoard() }, 2E3) }; this.unload = function() { q.unload(); createjs.Tween.removeAllTweens(); s_oStage.removeAllChildren(); s_oGame = null }; this.restart = function() { g = h = 0; a = !1; for (var v = 0; v < d; v++) for (var k = 0; k < f; k++) n[v][k].reset(q.isRotationActive()); this._initJoints(); A.alpha = .5; A.visible = q.isPreviewVisible() }; this._createShufflePoints = function() { var v = new createjs.Rectangle(BOARD_X - 300, BOARD_Y + 100, 100, BOARD_Y + 500), k = new createjs.Rectangle(BOARD_X + IMAGE_WIDTH + 200, BOARD_Y + 100, 100, BOARD_Y + 500); m = []; for (var w = 0; w < e / 2; w++) { var y = Math.floor(Math.random() * (v.x + v.width - v.x + 1)) + v.x, t = Math.floor(Math.random() * (v.y + v.height - v.y + 1)) + v.y; y = { x: y, y: t }; m.push(y); y = Math.floor(Math.random() * (k.x + v.width - k.x + 1)) + k.x; t = Math.floor(Math.random() * (k.y + v.height - k.y + 1)) + k.y; y = { x: y, y: t }; m.push(y) } shuffle(m) }; this._attachImage = function(v) { z = new createjs.Container; s_oStage.addChild(z); for (var k = "of" + e, w = s_oGameSettings.getPieces(e), y = s_oGameSettings.getPieceJoints(e), t = {}, x = 0; x < e; x++) t["frame_" + x] = x; x = { images: [s_oSpriteLibrary.getSprite(l)], frames: w, animations: t }; t = new createjs.SpriteSheet(x); n = []; x = s_oGameSettings.getPieceSize(e); d = x.rows; f = x.cols; for (var I = 0; I < d; I++) for (n[I] = [], x = 0; x < f; x++) { var B = I * f + x, P = s_oSpriteLibrary.getSprite("piece_" + B + k); B = new CPiece(BOARD_X + w[B][0], BOARD_Y + w[B][1], P.width, P.height, LOGIC_CIRCLE_RADIUS[v], y[B], B, P, s_oSpriteLibrary.getSprite("effect_piece_" + B + k), t, z); n[I][x] = B } }; this._initJoints = function() { p = []; u = []; for (var v = 0; v < d; v++) for (var k = 0; k < f; k++) { if (k + 1 < f) { var w = n[v][k].getJoint(JOINT_RIGHT), y = n[v][k + 1].getJoint(JOINT_LEFT); u.push({ joint1: w, joint2: y }) } v + 1 < d && (w = n[v][k].getJoint(JOINT_DOWN), y = n[v + 1][k].getJoint(JOINT_UP), u.push({ joint1: w, joint2: y })) } }; this.shuffleBoard = function() { for (var v = 0; v < d; v++) for (var k = 0; k < f; k++) n[v][k].moveTo(m[v * f + k]); a = !1 }; this.draggingPiece = function(v, k, w, y) { var t = z.numChildren - 1; w.setDepth(t); for (var x = 0; x < y.length; x++) if (w !== y[x]) { var I = { x: y[x].getStartingX() - w.getStartingX(), y: y[x].getStartingY() - w.getStartingY() }; y[x].draggedByOtherPiece(v, k, I); t--; y[x].setDepth(t) } }; this.releasePiece = function(v, k) { !1 === this._checkCollision(v, k) && playSound("place", 1, !1); for (var w = 0, y = 0; y < d; y++) for (var t = 0; t < f; t++) n[y][t].isAttached() && w++; w === e && this._win() }; this._checkCollision = function(v, k) { for (var w = !1, y = 0; y < d; y++) for (var t = 0; t < f; t++) if (v !== n[y][t] && 0 === v.getAbsRotation() && 0 === n[y][t].getAbsRotation()) { var x = n[y][t].checkCollision(k); if (null !== x) { var I = x.joint1; x = x.joint2; if (this._findJointInList(I, x)) { w = n[y][t].getDiffX(); for (var B = n[y][t].getDiffY(), P = v.snap(w, B), F = 0; F < P.length; F++) P[F].snap(w, B); this._updateActiveJoints(v, n[y][t]); n[y][t].removeJoint(I); v.removeJoint(x); playSound("snap", 1, !1); w = !0 } } } return w }; this._findJointInList = function(v, k) { for (var w = 0; w < u.length; w++) if (v === u[w].joint1 && k === u[w].joint2 || v === u[w].joint2 && k === u[w].joint1) return !0; return !1 }; this._updateActiveJoints = function(v, k) { for (var w = [v], y = !1, t = 0; t < p.length; t++) { for (var x = p[t], I = 0; I < x.length; I++) if (x[I] === v) { w = x; y = !0; break } if (y) { p.splice(t, 1); break } } for (var B = 0; B < w.length; B++) { y = !1; for (t = 0; t < p.length; t++) { x = p[t]; for (I = 0; I < x.length; I++) if (x[I] === k) { p[t].push(w[B]); w[B].updateJointList(p[t]); y = !0; break } if (y) break } y || (p[p.length] = [], p[p.length - 1].push(w[B]), p[p.length - 1].push(k), w[B].updateJointList(p[p.length - 1]), k.updateJointList(p[p.length - 1])) } v.setAttached(!0); k.setAttached(!0) }; this._win = function() { q.playWinEffect() }; this.pause = function(v) { a = v }; this.placePiecesInCorrectPosition = function() { for (var v = 0; v < d; v++) for (var k = 0; k < f; k++) n[v][k].setStartingPosition() }; this.playFinalEffect = function() { g = Math.floor((999999 - h) / 100); 0 > g && (g = 0); switch (e) { case DIFFICULTY[0]: g = parseInt(g / 4); break; case DIFFICULTY[1]: g = parseInt(g / 3); break; case DIFFICULTY[2]: g = parseInt(g / 2) } for (var v = 0; v < d; v++) for (var k = 0; k < f; k++) n[v][k].fadeOut(); A.visible = !0; A.alpha = 0; createjs.Tween.get(A).to({ alpha: 1 }, TIME_FADE_OUT_PIECES).call(function() { C = new CEndPanel(s_oSpriteLibrary.getSprite("msg_box"), g); C.show() }); a = !0; playSound("win", 1, !1) }; this.showPreview = function(v) { A.visible = v }; this.toggleRotation = function(v) { for (var k = 0; k < d; k++) for (var w = 0; w < f; w++) n[k][w].setRotation(v) }; this.onExit = function() { this.unload(); s_oMain.gotoMenu() }; this.update = function() { a || (h += s_iTimeElaps, q.refreshTime(formatTime(h))) }; s_oGame = this; this._init(c) } var s_oGame; function CInterface() { var c, b, a, e, d, f, g, h, l, n, m, u, p, z, q, C, A, v, k, w, y, t, x, I, B = null, P = null; this._init = function() { p = !1; z = !0; var F = s_oSpriteLibrary.getSprite("but_exit"); m = CANVAS_WIDTH - F.width / 2 - 10; u = F.height / 2 + 10; C = new CGfxButton(m, u, F, s_oStage); C.addEventListener(ON_MOUSE_UP, this._onExit, this); F = s_oSpriteLibrary.getSprite("but_restart"); c = m - F.width; b = u; k = new CGfxButton(c, b, F, s_oStage); k.addEventListener(ON_MOUSE_UP, this._onRestartRelease, this); if (!1 === DISABLE_SOUND_MOBILE || !1 === s_bMobile) F = s_oSpriteLibrary.getSprite("audio_icon"), l = c - F.width / 2, n = b, q = new CToggle(l, n, F, s_bAudioActive, s_oStage), q.addEventListener(ON_MOUSE_UP, this._onAudioToggle, this); F = window.document; var O = F.documentElement; B = O.requestFullscreen || O.mozRequestFullScreen || O.webkitRequestFullScreen || O.msRequestFullscreen; P = F.exitFullscreen || F.mozCancelFullScreen || F.webkitExitFullscreen || F.msExitFullscreen; !1 === ENABLE_FULLSCREEN && (B = !1); B && screenfull.isEnabled && (F = s_oSpriteLibrary.getSprite("but_fullscreen"), a = F.width / 4 + 10, e = F.height / 2 + 4, w = new CToggle(a, e, F, s_bFullscreen, s_oStage), w.addEventListener(ON_MOUSE_UP, this._onFullscreenRelease, this)); ENABLE_PREVIEW ? (F = s_oSpriteLibrary.getSprite("but_preview"), g = CANVAS_WIDTH - F.width / 4 - 10, h = CANVAS_HEIGHT - F.height / 2 - 10, A = new CToggle(g, h, F, p, s_oStage), A.addEventListener(ON_MOUSE_UP, this._onPreviewRelease, this), F = s_oSpriteLibrary.getSprite("toggle_rotation"), d = g - F.width / 2 - 10, f = h) : (F = s_oSpriteLibrary.getSprite("toggle_rotation"), d = CANVAS_WIDTH - F.width / 4 - 10, f = CANVAS_HEIGHT - F.height / 2 - 10); ENABLE_ROT_PIECE ? (v = new CToggle(d, f, F, z, s_oStage), v.addEventListener(ON_MOUSE_UP, this._onRotationRelease, this)) : z = !1; y = new createjs.Text(TEXT_TIME, "50px " + PRIMARY_FONT, "#008df0"); y.x = BOARD_X; y.y = BOARD_Y - 12; y.textAlign = "left"; y.textBaseline = "alphabetic"; y.lineWidth = 200; s_oStage.addChild(y); t = new createjs.Text("00:00", "50px " + PRIMARY_FONT, "#ffffff"); t.x = y.x + y.getBounds().width + 20; t.y = y.y; t.textAlign = "left"; t.textBaseline = "alphabetic"; t.lineWidth = 200; s_oStage.addChild(t); I = new createjs.Shape; I.graphics.beginFill("white").drawRect(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT); I.alpha = 0; s_oStage.addChild(I); x = new CAreYouSurePanel(s_oStage); this.enableGUI(!1); this.refreshButtonPos(s_iOffsetX, s_iOffsetY) }; this.unload = function() { if (!1 === DISABLE_SOUND_MOBILE || !1 === s_bMobile) q.unload(), q = null; B && screenfull.isEnabled && w.unload(); ENABLE_ROT_PIECE && v.unload(); ENABLE_PREVIEW && A.unload(); C.unload(); k.unload(); s_oInterface = null }; this.refreshButtonPos = function(F, O) { C.setPosition(m - F, O + u); !1 !== DISABLE_SOUND_MOBILE && !1 !== s_bMobile || q.setPosition(l - F, O + n); B && screenfull.isEnabled && w.setPosition(a + F, e + O); ENABLE_ROT_PIECE && v.setPosition(d - F, f - O); ENABLE_PREVIEW && A.setPosition(g - F, h - O); k.setPosition(c - F, b + O) }; this.enableGUI = function(F) { F ? (ENABLE_PREVIEW && A.enable(), ENABLE_ROT_PIECE && v.enable(), C.enable()) : (ENABLE_PREVIEW && A.disable(), ENABLE_ROT_PIECE && v.disable(), C.disable()) }; this.refreshTime = function(F) { t.text = F }; this.playWinEffect = function() { createjs.Tween.get(I).to({ alpha: 1 }, 200, createjs.Ease.cubicOut).call(function() { s_oGame.placePiecesInCorrectPosition(); createjs.Tween.get(I).to({ alpha: 0 }, 200, createjs.Ease.cubicOut).call(function() { s_oGame.playFinalEffect() }) }) }; this.resetFullscreenBut = function() { B && screenfull.isEnabled && w.setActive(s_bFullscreen) }; this._onAudioToggle = function() { Howler.mute(s_bAudioActive); s_bAudioActive = !s_bAudioActive }; this._onExit = function() { s_oGame.pause(!0); x.show(TEXT_ARE_YOU_SURE); x.addEventListener(ON_RELEASE_YES, this._onReleaseYes); x.addEventListener(ON_RELEASE_NO, this._onReleaseNo) }; this._onReleaseYes = function() { $(s_oMain).trigger("end_session"); $(s_oMain).trigger("show_interlevel_ad"); s_oGame.onExit() }; this._onReleaseNo = function() { s_oGame.pause(!1) }; this._onPreviewRelease = function() { p = !p; s_oGame.showPreview(p) }; this._onRotationRelease = function() { z = !z; s_oGame.toggleRotation(z) }; this._onRestartRelease = function() { s_oGame.restart() }; this._onFullscreenRelease = function() { s_bFullscreen ? P.call(window.document) : B.call(window.document.documentElement); sizeHandler() }; this.isPreviewVisible = function() { return p }; this.isRotationActive = function() { return z }; s_oInterface = this; this._init(); return this } var s_oInterface = null; function CCreditsPanel() { var c, b, a, e; this._init = function() { b = new createjs.Container; s_oStage.addChild(b); var d = s_oSpriteLibrary.getSprite("msg_box"), f = createBitmap(d); f.regX = d.width / 2; f.regY = d.height / 2; f.on("click", function() {}); b.addChild(f); b.x = CANVAS_WIDTH / 2; b.y = CANVAS_HEIGHT / 2; new CTLText(b, -250, -140, 500, 80, 80, "center", "#fff", PRIMARY_FONT, 1, 0, 0, TEXT_DEVELOPED, !0, !0, !1, !1); new CTLText(b, -250, 60, 500, 80, 80, "center", "#fff", PRIMARY_FONT, 1, 0, 0, "www.codethislab.com", !0, !0, !1, !1); d = s_oSpriteLibrary.getSprite("ctl_logo"); e = createBitmap(d); c = e.on("mousedown", this._onLogoButRelease); e.regX = d.width / 2; e.regY = d.height / 2; b.addChild(e); d = s_oSpriteLibrary.getSprite("but_exit"); a = new CGfxButton(318, -298, d, b); a.addEventListener(ON_MOUSE_UP, this.unload, this) }; this.unload = function() { s_oStage.removeChild(void 0); s_oStage.removeChild(b); a.unload(); e.off("click", c) }; this._onLogoButRelease = function() { window.open("http://www.codethislab.com/index.php?&l=en") }; this._init() } function CGameSettings() { var c, b, a; this._init = function() { c = []; c["num_" + DIFFICULTY[0]] = { rows: 4, cols: 4 }; c["num_" + DIFFICULTY[1]] = { rows: 6, cols: 6 }; c["num_" + DIFFICULTY[2]] = { rows: 8, cols: 8 }; c["num_" + DIFFICULTY[3]] = { rows: 10, cols: 10 }; b = []; b["difficulty_" + DIFFICULTY[0]] = []; b["difficulty_" + DIFFICULTY[1]] = []; b["difficulty_" + DIFFICULTY[2]] = []; b["difficulty_" + DIFFICULTY[3]] = []; b["difficulty_" + DIFFICULTY[0]][0] = [0, 0, 212, 279]; b["difficulty_" + DIFFICULTY[0]][1] = [146, 0, 334, 212]; b["difficulty_" + DIFFICULTY[0]][2] = [412, 0, 220, 272 ]; b["difficulty_" + DIFFICULTY[0]][3] = [567, 0, 273, 212]; b["difficulty_" + DIFFICULTY[0]][4] = [0, 205, 277, 216]; b["difficulty_" + DIFFICULTY[0]][5] = [209, 152, 213, 333]; b["difficulty_" + DIFFICULTY[0]][6] = [356, 208, 341, 214]; b["difficulty_" + DIFFICULTY[0]][7] = [628, 144, 212, 341]; b["difficulty_" + DIFFICULTY[0]][8] = [0, 353, 215, 340]; b["difficulty_" + DIFFICULTY[0]][9] = [146, 411, 339, 219]; b["difficulty_" + DIFFICULTY[0]][10] = [412, 347, 220, 346]; b["difficulty_" + DIFFICULTY[0]][11] = [565, 418, 275, 216]; b["difficulty_" + DIFFICULTY[0]][12] = [0, 628, 276, 212]; b["difficulty_" + DIFFICULTY[0]][13] = [209, 570, 215, 270]; b["difficulty_" + DIFFICULTY[0]][14] = [353, 626, 342, 214]; b["difficulty_" + DIFFICULTY[0]][15] = [628, 566, 212, 274]; b["difficulty_" + DIFFICULTY[1]][0] = [0, 0, 143, 187]; b["difficulty_" + DIFFICULTY[1]][1] = [98, 0, 225, 142]; b["difficulty_" + DIFFICULTY[1]][2] = [277, 0, 149, 182]; b["difficulty_" + DIFFICULTY[1]][3] = [383, 0, 234, 142]; b["difficulty_" + DIFFICULTY[1]][4] = [564, 0, 144, 184]; b["difficulty_" + DIFFICULTY[1]][5] = [657, 0, 183, 142]; b["difficulty_" + DIFFICULTY[1]][6] = [0, 137, 187, 145]; b["difficulty_" + DIFFICULTY[1]][7] = [140, 102, 144, 222]; b["difficulty_" + DIFFICULTY[1]][8] = [239, 139, 231, 143]; b["difficulty_" + DIFFICULTY[1]][9] = [420, 96, 145, 228]; b["difficulty_" + DIFFICULTY[1]][10] = [514, 139, 230, 144]; b["difficulty_" + DIFFICULTY[1]][11] = [703, 97, 137, 223]; b["difficulty_" + DIFFICULTY[1]][12] = [0, 236, 145, 227]; b["difficulty_" + DIFFICULTY[1]][13] = [98, 274, 228, 147]; b["difficulty_" + DIFFICULTY[1]][14] = [276, 231, 149, 233]; b["difficulty_" + DIFFICULTY[1]][15] = [380, 279, 237, 145]; b["difficulty_" + DIFFICULTY[1]][16] = [565, 235, 142, 229]; b["difficulty_" + DIFFICULTY[1]][17] = [662, 274, 178, 151]; b["difficulty_" + DIFFICULTY[1]][18] = [0, 419, 186, 142]; b["difficulty_" + DIFFICULTY[1]][19] = [140, 380, 145, 218]; b["difficulty_" + DIFFICULTY[1]][20] = [237, 417, 230, 144]; b["difficulty_" + DIFFICULTY[1]][21] = [420, 377, 146, 234]; b["difficulty_" + DIFFICULTY[1]][22] = [516, 419, 236, 143]; b["difficulty_" + DIFFICULTY[1]][23] = [703, 378, 137, 224]; b["difficulty_" + DIFFICULTY[1]][24] = [0, 506, 143, 241]; b["difficulty_" + DIFFICULTY[1]][25] = [98, 558, 225, 144 ]; b["difficulty_" + DIFFICULTY[1]][26] = [276, 509, 149, 233]; b["difficulty_" + DIFFICULTY[1]][27] = [381, 559, 240, 142]; b["difficulty_" + DIFFICULTY[1]][28] = [564, 528, 143, 214]; b["difficulty_" + DIFFICULTY[1]][29] = [661, 559, 179, 143]; b["difficulty_" + DIFFICULTY[1]][30] = [0, 697, 187, 143]; b["difficulty_" + DIFFICULTY[1]][31] = [141, 662, 143, 178]; b["difficulty_" + DIFFICULTY[1]][32] = [239, 699, 231, 141]; b["difficulty_" + DIFFICULTY[1]][33] = [420, 656, 143, 184]; b["difficulty_" + DIFFICULTY[1]][34] = [517, 699, 231, 141]; b["difficulty_" + DIFFICULTY[1]][35] = [704, 655, 136, 185]; b["difficulty_" + DIFFICULTY[2]][0] = [0, 0, 107, 141]; b["difficulty_" + DIFFICULTY[2]][1] = [73, 0, 168, 107]; b["difficulty_" + DIFFICULTY[2]][2] = [206, 0, 111, 137]; b["difficulty_" + DIFFICULTY[2]][3] = [284, 0, 175, 106]; b["difficulty_" + DIFFICULTY[2]][4] = [419, 0, 108, 138]; b["difficulty_" + DIFFICULTY[2]][5] = [489, 0, 175, 106]; b["difficulty_" + DIFFICULTY[2]][6] = [628, 0, 108, 137]; b["difficulty_" + DIFFICULTY[2]][7] = [701, 0, 139, 106]; b["difficulty_" + DIFFICULTY[2]][8] = [0, 103, 139, 108]; b["difficulty_" + DIFFICULTY[2]][9] = [104, 76, 108, 166 ]; b["difficulty_" + DIFFICULTY[2]][10] = [178, 103, 171, 108]; b["difficulty_" + DIFFICULTY[2]][11] = [314, 72, 108, 170]; b["difficulty_" + DIFFICULTY[2]][12] = [382, 104, 173, 108]; b["difficulty_" + DIFFICULTY[2]][13] = [524, 73, 107, 167]; b["difficulty_" + DIFFICULTY[2]][14] = [595, 103, 177, 110]; b["difficulty_" + DIFFICULTY[2]][15] = [734, 67, 106, 173]; b["difficulty_" + DIFFICULTY[2]][16] = [0, 176, 108, 172]; b["difficulty_" + DIFFICULTY[2]][17] = [73, 205, 171, 111]; b["difficulty_" + DIFFICULTY[2]][18] = [206, 173, 111, 174]; b["difficulty_" + DIFFICULTY[2]][19] = [283, 208, 176, 110]; b["difficulty_" + DIFFICULTY[2]][20] = [420, 176, 106, 172]; b["difficulty_" + DIFFICULTY[2]][21] = [493, 206, 171, 112]; b["difficulty_" + DIFFICULTY[2]][22] = [629, 176, 108, 172]; b["difficulty_" + DIFFICULTY[2]][23] = [699, 206, 141, 111]; b["difficulty_" + DIFFICULTY[2]][24] = [0, 314, 139, 108]; b["difficulty_" + DIFFICULTY[2]][25] = [105, 285, 108, 165]; b["difficulty_" + DIFFICULTY[2]][26] = [176, 312, 172, 110]; b["difficulty_" + DIFFICULTY[2]][27] = [314, 283, 108, 176]; b["difficulty_" + DIFFICULTY[2]][28] = [383, 315, 177, 107]; b["difficulty_" + DIFFICULTY[2]][29] = [524, 284, 107, 169]; b["difficulty_" + DIFFICULTY[2]][30] = [607, 314, 161, 109]; b["difficulty_" + DIFFICULTY[2]][31] = [734, 284, 106, 168]; b["difficulty_" + DIFFICULTY[2]][32] = [0, 381, 108, 180]; b["difficulty_" + DIFFICULTY[2]][33] = [74, 420, 166, 107]; b["difficulty_" + DIFFICULTY[2]][34] = [206, 383, 111, 174]; b["difficulty_" + DIFFICULTY[2]][35] = [284, 420, 178, 106]; b["difficulty_" + DIFFICULTY[2]][36] = [419, 398, 108, 159]; b["difficulty_" + DIFFICULTY[2]][37] = [492, 420, 172, 107]; b["difficulty_" + DIFFICULTY[2]][38] = [628, 393, 110, 165 ]; b["difficulty_" + DIFFICULTY[2]][39] = [696, 420, 144, 107]; b["difficulty_" + DIFFICULTY[2]][40] = [0, 524, 141, 108]; b["difficulty_" + DIFFICULTY[2]][41] = [105, 497, 107, 166]; b["difficulty_" + DIFFICULTY[2]][42] = [178, 524, 171, 108]; b["difficulty_" + DIFFICULTY[2]][43] = [314, 492, 108, 171]; b["difficulty_" + DIFFICULTY[2]][44] = [385, 524, 172, 111]; b["difficulty_" + DIFFICULTY[2]][45] = [524, 492, 108, 171]; b["difficulty_" + DIFFICULTY[2]][46] = [594, 524, 181, 111]; b["difficulty_" + DIFFICULTY[2]][47] = [735, 493, 105, 172]; b["difficulty_" + DIFFICULTY[2]][48] = [0, 598, 108, 171]; b["difficulty_" + DIFFICULTY[2]][49] = [73, 626, 171, 112]; b["difficulty_" + DIFFICULTY[2]][50] = [206, 594, 111, 178]; b["difficulty_" + DIFFICULTY[2]][51] = [283, 629, 174, 108]; b["difficulty_" + DIFFICULTY[2]][52] = [419, 601, 108, 168]; b["difficulty_" + DIFFICULTY[2]][53] = [496, 630, 167, 107]; b["difficulty_" + DIFFICULTY[2]][54] = [626, 598, 112, 168]; b["difficulty_" + DIFFICULTY[2]][55] = [696, 629, 144, 108]; b["difficulty_" + DIFFICULTY[2]][56] = [0, 735, 139, 105]; b["difficulty_" + DIFFICULTY[2]][57] = [105, 703, 108, 137]; b["difficulty_" + DIFFICULTY[2]][58] = [177, 734, 171, 106]; b["difficulty_" + DIFFICULTY[2]][59] = [314, 703, 108, 137]; b["difficulty_" + DIFFICULTY[2]][60] = [385, 734, 175, 106]; b["difficulty_" + DIFFICULTY[2]][61] = [523, 709, 109, 131]; b["difficulty_" + DIFFICULTY[2]][62] = [597, 734, 173, 106]; b["difficulty_" + DIFFICULTY[2]][63] = [735, 698, 105, 142]; b["difficulty_" + DIFFICULTY[3]][0] = [0, 0, 85, 112]; b["difficulty_" + DIFFICULTY[3]][1] = [58, 0, 134, 85]; b["difficulty_" + DIFFICULTY[3]][2] = [165, 0, 88, 109]; b["difficulty_" + DIFFICULTY[3]][3] = [227, 0, 140, 85]; b["difficulty_" + DIFFICULTY[3]][4] = [336, 0, 85, 110]; b["difficulty_" + DIFFICULTY[3]][5] = [391, 0, 140, 85]; b["difficulty_" + DIFFICULTY[3]][6] = [503, 0, 85, 110]; b["difficulty_" + DIFFICULTY[3]][7] = [561, 0, 137, 86]; b["difficulty_" + DIFFICULTY[3]][8] = [671, 0, 87, 110]; b["difficulty_" + DIFFICULTY[3]][9] = [728, 0, 112, 85]; b["difficulty_" + DIFFICULTY[3]][10] = [0, 83, 111, 86]; b["difficulty_" + DIFFICULTY[3]][11] = [84, 62, 85, 132]; b["difficulty_" + DIFFICULTY[3]][12] = [143, 83, 137, 86]; b["difficulty_" + DIFFICULTY[3]][13] = [252, 58, 85, 137]; b["difficulty_" + DIFFICULTY[3]][14] = [306, 84, 137, 85]; b["difficulty_" + DIFFICULTY[3]][15] = [419, 59, 85, 133]; b["difficulty_" + DIFFICULTY[3]][16] = [476, 84, 134, 85]; b["difficulty_" + DIFFICULTY[3]][17] = [587, 59, 88, 135]; b["difficulty_" + DIFFICULTY[3]][18] = [646, 84, 133, 85]; b["difficulty_" + DIFFICULTY[3]][19] = [756, 59, 84, 132]; b["difficulty_" + DIFFICULTY[3]][20] = [0, 142, 86, 136]; b["difficulty_" + DIFFICULTY[3]][21] = [59, 166, 135, 87]; b["difficulty_" + DIFFICULTY[3]][22] = [165, 140, 89, 138]; b["difficulty_" + DIFFICULTY[3]][23] = [227, 168, 140, 86]; b["difficulty_" + DIFFICULTY[3]][24] = [336, 141, 85, 137]; b["difficulty_" + DIFFICULTY[3]][25] = [394, 165, 137, 90]; b["difficulty_" + DIFFICULTY[3]][26] = [503, 142, 86, 136]; b["difficulty_" + DIFFICULTY[3]][27] = [562, 165, 139, 88]; b["difficulty_" + DIFFICULTY[3]][28] = [671, 143, 87, 136]; b["difficulty_" + DIFFICULTY[3]][29] = [731, 165, 109, 88]; b["difficulty_" + DIFFICULTY[3]][30] = [0, 252, 110, 84]; b["difficulty_" + DIFFICULTY[3]][31] = [83, 229, 87, 131]; b["difficulty_" + DIFFICULTY[3]][32] = [142, 251, 136, 87]; b["difficulty_" + DIFFICULTY[3]][33] = [252, 227, 85, 140]; b["difficulty_" + DIFFICULTY[3]][34] = [307, 252, 142, 85]; b["difficulty_" + DIFFICULTY[3]][35] = [419, 227, 85, 134]; b["difficulty_" + DIFFICULTY[3]][36] = [486, 252, 129, 85]; b["difficulty_" + DIFFICULTY[3]][37] = [586, 227, 87, 128]; b["difficulty_" + DIFFICULTY[3]][38] = [647, 252, 135, 85]; b["difficulty_" + DIFFICULTY[3]][39] = [756, 228, 84, 132]; b["difficulty_" + DIFFICULTY[3]][40] = [0, 304, 85, 144]; b["difficulty_" + DIFFICULTY[3]][41] = [58, 336, 134, 85]; b["difficulty_" + DIFFICULTY[3]][42] = [166, 307, 87, 138]; b["difficulty_" + DIFFICULTY[3]][43] = [228, 336, 141, 85]; b["difficulty_" + DIFFICULTY[3]][44] = [336, 318, 85, 128]; b["difficulty_" + DIFFICULTY[3]][45] = [394, 336, 136, 85]; b["difficulty_" + DIFFICULTY[3]][46] = [503, 314, 87, 133]; b["difficulty_" + DIFFICULTY[3]][47] = [563, 336, 128, 85]; b["difficulty_" + DIFFICULTY[3]][48] = [672, 310, 86, 135]; b["difficulty_" + DIFFICULTY[3]][49] = [730, 336, 110, 84]; b["difficulty_" + DIFFICULTY[3]][50] = [0, 419, 111, 86]; b["difficulty_" + DIFFICULTY[3]][51] = [84, 398, 85, 132]; b["difficulty_" + DIFFICULTY[3]][52] = [144, 420, 134, 85]; b["difficulty_" + DIFFICULTY[3]][53] = [252, 394, 85, 137]; b["difficulty_" + DIFFICULTY[3]][54] = [308, 420, 138, 88]; b["difficulty_" + DIFFICULTY[3]][55] = [419, 394, 87, 136]; b["difficulty_" + DIFFICULTY[3]][56] = [475, 420, 139, 88]; b["difficulty_" + DIFFICULTY[3]][57] = [587, 395, 87, 136]; b["difficulty_" + DIFFICULTY[3]][58] = [646, 418, 137, 90]; b["difficulty_" + DIFFICULTY[3]][59] = [757, 395, 83, 136]; b["difficulty_" + DIFFICULTY[3]][60] = [0, 478, 86, 136]; b["difficulty_" + DIFFICULTY[3]][61] = [59, 502, 135, 87]; b["difficulty_" + DIFFICULTY[3]][62] = [165, 476, 89, 138]; b["difficulty_" + DIFFICULTY[3]][63] = [227, 504, 139, 86]; b["difficulty_" + DIFFICULTY[3]][64] = [335, 481, 86, 133]; b["difficulty_" + DIFFICULTY[3]][65] = [397, 504, 133, 85]; b["difficulty_" + DIFFICULTY[3]][66] = [501, 479, 88, 135]; b["difficulty_" + DIFFICULTY[3]][67] = [565, 503, 136, 87]; b["difficulty_" + DIFFICULTY[3]][68] = [673, 481, 85, 133]; b["difficulty_" + DIFFICULTY[3]][69] = [734, 503, 106, 87]; b["difficulty_" + DIFFICULTY[3]][70] = [0, 588, 110, 85]; b["difficulty_" + DIFFICULTY[3]][71] = [83, 565, 87, 135]; b["difficulty_" + DIFFICULTY[3]][72] = [142, 587, 136, 87]; b["difficulty_" + DIFFICULTY[3]][73] = [252, 563, 85, 128]; b["difficulty_" + DIFFICULTY[3]][74] = [306, 588, 143, 85]; b["difficulty_" + DIFFICULTY[3]][75] = [419, 562, 87, 134]; b["difficulty_" + DIFFICULTY[3]][76] = [477, 587, 137, 86]; b["difficulty_" + DIFFICULTY[3]][77] = [588, 563, 86, 136]; b["difficulty_" + DIFFICULTY[3]][78] = [646, 588, 140, 85]; b["difficulty_" + DIFFICULTY[3]][79] = [757, 563, 83, 131]; b["difficulty_" + DIFFICULTY[3]][80] = [0, 645, 85, 139]; b["difficulty_" + DIFFICULTY[3]][81] = [58, 672, 134, 85]; b["difficulty_" + DIFFICULTY[3]][82] = [166, 646, 88, 135]; b["difficulty_" + DIFFICULTY[3]][83] = [228, 673, 139, 84]; b["difficulty_" + DIFFICULTY[3]][84] = [336, 646, 85, 135]; b["difficulty_" + DIFFICULTY[3]][85] = [391, 672, 140, 85]; b["difficulty_" + DIFFICULTY[3]][86] = [503, 646, 85, 137]; b["difficulty_" + DIFFICULTY[3]][87] = [561, 672, 137, 85]; b["difficulty_" + DIFFICULTY[3]][88] = [671, 646, 87, 141]; b["difficulty_" + DIFFICULTY[3]][89] = [728, 672, 112, 85]; b["difficulty_" + DIFFICULTY[3]][90] = [0, 755, 110, 85]; b["difficulty_" + DIFFICULTY[3]][91] = [85, 734, 84, 106]; b["difficulty_" + DIFFICULTY[3]][92] = [142, 756, 136, 84]; b["difficulty_" + DIFFICULTY[3]][93] = [252, 729, 85, 111]; b["difficulty_" + DIFFICULTY[3]][94] = [308, 755, 140, 85]; b["difficulty_" + DIFFICULTY[3]][95] = [419, 729, 86, 111]; b["difficulty_" + DIFFICULTY[3]][96] = [479, 756, 135, 84]; b["difficulty_" + DIFFICULTY[3]][97] = [587, 730, 86, 110]; b["difficulty_" + DIFFICULTY[3]][98] = [645, 756, 140, 84]; b["difficulty_" + DIFFICULTY[3]][99] = [755, 730, 85, 110]; a = []; a["difficulty_" + DIFFICULTY[0]] = []; a["difficulty_" + DIFFICULTY[1]] = []; a["difficulty_" + DIFFICULTY[2]] = []; a["difficulty_" + DIFFICULTY[3]] = []; a["difficulty_" + DIFFICULTY[0]][0] = { up: null, right: [180, 105], down: [87, 242], left: null }; a["difficulty_" + DIFFICULTY[0]][1] = { up: null, right: [303, 106], down: [164, 177], left: [32, 106] }; a["difficulty_" + DIFFICULTY[0]][2] = { up: null, right: [186, 115], down: [101, 239], left: [35, 103] }; a["difficulty_" + DIFFICULTY[0]][3] = { up: null, right: null, down: [190, 176], left: [30, 116] }; a["difficulty_" + DIFFICULTY[0]][4] = { up: [86, 41], right: [245, 118], down: [104, 179], left: null }; a["difficulty_" + DIFFICULTY[0]][5] = { up: [100, 28], right: [179, 148], down: [94, 300], left: [35, 170] }; a["difficulty_" + DIFFICULTY[0]][6] = { up: [156, 35], right: [307, 107], down: [181, 172], left: [34, 91] }; a["difficulty_" + DIFFICULTY[0]][7] = { up: [128, 34], right: null, down: [92, 306], left: [32, 170] }; a["difficulty_" + DIFFICULTY[0]][8] = { up: [100, 33], right: [179, 170], down: [91, 310], left: null }; a["difficulty_" + DIFFICULTY[0]][9] = { up: [160, 39], right: [305, 112], down: [181, 185], left: [34, 112] }; a["difficulty_" + DIFFICULTY[0]][10] = { up: [122, 32], right: [186, 187], down: [114, 311], left: [39, 175] }; a["difficulty_" + DIFFICULTY[0]][11] = { up: [154, 32], right: null, down: [181, 178], left: [32, 116] }; a["difficulty_" + DIFFICULTY[0]][12] = { up: [89, 33], right: [241, 118], down: null, left: null }; a["difficulty_" + DIFFICULTY[0]][13] = { up: [116, 27], right: [179, 150], down: null, left: [33, 173] }; a["difficulty_" + DIFFICULTY[0]][14] = { up: [171, 36], right: [309, 107], down: null, left: [36, 97] }; a["difficulty_" + DIFFICULTY[0]][15] = { up: [118, 33], right: null, down: null, left: [31, 169] }; a["difficulty_" + DIFFICULTY[1]][0] = { up: null, right: [120, 71], down: [59, 162], left: null }; a["difficulty_" + DIFFICULTY[1]][1] = { up: null, right: [203, 71], down: [110, 123], left: [23, 70] }; a["difficulty_" + DIFFICULTY[1]][2] = { up: null, right: [128, 78], down: [66, 161], left: [27, 68] }; a["difficulty_" + DIFFICULTY[1]][3] = { up: null, right: [209, 62], down: [125, 119], left: [20, 77] }; a["difficulty_" + DIFFICULTY[1]][4] = { up: null, right: [120, 57], down: [64, 162], left: [27, 61] }; a["difficulty_" + DIFFICULTY[1]][5] = { up: null, right: null, down: [119, 119], left: [25, 57] }; a["difficulty_" + DIFFICULTY[1]][6] = { up: [59, 25], right: [165, 79], down: [71, 121], left: null }; a["difficulty_" + DIFFICULTY[1]][7] = { up: [68, 20], right: [122, 97], down: [64, 197], left: [24, 114] }; a["difficulty_" + DIFFICULTY[1]][8] = { up: [107, 22], right: [207, 71], down: [124, 115], left: [22, 60] }; a["difficulty_" + DIFFICULTY[1]][9] = { up: [87, 23], right: [119, 114], down: [63, 204], left: [22, 114] }; a["difficulty_" + DIFFICULTY[1]][10] = { up: [115, 22], right: [210, 76], down: [129, 119], left: [25, 70] }; a["difficulty_" + DIFFICULTY[1]][11] = { up: [72, 22], right: null, down: [75, 200], left: [22, 121] }; a["difficulty_" + DIFFICULTY[1]][12] = { up: [70, 22], right: [124, 114], down: [60, 203], left: null }; a["difficulty_" + DIFFICULTY[1]][13] = { up: [110, 25], right: [204, 73], down: [121, 124], left: [23, 74 ] }; a["difficulty_" + DIFFICULTY[1]][14] = { up: [83, 24], right: [128, 126], down: [76, 207], left: [28, 116] }; a["difficulty_" + DIFFICULTY[1]][15] = { up: [105, 25], right: [211, 75], down: [125, 120], left: [22, 76] }; a["difficulty_" + DIFFICULTY[1]][16] = { up: [78, 22], right: [119, 105], down: [71, 205], left: [28, 121] }; a["difficulty_" + DIFFICULTY[1]][17] = { up: [113, 25], right: null, down: [105, 125], left: [23, 66] }; a["difficulty_" + DIFFICULTY[1]][18] = { up: [61, 23], right: [163, 79], down: [69, 112], left: null }; a["difficulty_" + DIFFICULTY[1]][19] = { up: [75, 22], right: [124, 100], down: [72, 195], left: [22, 116] }; a["difficulty_" + DIFFICULTY[1]][20] = { up: [115, 25], right: [208, 72], down: [119, 117], left: [24, 64] }; a["difficulty_" + DIFFICULTY[1]][21] = { up: [81, 24], right: [119, 117], down: [76, 206], left: [23, 109] }; a["difficulty_" + DIFFICULTY[1]][22] = { up: [120, 24], right: [212, 82], down: [125, 126], left: [25, 73] }; a["difficulty_" + DIFFICULTY[1]][23] = { up: [64, 21], right: null, down: [68, 200], left: [24, 120] }; a["difficulty_" + DIFFICULTY[1]][24] = { up: [69, 26], right: [121, 120], down: [56, 214], left: null }; a["difficulty_" + DIFFICULTY[1]][25] = { up: [112, 24], right: [202, 72], down: [112, 122], left: [22, 71] }; a["difficulty_" + DIFFICULTY[1]][26] = { up: [77, 24], right: [128, 127], down: [66, 211], left: [26, 117] }; a["difficulty_" + DIFFICULTY[1]][27] = { up: [119, 27], right: [215, 60], down: [129, 115], left: [22, 78] }; a["difficulty_" + DIFFICULTY[1]][28] = { up: [74, 18], right: [120, 86], down: [82, 190], left: [31, 92] }; a["difficulty_" + DIFFICULTY[1]][29] = { up: [110, 19], right: null, down: [117, 120], left: [24, 55] }; a["difficulty_" + DIFFICULTY[1]][30] = { up: [59, 27], right: [164, 80], down: null, left: null }; a["difficulty_" + DIFFICULTY[1]][31] = { up: [70, 20], right: [121, 98], down: null, left: [23, 115] }; a["difficulty_" + DIFFICULTY[1]][32] = { up: [106, 22], right: [208, 70], down: null, left: [22, 60] }; a["difficulty_" + DIFFICULTY[1]][33] = { up: [87, 22], right: [119, 106], down: null, left: [22, 113] }; a["difficulty_" + DIFFICULTY[1]][34] = { up: [127, 22], right: [209, 80], down: null, left: [23, 62] }; a["difficulty_" + DIFFICULTY[1]][35] = { up: [72, 22], right: null, down: null, left: [22, 121] }; a["difficulty_" + DIFFICULTY[2]][0] = { up: null, right: [89, 51], down: [45, 121 ], left: null }; a["difficulty_" + DIFFICULTY[2]][1] = { up: null, right: [151, 53], down: [84, 90], left: [19, 53] }; a["difficulty_" + DIFFICULTY[2]][2] = { up: null, right: [95, 57], down: [53, 118], left: [18, 53] }; a["difficulty_" + DIFFICULTY[2]][3] = { up: null, right: [156, 44], down: [96, 89], left: [16, 58] }; a["difficulty_" + DIFFICULTY[2]][4] = { up: null, right: [89, 42], down: [48, 120], left: [21, 44] }; a["difficulty_" + DIFFICULTY[2]][5] = { up: null, right: [159, 56], down: [87, 89], left: [21, 41] }; a["difficulty_" + DIFFICULTY[2]][6] = { up: null, right: [88, 50], down: [49, 117 ], left: [18, 57] }; a["difficulty_" + DIFFICULTY[2]][7] = { up: null, right: null, down: [81, 84], left: [18, 52] }; a["difficulty_" + DIFFICULTY[2]][8] = { up: [44, 20], right: [121, 58], down: [53, 89], left: null }; a["difficulty_" + DIFFICULTY[2]][9] = { up: [51, 15], right: [91, 73], down: [49, 147], left: [18, 85] }; a["difficulty_" + DIFFICULTY[2]][10] = { up: [80, 18], right: [154, 54], down: [90, 87], left: [17, 45] }; a["difficulty_" + DIFFICULTY[2]][11] = { up: [65, 18], right: [85, 84], down: [47, 154], left: [18, 85] }; a["difficulty_" + DIFFICULTY[2]][12] = { up: [86, 18], right: [157, 58 ], down: [97, 89], left: [18, 51] }; a["difficulty_" + DIFFICULTY[2]][13] = { up: [53, 16], right: [87, 77], down: [53, 148], left: [16, 90] }; a["difficulty_" + DIFFICULTY[2]][14] = { up: [82, 19], right: [158, 48], down: [93, 92], left: [16, 48] }; a["difficulty_" + DIFFICULTY[2]][15] = { up: [47, 17], right: null, down: [53, 155], left: [20, 83] }; a["difficulty_" + DIFFICULTY[2]][16] = { up: [52, 18], right: [90, 86], down: [44, 153], left: null }; a["difficulty_" + DIFFICULTY[2]][17] = { up: [80, 21], right: [153, 56], down: [90, 95], left: [18, 56] }; a["difficulty_" + DIFFICULTY[2]][18] = { up: [61, 19], right: [94, 94], down: [57, 156], left: [20, 88] }; a["difficulty_" + DIFFICULTY[2]][19] = { up: [78, 17], right: [158, 57], down: [93, 91], left: [18, 59] }; a["difficulty_" + DIFFICULTY[2]][20] = { up: [59, 19], right: [90, 80], down: [53, 152], left: [22, 90] }; a["difficulty_" + DIFFICULTY[2]][21] = { up: [84, 18], right: [155, 64], down: [79, 94], left: [17, 50] }; a["difficulty_" + DIFFICULTY[2]][22] = { up: [59, 19], right: [89, 80], down: [54, 153], left: [17, 93] }; a["difficulty_" + DIFFICULTY[2]][23] = { up: [87, 18], right: null, down: [82, 94], left: [20, 50] }; a["difficulty_" + DIFFICULTY[2]][24] = { up: [44, 18], right: [123, 60], down: [50, 87], left: null }; a["difficulty_" + DIFFICULTY[2]][25] = { up: [58, 15], right: [91, 76], down: [54, 150], left: [16, 87] }; a["difficulty_" + DIFFICULTY[2]][26] = { up: [86, 16], right: [156, 55], down: [87, 90], left: [20, 48] }; a["difficulty_" + DIFFICULTY[2]][27] = { up: [61, 16], right: [89, 88], down: [58, 155], left: [17, 83] }; a["difficulty_" + DIFFICULTY[2]][28] = { up: [90, 18], right: [159, 59], down: [92, 93], left: [17, 56] }; a["difficulty_" + DIFFICULTY[2]][29] = { up: [48, 16], right: [96, 89], down: [48, 152], left: [17, 90] }; a["difficulty_" + DIFFICULTY[2]][30] = { up: [78, 16], right: [146, 44], down: [76, 92], left: [14, 59] }; a["difficulty_" + DIFFICULTY[2]][31] = { up: [50, 16], right: null, down: [55, 150], left: [18, 74] }; a["difficulty_" + DIFFICULTY[2]][32] = { up: [54, 17], right: [91, 90], down: [42, 161], left: null }; a["difficulty_" + DIFFICULTY[2]][33] = { up: [83, 18], right: [150, 53], down: [83, 90], left: [17, 53] }; a["difficulty_" + DIFFICULTY[2]][34] = { up: [58, 17], right: [96, 96], down: [52, 156], left: [18, 88] }; a["difficulty_" + DIFFICULTY[2]][35] = { up: [89, 19], right: [158, 45 ], down: [96, 88], left: [17, 59] }; a["difficulty_" + DIFFICULTY[2]][36] = { up: [56, 11], right: [91, 62], down: [62, 142], left: [23, 66] }; a["difficulty_" + DIFFICULTY[2]][37] = { up: [82, 18], right: [155, 59], down: [86, 89], left: [19, 41] }; a["difficulty_" + DIFFICULTY[2]][38] = { up: [55, 14], right: [87, 78], down: [64, 145], left: [20, 84] }; a["difficulty_" + DIFFICULTY[2]][39] = { up: [92, 18], right: null, down: [92, 92], left: [19, 52] }; a["difficulty_" + DIFFICULTY[2]][40] = { up: [45, 19], right: [125, 58], down: [52, 91], left: null }; a["difficulty_" + DIFFICULTY[2]][41] = { up: [51, 13], right: [90, 70], down: [48, 146], left: [18, 85] }; a["difficulty_" + DIFFICULTY[2]][42] = { up: [82, 17], right: [154, 54], down: [89, 86], left: [20, 45] }; a["difficulty_" + DIFFICULTY[2]][43] = { up: [66, 18], right: [90, 78], down: [46, 154], left: [17, 85] }; a["difficulty_" + DIFFICULTY[2]][44] = { up: [95, 16], right: [155, 58], down: [88, 92], left: [20, 47] }; a["difficulty_" + DIFFICULTY[2]][45] = { up: [54, 18], right: [89, 80], down: [45, 153], left: [19, 90] }; a["difficulty_" + DIFFICULTY[2]][46] = { up: [96, 16], right: [162, 56], down: [90, 92], left: [18, 47] }; a["difficulty_" + DIFFICULTY[2]][47] = { up: [52, 17], right: null, down: [45, 152], left: [22, 86] }; a["difficulty_" + DIFFICULTY[2]][48] = { up: [52, 18], right: [91, 85], down: [44, 153], left: null }; a["difficulty_" + DIFFICULTY[2]][49] = { up: [80, 22], right: [154, 56], down: [85, 94], left: [18, 56] }; a["difficulty_" + DIFFICULTY[2]][50] = { up: [63, 19], right: [96, 94], down: [58, 162], left: [19, 89] }; a["difficulty_" + DIFFICULTY[2]][51] = { up: [78, 16], right: [156, 50], down: [87, 88], left: [16, 59] }; a["difficulty_" + DIFFICULTY[2]][52] = { up: [54, 17], right: [93, 84], down: [54, 150], left: [20, 78 ] }; a["difficulty_" + DIFFICULTY[2]][53] = { up: [73, 19], right: [150, 58], down: [83, 92], left: [17, 55] }; a["difficulty_" + DIFFICULTY[2]][54] = { up: [56, 20], right: [92, 81], down: [63, 150], left: [20, 90] }; a["difficulty_" + DIFFICULTY[2]][55] = { up: [87, 21], right: null, down: [96, 85], left: [21, 50] }; a["difficulty_" + DIFFICULTY[2]][56] = { up: [45, 16], right: [122, 58], down: null, left: null }; a["difficulty_" + DIFFICULTY[2]][57] = { up: [52, 18], right: [91, 78], down: null, left: [16, 88] }; a["difficulty_" + DIFFICULTY[2]][58] = { up: [88, 23], right: [154, 53], down: null, left: [18, 46] }; a["difficulty_" + DIFFICULTY[2]][59] = { up: [54, 18], right: [89, 79], down: null, left: [16, 83] }; a["difficulty_" + DIFFICULTY[2]][60] = { up: [87, 18], right: [157, 63], down: null, left: [18, 41] }; a["difficulty_" + DIFFICULTY[2]][61] = { up: [59, 13], right: [91, 77], down: null, left: [19, 87] }; a["difficulty_" + DIFFICULTY[2]][62] = { up: [91, 18], right: [158, 61], down: null, left: [18, 53] }; a["difficulty_" + DIFFICULTY[2]][63] = { up: [56, 18], right: null, down: null, left: [17, 98] }; a["difficulty_" + DIFFICULTY[3]][0] = { up: null, right: [72, 41], down: [33, 96 ], left: null }; a["difficulty_" + DIFFICULTY[3]][1] = { up: null, right: [120, 42], down: [66, 72], left: [12, 42] }; a["difficulty_" + DIFFICULTY[3]][2] = { up: null, right: [75, 46], down: [39, 96], left: [14, 42] }; a["difficulty_" + DIFFICULTY[3]][3] = { up: null, right: [123, 36], down: [75, 70], left: [13, 47] }; a["difficulty_" + DIFFICULTY[3]][4] = { up: null, right: [71, 32], down: [38, 95], left: [14, 36] }; a["difficulty_" + DIFFICULTY[3]][5] = { up: null, right: [126, 47], down: [70, 69], left: [14, 33] }; a["difficulty_" + DIFFICULTY[3]][6] = { up: null, right: [71, 35], down: [37, 95 ], left: [14, 45] }; a["difficulty_" + DIFFICULTY[3]][7] = { up: null, right: [123, 41], down: [68, 71], left: [13, 35] }; a["difficulty_" + DIFFICULTY[3]][8] = { up: null, right: [72, 33], down: [38, 95], left: [14, 40] }; a["difficulty_" + DIFFICULTY[3]][9] = { up: null, right: null, down: [70, 70], left: [14, 34] }; a["difficulty_" + DIFFICULTY[3]][10] = { up: [35, 15], right: [96, 47], down: [42, 72], left: null }; a["difficulty_" + DIFFICULTY[3]][11] = { up: [38, 12], right: [72, 57], down: [38, 118], left: [14, 66] }; a["difficulty_" + DIFFICULTY[3]][12] = { up: [64, 12], right: [123, 43], down: [72, 70], left: [13, 35] }; a["difficulty_" + DIFFICULTY[3]][13] = { up: [51, 14], right: [69, 68], down: [36, 122], left: [13, 68] }; a["difficulty_" + DIFFICULTY[3]][14] = { up: [68, 14], right: [125, 44], down: [76, 71], left: [14, 39] }; a["difficulty_" + DIFFICULTY[3]][15] = { up: [42, 14], right: [71, 60], down: [42, 119], left: [11, 70] }; a["difficulty_" + DIFFICULTY[3]][16] = { up: [65, 12], right: [122, 46], down: [73, 70], left: [13, 35] }; a["difficulty_" + DIFFICULTY[3]][17] = { up: [40, 13], right: [72, 63], down: [43, 121], left: [13, 72] }; a["difficulty_" + DIFFICULTY[3]][18] = { up: [64, 13], right: [121, 38], down: [73, 71], left: [14, 38] }; a["difficulty_" + DIFFICULTY[3]][19] = { up: [42, 13], right: null, down: [41, 119], left: [12, 66] }; a["difficulty_" + DIFFICULTY[3]][20] = { up: [41, 14], right: [72, 68], down: [36, 123], left: null }; a["difficulty_" + DIFFICULTY[3]][21] = { up: [63, 14], right: [122, 44], down: [72, 72], left: [13, 43] }; a["difficulty_" + DIFFICULTY[3]][22] = { up: [50, 13], right: [76, 74], down: [44, 124], left: [15, 69] }; a["difficulty_" + DIFFICULTY[3]][23] = { up: [62, 14], right: [125, 47], down: [74, 72], left: [12, 47] }; a["difficulty_" + DIFFICULTY[3]][24] = { up: [47, 15], right: [71, 64], down: [42, 122], left: [16, 69] }; a["difficulty_" + DIFFICULTY[3]][25] = { up: [68, 14], right: [122, 51], down: [63, 76], left: [15, 39] }; a["difficulty_" + DIFFICULTY[3]][26] = { up: [47, 12], right: [73, 68], down: [43, 120], left: [13, 74] }; a["difficulty_" + DIFFICULTY[3]][27] = { up: [68, 15], right: [122, 48], down: [63, 74], left: [14, 44] }; a["difficulty_" + DIFFICULTY[3]][28] = { up: [50, 13], right: [73, 61], down: [43, 121], left: [16, 69] }; a["difficulty_" + DIFFICULTY[3]][29] = { up: [66, 14], right: null, down: [62, 74], left: [12, 39 ] }; a["difficulty_" + DIFFICULTY[3]][30] = { up: [36, 13], right: [96, 45], down: [40, 67], left: null }; a["difficulty_" + DIFFICULTY[3]][31] = { up: [47, 11], right: [72, 60], down: [43, 118], left: [14, 70] }; a["difficulty_" + DIFFICULTY[3]][32] = { up: [68, 14], right: [123, 43], down: [69, 70], left: [14, 39] }; a["difficulty_" + DIFFICULTY[3]][33] = { up: [46, 13], right: [68, 70], down: [46, 122], left: [13, 66] }; a["difficulty_" + DIFFICULTY[3]][34] = { up: [71, 12], right: [126, 47], down: [73, 73], left: [15, 44] }; a["difficulty_" + DIFFICULTY[3]][35] = { up: [36, 14], right: [75, 69 ], down: [37, 120], left: [14, 71] }; a["difficulty_" + DIFFICULTY[3]][36] = { up: [60, 12], right: [114, 47], down: [60, 73], left: [9, 46] }; a["difficulty_" + DIFFICULTY[3]][37] = { up: [38, 14], right: [74, 60], down: [43, 117], left: [15, 73] }; a["difficulty_" + DIFFICULTY[3]][38] = { up: [67, 12], right: [122, 50], down: [70, 70], left: [13, 36] }; a["difficulty_" + DIFFICULTY[3]][39] = { up: [35, 11], right: null, down: [44, 118], left: [12, 73] }; a["difficulty_" + DIFFICULTY[3]][40] = { up: [40, 15], right: [71, 72], down: [33, 128], left: null }; a["difficulty_" + DIFFICULTY[3]][41] = { up: [67, 12], right: [120, 42], down: [67, 71], left: [13, 42] }; a["difficulty_" + DIFFICULTY[3]][42] = { up: [47, 14], right: [74, 74], down: [39, 124], left: [14, 71] }; a["difficulty_" + DIFFICULTY[3]][43] = { up: [69, 15], right: [125, 36], down: [74, 71], left: [14, 47] }; a["difficulty_" + DIFFICULTY[3]][44] = { up: [44, 10], right: [72, 50], down: [47, 115], left: [18, 54] }; a["difficulty_" + DIFFICULTY[3]][45] = { up: [63, 14], right: [123, 48], down: [68, 70], left: [14, 33] }; a["difficulty_" + DIFFICULTY[3]][46] = { up: [41, 12], right: [73, 59], down: [47, 117], left: [14, 71] }; a["difficulty_" + DIFFICULTY[3]][47] = { up: [66, 9], right: [118, 37], down: [68, 72], left: [13, 36] }; a["difficulty_" + DIFFICULTY[3]][48] = { up: [45, 14], right: [71, 63], down: [48, 120], left: [10, 62] }; a["difficulty_" + DIFFICULTY[3]][49] = { up: [70, 13], right: null, down: [68, 69], left: [14, 36] }; a["difficulty_" + DIFFICULTY[3]][50] = { up: [34, 16], right: [97, 47], down: [41, 73], left: null }; a["difficulty_" + DIFFICULTY[3]][51] = { up: [39, 12], right: [72, 56], down: [37, 118], left: [14, 66] }; a["difficulty_" + DIFFICULTY[3]][52] = { up: [62, 14], right: [121, 42], down: [71, 70], left: [13, 35 ] }; a["difficulty_" + DIFFICULTY[3]][53] = { up: [51, 14], right: [69, 63], down: [36, 122], left: [12, 68] }; a["difficulty_" + DIFFICULTY[3]][54] = { up: [75, 12], right: [125, 48], down: [70, 73], left: [14, 38] }; a["difficulty_" + DIFFICULTY[3]][55] = { up: [43, 12], right: [72, 64], down: [36, 121], left: [13, 73] }; a["difficulty_" + DIFFICULTY[3]][56] = { up: [75, 13], right: [125, 42], down: [72, 71], left: [14, 37] }; a["difficulty_" + DIFFICULTY[3]][57] = { up: [43, 12], right: [72, 59], down: [40, 120], left: [13, 67] }; a["difficulty_" + DIFFICULTY[3]][58] = { up: [75, 14], right: [124, 48 ], down: [70, 75], left: [14, 38] }; a["difficulty_" + DIFFICULTY[3]][59] = { up: [41, 13], right: null, down: [37, 121], left: [13, 70] }; a["difficulty_" + DIFFICULTY[3]][60] = { up: [42, 13], right: [72, 68], down: [36, 121], left: null }; a["difficulty_" + DIFFICULTY[3]][61] = { up: [64, 13], right: [122, 44], down: [71, 74], left: [13, 44] }; a["difficulty_" + DIFFICULTY[3]][62] = { up: [50, 14], right: [76, 73], down: [44, 125], left: [15, 69] }; a["difficulty_" + DIFFICULTY[3]][63] = { up: [63, 14], right: [123, 39], down: [73, 72], left: [13, 45] }; a["difficulty_" + DIFFICULTY[3]][64] = { up: [43, 12], right: [73, 66], down: [43, 119], left: [16, 62] }; a["difficulty_" + DIFFICULTY[3]][65] = { up: [59, 14], right: [119, 47], down: [70, 70], left: [13, 43] }; a["difficulty_" + DIFFICULTY[3]][66] = { up: [45, 13], right: [75, 62], down: [46, 120], left: [15, 69] }; a["difficulty_" + DIFFICULTY[3]][67] = { up: [61, 15], right: [122, 49], down: [70, 72], left: [12, 39] }; a["difficulty_" + DIFFICULTY[3]][68] = { up: [42, 12], right: [72, 60], down: [41, 119], left: [15, 71] }; a["difficulty_" + DIFFICULTY[3]][69] = { up: [60, 15], right: null, down: [68, 71], left: [11, 39] }; a["difficulty_" + DIFFICULTY[3]][70] = { up: [35, 14], right: [97, 47], down: [46, 69], left: null }; a["difficulty_" + DIFFICULTY[3]][71] = { up: [47, 11], right: [72, 59], down: [36, 121], left: [13, 68] }; a["difficulty_" + DIFFICULTY[3]][72] = { up: [68, 13], right: [123, 43], down: [75, 73], left: [14, 38] }; a["difficulty_" + DIFFICULTY[3]][73] = { up: [48, 14], right: [69, 58], down: [47, 117], left: [13, 67] }; a["difficulty_" + DIFFICULTY[3]][74] = { up: [73, 12], right: [129, 49], down: [70, 69], left: [18, 33] }; a["difficulty_" + DIFFICULTY[3]][75] = { up: [47, 13], right: [74, 67], down: [48, 122], left: [16, 77 ] }; a["difficulty_" + DIFFICULTY[3]][76] = { up: [68, 14], right: [125, 50], down: [64, 72], left: [14, 43] }; a["difficulty_" + DIFFICULTY[3]][77] = { up: [47, 14], right: [70, 62], down: [45, 122], left: [14, 74] }; a["difficulty_" + DIFFICULTY[3]][78] = { up: [70, 13], right: [124, 50], down: [64, 70], left: [14, 37] }; a["difficulty_" + DIFFICULTY[3]][79] = { up: [46, 13], right: null, down: [44, 120], left: [15, 75] }; a["difficulty_" + DIFFICULTY[3]][80] = { up: [47, 15], right: [72, 69], down: [35, 123], left: null }; a["difficulty_" + DIFFICULTY[3]][81] = { up: [62, 16], right: [120, 42 ], down: [72, 71], left: [14, 42] }; a["difficulty_" + DIFFICULTY[3]][82] = { up: [51, 14], right: [75, 72], down: [38, 122], left: [15, 68] }; a["difficulty_" + DIFFICULTY[3]][83] = { up: [70, 10], right: [122, 42], down: [71, 69], left: [12, 46] }; a["difficulty_" + DIFFICULTY[3]][84] = { up: [38, 14], right: [70, 75], down: [43, 120], left: [16, 69] }; a["difficulty_" + DIFFICULTY[3]][85] = { up: [74, 14], right: [126, 37], down: [75, 70], left: [15, 49] }; a["difficulty_" + DIFFICULTY[3]][86] = { up: [37, 12], right: [71, 73], down: [47, 123], left: [15, 62] }; a["difficulty_" + DIFFICULTY[3]][87] = { up: [70, 15], right: [123, 42], down: [74, 71], left: [14, 47] }; a["difficulty_" + DIFFICULTY[3]][88] = { up: [39, 13], right: [71, 75], down: [43, 125], left: [14, 68] }; a["difficulty_" + DIFFICULTY[3]][89] = { up: [74, 14], right: null, down: [74, 71], left: [14, 50] }; a["difficulty_" + DIFFICULTY[3]][90] = { up: [35, 16], right: [97, 46], down: null, left: null }; a["difficulty_" + DIFFICULTY[3]][91] = { up: [46, 12], right: [70, 58], down: null, left: [13, 68] }; a["difficulty_" + DIFFICULTY[3]][92] = { up: [65, 14], right: [123, 42], down: null, left: [14, 36] }; a["difficulty_" + DIFFICULTY[3]][93] = { up: [48, 14], right: [72, 60], down: null, left: [14, 68] }; a["difficulty_" + DIFFICULTY[3]][94] = { up: [70, 14], right: [127, 50], down: null, left: [14, 32] }; a["difficulty_" + DIFFICULTY[3]][95] = { up: [47, 13], right: [73, 68], down: null, left: [15, 76] }; a["difficulty_" + DIFFICULTY[3]][96] = { up: [71, 14], right: [123, 48], down: null, left: [13, 42] }; a["difficulty_" + DIFFICULTY[3]][97] = { up: [48, 14], right: [71, 62], down: null, left: [14, 72] }; a["difficulty_" + DIFFICULTY[3]][98] = { up: [70, 18], right: [126, 50], down: null, left: [14, 38] }; a["difficulty_" + DIFFICULTY[3]][99] = { up: [47, 13], right: null, down: null, left: [16, 75] } }; this.getPieces = function(e) { return b["difficulty_" + e] }; this.getPieceJoints = function(e) { return a["difficulty_" + e] }; this.getPieceSize = function(e) { return c["num_" + e] }; this._init() } function CPiece(c, b, a, e, d, f, g, h, l, n, m) { var u, p, z, q, C, A, v, k, w, y, t, x, I, B, P, F, O, G; this._init = function(E, J, Q, W, r, X, Y, U, K, D) { A = C = q = !1; v = Y; w = r; k = 0; ENABLE_ROT_PIECE && (k = PIECE_ROTATIONS[Math.floor(Math.random() * PIECE_ROTATIONS.length)]); F = X; x = []; G = new createjs.Container; G.x = E + Q / 2; G.y = J + W / 2; G.regX = Q / 2; G.regY = W / 2; G.cursor = "pointer"; aa.addChild(G); I = { x: G.x, y: G.y }; E = createBitmap(U); O = createSprite(D, "frame_" + v, 0, 0, Q, W); O.filters = [new createjs.AlphaMaskFilter(E.image)]; O.cache(0, 0, Q, W); G.addChild(O); Q = createBitmap(K); G.addChild(Q); this._initHitAreas(); y = []; y.push(G.on("mousedown", this._onPieceDown)); y.push(G.on("pressmove", this._onDragPiece)); y.push(G.on("pressup", this._onReleasePiece)) }; this.unload = function() { G.off("mousedown", y[0]); G.off("pressmove", y[1]); G.off("pressup", y[2]) }; this.reset = function(E) { G.alpha = 1; C = !1; k = E ? PIECE_ROTATIONS[Math.floor(Math.random() * PIECE_ROTATIONS.length)] : 0; this._initHitAreas(); x = []; this.moveTo(B) }; this._initHitAreas = function() { z = w * w; t = []; if (null !== F.up) { var E = F.up[0], J = new createjs.Shape; J.graphics.beginFill("rgba(255,0,0,0.3)").drawCircle(E, F.up[1], w); t[JOINT_UP] = { x: E, y: F.up[1], pointer: J } } else t[JOINT_UP] = null; null !== F.right ? (E = F.right[1], J = new createjs.Shape, J.graphics.beginFill("rgba(0,255,0,0.3)").drawCircle(F.right[0], E, w), t[JOINT_RIGHT] = { x: F.right[0], y: E, pointer: J }) : t[JOINT_RIGHT] = null; null !== F.down ? (E = F.down[0], J = new createjs.Shape, J.graphics.beginFill("rgba(0,0,255,0.3)").drawCircle(E, F.down[1], w), t[JOINT_DOWN] = { x: E, y: F.down[1], pointer: J }) : t[JOINT_DOWN] = null; null !== F.left ? (E = F.left[1], J = new createjs.Shape, J.graphics.beginFill("rgba(255,228,0,0.7)").drawCircle(F.left[0], E, w), t[JOINT_LEFT] = { x: F.left[0], y: E, pointer: J }) : t[JOINT_LEFT] = null }; this.moveTo = function(E) { B = E; createjs.Tween.get(G).to({ x: E.x, y: E.y, rotation: k }, 1E3, createjs.Ease.cubicOut).call(function() { q = !0; s_oInterface.enableGUI(!0) }) }; this.setStartingPosition = function() { G.x = I.x; G.y = I.y; q = !1 }; this.setRotation = function(E) { C || (G.rotation = E ? k : 0) }; this.fadeOut = function() { createjs.Tween.get(G).to({ alpha: 0 }, TIME_FADE_OUT_PIECES) }; this.snap = function(E, J) { G.x = I.x + E; G.y = I.y + J; return x }; this.checkCollision = function(E) { var J = this._updateHitAreaPosition(); return null !== E[JOINT_UP] && null !== J[JOINT_DOWN] && distance2(E[JOINT_UP], J[JOINT_DOWN]) < z ? { joint1: J[JOINT_DOWN].pointer, joint2: E[JOINT_UP].pointer, dir: JOINT_UP } : null !== E[JOINT_RIGHT] && null !== J[JOINT_LEFT] && distance2(E[JOINT_RIGHT], J[JOINT_LEFT]) < z ? { joint1: J[JOINT_LEFT].pointer, joint2: E[JOINT_RIGHT].pointer, dir: JOINT_RIGHT } : null !== E[JOINT_DOWN] && null !== J[JOINT_UP] && distance2(E[JOINT_DOWN], J[JOINT_UP]) < z ? { joint1: J[JOINT_UP].pointer, joint2: E[JOINT_DOWN].pointer, dir: JOINT_DOWN } : null !== E[JOINT_LEFT] && null !== J[JOINT_RIGHT] && distance2(E[JOINT_LEFT], J[JOINT_RIGHT]) < z ? { joint1: J[JOINT_RIGHT].pointer, joint2: E[JOINT_LEFT].pointer, dir: JOINT_LEFT } : null }; this._updateHitAreaPosition = function() { var E = []; E[JOINT_UP] = null !== t[JOINT_UP] ? { x: G.x - G.regX + t[JOINT_UP].x, y: G.y - G.regY + t[JOINT_UP].y, pointer: t[JOINT_UP].pointer } : null; E[JOINT_RIGHT] = null !== t[JOINT_RIGHT] ? { x: G.x - G.regX + t[JOINT_RIGHT].x, y: G.y - G.regY + t[JOINT_RIGHT].y, pointer: t[JOINT_RIGHT].pointer } : null; E[JOINT_DOWN] = null !== t[JOINT_DOWN] ? { x: G.x - G.regX + t[JOINT_DOWN].x, y: G.y - G.regY + t[JOINT_DOWN].y, pointer: t[JOINT_DOWN].pointer } : null; E[JOINT_LEFT] = null !== t[JOINT_LEFT] ? { x: G.x - G.regX + t[JOINT_LEFT].x, y: G.y - G.regY + t[JOINT_LEFT].y, pointer: t[JOINT_LEFT].pointer } : null; return E }; this.removeJoint = function(E) { for (var J in t) if (null !== t[J] && t[J].pointer === E) { G.removeChild(t[J].pointer); t[J] = null; break } }; this.setAttached = function(E) { C = E }; this.updateJointList = function(E) { x = E }; this.setDepth = function(E) { aa.setChildIndex(G, E) }; this._onPieceDown = function(E) { q && (u = E.stageX / s_iScaleFactor - G.x, p = E.stageY / s_iScaleFactor - G.y, P = { x: E.stageX / s_iScaleFactor, y: E.stageY / s_iScaleFactor }) }; this._onDragPiece = function(E) { if (q && void 0 !== P && !(10 > distance({ x: E.stageX / s_iScaleFactor, y: E.stageY / s_iScaleFactor }, P))) { var J = E.stageX / s_iScaleFactor - u; E = E.stageY / s_iScaleFactor - p; J < s_iOffsetX || J > CANVAS_WIDTH - s_iOffsetX || E < s_iOffsetY || E > CANVAS_HEIGHT - s_iOffsetY || (A = !0, G.x = J, G.y = E, s_oGame.draggingPiece(G.x, G.y, Z, x)) } }; this.draggedByOtherPiece = function(E, J, Q) { G.x = E + Q.x; G.y = J + Q.y }; this._onReleasePiece = function() { if (q) if (A) { A = !1; var E = Z._updateHitAreaPosition(); s_oGame.releasePiece(Z, E) } else !C && s_oInterface.isRotationActive() && (G.rotation += 45) }; this.getHitAreas = function() { return t }; this.getJoint = function(E) { return t[E].pointer }; this.getX = function() { return G.x }; this.getY = function() { return G.y }; this.getDiffX = function() { return G.x - I.x }; this.getDiffY = function() { return G.y - I.y }; this.getStartingX = function() { return I.x }; this.getStartingY = function() { return I.y }; this.getStartingPos = function() { return I }; this.getPos = function() { return { x: G.x, y: G.y } }; this.isAttached = function() { return C }; this.getIndex = function() { return v }; this.getAbsRotation = function() { return 0 === G.rotation % 360 ? 0 : G.rotation }; var Z = this; var aa = m; this._init(c, b, a, e, d, f, g, h, l, n) } function CChooseImagePanel() { var c, b, a, e, d, f, g, h, l, n = null, m = null, u, p, z, q, C, A, v, k; this._init = function() { h = 0; A = new createjs.Container; s_oStage.addChild(A); var w = createBitmap(s_oSpriteLibrary.getSprite("bg_game")); A.addChild(w); new CTLText(A, CANVAS_WIDTH / 2 - 500, 200, 1E3, 160, 80, "center", "#fff", PRIMARY_FONT, 1, 0, 0, TEXT_CHOOSE_IMAGE, !0, !0, !0, !1); w = s_oSpriteLibrary.getSprite("but_exit"); d = CANVAS_WIDTH - w.width / 2 - 10; f = w.height / 2 + 10; C = new CGfxButton(d, f, w, A); C.addEventListener(ON_MOUSE_UP, this._onExit, this); g = w.height; if (!1 === DISABLE_SOUND_MOBILE || !1 === s_bMobile) a = C.getX() - w.width, e = w.height / 2 + 10, v = new CToggle(a, e, s_oSpriteLibrary.getSprite("audio_icon"), s_bAudioActive, A), v.addEventListener(ON_MOUSE_UP, this._onAudioToggle, this); w = window.document; var y = w.documentElement; n = y.requestFullscreen || y.mozRequestFullScreen || y.webkitRequestFullScreen || y.msRequestFullscreen; m = w.exitFullscreen || w.mozCancelFullScreen || w.webkitExitFullscreen || w.msExitFullscreen; !1 === ENABLE_FULLSCREEN && (n = !1); n && screenfull.isEnabled && (w = s_oSpriteLibrary.getSprite("but_fullscreen"), c = w.width / 4 + 10, b = w.height / 2 + 4, k = new CToggle(c, b, w, s_bFullscreen, A), k.addEventListener(ON_MOUSE_UP, this._onFullscreenRelease, this)); this._checkBoundLimits(); l = []; w = Math.floor((CANVAS_WIDTH - 2 * EDGEBOARD_X - 160) / NUM_COLS_PAGE_LEVEL) / 2; for (var t = y = 0; t < NUM_COLS_PAGE_LEVEL; t++) l.push(y), y += 2 * w; u = []; this._createNewLevelPage(0, NUM_IMAGES); if (1 < u.length) { for (w = 1; w < u.length; w++) u[w].visible = !1; z = new CGfxButton(CANVAS_WIDTH / 2 + 670, CANVAS_HEIGHT / 2 + 30, s_oSpriteLibrary.getSprite("arrow_right"), A); z.addEventListener(ON_MOUSE_UP, this._onRight, this); q = new CGfxButton(CANVAS_WIDTH / 2 - 670, CANVAS_HEIGHT / 2 + 30, s_oSpriteLibrary.getSprite("arrow_left"), A); q.addEventListener(ON_MOUSE_UP, this._onLeft, this) } this.refreshButtonPos(s_iOffsetX, s_iOffsetY) }; this.unload = function() { !1 !== DISABLE_SOUND_MOBILE && !1 !== s_bMobile || v.unload(); n && screenfull.isEnabled && k.unload(); C.unload(); s_oStage.removeAllChildren(); s_oChooseImagePanel = null }; this.refreshButtonPos = function(w, y) { C.setPosition(d - w, f + y); !1 !== DISABLE_SOUND_MOBILE && !1 !== s_bMobile || v.setPosition(a - w, y + e); n && screenfull.isEnabled && k.setPosition(c + w, b + y) }; this.resetFullscreenBut = function() { n && screenfull.isEnabled && k.setActive(s_bFullscreen) }; this._checkBoundLimits = function() { for (var w = s_oSpriteLibrary.getSprite("but_level"), y = 0, t = CANVAS_HEIGHT - 2 * EDGEBOARD_Y - 2 * g, x = 0; y < t;) y += w.height + 20, x++; NUM_ROWS_PAGE_LEVEL > x && (NUM_ROWS_PAGE_LEVEL = x); t = y = 0; x = CANVAS_WIDTH - 2 * EDGEBOARD_X; for (w = s_oSpriteLibrary.getSprite("but_level"); t < x;) t += w.width / 2 + 5, y++; NUM_COLS_PAGE_LEVEL > y && (NUM_COLS_PAGE_LEVEL = y) }; this._createNewLevelPage = function(w, y) { var t = new createjs.Container; A.addChild(t); u.push(t); p = []; for (var x = 0, I = 0, B = 1, P = !1, F = w; F < y; F++) { var O = s_oSpriteLibrary.getSprite("image_" + (F + 1)), G = new CButLevel(l[x], I, O, "image_" + (F + 1), t); G.addEventListenerWithParams(ON_MOUSE_UP, this._onButLevelRelease, this, "image_" + (F + 1)); p.push(G); x++; if (x === l.length && F < y - 1 && (x = 0, I += O.height + 20, B++, B > NUM_ROWS_PAGE_LEVEL)) { P = !0; break } } t.x = CANVAS_WIDTH / 2; t.y = CANVAS_HEIGHT / 2 + 30; t.regX = t.getBounds().width / 2; t.regY = t.getBounds().height / 2; P && this._createNewLevelPage(F + 1, y) }; this._onButLevelRelease = function(w) { s_oChooseImagePanel.unload(); s_szImageSelected = w; s_oMain.gotoChooseDifficulty() }; this._onRight = function() { u[h].visible = !1; h++; h >= u.length && (h = 0); u[h].visible = !0 }; this._onLeft = function() { u[h].visible = !1; h--; 0 > h && (h = u.length - 1); u[h].visible = !0 }; this._onAudioToggle = function() { Howler.mute(s_bAudioActive); s_bAudioActive = !s_bAudioActive }; this._onFullscreenRelease = function() { s_bFullscreen ? m.call(window.document) : n.call(window.document.documentElement); sizeHandler() }; this._onExit = function() { s_oChooseImagePanel.unload(); s_oMain.gotoMenu() }; s_oChooseImagePanel = this; this._init() } var s_oChooseImagePanel = null; function CButLevel(c, b, a, e, d) { var f, g, h, l, n, m, u, p; this._init = function(q, C, A, v) { f = !1; l = []; n = []; v = s_oSpriteLibrary.getSprite("but_level"); u = new createjs.Container; u.x = q + v.width / 2; u.y = C + v.height / 2; u.regX = v.width / 2; u.regY = v.height / 2; u.cursor = "pointer"; z.addChild(u); q = createBitmap(v); u.addChild(q); p = createBitmap(A); p.scaleX = p.scaleY = .4; p.x = 80; p.y = 80; u.addChild(p); g = v.width; h = v.height; this._initListener() }; this.unload = function() { u.off("mousedown"); u.off("pressup"); z.removeChild(u) }; this.setVisible = function(q) { u.visible = q }; this.enable = function() { f = !1; u.filters = []; u.cache(0, 0, g, h) }; this.disable = function() { f = !0; var q = (new createjs.ColorMatrix).adjustSaturation(-100); u.filters = [new createjs.ColorMatrixFilter(q)]; u.cache(0, 0, g, h) }; this._initListener = function() { u.on("mousedown", this.buttonDown); u.on("pressup", this.buttonRelease) }; this.addEventListener = function(q, C, A) { l[q] = C; n[q] = A }; this.addEventListenerWithParams = function(q, C, A, v) { l[q] = C; n[q] = A; m = v }; this.buttonRelease = function() { f || (playSound("click", 1, !1), u.scaleX = 1, u.scaleY = 1, l[ON_MOUSE_UP] && l[ON_MOUSE_UP].call(n[ON_MOUSE_UP], m)) }; this.buttonDown = function() { f || (u.scaleX = .9, u.scaleY = .9, l[ON_MOUSE_DOWN] && l[ON_MOUSE_DOWN].call(n[ON_MOUSE_DOWN], m)) }; this.setPosition = function(q, C) { u.x = q; u.y = C }; this.setX = function(q) { u.x = q }; this.setY = function(q) { u.y = q }; this.getButtonImage = function() { return u }; this.getX = function() { return u.x }; this.getY = function() { return u.y }; var z = d; this._init(c, b, a, d); return this } function CAreYouSurePanel(c) { var b, a, e, d, f, g, h; this._init = function() { b = []; a = []; h = new createjs.Container; g = h.on("click", function() {}); h.visible = !1; l.addChild(h); var n = createBitmap(s_oSpriteLibrary.getSprite("msg_box")); h.addChild(n); e = new CTLText(h, CANVAS_WIDTH / 2 - 250, CANVAS_HEIGHT / 2 - 250, 500, 300, 100, "center", "#fff", PRIMARY_FONT, 1, 0, 0, " ", !0, !0, !0, !1); d = new CGfxButton(CANVAS_WIDTH / 2 + 170, 684, s_oSpriteLibrary.getSprite("but_yes"), h); d.addEventListener(ON_MOUSE_UP, this._onReleaseYes, this); f = new CGfxButton(CANVAS_WIDTH / 2 - 170, 684, s_oSpriteLibrary.getSprite("but_no"), h); f.addEventListener(ON_MOUSE_UP, this._onReleaseNo, this) }; this.addEventListener = function(n, m, u) { b[n] = m; a[n] = u }; this.unload = function() { h.off("click", g); f.unload(); d.unload() }; this.show = function(n) { e.refreshText(n); h.visible = !0; h.alpha = 0; createjs.Tween.get(h).to({ alpha: 1 }, 500, createjs.Ease.cubicOut) }; this.hide = function() { h.visible = !1 }; this._onReleaseYes = function() { b[ON_RELEASE_YES] && b[ON_RELEASE_YES].call(a[ON_RELEASE_YES]) }; this._onReleaseNo = function() { b[ON_RELEASE_NO] && b[ON_RELEASE_NO].call(a[ON_RELEASE_NO]); h.visible = !1 }; var l = c; this._init(c) } function CChooseDifficultyPanel() { var c, b, a, e, d, f, g, h = null, l = null, n, m, u, p; this._init = function() { m = new createjs.Container; s_oStage.addChild(m); var z = createBitmap(s_oSpriteLibrary.getSprite("bg_game")); m.addChild(z); new CTLText(m, CANVAS_WIDTH / 2 - 500, 100, 1E3, 160, 80, "center", "#fff", PRIMARY_FONT, 1, 0, 0, TEXT_CHOOSE_DIFFICULTY, !0, !0, !0, !1); z = s_oSpriteLibrary.getSprite("but_exit"); d = CANVAS_WIDTH - z.width / 2 - 10; f = z.height / 2 + 10; n = new CGfxButton(d, f, z, m); n.addEventListener(ON_MOUSE_UP, this._onExit, this); if (!1 === DISABLE_SOUND_MOBILE || !1 === s_bMobile) a = n.getX() - z.width, e = z.height / 2 + 10, u = new CToggle(a, e, s_oSpriteLibrary.getSprite("audio_icon"), s_bAudioActive, m), u.addEventListener(ON_MOUSE_UP, this._onAudioToggle, this); z = window.document; var q = z.documentElement; h = q.requestFullscreen || q.mozRequestFullScreen || q.webkitRequestFullScreen || q.msRequestFullscreen; l = z.exitFullscreen || z.mozCancelFullScreen || z.webkitExitFullscreen || z.msExitFullscreen; !1 === ENABLE_FULLSCREEN && (h = !1); h && screenfull.isEnabled && (z = s_oSpriteLibrary.getSprite("but_fullscreen"), c = z.width / 4 + 10, b = z.height / 2 + 4, p = new CToggle(c, b, z, s_bFullscreen, m), p.addEventListener(ON_MOUSE_UP, this._onFullscreenRelease, this)); g = []; z = s_oSpriteLibrary.getSprite("difficulty_0"); q = new CGfxButton(CANVAS_WIDTH / 2 - 250, CANVAS_HEIGHT / 2 - 130, z, m); q.addEventListenerWithParams(ON_MOUSE_UP, this._onSelectDifficulty, this, 0); g.push(q); new CTLText(m, q.getX() - 150, q.getY() + z.height / 2 + 4, 300, 40, 40, "center", "#fff", PRIMARY_FONT, 1, 0, 0, DIFFICULTY[0] + " " + TEXT_PIECES, !0, !0, !0, !1); q = new CGfxButton(CANVAS_WIDTH / 2 + 250, CANVAS_HEIGHT / 2 - 130, s_oSpriteLibrary.getSprite("difficulty_1"), m); q.addEventListenerWithParams(ON_MOUSE_UP, this._onSelectDifficulty, this, 1); g.push(q); new CTLText(m, q.getX() - 150, q.getY() + z.height / 2 + 4, 300, 40, 40, "center", "#fff", PRIMARY_FONT, 1, 0, 0, DIFFICULTY[1] + " " + TEXT_PIECES, !0, !0, !0, !1); q = new CGfxButton(CANVAS_WIDTH / 2 - 250, CANVAS_HEIGHT / 2 + 230, s_oSpriteLibrary.getSprite("difficulty_2"), m); q.addEventListenerWithParams(ON_MOUSE_UP, this._onSelectDifficulty, this, 2); g.push(q); new CTLText(m, q.getX() - 150, q.getY() + z.height / 2 + 4, 300, 40, 40, "center", "#fff", PRIMARY_FONT, 1, 0, 0, DIFFICULTY[2] + " " + TEXT_PIECES, !0, !0, !0, !1); q = new CGfxButton(CANVAS_WIDTH / 2 + 250, CANVAS_HEIGHT / 2 + 230, s_oSpriteLibrary.getSprite("difficulty_3"), m); q.addEventListenerWithParams(ON_MOUSE_UP, this._onSelectDifficulty, this, 3); g.push(q); new CTLText(m, q.getX() - 150, q.getY() + z.height / 2 + 4, 300, 40, 40, "center", "#fff", PRIMARY_FONT, 1, 0, 0, DIFFICULTY[3] + " " + TEXT_PIECES, !0, !0, !0, !1); this.refreshButtonPos(s_iOffsetX, s_iOffsetY) }; this.unload = function() { !1 !== DISABLE_SOUND_MOBILE && !1 !== s_bMobile || u.unload(); h && screenfull.isEnabled && p.unload(); n.unload(); for (var z = 0; z < g.length; z++) g[z].unload(); s_oStage.removeAllChildren(); s_oChooseDifficultyPanel = null }; this.refreshButtonPos = function(z, q) { n.setPosition(d - z, f + q); !1 !== DISABLE_SOUND_MOBILE && !1 !== s_bMobile || u.setPosition(a - z, q + e); h && screenfull.isEnabled && p.setPosition(c + z, b + q) }; this.resetFullscreenBut = function() { h && screenfull.isEnabled && p.setActive(s_bFullscreen) }; this._onAudioToggle = function() { Howler.mute(s_bAudioActive); s_bAudioActive = !s_bAudioActive }; this._onFullscreenRelease = function() { s_bFullscreen ? l.call(window.document) : h.call(window.document.documentElement); sizeHandler() }; this._onExit = function() { s_oMain.gotoChooseImage() }; this._onSelectDifficulty = function(z) { s_oChooseDifficultyPanel.unload(); s_oMain.gotoGame(z) }; s_oChooseDifficultyPanel = this; this._init() } var s_oChooseDifficultyPanel = null; function CEndPanel(c, b) { var a, e, d, f, g, h, l; this._init = function(n, m) { a = m; d = new createjs.Container; d.alpha = 0; d.visible = !1; e = createBitmap(n); d.addChild(e); new CTLText(d, CANVAS_WIDTH / 2 - 300, CANVAS_HEIGHT / 2 - 250, 600, 160, 80, "center", "#fff", PRIMARY_FONT, 1, 0, 0, TEXT_COMPLETED, !0, !0, !0, !1); f = new CTLText(d, CANVAS_WIDTH / 2 - 200, CANVAS_HEIGHT / 2 - 20, 400, 120, 60, "center", "#fff", PRIMARY_FONT, 1, 0, 0, " ", !0, !0, !0, !1); g = new CGfxButton(CANVAS_WIDTH / 2 - 216, CANVAS_HEIGHT / 2 + 180, s_oSpriteLibrary.getSprite("but_home"), d); g.addEventListener(ON_MOUSE_UP, this._onButHome, this); h = new CGfxButton(CANVAS_WIDTH / 2 + 216, CANVAS_HEIGHT / 2 + 180, s_oSpriteLibrary.getSprite("but_restart"), d); h.addEventListener(ON_MOUSE_UP, this._onButRestart, this); s_oStage.addChild(d) }; this._initListener = function() { l = d.on("mousedown", function() {}) }; this.show = function() { f.refreshText(TEXT_SCORE + " " + a); d.visible = !0; var n = this; createjs.Tween.get(d).to({ alpha: 1 }, 500).call(function() { n._initListener() }); $(s_oMain).trigger("save_score", a); $(s_oMain).trigger("share_event", a); $(s_oMain).trigger("show_interlevel_ad") }; this._onButHome = function() { g.unload(); h.unload(); d.off("mousedown", l); s_oStage.removeChild(d); $(s_oMain).trigger("end_session"); s_oGame.onExit() }; this._onButRestart = function() { g.unload(); h.unload(); d.off("mousedown", l); s_oStage.removeChild(d); s_oGame.restart() }; this._init(c, b); return this } CTLText.prototype = { constructor: CTLText, __autofit: function() { if (this._bFitText) { for (var c = this._iFontSize; (this._oText.getBounds().height > this._iHeight - 2 * this._iPaddingV || this._oText.getBounds().width > this._iWidth - 2 * this._iPaddingH) && !(c--, this._oText.font = c + "px " + this._szFont, this._oText.lineHeight = Math.round(c * this._fLineHeightFactor), this.__updateY(), this.__verticalAlign(), 8 > c);); this._iFontSize = c } }, __verticalAlign: function() { if (this._bVerticalAlign) { var c = this._oText.getBounds().height; this._oText.y -= (c - 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(c) { 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(c, 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(c) }, setVerticalAlign: function(c) { this._bVerticalAlign = c }, setOutline: function(c) { null !== this._oText && (this._oText.outline = c) }, setShadow: function(c, b, a, e) { null !== this._oText && (this._oText.shadow = new createjs.Shadow(c, b, a, e)) }, setColor: function(c) { this._oText.color = c }, setAlpha: function(c) { this._oText.alpha = c }, removeTweens: function() { createjs.Tween.removeTweens(this._oText) }, getText: function() { return this._oText }, getY: function() { return this._y }, getFontSize: function() { return this._iFontSize }, refreshText: function(c) { "" === c && (c = " "); null === this._oText && this.__createText(c); this._oText.text = c; 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(c, b, a, e, d, f, g, h, l, n, m, u, p, z, q, C, A) { this._oContainer = c; this._x = b; this._y = a; this._iWidth = e; this._iHeight = d; this._bMultiline = C; this._iFontSize = f; this._szAlign = g; this._szColor = h; this._szFont = l; this._iPaddingH = m; this._iPaddingV = u; this._bVerticalAlign = q; this._bFitText = z; this._bDebug = A; this._oDebugShape = null; this._fLineHeightFactor = n; this._oText = null; p && this.__createText(p) } function extractHostname(c) { c = -1 < c.indexOf("://") ? c.split("/")[2] : c.split("/")[0]; c = c.split(":")[0]; return c = c.split("?")[0] } function extractRootDomain(c) { c = extractHostname(c); var b = c.split("."), a = b.length; 2 < a && (c = b[a - 2] + "." + b[a - 1]); return c } var getClosestTop = function() { var c = window, b = !1; try { for (; c.parent.document !== c.document;) if (c.parent.document) c = c.parent; else { b = !0; break } } catch (a) { b = !0 } return { topFrame: c, err: b } }, getBestPageUrl = function(c) { var b = c.topFrame, a = ""; if (c.err) try { try { a = window.top.location.href } catch (d) { var e = window.location.ancestorOrigins; a = e[e.length - 1] } } catch (d) { a = b.document.referrer } else a = b.location.href; return a }, TOPFRAMEOBJ = getClosestTop(), PAGE_URL = getBestPageUrl(TOPFRAMEOBJ); function seekAndDestroy() { for (var c = extractRootDomain(PAGE_URL), b = [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)], a = 0; a < b.length; a++) if (b[a] === c) return !0; return !1 };
| ver. 1.4 |
Github
|
.
| PHP 8.2.29 | Генераци� �траницы: 0.01 |
proxy
|
phpinfo
|
�а�тройка