!function(t, e) { "object" == typeof exports && "object" == typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define("Phaser", [], e) : "object" == typeof exports ? exports.Phaser = e() : t.Phaser = e() }(window, function() { return n = {}, s.m = i = [function(t, e) { function r(t, e, i, n) { for (var s in e) if (e.hasOwnProperty(s)) { var r = (l = e, u = s, f = d = void 0, f = (c = i) ? l[u] : Object.getOwnPropertyDescriptor(l, u), !c && f.value && "object" == typeof f.value && (f = f.value), !(!f || !((d = f).get && "function" == typeof d.get || d.set && "function" == typeof d.set)) && (void 0 === f.enumerable && (f.enumerable = !0), void 0 === f.configurable && (f.configurable = !0), f)); if (!1 !== r) { if (o = (n || t).prototype, a = s, h = void 0, (h = Object.getOwnPropertyDescriptor(o, a)) && (h.value && "object" == typeof h.value && (h = h.value), !1 === h.configurable)) { if (p.ignoreFinals) continue; throw new Error("cannot override final property '" + s + "', set Class.ignoreFinals = true to skip") } Object.defineProperty(t.prototype, s, r) } else t.prototype[s] = e[s] } var o, a, h, l, u, c, d, f } function o(t, e) { if (e) { Array.isArray(e) || (e = [e]); for (var i = 0; i < e.length; i++) r(t, e[i].prototype || e[i]) } } function p(t) { var e, i, n; if ((t = t || {}).initialize) { if ("function" != typeof t.initialize) throw new Error("initialize must be a function"); n = t.initialize, delete t.initialize } else { n = t.Extends ? (i = t.Extends, function() { i.apply(this, arguments) } ) : function() {} } t.Extends ? (n.prototype = Object.create(t.Extends.prototype), n.prototype.constructor = n, e = t.Extends, delete t.Extends) : n.prototype.constructor = n; var s = null; return t.Mixins && (s = t.Mixins, delete t.Mixins), o(n, s), r(n, t, !0, e), n } p.extend = r, p.mixin = o, p.ignoreFinals = !1, t.exports = p } , function(t, e) { t.exports = function() {} } , function(t, e) { t.exports = function(t, e, i) { var n = typeof t; return t && "number" != n && "string" != n && t.hasOwnProperty(e) && void 0 !== t[e] ? t[e] : i } } , function(t, e, i) { var n = i(0) , s = i(106) , r = new n({ initialize: function(t, e) { this.x = 0, this.y = 0, "object" == typeof t ? (this.x = t.x || 0, this.y = t.y || 0) : (void 0 === e && (e = t), this.x = t || 0, this.y = e || 0) }, clone: function() { return new r(this.x,this.y) }, copy: function(t) { return this.x = t.x || 0, this.y = t.y || 0, this }, setFromObject: function(t) { return this.x = t.x || 0, this.y = t.y || 0, this }, set: function(t, e) { return void 0 === e && (e = t), this.x = t, this.y = e, this }, setTo: function(t, e) { return this.set(t, e) }, setToPolar: function(t, e) { return null == e && (e = 1), this.x = Math.cos(t) * e, this.y = Math.sin(t) * e, this }, equals: function(t) { return this.x === t.x && this.y === t.y }, fuzzyEquals: function(t, e) { return s(this.x, t.x, e) && s(this.y, t.y, e) }, angle: function() { var t = Math.atan2(this.y, this.x); return t < 0 && (t += 2 * Math.PI), t }, setAngle: function(t) { return this.setToPolar(t, this.length()) }, add: function(t) { return this.x += t.x, this.y += t.y, this }, subtract: function(t) { return this.x -= t.x, this.y -= t.y, this }, multiply: function(t) { return this.x *= t.x, this.y *= t.y, this }, scale: function(t) { return isFinite(t) ? (this.x *= t, this.y *= t) : (this.x = 0, this.y = 0), this }, divide: function(t) { return this.x /= t.x, this.y /= t.y, this }, negate: function() { return this.x = -this.x, this.y = -this.y, this }, distance: function(t) { var e = t.x - this.x , i = t.y - this.y; return Math.sqrt(e * e + i * i) }, distanceSq: function(t) { var e = t.x - this.x , i = t.y - this.y; return e * e + i * i }, length: function() { var t = this.x , e = this.y; return Math.sqrt(t * t + e * e) }, setLength: function(t) { return this.normalize().scale(t) }, lengthSq: function() { var t = this.x , e = this.y; return t * t + e * e }, normalize: function() { var t = this.x , e = this.y , i = t * t + e * e; return 0 < i && (i = 1 / Math.sqrt(i), this.x = t * i, this.y = e * i), this }, normalizeRightHand: function() { var t = this.x; return this.x = -1 * this.y, this.y = t, this }, normalizeLeftHand: function() { var t = this.x; return this.x = this.y, this.y = -1 * t, this }, dot: function(t) { return this.x * t.x + this.y * t.y }, cross: function(t) { return this.x * t.y - this.y * t.x }, lerp: function(t, e) { void 0 === e && (e = 0); var i = this.x , n = this.y; return this.x = i + e * (t.x - i), this.y = n + e * (t.y - n), this }, transformMat3: function(t) { var e = this.x , i = this.y , n = t.val; return this.x = n[0] * e + n[3] * i + n[6], this.y = n[1] * e + n[4] * i + n[7], this }, transformMat4: function(t) { var e = this.x , i = this.y , n = t.val; return this.x = n[0] * e + n[4] * i + n[12], this.y = n[1] * e + n[5] * i + n[13], this }, reset: function() { return this.x = 0, this.y = 0, this }, limit: function(t) { var e = this.length(); return e && t < e && this.scale(t / e), this }, reflect: function(t) { return t = t.clone().normalize(), this.subtract(t.scale(2 * this.dot(t))) }, mirror: function(t) { return this.reflect(t).negate() }, rotate: function(t) { var e = Math.cos(t) , i = Math.sin(t); return this.set(e * this.x - i * this.y, i * this.x + e * this.y) } }); r.ZERO = new r, r.RIGHT = new r(1,0), r.LEFT = new r(-1,0), r.UP = new r(0,-1), r.DOWN = new r(0,1), r.ONE = new r(1,1), t.exports = r } , function(t, e, i) { var n = i(0) , s = i(47) , r = new n({ initialize: function(t, e) { void 0 === t && (t = 0), void 0 === e && (e = t), this.type = s.POINT, this.x = t, this.y = e }, setTo: function(t, e) { return void 0 === t && (t = 0), void 0 === e && (e = t), this.x = t, this.y = e, this } }); t.exports = r } , function(t, e, i) { var n = i(0) , s = i(23) , r = i(22) , o = new n({ initialize: function(t) { this.scene = t, this.systems = t.sys, this.displayList, this.updateList, t.sys.events.once(r.BOOT, this.boot, this), t.sys.events.on(r.START, this.start, this) }, boot: function() { this.displayList = this.systems.displayList, this.updateList = this.systems.updateList, this.systems.events.once(r.DESTROY, this.destroy, this) }, start: function() { this.systems.events.once(r.SHUTDOWN, this.shutdown, this) }, existing: function(t) { return (t.renderCanvas || t.renderWebGL) && this.displayList.add(t), t.preUpdate && this.updateList.add(t), t }, shutdown: function() { this.systems.events.off(r.SHUTDOWN, this.shutdown, this) }, destroy: function() { this.shutdown(), this.scene.sys.events.off(r.START, this.start, this), this.scene = null, this.systems = null, this.displayList = null, this.updateList = null } }); o.register = function(t, e) { o.prototype.hasOwnProperty(t) || (o.prototype[t] = e) } , o.remove = function(t) { o.prototype.hasOwnProperty(t) && delete o.prototype[t] } , s.register("GameObjectFactory", o, "add"), t.exports = o } , function(t, e) { t.exports = function(t, e, i) { if (t && "number" != typeof t) { if (t.hasOwnProperty(e)) return t[e]; if (-1 === e.indexOf(".")) return i; for (var n = e.split("."), s = t, r = i, o = 0; o < n.length; o++) { if (!s.hasOwnProperty(n[o])) { r = i; break } r = s[n[o]], s = s[n[o]] } return r } return i } } , function(t, e) { t.exports = function(t) { if ("object" != typeof t || t.nodeType || t === t.window) return !1; try { if (t.constructor && !{}.hasOwnProperty.call(t.constructor.prototype, "isPrototypeOf")) return !1 } catch (t) { return !1 } return !0 } } , function(t, e) { var i = {} , n = { install: function(t) { for (var e in i) t[e] = i[e] }, register: function(t, e) { i[t] = e }, destroy: function() { i = {} } }; t.exports = n } , function(t, e) { t.exports = { getTintFromFloats: function(t, e, i, n) { return ((255 & (255 * n | 0)) << 24 | (255 & (255 * t | 0)) << 16 | (255 & (255 * e | 0)) << 8 | 255 & (255 * i | 0)) >>> 0 }, getTintAppendFloatAlpha: function(t, e) { return ((255 & (255 * e | 0)) << 24 | t) >>> 0 }, getTintAppendFloatAlphaAndSwap: function(t, e) { return ((255 & (255 * e | 0)) << 24 | (255 & (0 | t)) << 16 | (255 & (t >> 8 | 0)) << 8 | 255 & (t >> 16 | 0)) >>> 0 }, getFloatsFromUintRGB: function(t) { return [(255 & (t >> 16 | 0)) / 255, (255 & (t >> 8 | 0)) / 255, (255 & (0 | t)) / 255] }, getComponentCount: function(t, e) { for (var i = 0, n = 0; n < t.length; ++n) { var s = t[n]; s.type === e.FLOAT ? i += s.size : i += 1 } return i } } } , function(t, e, i) { "use strict"; var n = Object.prototype.hasOwnProperty , f = "~"; function s() {} function a(t, e, i) { this.fn = t, this.context = e, this.once = i || !1 } function r(t, e, i, n, s) { if ("function" != typeof i) throw new TypeError("The listener must be a function"); var r = new a(i,n || t,s) , o = f ? f + e : e; return t._events[o] ? t._events[o].fn ? t._events[o] = [t._events[o], r] : t._events[o].push(r) : (t._events[o] = r, t._eventsCount++), t } function l(t, e) { 0 == --t._eventsCount ? t._events = new s : delete t._events[e] } function o() { this._events = new s, this._eventsCount = 0 } Object.create && (s.prototype = Object.create(null), (new s).__proto__ || (f = !1)), o.prototype.eventNames = function() { var t, e, i = []; if (0 === this._eventsCount) return i; for (e in t = this._events) n.call(t, e) && i.push(f ? e.slice(1) : e); return Object.getOwnPropertySymbols ? i.concat(Object.getOwnPropertySymbols(t)) : i } , o.prototype.listeners = function(t) { var e = f ? f + t : t , i = this._events[e]; if (!i) return []; if (i.fn) return [i.fn]; for (var n = 0, s = i.length, r = new Array(s); n < s; n++) r[n] = i[n].fn; return r } , o.prototype.listenerCount = function(t) { var e = f ? f + t : t , i = this._events[e]; return i ? i.fn ? 1 : i.length : 0 } , o.prototype.emit = function(t, e, i, n, s, r) { var o = f ? f + t : t; if (!this._events[o]) return !1; var a, h = this._events[o], l = arguments.length; if (h.fn) { switch (h.once && this.removeListener(t, h.fn, void 0, !0), l) { case 1: return h.fn.call(h.context), !0; case 2: return h.fn.call(h.context, e), !0; case 3: return h.fn.call(h.context, e, i), !0; case 4: return h.fn.call(h.context, e, i, n), !0; case 5: return h.fn.call(h.context, e, i, n, s), !0; case 6: return h.fn.call(h.context, e, i, n, s, r), !0 } for (d = 1, a = new Array(l - 1); d < l; d++) a[d - 1] = arguments[d]; h.fn.apply(h.context, a) } else for (var u, c = h.length, d = 0; d < c; d++) switch (h[d].once && this.removeListener(t, h[d].fn, void 0, !0), l) { case 1: h[d].fn.call(h[d].context); break; case 2: h[d].fn.call(h[d].context, e); break; case 3: h[d].fn.call(h[d].context, e, i); break; case 4: h[d].fn.call(h[d].context, e, i, n); break; default: if (!a) for (u = 1, a = new Array(l - 1); u < l; u++) a[u - 1] = arguments[u]; h[d].fn.apply(h[d].context, a) } return !0 } , o.prototype.on = function(t, e, i) { return r(this, t, e, i, !1) } , o.prototype.once = function(t, e, i) { return r(this, t, e, i, !0) } , o.prototype.removeListener = function(t, e, i, n) { var s = f ? f + t : t; if (!this._events[s]) return this; if (!e) return l(this, s), this; var r = this._events[s]; if (r.fn) r.fn !== e || n && !r.once || i && r.context !== i || l(this, s); else { for (var o = 0, a = [], h = r.length; o < h; o++) (r[o].fn !== e || n && !r[o].once || i && r[o].context !== i) && a.push(r[o]); a.length ? this._events[s] = 1 === a.length ? a[0] : a : l(this, s) } return this } , o.prototype.removeAllListeners = function(t) { var e; return t ? (e = f ? f + t : t, this._events[e] && l(this, e)) : (this._events = new s, this._eventsCount = 0), this } , o.prototype.off = o.prototype.removeListener, o.prototype.addListener = o.prototype.on, o.prefixed = f, o.EventEmitter = o, t.exports = o } , function(t, e, i) { var n = i(0) , s = i(48) , r = i(152) , o = i(274) , a = i(47) , h = i(56) , l = i(155) , u = new n({ initialize: function(t, e, i, n) { void 0 === t && (t = 0), void 0 === e && (e = 0), void 0 === i && (i = 0), void 0 === n && (n = 0), this.type = a.RECTANGLE, this.x = t, this.y = e, this.width = i, this.height = n }, contains: function(t, e) { return s(this, t, e) }, getPoint: function(t, e) { return r(this, t, e) }, getPoints: function(t, e, i) { return o(this, t, e, i) }, getRandomPoint: function(t) { return l(this, t) }, setTo: function(t, e, i, n) { return this.x = t, this.y = e, this.width = i, this.height = n, this }, setEmpty: function() { return this.setTo(0, 0, 0, 0) }, setPosition: function(t, e) { return void 0 === e && (e = t), this.x = t, this.y = e, this }, setSize: function(t, e) { return void 0 === e && (e = t), this.width = t, this.height = e, this }, isEmpty: function() { return this.width <= 0 || this.height <= 0 }, getLineA: function(t) { return void 0 === t && (t = new h), t.setTo(this.x, this.y, this.right, this.y), t }, getLineB: function(t) { return void 0 === t && (t = new h), t.setTo(this.right, this.y, this.right, this.bottom), t }, getLineC: function(t) { return void 0 === t && (t = new h), t.setTo(this.right, this.bottom, this.x, this.bottom), t }, getLineD: function(t) { return void 0 === t && (t = new h), t.setTo(this.x, this.bottom, this.x, this.y), t }, left: { get: function() { return this.x }, set: function(t) { t >= this.right ? this.width = 0 : this.width = this.right - t, this.x = t } }, right: { get: function() { return this.x + this.width }, set: function(t) { t <= this.x ? this.width = 0 : this.width = t - this.x } }, top: { get: function() { return this.y }, set: function(t) { t >= this.bottom ? this.height = 0 : this.height = this.bottom - t, this.y = t } }, bottom: { get: function() { return this.y + this.height }, set: function(t) { t <= this.y ? this.height = 0 : this.height = t - this.y } }, centerX: { get: function() { return this.x + this.width / 2 }, set: function(t) { this.x = t - this.width / 2 } }, centerY: { get: function() { return this.y + this.height / 2 }, set: function(t) { this.y = t - this.height / 2 } } }); t.exports = u } , function(t, e, i) { t.exports = { Alpha: i(533), AlphaSingle: i(269), Animation: i(504), BlendMode: i(272), ComputedSize: i(552), Crop: i(553), Depth: i(273), Flip: i(554), GetBounds: i(555), Mask: i(277), Origin: i(572), PathFollower: i(573), Pipeline: i(156), ScrollFactor: i(280), Size: i(574), Texture: i(575), TextureCrop: i(576), Tint: i(577), ToJSON: i(281), Transform: i(282), TransformMatrix: i(29), Visible: i(283) } } , function(t, e) { var i = { PI2: 2 * Math.PI, TAU: .5 * Math.PI, EPSILON: 1e-6, DEG_TO_RAD: Math.PI / 180, RAD_TO_DEG: 180 / Math.PI, RND: null, MIN_SAFE_INTEGER: Number.MIN_SAFE_INTEGER || -9007199254740991, MAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER || 9007199254740991 }; t.exports = i } , function(t, e, i) { var n = i(0) , s = i(281) , r = i(113) , o = i(10) , a = i(90) , h = new n({ Extends: o, initialize: function(t, e) { o.call(this), this.scene = t, this.type = e, this.state = 0, this.parentContainer = null, this.name = "", this.active = !0, this.tabIndex = -1, this.data = null, this.renderFlags = 15, this.cameraFilter = 0, this.input = null, this.body = null, this.ignoreDestroy = !1, t.sys.queueDepthSort() }, setActive: function(t) { return this.active = t, this }, setName: function(t) { return this.name = t, this }, setState: function(t) { return this.state = t, this }, setDataEnabled: function() { return this.data || (this.data = new r(this)), this }, setData: function(t, e) { return this.data || (this.data = new r(this)), this.data.set(t, e), this }, incData: function(t, e) { return this.data || (this.data = new r(this)), this.data.inc(t, e), this }, toggleData: function(t) { return this.data || (this.data = new r(this)), this.data.toggle(t), this }, getData: function(t) { return this.data || (this.data = new r(this)), this.data.get(t) }, setInteractive: function(t, e, i) { return this.scene.sys.input.enable(this, t, e, i), this }, disableInteractive: function() { return this.input && (this.input.enabled = !1), this }, removeInteractive: function() { return this.scene.sys.input.clear(this), this.input = void 0, this }, update: function() {}, toJSON: function() { return s(this) }, willRender: function(t) { return !(h.RENDER_MASK !== this.renderFlags || 0 !== this.cameraFilter && this.cameraFilter & t.id) }, getIndexList: function() { for (var t = this, e = this.parentContainer, i = []; e && (i.unshift(e.getIndex(t)), (t = e).parentContainer); ) e = e.parentContainer; return i.unshift(this.scene.sys.displayList.getIndex(t)), i }, destroy: function(t) { var e; void 0 === t && (t = !1), this.scene && !this.ignoreDestroy && (this.preDestroy && this.preDestroy.call(this), this.emit(a.DESTROY, this), e = this.scene.sys, t || (e.displayList.remove(this), e.updateList.remove(this)), this.input && (e.input.clear(this), this.input = void 0), this.data && (this.data.destroy(), this.data = void 0), this.body && (this.body.destroy(), this.body = void 0), t || e.queueDepthSort(), this.active = !1, this.visible = !1, this.scene = void 0, this.parentContainer = void 0, this.removeAllListeners()) } }); h.RENDER_MASK = 15, t.exports = h } , function(t, e, i) { var s = i(170) , r = i(6); t.exports = function(t, e, i) { var n = r(t, e, null); if (null === n) return i; if (Array.isArray(n)) return s.RND.pick(n); if ("object" == typeof n) { if (n.hasOwnProperty("randInt")) return s.RND.integerInRange(n.randInt[0], n.randInt[1]); if (n.hasOwnProperty("randFloat")) return s.RND.realInRange(n.randFloat[0], n.randFloat[1]) } else if ("function" == typeof n) return n(e); return n } } , function(t, e, i) { var n = i(0) , s = i(23) , r = i(22) , o = new n({ initialize: function(t) { this.scene = t, this.systems = t.sys, this.displayList, this.updateList, t.sys.events.once(r.BOOT, this.boot, this), t.sys.events.on(r.START, this.start, this) }, boot: function() { this.displayList = this.systems.displayList, this.updateList = this.systems.updateList, this.systems.events.once(r.DESTROY, this.destroy, this) }, start: function() { this.systems.events.once(r.SHUTDOWN, this.shutdown, this) }, shutdown: function() { this.systems.events.off(r.SHUTDOWN, this.shutdown, this) }, destroy: function() { this.shutdown(), this.scene.sys.events.off(r.START, this.start, this), this.scene = null, this.systems = null, this.displayList = null, this.updateList = null } }); o.register = function(t, e) { o.prototype.hasOwnProperty(t) || (o.prototype[t] = e) } , o.remove = function(t) { o.prototype.hasOwnProperty(t) && delete o.prototype[t] } , s.register("GameObjectCreator", o, "make"), t.exports = o } , function(t, e) { t.exports = { LOADER_IDLE: 0, LOADER_LOADING: 1, LOADER_PROCESSING: 2, LOADER_COMPLETE: 3, LOADER_SHUTDOWN: 4, LOADER_DESTROYED: 5, FILE_PENDING: 10, FILE_LOADING: 11, FILE_LOADED: 12, FILE_FAILED: 13, FILE_PROCESSING: 14, FILE_ERRORED: 16, FILE_COMPLETE: 17, FILE_DESTROYED: 18, FILE_POPULATED: 19 } } , function(t, e, i) { var u = i(7) , c = function() { var t, e, i, n, s, r, o = arguments[0] || {}, a = 1, h = arguments.length, l = !1; for ("boolean" == typeof o && (l = o, o = arguments[1] || {}, a = 2), h === a && (o = this, --a); a < h; a++) if (null != (t = arguments[a])) for (e in t) i = o[e], o !== (n = t[e]) && (l && n && (u(n) || (s = Array.isArray(n))) ? (r = s ? (s = !1, i && Array.isArray(i) ? i : []) : i && u(i) ? i : {}, o[e] = c(l, r, n)) : void 0 !== n && (o[e] = n)); return o }; t.exports = c } , function(t, e) { t.exports = function(t, e, i) { return Math.max(e, Math.min(i, t)) } } , function(t, e, i) { t.exports = { BLUR: i(556), BOOT: i(557), CONTEXT_LOST: i(558), CONTEXT_RESTORED: i(559), DESTROY: i(560), FOCUS: i(561), HIDDEN: i(562), PAUSE: i(563), POST_RENDER: i(564), POST_STEP: i(565), PRE_RENDER: i(566), PRE_STEP: i(567), READY: i(568), RESUME: i(569), STEP: i(570), VISIBLE: i(571) } } , function(t, e, i) { var n = i(0) , s = i(17) , r = i(82) , o = i(2) , a = i(138) , h = i(215) , l = i(455) , u = i(139) , c = new n({ initialize: function(t, e) { this.loader = t, this.cache = o(e, "cache", !1), this.type = o(e, "type", !1), this.key = o(e, "key", !1); var i = this.key; if (t.prefix && "" !== t.prefix && (this.key = t.prefix + i), !this.type || !this.key) throw new Error("Error calling 'Loader." + this.type + "' invalid key provided."); this.url = o(e, "url"), void 0 === this.url ? this.url = t.path + i + "." + o(e, "extension", "") : "string" == typeof this.url && 0 !== this.url.indexOf("blob:") && 0 !== this.url.indexOf("data:") && (this.url = t.path + this.url), this.src = "", this.xhrSettings = u(o(e, "responseType", void 0)), o(e, "xhrSettings", !1) && (this.xhrSettings = h(this.xhrSettings, o(e, "xhrSettings", {}))), this.xhrLoader = null, this.state = "function" == typeof this.url ? s.FILE_POPULATED : s.FILE_PENDING, this.bytesTotal = 0, this.bytesLoaded = -1, this.percentComplete = -1, this.crossOrigin = void 0, this.data = void 0, this.config = o(e, "config", {}), this.multiFile, this.linkFile }, setLink: function(t) { (this.linkFile = t).linkFile = this }, resetXHR: function() { this.xhrLoader && (this.xhrLoader.onload = void 0, this.xhrLoader.onerror = void 0, this.xhrLoader.onprogress = void 0) }, load: function() { this.state === s.FILE_POPULATED ? this.loader.nextFile(this, !0) : (this.state = s.FILE_LOADING, this.src = a(this, this.loader.baseURL), 0 === this.src.indexOf("data:") ? console.warn("Local data URIs are not supported: " + this.key) : this.xhrLoader = l(this, this.loader.xhr)) }, onLoad: function(t, e) { var i = t.responseURL && 0 === t.responseURL.indexOf("file://") && 0 === e.target.status , n = !(e.target && 200 !== e.target.status) || i; 4 === t.readyState && 400 <= t.status && t.status <= 599 && (n = !1), this.state = s.FILE_LOADED, this.resetXHR(), this.loader.nextFile(this, n) }, onError: function() { this.resetXHR(), this.loader.nextFile(this, !1) }, onProgress: function(t) { t.lengthComputable && (this.bytesLoaded = t.loaded, this.bytesTotal = t.total, this.percentComplete = Math.min(this.bytesLoaded / this.bytesTotal, 1), this.loader.emit(r.FILE_PROGRESS, this, this.percentComplete)) }, onProcess: function() { this.state = s.FILE_PROCESSING, this.onProcessComplete() }, onProcessComplete: function() { this.state = s.FILE_COMPLETE, this.multiFile && this.multiFile.onFileComplete(this), this.loader.fileProcessComplete(this) }, onProcessError: function() { this.state = s.FILE_ERRORED, this.multiFile && this.multiFile.onFileFailed(this), this.loader.fileProcessComplete(this) }, hasCacheConflict: function() { return this.cache && this.cache.exists(this.key) }, addToCache: function() { this.cache && this.cache.add(this.key, this.data), this.pendingDestroy() }, pendingDestroy: function(t) { void 0 === t && (t = this.data); var e = this.key , i = this.type; this.loader.emit(r.FILE_COMPLETE, e, i, t), this.loader.emit(r.FILE_KEY_COMPLETE + i + "-" + e, e, i, t), this.loader.flagForRemoval(this) }, destroy: function() { this.loader = null, this.cache = null, this.xhrSettings = null, this.multiFile = null, this.linkFile = null, this.data = null } }); c.createObjectURL = function(t, e, i) { var n; "function" == typeof URL ? t.src = URL.createObjectURL(e) : ((n = new FileReader).onload = function() { t.removeAttribute("crossOrigin"), t.src = "data:" + (e.type || i) + ";base64," + n.result.split(",")[1] } , n.onerror = t.onerror, n.readAsDataURL(e)) } , c.revokeObjectURL = function(t) { "function" == typeof URL && URL.revokeObjectURL(t.src) } , t.exports = c } , function(t, e, i) { t.exports = { BOOT: i(709), CREATE: i(710), DESTROY: i(711), PAUSE: i(712), POST_UPDATE: i(713), PRE_UPDATE: i(714), READY: i(715), RENDER: i(716), RESUME: i(717), SHUTDOWN: i(718), SLEEP: i(719), START: i(720), TRANSITION_COMPLETE: i(721), TRANSITION_INIT: i(722), TRANSITION_OUT: i(723), TRANSITION_START: i(724), TRANSITION_WAKE: i(725), UPDATE: i(726), WAKE: i(727) } } , function(t, e) { var s = {} , r = {} , i = { register: function(t, e, i, n) { void 0 === n && (n = !1), s[t] = { plugin: e, mapping: i, custom: n } }, registerCustom: function(t, e, i, n) { r[t] = { plugin: e, mapping: i, data: n } }, hasCore: function(t) { return s.hasOwnProperty(t) }, hasCustom: function(t) { return r.hasOwnProperty(t) }, getCore: function(t) { return s[t] }, getCustom: function(t) { return r[t] }, getCustomClass: function(t) { return r.hasOwnProperty(t) ? r[t].plugin : null }, remove: function(t) { s.hasOwnProperty(t) && delete s[t] }, removeCustom: function(t) { r.hasOwnProperty(t) && delete r[t] }, destroyCorePlugins: function() { for (var t in s) s.hasOwnProperty(t) && delete s[t] }, destroyCustomPlugins: function() { for (var t in r) r.hasOwnProperty(t) && delete r[t] } }; t.exports = i } , function(t, e, i) { var f = i(2); t.exports = function(t, e, i, n, s, r) { void 0 === t && (t = 0), void 0 === e && (e = 0), void 0 === i && (i = r.width), void 0 === n && (n = r.height); var o = f(s, "isNotEmpty", !1) , a = f(s, "isColliding", !1) , h = f(s, "hasInterestingFace", !1); t < 0 && (i += t, t = 0), e < 0 && (n += e, e = 0), t + i > r.width && (i = Math.max(r.width - t, 0)), e + n > r.height && (n = Math.max(r.height - e, 0)); for (var l = [], u = e; u < e + n; u++) for (var c = t; c < t + i; c++) { var d = r.data[u][c]; if (null !== d) { if (o && -1 === d.index) continue; if (a && !d.collides) continue; if (h && !d.hasInterestingFace) continue; l.push(d) } } return l } } , function(t, e) { t.exports = function(t, e, i, n, s, r) { var o; void 0 === n && (n = 0), void 0 === s && (s = 0), void 0 === r && (r = 1); var a = 0 , h = t.length; if (1 === r) for (o = s; o < h; o++) t[o][e] = i + a * n, a++; else for (o = s; 0 <= o; o--) t[o][e] = i + a * n, a++; return t } } , function(t, e, i) { var a, h = i(33), l = i(167), u = [], c = !1; function n(t, e, i, n, s) { void 0 === e && (e = 1), void 0 === i && (i = 1), void 0 === n && (n = h.CANVAS), void 0 === s && (s = !1); var r = a(n) , o = (null === r ? (r = { parent: t, canvas: document.createElement("canvas"), type: n }, n === h.CANVAS && u.push(r)) : r.parent = t, r.canvas); return s && (r.parent = o), o.width = e, o.height = i, c && n === h.CANVAS && l.disable(o.getContext("2d")), o } function s() { var e = 0; return u.forEach(function(t) { t.parent && e++ }), e } t.exports = { create2D: function(t, e, i) { return n(t, e, i, h.CANVAS) }, create: n, createWebGL: function(t, e, i) { return n(t, e, i, h.WEBGL) }, disableSmoothing: function() { c = !0 }, enableSmoothing: function() { c = !1 }, first: a = function(t) { if (void 0 === t && (t = h.CANVAS), t === h.WEBGL) return null; for (var e = 0; e < u.length; e++) { var i = u[e]; if (!i.parent && i.type === t) return i } return null } , free: function() { return u.length - s() }, pool: u, remove: function(e) { var i = e instanceof HTMLCanvasElement; u.forEach(function(t) { (i && t.canvas === e || !i && t.parent === e) && (t.parent = null, t.canvas.width = 1, t.canvas.height = 1) }) }, total: s } } , function(t, e, i) { var l = i(52) , u = i(15); t.exports = function(t, e, i) { e.x = u(i, "x", 0), e.y = u(i, "y", 0), e.depth = u(i, "depth", 0), e.flipX = u(i, "flipX", !1), e.flipY = u(i, "flipY", !1); var n = u(i, "scale", null); "number" == typeof n ? e.setScale(n) : null !== n && (e.scaleX = u(n, "x", 1), e.scaleY = u(n, "y", 1)); var s = u(i, "scrollFactor", null); "number" == typeof s ? e.setScrollFactor(s) : null !== s && (e.scrollFactorX = u(s, "x", 1), e.scrollFactorY = u(s, "y", 1)), e.rotation = u(i, "rotation", 0); var r = u(i, "angle", null); null !== r && (e.angle = r), e.alpha = u(i, "alpha", 1); var o, a, h = u(i, "origin", null); return "number" == typeof h ? e.setOrigin(h) : null !== h && (o = u(h, "x", .5), a = u(h, "y", .5), e.setOrigin(o, a)), e.blendMode = u(i, "blendMode", l.NORMAL), e.visible = u(i, "visible", !0), u(i, "add", !0) && t.sys.displayList.add(e), e.preUpdate && t.sys.updateList.add(e), e } } , function(t, e) { t.exports = function(t, e, i, n, s) { var r = n.alpha * i.alpha; if (r <= 0) return !1; var o = t._tempMatrix1.copyFromArray(n.matrix.matrix) , a = t._tempMatrix2.applyITRS(i.x, i.y, i.rotation, i.scaleX, i.scaleY) , h = t._tempMatrix3; return s ? (o.multiplyWithOffset(s, -n.scrollX * i.scrollFactorX, -n.scrollY * i.scrollFactorY), a.e = i.x, a.f = i.y) : (a.e -= n.scrollX * i.scrollFactorX, a.f -= n.scrollY * i.scrollFactorY), o.multiply(a, h), e.globalCompositeOperation = t.blendModes[i.blendMode], e.globalAlpha = r, e.save(), h.setToContext(e), e.imageSmoothingEnabled = !(!t.antialias || i.frame && i.frame.source.scaleMode), !0 } } , function(t, e, i) { var n = i(0) , r = i(13) , c = i(3) , s = new n({ initialize: function(t, e, i, n, s, r) { void 0 === t && (t = 1), void 0 === e && (e = 0), void 0 === i && (i = 0), void 0 === n && (n = 1), void 0 === s && (s = 0), void 0 === r && (r = 0), this.matrix = new Float32Array([t, e, i, n, s, r, 0, 0, 1]), this.decomposedMatrix = { translateX: 0, translateY: 0, scaleX: 1, scaleY: 1, rotation: 0 } }, a: { get: function() { return this.matrix[0] }, set: function(t) { this.matrix[0] = t } }, b: { get: function() { return this.matrix[1] }, set: function(t) { this.matrix[1] = t } }, c: { get: function() { return this.matrix[2] }, set: function(t) { this.matrix[2] = t } }, d: { get: function() { return this.matrix[3] }, set: function(t) { this.matrix[3] = t } }, e: { get: function() { return this.matrix[4] }, set: function(t) { this.matrix[4] = t } }, f: { get: function() { return this.matrix[5] }, set: function(t) { this.matrix[5] = t } }, tx: { get: function() { return this.matrix[4] }, set: function(t) { this.matrix[4] = t } }, ty: { get: function() { return this.matrix[5] }, set: function(t) { this.matrix[5] = t } }, rotation: { get: function() { return Math.acos(this.a / this.scaleX) * (Math.atan(-this.c / this.a) < 0 ? -1 : 1) } }, rotationNormalized: { get: function() { var t = this.matrix , e = t[0] , i = t[1] , n = t[2] , s = t[3]; return e || i ? 0 < i ? Math.acos(e / this.scaleX) : -Math.acos(e / this.scaleX) : n || s ? r.TAU - (0 < s ? Math.acos(-n / this.scaleY) : -Math.acos(n / this.scaleY)) : 0 } }, scaleX: { get: function() { return Math.sqrt(this.a * this.a + this.b * this.b) } }, scaleY: { get: function() { return Math.sqrt(this.c * this.c + this.d * this.d) } }, loadIdentity: function() { var t = this.matrix; return t[0] = 1, t[1] = 0, t[2] = 0, t[3] = 1, t[4] = 0, t[5] = 0, this }, translate: function(t, e) { var i = this.matrix; return i[4] = i[0] * t + i[2] * e + i[4], i[5] = i[1] * t + i[3] * e + i[5], this }, scale: function(t, e) { var i = this.matrix; return i[0] *= t, i[1] *= t, i[2] *= e, i[3] *= e, this }, rotate: function(t) { var e = Math.sin(t) , i = Math.cos(t) , n = this.matrix , s = n[0] , r = n[1] , o = n[2] , a = n[3]; return n[0] = s * i + o * e, n[1] = r * i + a * e, n[2] = s * -e + o * i, n[3] = r * -e + a * i, this }, multiply: function(t, e) { var i = this.matrix , n = t.matrix , s = i[0] , r = i[1] , o = i[2] , a = i[3] , h = i[4] , l = i[5] , u = n[0] , c = n[1] , d = n[2] , f = n[3] , p = n[4] , g = n[5] , v = void 0 === e ? this : e; return v.a = u * s + c * o, v.b = u * r + c * a, v.c = d * s + f * o, v.d = d * r + f * a, v.e = p * s + g * o + h, v.f = p * r + g * a + l, v }, multiplyWithOffset: function(t, e, i) { var n = this.matrix , s = t.matrix , r = n[0] , o = n[1] , a = n[2] , h = n[3] , l = e * r + i * a + n[4] , u = e * o + i * h + n[5] , c = s[0] , d = s[1] , f = s[2] , p = s[3] , g = s[4] , v = s[5]; return n[0] = c * r + d * a, n[1] = c * o + d * h, n[2] = f * r + p * a, n[3] = f * o + p * h, n[4] = g * r + v * a + l, n[5] = g * o + v * h + u, this }, transform: function(t, e, i, n, s, r) { var o = this.matrix , a = o[0] , h = o[1] , l = o[2] , u = o[3] , c = o[4] , d = o[5]; return o[0] = t * a + e * l, o[1] = t * h + e * u, o[2] = i * a + n * l, o[3] = i * h + n * u, o[4] = s * a + r * l + c, o[5] = s * h + r * u + d, this }, transformPoint: function(t, e, i) { void 0 === i && (i = { x: 0, y: 0 }); var n = this.matrix , s = n[0] , r = n[1] , o = n[2] , a = n[3] , h = n[4] , l = n[5]; return i.x = t * s + e * o + h, i.y = t * r + e * a + l, i }, invert: function() { var t = this.matrix , e = t[0] , i = t[1] , n = t[2] , s = t[3] , r = t[4] , o = t[5] , a = e * s - i * n; return t[0] = s / a, t[1] = -i / a, t[2] = -n / a, t[3] = e / a, t[4] = (n * o - s * r) / a, t[5] = -(e * o - i * r) / a, this }, copyFrom: function(t) { var e = this.matrix; return e[0] = t.a, e[1] = t.b, e[2] = t.c, e[3] = t.d, e[4] = t.e, e[5] = t.f, this }, copyFromArray: function(t) { var e = this.matrix; return e[0] = t[0], e[1] = t[1], e[2] = t[2], e[3] = t[3], e[4] = t[4], e[5] = t[5], this }, copyToContext: function(t) { var e = this.matrix; return t.transform(e[0], e[1], e[2], e[3], e[4], e[5]), t }, setToContext: function(t) { var e = this.matrix; return t.setTransform(e[0], e[1], e[2], e[3], e[4], e[5]), t }, copyToArray: function(t) { var e = this.matrix; return void 0 === t ? t = [e[0], e[1], e[2], e[3], e[4], e[5]] : (t[0] = e[0], t[1] = e[1], t[2] = e[2], t[3] = e[3], t[4] = e[4], t[5] = e[5]), t }, setTransform: function(t, e, i, n, s, r) { var o = this.matrix; return o[0] = t, o[1] = e, o[2] = i, o[3] = n, o[4] = s, o[5] = r, this }, decomposeMatrix: function() { var t, e, i = this.decomposedMatrix, n = this.matrix, s = n[0], r = n[1], o = n[2], a = n[3], h = s * a - r * o; return i.translateX = n[4], i.translateY = n[5], s || r ? (t = Math.sqrt(s * s + r * r), i.rotation = 0 < r ? Math.acos(s / t) : -Math.acos(s / t), i.scaleX = t, i.scaleY = h / t) : o || a ? (e = Math.sqrt(o * o + a * a), i.rotation = .5 * Math.PI - (0 < a ? Math.acos(-o / e) : -Math.acos(o / e)), i.scaleX = h / e, i.scaleY = e) : (i.rotation = 0, i.scaleX = 0, i.scaleY = 0), i }, applyITRS: function(t, e, i, n, s) { var r = this.matrix , o = Math.sin(i) , a = Math.cos(i); return r[4] = t, r[5] = e, r[0] = a * n, r[1] = o * n, r[2] = -o * s, r[3] = a * s, this }, applyInverse: function(t, e, i) { void 0 === i && (i = new c); var n = this.matrix , s = n[0] , r = n[1] , o = n[2] , a = n[3] , h = n[4] , l = n[5] , u = 1 / (s * a + o * -r); return i.x = a * u * t + -o * u * e + (l * o - h * a) * u, i.y = s * u * e + -r * u * t + (-l * s + h * r) * u, i }, getX: function(t, e) { return t * this.a + e * this.c + this.e }, getY: function(t, e) { return t * this.b + e * this.d + this.f }, getCSSMatrix: function() { var t = this.matrix; return "matrix(" + t[0] + "," + t[1] + "," + t[2] + "," + t[3] + "," + t[4] + "," + t[5] + ")" }, destroy: function() { this.matrix = null, this.decomposedMatrix = null } }); t.exports = s } , function(t, e, i) { var n = i(0) , s = i(12) , r = i(14) , o = i(56) , a = new n({ Extends: r, Mixins: [s.AlphaSingle, s.BlendMode, s.ComputedSize, s.Depth, s.GetBounds, s.Mask, s.Origin, s.Pipeline, s.ScrollFactor, s.Transform, s.Visible], initialize: function(t, e, i) { void 0 === e && (e = "Shape"), r.call(this, t, e), this.geom = i, this.pathData = [], this.pathIndexes = [], this.fillColor = 16777215, this.fillAlpha = 1, this.strokeColor = 16777215, this.strokeAlpha = 1, this.lineWidth = 1, this.isFilled = !1, this.isStroked = !1, this.closePath = !0, this._tempLine = new o, this.initPipeline() }, setFillStyle: function(t, e) { return void 0 === e && (e = 1), void 0 === t ? this.isFilled = !1 : (this.fillColor = t, this.fillAlpha = e, this.isFilled = !0), this }, setStrokeStyle: function(t, e, i) { return void 0 === i && (i = 1), void 0 === t ? this.isStroked = !1 : (this.lineWidth = t, this.strokeColor = e, this.strokeAlpha = i, this.isStroked = !0), this }, setClosePath: function(t) { return this.closePath = t, this }, preDestroy: function() { this.geom = null, this._tempLine = null, this.pathData = [], this.pathIndexes = [] } }); t.exports = a } , function(t, e, i) { var n = i(0) , r = i(165) , o = i(295) , s = i(166) , a = i(296) , h = new n({ initialize: function(t, e, i, n) { void 0 === t && (t = 0), void 0 === e && (e = 0), void 0 === i && (i = 0), void 0 === n && (n = 255), this.r = 0, this.g = 0, this.b = 0, this.a = 255, this._h = 0, this._s = 0, this._v = 0, this._locked = !1, this.gl = [0, 0, 0, 1], this._color = 0, this._color32 = 0, this._rgba = "", this.setTo(t, e, i, n) }, transparent: function() { return this._locked = !0, this.red = 0, this.green = 0, this.blue = 0, this.alpha = 0, this._locked = !1, this.update(!0) }, setTo: function(t, e, i, n, s) { return void 0 === n && (n = 255), void 0 === s && (s = !0), this._locked = !0, this.red = t, this.green = e, this.blue = i, this.alpha = n, this._locked = !1, this.update(s) }, setGLTo: function(t, e, i, n) { return void 0 === n && (n = 1), this._locked = !0, this.redGL = t, this.greenGL = e, this.blueGL = i, this.alphaGL = n, this._locked = !1, this.update(!0) }, setFromRGB: function(t) { return this._locked = !0, this.red = t.r, this.green = t.g, this.blue = t.b, t.hasOwnProperty("a") && (this.alpha = t.a), this._locked = !1, this.update(!0) }, setFromHSV: function(t, e, i) { return s(t, e, i, this) }, update: function(t) { if (void 0 === t && (t = !1), this._locked) return this; var e = this.r , i = this.g , n = this.b , s = this.a; return this._color = r(e, i, n), this._color32 = o(e, i, n, s), this._rgba = "rgba(" + e + "," + i + "," + n + "," + s / 255 + ")", t && a(e, i, n, this), this }, updateHSV: function() { var t = this.r , e = this.g , i = this.b; return a(t, e, i, this), this }, clone: function() { return new h(this.r,this.g,this.b,this.a) }, gray: function(t) { return this.setTo(t, t, t) }, random: function(t, e) { void 0 === t && (t = 0), void 0 === e && (e = 255); var i = Math.floor(t + Math.random() * (e - t)) , n = Math.floor(t + Math.random() * (e - t)) , s = Math.floor(t + Math.random() * (e - t)); return this.setTo(i, n, s) }, randomGray: function(t, e) { void 0 === t && (t = 0), void 0 === e && (e = 255); var i = Math.floor(t + Math.random() * (e - t)); return this.setTo(i, i, i) }, saturate: function(t) { return this.s += t / 100, this }, desaturate: function(t) { return this.s -= t / 100, this }, lighten: function(t) { return this.v += t / 100, this }, darken: function(t) { return this.v -= t / 100, this }, brighten: function(t) { var e = this.r , i = this.g , n = this.b , e = Math.max(0, Math.min(255, e - Math.round(-t / 100 * 255))) , i = Math.max(0, Math.min(255, i - Math.round(-t / 100 * 255))) , n = Math.max(0, Math.min(255, n - Math.round(-t / 100 * 255))); return this.setTo(e, i, n) }, color: { get: function() { return this._color } }, color32: { get: function() { return this._color32 } }, rgba: { get: function() { return this._rgba } }, redGL: { get: function() { return this.gl[0] }, set: function(t) { this.gl[0] = Math.min(Math.abs(t), 1), this.r = Math.floor(255 * this.gl[0]), this.update(!0) } }, greenGL: { get: function() { return this.gl[1] }, set: function(t) { this.gl[1] = Math.min(Math.abs(t), 1), this.g = Math.floor(255 * this.gl[1]), this.update(!0) } }, blueGL: { get: function() { return this.gl[2] }, set: function(t) { this.gl[2] = Math.min(Math.abs(t), 1), this.b = Math.floor(255 * this.gl[2]), this.update(!0) } }, alphaGL: { get: function() { return this.gl[3] }, set: function(t) { this.gl[3] = Math.min(Math.abs(t), 1), this.a = Math.floor(255 * this.gl[3]), this.update() } }, red: { get: function() { return this.r }, set: function(t) { t = Math.floor(Math.abs(t)), this.r = Math.min(t, 255), this.gl[0] = t / 255, this.update(!0) } }, green: { get: function() { return this.g }, set: function(t) { t = Math.floor(Math.abs(t)), this.g = Math.min(t, 255), this.gl[1] = t / 255, this.update(!0) } }, blue: { get: function() { return this.b }, set: function(t) { t = Math.floor(Math.abs(t)), this.b = Math.min(t, 255), this.gl[2] = t / 255, this.update(!0) } }, alpha: { get: function() { return this.a }, set: function(t) { t = Math.floor(Math.abs(t)), this.a = Math.min(t, 255), this.gl[3] = t / 255, this.update() } }, h: { get: function() { return this._h }, set: function(t) { this._h = t, s(t, this._s, this._v, this) } }, s: { get: function() { return this._s }, set: function(t) { this._s = t, s(this._h, t, this._v, this) } }, v: { get: function() { return this._v }, set: function(t) { this._v = t, s(this._h, this._s, t, this) } } }); t.exports = h } , function(t, e) { t.exports = { CSV: 0, TILED_JSON: 1, ARRAY_2D: 2, WELTMEISTER: 3 } } , function(t, e, i) { var n = { VERSION: "3.24.1", BlendModes: i(52), ScaleModes: i(234), AUTO: 0, CANVAS: 1, WEBGL: 2, HEADLESS: 3, FOREVER: -1, NONE: 4, UP: 5, DOWN: 6, LEFT: 7, RIGHT: 8 }; t.exports = n } , function(t, e) { t.exports = function(t) { return t.y + t.height - t.height * t.originY } } , function(t, e) { t.exports = function(t) { return t.x - t.width * t.originX } } , function(t, e) { t.exports = function(t) { return t.x + t.width - t.width * t.originX } } , function(t, e) { t.exports = function(t) { return t.y - t.height * t.originY } } , function(t, e) { t.exports = function(t, e, i, n, s, r) { var o; void 0 === n && (n = 0), void 0 === s && (s = 0), void 0 === r && (r = 1); var a = 0 , h = t.length; if (1 === r) for (o = s; o < h; o++) t[o][e] += i + a * n, a++; else for (o = s; 0 <= o; o--) t[o][e] += i + a * n, a++; return t } } , function(t, e, i) { var n = i(13); t.exports = function(t) { return t * n.DEG_TO_RAD } } , function(t, e, i) { t.exports = { DESTROY: i(647), FADE_IN_COMPLETE: i(648), FADE_IN_START: i(649), FADE_OUT_COMPLETE: i(650), FADE_OUT_START: i(651), FLASH_COMPLETE: i(652), FLASH_START: i(653), PAN_COMPLETE: i(654), PAN_START: i(655), POST_RENDER: i(656), PRE_RENDER: i(657), ROTATE_COMPLETE: i(658), ROTATE_START: i(659), SHAKE_COMPLETE: i(660), SHAKE_START: i(661), ZOOM_COMPLETE: i(662), ZOOM_START: i(663) } } , function(t, e) { t.exports = function(t, e, i, n) { var s = i || e.fillColor , r = n || e.fillAlpha , o = (16711680 & s) >>> 16 , a = (65280 & s) >>> 8 , h = 255 & s; t.fillStyle = "rgba(" + o + "," + a + "," + h + "," + r + ")" } } , function(t, e) { var h = {}; t.exports = h, function() { h._nextId = 0, h._seed = 0, h._nowStartTime = +new Date, h.extend = function(t, e) { for (var i, n = "boolean" == typeof e ? (i = 2, e) : (i = 1, !0), s = i; s < arguments.length; s++) { var r = arguments[s]; if (r) for (var o in r) !n || !r[o] || r[o].constructor !== Object || t[o] && t[o].constructor !== Object ? t[o] = r[o] : (t[o] = t[o] || {}, h.extend(t[o], n, r[o])) } return t } , h.clone = function(t, e) { return h.extend({}, e, t) } , h.keys = function(t) { if (Object.keys) return Object.keys(t); var e = []; for (var i in t) e.push(i); return e } , h.values = function(t) { var e = []; if (Object.keys) { for (var i = Object.keys(t), n = 0; n < i.length; n++) e.push(t[i[n]]); return e } for (var s in t) e.push(t[s]); return e } , h.get = function(t, e, i, n) { e = e.split(".").slice(i, n); for (var s = 0; s < e.length; s += 1) t = t[e[s]]; return t } , h.set = function(t, e, i, n, s) { var r = e.split(".").slice(n, s); return h.get(t, e, 0, -1)[r[r.length - 1]] = i } , h.shuffle = function(t) { for (var e = t.length - 1; 0 < e; e--) { var i = Math.floor(h.random() * (e + 1)) , n = t[e]; t[e] = t[i], t[i] = n } return t } , h.choose = function(t) { return t[Math.floor(h.random() * t.length)] } , h.isElement = function(t) { return "undefined" != typeof HTMLElement ? t instanceof HTMLElement : !!(t && t.nodeType && t.nodeName) } , h.isArray = function(t) { return "[object Array]" === Object.prototype.toString.call(t) } , h.isFunction = function(t) { return "function" == typeof t } , h.isPlainObject = function(t) { return "object" == typeof t && t.constructor === Object } , h.isString = function(t) { return "[object String]" === Object.prototype.toString.call(t) } , h.clamp = function(t, e, i) { return t < e ? e : i < t ? i : t } , h.sign = function(t) { return t < 0 ? -1 : 1 } , h.now = function() { if ("undefined" != typeof window && window.performance) { if (window.performance.now) return window.performance.now(); if (window.performance.webkitNow) return window.performance.webkitNow() } return new Date - h._nowStartTime } , h.random = function(t, e) { return e = void 0 !== e ? e : 1, (t = void 0 !== t ? t : 0) + i() * (e - t) } ; var i = function() { return h._seed = (9301 * h._seed + 49297) % 233280, h._seed / 233280 }; h.colorToNumber = function(t) { return 3 == (t = t.replace("#", "")).length && (t = t.charAt(0) + t.charAt(0) + t.charAt(1) + t.charAt(1) + t.charAt(2) + t.charAt(2)), parseInt(t, 16) } , h.logLevel = 1, h.log = function() { console && 0 < h.logLevel && h.logLevel <= 3 && console.log.apply(console, ["matter-js:"].concat(Array.prototype.slice.call(arguments))) } , h.info = function() { console && 0 < h.logLevel && h.logLevel <= 2 && console.info.apply(console, ["matter-js:"].concat(Array.prototype.slice.call(arguments))) } , h.warn = function() { console && 0 < h.logLevel && h.logLevel <= 3 && console.warn.apply(console, ["matter-js:"].concat(Array.prototype.slice.call(arguments))) } , h.nextId = function() { return h._nextId++ } , h.indexOf = function(t, e) { if (t.indexOf) return t.indexOf(e); for (var i = 0; i < t.length; i++) if (t[i] === e) return i; return -1 } , h.map = function(t, e) { if (t.map) return t.map(e); for (var i = [], n = 0; n < t.length; n += 1) i.push(e(t[n])); return i } , h.topologicalSort = function(t) { var e = [] , i = [] , n = []; for (var s in t) i[s] || n[s] || h._topologicalSort(s, i, n, t, e); return e } , h._topologicalSort = function(t, e, i, n, s) { var r = n[t] || []; i[t] = !0; for (var o = 0; o < r.length; o += 1) { var a = r[o]; i[a] || e[a] || h._topologicalSort(a, e, i, n, s) } i[t] = !1, e[t] = !0, s.push(t) } , h.chain = function() { for (var r = [], t = 0; t < arguments.length; t += 1) { var e = arguments[t]; e._chained ? r.push.apply(r, e._chained) : r.push(e) } function i() { for (var t, e = new Array(arguments.length), i = 0, n = arguments.length; i < n; i++) e[i] = arguments[i]; for (i = 0; i < r.length; i += 1) { var s = r[i].apply(t, e); void 0 !== s && (t = s) } return t } return i._chained = r, i } , h.chainPathBefore = function(t, e, i) { return h.set(t, e, h.chain(i, h.get(t, e))) } , h.chainPathAfter = function(t, e, i) { return h.set(t, e, h.chain(h.get(t, e), i)) } }() } , function(t, e) { t.exports = function(t, e) { return t.y = e + t.height * t.originY, t } } , function(t, e) { t.exports = function(t, e) { return t.x = e + t.width * t.originX, t } } , function(t, e) { t.exports = function(t, e) { return t.x = e - t.width + t.width * t.originX, t } } , function(t, e) { t.exports = function(t, e) { return t.y = e - t.height + t.height * t.originY, t } } , function(t, e) { t.exports = { CIRCLE: 0, ELLIPSE: 1, LINE: 2, POINT: 3, POLYGON: 4, RECTANGLE: 5, TRIANGLE: 6 } } , function(t, e) { t.exports = function(t, e, i) { return !(t.width <= 0 || t.height <= 0) && (t.x <= e && t.x + t.width >= e && t.y <= i && t.y + t.height >= i) } } , function(t, e) { t.exports = function(t, e, i, n) { var s = i || e.strokeColor , r = n || e.strokeAlpha , o = (16711680 & s) >>> 16 , a = (65280 & s) >>> 8 , h = 255 & s; t.strokeStyle = "rgba(" + o + "," + a + "," + h + "," + r + ")", t.lineWidth = e.lineWidth } } , function(t, e) { t.exports = { DYNAMIC_BODY: 0, STATIC_BODY: 1, GROUP: 2, TILEMAPLAYER: 3, FACING_NONE: 10, FACING_UP: 11, FACING_DOWN: 12, FACING_LEFT: 13, FACING_RIGHT: 14 } } , function(t, e, i) { var d = i(142) , f = i(24); t.exports = function(t, e, i, n, s) { for (var r, o, a, h, l = f(t, e, i, n, null, s), u = 0; u < l.length; u++) { var c = l[u]; c && (c.collides ? (r = d(c.x, c.y - 1, !0, s), o = d(c.x, c.y + 1, !0, s), a = d(c.x - 1, c.y, !0, s), h = d(c.x + 1, c.y, !0, s), c.faceTop = !r || !r.collides, c.faceBottom = !o || !o.collides, c.faceLeft = !a || !a.collides, c.faceRight = !h || !h.collides) : c.resetFaces()) } } } , function(t, e) { t.exports = { SKIP_CHECK: -1, NORMAL: 0, ADD: 1, MULTIPLY: 2, SCREEN: 3, OVERLAY: 4, DARKEN: 5, LIGHTEN: 6, COLOR_DODGE: 7, COLOR_BURN: 8, HARD_LIGHT: 9, SOFT_LIGHT: 10, DIFFERENCE: 11, EXCLUSION: 12, HUE: 13, SATURATION: 14, COLOR: 15, LUMINOSITY: 16, ERASE: 17, SOURCE_IN: 18, SOURCE_OUT: 19, SOURCE_ATOP: 20, DESTINATION_OVER: 21, DESTINATION_IN: 22, DESTINATION_OUT: 23, DESTINATION_ATOP: 24, LIGHTER: 25, COPY: 26, XOR: 27 } } , function(t, e) { t.exports = function(t, e, i, n) { var s = t - i , r = e - n; return Math.sqrt(s * s + r * r) } } , function(t, e, i) { t.exports = { BOOT: i(823), DESTROY: i(824), DRAG_END: i(825), DRAG_ENTER: i(826), DRAG: i(827), DRAG_LEAVE: i(828), DRAG_OVER: i(829), DRAG_START: i(830), DROP: i(831), GAME_OUT: i(832), GAME_OVER: i(833), GAMEOBJECT_DOWN: i(834), GAMEOBJECT_DRAG_END: i(835), GAMEOBJECT_DRAG_ENTER: i(836), GAMEOBJECT_DRAG: i(837), GAMEOBJECT_DRAG_LEAVE: i(838), GAMEOBJECT_DRAG_OVER: i(839), GAMEOBJECT_DRAG_START: i(840), GAMEOBJECT_DROP: i(841), GAMEOBJECT_MOVE: i(842), GAMEOBJECT_OUT: i(843), GAMEOBJECT_OVER: i(844), GAMEOBJECT_POINTER_DOWN: i(845), GAMEOBJECT_POINTER_MOVE: i(846), GAMEOBJECT_POINTER_OUT: i(847), GAMEOBJECT_POINTER_OVER: i(848), GAMEOBJECT_POINTER_UP: i(849), GAMEOBJECT_POINTER_WHEEL: i(850), GAMEOBJECT_UP: i(851), GAMEOBJECT_WHEEL: i(852), MANAGER_BOOT: i(853), MANAGER_PROCESS: i(854), MANAGER_UPDATE: i(855), POINTER_DOWN: i(856), POINTER_DOWN_OUTSIDE: i(857), POINTER_MOVE: i(858), POINTER_OUT: i(859), POINTER_OVER: i(860), POINTER_UP: i(861), POINTER_UP_OUTSIDE: i(862), POINTER_WHEEL: i(863), POINTERLOCK_CHANGE: i(864), PRE_UPDATE: i(865), SHUTDOWN: i(866), START: i(867), UPDATE: i(868) } } , function(t, e) { t.exports = function(t, e, i) { return 0 < t.radius && e >= t.left && e <= t.right && i >= t.top && i <= t.bottom && (t.x - e) * (t.x - e) + (t.y - i) * (t.y - i) <= t.radius * t.radius } } , function(t, e, i) { var n = i(0) , s = i(275) , r = i(153) , o = i(47) , a = i(154) , h = i(3) , l = new n({ initialize: function(t, e, i, n) { void 0 === t && (t = 0), void 0 === e && (e = 0), void 0 === i && (i = 0), void 0 === n && (n = 0), this.type = o.LINE, this.x1 = t, this.y1 = e, this.x2 = i, this.y2 = n }, getPoint: function(t, e) { return s(this, t, e) }, getPoints: function(t, e, i) { return r(this, t, e, i) }, getRandomPoint: function(t) { return a(this, t) }, setTo: function(t, e, i, n) { return void 0 === t && (t = 0), void 0 === e && (e = 0), void 0 === i && (i = 0), void 0 === n && (n = 0), this.x1 = t, this.y1 = e, this.x2 = i, this.y2 = n, this }, getPointA: function(t) { return void 0 === t && (t = new h), t.set(this.x1, this.y1), t }, getPointB: function(t) { return void 0 === t && (t = new h), t.set(this.x2, this.y2), t }, left: { get: function() { return Math.min(this.x1, this.x2) }, set: function(t) { this.x1 <= this.x2 ? this.x1 = t : this.x2 = t } }, right: { get: function() { return Math.max(this.x1, this.x2) }, set: function(t) { this.x1 > this.x2 ? this.x1 = t : this.x2 = t } }, top: { get: function() { return Math.min(this.y1, this.y2) }, set: function(t) { this.y1 <= this.y2 ? this.y1 = t : this.y2 = t } }, bottom: { get: function() { return Math.max(this.y1, this.y2) }, set: function(t) { this.y1 > this.y2 ? this.y1 = t : this.y2 = t } } }); t.exports = l } , function(t, e) { t.exports = function(t) { return Math.sqrt((t.x2 - t.x1) * (t.x2 - t.x1) + (t.y2 - t.y1) * (t.y2 - t.y1)) } } , function(t, e) { t.exports = function(t, e, i) { var n = i - e; return e + ((t - e) % n + n) % n } } , function(t, e, i) { t.exports = { COMPLETE: i(891), DECODED: i(892), DECODED_ALL: i(893), DESTROY: i(894), DETUNE: i(895), GLOBAL_DETUNE: i(896), GLOBAL_MUTE: i(897), GLOBAL_RATE: i(898), GLOBAL_VOLUME: i(899), LOOP: i(900), LOOPED: i(901), MUTE: i(902), PAUSE_ALL: i(903), PAUSE: i(904), PLAY: i(905), RATE: i(906), RESUME_ALL: i(907), RESUME: i(908), SEEK: i(909), STOP_ALL: i(910), STOP: i(911), UNLOCKED: i(912), VOLUME: i(913) } } , function(t, e, i) { var n = i(0) , h = i(17) , l = i(21) , s = i(8) , u = i(2) , c = i(6) , d = i(7) , r = new n({ Extends: l, initialize: function(t, e, i, n, s) { var r, o = "json"; d(e) && (e = u(r = e, "key"), i = u(r, "url"), n = u(r, "xhrSettings"), o = u(r, "extension", o), s = u(r, "dataKey", s)); var a = { type: "json", cache: t.cacheManager.json, extension: o, responseType: "text", key: e, url: i, xhrSettings: n, config: s }; l.call(this, t, a), d(i) && (this.data = s ? c(i, s) : i, this.state = h.FILE_POPULATED) }, onProcess: function() { var t, e; this.state !== h.FILE_POPULATED && (this.state = h.FILE_PROCESSING, t = JSON.parse(this.xhrLoader.responseText), e = this.config, this.data = "string" == typeof e ? c(t, e, t) : t), this.onProcessComplete() } }); s.register("json", function(t, e, i, n) { if (Array.isArray(t)) for (var s = 0; s < t.length; s++) this.addFile(new r(this,t[s])); else this.addFile(new r(this,t,e,n,i)); return this }), t.exports = r } , function(t, e, i) { var n = new (i(0))({ initialize: function(t, e, i, n) { this.loader = t, this.type = e, this.key = i, this.multiKeyIndex = t.multiKeyIndex++, this.files = n, this.complete = !1, this.pending = n.length, this.failed = 0, this.config = {}, this.baseURL = t.baseURL, this.path = t.path, this.prefix = t.prefix; for (var s = 0; s < n.length; s++) n[s].multiFile = this }, isReadyToProcess: function() { return 0 === this.pending && 0 === this.failed && !this.complete }, addToMultiFile: function(t) { return this.files.push(t), (t.multiFile = this).pending++, this.complete = !1, this }, onFileComplete: function(t) { -1 !== this.files.indexOf(t) && this.pending-- }, onFileFailed: function(t) { -1 !== this.files.indexOf(t) && this.failed++ } }); t.exports = n } , function(t, e, i) { var p = {}; t.exports = p; var g = i(86) , u = i(99) , s = i(239) , r = i(42) , v = i(100) , c = i(513); !function() { p._inertiaScale = 4, p._nextCollidingGroupId = 1, p._nextNonCollidingGroupId = -1, p._nextCategory = 1, p.create = function(t) { var e = { id: r.nextId(), type: "body", label: "Body", parts: [], plugin: {}, angle: 0, vertices: null, position: { x: 0, y: 0 }, force: { x: 0, y: 0 }, torque: 0, positionImpulse: { x: 0, y: 0 }, previousPositionImpulse: { x: 0, y: 0 }, constraintImpulse: { x: 0, y: 0, angle: 0 }, totalContacts: 0, speed: 0, angularSpeed: 0, velocity: { x: 0, y: 0 }, angularVelocity: 0, isSensor: !1, isStatic: !1, isSleeping: !1, motion: 0, sleepThreshold: 60, density: .001, restitution: 0, friction: .1, frictionStatic: .5, frictionAir: .01, collisionFilter: { category: 1, mask: 4294967295, group: 0 }, slop: .05, timeScale: 1, events: null, bounds: null, chamfer: null, circleRadius: 0, positionPrev: null, anglePrev: 0, parent: null, axes: null, area: 0, mass: 0, inverseMass: 0, inertia: 0, inverseInertia: 0, _original: null, render: { visible: !0, opacity: 1, sprite: { xOffset: 0, yOffset: 0 }, fillColor: null, fillOpacity: null, lineColor: null, lineOpacity: null, lineThickness: null }, gameObject: null, scale: { x: 1, y: 1 }, centerOfMass: { x: 0, y: 0 }, centerOffset: { x: 0, y: 0 }, gravityScale: { x: 1, y: 1 }, ignoreGravity: !1, ignorePointer: !1, onCollideCallback: null, onCollideEndCallback: null, onCollideActiveCallback: null, onCollideWith: {} }; !t.hasOwnProperty("position") && t.hasOwnProperty("vertices") ? t.position = g.centre(t.vertices) : t.hasOwnProperty("vertices") || (e.vertices = g.fromPath("L 0 0 L 40 0 L 40 40 L 0 40")); var i = r.extend(e, t); return n(i, t), i.setOnCollideWith = function(t, e) { return e ? this.onCollideWith[t.id] = e : delete this.onCollideWith[t.id], this } , i } , p.nextGroup = function(t) { return t ? p._nextNonCollidingGroupId-- : p._nextCollidingGroupId++ } , p.nextCategory = function() { return p._nextCategory = p._nextCategory << 1, p._nextCategory } ; var n = function(t, e) { e = e || {}, p.set(t, { bounds: t.bounds || v.create(t.vertices), positionPrev: t.positionPrev || u.clone(t.position), anglePrev: t.anglePrev || t.angle, vertices: t.vertices, parts: t.parts || [t], isStatic: t.isStatic, isSleeping: t.isSleeping, parent: t.parent || t }); var i, n, s, r, o = t.bounds; g.rotate(t.vertices, t.angle, t.position), c.rotate(t.axes, t.angle), v.update(o, t.vertices, t.velocity), p.set(t, { axes: e.axes || t.axes, area: e.area || t.area, mass: e.mass || t.mass, inertia: e.inertia || t.inertia }), 1 === t.parts.length && (i = t.centerOfMass, n = t.centerOffset, s = o.max.x - o.min.x, r = o.max.y - o.min.y, i.x = -(o.min.x - t.position.x) / s, i.y = -(o.min.y - t.position.y) / r, n.x = s * i.x, n.y = r * i.y) }; p.set = function(t, e, i) { var n; for (n in "string" == typeof e && (n = e, (e = {})[n] = i), e) if (Object.prototype.hasOwnProperty.call(e, n)) switch (i = e[n], n) { case "isStatic": p.setStatic(t, i); break; case "isSleeping": s.set(t, i); break; case "mass": p.setMass(t, i); break; case "density": p.setDensity(t, i); break; case "inertia": p.setInertia(t, i); break; case "vertices": p.setVertices(t, i); break; case "position": p.setPosition(t, i); break; case "angle": p.setAngle(t, i); break; case "velocity": p.setVelocity(t, i); break; case "angularVelocity": p.setAngularVelocity(t, i); break; case "parts": p.setParts(t, i); break; case "centre": p.setCentre(t, i); break; default: t[n] = i } } , p.setStatic = function(t, e) { for (var i = 0; i < t.parts.length; i++) { var n = t.parts[i]; (n.isStatic = e) ? (n._original = { restitution: n.restitution, friction: n.friction, mass: n.mass, inertia: n.inertia, density: n.density, inverseMass: n.inverseMass, inverseInertia: n.inverseInertia }, n.restitution = 0, n.friction = 1, n.mass = n.inertia = n.density = 1 / 0, n.inverseMass = n.inverseInertia = 0, n.positionPrev.x = n.position.x, n.positionPrev.y = n.position.y, n.anglePrev = n.angle, n.angularVelocity = 0, n.speed = 0, n.angularSpeed = 0, n.motion = 0) : n._original && (n.restitution = n._original.restitution, n.friction = n._original.friction, n.mass = n._original.mass, n.inertia = n._original.inertia, n.density = n._original.density, n.inverseMass = n._original.inverseMass, n.inverseInertia = n._original.inverseInertia, n._original = null) } } , p.setMass = function(t, e) { var i = t.inertia / (t.mass / 6); t.inertia = e / 6 * i, t.inverseInertia = 1 / t.inertia, t.mass = e, t.inverseMass = 1 / t.mass, t.density = t.mass / t.area } , p.setDensity = function(t, e) { p.setMass(t, e * t.area), t.density = e } , p.setInertia = function(t, e) { t.inertia = e, t.inverseInertia = 1 / t.inertia } , p.setVertices = function(t, e) { e[0].body === t ? t.vertices = e : t.vertices = g.create(e, t), t.axes = c.fromVertices(t.vertices), t.area = g.area(t.vertices), p.setMass(t, t.density * t.area); var i = g.centre(t.vertices); g.translate(t.vertices, i, -1), p.setInertia(t, p._inertiaScale * g.inertia(t.vertices, t.mass)), g.translate(t.vertices, t.position), v.update(t.bounds, t.vertices, t.velocity) } , p.setParts = function(t, e, i) { for (e = e.slice(0), t.parts.length = 0, t.parts.push(t), t.parent = t, r = 0; r < e.length; r++) { var n = e[r]; n !== t && (n.parent = t).parts.push(n) } if (1 !== t.parts.length) { if (i = void 0 === i || i) { for (var s = [], r = 0; r < e.length; r++) s = s.concat(e[r].vertices); g.clockwiseSort(s); var o = g.hull(s) , a = g.centre(o); p.setVertices(t, o), g.translate(t.vertices, a) } var h = p._totalProperties(t) , l = h.centre.x , u = h.centre.y , c = t.bounds , d = t.centerOfMass , f = t.centerOffset; v.update(c, t.vertices, t.velocity), d.x = -(c.min.x - l) / (c.max.x - c.min.x), d.y = -(c.min.y - u) / (c.max.y - c.min.y), f.x = l, f.y = u, t.area = h.area, (t.parent = t).position.x = l, t.position.y = u, t.positionPrev.x = l, t.positionPrev.y = u, p.setMass(t, h.mass), p.setInertia(t, h.inertia), p.setPosition(t, h.centre) } } , p.setCentre = function(t, e, i) { i ? (t.positionPrev.x += e.x, t.positionPrev.y += e.y, t.position.x += e.x, t.position.y += e.y) : (t.positionPrev.x = e.x - (t.position.x - t.positionPrev.x), t.positionPrev.y = e.y - (t.position.y - t.positionPrev.y), t.position.x = e.x, t.position.y = e.y) } , p.setPosition = function(t, e) { var i = u.sub(e, t.position); t.positionPrev.x += i.x, t.positionPrev.y += i.y; for (var n = 0; n < t.parts.length; n++) { var s = t.parts[n]; s.position.x += i.x, s.position.y += i.y, g.translate(s.vertices, i), v.update(s.bounds, s.vertices, t.velocity) } } , p.setAngle = function(t, e) { var i = e - t.angle; t.anglePrev += i; for (var n = 0; n < t.parts.length; n++) { var s = t.parts[n]; s.angle += i, g.rotate(s.vertices, i, t.position), c.rotate(s.axes, i), v.update(s.bounds, s.vertices, t.velocity), 0 < n && u.rotateAbout(s.position, i, t.position, s.position) } } , p.setVelocity = function(t, e) { t.positionPrev.x = t.position.x - e.x, t.positionPrev.y = t.position.y - e.y, t.velocity.x = e.x, t.velocity.y = e.y, t.speed = u.magnitude(t.velocity) } , p.setAngularVelocity = function(t, e) { t.anglePrev = t.angle - e, t.angularVelocity = e, t.angularSpeed = Math.abs(t.angularVelocity) } , p.translate = function(t, e) { p.setPosition(t, u.add(t.position, e)) } , p.rotate = function(t, e, i) { var n, s, r, o; i && (n = Math.cos(e), s = Math.sin(e), r = t.position.x - i.x, o = t.position.y - i.y, p.setPosition(t, { x: i.x + (r * n - o * s), y: i.y + (r * s + o * n) })), p.setAngle(t, t.angle + e) } , p.scale = function(t, e, i, n) { var s = 0 , r = 0; n = n || t.position; for (var o = 0; o < t.parts.length; o++) { var a = t.parts[o]; a.scale.x = e, a.scale.y = i, g.scale(a.vertices, e, i, n), a.axes = c.fromVertices(a.vertices), a.area = g.area(a.vertices), p.setMass(a, t.density * a.area), g.translate(a.vertices, { x: -a.position.x, y: -a.position.y }), p.setInertia(a, p._inertiaScale * g.inertia(a.vertices, a.mass)), g.translate(a.vertices, { x: a.position.x, y: a.position.y }), 0 < o && (s += a.area, r += a.inertia), a.position.x = n.x + (a.position.x - n.x) * e, a.position.y = n.y + (a.position.y - n.y) * i, v.update(a.bounds, a.vertices, t.velocity) } 1 < t.parts.length && (t.area = s, t.isStatic || (p.setMass(t, t.density * s), p.setInertia(t, r))), t.circleRadius && (e === i ? t.circleRadius *= e : t.circleRadius = null) } , p.update = function(t, e, i, n) { var s = Math.pow(e * i * t.timeScale, 2) , r = 1 - t.frictionAir * i * t.timeScale , o = t.position.x - t.positionPrev.x , a = t.position.y - t.positionPrev.y; t.velocity.x = o * r * n + t.force.x / t.mass * s, t.velocity.y = a * r * n + t.force.y / t.mass * s, t.positionPrev.x = t.position.x, t.positionPrev.y = t.position.y, t.position.x += t.velocity.x, t.position.y += t.velocity.y, t.angularVelocity = (t.angle - t.anglePrev) * r * n + t.torque / t.inertia * s, t.anglePrev = t.angle, t.angle += t.angularVelocity, t.speed = u.magnitude(t.velocity), t.angularSpeed = Math.abs(t.angularVelocity); for (var h = 0; h < t.parts.length; h++) { var l = t.parts[h]; g.translate(l.vertices, t.velocity), 0 < h && (l.position.x += t.velocity.x, l.position.y += t.velocity.y), 0 !== t.angularVelocity && (g.rotate(l.vertices, t.angularVelocity, t.position), c.rotate(l.axes, t.angularVelocity), 0 < h && u.rotateAbout(l.position, t.angularVelocity, t.position, l.position)), v.update(l.bounds, l.vertices, t.velocity) } } , p.applyForce = function(t, e, i) { t.force.x += i.x, t.force.y += i.y; var n = e.x - t.position.x , s = e.y - t.position.y; t.torque += n * i.y - s * i.x } , p._totalProperties = function(t) { for (var e = { mass: 0, area: 0, inertia: 0, centre: { x: 0, y: 0 } }, i = 1 === t.parts.length ? 0 : 1; i < t.parts.length; i++) { var n = t.parts[i] , s = n.mass !== 1 / 0 ? n.mass : 1; e.mass += s, e.area += n.area, e.inertia += n.inertia, e.centre = u.add(e.centre, u.mult(n.position, s)) } return e.centre = u.div(e.centre, e.mass), e } }() } , function(t, e) { t.exports = function(t, e, i, n) { void 0 === e && (e = !0); var s = n.baseTileWidth , r = n.tilemapLayer; return r && (void 0 === i && (i = r.scene.cameras.main), t -= r.x + i.scrollX * (1 - r.scrollFactorX), s *= r.scaleX), e ? Math.floor(t / s) : t / s } } , function(t, e) { t.exports = function(t, e, i, n) { void 0 === e && (e = !0); var s = n.baseTileHeight , r = n.tilemapLayer; return r && (void 0 === i && (i = r.scene.cameras.main), t -= r.y + i.scrollY * (1 - r.scrollFactorY), s *= r.scaleY), e ? Math.floor(t / s) : t / s } } , function(t, e, i) { var n = i(0) , s = i(55) , r = i(266) , o = i(267) , a = i(47) , h = i(150) , l = new n({ initialize: function(t, e, i) { void 0 === t && (t = 0), void 0 === e && (e = 0), void 0 === i && (i = 0), this.type = a.CIRCLE, this.x = t, this.y = e, this._radius = i, this._diameter = 2 * i }, contains: function(t, e) { return s(this, t, e) }, getPoint: function(t, e) { return r(this, t, e) }, getPoints: function(t, e, i) { return o(this, t, e, i) }, getRandomPoint: function(t) { return h(this, t) }, setTo: function(t, e, i) { return this.x = t, this.y = e, this._radius = i, this._diameter = 2 * i, this }, setEmpty: function() { return this._radius = 0, this._diameter = 0, this }, setPosition: function(t, e) { return void 0 === e && (e = t), this.x = t, this.y = e, this }, isEmpty: function() { return this._radius <= 0 }, radius: { get: function() { return this._radius }, set: function(t) { this._radius = t, this._diameter = 2 * t } }, diameter: { get: function() { return this._diameter }, set: function(t) { this._diameter = t, this._radius = .5 * t } }, left: { get: function() { return this.x - this._radius }, set: function(t) { this.x = t + this._radius } }, right: { get: function() { return this.x + this._radius }, set: function(t) { this.x = t - this._radius } }, top: { get: function() { return this.y - this._radius }, set: function(t) { this.y = t + this._radius } }, bottom: { get: function() { return this.y + this._radius }, set: function(t) { this.y = t - this._radius } } }); t.exports = l } , function(t, e, i) { "use strict"; function n(t, e, i) { i = i || 2; var n, s, r, o, a, h, l, u = e && e.length, c = u ? e[0] * i : t.length, d = g(t, 0, c, i, !0), f = []; if (!d || d.next === d.prev) return f; if (u && (d = function(t, e, i, n) { var s, r, o, a, h, l = []; for (s = 0, r = e.length; s < r; s++) o = e[s] * n, a = s < r - 1 ? e[s + 1] * n : t.length, (h = g(t, o, a, n, !1)) === h.next && (h.steiner = !0), l.push(function(t) { var e = t , i = t; for (; e.x < i.x && (i = e), e = e.next, e !== t; ) ; return i }(h)); for (l.sort(y), s = 0; s < l.length; s++) !function(t, e) { { var i; (e = function(t, e) { var i, n = e, s = t.x, r = t.y, o = -1 / 0; do { if (r <= n.y && r >= n.next.y && n.next.y !== n.y) { var a = n.x + (r - n.y) * (n.next.x - n.x) / (n.next.y - n.y); if (a <= s && o < a) { if ((o = a) === s) { if (r === n.y) return n; if (r === n.next.y) return n.next } i = n.x < n.next.x ? n : n.next } } n = n.next } while (n !== e); if (!i) return null; if (s === o) return i.prev; var h, l = i, u = i.x, c = i.y, d = 1 / 0; n = i.next; for (; n !== l; ) s >= n.x && n.x >= u && s !== n.x && T(r < c ? s : o, r, u, c, r < c ? o : s, r, n.x, n.y) && ((h = Math.abs(r - n.y) / (s - n.x)) < d || h === d && n.x > i.x) && b(n, t) && (i = n, d = h), n = n.next; return i }(t, e)) && v(i = E(e, t), i.next) } }(l[s], i), i = v(i, i.next); return i }(t, e, d, i)), t.length > 80 * i) { n = r = t[0], s = o = t[1]; for (var p = i; p < c; p += i) (a = t[p]) < n && (n = a), (h = t[p + 1]) < s && (s = h), r < a && (r = a), o < h && (o = h); l = 0 !== (l = Math.max(r - n, o - s)) ? 1 / l : 0 } return m(d, f, i, n, s, l), f } function g(t, e, i, n, s) { var r, o; if (s === 0 < S(t, e, i, n)) for (r = e; r < i; r += n) o = a(r, t[r], t[r + 1], o); else for (r = i - n; e <= r; r -= n) o = a(r, t[r], t[r + 1], o); return o && u(o, o.next) && (d(o), o = o.next), o } function v(t, e) { if (!t) return t; e = e || t; var i, n = t; do { if (i = !1, n.steiner || !u(n, n.next) && 0 !== w(n.prev, n, n.next)) n = n.next; else { if (d(n), (n = e = n.prev) === n.next) break; i = !0 } } while (i || n !== e); return e } function m(t, e, i, n, s, r, o) { if (t) { !o && r && function(t, e, i, n) { var s = t; for (; null === s.z && (s.z = x(s.x, s.y, e, i, n)), s.prevZ = s.prev, s.nextZ = s.next, s = s.next, s !== t; ) ; s.prevZ.nextZ = null, s.prevZ = null, function(t) { var e, i, n, s, r, o, a, h, l = 1; do { for (i = t, r = t = null, o = 0; i; ) { for (o++, n = i, e = a = 0; e < l && (a++, n = n.nextZ); e++) ; for (h = l; 0 < a || 0 < h && n; ) 0 !== a && (0 === h || !n || i.z <= n.z) ? (i = (s = i).nextZ, a--) : (n = (s = n).nextZ, h--), r ? r.nextZ = s : t = s, s.prevZ = r, r = s; i = n } r.nextZ = null, l *= 2 } while (1 < o) }(s) }(t, n, s, r); for (var a, h, l = t; t.prev !== t.next; ) if (a = t.prev, h = t.next, r ? function(t, e, i, n) { var s = t.prev , r = t , o = t.next; if (0 <= w(s, r, o)) return !1; var a = s.x < r.x ? s.x < o.x ? s.x : o.x : r.x < o.x ? r.x : o.x , h = s.y < r.y ? s.y < o.y ? s.y : o.y : r.y < o.y ? r.y : o.y , l = s.x > r.x ? s.x > o.x ? s.x : o.x : r.x > o.x ? r.x : o.x , u = s.y > r.y ? s.y > o.y ? s.y : o.y : r.y > o.y ? r.y : o.y , c = x(a, h, e, i, n) , d = x(l, u, e, i, n) , f = t.prevZ , p = t.nextZ; for (; f && f.z >= c && p && p.z <= d; ) { if (f !== t.prev && f !== t.next && T(s.x, s.y, r.x, r.y, o.x, o.y, f.x, f.y) && 0 <= w(f.prev, f, f.next)) return !1; if (f = f.prevZ, p !== t.prev && p !== t.next && T(s.x, s.y, r.x, r.y, o.x, o.y, p.x, p.y) && 0 <= w(p.prev, p, p.next)) return !1; p = p.nextZ } for (; f && f.z >= c; ) { if (f !== t.prev && f !== t.next && T(s.x, s.y, r.x, r.y, o.x, o.y, f.x, f.y) && 0 <= w(f.prev, f, f.next)) return !1; f = f.prevZ } for (; p && p.z <= d; ) { if (p !== t.prev && p !== t.next && T(s.x, s.y, r.x, r.y, o.x, o.y, p.x, p.y) && 0 <= w(p.prev, p, p.next)) return !1; p = p.nextZ } return !0 }(t, n, s, r) : function(t) { var e = t.prev , i = t , n = t.next; if (0 <= w(e, i, n)) return !1; var s = t.next.next; for (; s !== t.prev; ) { if (T(e.x, e.y, i.x, i.y, n.x, n.y, s.x, s.y) && 0 <= w(s.prev, s, s.next)) return !1; s = s.next } return !0 }(t)) e.push(a.i / i), e.push(t.i / i), e.push(h.i / i), d(t), t = h.next, l = h.next; else if ((t = h) === l) { o ? 1 === o ? m(t = function(t, e, i) { var n = t; do { var s = n.prev , r = n.next.next; !u(s, r) && c(s, n, n.next, r) && b(s, r) && b(r, s) && (e.push(s.i / i), e.push(n.i / i), e.push(r.i / i), d(n), d(n.next), n = t = r), n = n.next } while (n !== t); return n }(t, e, i), e, i, n, s, r, 2) : 2 === o && function(t, e, i, n, s, r) { var o = t; do { for (var a = o.next.next; a !== o.prev; ) { if (o.i !== a.i && function(t, e) { return t.next.i !== e.i && t.prev.i !== e.i && !function(t, e) { var i = t; do { if (i.i !== t.i && i.next.i !== t.i && i.i !== e.i && i.next.i !== e.i && c(i, i.next, t, e)) return !0; i = i.next } while (i !== t); return !1 }(t, e) && b(t, e) && b(e, t) && function(t, e) { var i = t , n = !1 , s = (t.x + e.x) / 2 , r = (t.y + e.y) / 2; for (; i.y > r != i.next.y > r && i.next.y !== i.y && s < (i.next.x - i.x) * (r - i.y) / (i.next.y - i.y) + i.x && (n = !n), i = i.next, i !== t; ) ; return n }(t, e) }(o, a)) { var h = E(o, a); return o = v(o, o.next), h = v(h, h.next), m(o, e, i, n, s, r), m(h, e, i, n, s, r) } a = a.next } o = o.next } while (o !== t) }(t, e, i, n, s, r) : m(v(t), e, i, n, s, r, 1); break } } } function y(t, e) { return t.x - e.x } function x(t, e, i, n, s) { return (t = 1431655765 & ((t = 858993459 & ((t = 252645135 & ((t = 16711935 & ((t = 32767 * (t - i) * s) | t << 8)) | t << 4)) | t << 2)) | t << 1)) | (e = 1431655765 & ((e = 858993459 & ((e = 252645135 & ((e = 16711935 & ((e = 32767 * (e - n) * s) | e << 8)) | e << 4)) | e << 2)) | e << 1)) << 1 } function T(t, e, i, n, s, r, o, a) { return 0 <= (s - o) * (e - a) - (t - o) * (r - a) && 0 <= (t - o) * (n - a) - (i - o) * (e - a) && 0 <= (i - o) * (r - a) - (s - o) * (n - a) } function w(t, e, i) { return (e.y - t.y) * (i.x - e.x) - (e.x - t.x) * (i.y - e.y) } function u(t, e) { return t.x === e.x && t.y === e.y } function c(t, e, i, n) { return u(t, e) && u(i, n) || u(t, n) && u(i, e) || 0 < w(t, e, i) != 0 < w(t, e, n) && 0 < w(i, n, t) != 0 < w(i, n, e) } function b(t, e) { return w(t.prev, t, t.next) < 0 ? 0 <= w(t, e, t.next) && 0 <= w(t, t.prev, e) : w(t, e, t.prev) < 0 || w(t, t.next, e) < 0 } function E(t, e) { var i = new o(t.i,t.x,t.y) , n = new o(e.i,e.x,e.y) , s = t.next , r = e.prev; return (t.next = e).prev = t, (i.next = s).prev = i, (n.next = i).prev = n, (r.next = n).prev = r, n } function a(t, e, i, n) { var s = new o(t,e,i); return n ? (s.next = n.next, (s.prev = n).next.prev = s, n.next = s) : (s.prev = s).next = s, s } function d(t) { t.next.prev = t.prev, t.prev.next = t.next, t.prevZ && (t.prevZ.nextZ = t.nextZ), t.nextZ && (t.nextZ.prevZ = t.prevZ) } function o(t, e, i) { this.i = t, this.x = e, this.y = i, this.prev = null, this.next = null, this.z = null, this.prevZ = null, this.nextZ = null, this.steiner = !1 } function S(t, e, i, n) { for (var s = 0, r = e, o = i - n; r < i; r += n) s += (t[o] - t[r]) * (t[r + 1] + t[o + 1]), o = r; return s } (t.exports = n).deviation = function(t, e, i, n) { var s = e && e.length , r = s ? e[0] * i : t.length , o = Math.abs(S(t, 0, r, i)); if (s) for (var a = 0, h = e.length; a < h; a++) { var l = e[a] * i , u = a < h - 1 ? e[a + 1] * i : t.length; o -= Math.abs(S(t, l, u, i)) } for (var c = 0, a = 0; a < n.length; a += 3) { var d = n[a] * i , f = n[a + 1] * i , p = n[a + 2] * i; c += Math.abs((t[d] - t[p]) * (t[1 + f] - t[1 + d]) - (t[d] - t[f]) * (t[1 + p] - t[1 + d])) } return 0 === o && 0 === c ? 0 : Math.abs((c - o) / o) } , n.flatten = function(t) { for (var e = t[0][0].length, i = { vertices: [], holes: [], dimensions: e }, n = 0, s = 0; s < t.length; s++) { for (var r = 0; r < t[s].length; r++) for (var o = 0; o < e; o++) i.vertices.push(t[s][r][o]); 0 < s && (n += t[s - 1].length, i.holes.push(n)) } return i } } , function(t, e) { t.exports = function(t) { var e = {}; for (var i in t) Array.isArray(t[i]) ? e[i] = t[i].slice(0) : e[i] = t[i]; return e } } , function(t, e) { t.exports = function(t, e, i, n) { var s = t.length; if (e < 0 || s < e || i <= e || s < i || s < e + i) { if (n) throw new Error("Range Error: Values outside acceptable range"); return !1 } return !0 } } , function(t, e, i) { var r = i(115) , o = i(181); t.exports = function(t, e) { var i, n = r.Power0; if ("string" == typeof t ? r.hasOwnProperty(t) ? n = r[t] : (i = "", t.indexOf(".") && ("in" === (i = t.substr(t.indexOf(".") + 1)).toLowerCase() ? i = "easeIn" : "out" === i.toLowerCase() ? i = "easeOut" : "inout" === i.toLowerCase() && (i = "easeInOut")), t = o(t.substr(0, t.indexOf(".") + 1) + i), r.hasOwnProperty(t) && (n = r[t])) : "function" == typeof t ? n = t : Array.isArray(t) && t.length, !e) return n; var s = e.slice(0); return s.unshift(0), function(t) { return s[0] = t, n.apply(this, s) } } } , function(t, e, i) { var v = i(9); t.exports = function(t, e, i, n, s) { var r = t.strokeTint , o = v.getTintAppendFloatAlphaAndSwap(e.strokeColor, e.strokeAlpha * i); r.TL = o, r.TR = o, r.BL = o, r.BR = o; var a = e.pathData , h = a.length - 1 , l = e.lineWidth , u = l / 2 , c = a[0] - n , d = a[1] - s; e.closePath || (h -= 2); for (var f = 2; f < h; f += 2) { var p = a[f] - n , g = a[f + 1] - s; t.setTexture2D(), t.batchLine(c, d, p, g, u, u, l, f - 2, !!e.closePath && f === h - 1), c = p, d = g } } } , function(t, e, i) { var n = i(0) , s = i(83) , r = i(425) , o = i(426) , a = i(47) , h = i(56) , l = i(158) , u = new n({ initialize: function(t, e, i, n, s, r) { void 0 === t && (t = 0), void 0 === e && (e = 0), void 0 === i && (i = 0), void 0 === n && (n = 0), void 0 === s && (s = 0), void 0 === r && (r = 0), this.type = a.TRIANGLE, this.x1 = t, this.y1 = e, this.x2 = i, this.y2 = n, this.x3 = s, this.y3 = r }, contains: function(t, e) { return s(this, t, e) }, getPoint: function(t, e) { return r(this, t, e) }, getPoints: function(t, e, i) { return o(this, t, e, i) }, getRandomPoint: function(t) { return l(this, t) }, setTo: function(t, e, i, n, s, r) { return void 0 === t && (t = 0), void 0 === e && (e = 0), void 0 === i && (i = 0), void 0 === n && (n = 0), void 0 === s && (s = 0), void 0 === r && (r = 0), this.x1 = t, this.y1 = e, this.x2 = i, this.y2 = n, this.x3 = s, this.y3 = r, this }, getLineA: function(t) { return void 0 === t && (t = new h), t.setTo(this.x1, this.y1, this.x2, this.y2), t }, getLineB: function(t) { return void 0 === t && (t = new h), t.setTo(this.x2, this.y2, this.x3, this.y3), t }, getLineC: function(t) { return void 0 === t && (t = new h), t.setTo(this.x3, this.y3, this.x1, this.y1), t }, left: { get: function() { return Math.min(this.x1, this.x2, this.x3) }, set: function(t) { var e = 0 , e = this.x1 <= this.x2 && this.x1 <= this.x3 ? this.x1 - t : this.x2 <= this.x1 && this.x2 <= this.x3 ? this.x2 - t : this.x3 - t; this.x1 -= e, this.x2 -= e, this.x3 -= e } }, right: { get: function() { return Math.max(this.x1, this.x2, this.x3) }, set: function(t) { var e = 0 , e = this.x1 >= this.x2 && this.x1 >= this.x3 ? this.x1 - t : this.x2 >= this.x1 && this.x2 >= this.x3 ? this.x2 - t : this.x3 - t; this.x1 -= e, this.x2 -= e, this.x3 -= e } }, top: { get: function() { return Math.min(this.y1, this.y2, this.y3) }, set: function(t) { var e = 0 , e = this.y1 <= this.y2 && this.y1 <= this.y3 ? this.y1 - t : this.y2 <= this.y1 && this.y2 <= this.y3 ? this.y2 - t : this.y3 - t; this.y1 -= e, this.y2 -= e, this.y3 -= e } }, bottom: { get: function() { return Math.max(this.y1, this.y2, this.y3) }, set: function(t) { var e = 0 , e = this.y1 >= this.y2 && this.y1 >= this.y3 ? this.y1 - t : this.y2 >= this.y1 && this.y2 >= this.y3 ? this.y2 - t : this.y3 - t; this.y1 -= e, this.y2 -= e, this.y3 -= e } } }); t.exports = u } , function(t, e, i) { var n = i(0) , s = i(17) , c = i(21) , r = i(8) , d = i(2) , f = i(7) , o = new n({ Extends: c, initialize: function t(e, i, n, s, r) { var o, a, h = "png"; f(i) && (i = d(a = i, "key"), n = d(a, "url"), o = d(a, "normalMap"), s = d(a, "xhrSettings"), h = d(a, "extension", h), r = d(a, "frameConfig")), Array.isArray(n) && (o = n[1], n = n[0]); var l, u = { type: "image", cache: e.textureManager, extension: h, responseType: "blob", key: i, url: n, xhrSettings: s, config: r }; c.call(this, e, u), o && ((l = new t(e,this.key,o,s,r)).type = "normalMap", this.setLink(l), e.addFile(l)) }, onProcess: function() { this.state = s.FILE_PROCESSING, this.data = new Image, this.data.crossOrigin = this.crossOrigin; var t = this; this.data.onload = function() { c.revokeObjectURL(t.data), t.onProcessComplete() } , this.data.onerror = function() { c.revokeObjectURL(t.data), t.onProcessError() } , c.createObjectURL(this.data, this.xhrLoader.response, "image/png") }, addToCache: function() { var t, e = this.linkFile; e && e.state === s.FILE_COMPLETE ? (t = "image" === this.type ? this.cache.addImage(this.key, this.data, e.data) : this.cache.addImage(e.key, e.data, this.data), this.pendingDestroy(t), e.pendingDestroy(t)) : e || (t = this.cache.addImage(this.key, this.data), this.pendingDestroy(t)) } }); r.register("image", function(t, e, i) { if (Array.isArray(t)) for (var n = 0; n < t.length; n++) this.addFile(new o(this,t[n])); else this.addFile(new o(this,t,e,i)); return this }), t.exports = o } , function(t, e) { t.exports = function(t, e) { e ? t.setCollision(!0, !0, !0, !0, !1) : t.resetCollision(!1) } } , function(t, e, i) { var n = i(0) , s = i(12) , r = i(444) , o = new n({ Mixins: [s.Alpha, s.Flip, s.Visible], initialize: function(t, e, i, n, s, r, o, a) { this.layer = t, this.index = e, this.x = i, this.y = n, this.width = s, this.height = r, this.baseWidth = void 0 !== o ? o : s, this.baseHeight = void 0 !== a ? a : r, this.pixelX = 0, this.pixelY = 0, this.updatePixelXY(), this.properties = {}, this.rotation = 0, this.collideLeft = !1, this.collideRight = !1, this.collideUp = !1, this.collideDown = !1, this.faceLeft = !1, this.faceRight = !1, this.faceTop = !1, this.faceBottom = !1, this.collisionCallback = null, (this.collisionCallbackContext = this).tint = 16777215, this.physics = {} }, containsPoint: function(t, e) { return !(t < this.pixelX || e < this.pixelY || t > this.right || e > this.bottom) }, copy: function(t) { return this.index = t.index, this.alpha = t.alpha, this.properties = t.properties, this.visible = t.visible, this.setFlip(t.flipX, t.flipY), this.tint = t.tint, this.rotation = t.rotation, this.collideUp = t.collideUp, this.collideDown = t.collideDown, this.collideLeft = t.collideLeft, this.collideRight = t.collideRight, this.collisionCallback = t.collisionCallback, this.collisionCallbackContext = t.collisionCallbackContext, this }, getCollisionGroup: function() { return this.tileset ? this.tileset.getTileCollisionGroup(this.index) : null }, getTileData: function() { return this.tileset ? this.tileset.getTileData(this.index) : null }, getLeft: function(t) { var e = this.tilemapLayer; return e ? e.tileToWorldX(this.x, t) : this.x * this.baseWidth }, getRight: function(t) { var e = this.tilemapLayer; return e ? this.getLeft(t) + this.width * e.scaleX : this.getLeft(t) + this.width }, getTop: function(t) { var e = this.tilemapLayer; return e ? e.tileToWorldY(this.y, t) - (this.height - this.baseHeight) * e.scaleY : this.y * this.baseHeight - (this.height - this.baseHeight) }, getBottom: function(t) { var e = this.tilemapLayer; return e ? this.getTop(t) + this.height * e.scaleY : this.getTop(t) + this.height }, getBounds: function(t, e) { return void 0 === e && (e = new r), e.x = this.getLeft(), e.y = this.getTop(), e.width = this.getRight() - e.x, e.height = this.getBottom() - e.y, e }, getCenterX: function(t) { return (this.getLeft(t) + this.getRight(t)) / 2 }, getCenterY: function(t) { return (this.getTop(t) + this.getBottom(t)) / 2 }, destroy: function() { this.collisionCallback = void 0, this.collisionCallbackContext = void 0, this.properties = void 0 }, intersects: function(t, e, i, n) { return !(i <= this.pixelX || n <= this.pixelY || t >= this.right || e >= this.bottom) }, isInteresting: function(t, e) { return t && e ? this.canCollide || this.hasInterestingFace : t ? this.collides : !!e && this.hasInterestingFace }, resetCollision: function(t) { return void 0 === t && (t = !0), this.collideLeft = !1, this.collideRight = !1, this.collideUp = !1, this.collideDown = !1, this.faceTop = !1, this.faceBottom = !1, this.faceLeft = !1, this.faceRight = !1, t && this.tilemapLayer && this.tilemapLayer.calculateFacesAt(this.x, this.y), this }, resetFaces: function() { return this.faceTop = !1, this.faceBottom = !1, this.faceLeft = !1, this.faceRight = !1, this }, setCollision: function(t, e, i, n, s) { return void 0 === e && (e = t), void 0 === i && (i = t), void 0 === n && (n = t), void 0 === s && (s = !0), this.collideLeft = t, this.collideRight = e, this.collideUp = i, this.collideDown = n, this.faceLeft = t, this.faceRight = e, this.faceTop = i, this.faceBottom = n, s && this.tilemapLayer && this.tilemapLayer.calculateFacesAt(this.x, this.y), this }, setCollisionCallback: function(t, e) { return null === t ? (this.collisionCallback = void 0, this.collisionCallbackContext = void 0) : (this.collisionCallback = t, this.collisionCallbackContext = e), this }, setSize: function(t, e, i, n) { return void 0 !== t && (this.width = t), void 0 !== e && (this.height = e), void 0 !== i && (this.baseWidth = i), void 0 !== n && (this.baseHeight = n), this.updatePixelXY(), this }, updatePixelXY: function() { return this.pixelX = this.x * this.baseWidth, this.pixelY = this.y * this.baseHeight, this }, canCollide: { get: function() { return this.collideLeft || this.collideRight || this.collideUp || this.collideDown || this.collisionCallback } }, collides: { get: function() { return this.collideLeft || this.collideRight || this.collideUp || this.collideDown } }, hasInterestingFace: { get: function() { return this.faceTop || this.faceBottom || this.faceLeft || this.faceRight } }, tileset: { get: function() { var t = this.layer.tilemapLayer; if (t) { var e = t.gidMap[this.index]; if (e) return e } return null } }, tilemapLayer: { get: function() { return this.layer.tilemapLayer } }, tilemap: { get: function() { var t = this.tilemapLayer; return t ? t.tilemap : null } } }); t.exports = o } , function(t, e, i) { var n = i(0) , r = i(12) , o = i(14) , s = i(967) , a = new n({ Extends: o, Mixins: [r.Alpha, r.BlendMode, r.Depth, r.Flip, r.GetBounds, r.Mask, r.Origin, r.Pipeline, r.ScrollFactor, r.Size, r.TextureCrop, r.Tint, r.Transform, r.Visible, s], initialize: function(t, e, i, n, s) { o.call(this, t, "Sprite"), this._crop = this.resetCropObject(), this.anims = new r.Animation(this), this.setTexture(n, s), this.setPosition(e, i), this.setSizeToFrame(), this.setOriginFromFrame(), this.initPipeline() }, preUpdate: function(t, e) { this.anims.update(t, e) }, play: function(t, e, i) { return this.anims.play(t, e, i), this }, toJSON: function() { return r.ToJSON(this) }, preDestroy: function() { this.anims.destroy(), this.anims = void 0 } }); t.exports = a } , function(t, e) { t.exports = function(t) { return t.x - t.width * t.originX + .5 * t.width } } , function(t, e) { t.exports = function(t, e) { var i = t.width * t.originX; return t.x = e + i - .5 * t.width, t } } , function(t, e) { t.exports = function(t) { return t.y - t.height * t.originY + .5 * t.height } } , function(t, e) { t.exports = function(t, e) { var i = t.height * t.originY; return t.y = e + i - .5 * t.height, t } } , function(t, e) { t.exports = function(t, e) { if (!(e >= t.length)) { for (var i = t.length - 1, n = t[e], s = e; s < i; s++) t[s] = t[s + 1]; return t.length = i, n } } } , function(t, e, i) { var n = i(0) , s = i(176) , r = i(11) , o = i(3) , a = new n({ initialize: function(t) { this.type = t, this.defaultDivisions = 5, this.arcLengthDivisions = 100, this.cacheArcLengths = [], this.needsUpdate = !0, this.active = !0, this._tmpVec2A = new o, this._tmpVec2B = new o }, draw: function(t, e) { return void 0 === e && (e = 32), t.strokePoints(this.getPoints(e)) }, getBounds: function(t, e) { t = t || new r, void 0 === e && (e = 16); var i = this.getLength(); i < e && (e = i / 2); var n = Math.max(1, Math.round(i / e)); return s(this.getSpacedPoints(n), t) }, getDistancePoints: function(t) { var e = this.getLength() , i = Math.max(1, e / t); return this.getSpacedPoints(i) }, getEndPoint: function(t) { return void 0 === t && (t = new o), this.getPointAt(1, t) }, getLength: function() { var t = this.getLengths(); return t[t.length - 1] }, getLengths: function(t) { if (void 0 === t && (t = this.arcLengthDivisions), this.cacheArcLengths.length === t + 1 && !this.needsUpdate) return this.cacheArcLengths; this.needsUpdate = !1; var e, i = [], n = this.getPoint(0, this._tmpVec2A), s = 0; i.push(0); for (var r = 1; r <= t; r++) s += (e = this.getPoint(r / t, this._tmpVec2B)).distance(n), i.push(s), n.copy(e); return this.cacheArcLengths = i }, getPointAt: function(t, e) { var i = this.getUtoTmapping(t); return this.getPoint(i, e) }, getPoints: function(t, e, i) { void 0 === i && (i = []), t = t || (e ? this.getLength() / e : this.defaultDivisions); for (var n = 0; n <= t; n++) i.push(this.getPoint(n / t)); return i }, getRandomPoint: function(t) { return void 0 === t && (t = new o), this.getPoint(Math.random(), t) }, getSpacedPoints: function(t, e, i) { void 0 === i && (i = []), t = t || (e ? this.getLength() / e : this.defaultDivisions); for (var n = 0; n <= t; n++) { var s = this.getUtoTmapping(n / t, null, t); i.push(this.getPoint(s)) } return i }, getStartPoint: function(t) { return void 0 === t && (t = new o), this.getPointAt(0, t) }, getTangent: function(t, e) { void 0 === e && (e = new o); var i = t - 1e-4 , n = t + 1e-4; return i < 0 && (i = 0), 1 < n && (n = 1), this.getPoint(i, this._tmpVec2A), this.getPoint(n, e), e.subtract(this._tmpVec2A).normalize() }, getTangentAt: function(t, e) { var i = this.getUtoTmapping(t); return this.getTangent(i, e) }, getTFromDistance: function(t, e) { return t <= 0 ? 0 : this.getUtoTmapping(0, t, e) }, getUtoTmapping: function(t, e, i) { for (var n, s = this.getLengths(i), r = 0, o = s.length, a = e ? Math.min(e, s[o - 1]) : t * s[o - 1], h = 0, l = o - 1; h <= l; ) if ((n = s[r = Math.floor(h + (l - h) / 2)] - a) < 0) h = r + 1; else { if (!(0 < n)) { l = r; break } l = r - 1 } if (s[r = l] === a) return r / (o - 1); var u = s[r]; return (r + (a - u) / (s[r + 1] - u)) / (o - 1) }, updateArcLengths: function() { this.needsUpdate = !0, this.getLengths() } }); t.exports = a } , function(t, e, i) { t.exports = { ADD: i(870), COMPLETE: i(871), FILE_COMPLETE: i(872), FILE_KEY_COMPLETE: i(873), FILE_LOAD_ERROR: i(874), FILE_LOAD: i(875), FILE_PROGRESS: i(876), POST_PROCESS: i(877), PROGRESS: i(878), START: i(879) } } , function(t, e) { t.exports = function(t, e, i) { var n = t.x3 - t.x1 , s = t.y3 - t.y1 , r = t.x2 - t.x1 , o = t.y2 - t.y1 , a = e - t.x1 , h = i - t.y1 , l = n * n + s * s , u = n * r + s * o , c = n * a + s * h , d = r * r + o * o , f = r * a + o * h , p = l * d - u * u , g = 0 == p ? 0 : 1 / p , v = (d * c - u * f) * g , m = (l * f - u * c) * g; return 0 <= v && 0 <= m && v + m < 1 } } , function(t, e, i) { var p = i(4); t.exports = function(t, e, i) { void 0 === i && (i = new p); var n = t.x1 , s = t.y1 , r = t.x2 , o = t.y2 , a = e.x1 , h = e.y1 , l = e.x2 , u = e.y2 , c = (u - h) * (r - n) - (l - a) * (o - s); if (0 == c) return !1; var d = ((l - a) * (s - h) - (u - h) * (n - a)) / c , f = ((r - n) * (s - h) - (o - s) * (n - a)) / c; return 0 <= d && d <= 1 && 0 <= f && f <= 1 && (i.x = n + d * (r - n), i.y = s + d * (o - s), !0) } } , function(t, e) { t.exports = function(t) { return Math.atan2(t.y2 - t.y1, t.x2 - t.x1) } } , function(t, e, i) { var a = {}; t.exports = a; var T = i(99) , w = i(42); a.create = function(t, e) { for (var i = [], n = 0; n < t.length; n++) { var s = t[n] , r = { x: s.x, y: s.y, index: n, body: e, isInternal: !1, contact: null, offset: null }; r.contact = { vertex: r, normalImpulse: 0, tangentImpulse: 0 }, i.push(r) } return i } , a.fromPath = function(t, e) { var n = []; return t.replace(/L?\s*([-\d.e]+)[\s,]*([-\d.e]+)*/gi, function(t, e, i) { n.push({ x: parseFloat(e), y: parseFloat(i) }) }), a.create(n, e) } , a.centre = function(t) { for (var e, i, n, s = a.area(t, !0), r = { x: 0, y: 0 }, o = 0; o < t.length; o++) n = (o + 1) % t.length, e = T.cross(t[o], t[n]), i = T.mult(T.add(t[o], t[n]), e), r = T.add(r, i); return T.div(r, 6 * s) } , a.mean = function(t) { for (var e = { x: 0, y: 0 }, i = 0; i < t.length; i++) e.x += t[i].x, e.y += t[i].y; return T.div(e, t.length) } , a.area = function(t, e) { for (var i = 0, n = t.length - 1, s = 0; s < t.length; s++) i += (t[n].x - t[s].x) * (t[n].y + t[s].y), n = s; return e ? i / 2 : Math.abs(i) / 2 } , a.inertia = function(t, e) { for (var i, n, s = 0, r = 0, o = t, a = 0; a < o.length; a++) n = (a + 1) % o.length, s += (i = Math.abs(T.cross(o[n], o[a]))) * (T.dot(o[n], o[n]) + T.dot(o[n], o[a]) + T.dot(o[a], o[a])), r += i; return e / 6 * (s / r) } , a.translate = function(t, e, i) { var n; if (i) for (n = 0; n < t.length; n++) t[n].x += e.x * i, t[n].y += e.y * i; else for (n = 0; n < t.length; n++) t[n].x += e.x, t[n].y += e.y; return t } , a.rotate = function(t, e, i) { if (0 !== e) { for (var n = Math.cos(e), s = Math.sin(e), r = 0; r < t.length; r++) { var o = t[r] , a = o.x - i.x , h = o.y - i.y; o.x = i.x + (a * n - h * s), o.y = i.y + (a * s + h * n) } return t } } , a.contains = function(t, e) { for (var i = 0; i < t.length; i++) { var n = t[i] , s = t[(i + 1) % t.length]; if (0 < (e.x - n.x) * (s.y - n.y) + (e.y - n.y) * (n.x - s.x)) return !1 } return !0 } , a.scale = function(t, e, i, n) { if (1 === e && 1 === i) return t; var s, r; n = n || a.centre(t); for (var o = 0; o < t.length; o++) s = t[o], r = T.sub(s, n), t[o].x = n.x + r.x * e, t[o].y = n.y + r.y * i; return t } , a.chamfer = function(t, e, i, n, s) { e = "number" == typeof e ? [e] : e || [8], i = void 0 !== i ? i : -1, n = n || 2, s = s || 14; for (var r = [], o = 0; o < t.length; o++) { var a = t[0 <= o - 1 ? o - 1 : t.length - 1] , h = t[o] , l = t[(o + 1) % t.length] , u = e[o < e.length ? o : e.length - 1]; if (0 !== u) { var c = T.normalise({ x: h.y - a.y, y: a.x - h.x }) , d = T.normalise({ x: l.y - h.y, y: h.x - l.x }) , f = Math.sqrt(2 * Math.pow(u, 2)) , p = T.mult(w.clone(c), u) , g = T.normalise(T.mult(T.add(c, d), .5)) , v = T.sub(h, T.mult(g, f)) , m = i; -1 === i && (m = 1.75 * Math.pow(u, .32)), (m = w.clamp(m, n, s)) % 2 == 1 && (m += 1); for (var y = Math.acos(T.dot(c, d)) / m, x = 0; x < m; x++) r.push(T.add(T.rotate(p, y * x), v)) } else r.push(h) } return r } , a.clockwiseSort = function(t) { var i = a.mean(t); return t.sort(function(t, e) { return T.angle(i, t) - T.angle(i, e) }), t } , a.isConvex = function(t) { var e, i, n, s, r = 0, o = t.length; if (o < 3) return null; for (e = 0; e < o; e++) if (n = (e + 2) % o, s = (t[i = (e + 1) % o].x - t[e].x) * (t[n].y - t[i].y), (s -= (t[i].y - t[e].y) * (t[n].x - t[i].x)) < 0 ? r |= 1 : 0 < s && (r |= 2), 3 === r) return !1; return 0 !== r || null } , a.hull = function(t) { var e, i, n = [], s = []; for ((t = t.slice(0)).sort(function(t, e) { var i = t.x - e.x; return 0 != i ? i : t.y - e.y }), i = 0; i < t.length; i += 1) { for (e = t[i]; 2 <= s.length && T.cross3(s[s.length - 2], s[s.length - 1], e) <= 0; ) s.pop(); s.push(e) } for (i = t.length - 1; 0 <= i; --i) { for (e = t[i]; 2 <= n.length && T.cross3(n[n.length - 2], n[n.length - 1], e) <= 0; ) n.pop(); n.push(e) } return n.pop(), s.pop(), n.concat(s) } } , function(t, e, i) { var n = i(19); t.exports = function(t, e, i) { return (i - e) * (t = n(t, 0, 1)) } } , function(t, e) { t.exports = function(t, e, i) { return t && t.hasOwnProperty(e) ? t[e] : i } } , function(t, e) { t.exports = { CREATED: 0, INIT: 1, DELAY: 2, OFFSET_DELAY: 3, PENDING_RENDER: 4, PLAYING_FORWARD: 5, PLAYING_BACKWARD: 6, HOLD_DELAY: 7, REPEAT_DELAY: 8, COMPLETE: 9, PENDING_ADD: 20, PAUSED: 21, LOOP_DELAY: 22, ACTIVE: 23, COMPLETE_DELAY: 24, PENDING_REMOVE: 25, REMOVED: 26 } } , function(t, e, i) { t.exports = { DESTROY: i(582), VIDEO_COMPLETE: i(583), VIDEO_CREATED: i(584), VIDEO_ERROR: i(585), VIDEO_LOOP: i(586), VIDEO_PLAY: i(587), VIDEO_SEEKED: i(588), VIDEO_SEEKING: i(589), VIDEO_STOP: i(590), VIDEO_TIMEOUT: i(591), VIDEO_UNLOCKED: i(592) } } , function(t, e, i) { var n = i(0) , s = i(12) , r = i(39) , o = i(10) , a = i(40) , h = i(11) , l = i(29) , u = i(164) , _ = i(3) , c = new n({ Extends: o, Mixins: [s.Alpha, s.Visible], initialize: function(t, e, i, n) { void 0 === t && (t = 0), void 0 === e && (e = 0), void 0 === i && (i = 0), void 0 === n && (n = 0), o.call(this), this.scene, this.sceneManager, this.scaleManager, this.cameraManager, this.id = 0, this.name = "", this.resolution = 1, this.roundPixels = !1, this.useBounds = !1, this.worldView = new h, this.dirty = !0, this._x = t, this._y = e, this._cx = 0, this._cy = 0, this._cw = 0, this._ch = 0, this._width = i, this._height = n, this._bounds = new h, this._scrollX = 0, this._scrollY = 0, this._zoom = 1, this._rotation = 0, this.matrix = new l, this.transparent = !0, this.backgroundColor = u("rgba(0,0,0,0)"), this.disableCull = !1, this.culledObjects = [], this.midPoint = new _(i / 2,n / 2), this.originX = .5, this.originY = .5, this._customViewport = !1, this.mask = null, this._maskCamera = null }, setOrigin: function(t, e) { return void 0 === t && (t = .5), void 0 === e && (e = t), this.originX = t, this.originY = e, this }, getScroll: function(t, e, i) { void 0 === i && (i = new _); var n = .5 * this.width , s = .5 * this.height; return i.x = t - n, i.y = e - s, this.useBounds && (i.x = this.clampX(i.x), i.y = this.clampY(i.y)), i }, centerOnX: function(t) { var e = .5 * this.width; return this.midPoint.x = t, this.scrollX = t - e, this.useBounds && (this.scrollX = this.clampX(this.scrollX)), this }, centerOnY: function(t) { var e = .5 * this.height; return this.midPoint.y = t, this.scrollY = t - e, this.useBounds && (this.scrollY = this.clampY(this.scrollY)), this }, centerOn: function(t, e) { return this.centerOnX(t), this.centerOnY(e), this }, centerToBounds: function() { var t, e, i; return this.useBounds && (t = this._bounds, e = .5 * this.width, i = .5 * this.height, this.midPoint.set(t.centerX, t.centerY), this.scrollX = t.centerX - e, this.scrollY = t.centerY - i), this }, centerToSize: function() { return this.scrollX = .5 * this.width, this.scrollY = .5 * this.height, this }, cull: function(t) { if (this.disableCull) return t; var e = this.matrix.matrix , i = e[0] , n = e[1] , s = e[2] , r = e[3]; if (!(i * r - n * s)) return t; for (var o = e[4], a = e[5], h = this.scrollX, l = this.scrollY, u = this.width, c = this.height, d = this.y, f = d + c, p = this.x, g = p + u, v = this.culledObjects, m = t.length, y = v.length = 0; y < m; ++y) { var x, T, w, b, E = t[y]; E.hasOwnProperty("width") && !E.parentContainer ? (x = E.width, T = E.height, p < ((w = E.x - h * E.scrollFactorX - x * E.originX) + x) * i + ((b = E.y - l * E.scrollFactorY - T * E.originY) + T) * s + o && w * i + b * s + o < g && d < (w + x) * n + (b + T) * r + a && w * n + b * r + a < f && v.push(E)) : v.push(E) } return v }, getWorldPoint: function(t, e, i) { void 0 === i && (i = new _); var n = this.matrix.matrix , s = n[0] , r = n[1] , o = n[2] , a = n[3] , h = n[4] , l = n[5] , u = s * a - r * o; if (!u) return i.x = t, i.y = e, i; var c = a * (u = 1 / u) , d = -r * u , f = -o * u , p = s * u , g = (o * l - a * h) * u , v = (r * h - s * l) * u , m = Math.cos(this.rotation) , y = Math.sin(this.rotation) , x = this.zoom , T = this.resolution , w = this.scrollX , b = this.scrollY , E = t + (w * m - b * y) * x , S = e + (w * y + b * m) * x; return i.x = (E * c + S * f) * T + g, i.y = (E * d + S * p) * T + v, i }, ignore: function(t) { var e = this.id; Array.isArray(t) || (t = [t]); for (var i = 0; i < t.length; i++) { var n = t[i]; Array.isArray(n) ? this.ignore(n) : n.isParent ? this.ignore(n.getChildren()) : n.cameraFilter |= e } return this }, preRender: function(t) { var e = this.width , i = this.height , n = .5 * e , s = .5 * i , r = this.zoom * t , o = this.matrix , a = e * this.originX , h = i * this.originY , l = this.scrollX , u = this.scrollY; this.useBounds && (l = this.clampX(l), u = this.clampY(u)), this.roundPixels && (a = Math.round(a), h = Math.round(h)); var c = (this.scrollX = l) + n , d = (this.scrollY = u) + s; this.midPoint.set(c, d); var f = e / r , p = i / r; this.worldView.setTo(c - f / 2, d - p / 2, f, p), o.applyITRS(this.x + a, this.y + h, this.rotation, r, r), o.translate(-a, -h) }, clampX: function(t) { var e = this._bounds , i = this.displayWidth , n = e.x + (i - this.width) / 2 , s = Math.max(n, n + e.width - i); return t < n ? t = n : s < t && (t = s), t }, clampY: function(t) { var e = this._bounds , i = this.displayHeight , n = e.y + (i - this.height) / 2 , s = Math.max(n, n + e.height - i); return t < n ? t = n : s < t && (t = s), t }, removeBounds: function() { return this.useBounds = !1, this.dirty = !0, this._bounds.setEmpty(), this }, setAngle: function(t) { return void 0 === t && (t = 0), this.rotation = r(t), this }, setBackgroundColor: function(t) { return void 0 === t && (t = "rgba(0,0,0,0)"), this.backgroundColor = u(t), this.transparent = 0 === this.backgroundColor.alpha, this }, setBounds: function(t, e, i, n, s) { return void 0 === s && (s = !1), this._bounds.setTo(t, e, i, n), this.dirty = !0, this.useBounds = !0, s ? this.centerToBounds() : (this.scrollX = this.clampX(this.scrollX), this.scrollY = this.clampY(this.scrollY)), this }, getBounds: function(t) { void 0 === t && (t = new h); var e = this._bounds; return t.setTo(e.x, e.y, e.width, e.height), t }, setName: function(t) { return void 0 === t && (t = ""), this.name = t, this }, setPosition: function(t, e) { return void 0 === e && (e = t), this.x = t, this.y = e, this }, setRotation: function(t) { return void 0 === t && (t = 0), this.rotation = t, this }, setRoundPixels: function(t) { return this.roundPixels = t, this }, setScene: function(t) { this.scene && this._customViewport && this.sceneManager.customViewports--; var e = (this.scene = t).sys; this.sceneManager = e.game.scene, this.scaleManager = e.scale, this.cameraManager = e.cameras; var i = this.scaleManager.resolution; return this.resolution = i, this._cx = this._x * i, this._cy = this._y * i, this._cw = this._width * i, this._ch = this._height * i, this.updateSystem(), this }, setScroll: function(t, e) { return void 0 === e && (e = t), this.scrollX = t, this.scrollY = e, this }, setSize: function(t, e) { return void 0 === e && (e = t), this.width = t, this.height = e, this }, setViewport: function(t, e, i, n) { return this.x = t, this.y = e, this.width = i, this.height = n, this }, setZoom: function(t) { return void 0 === t && (t = 1), 0 === t && (t = .001), this.zoom = t, this }, setMask: function(t, e) { return void 0 === e && (e = !0), this.mask = t, this._maskCamera = e ? this.cameraManager.default : this, this }, clearMask: function(t) { return void 0 === t && (t = !1), t && this.mask && this.mask.destroy(), this.mask = null, this }, toJSON: function() { var t = { name: this.name, x: this.x, y: this.y, width: this.width, height: this.height, zoom: this.zoom, rotation: this.rotation, roundPixels: this.roundPixels, scrollX: this.scrollX, scrollY: this.scrollY, backgroundColor: this.backgroundColor.rgba }; return this.useBounds && (t.bounds = { x: this._bounds.x, y: this._bounds.y, width: this._bounds.width, height: this._bounds.height }), t }, update: function() {}, updateSystem: function() { var t, e; this.scaleManager && (t = 0 !== this._x || 0 !== this._y || this.scaleManager.width !== this._width || this.scaleManager.height !== this._height, e = this.sceneManager, t && !this._customViewport ? e.customViewports++ : !t && this._customViewport && e.customViewports--, this.dirty = !0, this._customViewport = t) }, destroy: function() { this.emit(a.DESTROY, this), this.removeAllListeners(), this.matrix.destroy(), this.culledObjects = [], this._customViewport && this.sceneManager.customViewports--, this._bounds = null, this.scene = null, this.scaleManager = null, this.sceneManager = null, this.cameraManager = null }, x: { get: function() { return this._x }, set: function(t) { this._x = t, this._cx = t * this.resolution, this.updateSystem() } }, y: { get: function() { return this._y }, set: function(t) { this._y = t, this._cy = t * this.resolution, this.updateSystem() } }, width: { get: function() { return this._width }, set: function(t) { this._width = t, this._cw = t * this.resolution, this.updateSystem() } }, height: { get: function() { return this._height }, set: function(t) { this._height = t, this._ch = t * this.resolution, this.updateSystem() } }, scrollX: { get: function() { return this._scrollX }, set: function(t) { this._scrollX = t, this.dirty = !0 } }, scrollY: { get: function() { return this._scrollY }, set: function(t) { this._scrollY = t, this.dirty = !0 } }, zoom: { get: function() { return this._zoom }, set: function(t) { this._zoom = t, this.dirty = !0 } }, rotation: { get: function() { return this._rotation }, set: function(t) { this._rotation = t, this.dirty = !0 } }, centerX: { get: function() { return this.x + .5 * this.width } }, centerY: { get: function() { return this.y + .5 * this.height } }, displayWidth: { get: function() { return this.width / this.zoom } }, displayHeight: { get: function() { return this.height / this.zoom } } }); t.exports = c } , function(t, e, i) { t.exports = { ENTER_FULLSCREEN: i(703), FULLSCREEN_FAILED: i(704), FULLSCREEN_UNSUPPORTED: i(705), LEAVE_FULLSCREEN: i(706), ORIENTATION_CHANGE: i(707), RESIZE: i(708) } } , function(t, e) { t.exports = function(t, e, i, n) { return void 0 === i && (i = 0), 0 === e ? t : (t -= i, t = e * Math.floor(t / e), n ? (i + t) / e : i + t) } } , function(t, e, i) { var n = i(0) , C = i(19) , s = i(18) , r = new n({ initialize: function(t, e, i, n, s, r, o) { this.texture = t, this.name = e, this.source = t.source[i], this.sourceIndex = i, this.glTexture = this.source.glTexture, this.cutX, this.cutY, this.cutWidth, this.cutHeight, this.x = 0, this.y = 0, this.width, this.height, this.halfWidth, this.halfHeight, this.centerX, this.centerY, this.pivotX = 0, this.pivotY = 0, this.customPivot = !1, this.rotated = !1, this.autoRound = -1, this.customData = {}, this.u0 = 0, this.v0 = 0, this.u1 = 0, this.v1 = 0, this.data = { cut: { x: 0, y: 0, w: 0, h: 0, r: 0, b: 0 }, trim: !1, sourceSize: { w: 0, h: 0 }, spriteSourceSize: { x: 0, y: 0, w: 0, h: 0, r: 0, b: 0 }, radius: 0, drawImage: { x: 0, y: 0, width: 0, height: 0 } }, this.setSize(r, o, n, s) }, setSize: function(t, e, i, n) { void 0 === i && (i = 0), void 0 === n && (n = 0), this.cutX = i, this.cutY = n, this.cutWidth = t, this.cutHeight = e, this.width = t, this.height = e, this.halfWidth = Math.floor(.5 * t), this.halfHeight = Math.floor(.5 * e), this.centerX = Math.floor(t / 2), this.centerY = Math.floor(e / 2); var s = this.data , r = s.cut; r.x = i, r.y = n, r.w = t, r.h = e, r.r = i + t, r.b = n + e, s.sourceSize.w = t, s.sourceSize.h = e, s.spriteSourceSize.w = t, s.spriteSourceSize.h = e, s.radius = .5 * Math.sqrt(t * t + e * e); var o = s.drawImage; return o.x = i, o.y = n, o.width = t, o.height = e, this.updateUVs() }, setTrim: function(t, e, i, n, s, r) { var o = this.data , a = o.spriteSourceSize; return o.trim = !0, o.sourceSize.w = t, o.sourceSize.h = e, a.x = i, a.y = n, a.w = s, a.h = r, a.r = i + s, a.b = n + r, this.x = i, this.y = n, this.width = s, this.height = r, this.halfWidth = .5 * s, this.halfHeight = .5 * r, this.centerX = Math.floor(s / 2), this.centerY = Math.floor(r / 2), this.updateUVs() }, setCropUVs: function(t, e, i, n, s, r, o) { var a, h, l, u, c, d, f, p = this.cutX, g = this.cutY, v = this.cutWidth, m = this.cutHeight, y = this.realWidth, x = this.realHeight, T = p + (e = C(e, 0, y)), w = g + (i = C(i, 0, x)), b = n = C(n, 0, y - e), E = s = C(s, 0, x - i), S = this.data; S.trim ? (a = S.spriteSourceSize, h = e + (n = C(n, 0, v - e)), l = i + (s = C(s, 0, m - i)), !(a.r < e || a.b < i || a.x > h || a.y > l) ? (u = Math.max(a.x, e), c = Math.max(a.y, i), b = d = Math.min(a.r, h) - u, E = f = Math.min(a.b, l) - c, T = r ? p + (v - (u - a.x) - d) : p + (u - a.x), w = o ? g + (m - (c - a.y) - f) : g + (c - a.y), e = u, i = c, n = d, s = f) : E = b = w = T = 0) : (r && (T = p + (v - e - n)), o && (w = g + (m - i - s))); var _ = this.source.width , A = this.source.height; return t.u0 = Math.max(0, T / _), t.v0 = Math.max(0, w / A), t.u1 = Math.min(1, (T + b) / _), t.v1 = Math.min(1, (w + E) / A), t.x = e, t.y = i, t.cx = T, t.cy = w, t.cw = b, t.ch = E, t.width = n, t.height = s, t.flipX = r, t.flipY = o, t }, updateCropUVs: function(t, e, i) { return this.setCropUVs(t, t.x, t.y, t.width, t.height, e, i) }, updateUVs: function() { var t = this.cutX , e = this.cutY , i = this.cutWidth , n = this.cutHeight , s = this.data.drawImage; s.width = i, s.height = n; var r = this.source.width , o = this.source.height; return this.u0 = t / r, this.v0 = e / o, this.u1 = (t + i) / r, this.v1 = (e + n) / o, this }, updateUVsInverted: function() { var t = this.source.width , e = this.source.height; return this.u0 = (this.cutX + this.cutHeight) / t, this.v0 = this.cutY / e, this.u1 = this.cutX / t, this.v1 = (this.cutY + this.cutWidth) / e, this }, clone: function() { var t = new r(this.texture,this.name,this.sourceIndex); return t.cutX = this.cutX, t.cutY = this.cutY, t.cutWidth = this.cutWidth, t.cutHeight = this.cutHeight, t.x = this.x, t.y = this.y, t.width = this.width, t.height = this.height, t.halfWidth = this.halfWidth, t.halfHeight = this.halfHeight, t.centerX = this.centerX, t.centerY = this.centerY, t.rotated = this.rotated, t.data = s(!0, t.data, this.data), t.updateUVs(), t }, destroy: function() { this.source = null, this.texture = null, this.glTexture = null, this.customData = null, this.data = null }, realWidth: { get: function() { return this.data.sourceSize.w } }, realHeight: { get: function() { return this.data.sourceSize.h } }, radius: { get: function() { return this.data.radius } }, trimmed: { get: function() { return this.data.trim } }, canvasData: { get: function() { return this.data.drawImage } } }); t.exports = r } , function(t, e, i) { var n = i(0) , s = i(96) , r = i(398) , o = i(399) , a = i(47) , h = i(157) , l = new n({ initialize: function(t, e, i, n) { void 0 === t && (t = 0), void 0 === e && (e = 0), void 0 === i && (i = 0), void 0 === n && (n = 0), this.type = a.ELLIPSE, this.x = t, this.y = e, this.width = i, this.height = n }, contains: function(t, e) { return s(this, t, e) }, getPoint: function(t, e) { return r(this, t, e) }, getPoints: function(t, e, i) { return o(this, t, e, i) }, getRandomPoint: function(t) { return h(this, t) }, setTo: function(t, e, i, n) { return this.x = t, this.y = e, this.width = i, this.height = n, this }, setEmpty: function() { return this.width = 0, this.height = 0, this }, setPosition: function(t, e) { return void 0 === e && (e = t), this.x = t, this.y = e, this }, setSize: function(t, e) { return void 0 === e && (e = t), this.width = t, this.height = e, this }, isEmpty: function() { return this.width <= 0 || this.height <= 0 }, getMinorRadius: function() { return Math.min(this.width, this.height) / 2 }, getMajorRadius: function() { return Math.max(this.width, this.height) / 2 }, left: { get: function() { return this.x - this.width / 2 }, set: function(t) { this.x = t + this.width / 2 } }, right: { get: function() { return this.x + this.width / 2 }, set: function(t) { this.x = t - this.width / 2 } }, top: { get: function() { return this.y - this.height / 2 }, set: function(t) { this.y = t + this.height / 2 } }, bottom: { get: function() { return this.y + this.height / 2 }, set: function(t) { this.y = t - this.height / 2 } } }); t.exports = l } , function(t, e) { t.exports = function(t, e, i) { if (t.width <= 0 || t.height <= 0) return !1; var n = (e - t.x) / t.width , s = (i - t.y) / t.height; return (n *= n) + (s *= s) < .25 } } , function(t, e, i) { var B = i(241) , n = i(0) , r = i(90) , N = i(2) , Y = i(6) , s = i(7) , X = i(392) , o = i(133) , a = i(75) , h = new n({ initialize: function(t, e, i) { i ? e && !Array.isArray(e) && (e = [e]) : Array.isArray(e) ? s(e[0]) && (i = e, e = null) : s(e) && (i = e, e = null), this.scene = t, this.children = new o, this.isParent = !0, this.type = "Group", this.classType = N(i, "classType", a), this.name = N(i, "name", ""), this.active = N(i, "active", !0), this.maxSize = N(i, "maxSize", -1), this.defaultKey = N(i, "defaultKey", null), this.defaultFrame = N(i, "defaultFrame", null), this.runChildUpdate = N(i, "runChildUpdate", !1), this.createCallback = N(i, "createCallback", null), this.removeCallback = N(i, "removeCallback", null), this.createMultipleCallback = N(i, "createMultipleCallback", null), this.internalCreateCallback = N(i, "internalCreateCallback", null), this.internalRemoveCallback = N(i, "internalRemoveCallback", null), e && this.addMultiple(e), i && this.createMultiple(i) }, create: function(t, e, i, n, s, r) { if (void 0 === t && (t = 0), void 0 === e && (e = 0), void 0 === i && (i = this.defaultKey), void 0 === n && (n = this.defaultFrame), void 0 === s && (s = !0), void 0 === r && (r = !0), this.isFull()) return null; var o = new this.classType(this.scene,t,e,i,n); return this.scene.sys.displayList.add(o), o.preUpdate && this.scene.sys.updateList.add(o), o.visible = s, o.setActive(r), this.add(o), o }, createMultiple: function(t) { if (this.isFull()) return []; Array.isArray(t) || (t = [t]); var e = []; if (t[0].key) for (var i = 0; i < t.length; i++) var n = this.createFromConfig(t[i]) , e = e.concat(n); return e }, createFromConfig: function(t) { if (this.isFull()) return []; this.classType = N(t, "classType", this.classType); var e = N(t, "key", void 0) , i = N(t, "frame", null) , n = N(t, "visible", !0) , s = N(t, "active", !0) , r = []; if (void 0 === e) return r; Array.isArray(e) || (e = [e]), Array.isArray(i) || (i = [i]); var o = N(t, "repeat", 0) , a = N(t, "randomKey", !1) , h = N(t, "randomFrame", !1) , l = N(t, "yoyo", !1) , u = N(t, "quantity", !1) , c = N(t, "frameQuantity", 1) , d = N(t, "max", 0) , f = X(e, i, { max: d, qty: u || c, random: a, randomB: h, repeat: o, yoyo: l }); t.createCallback && (this.createCallback = t.createCallback), t.removeCallback && (this.removeCallback = t.removeCallback); for (var p = 0; p < f.length; p++) { var g = this.create(0, 0, f[p].a, f[p].b, n, s); if (!g) break; r.push(g) } var v = Y(t, "setXY.x", 0) , m = Y(t, "setXY.y", 0) , y = Y(t, "setXY.stepX", 0) , x = Y(t, "setXY.stepY", 0); B.SetXY(r, v, m, y, x); var T = Y(t, "setRotation.value", 0) , w = Y(t, "setRotation.step", 0); B.SetRotation(r, T, w); var b = Y(t, "setScale.x", 1) , E = Y(t, "setScale.y", b) , S = Y(t, "setScale.stepX", 0) , _ = Y(t, "setScale.stepY", 0); B.SetScale(r, b, E, S, _); var A = Y(t, "setAlpha.value", 1) , C = Y(t, "setAlpha.step", 0); B.SetAlpha(r, A, C); var M = Y(t, "setDepth.value", 0) , P = Y(t, "setDepth.step", 0); B.SetDepth(r, M, P); var O = Y(t, "setScrollFactor.x", 1) , R = Y(t, "setScrollFactor.y", O) , L = Y(t, "setScrollFactor.stepX", 0) , k = Y(t, "setScrollFactor.stepY", 0); B.SetScrollFactor(r, O, R, L, k); var D = N(t, "hitArea", null) , F = N(t, "hitAreaCallback", null); D && B.SetHitArea(r, D, F); var I = N(t, "gridAlign", !1); return I && B.GridAlign(r, I), this.createMultipleCallback && this.createMultipleCallback.call(this, r), r }, preUpdate: function(t, e) { if (this.runChildUpdate && 0 !== this.children.size) for (var i = this.children.entries.slice(), n = 0; n < i.length; n++) { var s = i[n]; s.active && s.update(t, e) } }, add: function(t, e) { return void 0 === e && (e = !1), this.isFull() || (this.children.set(t), this.internalCreateCallback && this.internalCreateCallback.call(this, t), this.createCallback && this.createCallback.call(this, t), e && (this.scene.sys.displayList.add(t), t.preUpdate && this.scene.sys.updateList.add(t)), t.on(r.DESTROY, this.remove, this)), this }, addMultiple: function(t, e) { if (void 0 === e && (e = !1), Array.isArray(t)) for (var i = 0; i < t.length; i++) this.add(t[i], e); return this }, remove: function(t, e, i) { return void 0 === e && (e = !1), void 0 === i && (i = !1), this.children.contains(t) && (this.children.delete(t), this.internalRemoveCallback && this.internalRemoveCallback.call(this, t), this.removeCallback && this.removeCallback.call(this, t), t.off(r.DESTROY, this.remove, this), i ? t.destroy() : e && (t.scene.sys.displayList.remove(t), t.preUpdate && t.scene.sys.updateList.remove(t))), this }, clear: function(t, e) { void 0 === t && (t = !1), void 0 === e && (e = !1); for (var i = this.children, n = 0; n < i.size; n++) { var s = i.entries[n]; s.off(r.DESTROY, this.remove, this), e ? s.destroy() : t && (s.scene.sys.displayList.remove(s), s.preUpdate && s.scene.sys.updateList.remove(s)) } return this.children.clear(), this }, contains: function(t) { return this.children.contains(t) }, getChildren: function() { return this.children.entries }, getLength: function() { return this.children.size }, getFirst: function(t, e, i, n, s, r, o) { return this.getHandler(!0, 1, t, e, i, n, s, r, o) }, getFirstNth: function(t, e, i, n, s, r, o, a) { return this.getHandler(!0, t, e, i, n, s, r, o, a) }, getLast: function(t, e, i, n, s, r, o) { return this.getHandler(!1, 1, t, e, i, n, s, r, o) }, getLastNth: function(t, e, i, n, s, r, o, a) { return this.getHandler(!1, t, e, i, n, s, r, o, a) }, getHandler: function(t, e, i, n, s, r, o, a, h) { var l, u; void 0 === i && (i = !1), void 0 === n && (n = !1); var c = 0 , d = this.children.entries; if (t) for (u = 0; u < d.length; u++) if ((l = d[u]).active === i) { if (++c === e) break } else l = null; else for (u = d.length - 1; 0 <= u; u--) if ((l = d[u]).active === i) { if (++c === e) break } else l = null; return l ? ("number" == typeof s && (l.x = s), "number" == typeof r && (l.y = r), l) : n ? this.create(s, r, o, a, h) : null }, get: function(t, e, i, n, s) { return this.getFirst(!1, !0, t, e, i, n, s) }, getFirstAlive: function(t, e, i, n, s, r) { return this.getFirst(!0, t, e, i, n, s, r) }, getFirstDead: function(t, e, i, n, s, r) { return this.getFirst(!1, t, e, i, n, s, r) }, playAnimation: function(t, e) { return B.PlayAnimation(this.children.entries, t, e), this }, isFull: function() { return -1 !== this.maxSize && this.children.size >= this.maxSize }, countActive: function(t) { void 0 === t && (t = !0); for (var e = 0, i = 0; i < this.children.size; i++) this.children.entries[i].active === t && e++; return e }, getTotalUsed: function() { return this.countActive() }, getTotalFree: function() { var t = this.getTotalUsed(); return (-1 === this.maxSize ? 999999999999 : this.maxSize) - t }, setActive: function(t) { return this.active = t, this }, setName: function(t) { return this.name = t, this }, propertyValueSet: function(t, e, i, n, s) { return B.PropertyValueSet(this.children.entries, t, e, i, n, s), this }, propertyValueInc: function(t, e, i, n, s) { return B.PropertyValueInc(this.children.entries, t, e, i, n, s), this }, setX: function(t, e) { return B.SetX(this.children.entries, t, e), this }, setY: function(t, e) { return B.SetY(this.children.entries, t, e), this }, setXY: function(t, e, i, n) { return B.SetXY(this.children.entries, t, e, i, n), this }, incX: function(t, e) { return B.IncX(this.children.entries, t, e), this }, incY: function(t, e) { return B.IncY(this.children.entries, t, e), this }, incXY: function(t, e, i, n) { return B.IncXY(this.children.entries, t, e, i, n), this }, shiftPosition: function(t, e, i) { return B.ShiftPosition(this.children.entries, t, e, i), this }, angle: function(t, e) { return B.Angle(this.children.entries, t, e), this }, rotate: function(t, e) { return B.Rotate(this.children.entries, t, e), this }, rotateAround: function(t, e) { return B.RotateAround(this.children.entries, t, e), this }, rotateAroundDistance: function(t, e, i) { return B.RotateAroundDistance(this.children.entries, t, e, i), this }, setAlpha: function(t, e) { return B.SetAlpha(this.children.entries, t, e), this }, setTint: function(t, e, i, n) { return B.SetTint(this.children.entries, t, e, i, n), this }, setOrigin: function(t, e, i, n) { return B.SetOrigin(this.children.entries, t, e, i, n), this }, scaleX: function(t, e) { return B.ScaleX(this.children.entries, t, e), this }, scaleY: function(t, e) { return B.ScaleY(this.children.entries, t, e), this }, scaleXY: function(t, e, i, n) { return B.ScaleXY(this.children.entries, t, e, i, n), this }, setDepth: function(t, e) { return B.SetDepth(this.children.entries, t, e), this }, setBlendMode: function(t) { return B.SetBlendMode(this.children.entries, t), this }, setHitArea: function(t, e) { return B.SetHitArea(this.children.entries, t, e), this }, shuffle: function() { return B.Shuffle(this.children.entries), this }, kill: function(t) { this.children.contains(t) && t.setActive(!1) }, killAndHide: function(t) { this.children.contains(t) && (t.setActive(!1), t.setVisible(!1)) }, setVisible: function(t, e, i) { return B.SetVisible(this.children.entries, t, e, i), this }, toggleVisible: function() { return B.ToggleVisible(this.children.entries), this }, destroy: function(t) { void 0 === t && (t = !1), this.scene && !this.ignoreDestroy && (this.clear(!1, t), this.scene = void 0, this.children = void 0) } }); t.exports = h } , function(t, e, i) { var _ = i(9); t.exports = function(t, e, i, n, s, r) { for (var o = _.getTintAppendFloatAlphaAndSwap(i.fillColor, i.fillAlpha * n), a = i.pathData, h = i.pathIndexes, l = 0; l < h.length; l += 3) { var u = 2 * h[l] , c = 2 * h[l + 1] , d = 2 * h[l + 2] , f = a[0 + u] - s , p = a[1 + u] - r , g = a[0 + c] - s , v = a[1 + c] - r , m = a[0 + d] - s , y = a[1 + d] - r , x = e.getX(f, p) , T = e.getY(f, p) , w = e.getX(g, v) , b = e.getY(g, v) , E = e.getX(m, y) , S = e.getY(m, y); t.setTexture2D(), t.batchTri(x, T, w, b, E, S, 0, 0, 1, 1, o, o, o, t.tintEffect) } } } , function(t, e) { var i = {}; (t.exports = i).create = function(t, e) { return { x: t || 0, y: e || 0 } } , i.clone = function(t) { return { x: t.x, y: t.y } } , i.magnitude = function(t) { return Math.sqrt(t.x * t.x + t.y * t.y) } , i.magnitudeSquared = function(t) { return t.x * t.x + t.y * t.y } , i.rotate = function(t, e, i) { var n = Math.cos(e) , s = Math.sin(e); i = i || {}; var r = t.x * n - t.y * s; return i.y = t.x * s + t.y * n, i.x = r, i } , i.rotateAbout = function(t, e, i, n) { var s = Math.cos(e) , r = Math.sin(e); n = n || {}; var o = i.x + ((t.x - i.x) * s - (t.y - i.y) * r); return n.y = i.y + ((t.x - i.x) * r + (t.y - i.y) * s), n.x = o, n } , i.normalise = function(t) { var e = i.magnitude(t); return 0 === e ? { x: 0, y: 0 } : { x: t.x / e, y: t.y / e } } , i.dot = function(t, e) { return t.x * e.x + t.y * e.y } , i.cross = function(t, e) { return t.x * e.y - t.y * e.x } , i.cross3 = function(t, e, i) { return (e.x - t.x) * (i.y - t.y) - (e.y - t.y) * (i.x - t.x) } , i.add = function(t, e, i) { return (i = i || {}).x = t.x + e.x, i.y = t.y + e.y, i } , i.sub = function(t, e, i) { return (i = i || {}).x = t.x - e.x, i.y = t.y - e.y, i } , i.mult = function(t, e) { return { x: t.x * e, y: t.y * e } } , i.div = function(t, e) { return { x: t.x / e, y: t.y / e } } , i.perp = function(t, e) { return { x: (e = !0 === e ? -1 : 1) * -t.y, y: e * t.x } } , i.neg = function(t) { return { x: -t.x, y: -t.y } } , i.angle = function(t, e) { return Math.atan2(e.y - t.y, e.x - t.x) } , i._temp = [i.create(), i.create(), i.create(), i.create(), i.create(), i.create()] } , function(t, e) { var i = {}; (t.exports = i).create = function(t) { var e = { min: { x: 0, y: 0 }, max: { x: 0, y: 0 } }; return t && i.update(e, t), e } , i.update = function(t, e, i) { t.min.x = 1 / 0, t.max.x = -1 / 0, t.min.y = 1 / 0, t.max.y = -1 / 0; for (var n = 0; n < e.length; n++) { var s = e[n]; s.x > t.max.x && (t.max.x = s.x), s.x < t.min.x && (t.min.x = s.x), s.y > t.max.y && (t.max.y = s.y), s.y < t.min.y && (t.min.y = s.y) } i && (0 < i.x ? t.max.x += i.x : t.min.x += i.x, 0 < i.y ? t.max.y += i.y : t.min.y += i.y) } , i.contains = function(t, e) { return e.x >= t.min.x && e.x <= t.max.x && e.y >= t.min.y && e.y <= t.max.y } , i.overlaps = function(t, e) { return t.min.x <= e.max.x && t.max.x >= e.min.x && t.max.y >= e.min.y && t.min.y <= e.max.y } , i.translate = function(t, e) { t.min.x += e.x, t.max.x += e.x, t.min.y += e.y, t.max.y += e.y } , i.shift = function(t, e) { var i = t.max.x - t.min.x , n = t.max.y - t.min.y; t.min.x = e.x, t.max.x = e.x + i, t.min.y = e.y, t.max.y = e.y + n } } , function(t, e) { t.exports = function(t, e, i) { return 0 <= t && t < i.width && 0 <= e && e < i.height } } , function(t, e, i) { var n = i(0) , s = i(2) , r = new n({ initialize: function(t) { void 0 === t && (t = {}), this.name = s(t, "name", "layer"), this.x = s(t, "x", 0), this.y = s(t, "y", 0), this.width = s(t, "width", 0), this.height = s(t, "height", 0), this.tileWidth = s(t, "tileWidth", 0), this.tileHeight = s(t, "tileHeight", 0), this.baseTileWidth = s(t, "baseTileWidth", this.tileWidth), this.baseTileHeight = s(t, "baseTileHeight", this.tileHeight), this.widthInPixels = s(t, "widthInPixels", this.width * this.baseTileWidth), this.heightInPixels = s(t, "heightInPixels", this.height * this.baseTileHeight), this.alpha = s(t, "alpha", 1), this.visible = s(t, "visible", !0), this.properties = s(t, "properties", []), this.indexes = s(t, "indexes", []), this.collideIndexes = s(t, "collideIndexes", []), this.callbacks = s(t, "callbacks", []), this.bodies = s(t, "bodies", []), this.data = s(t, "data", []), this.tilemapLayer = s(t, "tilemapLayer", null) } }); t.exports = r } , function(t, e, i) { var n = i(0) , s = i(2) , r = new n({ initialize: function(t) { void 0 === t && (t = {}), this.name = s(t, "name", "map"), this.width = s(t, "width", 0), this.height = s(t, "height", 0), this.infinite = s(t, "infinite", !1), this.tileWidth = s(t, "tileWidth", 0), this.tileHeight = s(t, "tileHeight", 0), this.widthInPixels = s(t, "widthInPixels", this.width * this.tileWidth), this.heightInPixels = s(t, "heightInPixels", this.height * this.tileHeight), this.format = s(t, "format", null), this.orientation = s(t, "orientation", "orthogonal"), this.renderOrder = s(t, "renderOrder", "right-down"), this.version = s(t, "version", "1"), this.properties = s(t, "properties", {}), this.layers = s(t, "layers", []), this.images = s(t, "images", []), this.objects = s(t, "objects", {}), this.collision = s(t, "collision", {}), this.tilesets = s(t, "tilesets", []), this.imageCollections = s(t, "imageCollections", []), this.tiles = s(t, "tiles", []) } }); t.exports = r } , function(t, e, i) { var n = new (i(0))({ initialize: function(t, e, i, n, s, r, o, a) { (void 0 === i || i <= 0) && (i = 32), (void 0 === n || n <= 0) && (n = 32), void 0 === s && (s = 0), void 0 === r && (r = 0), void 0 === o && (o = {}), void 0 === a && (a = {}), this.name = t, this.firstgid = e, this.tileWidth = i, this.tileHeight = n, this.tileMargin = s, this.tileSpacing = r, this.tileProperties = o, this.tileData = a, this.image = null, this.glTexture = null, this.rows = 0, this.columns = 0, this.total = 0, this.texCoordinates = [] }, getTileProperties: function(t) { return this.containsTileIndex(t) ? this.tileProperties[t - this.firstgid] : null }, getTileData: function(t) { return this.containsTileIndex(t) ? this.tileData[t - this.firstgid] : null }, getTileCollisionGroup: function(t) { var e = this.getTileData(t); return e && e.objectgroup ? e.objectgroup : null }, containsTileIndex: function(t) { return t >= this.firstgid && t < this.firstgid + this.total }, getTileTextureCoordinates: function(t) { return this.containsTileIndex(t) ? this.texCoordinates[t - this.firstgid] : null }, setImage: function(t) { return this.image = t, this.glTexture = t.get().source.glTexture, this.updateTileData(this.image.source[0].width, this.image.source[0].height), this }, setTileSize: function(t, e) { return void 0 !== t && (this.tileWidth = t), void 0 !== e && (this.tileHeight = e), this.image && this.updateTileData(this.image.source[0].width, this.image.source[0].height), this }, setSpacing: function(t, e) { return void 0 !== t && (this.tileMargin = t), void 0 !== e && (this.tileSpacing = e), this.image && this.updateTileData(this.image.source[0].width, this.image.source[0].height), this }, updateTileData: function(t, e) { var i = (e - 2 * this.tileMargin + this.tileSpacing) / (this.tileHeight + this.tileSpacing) , n = (t - 2 * this.tileMargin + this.tileSpacing) / (this.tileWidth + this.tileSpacing); i % 1 == 0 && n % 1 == 0 || console.warn("Image tile area not tile size multiple in: " + this.name), i = Math.floor(i), n = Math.floor(n), this.rows = i, this.columns = n, this.total = i * n, this.texCoordinates.length = 0; for (var s = this.tileMargin, r = this.tileMargin, o = 0; o < this.rows; o++) { for (var a = 0; a < this.columns; a++) this.texCoordinates.push({ x: s, y: r }), s += this.tileWidth + this.tileSpacing; s = this.tileMargin, r += this.tileHeight + this.tileSpacing } return this } }); t.exports = n } , function(t, e) { t.exports = { TOP_LEFT: 0, TOP_CENTER: 1, TOP_RIGHT: 2, LEFT_TOP: 3, LEFT_CENTER: 4, LEFT_BOTTOM: 5, CENTER: 6, RIGHT_TOP: 7, RIGHT_CENTER: 8, RIGHT_BOTTOM: 9, BOTTOM_LEFT: 10, BOTTOM_CENTER: 11, BOTTOM_RIGHT: 12 } } , function(t, e) { t.exports = function(t, e, i) { return void 0 === i && (i = 1e-4), Math.abs(t - e) < i } } , function(t, e, i) { var n = i(0) , s = i(12) , r = i(14) , o = i(970) , a = new n({ Extends: r, Mixins: [s.Alpha, s.BlendMode, s.Depth, s.Flip, s.GetBounds, s.Mask, s.Origin, s.Pipeline, s.ScrollFactor, s.Size, s.TextureCrop, s.Tint, s.Transform, s.Visible, o], initialize: function(t, e, i, n, s) { r.call(this, t, "Image"), this._crop = this.resetCropObject(), this.setTexture(n, s), this.setPosition(e, i), this.setSizeToFrame(), this.setOriginFromFrame(), this.initPipeline() } }); t.exports = a } , function(t, e) { t.exports = function(t, e) { return t.hasOwnProperty(e) } } , function(t, e, i) { var v = {}; t.exports = v; var m = i(86) , y = i(42) , x = i(62) , d = i(100) , f = i(99) , T = i(1386); v.rectangle = function(t, e, i, n, s) { s = s || {}; var r, o = { label: "Rectangle Body", position: { x: t, y: e }, vertices: m.fromPath("L 0 0 L " + i + " 0 L " + i + " " + n + " L 0 " + n) }; return s.chamfer && (r = s.chamfer, o.vertices = m.chamfer(o.vertices, r.radius, r.quality, r.qualityMin, r.qualityMax), delete s.chamfer), x.create(y.extend({}, o, s)) } , v.trapezoid = function(t, e, i, n, s, r) { r = r || {}; var o, a = i * (s *= .5), h = a + (1 - 2 * s) * i, l = h + a, u = s < .5 ? "L 0 0 L " + a + " " + -n + " L " + h + " " + -n + " L " + l + " 0" : "L 0 0 L " + h + " " + -n + " L " + l + " 0", c = { label: "Trapezoid Body", position: { x: t, y: e }, vertices: m.fromPath(u) }; return r.chamfer && (o = r.chamfer, c.vertices = m.chamfer(c.vertices, o.radius, o.quality, o.qualityMin, o.qualityMax), delete r.chamfer), x.create(y.extend({}, c, r)) } , v.circle = function(t, e, i, n, s) { n = n || {}; var r = { label: "Circle Body", circleRadius: i }; s = s || 25; var o = Math.ceil(Math.max(10, Math.min(s, i))); return o % 2 == 1 && (o += 1), v.polygon(t, e, o, i, y.extend({}, r, n)) } , v.polygon = function(t, e, i, n, s) { if (s = s || {}, i < 3) return v.circle(t, e, n, s); for (var r = 2 * Math.PI / i, o = "", a = .5 * r, h = 0; h < i; h += 1) { var l = a + h * r , u = Math.cos(l) * n , c = Math.sin(l) * n; o += "L " + u.toFixed(3) + " " + c.toFixed(3) + " " } var d, f = { label: "Polygon Body", position: { x: t, y: e }, vertices: m.fromPath(o) }; return s.chamfer && (d = s.chamfer, f.vertices = m.chamfer(f.vertices, d.radius, d.quality, d.qualityMin, d.qualityMax), delete s.chamfer), x.create(y.extend({}, f, s)) } , v.fromVertices = function(t, e, i, n, s, r, o) { var a, h, l, u, c; for (n = n || {}, h = [], s = void 0 !== s && s, r = void 0 !== r ? r : .01, o = void 0 !== o ? o : 10, T || y.warn("Bodies.fromVertices: poly-decomp.js required. Could not decompose vertices. Fallback to convex hull."), y.isArray(i[0]) || (i = [i]), c = 0; c < i.length; c += 1) if (u = i[c], (l = m.isConvex(u)) || !T) u = l ? m.clockwiseSort(u) : m.hull(u), h.push({ position: { x: t, y: e }, vertices: u }); else { var d = u.map(function(t) { return [t.x, t.y] }); T.makeCCW(d), !1 !== r && T.removeCollinearPoints(d, r); for (var f = T.quickDecomp(d), p = 0; p < f.length; p++) { var g = f[p].map(function(t) { return { x: t[0], y: t[1] } }); 0 < o && m.area(g) < o || h.push({ position: m.centre(g), vertices: g }) } } for (p = 0; p < h.length; p++) h[p] = x.create(y.extend(h[p], n)); return s && v.flagCoincidentParts(h, 5), 1 < h.length ? (a = x.create(y.extend({ parts: h.slice(0) }, n)), x.setPosition(a, { x: t, y: e }), a) : h[0] } , v.flagCoincidentParts = function(t, e) { void 0 === e && (e = 5); for (var i = 0; i < t.length; i++) for (var n = t[i], s = i + 1; s < t.length; s++) { var r = t[s]; if (d.overlaps(n.bounds, r.bounds)) for (var o = n.vertices, a = r.vertices, h = 0; h < n.vertices.length; h++) for (var l = 0; l < r.vertices.length; l++) { var u = f.magnitudeSquared(f.sub(o[(h + 1) % o.length], a[l])) , c = f.magnitudeSquared(f.sub(o[h], a[(l + 1) % a.length])); u < e && c < e && (o[h].isInternal = !0, a[l].isInternal = !0) } } return t } } , function(t, e, i) { var r = i(52) , n = i(65) , s = i(55) , o = i(0) , a = i(12) , h = i(14) , l = i(11) , u = i(48) , c = new o({ Extends: h, Mixins: [a.Depth, a.GetBounds, a.Origin, a.Transform, a.ScrollFactor, a.Visible], initialize: function(t, e, i, n, s) { void 0 === n && (n = 1), void 0 === s && (s = n), h.call(this, t, "Zone"), this.setPosition(e, i), this.width = n, this.height = s, this.blendMode = r.NORMAL, this.updateDisplayOrigin() }, displayWidth: { get: function() { return this.scaleX * this.width }, set: function(t) { this.scaleX = t / this.width } }, displayHeight: { get: function() { return this.scaleY * this.height }, set: function(t) { this.scaleY = t / this.height } }, setSize: function(t, e, i) { void 0 === i && (i = !0), this.width = t, this.height = e, this.updateDisplayOrigin(); var n = this.input; return i && n && !n.customHitArea && (n.hitArea.width = t, n.hitArea.height = e), this }, setDisplaySize: function(t, e) { return this.displayWidth = t, this.displayHeight = e, this }, setCircleDropZone: function(t) { return this.setDropZone(new n(0,0,t), s) }, setRectangleDropZone: function(t, e) { return this.setDropZone(new l(0,0,t,e), u) }, setDropZone: function(t, e) { return void 0 === t ? this.setRectangleDropZone(this.width, this.height) : this.input || this.setInteractive(t, e, !0), this }, setAlpha: function() {}, setBlendMode: function() {}, renderCanvas: function() {}, renderWebGL: function() {} }); t.exports = c } , function(t, e, i) { t.exports = { ADD_ANIMATION: i(534), ANIMATION_COMPLETE: i(535), ANIMATION_REPEAT: i(536), ANIMATION_RESTART: i(537), ANIMATION_START: i(538), PAUSE_ALL: i(539), REMOVE_ANIMATION: i(540), RESUME_ALL: i(541), SPRITE_ANIMATION_COMPLETE: i(542), SPRITE_ANIMATION_KEY_COMPLETE: i(543), SPRITE_ANIMATION_KEY_REPEAT: i(544), SPRITE_ANIMATION_KEY_RESTART: i(545), SPRITE_ANIMATION_KEY_START: i(546), SPRITE_ANIMATION_KEY_UPDATE: i(547), SPRITE_ANIMATION_REPEAT: i(548), SPRITE_ANIMATION_RESTART: i(549), SPRITE_ANIMATION_START: i(550), SPRITE_ANIMATION_UPDATE: i(551) } } , function(t, e) { t.exports = function(t) { return 2 * (t.width + t.height) } } , function(t, e, i) { var n = i(0) , a = i(284) , s = new n({ initialize: function(t, e) { this.parent = t, (this.events = e) || (this.events = t.events ? t.events : t), this.list = {}, this.values = {}, this._frozen = !1, !t.hasOwnProperty("sys") && this.events && this.events.once("destroy", this.destroy, this) }, get: function(t) { var e = this.list; if (Array.isArray(t)) { for (var i = [], n = 0; n < t.length; n++) i.push(e[t[n]]); return i } return e[t] }, getAll: function() { var t = {}; for (var e in this.list) this.list.hasOwnProperty(e) && (t[e] = this.list[e]); return t }, query: function(t) { var e = {}; for (var i in this.list) this.list.hasOwnProperty(i) && i.match(t) && (e[i] = this.list[i]); return e }, set: function(t, e) { if (this._frozen) return this; if ("string" == typeof t) return this.setValue(t, e); for (var i in t) this.setValue(i, t[i]); return this }, inc: function(t, e) { if (this._frozen) return this; void 0 === e && (e = 1); var i = this.get(t); return void 0 === i && (i = 0), this.set(t, i + e), this }, toggle: function(t) { return this._frozen || this.set(t, !this.get(t)), this }, setValue: function(i, t) { return this._frozen || (this.has(i) ? this.values[i] = t : (s = (n = this).list, r = this.events, o = this.parent, Object.defineProperty(this.values, i, { enumerable: !0, configurable: !0, get: function() { return s[i] }, set: function(t) { var e; n._frozen || (e = s[i], s[i] = t, r.emit(a.CHANGE_DATA, o, i, t, e), r.emit(a.CHANGE_DATA_KEY + i, o, t, e)) } }), s[i] = t, r.emit(a.SET_DATA, o, i, t))), this; var n, s, r, o }, each: function(t, e) { for (var i = [this.parent, null, void 0], n = 1; n < arguments.length; n++) i.push(arguments[n]); for (var s in this.list) i[1] = s, i[2] = this.list[s], t.apply(e, i); return this }, merge: function(t, e) { for (var i in void 0 === e && (e = !0), t) t.hasOwnProperty(i) && (e || !e && !this.has(i)) && this.setValue(i, t[i]); return this }, remove: function(t) { if (this._frozen) return this; if (!Array.isArray(t)) return this.removeValue(t); for (var e = 0; e < t.length; e++) this.removeValue(t[e]); return this }, removeValue: function(t) { var e; return this.has(t) && (e = this.list[t], delete this.list[t], delete this.values[t], this.events.emit(a.REMOVE_DATA, this.parent, t, e)), this }, pop: function(t) { var e = void 0; return !this._frozen && this.has(t) && (e = this.list[t], delete this.list[t], delete this.values[t], this.events.emit(a.REMOVE_DATA, this.parent, t, e)), e }, has: function(t) { return this.list.hasOwnProperty(t) }, setFreeze: function(t) { return this._frozen = t, this }, reset: function() { for (var t in this.list) delete this.list[t], delete this.values[t]; return this._frozen = !1, this }, destroy: function() { this.reset(), this.events.off(a.CHANGE_DATA), this.events.off(a.SET_DATA), this.events.off(a.REMOVE_DATA), this.parent = null }, freeze: { get: function() { return this._frozen }, set: function(t) { this._frozen = !!t } }, count: { get: function() { var t = 0; for (var e in this.list) void 0 !== this.list[e] && t++; return t } } }); t.exports = s } , function(t, e) { t.exports = function(t) { for (var e = t.length - 1; 0 < e; e--) { var i = Math.floor(Math.random() * (e + 1)) , n = t[e]; t[e] = t[i], t[i] = n } return t } } , function(t, e, i) { var n = i(302) , s = i(303) , r = i(304) , o = i(305) , a = i(306) , h = i(307) , l = i(308) , u = i(309) , c = i(310) , d = i(311) , f = i(312) , p = i(313); t.exports = { Power0: l, Power1: u.Out, Power2: o.Out, Power3: c.Out, Power4: d.Out, Linear: l, Quad: u.Out, Cubic: o.Out, Quart: c.Out, Quint: d.Out, Sine: f.Out, Expo: h.Out, Circ: r.Out, Elastic: a.Out, Back: n.Out, Bounce: s.Out, Stepped: p, "Quad.easeIn": u.In, "Cubic.easeIn": o.In, "Quart.easeIn": c.In, "Quint.easeIn": d.In, "Sine.easeIn": f.In, "Expo.easeIn": h.In, "Circ.easeIn": r.In, "Elastic.easeIn": a.In, "Back.easeIn": n.In, "Bounce.easeIn": s.In, "Quad.easeOut": u.Out, "Cubic.easeOut": o.Out, "Quart.easeOut": c.Out, "Quint.easeOut": d.Out, "Sine.easeOut": f.Out, "Expo.easeOut": h.Out, "Circ.easeOut": r.Out, "Elastic.easeOut": a.Out, "Back.easeOut": n.Out, "Bounce.easeOut": s.Out, "Quad.easeInOut": u.InOut, "Cubic.easeInOut": o.InOut, "Quart.easeInOut": c.InOut, "Quint.easeInOut": d.InOut, "Sine.easeInOut": f.InOut, "Expo.easeInOut": h.InOut, "Circ.easeInOut": r.InOut, "Elastic.easeInOut": a.InOut, "Back.easeInOut": n.InOut, "Bounce.easeInOut": s.InOut } } , function(t, e) { t.exports = function(t, e, i) { return (e - t) * i + t } } , function(t, e, i) { (function(i) { var n = { android: !1, chromeOS: !1, cordova: !1, crosswalk: !1, desktop: !1, ejecta: !1, electron: !1, iOS: !1, iOSVersion: 0, iPad: !1, iPhone: !1, kindle: !1, linux: !1, macOS: !1, node: !1, nodeWebkit: !1, pixelRatio: 1, webApp: !1, windows: !1, windowsPhone: !1 }; t.exports = function() { var t = navigator.userAgent; /Windows/.test(t) ? n.windows = !0 : /Mac OS/.test(t) && !/like Mac OS/.test(t) ? n.macOS = !0 : /Android/.test(t) ? n.android = !0 : /Linux/.test(t) ? n.linux = !0 : /iP[ao]d|iPhone/i.test(t) ? (n.iOS = !0, navigator.appVersion.match(/OS (\d+)/), n.iOSVersion = parseInt(RegExp.$1, 10), n.iPhone = -1 !== t.toLowerCase().indexOf("iphone"), n.iPad = -1 !== t.toLowerCase().indexOf("ipad")) : /Kindle/.test(t) || /\bKF[A-Z][A-Z]+/.test(t) || /Silk.*Mobile Safari/.test(t) ? n.kindle = !0 : /CrOS/.test(t) && (n.chromeOS = !0), (/Windows Phone/i.test(t) || /IEMobile/i.test(t)) && (n.android = !1, n.iOS = !1, n.macOS = !1, n.windows = !0, n.windowsPhone = !0); var e = /Silk/.test(t); return (n.windows || n.macOS || n.linux && !e || n.chromeOS) && (n.desktop = !0), (n.windowsPhone || /Windows NT/i.test(t) && /Touch/i.test(t)) && (n.desktop = !1), navigator.standalone && (n.webApp = !0), void 0 !== window.cordova && (n.cordova = !0), void 0 !== i && i.versions && i.versions.node && (n.node = !0), n.node && "object" == typeof i.versions && (n.nodeWebkit = !!i.versions["node-webkit"], n.electron = !!i.versions.electron), void 0 !== window.ejecta && (n.ejecta = !0), /Crosswalk/.test(t) && (n.crosswalk = !0), n.pixelRatio = window.devicePixelRatio || 1, n }() } ).call(this, i(729)) } , function(t, e, i) { var n, s = i(117), r = { chrome: !1, chromeVersion: 0, edge: !1, firefox: !1, firefoxVersion: 0, ie: !1, ieVersion: 0, mobileSafari: !1, opera: !1, safari: !1, safariVersion: 0, silk: !1, trident: !1, tridentVersion: 0 }; t.exports = (n = navigator.userAgent, /Edge\/\d+/.test(n) ? r.edge = !0 : /Chrome\/(\d+)/.test(n) && !s.windowsPhone ? (r.chrome = !0, r.chromeVersion = parseInt(RegExp.$1, 10)) : /Firefox\D+(\d+)/.test(n) ? (r.firefox = !0, r.firefoxVersion = parseInt(RegExp.$1, 10)) : /AppleWebKit/.test(n) && s.iOS ? r.mobileSafari = !0 : /MSIE (\d+\.\d+);/.test(n) ? (r.ie = !0, r.ieVersion = parseInt(RegExp.$1, 10)) : /Opera/.test(n) ? r.opera = !0 : /Safari/.test(n) && !s.windowsPhone ? r.safari = !0 : /Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(n) && (r.ie = !0, r.trident = !0, r.tridentVersion = parseInt(RegExp.$1, 10), r.ieVersion = parseInt(RegExp.$3, 10)), /Silk/.test(n) && (r.silk = !0), r) } , function(t, e) { t.exports = function(t, e) { return Math.random() * (e - t) + t } } , function(t, e) { t.exports = function(t, e) { return 0 < t && 0 == (t & t - 1) && 0 < e && 0 == (e & e - 1) } } , function(t, e, i) { t.exports = { ADD: i(781), ERROR: i(782), LOAD: i(783), READY: i(784), REMOVE: i(785) } } , function(t, e) { t.exports = function(t, e) { var i; if (e) "string" == typeof e ? i = document.getElementById(e) : "object" == typeof e && 1 === e.nodeType && (i = e); else if (t.parentElement || null === e) return t; return (i = i || document.body).appendChild(t), t } } , function(t, e, i) { var a = i(80); t.exports = function(t, e, i, n) { if (void 0 === n && (n = t), !Array.isArray(e)) return -1 !== (r = t.indexOf(e)) ? (a(t, r), i && i.call(n, e), e) : null; for (var s = e.length - 1; 0 <= s; ) { var r, o = e[s]; -1 !== (r = t.indexOf(o)) ? (a(t, r), i && i.call(n, o)) : e.pop(), s-- } return e } } , function(t, e) { t.exports = { BACKSPACE: 8, TAB: 9, ENTER: 13, SHIFT: 16, CTRL: 17, ALT: 18, PAUSE: 19, CAPS_LOCK: 20, ESC: 27, SPACE: 32, PAGE_UP: 33, PAGE_DOWN: 34, END: 35, HOME: 36, LEFT: 37, UP: 38, RIGHT: 39, DOWN: 40, PRINT_SCREEN: 42, INSERT: 45, DELETE: 46, ZERO: 48, ONE: 49, TWO: 50, THREE: 51, FOUR: 52, FIVE: 53, SIX: 54, SEVEN: 55, EIGHT: 56, NINE: 57, NUMPAD_ZERO: 96, NUMPAD_ONE: 97, NUMPAD_TWO: 98, NUMPAD_THREE: 99, NUMPAD_FOUR: 100, NUMPAD_FIVE: 101, NUMPAD_SIX: 102, NUMPAD_SEVEN: 103, NUMPAD_EIGHT: 104, NUMPAD_NINE: 105, NUMPAD_ADD: 107, NUMPAD_SUBTRACT: 109, A: 65, B: 66, C: 67, D: 68, E: 69, F: 70, G: 71, H: 72, I: 73, J: 74, K: 75, L: 76, M: 77, N: 78, O: 79, P: 80, Q: 81, R: 82, S: 83, T: 84, U: 85, V: 86, W: 87, X: 88, Y: 89, Z: 90, F1: 112, F2: 113, F3: 114, F4: 115, F5: 116, F6: 117, F7: 118, F8: 119, F9: 120, F10: 121, F11: 122, F12: 123, SEMICOLON: 186, PLUS: 187, COMMA: 188, MINUS: 189, PERIOD: 190, FORWARD_SLASH: 191, BACK_SLASH: 220, QUOTES: 222, BACKTICK: 192, OPEN_BRACKET: 219, CLOSED_BRACKET: 221, SEMICOLON_FIREFOX: 59, COLON: 58, COMMA_FIREFOX_WINDOWS: 60, COMMA_FIREFOX: 62, BRACKET_RIGHT_FIREFOX: 174, BRACKET_LEFT_FIREFOX: 175 } } , function(t, e) { t.exports = { PENDING: 0, INIT: 1, START: 2, LOADING: 3, CREATING: 4, RUNNING: 5, PAUSED: 6, SLEEPING: 7, SHUTDOWN: 8, DESTROYED: 9 } } , function(t, e, i) { var s = i(67); t.exports = function(t, e) { var i = s(t); for (var n in e) i.hasOwnProperty(n) || (i[n] = e[n]); return i } } , function(t, e, i) { var n = i(0) , o = i(67) , s = i(10) , r = i(59) , a = i(20) , h = i(1) , l = i(382) , u = i(383) , c = new n({ Extends: s, initialize: function(t) { s.call(this), this.game = t, this.jsonCache = t.cache.json, this.sounds = [], this.mute = !1, this.volume = 1, this.pauseOnBlur = !0, this._rate = 1, this._detune = 0, this.locked = this.locked || !1, this.unlocked = !1, t.events.on(a.BLUR, this.onGameBlur, this), t.events.on(a.FOCUS, this.onGameFocus, this), t.events.on(a.PRE_STEP, this.update, this), t.events.once(a.DESTROY, this.destroy, this) }, add: h, addAudioSprite: function(t, e) { void 0 === e && (e = {}); var i, n, s = this.add(t, e); for (var r in s.spritemap = this.jsonCache.get(t).spritemap, s.spritemap) { s.spritemap.hasOwnProperty(r) && (i = o(e), n = s.spritemap[r], i.loop = !!n.hasOwnProperty("loop") && n.loop, s.addMarker({ name: r, start: n.start, duration: n.end - n.start, config: i })) } return s }, get: function(t) { return u(this.sounds, "key", t) }, getAll: function(t) { return l(this.sounds, "key", t) }, play: function(t, e) { var i = this.add(t); return i.once(r.COMPLETE, i.destroy, i), e ? e.name ? (i.addMarker(e), i.play(e.name)) : i.play(e) : i.play() }, playAudioSprite: function(t, e, i) { var n = this.addAudioSprite(t); return n.once(r.COMPLETE, n.destroy, n), n.play(e, i) }, remove: function(t) { var e = this.sounds.indexOf(t); return -1 !== e && (t.destroy(), this.sounds.splice(e, 1), !0) }, removeAll: function() { this.sounds.forEach(function(t) { t.destroy() }), this.sounds.length = 0 }, removeByKey: function(t) { for (var e = 0, i = this.sounds.length - 1; 0 <= i; i--) { var n = this.sounds[i]; n.key === t && (n.destroy(), this.sounds.splice(i, 1), e++) } return e }, pauseAll: function() { this.forEachActiveSound(function(t) { t.pause() }), this.emit(r.PAUSE_ALL, this) }, resumeAll: function() { this.forEachActiveSound(function(t) { t.resume() }), this.emit(r.RESUME_ALL, this) }, stopAll: function() { this.forEachActiveSound(function(t) { t.stop() }), this.emit(r.STOP_ALL, this) }, stopByKey: function(t) { var e = 0; return this.getAll(t).forEach(function(t) { t.stop() && e++ }), e }, unlock: h, onBlur: h, onFocus: h, onGameBlur: function() { this.pauseOnBlur && this.onBlur() }, onGameFocus: function() { this.pauseOnBlur && this.onFocus() }, update: function(e, i) { this.unlocked && (this.unlocked = !1, this.locked = !1, this.emit(r.UNLOCKED, this)); for (var t = this.sounds.length - 1; 0 <= t; t--) this.sounds[t].pendingRemove && this.sounds.splice(t, 1); this.sounds.forEach(function(t) { t.update(e, i) }) }, destroy: function() { this.game.events.off(a.BLUR, this.onGameBlur, this), this.game.events.off(a.FOCUS, this.onGameFocus, this), this.game.events.off(a.PRE_STEP, this.update, this), this.removeAllListeners(), this.removeAll(), this.sounds.length = 0, this.sounds = null, this.game = null }, forEachActiveSound: function(i, n) { var s = this; this.sounds.forEach(function(t, e) { t && !t.pendingRemove && i.call(n || s, t, e, s.sounds) }) }, setRate: function(t) { return this.rate = t, this }, rate: { get: function() { return this._rate }, set: function(t) { this._rate = t, this.forEachActiveSound(function(t) { t.calculateRate() }), this.emit(r.GLOBAL_RATE, this, t) } }, setDetune: function(t) { return this.detune = t, this }, detune: { get: function() { return this._detune }, set: function(t) { this._detune = t, this.forEachActiveSound(function(t) { t.calculateRate() }), this.emit(r.GLOBAL_DETUNE, this, t) } } }); t.exports = c } , function(t, e, i) { var n = i(0) , s = i(10) , r = i(59) , o = i(18) , a = i(1) , h = new n({ Extends: s, initialize: function(t, e, i) { s.call(this), this.manager = t, this.key = e, this.isPlaying = !1, this.isPaused = !1, this.totalRate = 1, this.duration = this.duration || 0, this.totalDuration = this.totalDuration || 0, this.config = { mute: !1, volume: 1, rate: 1, detune: 0, seek: 0, loop: !1, delay: 0 }, this.currentConfig = this.config, this.config = o(this.config, i), this.markers = {}, this.currentMarker = null, this.pendingRemove = !1 }, addMarker: function(t) { return !(!t || !t.name || "string" != typeof t.name) && (this.markers[t.name] ? (console.error("addMarker " + t.name + " already exists in Sound"), !1) : (t = o(!0, { name: "", start: 0, duration: this.totalDuration - (t.start || 0), config: { mute: !1, volume: 1, rate: 1, detune: 0, seek: 0, loop: !1, delay: 0 } }, t), this.markers[t.name] = t, !0)) }, updateMarker: function(t) { return !(!t || !t.name || "string" != typeof t.name) && (this.markers[t.name] ? (this.markers[t.name] = o(!0, this.markers[t.name], t), !0) : (console.warn("Audio Marker: " + t.name + " missing in Sound: " + this.key), !1)) }, removeMarker: function(t) { var e = this.markers[t]; return e ? (this.markers[t] = null, e) : null }, play: function(t, e) { if (void 0 === t && (t = ""), "object" == typeof t && (e = t, t = ""), "string" != typeof t) return !1; if (t) { if (!this.markers[t]) return console.warn("Marker: " + t + " missing in Sound: " + this.key), !1; this.currentMarker = this.markers[t], this.currentConfig = this.currentMarker.config, this.duration = this.currentMarker.duration } else this.currentMarker = null, this.currentConfig = this.config, this.duration = this.totalDuration; return this.resetConfig(), this.currentConfig = o(this.currentConfig, e), this.isPlaying = !0, !(this.isPaused = !1) }, pause: function() { return !(this.isPaused || !this.isPlaying) && (this.isPlaying = !1, this.isPaused = !0) }, resume: function() { return !(!this.isPaused || this.isPlaying) && (this.isPlaying = !0, !(this.isPaused = !1)) }, stop: function() { return !(!this.isPaused && !this.isPlaying) && (this.isPlaying = !1, this.isPaused = !1, this.resetConfig(), !0) }, applyConfig: function() { this.mute = this.currentConfig.mute, this.volume = this.currentConfig.volume, this.rate = this.currentConfig.rate, this.detune = this.currentConfig.detune, this.loop = this.currentConfig.loop }, resetConfig: function() { this.currentConfig.seek = 0, this.currentConfig.delay = 0 }, update: a, calculateRate: function() { var t = this.currentConfig.detune + this.manager.detune , e = Math.pow(1.0005777895065548, t); this.totalRate = this.currentConfig.rate * this.manager.rate * e }, destroy: function() { this.pendingRemove || (this.emit(r.DESTROY, this), this.pendingRemove = !0, this.manager = null, this.key = "", this.removeAllListeners(), this.isPlaying = !1, this.isPaused = !1, this.config = null, this.currentConfig = null, this.markers = null, this.currentMarker = null) } }); t.exports = h } , function(t, e, i) { var s = i(183) , n = i(0) , r = i(1) , o = i(131) , a = new n({ initialize: function(t) { this.parent = t, this.list = [], this.position = 0, this.addCallback = r, this.removeCallback = r, this._sortKey = "" }, add: function(t, e) { return e ? s.Add(this.list, t) : s.Add(this.list, t, 0, this.addCallback, this) }, addAt: function(t, e, i) { return i ? s.AddAt(this.list, t, e) : s.AddAt(this.list, t, e, 0, this.addCallback, this) }, getAt: function(t) { return this.list[t] }, getIndex: function(t) { return this.list.indexOf(t) }, sort: function(i, t) { return i && (void 0 === t && (t = function(t, e) { return t[i] - e[i] } ), o.inplace(this.list, t)), this }, getByName: function(t) { return s.GetFirst(this.list, "name", t) }, getRandom: function(t, e) { return s.GetRandom(this.list, t, e) }, getFirst: function(t, e, i, n) { return s.GetFirst(this.list, t, e, i, n) }, getAll: function(t, e, i, n) { return s.GetAll(this.list, t, e, i, n) }, count: function(t, e) { return s.CountAllMatching(this.list, t, e) }, swap: function(t, e) { s.Swap(this.list, t, e) }, moveTo: function(t, e) { return s.MoveTo(this.list, t, e) }, remove: function(t, e) { return e ? s.Remove(this.list, t) : s.Remove(this.list, t, this.removeCallback, this) }, removeAt: function(t, e) { return e ? s.RemoveAt(this.list, t) : s.RemoveAt(this.list, t, this.removeCallback, this) }, removeBetween: function(t, e, i) { return i ? s.RemoveBetween(this.list, t, e) : s.RemoveBetween(this.list, t, e, this.removeCallback, this) }, removeAll: function(t) { for (var e = this.list.length; e--; ) this.remove(this.list[e], t); return this }, bringToTop: function(t) { return s.BringToTop(this.list, t) }, sendToBack: function(t) { return s.SendToBack(this.list, t) }, moveUp: function(t) { return s.MoveUp(this.list, t), t }, moveDown: function(t) { return s.MoveDown(this.list, t), t }, reverse: function() { return this.list.reverse(), this }, shuffle: function() { return s.Shuffle(this.list), this }, replace: function(t, e) { return s.Replace(this.list, t, e) }, exists: function(t) { return -1 < this.list.indexOf(t) }, setAll: function(t, e, i, n) { return s.SetAll(this.list, t, e, i, n), this }, each: function(t, e) { for (var i = [null], n = 2; n < arguments.length; n++) i.push(arguments[n]); for (n = 0; n < this.list.length; n++) i[0] = this.list[n], t.apply(e, i) }, shutdown: function() { this.removeAll(), this.list = [] }, destroy: function() { this.removeAll(), this.parent = null, this.addCallback = null, this.removeCallback = null }, length: { get: function() { return this.list.length } }, first: { get: function() { return (this.position = 0) < this.list.length ? this.list[0] : null } }, last: { get: function() { return 0 < this.list.length ? (this.position = this.list.length - 1, this.list[this.position]) : null } }, next: { get: function() { return this.position < this.list.length ? (this.position++, this.list[this.position]) : null } }, previous: { get: function() { return 0 < this.position ? (this.position--, this.list[this.position]) : null } } }); t.exports = a } , function(t, e, i) { var n = i(184) , s = i(390); t.exports = function(t, e) { if (void 0 === e && (e = 90), !n(t)) return null; if ("string" != typeof e && (e = (e % 360 + 360) % 360), 90 === e || -270 === e || "rotateLeft" === e) (t = s(t)).reverse(); else if (-90 === e || 270 === e || "rotateRight" === e) t.reverse(), t = s(t); else if (180 === Math.abs(e) || "rotate180" === e) { for (var i = 0; i < t.length; i++) t[i].reverse(); t.reverse() } return t } } , function(e, t, i) { !function() { function t(t, e) { return n(t.slice(), e) } function n(t, e) { "function" != typeof e && (e = function(t, e) { return String(t).localeCompare(e) } ); var i = t.length; if (i <= 1) return t; for (var n = new Array(i), s = 1; s < i; s *= 2) { o(t, e, s, n); var r = t; t = n, n = r } return t } t.inplace = function(t, e) { var i = n(t, e); return i !== t && o(i, null, t.length, t), t } ; var o = function(t, e, i, n) { for (var s, r, o, a, h = t.length, l = 0, u = 2 * i, c = 0; c < h; c += u) for (r = (s = c + i) + i, h < s && (s = h), h < r && (r = h), o = c, a = s; ; ) if (o < s && a < r) e(t[o], t[a]) <= 0 ? n[l++] = t[o++] : n[l++] = t[a++]; else if (o < s) n[l++] = t[o++]; else { if (!(a < r)) break; n[l++] = t[a++] } }; e.exports = t }() } , function(t, e, i) { var n = i(0) , s = i(12) , h = i(14) , l = i(945) , r = i(946) , o = i(187) , a = i(947) , u = new n({ Extends: h, Mixins: [s.Alpha, s.BlendMode, s.Depth, s.Mask, s.Origin, s.Pipeline, s.ScrollFactor, s.Texture, s.Tint, s.Transform, s.Visible, a], initialize: function(t, e, i, n, s, r, o) { void 0 === s && (s = ""), void 0 === o && (o = 0), h.call(this, t, "BitmapText"), this.font = n; var a = this.scene.sys.cache.bitmapFont.get(n); this.fontData = a.data, this._text = "", this._fontSize = r || this.fontData.size, this._letterSpacing = 0, this._align = o, this._bounds = l(), this._dirty = !0, this._maxWidth = 0, this.wordWrapCharCode = 32, this.setTexture(a.texture, a.frame), this.setPosition(e, i), this.setOrigin(0, 0), this.initPipeline(), this.setText(s) }, setLeftAlign: function() { return this._align = u.ALIGN_LEFT, this._dirty = !0, this }, setCenterAlign: function() { return this._align = u.ALIGN_CENTER, this._dirty = !0, this }, setRightAlign: function() { return this._align = u.ALIGN_RIGHT, this._dirty = !0, this }, setFontSize: function(t) { return this._fontSize = t, this._dirty = !0, this }, setLetterSpacing: function(t) { return void 0 === t && (t = 0), this._letterSpacing = t, this._dirty = !0, this }, setText: function(t) { return t || 0 === t || (t = ""), Array.isArray(t) && (t = t.join("\n")), t !== this.text && (this._text = t.toString(), this._dirty = !0, this.updateDisplayOrigin()), this }, getTextBounds: function(t) { var e = this._bounds; return !this._dirty && this.scaleX === e.scaleX && this.scaleY === e.scaleY || (l(this, t, e), this._dirty = !1, this.updateDisplayOrigin()), e }, updateDisplayOrigin: function() { return this._displayOriginX = this.originX * this.width, this._displayOriginY = this.originY * this.height, this._dirty = !0, this }, setFont: function(t, e, i) { var n; return void 0 === e && (e = this._fontSize), void 0 === i && (i = this._align), t === this.font || (n = this.scene.sys.cache.bitmapFont.get(t)) && (this.font = t, this.fontData = n.data, this._fontSize = e, this._align = i, this.setTexture(n.texture, n.frame), l(this, !1, this._bounds)), this }, setMaxWidth: function(t, e) { return this._maxWidth = t, this._dirty = !0, void 0 !== e && (this.wordWrapCharCode = e), this }, align: { set: function(t) { this._align = t, this._dirty = !0 }, get: function() { return this._align } }, text: { set: function(t) { this.setText(t) }, get: function() { return this._text } }, fontSize: { set: function(t) { this._fontSize = t, this._dirty = !0 }, get: function() { return this._fontSize } }, letterSpacing: { set: function(t) { this._letterSpacing = t, this._dirty = !0 }, get: function() { return this._letterSpacing } }, maxWidth: { set: function(t) { this._maxWidth = t, this._dirty = !0 }, get: function() { return this._maxWidth } }, width: { get: function() { return this.getTextBounds(!1), this._bounds.global.width } }, height: { get: function() { return this.getTextBounds(!1), this._bounds.global.height } }, toJSON: function() { var t = s.ToJSON(this) , e = { font: this.font, text: this.text, fontSize: this.fontSize, letterSpacing: this.letterSpacing, align: this.align }; return t.data = e, t } }); u.ALIGN_LEFT = 0, u.ALIGN_CENTER = 1, u.ALIGN_RIGHT = 2, u.ParseFromAtlas = r, u.ParseXMLBitmapFont = o, t.exports = u } , function(t, e, i) { var n = new (i(0))({ initialize: function(t) { if (this.entries = [], Array.isArray(t)) for (var e = 0; e < t.length; e++) this.set(t[e]) }, set: function(t) { return -1 === this.entries.indexOf(t) && this.entries.push(t), this }, get: function(t, e) { for (var i = 0; i < this.entries.length; i++) { var n = this.entries[i]; if (n[t] === e) return n } }, getArray: function() { return this.entries.slice(0) }, delete: function(t) { var e = this.entries.indexOf(t); return -1 < e && this.entries.splice(e, 1), this }, dump: function() { console.group("Set"); for (var t = 0; t < this.entries.length; t++) { var e = this.entries[t]; console.log(e) } console.groupEnd() }, each: function(t, e) { var i, n = this.entries.slice(), s = n.length; if (e) for (i = 0; i < s && !1 !== t.call(e, n[i], i); i++) ; else for (i = 0; i < s && !1 !== t(n[i], i); i++) ; return this }, iterate: function(t, e) { var i, n = this.entries.length; if (e) for (i = 0; i < n && !1 !== t.call(e, this.entries[i], i); i++) ; else for (i = 0; i < n && !1 !== t(this.entries[i], i); i++) ; return this }, iterateLocal: function(t) { for (var e = [], i = 1; i < arguments.length; i++) e.push(arguments[i]); var n = this.entries.length; for (i = 0; i < n; i++) { var s = this.entries[i]; s[t].apply(s, e) } return this }, clear: function() { return this.entries.length = 0, this }, contains: function(t) { return -1 < this.entries.indexOf(t) }, union: function(t) { var e = new n; return t.entries.forEach(function(t) { e.set(t) }), this.entries.forEach(function(t) { e.set(t) }), e }, intersect: function(e) { var i = new n; return this.entries.forEach(function(t) { e.contains(t) && i.set(t) }), i }, difference: function(e) { var i = new n; return this.entries.forEach(function(t) { e.contains(t) || i.set(t) }), i }, size: { get: function() { return this.entries.length }, set: function(t) { return t < this.entries.length ? this.entries.length = t : this.entries.length } } }); t.exports = n } , function(t, e, i) { var n = i(0) , s = i(12) , c = i(14) , r = i(1077) , o = i(1) , a = new n({ Extends: c, Mixins: [s.BlendMode, s.Depth, s.Mask, s.Pipeline, s.Size, s.Texture, s.Transform, s.Visible, s.ScrollFactor, r], initialize: function(t, e, i, n, s, r, o, a, h) { if (c.call(this, t, "Mesh"), n.length !== s.length) throw new Error("Mesh Vertex count must match UV count"); var l, u = n.length / 2 | 0; if (0 < r.length && r.length < u) throw new Error("Mesh Color count must match Vertex count"); if (0 < o.length && o.length < u) throw new Error("Mesh Alpha count must match Vertex count"); if (0 === r.length) for (l = 0; l < u; ++l) r[l] = 16777215; if (0 === o.length) for (l = 0; l < u; ++l) o[l] = 1; this.vertices = new Float32Array(n), this.uv = new Float32Array(s), this.colors = new Uint32Array(r), this.alphas = new Float32Array(o), this.tintFill = !1, this.setTexture(a, h), this.setPosition(e, i), this.setSizeToFrame(), this.initPipeline() }, setAlpha: o }); t.exports = a } , function(t, e) { t.exports = function(t, e) { return !(t.width <= 0 || t.height <= 0 || e.width <= 0 || e.height <= 0) && !(t.right < e.x || t.bottom < e.y || t.x > e.right || t.y > e.bottom) } } , function(t, e, i) { var l = i(6) , u = {} , n = { register: function(t, e, i, n, s) { u[t] = { plugin: e, mapping: i, settingsKey: n, configKey: s } }, getPlugin: function(t) { return u[t] }, install: function(t) { var e = t.scene.sys , i = e.settings.input , n = e.game.config; for (var s in u) { var r = u[s].plugin , o = u[s].mapping , a = u[s].settingsKey , h = u[s].configKey; l(i, a, n[h]) && (t[o] = new r(t)) } }, remove: function(t) { u.hasOwnProperty(t) && delete u[t] } }; t.exports = n } , function(t, e, i) { t.exports = { ANY_KEY_DOWN: i(1217), ANY_KEY_UP: i(1218), COMBO_MATCH: i(1219), DOWN: i(1220), KEY_DOWN: i(1221), KEY_UP: i(1222), UP: i(1223) } } , function(t, e) { t.exports = function(t, e) { return !!t.url && (t.url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/) ? t.url : e + t.url) } } , function(t, e) { t.exports = function(t, e, i, n, s, r) { return void 0 === t && (t = ""), void 0 === e && (e = !0), void 0 === i && (i = ""), void 0 === n && (n = ""), void 0 === s && (s = 0), void 0 === r && (r = !1), { responseType: t, async: e, user: i, password: n, timeout: s, headers: void 0, header: void 0, headerValue: void 0, requestedWith: !1, overrideMimeType: void 0, withCredentials: r } } } , function(t, e, i) { var n = i(0) , s = i(217) , r = i(75) , o = new n({ Extends: r, Mixins: [s.Acceleration, s.Angular, s.Bounce, s.Debug, s.Drag, s.Enable, s.Friction, s.Gravity, s.Immovable, s.Mass, s.Size, s.Velocity], initialize: function(t, e, i, n, s) { r.call(this, t, e, i, n, s), this.body = null } }); t.exports = o } , function(t, e, i) { t.exports = { CalculateFacesAt: i(220), CalculateFacesWithin: i(51), Copy: i(1313), CreateFromTiles: i(1314), CullTiles: i(1315), Fill: i(1316), FilterTiles: i(1317), FindByIndex: i(1318), FindTile: i(1319), ForEachTile: i(1320), GetTileAt: i(142), GetTileAtWorldXY: i(1321), GetTilesWithin: i(24), GetTilesWithinShape: i(1322), GetTilesWithinWorldXY: i(1323), HasTileAt: i(476), HasTileAtWorldXY: i(1324), IsInLayerBounds: i(101), PutTileAt: i(221), PutTileAtWorldXY: i(1325), PutTilesAt: i(1326), Randomize: i(1327), RemoveTileAt: i(477), RemoveTileAtWorldXY: i(1328), RenderDebug: i(1329), ReplaceByIndex: i(475), SetCollision: i(1330), SetCollisionBetween: i(1331), SetCollisionByExclusion: i(1332), SetCollisionByProperty: i(1333), SetCollisionFromCollisionGroup: i(1334), SetTileIndexCallback: i(1335), SetTileLocationCallback: i(1336), Shuffle: i(1337), SwapByIndex: i(1338), TileToWorldX: i(143), TileToWorldXY: i(1339), TileToWorldY: i(144), WeightedRandomize: i(1340), WorldToTileX: i(63), WorldToTileXY: i(1341), WorldToTileY: i(64) } } , function(t, e, i) { var r = i(101); t.exports = function(t, e, i, n) { if (void 0 === i && (i = !1), r(t, e, n)) { var s = n.data[e][t] || null; return null !== s && (-1 !== s.index || i) ? s : null } return null } } , function(t, e) { t.exports = function(t, e, i) { var n = i.baseTileWidth , s = i.tilemapLayer , r = 0; return s && (void 0 === e && (e = s.scene.cameras.main), r = s.x + e.scrollX * (1 - s.scrollFactorX), n *= s.scaleX), r + t * n } } , function(t, e) { t.exports = function(t, e, i) { var n = i.baseTileHeight , s = i.tilemapLayer , r = 0; return s && (void 0 === e && (e = s.scene.cameras.main), r = s.y + e.scrollY * (1 - s.scrollFactorY), n *= s.scaleY), r + t * n } } , function(t, e) { t.exports = function(o, a, t) { return o.hasOwnProperty(a) ? "function" == typeof o[a] ? function(t, e, i, n, s, r) { return o[a](t, e, i, n, s, r) } : function() { return o[a] } : "function" == typeof t ? t : function() { return t } } } , function(t, e, i) { var R = i(230) , L = i(15) , k = i(88) , D = i(69) , F = i(145) , I = i(498) , B = i(228) , N = i(6) , Y = i(229) , X = i(231) , U = i(233); t.exports = function(t, e, i) { void 0 === i && (i = R); for (var n = i.targets ? i.targets : B(e), s = I(e), r = F(e, "delay", i.delay), o = F(e, "duration", i.duration), a = N(e, "easeParams", i.easeParams), h = D(N(e, "ease", i.ease), a), l = F(e, "hold", i.hold), u = F(e, "repeat", i.repeat), c = F(e, "repeatDelay", i.repeatDelay), d = k(e, "yoyo", i.yoyo), f = k(e, "flipX", i.flipX), p = k(e, "flipY", i.flipY), g = [], v = 0; v < s.length; v++) for (var m = s[v].key, y = s[v].value, x = 0; x < n.length; x++) { var T = Y(m, y) , w = U(n[x], x, m, T.getEnd, T.getStart, T.getActive, D(N(y, "ease", h), a), F(y, "delay", r), F(y, "duration", o), k(y, "yoyo", d), F(y, "hold", l), F(y, "repeat", u), F(y, "repeatDelay", c), k(y, "flipX", f), k(y, "flipY", p)); g.push(w) } var b = new X(t,g,n); b.offset = L(e, "offset", null), b.completeDelay = L(e, "completeDelay", 0), b.loop = Math.round(L(e, "loop", 0)), b.loopDelay = Math.round(L(e, "loopDelay", 0)), b.paused = k(e, "paused", !1), b.useFrames = k(e, "useFrames", !1); for (var E = N(e, "callbackScope", b), S = [b, null], _ = X.TYPES, A = 0; A < _.length; A++) { var C, M, P = _[A], O = N(e, P, !1); O && (C = N(e, P + "Scope", E), M = N(e, P + "Params", []), b.setCallback(P, O, S.concat(M), C)) } return b } } , function(t, e, i) { var n = i(0) , r = i(9) , s = new n({ initialize: function(t) { this.name = "WebGLPipeline", this.game = t.game, this.view = t.game.canvas, this.resolution = 1, this.width = 0, this.height = 0, this.gl = t.gl, this.vertexCount = 0, this.vertexCapacity = t.vertexCapacity, this.renderer = t.renderer, this.vertexData = t.vertices ? t.vertices : new ArrayBuffer(t.vertexCapacity * t.vertexSize), this.vertexBuffer = this.renderer.createVertexBuffer(t.vertices ? t.vertices : this.vertexData.byteLength, this.gl.STREAM_DRAW), this.program = this.renderer.createProgram(t.vertShader, t.fragShader), this.attributes = t.attributes, this.vertexSize = t.vertexSize, this.topology = t.topology, this.bytes = new Uint8Array(this.vertexData), this.vertexComponentCount = r.getComponentCount(t.attributes, this.gl), this.flushLocked = !1, this.active = !1 }, boot: function() {}, addAttribute: function(t, e, i, n, s) { return this.attributes.push({ name: t, size: e, type: this.renderer.glFormats[i], normalized: n, offset: s }), this.vertexComponentCount = r.getComponentCount(this.attributes, this.gl), this }, shouldFlush: function() { return this.vertexCount >= this.vertexCapacity }, resize: function(t, e, i) { return this.width = t * i, this.height = e * i, this.resolution = i, this }, bind: function() { var t = this.gl , e = this.vertexBuffer , i = this.attributes , n = this.program , s = this.renderer , r = this.vertexSize; s.setProgram(n), s.setVertexBuffer(e); for (var o = 0; o < i.length; ++o) { var a = i[o] , h = t.getAttribLocation(n, a.name); 0 <= h ? (t.enableVertexAttribArray(h), t.vertexAttribPointer(h, a.size, a.type, a.normalized, r, a.offset)) : -1 !== h && t.disableVertexAttribArray(h) } return this }, onBind: function() { return this }, onPreRender: function() { return this }, onRender: function() { return this }, onPostRender: function() { return this }, flush: function() { if (this.flushLocked) return this; this.flushLocked = !0; var t = this.gl , e = this.vertexCount , i = this.topology , n = this.vertexSize; if (0 !== e) return t.bufferSubData(t.ARRAY_BUFFER, 0, this.bytes.subarray(0, e * n)), t.drawArrays(i, 0, e), this.vertexCount = 0, this.flushLocked = !1, this; this.flushLocked = !1 }, destroy: function() { var t = this.gl; return t.deleteProgram(this.program), t.deleteBuffer(this.vertexBuffer), delete this.program, delete this.vertexBuffer, delete this.gl, this }, setFloat1: function(t, e) { return this.renderer.setFloat1(this.program, t, e), this }, setFloat2: function(t, e, i) { return this.renderer.setFloat2(this.program, t, e, i), this }, setFloat3: function(t, e, i, n) { return this.renderer.setFloat3(this.program, t, e, i, n), this }, setFloat4: function(t, e, i, n, s) { return this.renderer.setFloat4(this.program, t, e, i, n, s), this }, setFloat1v: function(t, e) { return this.renderer.setFloat1v(this.program, t, e), this }, setFloat2v: function(t, e) { return this.renderer.setFloat2v(this.program, t, e), this }, setFloat3v: function(t, e) { return this.renderer.setFloat3v(this.program, t, e), this }, setFloat4v: function(t, e) { return this.renderer.setFloat4v(this.program, t, e), this }, setInt1: function(t, e) { return this.renderer.setInt1(this.program, t, e), this }, setInt2: function(t, e, i) { return this.renderer.setInt2(this.program, t, e, i), this }, setInt3: function(t, e, i, n) { return this.renderer.setInt3(this.program, t, e, i, n), this }, setInt4: function(t, e, i, n, s) { return this.renderer.setInt4(this.program, t, e, i, n, s), this }, setMatrix2: function(t, e, i) { return this.renderer.setMatrix2(this.program, t, e, i), this }, setMatrix3: function(t, e, i) { return this.renderer.setMatrix3(this.program, t, e, i), this }, setMatrix4: function(t, e, i) { return this.renderer.setMatrix4(this.program, t, e, i), this } }); t.exports = s } , function(t, e, i) { var c = {}; t.exports = c; var o = i(240) , r = i(42) , a = i(100) , d = i(62); c.create = function(t) { return r.extend({ id: r.nextId(), type: "composite", parent: null, isModified: !1, bodies: [], constraints: [], composites: [], label: "Composite", plugin: {} }, t) } , c.setModified = function(t, e, i, n) { if (o.trigger(t, "compositeModified", t), t.isModified = e, i && t.parent && c.setModified(t.parent, e, i, n), n) for (var s = 0; s < t.composites.length; s++) { var r = t.composites[s]; c.setModified(r, e, i, n) } } , c.add = function(t, e) { var i = [].concat(e); o.trigger(t, "beforeAdd", { object: e }); for (var n = 0; n < i.length; n++) { var s = i[n]; switch (s.type) { case "body": if (s.parent !== s) { r.warn("Composite.add: skipped adding a compound body part (you must add its parent instead)"); break } c.addBody(t, s); break; case "constraint": c.addConstraint(t, s); break; case "composite": c.addComposite(t, s); break; case "mouseConstraint": c.addConstraint(t, s.constraint) } } return o.trigger(t, "afterAdd", { object: e }), t } , c.remove = function(t, e, i) { var n = [].concat(e); o.trigger(t, "beforeRemove", { object: e }); for (var s = 0; s < n.length; s++) { var r = n[s]; switch (r.type) { case "body": c.removeBody(t, r, i); break; case "constraint": c.removeConstraint(t, r, i); break; case "composite": c.removeComposite(t, r, i); break; case "mouseConstraint": c.removeConstraint(t, r.constraint) } } return o.trigger(t, "afterRemove", { object: e }), t } , c.addComposite = function(t, e) { return t.composites.push(e), e.parent = t, c.setModified(t, !0, !0, !1), t } , c.removeComposite = function(t, e, i) { var n = t.composites.indexOf(e); if (-1 !== n && (c.removeCompositeAt(t, n), c.setModified(t, !0, !0, !1)), i) for (var s = 0; s < t.composites.length; s++) c.removeComposite(t.composites[s], e, !0); return t } , c.removeCompositeAt = function(t, e) { return t.composites.splice(e, 1), c.setModified(t, !0, !0, !1), t } , c.addBody = function(t, e) { return t.bodies.push(e), c.setModified(t, !0, !0, !1), t } , c.removeBody = function(t, e, i) { var n = t.bodies.indexOf(e); if (-1 !== n && (c.removeBodyAt(t, n), c.setModified(t, !0, !0, !1)), i) for (var s = 0; s < t.composites.length; s++) c.removeBody(t.composites[s], e, !0); return t } , c.removeBodyAt = function(t, e) { return t.bodies.splice(e, 1), c.setModified(t, !0, !0, !1), t } , c.addConstraint = function(t, e) { return t.constraints.push(e), c.setModified(t, !0, !0, !1), t } , c.removeConstraint = function(t, e, i) { var n = t.constraints.indexOf(e); if (-1 !== n && c.removeConstraintAt(t, n), i) for (var s = 0; s < t.composites.length; s++) c.removeConstraint(t.composites[s], e, !0); return t } , c.removeConstraintAt = function(t, e) { return t.constraints.splice(e, 1), c.setModified(t, !0, !0, !1), t } , c.clear = function(t, e, i) { if (i) for (var n = 0; n < t.composites.length; n++) c.clear(t.composites[n], e, !0); return e ? t.bodies = t.bodies.filter(function(t) { return t.isStatic }) : t.bodies.length = 0, t.constraints.length = 0, t.composites.length = 0, c.setModified(t, !0, !0, !1), t } , c.allBodies = function(t) { for (var e = [].concat(t.bodies), i = 0; i < t.composites.length; i++) e = e.concat(c.allBodies(t.composites[i])); return e } , c.allConstraints = function(t) { for (var e = [].concat(t.constraints), i = 0; i < t.composites.length; i++) e = e.concat(c.allConstraints(t.composites[i])); return e } , c.allComposites = function(t) { for (var e = [].concat(t.composites), i = 0; i < t.composites.length; i++) e = e.concat(c.allComposites(t.composites[i])); return e } , c.get = function(t, e, i) { var n, s; switch (i) { case "body": n = c.allBodies(t); break; case "constraint": n = c.allConstraints(t); break; case "composite": n = c.allComposites(t).concat(t) } return !n || 0 === (s = n.filter(function(t) { return t.id.toString() === e.toString() })).length ? null : s[0] } , c.move = function(t, e, i) { return c.remove(t, e), c.add(i, e), t } , c.rebase = function(t) { for (var e = c.allBodies(t).concat(c.allConstraints(t)).concat(c.allComposites(t)), i = 0; i < e.length; i++) e[i].id = r.nextId(); return c.setModified(t, !0, !0, !1), t } , c.translate = function(t, e, i) { for (var n = i ? c.allBodies(t) : t.bodies, s = 0; s < n.length; s++) d.translate(n[s], e); return c.setModified(t, !0, !0, !1), t } , c.rotate = function(t, e, i, n) { for (var s = Math.cos(e), r = Math.sin(e), o = n ? c.allBodies(t) : t.bodies, a = 0; a < o.length; a++) { var h = o[a] , l = h.position.x - i.x , u = h.position.y - i.y; d.setPosition(h, { x: i.x + (l * s - u * r), y: i.y + (l * r + u * s) }), d.rotate(h, e) } return c.setModified(t, !0, !0, !1), t } , c.scale = function(t, e, i, n, s) { for (var r = s ? c.allBodies(t) : t.bodies, o = 0; o < r.length; o++) { var a = r[o] , h = a.position.x - n.x , l = a.position.y - n.y; d.setPosition(a, { x: n.x + h * e, y: n.y + l * i }), d.scale(a, e, i) } return c.setModified(t, !0, !0, !1), t } , c.bounds = function(t) { for (var e = c.allBodies(t), i = [], n = 0; n < e.length; n += 1) { var s = e[n]; i.push(s.bounds.min, s.bounds.max) } return a.create(i) } } , function(t, e, i) { var n = i(4); t.exports = function(t, e, i) { return void 0 === i && (i = new n), i.x = t.x + t.radius * Math.cos(e), i.y = t.y + t.radius * Math.sin(e), i } } , function(t, e, i) { var a = i(4); t.exports = function(t, e) { void 0 === e && (e = new a); var i = 2 * Math.PI * Math.random() , n = Math.random() + Math.random() , s = 1 < n ? 2 - n : n , r = s * Math.cos(i) , o = s * Math.sin(i); return e.x = t.x + r * t.radius, e.y = t.y + o * t.radius, e } } , function(t, e, i) { var n = i(19) , s = i(0) , r = i(10) , o = i(111) , a = i(270) , g = i(271) , v = i(6) , h = new s({ Extends: r, initialize: function(t, e, i) { r.call(this), this.manager = t, this.key = e, this.type = "frame", this.frames = this.getFrames(t.textureManager, v(i, "frames", []), v(i, "defaultTextureKey", null)), this.frameRate = v(i, "frameRate", null), this.duration = v(i, "duration", null), null === this.duration && null === this.frameRate ? (this.frameRate = 24, this.duration = this.frameRate / this.frames.length * 1e3) : this.duration && null === this.frameRate ? this.frameRate = this.frames.length / (this.duration / 1e3) : this.duration = this.frames.length / this.frameRate * 1e3, this.msPerFrame = 1e3 / this.frameRate, this.skipMissedFrames = v(i, "skipMissedFrames", !0), this.delay = v(i, "delay", 0), this.repeat = v(i, "repeat", 0), this.repeatDelay = v(i, "repeatDelay", 0), this.yoyo = v(i, "yoyo", !1), this.showOnStart = v(i, "showOnStart", !1), this.hideOnComplete = v(i, "hideOnComplete", !1), this.paused = !1, this.manager.on(o.PAUSE_ALL, this.pause, this), this.manager.on(o.RESUME_ALL, this.resume, this) }, addFrame: function(t) { return this.addFrameAt(this.frames.length, t) }, addFrameAt: function(t, e) { var i, n, s = this.getFrames(this.manager.textureManager, e); return 0 < s.length && (0 === t ? this.frames = s.concat(this.frames) : t === this.frames.length ? this.frames = this.frames.concat(s) : (i = this.frames.slice(0, t), n = this.frames.slice(t), this.frames = i.concat(s, n)), this.updateFrameSequence()), this }, checkFrame: function(t) { return 0 <= t && t < this.frames.length }, completeAnimation: function(t) { this.hideOnComplete && (t.parent.visible = !1), t.stop() }, getFirstTick: function(t, e) { void 0 === e && (e = !0), t.accumulator = 0, t.nextTick = t.msPerFrame + t.currentFrame.duration, e && (t.nextTick += t._delay) }, getFrameAt: function(t) { return this.frames[t] }, getFrames: function(t, i, e) { var n, s, r, o = [], a = 1; if ("string" == typeof i && (s = i, r = t.get(s).getFrameNames(), i = [], r.forEach(function(t, e) { i.push({ key: s, frame: e }) })), !Array.isArray(i) || 0 === i.length) return o; for (p = 0; p < i.length; p++) { var h, l, u, c = i[p], d = v(c, "key", e); d && (h = v(c, "frame", 0), l = t.getFrame(d, h), (u = new g(d,h,a,l)).duration = v(c, "duration", 0), u.isFirst = !n, n && ((n.nextFrame = u).prevFrame = n), o.push(u), n = u, a++) } if (0 < o.length) { u.isLast = !0, u.nextFrame = o[0], o[0].prevFrame = u; for (var f = 1 / (o.length - 1), p = 0; p < o.length; p++) o[p].progress = p * f } return o }, getNextTick: function(t) { t.accumulator -= t.nextTick, t.nextTick = t.msPerFrame + t.currentFrame.duration }, load: function(t, e) { e >= this.frames.length && (e = 0), t.currentAnim !== this && (t.currentAnim = this, t.frameRate = this.frameRate, t.duration = this.duration, t.msPerFrame = this.msPerFrame, t.skipMissedFrames = this.skipMissedFrames, t._delay = this.delay, t._repeat = this.repeat, t._repeatDelay = this.repeatDelay, t._yoyo = this.yoyo); var i = this.frames[e]; 0 !== e || t.forward || (i = this.getLastFrame()), t.updateFrame(i) }, getFrameByProgress: function(t) { return t = n(t, 0, 1), a(t, this.frames, "progress") }, nextFrame: function(t) { var e = t.currentFrame; e.isLast ? t._yoyo ? this.handleYoyoFrame(t, !1) : 0 < t.repeatCounter ? t._reverse && t.forward ? t.forward = !1 : this.repeatAnimation(t) : this.completeAnimation(t) : this.updateAndGetNextTick(t, e.nextFrame) }, handleYoyoFrame: function(t, e) { if (e = e || !1, t._reverse === !e && 0 < t.repeatCounter) return t._repeatDelay && !t.pendingRepeat || (t.forward = e), void this.repeatAnimation(t); var i; t._reverse === e || 0 !== t.repeatCounter ? (i = (t.forward = e) ? t.currentFrame.nextFrame : t.currentFrame.prevFrame, this.updateAndGetNextTick(t, i)) : this.completeAnimation(t) }, getLastFrame: function() { return this.frames[this.frames.length - 1] }, previousFrame: function(t) { var e = t.currentFrame; e.isFirst ? t._yoyo ? this.handleYoyoFrame(t, !0) : 0 < t.repeatCounter ? (t._reverse && !t.forward ? t.currentFrame = this.getLastFrame() : t.forward = !0, this.repeatAnimation(t)) : this.completeAnimation(t) : this.updateAndGetNextTick(t, e.prevFrame) }, updateAndGetNextTick: function(t, e) { t.updateFrame(e), this.getNextTick(t) }, removeFrame: function(t) { var e = this.frames.indexOf(t); return -1 !== e && this.removeFrameAt(e), this }, removeFrameAt: function(t) { return this.frames.splice(t, 1), this.updateFrameSequence(), this }, repeatAnimation: function(t) { if (2 === t._pendingStop) return this.completeAnimation(t); var e, i; 0 < t._repeatDelay && !1 === t.pendingRepeat ? (t.pendingRepeat = !0, t.accumulator -= t.nextTick, t.nextTick += t._repeatDelay) : (t.repeatCounter--, t.updateFrame(t.currentFrame[t.forward ? "nextFrame" : "prevFrame"]), t.isPlaying && (this.getNextTick(t), t.pendingRepeat = !1, e = t.currentFrame, i = t.parent, this.emit(o.ANIMATION_REPEAT, this, e), i.emit(o.SPRITE_ANIMATION_KEY_REPEAT + this.key, this, e, t.repeatCounter, i), i.emit(o.SPRITE_ANIMATION_REPEAT, this, e, t.repeatCounter, i))) }, setFrame: function(t) { t.forward ? this.nextFrame(t) : this.previousFrame(t) }, toJSON: function() { var e = { key: this.key, type: this.type, frames: [], frameRate: this.frameRate, duration: this.duration, skipMissedFrames: this.skipMissedFrames, delay: this.delay, repeat: this.repeat, repeatDelay: this.repeatDelay, yoyo: this.yoyo, showOnStart: this.showOnStart, hideOnComplete: this.hideOnComplete }; return this.frames.forEach(function(t) { e.frames.push(t.toJSON()) }), e }, updateFrameSequence: function() { for (var t, e = this.frames.length, i = 1 / (e - 1), n = 0; n < e; n++) (t = this.frames[n]).index = n + 1, t.isFirst = !1, t.isLast = !1, t.progress = n * i, 0 === n ? (t.isFirst = !0, 1 === e ? (t.isLast = !0, (t.nextFrame = t).prevFrame = t) : (t.isLast = !1, t.prevFrame = this.frames[e - 1], t.nextFrame = this.frames[n + 1])) : n === e - 1 && 1 < e ? (t.isLast = !0, t.prevFrame = this.frames[e - 2], t.nextFrame = this.frames[0]) : 1 < e && (t.prevFrame = this.frames[n - 1], t.nextFrame = this.frames[n + 1]); return this }, pause: function() { return this.paused = !0, this }, resume: function() { return this.paused = !1, this }, destroy: function() { this.removeAllListeners(), this.manager.off(o.PAUSE_ALL, this.pause, this), this.manager.off(o.RESUME_ALL, this.resume, this), this.manager.remove(this.key); for (var t = 0; t < this.frames.length; t++) this.frames[t].destroy(); this.frames = [], this.manager = null } }); t.exports = h } , function(t, e, i) { var s = i(112) , r = i(4); t.exports = function(t, e, i) { if (void 0 === i && (i = new r), e <= 0 || 1 <= e) return i.x = t.x, i.y = t.y, i; var n = s(t) * e; return .5 < e ? (n -= t.width + t.height) <= t.width ? (i.x = t.right - n, i.y = t.bottom) : (i.x = t.x, i.y = t.bottom - (n - t.width)) : n <= t.width ? (i.x = t.x + n, i.y = t.y) : (i.x = t.right, i.y = t.y + (n - t.width)), i } } , function(t, e, i) { var d = i(57) , f = i(4); t.exports = function(t, e, i, n) { void 0 === n && (n = []), !e && 0 < i && (e = d(t) / i); for (var s = t.x1, r = t.y1, o = t.x2, a = t.y2, h = 0; h < e; h++) { var l = h / e , u = s + (o - s) * l , c = r + (a - r) * l; n.push(new f(u,c)) } return n } } , function(t, e, i) { var n = i(4); t.exports = function(t, e) { void 0 === e && (e = new n); var i = Math.random(); return e.x = t.x1 + i * (t.x2 - t.x1), e.y = t.y1 + i * (t.y2 - t.y1), e } } , function(t, e, i) { var n = i(4); t.exports = function(t, e) { return void 0 === e && (e = new n), e.x = t.x + Math.random() * t.width, e.y = t.y + Math.random() * t.height, e } } , function(t, e) { var i = { defaultPipeline: null, pipeline: null, initPipeline: function(t) { void 0 === t && (t = "TextureTintPipeline"); var e = this.scene.sys.game.renderer; return !!(e && e.gl && e.hasPipeline(t)) && (this.defaultPipeline = e.getPipeline(t), this.pipeline = this.defaultPipeline, !0) }, setPipeline: function(t) { var e = this.scene.sys.game.renderer; return e && e.gl && e.hasPipeline(t) && (this.pipeline = e.getPipeline(t)), this }, resetPipeline: function() { return this.pipeline = this.defaultPipeline, null !== this.pipeline }, getPipelineName: function() { return this.pipeline.name } }; t.exports = i } , function(t, e, i) { var s = i(4); t.exports = function(t, e) { void 0 === e && (e = new s); var i = Math.random() * Math.PI * 2 , n = Math.sqrt(Math.random()); return e.x = t.x + n * Math.cos(i) * t.width / 2, e.y = t.y + n * Math.sin(i) * t.height / 2, e } } , function(t, e, i) { var h = i(4); t.exports = function(t, e) { void 0 === e && (e = new h); var i = t.x2 - t.x1 , n = t.y2 - t.y1 , s = t.x3 - t.x1 , r = t.y3 - t.y1 , o = Math.random() , a = Math.random(); return 1 <= o + a && (o = 1 - o, a = 1 - a), e.x = t.x1 + (i * o + s * a), e.y = t.y1 + (n * o + r * a), e } } , function(t, e) { t.exports = function(t, e, i, n, s) { var r = n + Math.atan2(t.y - i, t.x - e); return t.x = e + s * Math.cos(r), t.y = i + s * Math.sin(r), t } } , function(t, e) { t.exports = function(t, e, i) { return (t = Math.max(0, Math.min(1, (t - e) / (i - e)))) * t * t * (t * (6 * t - 15) + 10) } } , function(t, e) { t.exports = function(t, e, i) { return t <= e ? 0 : i <= t ? 1 : (t = (t - e) / (i - e)) * t * (3 - 2 * t) } } , function(t, e, i) { var n = new (i(0))({ initialize: function(t) { if (this.entries = {}, this.size = 0, Array.isArray(t)) for (var e = 0; e < t.length; e++) this.set(t[e][0], t[e][1]) }, set: function(t, e) { return this.has(t) || this.size++, this.entries[t] = e, this }, get: function(t) { if (this.has(t)) return this.entries[t] }, getArray: function() { var t = [] , e = this.entries; for (var i in e) t.push(e[i]); return t }, has: function(t) { return this.entries.hasOwnProperty(t) }, delete: function(t) { return this.has(t) && (delete this.entries[t], this.size--), this }, clear: function() { return Object.keys(this.entries).forEach(function(t) { delete this.entries[t] }, this), this.size = 0, this }, keys: function() { return Object.keys(this.entries) }, values: function() { var t = [] , e = this.entries; for (var i in e) t.push(e[i]); return t }, dump: function() { var t = this.entries; for (var e in console.group("Map"), t) console.log(e, t[e]); console.groupEnd() }, each: function(t) { var e = this.entries; for (var i in e) if (!1 === t(i, e[i])) break; return this }, contains: function(t) { var e = this.entries; for (var i in e) if (e[i] === t) return !0; return !1 }, merge: function(t, e) { void 0 === e && (e = !1); var i = this.entries , n = t.entries; for (var s in n) i.hasOwnProperty(s) && e ? i[s] = n[s] : this.set(s, n[s]); return this } }); t.exports = n } , function(t, e) { t.exports = function(t, e, i, n) { void 0 === e && (e = 0), void 0 === i && (i = " "), void 0 === n && (n = 3); var s; if (e + 1 >= (t = t.toString()).length) switch (n) { case 1: t = new Array(e + 1 - t.length).join(i) + t; break; case 3: var r = Math.ceil((s = e - t.length) / 2); t = new Array(1 + (s - r)).join(i) + t + new Array(r + 1).join(i); break; default: t += new Array(e + 1 - t.length).join(i) } return t } } , function(t, e, i) { var n = i(294) , s = i(297) , r = i(299) , o = i(300); t.exports = function(t) { switch (typeof t) { case "string": return ("rgb" === t.substr(0, 3).toLowerCase() ? o : n)(t); case "number": return s(t); case "object": return r(t) } } } , function(t, e) { t.exports = function(t, e, i) { return t << 16 | e << 8 | i } } , function(t, e, i) { var f = i(165); t.exports = function(t, e, i, n) { void 0 === e && (e = 1), void 0 === i && (i = 1); var s = Math.floor(6 * t) , r = 6 * t - s , o = Math.floor(i * (1 - e) * 255) , a = Math.floor(i * (1 - r * e) * 255) , h = Math.floor(i * (1 - (1 - r) * e) * 255) , l = i = Math.floor(i *= 255) , u = i , c = i , d = s % 6; return 0 == d ? (u = h, c = o) : 1 == d ? (l = a, c = o) : 2 == d ? (l = o, c = h) : 3 == d ? (l = o, u = a) : 4 == d ? (l = h, u = o) : 5 == d && (u = o, c = a), n ? n.setTo ? n.setTo(l, u, c, n.alpha, !1) : (n.r = l, n.g = u, n.b = c, n.color = f(l, u, c), n) : { r: l, g: u, b: c, color: f(l, u, c) } } } , function(t, e) { var i = ""; function n(t) { for (var e = ["i", "webkitI", "msI", "mozI", "oI"], i = 0; i < e.length; i++) { var n = e[i] + "mageSmoothingEnabled"; if (n in t) return n } return null } t.exports = { disable: function(t) { return "" === i && (i = n(t)), i && (t[i] = !1), t }, enable: function(t) { return "" === i && (i = n(t)), i && (t[i] = !0), t }, getPrefix: n, isEnabled: function(t) { return null !== i ? t[i] : null } } } , function(t, e) { t.exports = function(t, e, i) { return t.x = e - t.width / 2, t.y = i - t.height / 2, t } } , function(t, e, i) { var n = i(117) , r = i(118) , o = i(26) , a = { canvas: !1, canvasBitBltShift: null, file: !1, fileSystem: !1, getUserMedia: !0, littleEndian: !1, localStorage: !1, pointerLock: !1, support32bit: !1, vibration: !1, webGL: !1, worker: !1 }; t.exports = function() { a.canvas = !!window.CanvasRenderingContext2D; try { a.localStorage = !!localStorage.getItem } catch (t) { a.localStorage = !1 } a.file = !!(window.File && window.FileReader && window.FileList && window.Blob), a.fileSystem = !!window.requestFileSystem; var t, e, i, s = !1; return a.webGL = function() { if (window.WebGLRenderingContext) try { var t = o.createWebGL(this) , e = t.getContext("webgl") || t.getContext("experimental-webgl") , i = o.create2D(this) , n = i.getContext("2d").createImageData(1, 1); return s = n.data instanceof Uint8ClampedArray, o.remove(t), o.remove(i), !!e } catch (t) { return !1 } return !1 }(), a.worker = !!window.Worker, a.pointerLock = "pointerLockElement"in document || "mozPointerLockElement"in document || "webkitPointerLockElement"in document, navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia || navigator.oGetUserMedia, window.URL = window.URL || window.webkitURL || window.mozURL || window.msURL, a.getUserMedia = a.getUserMedia && !!navigator.getUserMedia && !!window.URL, r.firefox && r.firefoxVersion < 21 && (a.getUserMedia = !1), !n.iOS && (r.ie || r.firefox || r.chrome) && (a.canvasBitBltShift = !0), (r.safari || r.mobileSafari) && (a.canvasBitBltShift = !1), navigator.vibrate = navigator.vibrate || navigator.webkitVibrate || navigator.mozVibrate || navigator.msVibrate, navigator.vibrate && (a.vibration = !0), "undefined" != typeof ArrayBuffer && "undefined" != typeof Uint8Array && "undefined" != typeof Uint32Array && (a.littleEndian = (t = new ArrayBuffer(4), e = new Uint8Array(t), i = new Uint32Array(t), e[0] = 161, e[1] = 178, e[2] = 195, e[3] = 212, 3569595041 === i[0] || 2712847316 !== i[0] && null)), a.support32bit = "undefined" != typeof ArrayBuffer && "undefined" != typeof Uint8ClampedArray && "undefined" != typeof Int32Array && null !== a.littleEndian && s, a }() } , function(t, e, i) { var n = i(13) , s = i(18)(!1, s = { Angle: i(734), Distance: i(743), Easing: i(748), Fuzzy: i(749), Interpolation: i(752), Pow2: i(757), Snap: i(759), RandomDataGenerator: i(761), Average: i(762), Bernstein: i(324), Between: i(172), CatmullRom: i(171), CeilTo: i(763), Clamp: i(19), DegToRad: i(39), Difference: i(764), Factorial: i(325), FloatBetween: i(119), FloorTo: i(765), FromPercent: i(87), GetSpeed: i(766), IsEven: i(767), IsEvenStrict: i(768), Linear: i(116), MaxAdd: i(769), MinSub: i(770), Percent: i(771), RadToDeg: i(173), RandomXY: i(772), RandomXYZ: i(773), RandomXYZW: i(774), Rotate: i(331), RotateAround: i(276), RotateAroundDistance: i(159), RotateTo: i(775), RoundAwayFromZero: i(332), RoundTo: i(776), SinCosTableGenerator: i(777), SmootherStep: i(160), SmoothStep: i(161), ToXY: i(778), TransformXY: i(333), Within: i(779), Wrap: i(58), Vector2: i(3), Vector3: i(174), Vector4: i(334), Matrix3: i(335), Matrix4: i(336), Quaternion: i(337), RotateVec3: i(780) }, n); t.exports = s } , function(t, e) { t.exports = function(t, e, i, n, s) { var r = .5 * (n - e) , o = .5 * (s - i) , a = t * t; return (2 * i - 2 * n + r + o) * (t * a) + (-3 * i + 3 * n - 2 * r - o) * a + r * t + i } } , function(t, e) { t.exports = function(t, e) { return Math.floor(Math.random() * (e - t + 1) + t) } } , function(t, e, i) { var n = i(13); t.exports = function(t) { return t * n.RAD_TO_DEG } } , function(t, e, i) { var n = new (i(0))({ initialize: function(t, e, i) { this.x = 0, this.y = 0, this.z = 0, "object" == typeof t ? (this.x = t.x || 0, this.y = t.y || 0, this.z = t.z || 0) : (this.x = t || 0, this.y = e || 0, this.z = i || 0) }, up: function() { return this.x = 0, this.y = 1, this.z = 0, this }, clone: function() { return new n(this.x,this.y,this.z) }, crossVectors: function(t, e) { var i = t.x , n = t.y , s = t.z , r = e.x , o = e.y , a = e.z; return this.x = n * a - s * o, this.y = s * r - i * a, this.z = i * o - n * r, this }, equals: function(t) { return this.x === t.x && this.y === t.y && this.z === t.z }, copy: function(t) { return this.x = t.x, this.y = t.y, this.z = t.z || 0, this }, set: function(t, e, i) { return "object" == typeof t ? (this.x = t.x || 0, this.y = t.y || 0, this.z = t.z || 0) : (this.x = t || 0, this.y = e || 0, this.z = i || 0), this }, add: function(t) { return this.x += t.x, this.y += t.y, this.z += t.z || 0, this }, subtract: function(t) { return this.x -= t.x, this.y -= t.y, this.z -= t.z || 0, this }, multiply: function(t) { return this.x *= t.x, this.y *= t.y, this.z *= t.z || 1, this }, scale: function(t) { return isFinite(t) ? (this.x *= t, this.y *= t, this.z *= t) : (this.x = 0, this.y = 0, this.z = 0), this }, divide: function(t) { return this.x /= t.x, this.y /= t.y, this.z /= t.z || 1, this }, negate: function() { return this.x = -this.x, this.y = -this.y, this.z = -this.z, this }, distance: function(t) { var e = t.x - this.x , i = t.y - this.y , n = t.z - this.z || 0; return Math.sqrt(e * e + i * i + n * n) }, distanceSq: function(t) { var e = t.x - this.x , i = t.y - this.y , n = t.z - this.z || 0; return e * e + i * i + n * n }, length: function() { var t = this.x , e = this.y , i = this.z; return Math.sqrt(t * t + e * e + i * i) }, lengthSq: function() { var t = this.x , e = this.y , i = this.z; return t * t + e * e + i * i }, normalize: function() { var t = this.x , e = this.y , i = this.z , n = t * t + e * e + i * i; return 0 < n && (n = 1 / Math.sqrt(n), this.x = t * n, this.y = e * n, this.z = i * n), this }, dot: function(t) { return this.x * t.x + this.y * t.y + this.z * t.z }, cross: function(t) { var e = this.x , i = this.y , n = this.z , s = t.x , r = t.y , o = t.z; return this.x = i * o - n * r, this.y = n * s - e * o, this.z = e * r - i * s, this }, lerp: function(t, e) { void 0 === e && (e = 0); var i = this.x , n = this.y , s = this.z; return this.x = i + e * (t.x - i), this.y = n + e * (t.y - n), this.z = s + e * (t.z - s), this }, transformMat3: function(t) { var e = this.x , i = this.y , n = this.z , s = t.val; return this.x = e * s[0] + i * s[3] + n * s[6], this.y = e * s[1] + i * s[4] + n * s[7], this.z = e * s[2] + i * s[5] + n * s[8], this }, transformMat4: function(t) { var e = this.x , i = this.y , n = this.z , s = t.val; return this.x = s[0] * e + s[4] * i + s[8] * n + s[12], this.y = s[1] * e + s[5] * i + s[9] * n + s[13], this.z = s[2] * e + s[6] * i + s[10] * n + s[14], this }, transformCoordinates: function(t) { var e = this.x , i = this.y , n = this.z , s = t.val , r = e * s[0] + i * s[4] + n * s[8] + s[12] , o = e * s[1] + i * s[5] + n * s[9] + s[13] , a = e * s[2] + i * s[6] + n * s[10] + s[14] , h = e * s[3] + i * s[7] + n * s[11] + s[15]; return this.x = r / h, this.y = o / h, this.z = a / h, this }, transformQuat: function(t) { var e = this.x , i = this.y , n = this.z , s = t.x , r = t.y , o = t.z , a = t.w , h = a * e + r * n - o * i , l = a * i + o * e - s * n , u = a * n + s * i - r * e , c = -s * e - r * i - o * n; return this.x = h * a + c * -s + l * -o - u * -r, this.y = l * a + c * -r + u * -s - h * -o, this.z = u * a + c * -o + h * -r - l * -s, this }, project: function(t) { var e = this.x , i = this.y , n = this.z , s = t.val , r = s[0] , o = s[1] , a = s[2] , h = s[3] , l = s[4] , u = s[5] , c = s[6] , d = s[7] , f = s[8] , p = s[9] , g = s[10] , v = s[11] , m = s[12] , y = s[13] , x = s[14] , T = 1 / (e * h + i * d + n * v + s[15]); return this.x = (e * r + i * l + n * f + m) * T, this.y = (e * o + i * u + n * p + y) * T, this.z = (e * a + i * c + n * g + x) * T, this }, unproject: function(t, e) { var i = t.x , n = t.y , s = t.z , r = t.w , o = this.x - i , a = r - this.y - 1 - n , h = this.z; return this.x = 2 * o / s - 1, this.y = 2 * a / r - 1, this.z = 2 * h - 1, this.project(e) }, reset: function() { return this.x = 0, this.y = 0, this.z = 0, this } }); n.ZERO = new n, n.RIGHT = new n(1,0,0), n.LEFT = new n(-1,0,0), n.UP = new n(0,-1,0), n.DOWN = new n(0,1,0), n.FORWARD = new n(0,0,1), n.BACK = new n(0,0,-1), n.ONE = new n(1,1,1), t.exports = n } , function(t, e, i) { t.exports = { Global: ["game", "anims", "cache", "plugins", "registry", "scale", "sound", "textures"], CoreScene: ["EventEmitter", "CameraManager", "GameObjectCreator", "GameObjectFactory", "ScenePlugin", "DisplayList", "UpdateList"], DefaultScene: ["Clock", "DataManagerPlugin", "InputPlugin", "Loader", "TweenManager", "LightsPlugin"] } } , function(t, e, i) { var u = i(11) , c = i(13); t.exports = function(t, e) { if (void 0 === e && (e = new u), 0 === t.length) return e; for (var i, n, s, r = Number.MAX_VALUE, o = Number.MAX_VALUE, a = c.MIN_SAFE_INTEGER, h = c.MIN_SAFE_INTEGER, l = 0; l < t.length; l++) i = t[l], s = Array.isArray(i) ? (n = i[0], i[1]) : (n = i.x, i.y), r = Math.min(r, n), o = Math.min(o, s), a = Math.max(a, n), h = Math.max(h, s); return e.x = r, e.y = o, e.width = a - r, e.height = h - o, e } } , function(t, e, i) { var n = { CENTER: i(359), ORIENTATION: i(360), SCALE_MODE: i(361), ZOOM: i(362) }; t.exports = n } , function(t, e) { t.exports = function(t) { t.parentNode && t.parentNode.removeChild(t) } } , function(t, e) { t.exports = { MOUSE_DOWN: 0, MOUSE_MOVE: 1, MOUSE_UP: 2, TOUCH_START: 3, TOUCH_MOVE: 4, TOUCH_END: 5, POINTER_LOCK_CHANGE: 6, TOUCH_CANCEL: 7, MOUSE_WHEEL: 8 } } , function(t, e, i) { var n = i(0) , s = i(125) , r = i(175) , o = i(22) , a = i(880) , h = i(881) , l = i(1) , u = i(375) , c = new n({ initialize: function(t, e) { this.scene = t, this.game, this.renderer, this.config = e, this.settings = u.create(e), this.canvas, this.context, this.anims, this.cache, this.plugins, this.registry, this.scale, this.sound, this.textures, this.add, this.cameras, this.displayList, this.events, this.make, this.scenePlugin, this.updateList, this.sceneUpdate = l }, init: function(t) { this.settings.status = s.INIT, this.sceneUpdate = l, this.game = t, this.renderer = t.renderer, this.canvas = t.canvas, this.context = t.context; var e = t.plugins; (this.plugins = e).addToScene(this, r.Global, [r.CoreScene, h(this), a(this)]), this.events.emit(o.BOOT, this), this.settings.isBooted = !0 }, install: function(t) { Array.isArray(t) || (t = [t]), this.plugins.installLocal(this, t) }, step: function(t, e) { this.events.emit(o.PRE_UPDATE, t, e), this.events.emit(o.UPDATE, t, e), this.sceneUpdate.call(this.scene, t, e), this.events.emit(o.POST_UPDATE, t, e) }, render: function(t) { var e = this.displayList; e.depthSort(), this.cameras.render(t, e), this.events.emit(o.RENDER, t) }, queueDepthSort: function() { this.displayList.queueDepthSort() }, depthSort: function() { this.displayList.depthSort() }, pause: function(t) { return this.settings.active && (this.settings.status = s.PAUSED, this.settings.active = !1, this.events.emit(o.PAUSE, this, t)), this }, resume: function(t) { return this.settings.active || (this.settings.status = s.RUNNING, this.settings.active = !0, this.events.emit(o.RESUME, this, t)), this }, sleep: function(t) { return this.settings.status = s.SLEEPING, this.settings.active = !1, this.settings.visible = !1, this.events.emit(o.SLEEP, this, t), this }, wake: function(t) { var e = this.settings; return e.status = s.RUNNING, e.active = !0, e.visible = !0, this.events.emit(o.WAKE, this, t), e.isTransition && this.events.emit(o.TRANSITION_WAKE, e.transitionFrom, e.transitionDuration), this }, getData: function() { return this.settings.data }, isSleeping: function() { return this.settings.status === s.SLEEPING }, isActive: function() { return this.settings.status === s.RUNNING }, isPaused: function() { return this.settings.status === s.PAUSED }, isTransitioning: function() { return this.settings.isTransition || null !== this.scenePlugin._target }, isTransitionOut: function() { return null !== this.scenePlugin._target && 0 < this.scenePlugin._duration }, isTransitionIn: function() { return this.settings.isTransition }, isVisible: function() { return this.settings.visible }, setVisible: function(t) { return this.settings.visible = t, this }, setActive: function(t, e) { return t ? this.resume(e) : this.pause(e) }, start: function(t) { t && (this.settings.data = t), this.settings.status = s.START, this.settings.active = !0, this.settings.visible = !0, this.events.emit(o.START, this), this.events.emit(o.READY, this, t) }, shutdown: function(t) { this.events.off(o.TRANSITION_INIT), this.events.off(o.TRANSITION_START), this.events.off(o.TRANSITION_COMPLETE), this.events.off(o.TRANSITION_OUT), this.settings.status = s.SHUTDOWN, this.settings.active = !1, this.settings.visible = !1, this.events.emit(o.SHUTDOWN, this, t) }, destroy: function() { this.settings.status = s.DESTROYED, this.settings.active = !1, this.settings.visible = !1, this.events.emit(o.DESTROY, this), this.events.removeAllListeners(); for (var t = ["scene", "game", "anims", "cache", "plugins", "registry", "sound", "textures", "add", "camera", "displayList", "events", "make", "scenePlugin", "updateList"], e = 0; e < t.length; e++) this[t[e]] = null } }); t.exports = c } , function(t, e) { t.exports = function(t) { return t && t[0].toUpperCase() + t.slice(1) } } , function(t, e, i) { var n = i(0) , a = i(94) , o = i(378) , s = "Texture.frame missing: " , r = new n({ initialize: function(t, e, i, n, s) { Array.isArray(i) || (i = [i]), this.manager = t, this.key = e, this.source = [], this.dataSource = [], this.frames = {}, this.customData = {}, this.firstFrame = "__BASE"; for (var r = this.frameTotal = 0; r < i.length; r++) this.source.push(new o(this,i[r],n,s)) }, add: function(t, e, i, n, s, r) { if (this.has(t)) return null; var o = new a(this,t,e,i,n,s,r); return this.frames[t] = o, "__BASE" === this.firstFrame && (this.firstFrame = t), this.frameTotal++, o }, remove: function(t) { return !!this.has(t) && (this.get(t).destroy(), delete this.frames[t], !0) }, has: function(t) { return this.frames[t] }, get: function(t) { t = t || this.firstFrame; var e = this.frames[t]; return e || (console.warn(s + t), e = this.frames[this.firstFrame]), e }, getTextureSourceIndex: function(t) { for (var e = 0; e < this.source.length; e++) if (this.source[e] === t) return e; return -1 }, getFramesFromTextureSource: function(t, e) { void 0 === e && (e = !1); var i, n = []; for (var s in this.frames) { "__BASE" === s && !e || (i = this.frames[s]).sourceIndex === t && n.push(i) } return n }, getFrameNames: function(t) { void 0 === t && (t = !1); var e, i = Object.keys(this.frames); return t || -1 !== (e = i.indexOf("__BASE")) && i.splice(e, 1), i }, getSourceImage: function(t) { null != t && 1 !== this.frameTotal || (t = "__BASE"); var e = this.frames[t]; return e ? e.source.image : (console.warn(s + t), this.frames.__BASE.source.image) }, getDataSourceImage: function(t) { null != t && 1 !== this.frameTotal || (t = "__BASE"); var e = this.frames[t] , i = e ? e.sourceIndex : (console.warn(s + t), this.frames.__BASE.sourceIndex); return this.dataSource[i].image }, setDataSource: function(t) { Array.isArray(t) || (t = [t]); for (var e = 0; e < t.length; e++) { var i = this.source[e]; this.dataSource.push(new o(this,t[e],i.width,i.height)) } }, setFilter: function(t) { for (var e = 0; e < this.source.length; e++) this.source[e].setFilter(t); for (e = 0; e < this.dataSource.length; e++) this.dataSource[e].setFilter(t) }, destroy: function() { for (var t = 0; t < this.source.length; t++) this.source[t].destroy(); for (t = 0; t < this.dataSource.length; t++) this.dataSource[t].destroy(); for (var e in this.frames) { this.frames[e].destroy() } this.source = [], this.dataSource = [], this.frames = {}, this.manager.removeKey(this.key), this.manager = null } }); t.exports = r } , function(t, e, i) { t.exports = { Matrix: i(916), Add: i(923), AddAt: i(924), BringToTop: i(925), CountAllMatching: i(926), Each: i(927), EachInRange: i(928), FindClosestInSorted: i(270), GetAll: i(382), GetFirst: i(383), GetRandom: i(185), MoveDown: i(929), MoveTo: i(930), MoveUp: i(931), NumberArray: i(932), NumberArrayStep: i(933), QuickSelect: i(391), Range: i(392), Remove: i(123), RemoveAt: i(934), RemoveBetween: i(935), RemoveRandomElement: i(936), Replace: i(937), RotateLeft: i(286), RotateRight: i(287), SafeRange: i(68), SendToBack: i(938), SetAll: i(939), Shuffle: i(114), SpliceOne: i(80), StableSort: i(131), Swap: i(940) } } , function(t, e) { t.exports = function(t) { if (!Array.isArray(t) || t.length < 2 || !Array.isArray(t[0])) return !1; for (var e = t[0].length, i = 1; i < t.length; i++) if (t[i].length !== e) return !1; return !0 } } , function(t, e) { t.exports = function(t, e, i) { void 0 === e && (e = 0), void 0 === i && (i = t.length); var n = e + Math.floor(Math.random() * i); return void 0 === t[n] ? null : t[n] } } , function(t, e, i) { var n = i(0) , s = i(10) , r = i(942) , o = new n({ Extends: s, initialize: function() { s.call(this), this._pending = [], this._active = [], this._destroy = [], this._toProcess = 0 }, add: function(t) { return this._pending.push(t), this._toProcess++, t }, remove: function(t) { return this._destroy.push(t), this._toProcess++, t }, removeAll: function() { for (var t = this._active, e = this._destroy, i = t.length; i--; ) e.push(t[i]), this._toProcess++; return this }, update: function() { if (0 === this._toProcess) return this._active; for (var t, e = this._destroy, i = this._active, n = 0; n < e.length; n++) { t = e[n]; var s = i.indexOf(t); -1 !== s && (i.splice(s, 1), this.emit(r.REMOVE, t)) } for (e.length = 0, e = this._pending, n = 0; n < e.length; n++) t = e[n], this._active.push(t), this.emit(r.ADD, t); return e.length = 0, this._toProcess = 0, this._active }, getActive: function() { return this._active }, length: { get: function() { return this._active.length } }, destroy: function() { this._toProcess = 0, this._pending = [], this._active = [], this._destroy = [] } }); t.exports = o } , function(t, e) { function _(t, e) { return parseInt(t.getAttribute(e), 10) } t.exports = function(t, e, i, n) { void 0 === e && (e = 0), void 0 === i && (i = 0); var s = {} , r = t.getElementsByTagName("info")[0] , o = t.getElementsByTagName("common")[0]; s.font = r.getAttribute("face"), s.size = _(r, "size"), s.lineHeight = _(o, "lineHeight") + i, s.chars = {}; var a, h, l = t.getElementsByTagName("char"), u = void 0 !== n && n.trimmed; u && (a = n.height, h = n.width); for (var c = 0; c < l.length; c++) { var d = l[c] , f = _(d, "id") , p = _(d, "x") , g = _(d, "y") , v = _(d, "width") , m = _(d, "height"); u && (p < h && (h = p), g < a && (a = g)), s.chars[f] = { x: p, y: g, width: v, height: m, centerX: Math.floor(v / 2), centerY: Math.floor(m / 2), xOffset: _(d, "xoffset"), yOffset: _(d, "yoffset"), xAdvance: _(d, "xadvance") + e, data: {}, kerning: {} } } if (u && 0 !== a && 0 !== h) for (var y in s.chars) { var x = s.chars[y]; x.x -= n.x, x.y -= n.y } for (var T = t.getElementsByTagName("kerning"), c = 0; c < T.length; c++) { var w = T[c] , b = _(w, "first") , E = _(w, "second") , S = _(w, "amount"); s.chars[E].kerning[b] = S } return s } } , function(t, e, i) { var n = i(950) , o = i(953) , s = i(0) , r = i(12) , a = i(94) , h = i(14) , l = i(129) , u = new s({ Extends: h, Mixins: [r.Alpha, r.BlendMode, r.Depth, r.Mask, r.Pipeline, r.ScrollFactor, r.Size, r.Texture, r.Transform, r.Visible, n], initialize: function(t, e, i, n, s) { h.call(this, t, "Blitter"), this.setTexture(n, s), this.setPosition(e, i), this.initPipeline(), this.children = new l, this.renderList = [], this.dirty = !1 }, create: function(t, e, i, n, s) { void 0 === n && (n = !0), void 0 === s && (s = this.children.length), void 0 === i ? i = this.frame : i instanceof a || (i = this.texture.get(i)); var r = new o(this,t,e,i,n); return this.children.addAt(r, s, !1), this.dirty = !0, r }, createFromCallback: function(t, e, i, n) { for (var s = this.createMultiple(e, i, n), r = 0; r < s.length; r++) { var o = s[r]; t.call(this, o, r) } return s }, createMultiple: function(i, t, n) { void 0 === t && (t = this.frame.name), void 0 === n && (n = !0), Array.isArray(t) || (t = [t]); var s = [] , r = this; return t.forEach(function(t) { for (var e = 0; e < i; e++) s.push(r.create(0, 0, t, n)) }), s }, childCanRender: function(t) { return t.visible && 0 < t.alpha }, getRenderList: function() { return this.dirty && (this.renderList = this.children.list.filter(this.childCanRender, this), this.dirty = !1), this.renderList }, clear: function() { this.children.removeAll(), this.dirty = !0 }, preDestroy: function() { this.children.destroy(), this.renderList = [] } }); t.exports = u } , function(t, e, i) { var r = i(183) , s = i(52) , n = i(0) , o = i(12) , a = i(90) , h = i(14) , l = i(11) , u = i(954) , c = i(394) , d = i(3) , f = new n({ Extends: h, Mixins: [o.AlphaSingle, o.BlendMode, o.ComputedSize, o.Depth, o.Mask, o.Transform, o.Visible, u], initialize: function(t, e, i, n) { h.call(this, t, "Container"), this.list = [], this.exclusive = !0, this.maxSize = -1, this.position = 0, this.localTransform = new o.TransformMatrix, this.tempTransformMatrix = new o.TransformMatrix, this._displayList = t.sys.displayList, this._sortKey = "", this._sysEvents = t.sys.events, this.scrollFactorX = 1, this.scrollFactorY = 1, this.setPosition(e, i), this.clearAlpha(), this.setBlendMode(s.SKIP_CHECK), n && this.add(n) }, originX: { get: function() { return .5 } }, originY: { get: function() { return .5 } }, displayOriginX: { get: function() { return .5 * this.width } }, displayOriginY: { get: function() { return .5 * this.height } }, setExclusive: function(t) { return void 0 === t && (t = !0), this.exclusive = t, this }, getBounds: function(t) { var e; if (void 0 === t && (t = new l), t.setTo(this.x, this.y, 0, 0), this.parentContainer && (e = this.parentContainer.getBoundsTransformMatrix().transformPoint(this.x, this.y), t.setTo(e.x, e.y, 0, 0)), 0 < this.list.length) { var i = this.list , n = new l , s = !1; t.setEmpty(); for (var r = 0; r < i.length; r++) { var o = i[r]; o.getBounds && (o.getBounds(n), s ? c(n, t, t) : (t.setTo(n.x, n.y, n.width, n.height), s = !0)) } } return t }, addHandler: function(t) { t.once(a.DESTROY, this.remove, this), this.exclusive && (this._displayList.remove(t), t.parentContainer && t.parentContainer.remove(t), t.parentContainer = this) }, removeHandler: function(t) { t.off(a.DESTROY, this.remove), this.exclusive && (t.parentContainer = null) }, pointToContainer: function(t, e) { void 0 === e && (e = new d), this.parentContainer ? this.parentContainer.pointToContainer(t, e) : e = new d(t.x,t.y); var i = this.tempTransformMatrix; return i.applyITRS(this.x, this.y, this.rotation, this.scaleX, this.scaleY), i.invert(), i.transformPoint(t.x, t.y, e), e }, getBoundsTransformMatrix: function() { return this.getWorldTransformMatrix(this.tempTransformMatrix, this.localTransform) }, add: function(t) { return r.Add(this.list, t, this.maxSize, this.addHandler, this), this }, addAt: function(t, e) { return r.AddAt(this.list, t, e, this.maxSize, this.addHandler, this), this }, getAt: function(t) { return this.list[t] }, getIndex: function(t) { return this.list.indexOf(t) }, sort: function(i, t) { return i && (void 0 === t && (t = function(t, e) { return t[i] - e[i] } ), r.StableSort.inplace(this.list, t)), this }, getByName: function(t) { return r.GetFirst(this.list, "name", t) }, getRandom: function(t, e) { return r.GetRandom(this.list, t, e) }, getFirst: function(t, e, i, n) { return r.GetFirst(this.list, t, e, i, n) }, getAll: function(t, e, i, n) { return r.GetAll(this.list, t, e, i, n) }, count: function(t, e, i, n) { return r.CountAllMatching(this.list, t, e, i, n) }, swap: function(t, e) { return r.Swap(this.list, t, e), this }, moveTo: function(t, e) { return r.MoveTo(this.list, t, e), this }, remove: function(t, e) { var i = r.Remove(this.list, t, this.removeHandler, this); if (e && i) { Array.isArray(i) || (i = [i]); for (var n = 0; n < i.length; n++) i[n].destroy() } return this }, removeAt: function(t, e) { var i = r.RemoveAt(this.list, t, this.removeHandler, this); return e && i && i.destroy(), this }, removeBetween: function(t, e, i) { var n = r.RemoveBetween(this.list, t, e, this.removeHandler, this); if (i) for (var s = 0; s < n.length; s++) n[s].destroy(); return this }, removeAll: function(t) { var e = r.RemoveBetween(this.list, 0, this.list.length, this.removeHandler, this); if (t) for (var i = 0; i < e.length; i++) e[i].destroy(); return this }, bringToTop: function(t) { return r.BringToTop(this.list, t), this }, sendToBack: function(t) { return r.SendToBack(this.list, t), this }, moveUp: function(t) { return r.MoveUp(this.list, t), this }, moveDown: function(t) { return r.MoveDown(this.list, t), this }, reverse: function() { return this.list.reverse(), this }, shuffle: function() { return r.Shuffle(this.list), this }, replace: function(t, e, i) { return r.Replace(this.list, t, e) && (this.addHandler(e), this.removeHandler(t), i && t.destroy()), this }, exists: function(t) { return -1 < this.list.indexOf(t) }, setAll: function(t, e, i, n) { return r.SetAll(this.list, t, e, i, n), this }, each: function(t, e) { for (var i = [null], n = this.list.slice(), s = n.length, r = 2; r < arguments.length; r++) i.push(arguments[r]); for (r = 0; r < s; r++) i[0] = n[r], t.apply(e, i); return this }, iterate: function(t, e) { for (var i = [null], n = 2; n < arguments.length; n++) i.push(arguments[n]); for (n = 0; n < this.list.length; n++) i[0] = this.list[n], t.apply(e, i); return this }, setScrollFactor: function(t, e, i) { return void 0 === e && (e = t), void 0 === i && (i = !1), this.scrollFactorX = t, this.scrollFactorY = e, i && (r.SetAll(this.list, "scrollFactorX", t), r.SetAll(this.list, "scrollFactorY", e)), this }, length: { get: function() { return this.list.length } }, first: { get: function() { return (this.position = 0) < this.list.length ? this.list[0] : null } }, last: { get: function() { return 0 < this.list.length ? (this.position = this.list.length - 1, this.list[this.position]) : null } }, next: { get: function() { return this.position < this.list.length ? (this.position++, this.list[this.position]) : null } }, previous: { get: function() { return 0 < this.position ? (this.position--, this.list[this.position]) : null } }, preDestroy: function() { this.removeAll(!!this.exclusive), this.localTransform.destroy(), this.tempTransformMatrix.destroy(), this.list = [], this._displayList = null } }); t.exports = f } , function(t, e, i) { var a = i(132) , n = i(0) , s = i(959) , r = new n({ Extends: a, Mixins: [s], initialize: function(t, e, i, n, s, r, o) { a.call(this, t, e, i, n, s, r, o), this.type = "DynamicBitmapText", this.scrollX = 0, this.scrollY = 0, this.cropWidth = 0, this.cropHeight = 0, this.displayCallback, this.callbackData = { parent: this, color: 0, tint: { topLeft: 0, topRight: 0, bottomLeft: 0, bottomRight: 0 }, index: 0, charCode: 0, x: 0, y: 0, scale: 0, rotation: 0, data: 0 } }, setSize: function(t, e) { return this.cropWidth = t, this.cropHeight = e, this }, setDisplayCallback: function(t) { return this.displayCallback = t, this }, setScrollX: function(t) { return this.scrollX = t, this }, setScrollY: function(t) { return this.scrollY = t, this } }); t.exports = r } , function(t, e, i) { var n = i(91) , s = i(0) , a = i(192) , r = i(269) , o = i(272) , h = i(273) , l = i(277) , u = i(156) , c = i(282) , d = i(283) , f = i(280) , p = i(29) , g = i(95) , v = i(14) , m = i(2) , y = i(6) , x = i(13) , T = i(965) , w = new s({ Extends: v, Mixins: [r, o, h, l, u, c, d, f, T], initialize: function(t, e) { var i = y(e, "x", 0) , n = y(e, "y", 0); v.call(this, t, "Graphics"), this.setPosition(i, n), this.initPipeline(), this.displayOriginX = 0, this.displayOriginY = 0, this.commandBuffer = [], this.defaultFillColor = -1, this.defaultFillAlpha = 1, this.defaultStrokeWidth = 1, this.defaultStrokeColor = -1, this.defaultStrokeAlpha = 1, this._lineWidth = 1, this._tempMatrix1 = new p, this._tempMatrix2 = new p, this._tempMatrix3 = new p, this.setDefaultStyles(e) }, setDefaultStyles: function(t) { return y(t, "lineStyle", null) && (this.defaultStrokeWidth = y(t, "lineStyle.width", 1), this.defaultStrokeColor = y(t, "lineStyle.color", 16777215), this.defaultStrokeAlpha = y(t, "lineStyle.alpha", 1), this.lineStyle(this.defaultStrokeWidth, this.defaultStrokeColor, this.defaultStrokeAlpha)), y(t, "fillStyle", null) && (this.defaultFillColor = y(t, "fillStyle.color", 16777215), this.defaultFillAlpha = y(t, "fillStyle.alpha", 1), this.fillStyle(this.defaultFillColor, this.defaultFillAlpha)), this }, lineStyle: function(t, e, i) { return void 0 === i && (i = 1), this.commandBuffer.push(a.LINE_STYLE, t, e, i), this._lineWidth = t, this }, fillStyle: function(t, e) { return void 0 === e && (e = 1), this.commandBuffer.push(a.FILL_STYLE, t, e), this }, fillGradientStyle: function(t, e, i, n, s) { return void 0 === s && (s = 1), this.commandBuffer.push(a.GRADIENT_FILL_STYLE, s, t, e, i, n), this }, lineGradientStyle: function(t, e, i, n, s, r) { return void 0 === r && (r = 1), this.commandBuffer.push(a.GRADIENT_LINE_STYLE, t, r, e, i, n, s), this }, setTexture: function(t, e, i) { var n; return void 0 === i && (i = 0), void 0 === t ? this.commandBuffer.push(a.CLEAR_TEXTURE) : (n = this.scene.sys.textures.getFrame(t, e)) && (2 === i && (i = 3), this.commandBuffer.push(a.SET_TEXTURE, n, i)), this }, beginPath: function() { return this.commandBuffer.push(a.BEGIN_PATH), this }, closePath: function() { return this.commandBuffer.push(a.CLOSE_PATH), this }, fillPath: function() { return this.commandBuffer.push(a.FILL_PATH), this }, fill: function() { return this.commandBuffer.push(a.FILL_PATH), this }, strokePath: function() { return this.commandBuffer.push(a.STROKE_PATH), this }, stroke: function() { return this.commandBuffer.push(a.STROKE_PATH), this }, fillCircleShape: function(t) { return this.fillCircle(t.x, t.y, t.radius) }, strokeCircleShape: function(t) { return this.strokeCircle(t.x, t.y, t.radius) }, fillCircle: function(t, e, i) { return this.beginPath(), this.arc(t, e, i, 0, x.PI2), this.fillPath(), this }, strokeCircle: function(t, e, i) { return this.beginPath(), this.arc(t, e, i, 0, x.PI2), this.strokePath(), this }, fillRectShape: function(t) { return this.fillRect(t.x, t.y, t.width, t.height) }, strokeRectShape: function(t) { return this.strokeRect(t.x, t.y, t.width, t.height) }, fillRect: function(t, e, i, n) { return this.commandBuffer.push(a.FILL_RECT, t, e, i, n), this }, strokeRect: function(t, e, i, n) { var s = this._lineWidth / 2 , r = t - s , o = t + s; return this.beginPath(), this.moveTo(t, e), this.lineTo(t, e + n), this.strokePath(), this.beginPath(), this.moveTo(t + i, e), this.lineTo(t + i, e + n), this.strokePath(), this.beginPath(), this.moveTo(r, e), this.lineTo(o + i, e), this.strokePath(), this.beginPath(), this.moveTo(r, e + n), this.lineTo(o + i, e + n), this.strokePath(), this }, fillRoundedRect: function(t, e, i, n, s) { void 0 === s && (s = 20); var r = s , o = s , a = s , h = s; return "number" != typeof s && (r = m(s, "tl", 20), o = m(s, "tr", 20), a = m(s, "bl", 20), h = m(s, "br", 20)), this.beginPath(), this.moveTo(t + r, e), this.lineTo(t + i - o, e), this.arc(t + i - o, e + o, o, -x.TAU, 0), this.lineTo(t + i, e + n - h), this.arc(t + i - h, e + n - h, h, 0, x.TAU), this.lineTo(t + a, e + n), this.arc(t + a, e + n - a, a, x.TAU, Math.PI), this.lineTo(t, e + r), this.arc(t + r, e + r, r, -Math.PI, -x.TAU), this.fillPath(), this }, strokeRoundedRect: function(t, e, i, n, s) { void 0 === s && (s = 20); var r = s , o = s , a = s , h = s; return "number" != typeof s && (r = m(s, "tl", 20), o = m(s, "tr", 20), a = m(s, "bl", 20), h = m(s, "br", 20)), this.beginPath(), this.moveTo(t + r, e), this.lineTo(t + i - o, e), this.arc(t + i - o, e + o, o, -x.TAU, 0), this.lineTo(t + i, e + n - h), this.arc(t + i - h, e + n - h, h, 0, x.TAU), this.lineTo(t + a, e + n), this.arc(t + a, e + n - a, a, x.TAU, Math.PI), this.lineTo(t, e + r), this.arc(t + r, e + r, r, -Math.PI, -x.TAU), this.strokePath(), this }, fillPointShape: function(t, e) { return this.fillPoint(t.x, t.y, e) }, fillPoint: function(t, e, i) { return !i || i < 1 ? i = 1 : (t -= i / 2, e -= i / 2), this.commandBuffer.push(a.FILL_RECT, t, e, i, i), this }, fillTriangleShape: function(t) { return this.fillTriangle(t.x1, t.y1, t.x2, t.y2, t.x3, t.y3) }, strokeTriangleShape: function(t) { return this.strokeTriangle(t.x1, t.y1, t.x2, t.y2, t.x3, t.y3) }, fillTriangle: function(t, e, i, n, s, r) { return this.commandBuffer.push(a.FILL_TRIANGLE, t, e, i, n, s, r), this }, strokeTriangle: function(t, e, i, n, s, r) { return this.commandBuffer.push(a.STROKE_TRIANGLE, t, e, i, n, s, r), this }, strokeLineShape: function(t) { return this.lineBetween(t.x1, t.y1, t.x2, t.y2) }, lineBetween: function(t, e, i, n) { return this.beginPath(), this.moveTo(t, e), this.lineTo(i, n), this.strokePath(), this }, lineTo: function(t, e) { return this.commandBuffer.push(a.LINE_TO, t, e), this }, moveTo: function(t, e) { return this.commandBuffer.push(a.MOVE_TO, t, e), this }, strokePoints: function(t, e, i, n) { void 0 === e && (e = !1), void 0 === i && (i = !1), void 0 === n && (n = t.length), this.beginPath(), this.moveTo(t[0].x, t[0].y); for (var s = 1; s < n; s++) this.lineTo(t[s].x, t[s].y); return e && this.lineTo(t[0].x, t[0].y), i && this.closePath(), this.strokePath(), this }, fillPoints: function(t, e, i, n) { void 0 === e && (e = !1), void 0 === i && (i = !1), void 0 === n && (n = t.length), this.beginPath(), this.moveTo(t[0].x, t[0].y); for (var s = 1; s < n; s++) this.lineTo(t[s].x, t[s].y); return e && this.lineTo(t[0].x, t[0].y), i && this.closePath(), this.fillPath(), this }, strokeEllipseShape: function(t, e) { void 0 === e && (e = 32); var i = t.getPoints(e); return this.strokePoints(i, !0) }, strokeEllipse: function(t, e, i, n, s) { void 0 === s && (s = 32); var r = new g(t,e,i,n).getPoints(s); return this.strokePoints(r, !0) }, fillEllipseShape: function(t, e) { void 0 === e && (e = 32); var i = t.getPoints(e); return this.fillPoints(i, !0) }, fillEllipse: function(t, e, i, n, s) { void 0 === s && (s = 32); var r = new g(t,e,i,n).getPoints(s); return this.fillPoints(r, !0) }, arc: function(t, e, i, n, s, r, o) { return void 0 === r && (r = !1), void 0 === o && (o = 0), this.commandBuffer.push(a.ARC, t, e, i, n, s, r, o), this }, slice: function(t, e, i, n, s, r, o) { return void 0 === r && (r = !1), void 0 === o && (o = 0), this.commandBuffer.push(a.BEGIN_PATH), this.commandBuffer.push(a.MOVE_TO, t, e), this.commandBuffer.push(a.ARC, t, e, i, n, s, r, o), this.commandBuffer.push(a.CLOSE_PATH), this }, save: function() { return this.commandBuffer.push(a.SAVE), this }, restore: function() { return this.commandBuffer.push(a.RESTORE), this }, translateCanvas: function(t, e) { return this.commandBuffer.push(a.TRANSLATE, t, e), this }, scaleCanvas: function(t, e) { return this.commandBuffer.push(a.SCALE, t, e), this }, rotateCanvas: function(t) { return this.commandBuffer.push(a.ROTATE, t), this }, clear: function() { return this.commandBuffer.length = 0, -1 < this.defaultFillColor && this.fillStyle(this.defaultFillColor, this.defaultFillAlpha), -1 < this.defaultStrokeColor && this.lineStyle(this.defaultStrokeWidth, this.defaultStrokeColor, this.defaultStrokeAlpha), this }, generateTexture: function(t, e, i) { var n, s, r, o = this.scene.sys, a = o.game.renderer; return void 0 === e && (e = o.scale.width), void 0 === i && (i = o.scale.height), w.TargetCamera.setScene(this.scene), w.TargetCamera.setViewport(0, 0, e, i), w.TargetCamera.scrollX = this.x, w.TargetCamera.scrollY = this.y, "string" == typeof t ? o.textures.exists(t) ? (r = (n = o.textures.get(t)).getSourceImage())instanceof HTMLCanvasElement && (s = r.getContext("2d")) : s = (n = o.textures.createCanvas(t, e, i)).getSourceImage().getContext("2d") : t instanceof HTMLCanvasElement && (s = t.getContext("2d")), s && (this.renderCanvas(a, this, 0, w.TargetCamera, null, s, !1), n && n.refresh()), this }, preDestroy: function() { this.commandBuffer = [] } }); w.TargetCamera = new n, t.exports = w } , function(t, e) { t.exports = { ARC: 0, BEGIN_PATH: 1, CLOSE_PATH: 2, FILL_RECT: 3, LINE_TO: 4, MOVE_TO: 5, LINE_STYLE: 6, FILL_STYLE: 7, FILL_PATH: 8, STROKE_PATH: 9, FILL_TRIANGLE: 10, STROKE_TRIANGLE: 11, SAVE: 14, RESTORE: 15, TRANSLATE: 16, SCALE: 17, ROTATE: 18, SET_TEXTURE: 19, CLEAR_TEXTURE: 20, GRADIENT_FILL_STYLE: 21, GRADIENT_LINE_STYLE: 22 } } , function(t, e, i) { var r = i(4); t.exports = function(t, e, i) { void 0 === i && (i = new r); var n = t.width / 2 , s = t.height / 2; return i.x = t.x + n * Math.cos(e), i.y = t.y + s * Math.sin(e), i } } , function(t, e, i) { var n = i(0) , s = i(12) , r = i(14) , o = i(402) , a = i(129) , h = i(404) , l = i(975) , u = new n({ Extends: r, Mixins: [s.Depth, s.Mask, s.Pipeline, s.Transform, s.Visible, l], initialize: function(t, e, i, n) { if (r.call(this, t, "ParticleEmitterManager"), this.blendMode = -1, this.timeScale = 1, this.texture = null, this.frame = null, this.frameNames = [], null === i || "object" != typeof i && !Array.isArray(i) || (n = i, i = null), this.setTexture(e, i), this.initPipeline(), this.emitters = new a(this), this.wells = new a(this), n) { Array.isArray(n) || (n = [n]); for (var s = 0; s < n.length; s++) this.createEmitter(n[s]) } }, setTexture: function(t, e) { return this.texture = this.scene.sys.textures.get(t), this.setFrame(e) }, setFrame: function(t) { this.frame = this.texture.get(t); var e = this.texture.getFramesFromTextureSource(this.frame.sourceIndex) , i = []; return e.forEach(function(t) { i.push(t.name) }), this.frameNames = i, this.defaultFrame = this.frame, this }, setEmitterFrames: function(t, e) { Array.isArray(t) || (t = [t]); for (var i = e.frames, n = i.length = 0; n < t.length; n++) { var s = t[n]; -1 !== this.frameNames.indexOf(s) && i.push(this.texture.get(s)) } return 0 < i.length ? e.defaultFrame = i[0] : e.defaultFrame = this.defaultFrame, this }, addEmitter: function(t) { return this.emitters.add(t) }, createEmitter: function(t) { return this.addEmitter(new h(this,t)) }, removeEmitter: function(t) { return this.emitters.remove(t, !0) }, addGravityWell: function(t) { return this.wells.add(t) }, createGravityWell: function(t) { return this.addGravityWell(new o(t)) }, emitParticle: function(t, e, i) { for (var n = this.emitters.list, s = 0; s < n.length; s++) { var r = n[s]; r.active && r.emitParticle(t, e, i) } return this }, emitParticleAt: function(t, e, i) { return this.emitParticle(i, t, e) }, pause: function() { return this.active = !1, this }, resume: function() { return this.active = !0, this }, getProcessors: function() { return this.wells.getAll("active", !0) }, preUpdate: function(t, e) { e *= this.timeScale; for (var i = this.emitters.list, n = 0; n < i.length; n++) { var s = i[n]; s.active && s.preUpdate(t, e) } }, setAlpha: function() {}, setScrollFactor: function() {}, setBlendMode: function() {} }); t.exports = u } , function(t, e, i) { var o = i(52) , l = i(91) , u = i(26) , n = i(0) , s = i(12) , c = i(33) , a = i(94) , d = i(14) , f = i(1) , r = i(979) , v = i(9) , p = i(196) , h = new n({ Extends: d, Mixins: [s.Alpha, s.BlendMode, s.ComputedSize, s.Crop, s.Depth, s.Flip, s.GetBounds, s.Mask, s.Origin, s.Pipeline, s.ScrollFactor, s.Tint, s.Transform, s.Visible, r], initialize: function(t, e, i, n, s, r, o) { void 0 === e && (e = 0), void 0 === i && (i = 0), void 0 === n && (n = 32), void 0 === s && (s = 32), d.call(this, t, "RenderTexture"), this.renderer = t.sys.game.renderer, this.textureManager = t.sys.textures, this.globalTint = 16777215, this.globalAlpha = 1, this.canvas = null, this.framebuffer = null, this.dirty = !1, this._crop = this.resetCropObject(), this.texture = null, this.frame = null, this._saved = !1, void 0 === r ? (this.canvas = u.create2D(this, n, s), this.texture = t.sys.textures.addCanvas(p(), this.canvas), this.frame = this.texture.get()) : (this.texture = t.sys.textures.get(r), this.frame = this.texture.get(o), this.canvas = this.frame.source.image, this._saved = !0, this.dirty = !0, this.width = this.frame.cutWidth, this.height = this.frame.cutHeight), this.context = this.canvas.getContext("2d"), this._eraseMode = !1, this.camera = new l(0,0,n,s), this.gl = null, this.glTexture = null; var a, h = this.renderer; h ? h.type === c.WEBGL ? (a = h.gl, this.gl = a, this.glTexture = this.frame.source.glTexture, this.drawGameObject = this.batchGameObjectWebGL, this.framebuffer = h.createFramebuffer(n, s, this.glTexture, !1)) : h.type === c.CANVAS && (this.drawGameObject = this.batchGameObjectCanvas) : this.drawGameObject = f, this.camera.setScene(t), this.setPosition(e, i), void 0 === r && this.setSize(n, s), this.setOrigin(0, 0), this.initPipeline() }, setSize: function(t, e) { return this.resize(t, e) }, resize: function(t, e) { var i, n, s; void 0 === e && (e = t), t !== this.width || e !== this.height ? "__BASE" === this.frame.name && (this.canvas.width = t, this.canvas.height = e, this.texture.width = t, this.texture.height = e, this.gl && (i = this.gl, this.renderer.deleteTexture(this.frame.source.glTexture), this.renderer.deleteFramebuffer(this.framebuffer), n = this.renderer.createTexture2D(0, i.NEAREST, i.NEAREST, i.CLAMP_TO_EDGE, i.CLAMP_TO_EDGE, i.RGBA, null, t, e, !1), this.framebuffer = this.renderer.createFramebuffer(t, e, n, !1), this.frame.source.isRenderTexture = !0, this.frame.glTexture = n, this.glTexture = n), this.frame.source.width = t, this.frame.source.height = e, this.camera.setSize(t, e), this.frame.setSize(t, e), this.width = t, this.height = e) : (s = this.texture.getSourceImage(), this.frame.cutX + t > s.width && (t = s.width - this.frame.cutX), this.frame.cutY + e > s.height && (e = s.height - this.frame.cutY), this.frame.setSize(t, e, this.frame.cutX, this.frame.cutY)), this.updateDisplayOrigin(); var r = this.input; return r && !r.customHitArea && (r.hitArea.width = t, r.hitArea.height = e), this }, setGlobalTint: function(t) { return this.globalTint = t, this }, setGlobalAlpha: function(t) { return this.globalAlpha = t, this }, saveTexture: function(t) { return this.textureManager.renameTexture(this.texture.key, t), this._saved = !0, this.texture }, fill: function(t, e, i, n, s, r) { void 0 === e && (e = 1), void 0 === i && (i = 0), void 0 === n && (n = 0), void 0 === s && (s = this.frame.cutWidth), void 0 === r && (r = this.frame.cutHeight); var o, a, h, l, u, c = 255 & (t >> 16 | 0), d = 255 & (t >> 8 | 0), f = 255 & (0 | t), p = this.gl, g = this.frame; return this.camera.preRender(1, 1), p ? (o = this.camera._cx, a = this.camera._cy, h = this.camera._cw, l = this.camera._ch, this.renderer.setFramebuffer(this.framebuffer, !1), this.renderer.pushScissor(o, a, h, l, l), (u = this.pipeline).projOrtho(0, this.texture.width, 0, this.texture.height, -1e3, 1e3), u.drawFillRect(i, n, s, r, v.getTintFromFloats(c / 255, d / 255, f / 255, 1), e), this.renderer.setFramebuffer(null, !1), this.renderer.popScissor(), u.projOrtho(0, u.width, u.height, 0, -1e3, 1e3)) : (this.renderer.setContext(this.context), this.context.fillStyle = "rgba(" + c + "," + d + "," + f + "," + e + ")", this.context.fillRect(i + g.cutX, n + g.cutY, s, r), this.renderer.setContext()), this.dirty = !0, this }, clear: function() { var t, e, i; return this.dirty && ((t = this.gl) ? ((e = this.renderer).setFramebuffer(this.framebuffer, !0), this.frame.cutWidth === this.canvas.width && this.frame.cutHeight === this.canvas.height || t.scissor(this.frame.cutX, this.frame.cutY, this.frame.cutWidth, this.frame.cutHeight), t.clearColor(0, 0, 0, 0), t.clear(t.COLOR_BUFFER_BIT), e.setFramebuffer(null, !0)) : ((i = this.context).save(), i.setTransform(1, 0, 0, 1, 0, 0), i.clearRect(this.frame.cutX, this.frame.cutY, this.frame.cutWidth, this.frame.cutHeight), i.restore()), this.dirty = !1), this }, erase: function(t, e, i) { this._eraseMode = !0; var n = this.renderer.currentBlendMode; return this.renderer.setBlendMode(o.ERASE), this.draw(t, e, i, 1, 16777215), this.renderer.setBlendMode(n), this._eraseMode = !1, this }, draw: function(t, e, i, n, s) { void 0 === n && (n = this.globalAlpha), s = void 0 === s ? (this.globalTint >> 16) + (65280 & this.globalTint) + ((255 & this.globalTint) << 16) : (s >> 16) + (65280 & s) + ((255 & s) << 16), Array.isArray(t) || (t = [t]); var r, o, a, h, l, u = this.gl; return this.camera.preRender(1, 1), u ? (r = this.camera._cx, o = this.camera._cy, a = this.camera._cw, h = this.camera._ch, this.renderer.setFramebuffer(this.framebuffer, !1), this.renderer.pushScissor(r, o, a, h, h), (l = this.pipeline).projOrtho(0, this.texture.width, 0, this.texture.height, -1e3, 1e3), this.batchList(t, e, i, n, s), l.flush(), this.renderer.setFramebuffer(null, !1), this.renderer.popScissor(), l.projOrtho(0, l.width, l.height, 0, -1e3, 1e3)) : (this.renderer.setContext(this.context), this.batchList(t, e, i, n, s), this.renderer.setContext()), this.dirty = !0, this }, drawFrame: function(t, e, i, n, s, r) { void 0 === i && (i = 0), void 0 === n && (n = 0), void 0 === s && (s = this.globalAlpha), r = void 0 === r ? (this.globalTint >> 16) + (65280 & this.globalTint) + ((255 & this.globalTint) << 16) : (r >> 16) + (65280 & r) + ((255 & r) << 16); var o, a, h, l, u, c = this.gl, d = this.textureManager.getFrame(t, e); return d && (this.camera.preRender(1, 1), c ? (o = this.camera._cx, a = this.camera._cy, h = this.camera._cw, l = this.camera._ch, this.renderer.setFramebuffer(this.framebuffer, !1), this.renderer.pushScissor(o, a, h, l, l), (u = this.pipeline).projOrtho(0, this.texture.width, 0, this.texture.height, -1e3, 1e3), u.batchTextureFrame(d, i + this.frame.cutX, n + this.frame.cutY, r, s, this.camera.matrix, null), u.flush(), this.renderer.setFramebuffer(null, !1), this.renderer.popScissor(), u.projOrtho(0, u.width, u.height, 0, -1e3, 1e3)) : this.batchTextureFrame(d, i + this.frame.cutX, n + this.frame.cutY, s, r), this.dirty = !0), this }, batchList: function(t, e, i, n, s) { for (var r = 0; r < t.length; r++) { var o = t[r]; o && o !== this && (o.renderWebGL || o.renderCanvas ? this.drawGameObject(o, e, i) : o.isParent || o.list ? this.batchGroup(o.getChildren(), e, i) : "string" == typeof o ? this.batchTextureFrameKey(o, null, e, i, n, s) : o instanceof a ? this.batchTextureFrame(o, e, i, n, s) : Array.isArray(o) && this.batchList(o, e, i, n, s)) } }, batchGroup: function(t, e, i) { void 0 === e && (e = 0), void 0 === i && (i = 0), e += this.frame.cutX, i += this.frame.cutY; for (var n = 0; n < t.length; n++) { var s, r, o = t[n]; o.willRender() && (s = o.x + e, r = o.y + i, this.drawGameObject(o, s, r)) } }, batchGameObjectWebGL: function(t, e, i) { void 0 === e && (e = t.x), void 0 === i && (i = t.y); var n = t.x , s = t.y; this._eraseMode || this.renderer.setBlendMode(t.blendMode), t.setPosition(e + this.frame.cutX, i + this.frame.cutY), t.renderWebGL(this.renderer, t, 0, this.camera, null), t.setPosition(n, s) }, batchGameObjectCanvas: function(t, e, i) { void 0 === e && (e = t.x), void 0 === i && (i = t.y); var n, s = t.x, r = t.y; this._eraseMode && (n = t.blendMode, t.blendMode = o.ERASE), t.setPosition(e + this.frame.cutX, i + this.frame.cutY), t.renderCanvas(this.renderer, t, 0, this.camera, null), t.setPosition(s, r), this._eraseMode && (t.blendMode = n) }, batchTextureFrameKey: function(t, e, i, n, s, r) { var o = this.textureManager.getFrame(t, e); o && this.batchTextureFrame(o, i, n, s, r) }, batchTextureFrame: function(t, e, i, n, s) { var r, o, a, h; void 0 === e && (e = 0), void 0 === i && (i = 0), e += this.frame.cutX, i += this.frame.cutY, this.gl ? this.pipeline.batchTextureFrame(t, e, i, s, n, this.camera.matrix, null) : (r = this.context, o = t.canvasData, a = t.source.image, h = this.camera.matrix, r.globalAlpha = this.globalAlpha, r.setTransform(h[0], h[1], h[2], h[3], h[4], h[5]), r.drawImage(a, o.x, o.y, o.width, o.height, e, i, o.width, o.height)) }, snapshotArea: function(t, e, i, n, s, r, o) { return this.gl ? this.renderer.snapshotFramebuffer(this.framebuffer, this.width, this.height, s, !1, t, e, i, n, r, o) : this.renderer.snapshotCanvas(this.canvas, s, !1, t, e, i, n, r, o), this }, snapshot: function(t, e, i) { return this.gl ? this.renderer.snapshotFramebuffer(this.framebuffer, this.width, this.height, t, !1, 0, 0, this.width, this.height, e, i) : this.renderer.snapshotCanvas(this.canvas, t, !1, 0, 0, this.width, this.height, e, i), this }, snapshotPixel: function(t, e, i) { return this.gl ? this.renderer.snapshotFramebuffer(this.framebuffer, this.width, this.height, i, !0, t, e) : this.renderer.snapshotCanvas(this.canvas, i, !0, t, e), this }, preDestroy: function() { this._saved || (u.remove(this.canvas), this.gl && this.renderer.deleteFramebuffer(this.framebuffer), this.texture.destroy(), this.camera.destroy(), this.canvas = null, this.context = null, this.framebuffer = null, this.texture = null, this.glTexture = null) } }); t.exports = h } , function(t, e) { t.exports = function() { return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(t) { var e = 16 * Math.random() | 0; return ("x" === t ? e : 3 & e | 8).toString(16) }) } } , function(t, e, i) { var n = i(0) , l = i(12) , u = i(14) , s = i(985) , c = i(3) , r = new n({ Extends: u, Mixins: [l.AlphaSingle, l.BlendMode, l.Depth, l.Flip, l.Mask, l.Pipeline, l.Size, l.Texture, l.Transform, l.Visible, l.ScrollFactor, s], initialize: function(t, e, i, n, s, r, o, a, h) { void 0 === n && (n = "__DEFAULT"), void 0 === r && (r = 2), void 0 === o && (o = !0), u.call(this, t, "Rope"), this.anims = new l.Animation(this), this.points = r, this.vertices, this.uv, this.colors, this.alphas, this.tintFill = "__DEFAULT" === n ? 2 : 0, this.dirty = !1, this.horizontal = o, this._flipX = !1, this._flipY = !1, this._perp = new c, this.debugCallback = null, this.debugGraphic = null, this.setTexture(n, s), this.setPosition(e, i), this.setSizeToFrame(), this.initPipeline("TextureTintStripPipeline"), Array.isArray(r) && this.resizeArrays(r.length), this.setPoints(r, a, h), this.updateVertices() }, preUpdate: function(t, e) { var i = this.anims.currentFrame; this.anims.update(t, e), this.anims.currentFrame !== i && (this.updateUVs(), this.updateVertices()) }, play: function(t, e, i) { return this.anims.play(t, e, i), this }, setDirty: function() { return this.dirty = !0, this }, setHorizontal: function(t, e, i) { return void 0 === t && (t = this.points.length), this.horizontal ? this : (this.horizontal = !0, this.setPoints(t, e, i)) }, setVertical: function(t, e, i) { return void 0 === t && (t = this.points.length), this.horizontal ? (this.horizontal = !1, this.setPoints(t, e, i)) : this }, setTintFill: function(t) { return void 0 === t && (t = 0), this.tintFill = t, this }, setAlphas: function(t, e) { var i = this.points.length; if (i < 1) return this; var n = this.alphas; void 0 === t ? t = [1] : Array.isArray(t) || void 0 !== e || (t = [t]); var s = 0; if (void 0 !== e) for (o = 0; o < i; o++) n[s = 2 * o] = t, n[s + 1] = e; else if (t.length === i) for (o = 0; o < i; o++) n[s = 2 * o] = t[o], n[s + 1] = t[o]; else for (var r = t[0], o = 0; o < i; o++) s = 2 * o, t.length > s && (r = t[s]), n[s] = r, t.length > s + 1 && (r = t[s + 1]), n[s + 1] = r; return this }, setColors: function(t) { var e = this.points.length; if (e < 1) return this; var i = this.colors; void 0 === t ? t = [16777215] : Array.isArray(t) || (t = [t]); var n = 0; if (t.length === e) for (r = 0; r < e; r++) i[n = 2 * r] = t[r], i[n + 1] = t[r]; else for (var s = t[0], r = 0; r < e; r++) n = 2 * r, t.length > n && (s = t[n]), i[n] = s, t.length > n + 1 && (s = t[n + 1]), i[n + 1] = s; return this }, setPoints: function(t, e, i) { if (void 0 === t && (t = 2), "number" == typeof t) { var n, s, r, o = t; if (o < 2 && (o = 2), t = [], this.horizontal) for (r = -this.frame.halfWidth, s = this.frame.width / (o - 1), n = 0; n < o; n++) t.push({ x: r + n * s, y: 0 }); else for (r = -this.frame.halfHeight, s = this.frame.height / (o - 1), n = 0; n < o; n++) t.push({ x: 0, y: r + n * s }) } var a = t.length , h = this.points.length; return a < 1 ? console.warn("Rope: Not enough points given") : (1 === a && (t.unshift({ x: 0, y: 0 }), a++), h !== a && this.resizeArrays(a), this.points = t, this.updateUVs(), null != e && this.setColors(e), null != i && this.setAlphas(i)), this }, updateUVs: function() { for (var t = this.uv, e = this.points.length, i = this.frame.u0, n = this.frame.v0, s = this.frame.u1, r = this.frame.v1, o = (s - i) / (e - 1), a = (r - n) / (e - 1), h = 0; h < e; h++) { var l, u, c, d = 4 * h, f = this.horizontal ? (c = l = this._flipX ? s - h * o : i + h * o, this._flipY ? (u = r, n) : (u = n, r)) : (c = this._flipX ? (l = i, s) : (l = s, i), u = this._flipY ? r - h * a : n + h * a); t[0 + d] = l, t[1 + d] = u, t[2 + d] = c, t[3 + d] = f } return this }, resizeArrays: function(t) { var e = this.colors , i = this.alphas; this.vertices = new Float32Array(4 * t), this.uv = new Float32Array(4 * t), e = new Uint32Array(2 * t), i = new Float32Array(2 * t); for (var n = 0; n < 2 * t; n++) e[n] = 16777215, i[n] = 1; return this.colors = e, this.alphas = i, this.dirty = !0, this }, updateVertices: function() { var t = this._perp , e = this.points , i = this.vertices , n = e.length; if (this.dirty = !1, !(n < 1)) { for (var s = e[0], r = this.horizontal ? this.frame.halfHeight : this.frame.halfWidth, o = 0; o < n; o++) { var a = e[o] , h = 4 * o , l = o < n - 1 ? e[o + 1] : a; t.x = l.y - s.y, t.y = -(l.x - s.x); var u = t.length(); t.x /= u, t.y /= u, t.x *= r, t.y *= r, i[h] = a.x + t.x, i[1 + h] = a.y + t.y, i[2 + h] = a.x - t.x, i[3 + h] = a.y - t.y, s = a } return this } }, setDebug: function(t, e) { return this.debugGraphic = t, this.debugCallback = t || e ? e || this.renderDebugVerts : null, this }, renderDebugVerts: function(t, e, i) { var n = t.debugGraphic , s = i[0] , r = i[1] , o = i[2] , a = i[3]; n.lineBetween(s, r, o, a); for (var h = 4; h < e; h += 4) { var l = i[h + 0] , u = i[h + 1] , c = i[h + 2] , d = i[h + 3]; n.lineBetween(s, r, l, u), n.lineBetween(o, a, c, d), n.lineBetween(o, a, l, u), n.lineBetween(l, u, c, d), s = l, r = u, o = c, a = d } }, preDestroy: function() { this.anims.destroy(), this.anims = void 0, this.points = null, this.vertices = null, this.uv = null, this.colors = null, this.alphas = null, this.debugCallback = null, this.debugGraphic = null }, flipX: { get: function() { return this._flipX }, set: function(t) { return this._flipX = t, this.updateUVs() } }, flipY: { get: function() { return this._flipY }, set: function(t) { return this._flipY = t, this.updateUVs() } } }); t.exports = r } , function(t, e, i) { var n = i(122) , r = i(26) , s = i(0) , o = i(12) , a = i(20) , h = i(14) , b = i(988) , l = i(6) , u = i(178) , c = i(989) , d = i(992) , f = new s({ Extends: h, Mixins: [o.Alpha, o.BlendMode, o.ComputedSize, o.Crop, o.Depth, o.Flip, o.GetBounds, o.Mask, o.Origin, o.Pipeline, o.ScrollFactor, o.Tint, o.Transform, o.Visible, c], initialize: function(t, e, i, n, s) { void 0 === e && (e = 0), void 0 === i && (i = 0), h.call(this, t, "Text"), this.renderer = t.sys.game.renderer, this.setPosition(e, i), this.setOrigin(0, 0), this.initPipeline(), this.canvas = r.create(this), this.context = this.canvas.getContext("2d"), this.style = new d(this,s), this.autoRound = !0, this.splitRegExp = /(?:\r\n|\r|\n)/, this._text = void 0, this.padding = { left: 0, right: 0, top: 0, bottom: 0 }, this.width = 1, this.height = 1, this.lineSpacing = 0, this.dirty = !1, 0 === this.style.resolution && (this.style.resolution = t.sys.game.config.resolution), this._crop = this.resetCropObject(), this.texture = t.sys.textures.addCanvas(null, this.canvas, !0), this.frame = this.texture.get(), this.frame.source.resolution = this.style.resolution, this.renderer && this.renderer.gl && (this.renderer.deleteTexture(this.frame.source.glTexture), this.frame.source.glTexture = null), this.initRTL(), this.setText(n), s && s.padding && this.setPadding(s.padding), s && s.lineSpacing && this.setLineSpacing(s.lineSpacing), t.sys.game.events.on(a.CONTEXT_RESTORED, function() { this.dirty = !0 }, this) }, initRTL: function() { this.style.rtl && (this.canvas.dir = "rtl", this.context.direction = "rtl", this.canvas.style.display = "none", n(this.canvas, this.scene.sys.canvas), this.originX = 1) }, runWordWrap: function(t) { var e = this.style; if (e.wordWrapCallback) { var i = e.wordWrapCallback.call(e.wordWrapCallbackScope, t, this); return Array.isArray(i) && (i = i.join("\n")), i } return e.wordWrapWidth ? e.wordWrapUseAdvanced ? this.advancedWordWrap(t, this.context, this.style.wordWrapWidth) : this.basicWordWrap(t, this.context, this.style.wordWrapWidth) : t }, advancedWordWrap: function(t, e, i) { for (var n = "", s = t.replace(/ +/gi, " ").split(this.splitRegExp), r = s.length, o = 0; o < r; o++) { var a = "" , h = (h = s[o]).replace(/^ *|\s*$/gi, ""); if (e.measureText(h).width < i) n += h + "\n"; else { for (var l = i, u = h.split(" "), c = 0; c < u.length; c++) { var d = u[c] , f = d + " " , p = e.measureText(f).width; if (l < p) { if (0 === c) { for (var g = f; g.length && (g = g.slice(0, -1), !((p = e.measureText(g).width) <= l)); ) ; if (!g.length) throw new Error("This text's wordWrapWidth setting is less than a single character!"); var v = d.substr(g.length); u[c] = v, a += g } var m = u[c].length ? c : c + 1 , y = u.slice(m).join(" ").replace(/[ \n]*$/gi, ""); s[o + 1] = y + " " + (s[o + 1] || ""), r = s.length; break } a += f, l -= p } n += a.replace(/[ \n]*$/gi, "") + "\n" } } return n = n.replace(/[\s|\n]*$/gi, "") }, basicWordWrap: function(t, e, i) { for (var n = "", s = t.split(this.splitRegExp), r = s.length - 1, o = e.measureText(" ").width, a = 0; a <= r; a++) { for (var h = i, l = s[a].split(" "), u = l.length - 1, c = 0; c <= u; c++) { var d = l[c] , f = e.measureText(d).width , p = f + o; h < p && 0 < c && (n += "\n", h = i), n += d, c < u ? (n += " ", h -= p) : h -= f } a < r && (n += "\n") } return n }, getWrappedText: function(t) { return void 0 === t && (t = this._text), this.style.syncFont(this.canvas, this.context), this.runWordWrap(t).split(this.splitRegExp) }, setText: function(t) { return t || 0 === t || (t = ""), Array.isArray(t) && (t = t.join("\n")), t !== this._text && (this._text = t.toString(), this.updateText()), this }, setStyle: function(t) { return this.style.setStyle(t) }, setFont: function(t) { return this.style.setFont(t) }, setFontFamily: function(t) { return this.style.setFontFamily(t) }, setFontSize: function(t) { return this.style.setFontSize(t) }, setFontStyle: function(t) { return this.style.setFontStyle(t) }, setFixedSize: function(t, e) { return this.style.setFixedSize(t, e) }, setBackgroundColor: function(t) { return this.style.setBackgroundColor(t) }, setFill: function(t) { return this.style.setFill(t) }, setColor: function(t) { return this.style.setColor(t) }, setStroke: function(t, e) { return this.style.setStroke(t, e) }, setShadow: function(t, e, i, n, s, r) { return this.style.setShadow(t, e, i, n, s, r) }, setShadowOffset: function(t, e) { return this.style.setShadowOffset(t, e) }, setShadowColor: function(t) { return this.style.setShadowColor(t) }, setShadowBlur: function(t) { return this.style.setShadowBlur(t) }, setShadowStroke: function(t) { return this.style.setShadowStroke(t) }, setShadowFill: function(t) { return this.style.setShadowFill(t) }, setWordWrapWidth: function(t, e) { return this.style.setWordWrapWidth(t, e) }, setWordWrapCallback: function(t, e) { return this.style.setWordWrapCallback(t, e) }, setAlign: function(t) { return this.style.setAlign(t) }, setResolution: function(t) { return this.style.setResolution(t) }, setLineSpacing: function(t) { return this.lineSpacing = t, this.updateText() }, setPadding: function(t, e, i, n) { var s, r, o; return "object" == typeof t ? (i = null !== (r = l(s = t, "x", null)) ? t = r : (t = l(s, "left", 0), l(s, "right", t)), n = null !== (o = l(s, "y", null)) ? e = o : (e = l(s, "top", 0), l(s, "bottom", e))) : (void 0 === t && (t = 0), void 0 === e && (e = t), void 0 === i && (i = t), void 0 === n && (n = e)), this.padding.left = t, this.padding.top = e, this.padding.right = i, this.padding.bottom = n, this.updateText() }, setMaxLines: function(t) { return this.style.setMaxLines(t) }, updateText: function() { var t = this.canvas , e = this.context , i = this.style , n = i.resolution , s = i.metrics; i.syncFont(t, e); var r = this._text; (i.wordWrapWidth || i.wordWrapCallback) && (r = this.runWordWrap(this._text)); var o, a = r.split(this.splitRegExp), h = b(this, s, a), l = this.padding; 0 === i.fixedWidth ? (this.width = h.width + l.left + l.right, o = h.width) : (this.width = i.fixedWidth, (o = this.width - l.left - l.right) < h.width && (o = h.width)), 0 === i.fixedHeight ? this.height = h.height + l.top + l.bottom : this.height = i.fixedHeight; var u, c, d = this.width, f = this.height; this.updateDisplayOrigin(), d *= n, f *= n, d = Math.max(d, 1), f = Math.max(f, 1), t.width !== d || t.height !== f ? (t.width = d, t.height = f, this.frame.setSize(d, f), i.syncFont(t, e)) : e.clearRect(0, 0, d, f), e.save(), e.scale(n, n), i.backgroundColor && (e.fillStyle = i.backgroundColor, e.fillRect(0, 0, d, f)), i.syncStyle(t, e), e.textBaseline = "alphabetic", e.translate(l.left, l.top); for (var p = 0; p < h.lines; p++) { if (u = i.strokeThickness / 2, c = i.strokeThickness / 2 + p * h.lineHeight + s.ascent, 0 < p && (c += h.lineSpacing * p), i.rtl) u = d - u; else if ("right" === i.align) u += o - h.lineWidths[p]; else if ("center" === i.align) u += (o - h.lineWidths[p]) / 2; else if ("justify" === i.align) { if (.85 <= h.lineWidths[p] / h.width) { var g = h.width - h.lineWidths[p] , v = e.measureText(" ").width , m = a[p].trim() , y = m.split(" "); g += (a[p].length - m.length) * v; for (var x = Math.floor(g / v), T = 0; 0 < x; ) y[T] += " ", T = (T + 1) % (y.length - 1 || 1), --x; a[p] = y.join(" ") } } this.autoRound && (u = Math.round(u), c = Math.round(c)), i.strokeThickness && (this.style.syncShadow(e, i.shadowStroke), e.strokeText(a[p], u, c)), i.color && (this.style.syncShadow(e, i.shadowFill), e.fillText(a[p], u, c)) } e.restore(), this.renderer && this.renderer.gl && (this.frame.source.glTexture = this.renderer.canvasToTexture(t, this.frame.source.glTexture, !0), this.frame.glTexture = this.frame.source.glTexture), this.dirty = !0; var w = this.input; return w && !w.customHitArea && (w.hitArea.width = this.width, w.hitArea.height = this.height), this }, getTextMetrics: function() { return this.style.getTextMetrics() }, text: { get: function() { return this._text }, set: function(t) { this.setText(t) } }, toJSON: function() { var t = o.ToJSON(this) , e = { autoRound: this.autoRound, text: this._text, style: this.style.toJSON(), padding: { left: this.padding.left, right: this.padding.right, top: this.padding.top, bottom: this.padding.bottom } }; return t.data = e, t }, preDestroy: function() { this.style.rtl && u(this.canvas), r.remove(this.canvas), this.texture.destroy() } }); t.exports = f } , function(t, e, i) { var u = i(26) , n = i(0) , s = i(12) , c = i(20) , d = i(14) , f = i(329) , o = i(167) , r = i(994) , p = i(3) , a = new n({ Extends: d, Mixins: [s.Alpha, s.BlendMode, s.ComputedSize, s.Crop, s.Depth, s.Flip, s.GetBounds, s.Mask, s.Origin, s.Pipeline, s.ScrollFactor, s.Tint, s.Transform, s.Visible, r], initialize: function(t, e, i, n, s, r, o) { var a = t.sys.game.renderer; d.call(this, t, "TileSprite"); var h = t.sys.textures.get(r) , l = h.get(o); s = n && s ? (n = Math.floor(n), Math.floor(s)) : (n = l.width, l.height), this._tilePosition = new p, this._tileScale = new p(1,1), this.dirty = !1, this.renderer = a, this.canvas = u.create(this, n, s), this.context = this.canvas.getContext("2d"), this.displayTexture = h, this.displayFrame = l, this._crop = this.resetCropObject(), this.texture = t.sys.textures.addCanvas(null, this.canvas, !0), this.frame = this.texture.get(), this.potWidth = f(l.width), this.potHeight = f(l.height), this.fillCanvas = u.create2D(this, this.potWidth, this.potHeight), this.fillContext = this.fillCanvas.getContext("2d"), this.fillPattern = null, this.setPosition(e, i), this.setSize(n, s), this.setFrame(o), this.setOriginFromFrame(), this.initPipeline(), t.sys.game.events.on(c.CONTEXT_RESTORED, function(t) { var e = t.gl; this.dirty = !0, this.fillPattern = null, this.fillPattern = t.createTexture2D(0, e.LINEAR, e.LINEAR, e.REPEAT, e.REPEAT, e.RGBA, this.fillCanvas, this.potWidth, this.potHeight) }, this) }, setTexture: function(t, e) { return this.displayTexture = this.scene.sys.textures.get(t), this.setFrame(e) }, setFrame: function(t) { var e = this.displayTexture.get(t); return this.potWidth = f(e.width), this.potHeight = f(e.height), this.canvas.width = 0, e.cutWidth && e.cutHeight ? this.renderFlags |= 8 : this.renderFlags &= -9, this.displayFrame = e, this.dirty = !0, this.updateTileTexture(), this }, setTilePosition: function(t, e) { return void 0 !== t && (this.tilePositionX = t), void 0 !== e && (this.tilePositionY = e), this }, setTileScale: function(t, e) { return void 0 === t && (t = this.tileScaleX), void 0 === e && (e = t), this.tileScaleX = t, this.tileScaleY = e, this }, updateTileTexture: function() { if (this.dirty && this.renderer) { var t = this.displayFrame; if (t.source.isRenderTexture || t.source.isGLTexture) return console.warn("TileSprites can only use Image or Canvas based textures"), void (this.dirty = !1); var e = this.fillContext , i = this.fillCanvas , n = this.potWidth , s = this.potHeight; this.renderer.gl || (n = t.cutWidth, s = t.cutHeight), e.clearRect(0, 0, n, s), i.width = n, i.height = s, e.drawImage(t.source.image, t.cutX, t.cutY, t.cutWidth, t.cutHeight, 0, 0, n, s), this.renderer.gl ? this.fillPattern = this.renderer.canvasToTexture(i, this.fillPattern) : this.fillPattern = e.createPattern(i, "repeat"), this.updateCanvas(), this.dirty = !1 } }, updateCanvas: function() { var t, e, i, n, s, r = this.canvas; r.width === this.width && r.height === this.height || (r.width = this.width, r.height = this.height, this.frame.setSize(this.width, this.height), this.updateDisplayOrigin(), this.dirty = !0), !this.dirty || this.renderer && this.renderer.gl || (t = this.context, this.scene.sys.game.config.antialias || o.disable(t), e = this._tileScale.x, i = this._tileScale.y, n = this._tilePosition.x, s = this._tilePosition.y, t.clearRect(0, 0, this.width, this.height), t.save(), t.scale(e, i), t.translate(-n, -s), t.fillStyle = this.fillPattern, t.fillRect(n, s, this.width / e, this.height / i), t.restore()), this.dirty = !1 }, preDestroy: function() { this.renderer && this.renderer.gl && this.renderer.deleteTexture(this.fillPattern), u.remove(this.canvas), u.remove(this.fillCanvas), this.fillPattern = null, this.fillContext = null, this.fillCanvas = null, this.displayTexture = null, this.displayFrame = null, this.texture.destroy(), this.renderer = null }, tilePositionX: { get: function() { return this._tilePosition.x }, set: function(t) { this._tilePosition.x = t, this.dirty = !0 } }, tilePositionY: { get: function() { return this._tilePosition.y }, set: function(t) { this._tilePosition.y = t, this.dirty = !0 } }, tileScaleX: { get: function() { return this._tileScale.x }, set: function(t) { this._tileScale.x = t, this.dirty = !0 } }, tileScaleY: { get: function() { return this._tileScale.y }, set: function(t) { this._tileScale.y = t, this.dirty = !0 } } }); t.exports = a } , function(t, e, i) { var n = i(0) , s = i(19) , r = i(12) , o = i(90) , a = i(20) , h = i(14) , l = i(59) , u = i(196) , c = i(997) , d = i(13) , f = new n({ Extends: h, Mixins: [r.Alpha, r.BlendMode, r.Depth, r.Flip, r.GetBounds, r.Mask, r.Origin, r.Pipeline, r.ScrollFactor, r.Size, r.TextureCrop, r.Tint, r.Transform, r.Visible, c], initialize: function(t, e, i, n) { h.call(this, t, "Video"), this.video = null, this.videoTexture = null, this.videoTextureSource = null, this.snapshotTexture = null, this.flipY = !1, this._key = u(), this.touchLocked = !0, this.playWhenUnlocked = !1, this.retryLimit = 20, this.retry = 0, this.retryInterval = 500, this._retryID = null, this._systemMuted = !1, this._codeMuted = !1, this._systemPaused = !1, this._codePaused = !1, this._callbacks = { play: this.playHandler.bind(this), error: this.loadErrorHandler.bind(this), end: this.completeHandler.bind(this), time: this.timeUpdateHandler.bind(this), seeking: this.seekingHandler.bind(this), seeked: this.seekedHandler.bind(this) }, this._crop = this.resetCropObject(), this.markers = {}, this._markerIn = -1, this._markerOut = d.MAX_SAFE_INTEGER, this._lastUpdate = 0, this._cacheKey = "", this._isSeeking = !1, this.removeVideoElementOnDestroy = !1, this.setPosition(e, i), this.initPipeline(), n && this.changeSource(n, !1); var s = t.sys.game.events; s.on(a.PAUSE, this.globalPause, this), s.on(a.RESUME, this.globalResume, this); var r = t.sys.sound; r && r.on(l.GLOBAL_MUTE, this.globalMute, this) }, play: function(t, e, i) { if (this.touchLocked && this.playWhenUnlocked || this.isPlaying()) return this; var n = this.video; if (!n) return console.warn("Video not loaded"), this; void 0 === t && (t = n.loop); var s = this.scene.sys.sound; s && s.mute && this.setMute(!0), isNaN(e) || (this._markerIn = e), !isNaN(i) && e < i && (this._markerOut = i), n.loop = t; var r = this._callbacks , o = n.play(); return void 0 !== o ? o.then(this.playPromiseSuccessHandler.bind(this)).catch(this.playPromiseErrorHandler.bind(this)) : (n.addEventListener("playing", r.play, !0), n.readyState < 2 && (this.retry = this.retryLimit, this._retryID = window.setTimeout(this.checkVideoProgress.bind(this), this.retryInterval))), n.addEventListener("ended", r.end, !0), n.addEventListener("timeupdate", r.time, !0), n.addEventListener("seeking", r.seeking, !0), n.addEventListener("seeked", r.seeked, !0), this }, changeSource: function(t, e, i, n, s) { void 0 === e && (e = !0), this.video && this.stop(); var r = this.scene.sys.cache.video.get(t); return r ? (this.video = r, this._cacheKey = t, this._codePaused = r.paused, this._codeMuted = r.muted, this.videoTexture ? (this.scene.sys.textures.remove(this._key), this.videoTexture = this.scene.sys.textures.create(this._key, r, r.videoWidth, r.videoHeight), this.videoTextureSource = this.videoTexture.source[0], this.videoTexture.add("__BASE", 0, 0, 0, r.videoWidth, r.videoHeight), this.setTexture(this.videoTexture), this.setSizeToFrame(), this.updateDisplayOrigin(), this.emit(o.VIDEO_CREATED, this, r.videoWidth, r.videoHeight)) : this.updateTexture(), r.currentTime = 0, this._lastUpdate = 0, e && this.play(i, n, s)) : this.video = null, this }, addMarker: function(t, e, i) { return !isNaN(e) && 0 <= e && !isNaN(i) && (this.markers[t] = [e, i]), this }, playMarker: function(t, e) { var i = this.markers[t]; return i && this.play(e, i[0], i[1]), this }, removeMarker: function(t) { return delete this.markers[t], this }, snapshot: function(t, e) { return void 0 === t && (t = this.width), void 0 === e && (e = this.height), this.snapshotArea(0, 0, this.width, this.height, t, e) }, snapshotArea: function(t, e, i, n, s, r) { void 0 === t && (t = 0), void 0 === e && (e = 0), void 0 === i && (i = this.width), void 0 === n && (n = this.height), void 0 === s && (s = i), void 0 === r && (r = n); var o = this.video , a = this.snapshotTexture; return a ? a.setSize(s, r) : (a = this.scene.sys.textures.createCanvas(u(), s, r), this.snapshotTexture = a), o && a.context.drawImage(o, t, e, i, n, 0, 0, s, r), a.update() }, saveSnapshotTexture: function(t) { return this.snapshotTexture ? this.scene.sys.textures.renameTexture(this.snapshotTexture.key, t) : this.snapshotTexture = this.scene.sys.textures.createCanvas(t, this.width, this.height), this.snapshotTexture }, loadURL: function(t, e, i) { void 0 === e && (e = "loadeddata"), void 0 === i && (i = !1), this.video && this.stop(), this.videoTexture && this.scene.sys.textures.remove(this._key); var n = document.createElement("video"); return n.controls = !1, i && (n.muted = !0, n.defaultMuted = !0, n.setAttribute("autoplay", "autoplay")), n.setAttribute("playsinline", "playsinline"), n.setAttribute("preload", "auto"), n.addEventListener("error", this._callbacks.error, !0), n.src = t, n.load(), this.video = n, this }, playPromiseSuccessHandler: function() { this.touchLocked = !1, this.emit(o.VIDEO_PLAY, this), -1 < this._markerIn && (this.video.currentTime = this._markerIn) }, playPromiseErrorHandler: function(t) { this.scene.sys.input.once("pointerdown", this.unlockHandler, this), this.touchLocked = !0, this.playWhenUnlocked = !0, this.emit(o.VIDEO_ERROR, this, t) }, playHandler: function() { this.touchLocked = !1, this.emit(o.VIDEO_PLAY, this), this.video.removeEventListener("playing", this._callbacks.play, !0) }, loadErrorHandler: function(t) { this.stop(), this.emit(o.VIDEO_ERROR, this, t) }, unlockHandler: function() { this.touchLocked = !1, this.playWhenUnlocked = !1, this.emit(o.VIDEO_UNLOCKED, this), -1 < this._markerIn && (this.video.currentTime = this._markerIn), this.video.play(), this.emit(o.VIDEO_PLAY, this) }, completeHandler: function() { this.emit(o.VIDEO_COMPLETE, this) }, timeUpdateHandler: function() { this.video && this.video.currentTime < this._lastUpdate && (this.emit(o.VIDEO_LOOP, this), this._lastUpdate = 0) }, preUpdate: function() { var t, e = this.video; !e || (t = e.currentTime) !== this._lastUpdate && (this._lastUpdate = t, this.updateTexture(), t >= this._markerOut && (e.loop ? (e.currentTime = this._markerIn, this.updateTexture(), this._lastUpdate = t, this.emit(o.VIDEO_LOOP, this)) : (this.emit(o.VIDEO_COMPLETE, this), this.stop()))) }, checkVideoProgress: function() { 2 <= this.video.readyState ? this.updateTexture() : (this.retry--, 0 < this.retry ? this._retryID = window.setTimeout(this.checkVideoProgress.bind(this), this.retryInterval) : this.emit(o.VIDEO_TIMEOUT, this)) }, updateTexture: function() { var t, e = this.video, i = e.videoWidth, n = e.videoHeight; this.videoTexture ? ((t = this.videoTextureSource).source !== e && (t.source = e, t.width = i, t.height = n), t.update()) : (this.videoTexture = this.scene.sys.textures.create(this._key, e, i, n), this.videoTextureSource = this.videoTexture.source[0], this.videoTexture.add("__BASE", 0, 0, 0, i, n), this.setTexture(this.videoTexture), this.setSizeToFrame(), this.updateDisplayOrigin(), this.emit(o.VIDEO_CREATED, this, i, n)) }, getVideoKey: function() { return this._cacheKey }, seekTo: function(t) { var e, i, n = this.video; return n && ((e = n.duration) === 1 / 0 || isNaN(e) || (i = e * t, this.setCurrentTime(i))), this }, getCurrentTime: function() { return this.video ? this.video.currentTime : 0 }, setCurrentTime: function(t) { var e, i, n = this.video; return n && ("string" == typeof t && (e = t[0], i = parseFloat(t.substr(1)), "+" === e ? t = n.currentTime + i : "-" === e && (t = n.currentTime - i)), n.currentTime = t, this._lastUpdate = t), this }, isSeeking: function() { return this._isSeeking }, seekingHandler: function() { this._isSeeking = !0, this.emit(o.VIDEO_SEEKING, this) }, seekedHandler: function() { this._isSeeking = !1, this.emit(o.VIDEO_SEEKED, this), this.video && this.updateTexture() }, getProgress: function() { var t = this.video; if (t) { var e = t.currentTime , i = t.duration; if (i !== 1 / 0 && !isNaN(i)) return e / i } return 0 }, getDuration: function() { return this.video ? this.video.duration : 0 }, setMute: function(t) { void 0 === t && (t = !0), this._codeMuted = t; var e = this.video; return e && (e.muted = !!this._systemMuted || t), this }, isMuted: function() { return this._codeMuted }, globalMute: function(t, e) { this._systemMuted = e; var i = this.video; i && (i.muted = !!this._codeMuted || e) }, globalPause: function() { this._systemPaused = !0, this.video && this.video.pause() }, globalResume: function() { this._systemPaused = !1, this.video && !this._codePaused && this.video.play() }, setPaused: function(t) { void 0 === t && (t = !0); var e = this.video; return this._codePaused = t, e && (t ? e.paused || e.pause() : t || e.paused && !this._systemPaused && e.play()), this }, getVolume: function() { return this.video ? this.video.volume : 1 }, setVolume: function(t) { return void 0 === t && (t = 1), this.video && (this.video.volume = s(t, 0, 1)), this }, getPlaybackRate: function() { return this.video ? this.video.playbackRate : 1 }, setPlaybackRate: function(t) { return this.video && (this.video.playbackRate = t), this }, getLoop: function() { return !!this.video && this.video.loop }, setLoop: function(t) { return void 0 === t && (t = !0), this.video && (this.video.loop = t), this }, isPlaying: function() { return !!this.video && !(this.video.paused || this.video.ended) }, isPaused: function() { return this.video && this.video.paused || this._codePaused || this._systemPaused }, saveTexture: function(t, e) { return void 0 === e && (e = !1), this.videoTexture && this.scene.sys.textures.renameTexture(this._key, t), this._key = t, this.flipY = e, this.videoTextureSource && this.videoTextureSource.setFlipY(e), this.videoTexture }, stop: function() { var t = this.video; if (t) { var e = this._callbacks; for (var i in e) t.removeEventListener(i, e[i], !0); t.pause() } return this._retryID && window.clearTimeout(this._retryID), this.emit(o.VIDEO_STOP, this), this }, removeVideoElement: function() { var t = this.video; if (t) { for (t.parentNode && t.parentNode.removeChild(t); t.hasChildNodes(); ) t.removeChild(t.firstChild); t.removeAttribute("autoplay"), t.removeAttribute("src"), this.video = null } }, preDestroy: function() { this.stop(), this.removeVideoElementOnDestroy && this.removeVideoElement(); var t = this.scene.sys.game.events; t.off(a.PAUSE, this.globalPause, this), t.off(a.RESUME, this.globalResume, this); var e = this.scene.sys.sound; e && e.off(l.GLOBAL_MUTE, this.globalMute, this), this._retryID && window.clearTimeout(this._retryID) } }); t.exports = f } , function(t, e, i) { var n = i(0) , s = i(202) , r = i(419) , o = i(47) , a = new n({ initialize: function(t) { this.type = o.POLYGON, this.area = 0, this.points = [], t && this.setTo(t) }, contains: function(t, e) { return s(this, t, e) }, setTo: function(t) { if (this.area = 0, this.points = [], "string" == typeof t && (t = t.split(" ")), !Array.isArray(t)) return this; for (var e, i = Number.MAX_VALUE, n = 0; n < t.length; n++) e = { x: 0, y: 0 }, "number" == typeof t[n] || "string" == typeof t[n] ? (e.x = parseFloat(t[n]), e.y = parseFloat(t[n + 1]), n++) : Array.isArray(t[n]) ? (e.x = t[n][0], e.y = t[n][1]) : (e.x = t[n].x, e.y = t[n].y), this.points.push(e), e.y < i && (i = e.y); return this.calculateArea(i), this }, calculateArea: function() { if (this.points.length < 3) return this.area = 0, this.area; for (var t, e, i = 0, n = 0; n < this.points.length - 1; n++) t = this.points[n], i += ((e = this.points[n + 1]).x - t.x) * (t.y + e.y); return t = this.points[0], e = this.points[this.points.length - 1], i += (t.x - e.x) * (e.y + t.y), this.area = .5 * -i, this.area }, getPoints: function(t, e, i) { return r(this, t, e, i) } }); t.exports = a } , function(t, e) { t.exports = function(t, e, i) { for (var n = !1, s = -1, r = t.points.length - 1; ++s < t.points.length; r = s) { var o = t.points[s].x , a = t.points[s].y , h = t.points[r].x , l = t.points[r].y; (a <= i && i < l || l <= i && i < a) && e < (h - o) * (i - a) / (l - a) + o && (n = !n) } return n } } , function(t, e, i) { var n = i(0) , r = i(134) , s = new n({ Extends: r, initialize: function(t, e, i, n, s) { r.call(this, t, e, i, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0], [16777215, 16777215, 16777215, 16777215, 16777215, 16777215], [1, 1, 1, 1, 1, 1], n, s), this.resetPosition() }, setFrame: function(t) { return this.frame = this.texture.get(t), this.frame.cutWidth && this.frame.cutHeight ? this.renderFlags |= 8 : this.renderFlags &= -9, t = this.frame, this.uv[0] = t.u0, this.uv[1] = t.v0, this.uv[2] = t.u0, this.uv[3] = t.v1, this.uv[4] = t.u1, this.uv[5] = t.v1, this.uv[6] = t.u0, this.uv[7] = t.v0, this.uv[8] = t.u1, this.uv[9] = t.v1, this.uv[10] = t.u1, this.uv[11] = t.v0, this }, topLeftX: { get: function() { return this.x + this.vertices[0] }, set: function(t) { this.vertices[0] = t - this.x, this.vertices[6] = t - this.x } }, topLeftY: { get: function() { return this.y + this.vertices[1] }, set: function(t) { this.vertices[1] = t - this.y, this.vertices[7] = t - this.y } }, topRightX: { get: function() { return this.x + this.vertices[10] }, set: function(t) { this.vertices[10] = t - this.x } }, topRightY: { get: function() { return this.y + this.vertices[11] }, set: function(t) { this.vertices[11] = t - this.y } }, bottomLeftX: { get: function() { return this.x + this.vertices[2] }, set: function(t) { this.vertices[2] = t - this.x } }, bottomLeftY: { get: function() { return this.y + this.vertices[3] }, set: function(t) { this.vertices[3] = t - this.y } }, bottomRightX: { get: function() { return this.x + this.vertices[4] }, set: function(t) { this.vertices[4] = t - this.x, this.vertices[8] = t - this.x } }, bottomRightY: { get: function() { return this.y + this.vertices[5] }, set: function(t) { this.vertices[5] = t - this.y, this.vertices[9] = t - this.y } }, topLeftAlpha: { get: function() { return this.alphas[0] }, set: function(t) { this.alphas[0] = t, this.alphas[3] = t } }, topRightAlpha: { get: function() { return this.alphas[5] }, set: function(t) { this.alphas[5] = t } }, bottomLeftAlpha: { get: function() { return this.alphas[1] }, set: function(t) { this.alphas[1] = t } }, bottomRightAlpha: { get: function() { return this.alphas[2] }, set: function(t) { this.alphas[2] = t, this.alphas[4] = t } }, topLeftColor: { get: function() { return this.colors[0] }, set: function(t) { this.colors[0] = t, this.colors[3] = t } }, topRightColor: { get: function() { return this.colors[5] }, set: function(t) { this.colors[5] = t } }, bottomLeftColor: { get: function() { return this.colors[1] }, set: function(t) { this.colors[1] = t } }, bottomRightColor: { get: function() { return this.colors[2] }, set: function(t) { this.colors[2] = t, this.colors[4] = t } }, setTopLeft: function(t, e) { return this.topLeftX = t, this.topLeftY = e, this }, setTopRight: function(t, e) { return this.topRightX = t, this.topRightY = e, this }, setBottomLeft: function(t, e) { return this.bottomLeftX = t, this.bottomLeftY = e, this }, setBottomRight: function(t, e) { return this.bottomRightX = t, this.bottomRightY = e, this }, resetPosition: function() { var t = this.x , e = this.y , i = Math.floor(this.width / 2) , n = Math.floor(this.height / 2); return this.setTopLeft(t - i, e - n), this.setTopRight(t + i, e - n), this.setBottomLeft(t - i, e + n), this.setBottomRight(t + i, e + n), this }, resetAlpha: function() { var t = this.alphas; return t[0] = 1, t[1] = 1, t[2] = 1, t[3] = 1, t[4] = 1, t[5] = 1, this }, resetColors: function() { var t = this.colors; return t[0] = 16777215, t[1] = 16777215, t[2] = 16777215, t[3] = 16777215, t[4] = 16777215, t[5] = 16777215, this }, reset: function() { return this.resetPosition(), this.resetAlpha(), this.resetColors() } }); t.exports = s } , function(t, e, i) { var n = i(0) , s = i(12) , l = i(14) , c = i(2) , u = i(18) , r = i(427) , o = i(1080) , d = i(29) , a = new n({ Extends: l, Mixins: [s.ComputedSize, s.Depth, s.GetBounds, s.Mask, s.Origin, s.ScrollFactor, s.Transform, s.Visible, o], initialize: function(t, e, i, n, s, r, o, a) { void 0 === i && (i = 0), void 0 === n && (n = 0), void 0 === s && (s = 128), void 0 === r && (r = 128), l.call(this, t, "Shader"), this.blendMode = -1, this.shader; var h = t.sys.renderer; this.renderer = h, this.gl = h.gl, this.vertexData = new ArrayBuffer(2 * Float32Array.BYTES_PER_ELEMENT * 6), this.vertexBuffer = h.createVertexBuffer(this.vertexData.byteLength, this.gl.STREAM_DRAW), this.program = null, this.bytes = new Uint8Array(this.vertexData), this.vertexViewF32 = new Float32Array(this.vertexData), this._tempMatrix1 = new d, this._tempMatrix2 = new d, this._tempMatrix3 = new d, this.viewMatrix = new Float32Array([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]), this.projectionMatrix = new Float32Array([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]), this.uniforms = {}, this.pointer = null, this._rendererWidth = h.width, this._rendererHeight = h.height, this._textureCount = 0, this.framebuffer = null, this.glTexture = null, this.renderToTexture = !1, this.texture = null, this.setPosition(i, n), this.setSize(s, r), this.setOrigin(.5, .5), this.setShader(e, o, a) }, willRender: function(t) { return !!this.renderToTexture || !(l.RENDER_MASK !== this.renderFlags || 0 !== this.cameraFilter && this.cameraFilter & t.id) }, setRenderToTexture: function(t, e) { var i, n, s, r; return void 0 === e && (e = !1), this.renderToTexture || (i = this.width, n = this.height, s = this.renderer, this.glTexture = s.createTextureFromSource(null, i, n, 0), this.glTexture.flipY = e, this.framebuffer = s.createFramebuffer(i, n, this.glTexture, !1), this._rendererWidth = i, this._rendererHeight = n, this.renderToTexture = !0, this.projOrtho(0, this.width, this.height, 0), t && (this.texture = this.scene.sys.textures.addGLTexture(t, this.glTexture, i, n))), this.shader && (r = s.currentPipeline, s.clearPipeline(), this.load(), this.flush(), s.rebindPipeline(r)), this }, setShader: function(t, e, i) { if (void 0 === e && (e = []), "string" == typeof t) { var n = this.scene.sys.cache.shader; if (!n.has(t)) return console.warn("Shader missing: " + t), this; this.shader = n.get(t) } else this.shader = t; var s = this.gl , r = this.renderer; this.program && s.deleteProgram(this.program); var o = r.createProgram(this.shader.vertexSrc, this.shader.fragmentSrc); r.setMatrix4(o, "uViewMatrix", !1, this.viewMatrix), r.setMatrix4(o, "uProjectionMatrix", !1, this.projectionMatrix), r.setFloat2(o, "uResolution", this.width, this.height), this.program = o; var a = new Date , h = { resolution: { type: "2f", value: { x: this.width, y: this.height } }, time: { type: "1f", value: 0 }, mouse: { type: "2f", value: { x: this.width / 2, y: this.height / 2 } }, date: { type: "4fv", value: [a.getFullYear(), a.getMonth(), a.getDate(), 60 * a.getHours() * 60 + 60 * a.getMinutes() + a.getSeconds()] }, sampleRate: { type: "1f", value: 44100 }, iChannel0: { type: "sampler2D", value: null, textureData: { repeat: !0 } }, iChannel1: { type: "sampler2D", value: null, textureData: { repeat: !0 } }, iChannel2: { type: "sampler2D", value: null, textureData: { repeat: !0 } }, iChannel3: { type: "sampler2D", value: null, textureData: { repeat: !0 } } }; this.shader.uniforms ? this.uniforms = u(!0, {}, this.shader.uniforms, h) : this.uniforms = h; for (var l = 0; l < 4; l++) e[l] && this.setSampler2D("iChannel" + l, e[l], l, i); return this.initUniforms(), this.projOrtho(0, this._rendererWidth, this._rendererHeight, 0), this }, setPointer: function(t) { return this.pointer = t, this }, projOrtho: function(t, e, i, n) { var s = 1 / (t - e) , r = 1 / (i - n) , o = this.projectionMatrix; o[0] = -2 * s, o[5] = -2 * r, o[10] = -.001, o[12] = (t + e) * s, o[13] = (n + i) * r, o[14] = -0; var a = this.program; this.renderer.setMatrix4(a, "uProjectionMatrix", !1, this.projectionMatrix), this._rendererWidth = e, this._rendererHeight = i }, initUniforms: function() { var t = this.gl , e = this.renderer.glFuncMap , i = this.program; for (var n in this._textureCount = 0, this.uniforms) { var s = this.uniforms[n] , r = s.type , o = e[r]; s.uniformLocation = t.getUniformLocation(i, n), "sampler2D" !== r && (s.glMatrix = o.matrix, s.glValueLength = o.length, s.glFunc = o.func) } }, setSampler2DBuffer: function(t, e, i, n, s, r) { void 0 === s && (s = 0), void 0 === r && (r = {}); var o = this.uniforms[t]; return o.value = e, r.width = i, r.height = n, o.textureData = r, this._textureCount = s, this.initSampler2D(o), this }, setSampler2D: function(t, e, i, n) { void 0 === i && (i = 0); var s, r, o, a = this.scene.sys.textures; return a.exists(e) && (s = a.getFrame(e), r = this.uniforms[t], o = s.source, r.textureKey = e, r.source = o.image, r.value = s.glTexture, o.isGLTexture && ((n = n || {}).width = o.width, n.height = o.height), n && (r.textureData = n), this._textureCount = i, this.initSampler2D(r)), this }, setUniform: function(t, e) { return r(this.uniforms, t, e), this }, getUniform: function(t) { return c(this.uniforms, t, null) }, setChannel0: function(t, e) { return this.setSampler2D("iChannel0", t, 0, e) }, setChannel1: function(t, e) { return this.setSampler2D("iChannel1", t, 1, e) }, setChannel2: function(t, e) { return this.setSampler2D("iChannel2", t, 2, e) }, setChannel3: function(t, e) { return this.setSampler2D("iChannel3", t, 3, e) }, initSampler2D: function(t) { var e, i, n, s, r, o, a, h, l, u; t.value && ((e = this.gl).activeTexture(e.TEXTURE0 + this._textureCount), e.bindTexture(e.TEXTURE_2D, t.value), (i = t.textureData) && (n = e[c(i, "magFilter", "linear").toUpperCase()], s = e[c(i, "minFilter", "linear").toUpperCase()], r = e[c(i, "wrapS", "repeat").toUpperCase()], o = e[c(i, "wrapT", "repeat").toUpperCase()], a = e[c(i, "format", "rgba").toUpperCase()], i.repeat && (r = e.REPEAT, o = e.REPEAT), e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL, !!i.flipY), i.width ? (h = c(i, "width", 512), l = c(i, "height", 2), u = c(i, "border", 0), e.texImage2D(e.TEXTURE_2D, 0, a, h, l, u, a, e.UNSIGNED_BYTE, null)) : e.texImage2D(e.TEXTURE_2D, 0, a, e.RGBA, e.UNSIGNED_BYTE, t.source), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MAG_FILTER, n), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MIN_FILTER, s), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_S, r), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_T, o)), this.renderer.setProgram(this.program), e.uniform1i(t.uniformLocation, this._textureCount), this._textureCount++) }, syncUniforms: function() { var t, e, i, n, s, r = this.gl, o = this.uniforms, a = 0; for (var h in o) i = (t = o[h]).glFunc, e = t.glValueLength, n = t.uniformLocation, null !== (s = t.value) && (1 === e ? t.glMatrix ? i.call(r, n, t.transpose, s) : i.call(r, n, s) : 2 === e ? i.call(r, n, s.x, s.y) : 3 === e ? i.call(r, n, s.x, s.y, s.z) : 4 === e ? i.call(r, n, s.x, s.y, s.z, s.w) : "sampler2D" === t.type && (r.activeTexture(r["TEXTURE" + a]), r.bindTexture(r.TEXTURE_2D, s), r.uniform1i(n, a), a++)) }, load: function(t) { var e, i, n = this.gl, s = this.width, r = this.height, o = this.renderer, a = this.program, h = this.viewMatrix; this.renderToTexture || (e = -this._displayOriginX, i = -this._displayOriginY, h[0] = t[0], h[1] = t[1], h[4] = t[2], h[5] = t[3], h[8] = t[4], h[9] = t[5], h[12] = h[0] * e + h[4] * i, h[13] = h[1] * e + h[5] * i), n.useProgram(a), n.uniformMatrix4fv(n.getUniformLocation(a, "uViewMatrix"), !1, h), n.uniform2f(n.getUniformLocation(a, "uResolution"), this.width, this.height); var l = this.uniforms , u = l.resolution; u.value.x = s, u.value.y = r, l.time.value = o.game.loop.getDuration(); var c, d, f, p = this.pointer; p && (c = l.mouse, d = p.x / s, f = 1 - p.y / r, c.value.x = d.toFixed(2), c.value.y = f.toFixed(2)), this.syncUniforms() }, flush: function() { var t = this.width , e = this.height , i = this.program , n = this.gl , s = this.vertexBuffer , r = this.renderer , o = 2 * Float32Array.BYTES_PER_ELEMENT; this.renderToTexture && (r.setFramebuffer(this.framebuffer), n.clearColor(0, 0, 0, 0), n.clear(n.COLOR_BUFFER_BIT)), n.bindBuffer(n.ARRAY_BUFFER, s); var a = n.getAttribLocation(i, "inPosition"); -1 !== a && (n.enableVertexAttribArray(a), n.vertexAttribPointer(a, 2, n.FLOAT, !1, o, 0)); var h = this.vertexViewF32; h[3] = e, h[4] = t, h[5] = e, h[8] = t, h[9] = e, h[10] = t; n.bufferSubData(n.ARRAY_BUFFER, 0, this.bytes.subarray(0, 6 * o)), n.drawArrays(n.TRIANGLES, 0, 6), this.renderToTexture && r.setFramebuffer(null, !1) }, setAlpha: function() {}, setBlendMode: function() {}, preDestroy: function() { var t = this.gl; t.deleteProgram(this.program), t.deleteBuffer(this.vertexBuffer), this.renderToTexture && (this.renderer.deleteFramebuffer(this.framebuffer), this.texture.destroy(), this.framebuffer = null, this.glTexture = null, this.texture = null) } }); t.exports = a } , function(t, e, i) { var n = i(53); t.exports = function(t, e) { return n(t.x, t.y, e.x, e.y) <= t.radius + e.radius } } , function(t, e) { t.exports = function(t, e) { var i = e.width / 2 , n = e.height / 2 , s = Math.abs(t.x - e.x - i) , r = Math.abs(t.y - e.y - n) , o = i + t.radius , a = n + t.radius; if (o < s || a < r) return !1; if (s <= i || r <= n) return !0; var h = s - i , l = r - n; return h * h + l * l <= t.radius * t.radius } } , function(t, e, i) { var T = i(4) , w = i(208); t.exports = function(t, e, i) { var n, s, r, o, a, h, l, u, c, d, f, p, g, v, m, y, x; return void 0 === i && (i = []), w(t, e) && (n = t.x1, s = t.y1, r = t.x2, o = t.y2, 0 == (p = (f = 2 * ((h = r - n) * (u = n - e.x) + (l = o - s) * (c = s - e.y))) * f - 4 * (d = h * h + l * l) * (u * u + c * c - (a = e.radius) * a)) ? (v = n + (g = -f / (2 * d)) * h, m = s + g * l, 0 <= g && g <= 1 && i.push(new T(v,m))) : 0 < p && (v = n + (y = (-f - Math.sqrt(p)) / (2 * d)) * h, m = s + y * l, 0 <= y && y <= 1 && i.push(new T(v,m)), v = n + (x = (-f + Math.sqrt(p)) / (2 * d)) * h, m = s + x * l, 0 <= x && x <= 1 && i.push(new T(v,m)))), i } } , function(t, e, i) { var c = i(55) , d = new (i(4)); t.exports = function(t, e, i) { if (void 0 === i && (i = d), c(e, t.x1, t.y1)) return i.x = t.x1, i.y = t.y1, !0; if (c(e, t.x2, t.y2)) return i.x = t.x2, i.y = t.y2, !0; var n, s = t.x2 - t.x1, r = t.y2 - t.y1, o = e.x - t.x1, a = e.y - t.y1, h = s * s + r * r, l = s, u = r; return 0 < h && (l *= n = (o * s + a * r) / h, u *= n), i.x = t.x1 + l, i.y = t.y1 + u, l * l + u * u <= h && 0 <= l * s + u * r && c(e, i.x, i.y) } } , function(t, e, i) { var u = i(4) , c = i(84) , d = i(432); t.exports = function(t, e, i) { if (void 0 === i && (i = []), d(t, e)) for (var n = e.getLineA(), s = e.getLineB(), r = e.getLineC(), o = e.getLineD(), a = [new u, new u, new u, new u], h = [c(n, t, a[0]), c(s, t, a[1]), c(r, t, a[2]), c(o, t, a[3])], l = 0; l < 4; l++) h[l] && i.push(a[l]); return i } } , function(t, e) { t.exports = function(t, e, i, n) { void 0 === i && (i = !1), void 0 === n && (n = []); for (var s, r, o, a, h, l, u = t.x3 - t.x1, c = t.y3 - t.y1, d = t.x2 - t.x1, f = t.y2 - t.y1, p = u * u + c * c, g = u * d + c * f, v = d * d + f * f, m = p * v - g * g, y = 0 == m ? 0 : 1 / m, x = t.x1, T = t.y1, w = 0; w < e.length && (r = (p * (l = d * (o = e[w].x - x) + f * (a = e[w].y - T)) - g * (h = u * o + c * a)) * y, !(0 <= (s = (v * h - g * l) * y) && 0 <= r && s + r < 1 && (n.push({ x: e[w].x, y: e[w].y }), i))); w++) ; return n } } , function(t, e) { t.exports = function(t, e, i, n) { var s = Math.cos(n) , r = Math.sin(n) , o = t.x1 - e , a = t.y1 - i; return t.x1 = o * s - a * r + e, t.y1 = o * r + a * s + i, o = t.x2 - e, a = t.y2 - i, t.x2 = o * s - a * r + e, t.y2 = o * r + a * s + i, t } } , function(t, e) { t.exports = function(t) { return 0 === t.height ? NaN : t.width / t.height } } , function(t, e) { t.exports = function(t, e, i, n) { var s = Math.cos(n) , r = Math.sin(n) , o = t.x1 - e , a = t.y1 - i; return t.x1 = o * s - a * r + e, t.y1 = o * r + a * s + i, o = t.x2 - e, a = t.y2 - i, t.x2 = o * s - a * r + e, t.y2 = o * r + a * s + i, o = t.x3 - e, a = t.y3 - i, t.x3 = o * s - a * r + e, t.y3 = o * r + a * s + i, t } } , function(t, e, i) { t.exports = { BUTTON_DOWN: i(1203), BUTTON_UP: i(1204), CONNECTED: i(1205), DISCONNECTED: i(1206), GAMEPAD_BUTTON_DOWN: i(1207), GAMEPAD_BUTTON_UP: i(1208) } } , function(t, e, i) { var s = i(18) , r = i(139); t.exports = function(t, e) { var i = void 0 === t ? r() : s({}, t); if (e) for (var n in e) void 0 !== e[n] && (i[n] = e[n]); return i } } , function(t, e, i) { var n = i(0) , s = i(17) , a = i(21) , r = i(8) , h = i(2) , l = i(7) , o = i(364) , u = new n({ Extends: a, initialize: function(t, e, i, n) { var s, r = "xml"; l(e) && (e = h(s = e, "key"), i = h(s, "url"), n = h(s, "xhrSettings"), r = h(s, "extension", r)); var o = { type: "xml", cache: t.cacheManager.xml, extension: r, responseType: "text", key: e, url: i, xhrSettings: n }; a.call(this, t, o) }, onProcess: function() { this.state = s.FILE_PROCESSING, this.data = o(this.xhrLoader.responseText), this.data ? this.onProcessComplete() : (console.warn("Invalid XMLFile: " + this.key), this.onProcessError()) } }); r.register("xml", function(t, e, i) { if (Array.isArray(t)) for (var n = 0; n < t.length; n++) this.addFile(new u(this,t[n])); else this.addFile(new u(this,t,e,i)); return this }), t.exports = u } , function(t, e, i) { t.exports = { Acceleration: i(1263), Angular: i(1264), Bounce: i(1265), Debug: i(1266), Drag: i(1267), Enable: i(1268), Friction: i(1269), Gravity: i(1270), Immovable: i(1271), Mass: i(1272), Size: i(1273), Velocity: i(1274) } } , function(t, e, i) { t.exports = { COLLIDE: i(1276), OVERLAP: i(1277), PAUSE: i(1278), RESUME: i(1279), TILE_COLLIDE: i(1280), TILE_OVERLAP: i(1281), WORLD_BOUNDS: i(1282), WORLD_STEP: i(1283) } } , function(t, e, i) { var w = {}; t.exports = w; var o = i(86) , b = i(99) , a = i(239) , h = i(100) , l = i(513) , u = i(42); w._warming = .4, w._torqueDampen = 1, w._minLength = 1e-6, w.create = function(t) { var e = t; e.bodyA && !e.pointA && (e.pointA = { x: 0, y: 0 }), e.bodyB && !e.pointB && (e.pointB = { x: 0, y: 0 }); var i = e.bodyA ? b.add(e.bodyA.position, e.pointA) : e.pointA , n = e.bodyB ? b.add(e.bodyB.position, e.pointB) : e.pointB , s = b.magnitude(b.sub(i, n)); e.length = void 0 !== e.length ? e.length : s, e.id = e.id || u.nextId(), e.label = e.label || "Constraint", e.type = "constraint", e.stiffness = e.stiffness || (0 < e.length ? 1 : .7), e.damping = e.damping || 0, e.angularStiffness = e.angularStiffness || 0, e.angleA = e.bodyA ? e.bodyA.angle : e.angleA, e.angleB = e.bodyB ? e.bodyB.angle : e.angleB, e.plugin = {}; var r = { visible: !0, type: "line", anchors: !0, lineColor: null, lineOpacity: null, lineThickness: null, pinSize: null, anchorColor: null, anchorSize: null }; return 0 === e.length && .1 < e.stiffness ? (r.type = "pin", r.anchors = !1) : e.stiffness < .9 && (r.type = "spring"), e.render = u.extend(r, e.render), e } , w.preSolveAll = function(t) { for (var e = 0; e < t.length; e += 1) { var i = t[e] , n = i.constraintImpulse; i.isStatic || 0 === n.x && 0 === n.y && 0 === n.angle || (i.position.x += n.x, i.position.y += n.y, i.angle += n.angle) } } , w.solveAll = function(t, e) { for (var i = 0; i < t.length; i += 1) { var n = t[i] , s = !n.bodyA || n.bodyA && n.bodyA.isStatic , r = !n.bodyB || n.bodyB && n.bodyB.isStatic; (s || r) && w.solve(t[i], e) } for (i = 0; i < t.length; i += 1) s = !(n = t[i]).bodyA || n.bodyA && n.bodyA.isStatic, r = !n.bodyB || n.bodyB && n.bodyB.isStatic, s || r || w.solve(t[i], e) } , w.solve = function(t, e) { var i, n, s, r, o, a, h, l, u, c, d, f, p, g, v, m = t.bodyA, y = t.bodyB, x = t.pointA, T = t.pointB; (m || y) && (m && !m.isStatic && (b.rotate(x, m.angle - t.angleA, x), t.angleA = m.angle), y && !y.isStatic && (b.rotate(T, y.angle - t.angleB, T), t.angleB = y.angle), i = x, n = T, m && (i = b.add(m.position, x)), y && (n = b.add(y.position, T)), i && n && (s = b.sub(i, n), (r = b.magnitude(s)) < w._minLength && (r = w._minLength), o = (r - t.length) / r, a = t.stiffness < 1 ? t.stiffness * e : t.stiffness, h = b.mult(s, o * a), u = (l = (m ? m.inverseMass : 0) + (y ? y.inverseMass : 0)) + ((m ? m.inverseInertia : 0) + (y ? y.inverseInertia : 0)), t.damping && (f = b.create(), p = b.div(s, r), g = b.sub(y && b.sub(y.position, y.positionPrev) || f, m && b.sub(m.position, m.positionPrev) || f), v = b.dot(p, g)), m && !m.isStatic && (d = m.inverseMass / l, m.constraintImpulse.x -= h.x * d, m.constraintImpulse.y -= h.y * d, m.position.x -= h.x * d, m.position.y -= h.y * d, t.damping && (m.positionPrev.x -= t.damping * p.x * v * d, m.positionPrev.y -= t.damping * p.y * v * d), c = b.cross(x, h) / u * w._torqueDampen * m.inverseInertia * (1 - t.angularStiffness), m.constraintImpulse.angle -= c, m.angle -= c), y && !y.isStatic && (d = y.inverseMass / l, y.constraintImpulse.x += h.x * d, y.constraintImpulse.y += h.y * d, y.position.x += h.x * d, y.position.y += h.y * d, t.damping && (y.positionPrev.x += t.damping * p.x * v * d, y.positionPrev.y += t.damping * p.y * v * d), c = b.cross(T, h) / u * w._torqueDampen * y.inverseInertia * (1 - t.angularStiffness), y.constraintImpulse.angle += c, y.angle += c))) } , w.postSolveAll = function(t) { for (var e = 0; e < t.length; e++) { var i = t[e] , n = i.constraintImpulse; if (!(i.isStatic || 0 === n.x && 0 === n.y && 0 === n.angle)) { a.set(i, !1); for (var s = 0; s < i.parts.length; s++) { var r = i.parts[s]; o.translate(r.vertices, n), 0 < s && (r.position.x += n.x, r.position.y += n.y), 0 !== n.angle && (o.rotate(r.vertices, n.angle, i.position), l.rotate(r.axes, n.angle), 0 < s && b.rotateAbout(r.position, n.angle, i.position, r.position)), h.update(r.bounds, r.vertices, i.velocity) } n.angle *= w._warming, n.x *= w._warming, n.y *= w._warming } } } , w.pointAWorld = function(t) { return { x: (t.bodyA ? t.bodyA.position.x : 0) + t.pointA.x, y: (t.bodyA ? t.bodyA.position.y : 0) + t.pointA.y } } , w.pointBWorld = function(t) { return { x: (t.bodyB ? t.bodyB.position.x : 0) + t.pointB.x, y: (t.bodyB ? t.bodyB.position.y : 0) + t.pointB.y } } } , function(t, e, i) { var l = i(142); t.exports = function(t, e, i) { var n = l(t, e, !0, i) , s = l(t, e - 1, !0, i) , r = l(t, e + 1, !0, i) , o = l(t - 1, e, !0, i) , a = l(t + 1, e, !0, i) , h = n && n.collides; return h && (n.faceTop = !0, n.faceBottom = !0, n.faceLeft = !0, n.faceRight = !0), s && s.collides && (h && (n.faceTop = !1), s.faceBottom = !h), r && r.collides && (h && (n.faceBottom = !1), r.faceTop = !h), o && o.collides && (h && (n.faceLeft = !1), o.faceRight = !h), a && a.collides && (h && (n.faceRight = !1), a.faceLeft = !h), n && !n.collides && n.resetFaces(), n } } , function(t, e, i) { var u = i(74) , c = i(101) , d = i(220) , f = i(73); t.exports = function(t, e, i, n, s) { if (!c(e, i, s)) return null; void 0 === n && (n = !0); var r, o = s.data[i][e], a = o && o.collides; t instanceof u ? (null === s.data[i][e] && (s.data[i][e] = new u(s,t.index,e,i,t.width,t.height)), s.data[i][e].copy(t)) : (r = t, null === s.data[i][e] ? s.data[i][e] = new u(s,r,e,i,s.tileWidth,s.tileHeight) : s.data[i][e].index = r); var h = s.data[i][e] , l = -1 !== s.collideIndexes.indexOf(h.index); return f(h, l), n && a !== h.collides && d(e, i, s), h } } , function(t, e) { t.exports = function(t, e, i) { var n = i.collideIndexes.indexOf(t); e && -1 === n ? i.collideIndexes.push(t) : e || -1 === n || i.collideIndexes.splice(n, 1) } } , function(t, e, i) { var p = i(32) , g = i(102) , v = i(103) , m = i(74); t.exports = function(t, e, i, n, s) { for (var r = new g({ tileWidth: i, tileHeight: n }), o = new v({ name: t, tileWidth: i, tileHeight: n, format: p.ARRAY_2D, layers: [r] }), a = [], h = e.length, l = 0, u = 0; u < e.length; u++) { a[u] = []; for (var c = e[u], d = 0; d < c.length; d++) { var f = parseInt(c[d], 10); isNaN(f) || -1 === f ? a[u][d] = s ? null : new m(r,-1,d,u,i,n) : a[u][d] = new m(r,f,d,u,i,n) } 0 === l && (l = c.length) } return o.width = r.width = l, o.height = r.height = h, o.widthInPixels = r.widthInPixels = l * i, o.heightInPixels = r.heightInPixels = h * n, r.data = a, o } } , function(t, e) { t.exports = function(t) { var e = Boolean(2147483648 & t) , i = Boolean(1073741824 & t) , n = Boolean(536870912 & t); t &= 536870911; var s = 0 , r = !1; return e && i && n ? (s = Math.PI / 2, r = !0) : e && i && !n ? (s = Math.PI, r = !1) : e && !i && n ? (s = Math.PI / 2, r = !1) : !e || i || n ? !e && i && n ? (s = 3 * Math.PI / 2, r = !1) : e || !i || n ? e || i || !n ? e || i || n || (s = 0, r = !1) : (s = 3 * Math.PI / 2, r = !0) : (s = Math.PI, r = !0) : r = !(s = 0), { gid: t, flippedHorizontal: e, flippedVertical: i, flippedAntiDiagonal: n, rotation: s, flipped: r } } } , function(t, e, i) { var r = i(2); t.exports = function(t, e, i) { if (!e) return { i: 0, layers: t.layers, name: "", opacity: 1, visible: !0, x: 0, y: 0 }; var n = e.x + r(e, "startx", 0) * t.tilewidth + r(e, "offsetx", 0) , s = e.y + r(e, "starty", 0) * t.tileheight + r(e, "offsety", 0); return { i: 0, layers: e.layers, name: i.name + e.name + "/", opacity: i.opacity * e.opacity, visible: i.visible && e.visible, x: i.x + n, y: i.y + s } } } , function(t, e, i) { function r(t) { return { x: t.x, y: t.y } } var o = i(486) , a = i(224) , h = ["id", "name", "type", "rotation", "properties", "visible", "x", "y", "width", "height"]; t.exports = function(t, e, i) { void 0 === e && (e = 0), void 0 === i && (i = 0); var n, s = o(t, h); return s.x += e, s.y += i, t.gid ? (n = a(t.gid), s.gid = n.gid, s.flippedHorizontal = n.flippedHorizontal, s.flippedVertical = n.flippedVertical, s.flippedAntiDiagonal = n.flippedAntiDiagonal) : t.polyline ? s.polyline = t.polyline.map(r) : t.polygon ? s.polygon = t.polygon.map(r) : t.ellipse ? s.ellipse = t.ellipse : t.text ? s.text = t.text : t.point ? s.point = !0 : s.rectangle = !0, s } } , function(t, e, i) { var u = i(32) , c = i(103) , d = i(478) , f = i(494); t.exports = function(t, e, i, n, s, r, o, a) { void 0 === i && (i = 32), void 0 === n && (n = 32), void 0 === s && (s = 10), void 0 === r && (r = 10), void 0 === a && (a = !1); var h, l = null; return Array.isArray(o) ? l = d(void 0 !== e ? e : "map", u.ARRAY_2D, o, i, n, a) : void 0 !== e && ((h = t.cache.tilemap.get(e)) ? l = d(e, h.format, h.data, i, n, a) : console.warn("No map data found for key " + e)), null === l && (l = new c({ tileWidth: i, tileHeight: n, width: s, height: r })), new f(t,l) } } , function(t, e, i) { var n = i(6); t.exports = function(t) { var e = n(t, "targets", null); return null === e || ("function" == typeof e && (e = e.call()), Array.isArray(e) || (e = [e])), e } } , function(t, e) { function g(t) { return !!t.getActive && "function" == typeof t.getActive } function v(t) { return !!t.getStart && "function" == typeof t.getStart } function m(t) { return !!t.getEnd && "function" == typeof t.getEnd } var y = function(t, e) { var i, n, s, r, o, a, h, l = function(t, e, i) { return i }, u = function(t, e, i) { return i }, c = null, d = typeof e; if ("number" == d) l = function() { return e } ; else if ("string" == d) { var f = e[0] , p = parseFloat(e.substr(2)); switch (f) { case "+": l = function(t, e, i) { return i + p } ; break; case "-": l = function(t, e, i) { return i - p } ; break; case "*": l = function(t, e, i) { return i * p } ; break; case "/": l = function(t, e, i) { return i / p } ; break; default: l = function() { return parseFloat(e) } } } else { "function" == d ? l = e : "object" == d && (v(h = e) || m(h) || g(h) ? (g(e) && (c = e.getActive), m(e) && (l = e.getEnd), v(e) && (u = e.getStart)) : e.hasOwnProperty("value") ? a = y(t, e.value) : (i = e.hasOwnProperty("to"), n = e.hasOwnProperty("from"), s = e.hasOwnProperty("start"), i && (n || s) && (a = y(t, e.to), s && (r = y(t, e.start), a.getActive = r.getEnd), n && (o = y(t, e.from), a.getStart = o.getEnd)))) } return a = a || { getActive: c, getEnd: l, getStart: u } }; t.exports = y } , function(t, e) { t.exports = { targets: null, delay: 0, duration: 1e3, ease: "Power0", easeParams: null, hold: 0, repeat: 0, repeatDelay: 0, yoyo: !1, flipX: !1, flipY: !1 } } , function(t, e, i) { var n = i(0) , s = i(10) , u = i(232) , r = i(16) , o = i(5) , c = i(89) , a = i(13) , h = new n({ Extends: s, initialize: function(t, e, i) { s.call(this), this.parent = t, this.parentIsTimeline = t.hasOwnProperty("isTimeline"), this.data = e, this.totalData = e.length, this.targets = i, this.totalTargets = i.length, this.useFrames = !1, this.timeScale = 1, this.loop = 0, this.loopDelay = 0, this.loopCounter = 0, this.startDelay = 0, this.hasStarted = !1, this.isSeeking = !1, this.completeDelay = 0, this.countdown = 0, this.offset = 0, this.calculatedOffset = 0, this.state = c.PENDING_ADD, this._pausedState = c.INIT, this.paused = !1, this.elapsed = 0, this.totalElapsed = 0, this.duration = 0, this.progress = 0, this.totalDuration = 0, this.totalProgress = 0, this.callbacks = { onActive: null, onComplete: null, onLoop: null, onRepeat: null, onStart: null, onStop: null, onUpdate: null, onYoyo: null }, this.callbackScope }, getValue: function(t) { return void 0 === t && (t = 0), this.data[t].current }, setTimeScale: function(t) { return this.timeScale = t, this }, getTimeScale: function() { return this.timeScale }, isPlaying: function() { return this.state === c.ACTIVE }, isPaused: function() { return this.state === c.PAUSED }, hasTarget: function(t) { return -1 !== this.targets.indexOf(t) }, updateTo: function(t, e, i) { void 0 === i && (i = !1); for (var n = 0; n < this.totalData; n++) { var s = this.data[n]; s.key === t && (s.end = e, i && (s.start = s.current)) } return this }, restart: function() { return this.elapsed = 0, this.progress = 0, this.totalElapsed = 0, this.totalProgress = 0, this.state === c.ACTIVE ? this.seek(0) : this.state === c.REMOVED ? (this.seek(0), this.parent.makeActive(this), this) : this.state === c.PENDING_ADD ? this : this.play() }, calcDuration: function() { for (var t = 0, e = a.MAX_SAFE_INTEGER, i = this.data, n = 0; n < this.totalData; n++) { var s = i[n]; s.t1 = s.duration + s.hold, s.yoyo && (s.t1 += s.duration), s.t2 = s.t1 + s.repeatDelay, s.totalDuration = s.delay + s.t1, -1 === s.repeat ? s.totalDuration += 999999999999 * s.t2 : 0 < s.repeat && (s.totalDuration += s.t2 * s.repeat), s.totalDuration > t && (t = s.totalDuration), s.delay < e && (e = s.delay) } this.duration = Math.max(t, .001), this.loopCounter = -1 === this.loop ? 999999999999 : this.loop, 0 < this.loopCounter ? this.totalDuration = this.duration + this.completeDelay + (this.duration + this.loopDelay) * this.loopCounter : this.totalDuration = this.duration + this.completeDelay, this.startDelay = e }, init: function() { if (this.paused && !this.parentIsTimeline) return this.state = c.PENDING_ADD, this._pausedState = c.INIT, !1; for (var t = this.data, e = this.totalTargets, i = 0; i < this.totalData; i++) { var n = t[i] , s = n.target , r = n.gen , o = n.key , a = n.index; n.delay = r.delay(s, o, 0, a, e, this), n.duration = Math.max(r.duration(s, o, 0, a, e, this), .001), n.hold = r.hold(s, o, 0, a, e, this), n.repeat = r.repeat(s, o, 0, a, e, this), n.repeatDelay = r.repeatDelay(s, o, 0, a, e, this) } return this.calcDuration(), this.progress = 0, this.totalProgress = 0, this.elapsed = 0, this.totalElapsed = 0, this.state = c.INIT, !0 }, makeActive: function() { this.parent.makeActive(this), this.dispatchTweenEvent(u.TWEEN_ACTIVE, this.callbacks.onActive) }, nextState: function() { 0 < this.loopCounter ? (this.elapsed = 0, this.progress = 0, this.loopCounter--, this.resetTweenData(!0), 0 < this.loopDelay ? (this.countdown = this.loopDelay, this.state = c.LOOP_DELAY) : (this.state = c.ACTIVE, this.dispatchTweenEvent(u.TWEEN_LOOP, this.callbacks.onLoop))) : 0 < this.completeDelay ? (this.state = c.COMPLETE_DELAY, this.countdown = this.completeDelay) : (this.state = c.PENDING_REMOVE, this.dispatchTweenEvent(u.TWEEN_COMPLETE, this.callbacks.onComplete)) }, pause: function() { return this.state === c.PAUSED || (this.paused = !0, this._pausedState = this.state, this.state = c.PAUSED), this }, play: function(t) { void 0 === t && (t = !1); var e = this.state; return e !== c.INIT || this.parentIsTimeline ? e === c.ACTIVE || e === c.PENDING_ADD && this._pausedState === c.PENDING_ADD || (this.parentIsTimeline || e !== c.PENDING_REMOVE && e !== c.REMOVED ? this.parentIsTimeline ? (this.resetTweenData(t), 0 === this.calculatedOffset ? this.state = c.ACTIVE : (this.countdown = this.calculatedOffset, this.state = c.OFFSET_DELAY)) : (this.paused ? this.paused = !1 : (this.resetTweenData(t), this.state = c.ACTIVE), this.makeActive()) : (this.seek(0), this.parent.makeActive(this))) : (this.resetTweenData(!1), this.state = c.ACTIVE), this }, resetTweenData: function(t) { for (var e = this.data, i = this.totalData, n = this.totalTargets, s = 0; s < i; s++) { var r = e[s] , o = r.target , a = r.key , h = r.index; r.progress = 0, r.elapsed = 0, r.repeatCounter = -1 === r.repeat ? 999999999999 : r.repeat, t ? (r.start = r.getStartValue(o, a, r.start, h, n, this), r.end = r.getEndValue(o, a, r.end, h, n, this), r.current = r.start, r.state = c.PLAYING_FORWARD) : r.state = c.PENDING_RENDER, 0 < r.delay && (r.elapsed = r.delay, r.state = c.DELAY), r.getActiveValue && (o[a] = r.getActiveValue(r.target, r.key, r.start)) } }, resume: function() { return this.state === c.PAUSED ? (this.paused = !1, this.state = this._pausedState) : this.play(), this }, seek: function(t, e) { if (void 0 === e && (e = 16.6), 36e5 <= this.totalDuration) return console.warn("Tween.seek duration too long"), this; this.state === c.REMOVED && this.makeActive(), this.elapsed = 0, this.progress = 0, this.totalElapsed = 0, this.totalProgress = 0; for (var i = this.data, n = this.totalTargets, s = 0; s < this.totalData; s++) { var r = i[s] , o = r.target , a = r.gen , h = r.key , l = r.index; r.progress = 0, r.elapsed = 0, r.repeatCounter = -1 === r.repeat ? 999999999999 : r.repeat, r.delay = a.delay(o, h, 0, l, n, this), r.duration = Math.max(a.duration(o, h, 0, l, n, this), .001), r.hold = a.hold(o, h, 0, l, n, this), r.repeat = a.repeat(o, h, 0, l, n, this), r.repeatDelay = a.repeatDelay(o, h, 0, l, n, this), r.current = r.start, r.state = c.PLAYING_FORWARD, this.updateTweenData(this, r, 0, l, n), 0 < r.delay && (r.elapsed = r.delay, r.state = c.DELAY) } this.calcDuration(); var u = !1; for (this.state === c.PAUSED && (u = !0, this.state = c.ACTIVE), this.isSeeking = !0; this.update(0, e), this.totalProgress < t; ) ; return this.isSeeking = !1, u && (this.state = c.PAUSED), this }, setCallback: function(t, e, i, n) { return this.callbacks[t] = { func: e, scope: n, params: i }, this }, complete: function(t) { return void 0 === t && (t = 0), t ? (this.state = c.COMPLETE_DELAY, this.countdown = t) : (this.state = c.PENDING_REMOVE, this.dispatchTweenEvent(u.TWEEN_COMPLETE, this.callbacks.onComplete)), this }, remove: function() { return this.parent.remove(this), this }, stop: function(t) { return this.state === c.ACTIVE && void 0 !== t && this.seek(t), this.state !== c.REMOVED && (this.state !== c.PAUSED && this.state !== c.PENDING_ADD || (this.parentIsTimeline ? (this.parent.manager._destroy.push(this), this.parent.manager._toProcess++) : (this.parent._destroy.push(this), this.parent._toProcess++)), this.dispatchTweenEvent(u.TWEEN_STOP, this.callbacks.onStop), this.removeAllListeners(), this.state = c.PENDING_REMOVE), this }, update: function(t, e) { if (this.state === c.PAUSED) return !1; switch (this.useFrames && (e = +this.parent.timeScale), e *= this.timeScale, this.elapsed += e, this.progress = Math.min(this.elapsed / this.duration, 1), this.totalElapsed += e, this.totalProgress = Math.min(this.totalElapsed / this.totalDuration, 1), this.state) { case c.ACTIVE: this.hasStarted || this.isSeeking || (this.startDelay -= e, this.startDelay <= 0 && (this.hasStarted = !0, this.dispatchTweenEvent(u.TWEEN_START, this.callbacks.onStart))); for (var i = !1, n = 0; n < this.totalData; n++) { var s = this.data[n]; this.updateTweenData(this, s, e) && (i = !0) } i || this.nextState(); break; case c.LOOP_DELAY: this.countdown -= e, this.countdown <= 0 && (this.state = c.ACTIVE, this.dispatchTweenEvent(u.TWEEN_LOOP, this.callbacks.onLoop)); break; case c.OFFSET_DELAY: this.countdown -= e, this.countdown <= 0 && (this.state = c.ACTIVE); break; case c.COMPLETE_DELAY: this.countdown -= e, this.countdown <= 0 && (this.state = c.PENDING_REMOVE, this.dispatchTweenEvent(u.TWEEN_COMPLETE, this.callbacks.onComplete)) } return this.state === c.PENDING_REMOVE }, dispatchTweenDataEvent: function(t, e, i) { this.isSeeking || (this.emit(t, this, i.key, i.target, i.current, i.previous), e && (e.params[1] = i.target, e.func.apply(e.scope, e.params))) }, dispatchTweenEvent: function(t, e) { this.isSeeking || (this.emit(t, this, this.targets), e && (e.params[1] = this.targets, e.func.apply(e.scope, e.params))) }, setStateFromEnd: function(t, e, i) { return e.yoyo ? (e.elapsed = i, e.progress = i / e.duration, e.flipX && e.target.toggleFlipX(), e.flipY && e.target.toggleFlipY(), this.dispatchTweenDataEvent(u.TWEEN_YOYO, t.callbacks.onYoyo, e), e.start = e.getStartValue(e.target, e.key, e.start, e.index, t.totalTargets, t), c.PLAYING_BACKWARD) : 0 < e.repeatCounter ? (e.repeatCounter--, e.elapsed = i, e.progress = i / e.duration, e.flipX && e.target.toggleFlipX(), e.flipY && e.target.toggleFlipY(), e.start = e.getStartValue(e.target, e.key, e.start, e.index, t.totalTargets, t), e.end = e.getEndValue(e.target, e.key, e.start, e.index, t.totalTargets, t), 0 < e.repeatDelay ? (e.elapsed = e.repeatDelay - i, e.current = e.start, e.target[e.key] = e.current, c.REPEAT_DELAY) : (this.dispatchTweenDataEvent(u.TWEEN_REPEAT, t.callbacks.onRepeat, e), c.PLAYING_FORWARD)) : c.COMPLETE }, setStateFromStart: function(t, e, i) { return 0 < e.repeatCounter ? (e.repeatCounter--, e.elapsed = i, e.progress = i / e.duration, e.flipX && e.target.toggleFlipX(), e.flipY && e.target.toggleFlipY(), e.end = e.getEndValue(e.target, e.key, e.start, e.index, t.totalTargets, t), 0 < e.repeatDelay ? (e.elapsed = e.repeatDelay - i, e.current = e.start, e.target[e.key] = e.current, c.REPEAT_DELAY) : (this.dispatchTweenDataEvent(u.TWEEN_REPEAT, t.callbacks.onRepeat, e), c.PLAYING_FORWARD)) : c.COMPLETE }, updateTweenData: function(t, e, i) { var n = e.target; switch (e.state) { case c.PLAYING_FORWARD: case c.PLAYING_BACKWARD: if (!n) { e.state = c.COMPLETE; break } var s = e.elapsed , r = e.duration , o = 0; r < (s += i) && (o = s - r, s = r); var a, h = e.state === c.PLAYING_FORWARD, l = s / r; e.elapsed = s, e.progress = l, e.previous = e.current, 1 == l ? h ? (e.current = e.end, n[e.key] = e.end, 0 < e.hold ? (e.elapsed = e.hold - o, e.state = c.HOLD_DELAY) : e.state = this.setStateFromEnd(t, e, o)) : (e.current = e.start, n[e.key] = e.start, e.state = this.setStateFromStart(t, e, o)) : (a = h ? e.ease(l) : e.ease(1 - l), e.current = e.start + (e.end - e.start) * a, n[e.key] = e.current), this.dispatchTweenDataEvent(u.TWEEN_UPDATE, t.callbacks.onUpdate, e); break; case c.DELAY: e.elapsed -= i, e.elapsed <= 0 && (e.elapsed = Math.abs(e.elapsed), e.state = c.PENDING_RENDER); break; case c.REPEAT_DELAY: e.elapsed -= i, e.elapsed <= 0 && (e.elapsed = Math.abs(e.elapsed), e.state = c.PLAYING_FORWARD, this.dispatchTweenDataEvent(u.TWEEN_REPEAT, t.callbacks.onRepeat, e)); break; case c.HOLD_DELAY: e.elapsed -= i, e.elapsed <= 0 && (e.state = this.setStateFromEnd(t, e, Math.abs(e.elapsed))); break; case c.PENDING_RENDER: n ? (e.start = e.getStartValue(n, e.key, n[e.key], e.index, t.totalTargets, t), e.end = e.getEndValue(n, e.key, e.start, e.index, t.totalTargets, t), e.current = e.start, n[e.key] = e.start, e.state = c.PLAYING_FORWARD) : e.state = c.COMPLETE } return e.state !== c.COMPLETE } }); h.TYPES = ["onActive", "onComplete", "onLoop", "onRepeat", "onStart", "onStop", "onUpdate", "onYoyo"], o.register("tween", function(t) { return this.scene.sys.tweens.add(t) }), r.register("tween", function(t) { return this.scene.sys.tweens.create(t) }), t.exports = h } , function(t, e, i) { t.exports = { TIMELINE_COMPLETE: i(1358), TIMELINE_LOOP: i(1359), TIMELINE_PAUSE: i(1360), TIMELINE_RESUME: i(1361), TIMELINE_START: i(1362), TIMELINE_UPDATE: i(1363), TWEEN_ACTIVE: i(1364), TWEEN_COMPLETE: i(1365), TWEEN_LOOP: i(1366), TWEEN_REPEAT: i(1367), TWEEN_START: i(1368), TWEEN_STOP: i(1369), TWEEN_UPDATE: i(1370), TWEEN_YOYO: i(1371) } } , function(t, e) { t.exports = function(t, e, i, n, s, r, o, a, h, l, u, c, d, f, p) { return { target: t, index: e, key: i, getActiveValue: r, getEndValue: n, getStartValue: s, ease: o, duration: 0, totalDuration: 0, delay: 0, yoyo: l, hold: 0, repeat: 0, repeatDelay: 0, flipX: f, flipY: p, progress: 0, elapsed: 0, repeatCounter: 0, start: 0, previous: 0, current: 0, end: 0, t1: 0, t2: 0, gen: { delay: a, duration: h, hold: u, repeat: c, repeatDelay: d }, state: 0 } } } , function(t, e) { t.exports = { DEFAULT: 0, LINEAR: 0, NEAREST: 1 } } , function(t, e, i) { var n = i(58); t.exports = function(t) { return n(t, -Math.PI, Math.PI) } } , function(t, e, i) { var n = i(58); t.exports = function(t) { return n(t, -180, 180) } } , function(t, e, i) { var n = i(0) , D = i(66) , s = i(2) , r = i(238) , o = i(340) , a = i(341) , h = i(29) , Y = i(9) , l = i(147) , u = new n({ Extends: l, Mixins: [r], initialize: function(t) { var e = t.renderer.config; l.call(this, { game: t.game, renderer: t.renderer, gl: t.renderer.gl, topology: s(t, "topology", t.renderer.gl.TRIANGLES), vertShader: s(t, "vertShader", a), fragShader: s(t, "fragShader", o), vertexCapacity: s(t, "vertexCapacity", 6 * e.batchSize), vertexSize: s(t, "vertexSize", 5 * Float32Array.BYTES_PER_ELEMENT + 4 * Uint8Array.BYTES_PER_ELEMENT), attributes: [{ name: "inPosition", size: 2, type: t.renderer.gl.FLOAT, normalized: !1, offset: 0 }, { name: "inTexCoord", size: 2, type: t.renderer.gl.FLOAT, normalized: !1, offset: 2 * Float32Array.BYTES_PER_ELEMENT }, { name: "inTintEffect", size: 1, type: t.renderer.gl.FLOAT, normalized: !1, offset: 4 * Float32Array.BYTES_PER_ELEMENT }, { name: "inTint", size: 4, type: t.renderer.gl.UNSIGNED_BYTE, normalized: !0, offset: 5 * Float32Array.BYTES_PER_ELEMENT }] }), this.vertexViewF32 = new Float32Array(this.vertexData), this.vertexViewU32 = new Uint32Array(this.vertexData), this.maxQuads = e.batchSize, this.batches = [], this._tempMatrix1 = new h, this._tempMatrix2 = new h, this._tempMatrix3 = new h, this._tempMatrix4 = new h, this.tempTriangle = [{ x: 0, y: 0, width: 0 }, { x: 0, y: 0, width: 0 }, { x: 0, y: 0, width: 0 }, { x: 0, y: 0, width: 0 }], this.tintEffect = 2, this.strokeTint = { TL: 0, TR: 0, BL: 0, BR: 0 }, this.fillTint = { TL: 0, TR: 0, BL: 0, BR: 0 }, this.currentFrame = { u0: 0, v0: 0, u1: 1, v1: 1 }, this.firstQuad = [0, 0, 0, 0, 0], this.prevQuad = [0, 0, 0, 0, 0], this.polygonCache = [], this.mvpInit() }, onBind: function() { return l.prototype.onBind.call(this), this.mvpUpdate(), this }, resize: function(t, e, i) { return l.prototype.resize.call(this, t, e, i), this.projOrtho(0, this.width, this.height, 0, -1e3, 1e3), this }, setTexture2D: function(t, e) { return void 0 === t && (t = this.renderer.blankTexture.glTexture), void 0 === e && (e = 0), this.requireTextureBatch(t, e) && this.pushBatch(t, e), this }, requireTextureBatch: function(t, e) { var i = this.batches , n = i.length; return !(0 < n) || !((0 < e ? i[n - 1].textures[e - 1] : i[n - 1].texture) === t) }, pushBatch: function(t, e) { var i; 0 === e ? this.batches.push({ first: this.vertexCount, texture: t, textures: [] }) : ((i = [])[e - 1] = t, this.batches.push({ first: this.vertexCount, texture: null, textures: i })) }, flush: function() { if (this.flushLocked) return this; this.flushLocked = !0; var t, e, i, n = this.gl, s = this.vertexCount, r = this.topology, o = this.vertexSize, a = this.renderer, h = this.batches, l = h.length, u = 0, c = null; if (0 === l || 0 === s) return this.flushLocked = !1, this; n.bufferSubData(n.ARRAY_BUFFER, 0, this.bytes.subarray(0, s * o)); for (var d = 0; d < l - 1; d++) { if (c = h[d], t = h[d + 1], 0 < c.textures.length) { for (e = 0; e < c.textures.length; ++e) (i = c.textures[e]) && a.setTexture2D(i, 1 + e, !1); n.activeTexture(n.TEXTURE0) } u = t.first - c.first, null === c.texture || u <= 0 || (a.setTexture2D(c.texture, 0, !1), n.drawArrays(r, c.first, u)) } if (0 < (c = h[l - 1]).textures.length) { for (e = 0; e < c.textures.length; ++e) (i = c.textures[e]) && a.setTexture2D(i, 1 + e, !1); n.activeTexture(n.TEXTURE0) } return u = s - c.first, c.texture && 0 < u && (a.setTexture2D(c.texture, 0, !1), n.drawArrays(r, c.first, u)), this.vertexCount = 0, h.length = 0, this.flushLocked = !1, this }, batchSprite: function(t, e, i) { this.renderer.setPipeline(this); var n, s = this._tempMatrix1, r = this._tempMatrix2, o = this._tempMatrix3, a = t.frame, h = a.glTexture, l = a.u0, u = a.v0, c = a.u1, d = a.v1, f = a.x, p = a.y, g = a.cutWidth, v = a.cutHeight, m = a.customPivot, y = t.displayOriginX, x = t.displayOriginY, T = -y + f, w = -x + p; t.isCropped && ((n = t._crop).flipX === t.flipX && n.flipY === t.flipY || a.updateCropUVs(n, t.flipX, t.flipY), l = n.u0, u = n.v0, c = n.u1, d = n.v1, g = n.width, v = n.height, T = -y + n.x, w = -x + n.y); var b = 1 , E = 1; t.flipX && (m || (T += -a.realWidth + 2 * y), b = -1), (t.flipY || a.source.isGLTexture && !h.flipY) && (m || (w += -a.realHeight + 2 * x), E = -1), r.applyITRS(t.x, t.y, t.rotation, t.scaleX * b, t.scaleY * E), s.copyFrom(e.matrix), i ? (s.multiplyWithOffset(i, -e.scrollX * t.scrollFactorX, -e.scrollY * t.scrollFactorY), r.e = t.x, r.f = t.y) : (r.e -= e.scrollX * t.scrollFactorX, r.f -= e.scrollY * t.scrollFactorY), s.multiply(r, o); var S = T + g , _ = w + v , A = o.getX(T, w) , C = o.getY(T, w) , M = o.getX(T, _) , P = o.getY(T, _) , O = o.getX(S, _) , R = o.getY(S, _) , L = o.getX(S, w) , k = o.getY(S, w) , D = Y.getTintAppendFloatAlpha(t._tintTL, e.alpha * t._alphaTL) , F = Y.getTintAppendFloatAlpha(t._tintTR, e.alpha * t._alphaTR) , I = Y.getTintAppendFloatAlpha(t._tintBL, e.alpha * t._alphaBL) , B = Y.getTintAppendFloatAlpha(t._tintBR, e.alpha * t._alphaBR); e.roundPixels && (A = Math.round(A), C = Math.round(C), M = Math.round(M), P = Math.round(P), O = Math.round(O), R = Math.round(R), L = Math.round(L), k = Math.round(k)), this.setTexture2D(h, 0); var N = t._isTinted && t.tintFill; this.batchQuad(A, C, M, P, O, R, L, k, l, u, c, d, D, F, I, B, N, h, 0) }, batchQuad: function(t, e, i, n, s, r, o, a, h, l, u, c, d, f, p, g, v, m, y) { var x = !1; this.vertexCount + 6 > this.vertexCapacity && (this.flush(), x = !0, this.setTexture2D(m, y)); var T = this.vertexViewF32 , w = this.vertexViewU32 , b = this.vertexCount * this.vertexComponentCount - 1; return T[++b] = t, T[++b] = e, T[++b] = h, T[++b] = l, T[++b] = v, w[++b] = d, T[++b] = i, T[++b] = n, T[++b] = h, T[++b] = c, T[++b] = v, w[++b] = p, T[++b] = s, T[++b] = r, T[++b] = u, T[++b] = c, T[++b] = v, w[++b] = g, T[++b] = t, T[++b] = e, T[++b] = h, T[++b] = l, T[++b] = v, w[++b] = d, T[++b] = s, T[++b] = r, T[++b] = u, T[++b] = c, T[++b] = v, w[++b] = g, T[++b] = o, T[++b] = a, T[++b] = u, T[++b] = l, T[++b] = v, w[++b] = f, this.vertexCount += 6, x }, batchTri: function(t, e, i, n, s, r, o, a, h, l, u, c, d, f, p, g) { var v = !1; this.vertexCount + 3 > this.vertexCapacity && (this.flush(), this.setTexture2D(p, g), v = !0); var m = this.vertexViewF32 , y = this.vertexViewU32 , x = this.vertexCount * this.vertexComponentCount - 1; return m[++x] = t, m[++x] = e, m[++x] = o, m[++x] = a, m[++x] = f, y[++x] = u, m[++x] = i, m[++x] = n, m[++x] = o, m[++x] = l, m[++x] = f, y[++x] = c, m[++x] = s, m[++x] = r, m[++x] = h, m[++x] = l, m[++x] = f, y[++x] = d, this.vertexCount += 3, v }, batchTexture: function(t, e, i, n, s, r, o, a, h, l, u, c, d, f, p, g, v, m, y, x, T, w, b, E, S, _, A, C, M, P, O) { this.renderer.setPipeline(this, t); var R, L, k, D = this._tempMatrix1, F = this._tempMatrix2, I = this._tempMatrix3, B = m / i + A, N = y / n + C, Y = (m + x) / i + A, X = (y + T) / n + C, U = o, z = a, G = -g, W = -v; t.isCropped && (U = (R = t._crop).width, z = R.height, o = R.width, a = R.height, L = m = R.x, k = y = R.y, c && (L = x - R.x - R.width), d && !e.isRenderTexture && (k = T - R.y - R.height), B = L / i + A, N = k / n + C, Y = (L + R.width) / i + A, X = (k + R.height) / n + C, G = -g + m, W = -v + y), c && (U *= -1, G += o), (d ^= !O && e.isRenderTexture ? 1 : 0) && (z *= -1, W += a); var V = G + U , H = W + z; F.applyITRS(s, r, u, h, l), D.copyFrom(M.matrix), P ? (D.multiplyWithOffset(P, -M.scrollX * f, -M.scrollY * p), F.e = s, F.f = r) : (F.e -= M.scrollX * f, F.f -= M.scrollY * p), D.multiply(F, I); var j = I.getX(G, W) , q = I.getY(G, W) , K = I.getX(G, H) , J = I.getY(G, H) , Z = I.getX(V, H) , Q = I.getY(V, H) , $ = I.getX(V, W) , tt = I.getY(V, W); M.roundPixels && (j = Math.round(j), q = Math.round(q), K = Math.round(K), J = Math.round(J), Z = Math.round(Z), Q = Math.round(Q), $ = Math.round($), tt = Math.round(tt)), this.setTexture2D(e, 0), this.batchQuad(j, q, K, J, Z, Q, $, tt, B, N, Y, X, w, b, E, S, _, e, 0) }, batchTextureFrame: function(t, e, i, n, s, r, o) { this.renderer.setPipeline(this); var a = this._tempMatrix1.copyFrom(r) , h = this._tempMatrix2 , l = e + t.width , u = i + t.height; o ? a.multiply(o, h) : h = a; var c = h.getX(e, i) , d = h.getY(e, i) , f = h.getX(e, u) , p = h.getY(e, u) , g = h.getX(l, u) , v = h.getY(l, u) , m = h.getX(l, i) , y = h.getY(l, i); this.setTexture2D(t.glTexture, 0), n = Y.getTintAppendFloatAlpha(n, s), this.batchQuad(c, d, f, p, g, v, m, y, t.u0, t.v0, t.u1, t.v1, n, n, n, n, 0, t.glTexture, 0) }, drawFillRect: function(t, e, i, n, s, r) { var o = t + i , a = e + n; this.setTexture2D(); var h = Y.getTintAppendFloatAlphaAndSwap(s, r); this.batchQuad(t, e, t, a, o, a, o, e, 0, 0, 1, 1, h, h, h, h, 2) }, batchFillRect: function(t, e, i, n, s, r) { this.renderer.setPipeline(this); var o = this._tempMatrix3; r && r.multiply(s, o); var a = t + i , h = e + n , l = o.getX(t, e) , u = o.getY(t, e) , c = o.getX(t, h) , d = o.getY(t, h) , f = o.getX(a, h) , p = o.getY(a, h) , g = o.getX(a, e) , v = o.getY(a, e) , m = this.currentFrame , y = m.u0 , x = m.v0 , T = m.u1 , w = m.v1; this.batchQuad(l, u, c, d, f, p, g, v, y, x, T, w, this.fillTint.TL, this.fillTint.TR, this.fillTint.BL, this.fillTint.BR, this.tintEffect) }, batchFillTriangle: function(t, e, i, n, s, r, o, a) { this.renderer.setPipeline(this); var h = this._tempMatrix3; a && a.multiply(o, h); var l = h.getX(t, e) , u = h.getY(t, e) , c = h.getX(i, n) , d = h.getY(i, n) , f = h.getX(s, r) , p = h.getY(s, r) , g = this.currentFrame , v = g.u0 , m = g.v0 , y = g.u1 , x = g.v1; this.batchTri(l, u, c, d, f, p, v, m, y, x, this.fillTint.TL, this.fillTint.TR, this.fillTint.BL, this.tintEffect) }, batchStrokeTriangle: function(t, e, i, n, s, r, o, a, h) { var l = this.tempTriangle; l[0].x = t, l[0].y = e, l[0].width = o, l[1].x = i, l[1].y = n, l[1].width = o, l[2].x = s, l[2].y = r, l[2].width = o, l[3].x = t, l[3].y = e, l[3].width = o, this.batchStrokePath(l, o, !1, a, h) }, batchFillPath: function(t, e, i) { this.renderer.setPipeline(this); var n = this._tempMatrix3; i && i.multiply(e, n); for (var s, r, o = t.length, a = this.polygonCache, h = this.fillTint.TL, l = this.fillTint.TR, u = this.fillTint.BL, c = this.tintEffect, d = 0; d < o; ++d) r = t[d], a.push(r.x, r.y); o = (s = D(a)).length; for (var f = this.currentFrame, p = 0; p < o; p += 3) { var g = 2 * s[p + 0] , v = 2 * s[p + 1] , m = 2 * s[p + 2] , y = a[0 + g] , x = a[1 + g] , T = a[0 + v] , w = a[1 + v] , b = a[0 + m] , E = a[1 + m] , S = n.getX(y, x) , _ = n.getY(y, x) , A = n.getX(T, w) , C = n.getY(T, w) , M = n.getX(b, E) , P = n.getY(b, E) , O = f.u0 , R = f.v0 , L = f.u1 , k = f.v1; this.batchTri(S, _, A, C, M, P, O, R, L, k, h, l, u, c) } a.length = 0 }, batchStrokePath: function(t, e, i, n, s) { this.renderer.setPipeline(this), this.prevQuad[4] = 0, this.firstQuad[4] = 0; for (var r = t.length - 1, o = 0; o < r; o++) { var a = t[o] , h = t[o + 1]; this.batchLine(a.x, a.y, h.x, h.y, a.width / 2, h.width / 2, e, o, !i && o === r - 1, n, s) } }, batchLine: function(t, e, i, n, s, r, o, a, h, l, u) { this.renderer.setPipeline(this); var c = this._tempMatrix3; u && u.multiply(l, c); var d, f, p = i - t, g = n - e, v = Math.sqrt(p * p + g * g), m = s * (n - e) / v, y = s * (t - i) / v, x = r * (n - e) / v, T = r * (t - i) / v, w = i - x, b = n - T, E = t - m, S = e - y, _ = i + x, A = n + T, C = t + m, M = e + y, P = c.getX(w, b), O = c.getY(w, b), R = c.getX(E, S), L = c.getY(E, S), k = c.getX(_, A), D = c.getY(_, A), F = c.getX(C, M), I = c.getY(C, M), B = this.strokeTint, N = this.tintEffect, Y = B.TL, X = B.TR, U = B.BL, z = B.BR, G = this.currentFrame, W = G.u0, V = G.v0, H = G.u1, j = G.v1; this.batchQuad(F, I, R, L, P, O, k, D, W, V, H, j, Y, X, U, z, N), o <= 2 || (d = this.prevQuad, f = this.firstQuad, 0 < a && d[4] ? this.batchQuad(F, I, R, L, d[0], d[1], d[2], d[3], W, V, H, j, Y, X, U, z, N) : (f[0] = F, f[1] = I, f[2] = R, f[3] = L, f[4] = 1), h && f[4] ? this.batchQuad(P, O, k, D, f[0], f[1], f[2], f[3], W, V, H, j, Y, X, U, z, N) : (d[0] = P, d[1] = O, d[2] = k, d[3] = D, d[4] = 1)) } }); t.exports = u } , function(t, e) { var i = { modelMatrixDirty: !1, viewMatrixDirty: !1, projectionMatrixDirty: !1, modelMatrix: null, viewMatrix: null, projectionMatrix: null, mvpInit: function() { return this.modelMatrixDirty = !0, this.viewMatrixDirty = !0, this.projectionMatrixDirty = !0, this.modelMatrix = new Float32Array([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]), this.viewMatrix = new Float32Array([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]), this.projectionMatrix = new Float32Array([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]), this }, mvpUpdate: function() { var t = this.program; return this.modelMatrixDirty && (this.renderer.setMatrix4(t, "uModelMatrix", !1, this.modelMatrix), this.modelMatrixDirty = !1), this.viewMatrixDirty && (this.renderer.setMatrix4(t, "uViewMatrix", !1, this.viewMatrix), this.viewMatrixDirty = !1), this.projectionMatrixDirty && (this.renderer.setMatrix4(t, "uProjectionMatrix", !1, this.projectionMatrix), this.projectionMatrixDirty = !1), this }, modelIdentity: function() { var t = this.modelMatrix; return t[0] = 1, t[1] = 0, t[2] = 0, t[3] = 0, t[4] = 0, t[5] = 1, t[6] = 0, t[7] = 0, t[8] = 0, t[9] = 0, t[10] = 1, t[11] = 0, t[12] = 0, t[13] = 0, t[14] = 0, t[15] = 1, this.modelMatrixDirty = !0, this }, modelScale: function(t, e, i) { var n = this.modelMatrix; return n[0] = n[0] * t, n[1] = n[1] * t, n[2] = n[2] * t, n[3] = n[3] * t, n[4] = n[4] * e, n[5] = n[5] * e, n[6] = n[6] * e, n[7] = n[7] * e, n[8] = n[8] * i, n[9] = n[9] * i, n[10] = n[10] * i, n[11] = n[11] * i, this.modelMatrixDirty = !0, this }, modelTranslate: function(t, e, i) { var n = this.modelMatrix; return n[12] = n[0] * t + n[4] * e + n[8] * i + n[12], n[13] = n[1] * t + n[5] * e + n[9] * i + n[13], n[14] = n[2] * t + n[6] * e + n[10] * i + n[14], n[15] = n[3] * t + n[7] * e + n[11] * i + n[15], this.modelMatrixDirty = !0, this }, modelRotateX: function(t) { var e = this.modelMatrix , i = Math.sin(t) , n = Math.cos(t) , s = e[4] , r = e[5] , o = e[6] , a = e[7] , h = e[8] , l = e[9] , u = e[10] , c = e[11]; return e[4] = s * n + h * i, e[5] = r * n + l * i, e[6] = o * n + u * i, e[7] = a * n + c * i, e[8] = h * n - s * i, e[9] = l * n - r * i, e[10] = u * n - o * i, e[11] = c * n - a * i, this.modelMatrixDirty = !0, this }, modelRotateY: function(t) { var e = this.modelMatrix , i = Math.sin(t) , n = Math.cos(t) , s = e[0] , r = e[1] , o = e[2] , a = e[3] , h = e[8] , l = e[9] , u = e[10] , c = e[11]; return e[0] = s * n - h * i, e[1] = r * n - l * i, e[2] = o * n - u * i, e[3] = a * n - c * i, e[8] = s * i + h * n, e[9] = r * i + l * n, e[10] = o * i + u * n, e[11] = a * i + c * n, this.modelMatrixDirty = !0, this }, modelRotateZ: function(t) { var e = this.modelMatrix , i = Math.sin(t) , n = Math.cos(t) , s = e[0] , r = e[1] , o = e[2] , a = e[3] , h = e[4] , l = e[5] , u = e[6] , c = e[7]; return e[0] = s * n + h * i, e[1] = r * n + l * i, e[2] = o * n + u * i, e[3] = a * n + c * i, e[4] = h * n - s * i, e[5] = l * n - r * i, e[6] = u * n - o * i, e[7] = c * n - a * i, this.modelMatrixDirty = !0, this }, viewIdentity: function() { var t = this.viewMatrix; return t[0] = 1, t[1] = 0, t[2] = 0, t[3] = 0, t[4] = 0, t[5] = 1, t[6] = 0, t[7] = 0, t[8] = 0, t[9] = 0, t[10] = 1, t[11] = 0, t[12] = 0, t[13] = 0, t[14] = 0, t[15] = 1, this.viewMatrixDirty = !0, this }, viewScale: function(t, e, i) { var n = this.viewMatrix; return n[0] = n[0] * t, n[1] = n[1] * t, n[2] = n[2] * t, n[3] = n[3] * t, n[4] = n[4] * e, n[5] = n[5] * e, n[6] = n[6] * e, n[7] = n[7] * e, n[8] = n[8] * i, n[9] = n[9] * i, n[10] = n[10] * i, n[11] = n[11] * i, this.viewMatrixDirty = !0, this }, viewTranslate: function(t, e, i) { var n = this.viewMatrix; return n[12] = n[0] * t + n[4] * e + n[8] * i + n[12], n[13] = n[1] * t + n[5] * e + n[9] * i + n[13], n[14] = n[2] * t + n[6] * e + n[10] * i + n[14], n[15] = n[3] * t + n[7] * e + n[11] * i + n[15], this.viewMatrixDirty = !0, this }, viewRotateX: function(t) { var e = this.viewMatrix , i = Math.sin(t) , n = Math.cos(t) , s = e[4] , r = e[5] , o = e[6] , a = e[7] , h = e[8] , l = e[9] , u = e[10] , c = e[11]; return e[4] = s * n + h * i, e[5] = r * n + l * i, e[6] = o * n + u * i, e[7] = a * n + c * i, e[8] = h * n - s * i, e[9] = l * n - r * i, e[10] = u * n - o * i, e[11] = c * n - a * i, this.viewMatrixDirty = !0, this }, viewRotateY: function(t) { var e = this.viewMatrix , i = Math.sin(t) , n = Math.cos(t) , s = e[0] , r = e[1] , o = e[2] , a = e[3] , h = e[8] , l = e[9] , u = e[10] , c = e[11]; return e[0] = s * n - h * i, e[1] = r * n - l * i, e[2] = o * n - u * i, e[3] = a * n - c * i, e[8] = s * i + h * n, e[9] = r * i + l * n, e[10] = o * i + u * n, e[11] = a * i + c * n, this.viewMatrixDirty = !0, this }, viewRotateZ: function(t) { var e = this.viewMatrix , i = Math.sin(t) , n = Math.cos(t) , s = e[0] , r = e[1] , o = e[2] , a = e[3] , h = e[4] , l = e[5] , u = e[6] , c = e[7]; return e[0] = s * n + h * i, e[1] = r * n + l * i, e[2] = o * n + u * i, e[3] = a * n + c * i, e[4] = h * n - s * i, e[5] = l * n - r * i, e[6] = u * n - o * i, e[7] = c * n - a * i, this.viewMatrixDirty = !0, this }, viewLoad2D: function(t) { var e = this.viewMatrix; return e[0] = t[0], e[1] = t[1], e[2] = 0, e[3] = 0, e[4] = t[2], e[5] = t[3], e[6] = 0, e[7] = 0, e[8] = t[4], e[9] = t[5], e[10] = 1, e[11] = 0, e[12] = 0, e[13] = 0, e[14] = 0, e[15] = 1, this.viewMatrixDirty = !0, this }, viewLoad: function(t) { var e = this.viewMatrix; return e[0] = t[0], e[1] = t[1], e[2] = t[2], e[3] = t[3], e[4] = t[4], e[5] = t[5], e[6] = t[6], e[7] = t[7], e[8] = t[8], e[9] = t[9], e[10] = t[10], e[11] = t[11], e[12] = t[12], e[13] = t[13], e[14] = t[14], e[15] = t[15], this.viewMatrixDirty = !0, this }, projIdentity: function() { var t = this.projectionMatrix; return t[0] = 1, t[1] = 0, t[2] = 0, t[3] = 0, t[4] = 0, t[5] = 1, t[6] = 0, t[7] = 0, t[8] = 0, t[9] = 0, t[10] = 1, t[11] = 0, t[12] = 0, t[13] = 0, t[14] = 0, t[15] = 1, this.projectionMatrixDirty = !0, this }, projOrtho: function(t, e, i, n, s, r) { var o = this.projectionMatrix , a = 1 / (t - e) , h = 1 / (i - n) , l = 1 / (s - r); return o[0] = -2 * a, o[1] = 0, o[2] = 0, o[3] = 0, o[4] = 0, o[5] = -2 * h, o[6] = 0, o[7] = 0, o[8] = 0, o[9] = 0, o[10] = 2 * l, o[11] = 0, o[12] = (t + e) * a, o[13] = (n + i) * h, o[14] = (r + s) * l, o[15] = 1, this.projectionMatrixDirty = !0, this }, projPersp: function(t, e, i, n) { var s = this.projectionMatrix , r = 1 / Math.tan(t / 2) , o = 1 / (i - n); return s[0] = r / e, s[1] = 0, s[2] = 0, s[3] = 0, s[4] = 0, s[5] = r, s[6] = 0, s[7] = 0, s[8] = 0, s[9] = 0, s[10] = (n + i) * o, s[11] = -1, s[12] = 0, s[13] = 0, s[14] = 2 * n * i * o, s[15] = 0, this.projectionMatrixDirty = !0, this } }; t.exports = i } , function(t, e, i) { var u = {}; t.exports = u; var n = i(240); u._motionWakeThreshold = .18, u._motionSleepThreshold = .08, u._minBias = .9, u.update = function(t, e) { for (var i = e * e * e, n = 0; n < t.length; n++) { var s, r, o = t[n], a = o.speed * o.speed + o.angularSpeed * o.angularSpeed; 0 === o.force.x && 0 === o.force.y ? (s = Math.min(o.motion, a), r = Math.max(o.motion, a), o.motion = u._minBias * s + (1 - u._minBias) * r, 0 < o.sleepThreshold && o.motion < u._motionSleepThreshold * i ? (o.sleepCounter += 1, o.sleepCounter >= o.sleepThreshold && u.set(o, !0)) : 0 < o.sleepCounter && --o.sleepCounter) : u.set(o, !1) } } , u.afterCollisions = function(t, e) { for (var i = e * e * e, n = 0; n < t.length; n++) { var s, r, o, a, h, l = t[n]; l.isActive && (r = (s = l.collision).bodyA.parent, o = s.bodyB.parent, r.isSleeping && o.isSleeping || r.isStatic || o.isStatic || (r.isSleeping || o.isSleeping) && (h = (a = r.isSleeping && !r.isStatic ? r : o) === r ? o : r, !a.isStatic && h.motion > u._motionWakeThreshold * i && u.set(a, !1))) } } , u.set = function(t, e) { var i = t.isSleeping; e ? (t.isSleeping = !0, t.sleepCounter = t.sleepThreshold, t.positionImpulse.x = 0, t.positionImpulse.y = 0, t.positionPrev.x = t.position.x, t.positionPrev.y = t.position.y, t.anglePrev = t.angle, t.speed = 0, t.angularSpeed = 0, t.motion = 0, i || n.trigger(t, "sleepStart")) : (t.isSleeping = !1, t.sleepCounter = 0, i && n.trigger(t, "sleepEnd")) } } , function(t, e, i) { var n = {}; t.exports = n; var u = i(42); n.on = function(t, e, i) { for (var n, s = e.split(" "), r = 0; r < s.length; r++) n = s[r], t.events = t.events || {}, t.events[n] = t.events[n] || [], t.events[n].push(i); return i } , n.off = function(t, e, i) { if (e) { "function" == typeof e && (i = e, e = u.keys(t.events).join(" ")); for (var n = e.split(" "), s = 0; s < n.length; s++) { var r = t.events[n[s]] , o = []; if (i && r) for (var a = 0; a < r.length; a++) r[a] !== i && o.push(r[a]); t.events[n[s]] = o } } else t.events = {} } , n.trigger = function(t, e, i) { var n, s, r, o, a = t.events; if (a && 0 < u.keys(a).length) { i = i || {}, n = e.split(" "); for (var h = 0; h < n.length; h++) if (r = a[s = n[h]]) { (o = u.clone(i, !1)).name = s, o.source = t; for (var l = 0; l < r.length; l++) r[l].apply(t, [o]) } } } } , function(t, e, i) { t.exports = { AlignTo: i(527), Angle: i(528), Call: i(529), GetFirst: i(530), GetLast: i(531), GridAlign: i(532), IncAlpha: i(593), IncX: i(594), IncXY: i(595), IncY: i(596), PlaceOnCircle: i(597), PlaceOnEllipse: i(598), PlaceOnLine: i(599), PlaceOnRectangle: i(600), PlaceOnTriangle: i(601), PlayAnimation: i(602), PropertyValueInc: i(38), PropertyValueSet: i(25), RandomCircle: i(603), RandomEllipse: i(604), RandomLine: i(605), RandomRectangle: i(606), RandomTriangle: i(607), Rotate: i(608), RotateAround: i(609), RotateAroundDistance: i(610), ScaleX: i(611), ScaleXY: i(612), ScaleY: i(613), SetAlpha: i(614), SetBlendMode: i(615), SetDepth: i(616), SetHitArea: i(617), SetOrigin: i(618), SetRotation: i(619), SetScale: i(620), SetScaleX: i(621), SetScaleY: i(622), SetScrollFactor: i(623), SetScrollFactorX: i(624), SetScrollFactorY: i(625), SetTint: i(626), SetVisible: i(627), SetX: i(628), SetXY: i(629), SetY: i(630), ShiftPosition: i(631), Shuffle: i(632), SmootherStep: i(633), SmoothStep: i(634), Spread: i(635), ToggleVisible: i(636), WrapInRectangle: i(637) } } , function(t, e, i) { var n = i(105) , r = []; r[n.BOTTOM_CENTER] = i(243), r[n.BOTTOM_LEFT] = i(244), r[n.BOTTOM_RIGHT] = i(245), r[n.LEFT_BOTTOM] = i(246), r[n.LEFT_CENTER] = i(247), r[n.LEFT_TOP] = i(248), r[n.RIGHT_BOTTOM] = i(249), r[n.RIGHT_CENTER] = i(250), r[n.RIGHT_TOP] = i(251), r[n.TOP_CENTER] = i(252), r[n.TOP_LEFT] = i(253), r[n.TOP_RIGHT] = i(254); t.exports = function(t, e, i, n, s) { return r[i](t, e, n, s) } } , function(t, e, i) { var s = i(34) , r = i(76) , o = i(77) , a = i(43); t.exports = function(t, e, i, n) { return void 0 === i && (i = 0), void 0 === n && (n = 0), o(t, r(e) + i), a(t, s(e) + n), t } } , function(t, e, i) { var s = i(34) , r = i(35) , o = i(44) , a = i(43); t.exports = function(t, e, i, n) { return void 0 === i && (i = 0), void 0 === n && (n = 0), o(t, r(e) - i), a(t, s(e) + n), t } } , function(t, e, i) { var s = i(34) , r = i(36) , o = i(45) , a = i(43); t.exports = function(t, e, i, n) { return void 0 === i && (i = 0), void 0 === n && (n = 0), o(t, r(e) + i), a(t, s(e) + n), t } } , function(t, e, i) { var s = i(34) , r = i(35) , o = i(46) , a = i(45); t.exports = function(t, e, i, n) { return void 0 === i && (i = 0), void 0 === n && (n = 0), a(t, r(e) - i), o(t, s(e) + n), t } } , function(t, e, i) { var s = i(78) , r = i(35) , o = i(79) , a = i(45); t.exports = function(t, e, i, n) { return void 0 === i && (i = 0), void 0 === n && (n = 0), a(t, r(e) - i), o(t, s(e) + n), t } } , function(t, e, i) { var s = i(35) , r = i(37) , o = i(45) , a = i(43); t.exports = function(t, e, i, n) { return void 0 === i && (i = 0), void 0 === n && (n = 0), o(t, s(e) - i), a(t, r(e) - n), t } } , function(t, e, i) { var s = i(34) , r = i(36) , o = i(46) , a = i(44); t.exports = function(t, e, i, n) { return void 0 === i && (i = 0), void 0 === n && (n = 0), a(t, r(e) + i), o(t, s(e) + n), t } } , function(t, e, i) { var s = i(78) , r = i(36) , o = i(79) , a = i(44); t.exports = function(t, e, i, n) { return void 0 === i && (i = 0), void 0 === n && (n = 0), a(t, r(e) + i), o(t, s(e) + n), t } } , function(t, e, i) { var s = i(36) , r = i(37) , o = i(44) , a = i(43); t.exports = function(t, e, i, n) { return void 0 === i && (i = 0), void 0 === n && (n = 0), o(t, s(e) + i), a(t, r(e) - n), t } } , function(t, e, i) { var s = i(76) , r = i(37) , o = i(46) , a = i(77); t.exports = function(t, e, i, n) { return void 0 === i && (i = 0), void 0 === n && (n = 0), a(t, s(e) + i), o(t, r(e) - n), t } } , function(t, e, i) { var s = i(35) , r = i(37) , o = i(46) , a = i(44); t.exports = function(t, e, i, n) { return void 0 === i && (i = 0), void 0 === n && (n = 0), a(t, s(e) - i), o(t, r(e) - n), t } } , function(t, e, i) { var s = i(36) , r = i(37) , o = i(46) , a = i(45); t.exports = function(t, e, i, n) { return void 0 === i && (i = 0), void 0 === n && (n = 0), a(t, s(e) + i), o(t, r(e) - n), t } } , function(t, e, i) { var n = i(105) , r = []; r[n.BOTTOM_CENTER] = i(256), r[n.BOTTOM_LEFT] = i(257), r[n.BOTTOM_RIGHT] = i(258), r[n.CENTER] = i(259), r[n.LEFT_CENTER] = i(261), r[n.RIGHT_CENTER] = i(262), r[n.TOP_CENTER] = i(263), r[n.TOP_LEFT] = i(264), r[n.TOP_RIGHT] = i(265), r[n.LEFT_BOTTOM] = r[n.BOTTOM_LEFT], r[n.LEFT_TOP] = r[n.TOP_LEFT], r[n.RIGHT_BOTTOM] = r[n.BOTTOM_RIGHT], r[n.RIGHT_TOP] = r[n.TOP_RIGHT]; t.exports = function(t, e, i, n, s) { return r[i](t, e, n, s) } } , function(t, e, i) { var s = i(34) , r = i(76) , o = i(46) , a = i(77); t.exports = function(t, e, i, n) { return void 0 === i && (i = 0), void 0 === n && (n = 0), a(t, r(e) + i), o(t, s(e) + n), t } } , function(t, e, i) { var s = i(34) , r = i(35) , o = i(46) , a = i(44); t.exports = function(t, e, i, n) { return void 0 === i && (i = 0), void 0 === n && (n = 0), a(t, r(e) - i), o(t, s(e) + n), t } } , function(t, e, i) { var s = i(34) , r = i(36) , o = i(46) , a = i(45); t.exports = function(t, e, i, n) { return void 0 === i && (i = 0), void 0 === n && (n = 0), a(t, r(e) + i), o(t, s(e) + n), t } } , function(t, e, i) { var s = i(260) , r = i(76) , o = i(78); t.exports = function(t, e, i, n) { return void 0 === i && (i = 0), void 0 === n && (n = 0), s(t, r(e) + i, o(e) + n), t } } , function(t, e, i) { var n = i(77) , s = i(79); t.exports = function(t, e, i) { return n(t, e), s(t, i) } } , function(t, e, i) { var s = i(78) , r = i(35) , o = i(79) , a = i(44); t.exports = function(t, e, i, n) { return void 0 === i && (i = 0), void 0 === n && (n = 0), a(t, r(e) - i), o(t, s(e) + n), t } } , function(t, e, i) { var s = i(78) , r = i(36) , o = i(79) , a = i(45); t.exports = function(t, e, i, n) { return void 0 === i && (i = 0), void 0 === n && (n = 0), a(t, r(e) + i), o(t, s(e) + n), t } } , function(t, e, i) { var s = i(76) , r = i(37) , o = i(77) , a = i(43); t.exports = function(t, e, i, n) { return void 0 === i && (i = 0), void 0 === n && (n = 0), o(t, s(e) + i), a(t, r(e) - n), t } } , function(t, e, i) { var s = i(35) , r = i(37) , o = i(44) , a = i(43); t.exports = function(t, e, i, n) { return void 0 === i && (i = 0), void 0 === n && (n = 0), o(t, s(e) - i), a(t, r(e) - n), t } } , function(t, e, i) { var s = i(36) , r = i(37) , o = i(45) , a = i(43); t.exports = function(t, e, i, n) { return void 0 === i && (i = 0), void 0 === n && (n = 0), o(t, s(e) + i), a(t, r(e) - n), t } } , function(t, e, i) { var s = i(149) , r = i(87) , o = i(13) , a = i(4); t.exports = function(t, e, i) { void 0 === i && (i = new a); var n = r(e, 0, o.PI2); return s(t, n, i) } } , function(t, e, i) { var o = i(268) , a = i(149) , h = i(87) , l = i(13); t.exports = function(t, e, i, n) { void 0 === n && (n = []), !e && 0 < i && (e = o(t) / i); for (var s = 0; s < e; s++) { var r = h(s / e, 0, l.PI2); n.push(a(t, r)) } return n } } , function(t, e) { t.exports = function(t) { return Math.PI * t.radius * 2 } } , function(t, e, i) { var n = i(19) , s = { _alpha: 1, clearAlpha: function() { return this.setAlpha(1) }, setAlpha: function(t) { return void 0 === t && (t = 1), this.alpha = t, this }, alpha: { get: function() { return this._alpha }, set: function(t) { var e = n(t, 0, 1); 0 === (this._alpha = e) ? this.renderFlags &= -3 : this.renderFlags |= 2 } } }; t.exports = s } , function(t, e) { t.exports = function(t, e, i) { if (!e.length) return NaN; if (1 === e.length) return e[0]; var n, s, r = 1; if (i) { if (t < e[0][i]) return e[0]; for (; e[r][i] < t; ) r++ } else for (; e[r] < t; ) r++; return r > e.length && (r = e.length), i ? (n = e[r - 1][i], (s = e[r][i]) - t <= t - n ? e[r] : e[r - 1]) : (n = e[r - 1], (s = e[r]) - t <= t - n ? s : n) } } , function(t, e, i) { var n = new (i(0))({ initialize: function(t, e, i, n) { this.textureKey = t, this.textureFrame = e, this.index = i, this.frame = n, this.isFirst = !1, this.isLast = !1, this.prevFrame = null, this.nextFrame = null, this.duration = 0, this.progress = 0 }, toJSON: function() { return { key: this.textureKey, frame: this.textureFrame, duration: this.duration } }, destroy: function() { this.frame = void 0 } }); t.exports = n } , function(t, e, i) { var n = i(52) , s = { _blendMode: n.NORMAL, blendMode: { get: function() { return this._blendMode }, set: function(t) { "string" == typeof t && (t = n[t]), -1 <= (t |= 0) && (this._blendMode = t) } }, setBlendMode: function(t) { return this.blendMode = t, this } }; t.exports = s } , function(t, e) { var i = { _depth: 0, depth: { get: function() { return this._depth }, set: function(t) { this.scene.sys.queueDepthSort(), this._depth = t } }, setDepth: function(t) { return void 0 === t && (t = 0), this.depth = t, this } }; t.exports = i } , function(t, e, i) { var o = i(152) , a = i(112); t.exports = function(t, e, i, n) { void 0 === n && (n = []), !e && 0 < i && (e = a(t) / i); for (var s = 0; s < e; s++) { var r = s / e; n.push(o(t, r)) } return n } } , function(t, e, i) { var n = i(4); t.exports = function(t, e, i) { return void 0 === i && (i = new n), i.x = t.x1 + (t.x2 - t.x1) * e, i.y = t.y1 + (t.y2 - t.y1) * e, i } } , function(t, e) { t.exports = function(t, e, i, n) { var s = Math.cos(n) , r = Math.sin(n) , o = t.x - e , a = t.y - i; return t.x = o * s - a * r + e, t.y = o * r + a * s + i, t } } , function(t, e, i) { var n = i(278) , s = i(279) , r = { mask: null, setMask: function(t) { return this.mask = t, this }, clearMask: function(t) { return void 0 === t && (t = !1), t && this.mask && this.mask.destroy(), this.mask = null, this }, createBitmapMask: function(t) { return void 0 === t && (this.texture || this.shader) && (t = this), new n(this.scene,t) }, createGeometryMask: function(t) { return void 0 === t && "Graphics" === this.type && (t = this), new s(this.scene,t) } }; t.exports = r } , function(t, e, i) { var n = i(0) , l = i(20) , s = new n({ initialize: function(t, e) { var i, n, s, r, o, a, h = t.sys.game.renderer; this.renderer = h, this.bitmapMask = e, this.maskTexture = null, this.mainTexture = null, this.dirty = !0, this.mainFramebuffer = null, this.maskFramebuffer = null, this.prevFramebuffer = null, this.invertAlpha = !1, this.isStencil = !1, h && h.gl && (i = h.width, n = h.height, s = 0 == (i & i - 1) && 0 == (n & n - 1), r = h.gl, o = s ? r.REPEAT : r.CLAMP_TO_EDGE, a = r.LINEAR, this.mainTexture = h.createTexture2D(0, a, a, o, o, r.RGBA, null, i, n), this.maskTexture = h.createTexture2D(0, a, a, o, o, r.RGBA, null, i, n), this.mainFramebuffer = h.createFramebuffer(i, n, this.mainTexture, !0), this.maskFramebuffer = h.createFramebuffer(i, n, this.maskTexture, !0), t.sys.game.events.on(l.CONTEXT_RESTORED, function(t) { var e = t.width , i = t.height , n = 0 == (e & e - 1) && 0 == (i & i - 1) , s = t.gl , r = n ? s.REPEAT : s.CLAMP_TO_EDGE , o = s.LINEAR; this.mainTexture = t.createTexture2D(0, o, o, r, r, s.RGBA, null, e, i), this.maskTexture = t.createTexture2D(0, o, o, r, r, s.RGBA, null, e, i), this.mainFramebuffer = t.createFramebuffer(e, i, this.mainTexture, !0), this.maskFramebuffer = t.createFramebuffer(e, i, this.maskTexture, !0) }, this)) }, setBitmap: function(t) { this.bitmapMask = t }, preRenderWebGL: function(t, e, i) { t.pipelines.BitmapMaskPipeline.beginMask(this, e, i) }, postRenderWebGL: function(t, e) { t.pipelines.BitmapMaskPipeline.endMask(this, e) }, preRenderCanvas: function() {}, postRenderCanvas: function() {}, destroy: function() { this.bitmapMask = null; var t = this.renderer; t && t.gl && (t.deleteTexture(this.mainTexture), t.deleteTexture(this.maskTexture), t.deleteFramebuffer(this.mainFramebuffer), t.deleteFramebuffer(this.maskFramebuffer)), this.mainTexture = null, this.maskTexture = null, this.mainFramebuffer = null, this.maskFramebuffer = null, this.prevFramebuffer = null, this.renderer = null } }); t.exports = s } , function(t, e, i) { var n = new (i(0))({ initialize: function(t, e) { this.geometryMask = e, this.invertAlpha = !1, this.isStencil = !0, this.level = 0 }, setShape: function(t) { return this.geometryMask = t, this }, setInvertAlpha: function(t) { return void 0 === t && (t = !0), this.invertAlpha = t, this }, preRenderWebGL: function(t, e, i) { var n = t.gl; t.flush(), 0 === t.maskStack.length && (n.enable(n.STENCIL_TEST), n.clear(n.STENCIL_BUFFER_BIT), t.maskCount = 0), t.currentCameraMask.mask !== this && (t.currentMask.mask = this), t.maskStack.push({ mask: this, camera: i }), this.applyStencil(t, i, !0), t.maskCount++ }, applyStencil: function(t, e, i) { var n = t.gl , s = this.geometryMask , r = t.maskCount; n.colorMask(!1, !1, !1, !1), i ? (n.stencilFunc(n.EQUAL, r, 255), n.stencilOp(n.KEEP, n.KEEP, n.INCR)) : (n.stencilFunc(n.EQUAL, r + 1, 255), n.stencilOp(n.KEEP, n.KEEP, n.DECR)), s.renderWebGL(t, s, 0, e), t.flush(), n.colorMask(!0, !0, !0, !0), n.stencilOp(n.KEEP, n.KEEP, n.KEEP), i ? this.invertAlpha ? n.stencilFunc(n.NOTEQUAL, r + 1, 255) : n.stencilFunc(n.EQUAL, r + 1, 255) : this.invertAlpha ? n.stencilFunc(n.NOTEQUAL, r, 255) : n.stencilFunc(n.EQUAL, r, 255) }, postRenderWebGL: function(t) { var e, i = t.gl; t.maskStack.pop(), t.maskCount--, 0 === t.maskStack.length ? (t.flush(), t.currentMask.mask = null, i.disable(i.STENCIL_TEST)) : (t.flush(), (e = t.maskStack[t.maskStack.length - 1]).mask.applyStencil(t, e.camera, !1), t.currentCameraMask.mask !== e.mask ? (t.currentMask.mask = e.mask, t.currentMask.camera = e.camera) : t.currentMask.mask = null) }, preRenderCanvas: function(t, e, i) { var n = this.geometryMask; t.currentContext.save(), n.renderCanvas(t, n, 0, i, null, null, !0), t.currentContext.clip() }, postRenderCanvas: function(t) { t.currentContext.restore() }, destroy: function() { this.geometryMask = null } }); t.exports = n } , function(t, e) { var i = { scrollFactorX: 1, scrollFactorY: 1, setScrollFactor: function(t, e) { return void 0 === e && (e = t), this.scrollFactorX = t, this.scrollFactorY = e, this } }; t.exports = i } , function(t, e) { t.exports = function(t) { var e = { name: t.name, type: t.type, x: t.x, y: t.y, depth: t.depth, scale: { x: t.scaleX, y: t.scaleY }, origin: { x: t.originX, y: t.originY }, flipX: t.flipX, flipY: t.flipY, rotation: t.rotation, alpha: t.alpha, visible: t.visible, blendMode: t.blendMode, textureKey: "", frameKey: "", data: {} }; return t.texture && (e.textureKey = t.texture.key, e.frameKey = t.frame.name), e } } , function(t, e, i) { var n = i(13) , s = i(29) , r = i(235) , o = i(236) , a = { _scaleX: 1, _scaleY: 1, _rotation: 0, x: 0, y: 0, z: 0, w: 0, scale: { get: function() { return (this._scaleX + this._scaleY) / 2 }, set: function(t) { this._scaleX = t, 0 === (this._scaleY = t) ? this.renderFlags &= -5 : this.renderFlags |= 4 } }, scaleX: { get: function() { return this._scaleX }, set: function(t) { 0 === (this._scaleX = t) ? this.renderFlags &= -5 : this.renderFlags |= 4 } }, scaleY: { get: function() { return this._scaleY }, set: function(t) { 0 === (this._scaleY = t) ? this.renderFlags &= -5 : this.renderFlags |= 4 } }, angle: { get: function() { return o(this._rotation * n.RAD_TO_DEG) }, set: function(t) { this.rotation = o(t) * n.DEG_TO_RAD } }, rotation: { get: function() { return this._rotation }, set: function(t) { this._rotation = r(t) } }, setPosition: function(t, e, i, n) { return void 0 === t && (t = 0), void 0 === e && (e = t), void 0 === i && (i = 0), void 0 === n && (n = 0), this.x = t, this.y = e, this.z = i, this.w = n, this }, setRandomPosition: function(t, e, i, n) { return void 0 === t && (t = 0), void 0 === e && (e = 0), void 0 === i && (i = this.scene.sys.scale.width), void 0 === n && (n = this.scene.sys.scale.height), this.x = t + Math.random() * i, this.y = e + Math.random() * n, this }, setRotation: function(t) { return void 0 === t && (t = 0), this.rotation = t, this }, setAngle: function(t) { return void 0 === t && (t = 0), this.angle = t, this }, setScale: function(t, e) { return void 0 === t && (t = 1), void 0 === e && (e = t), this.scaleX = t, this.scaleY = e, this }, setX: function(t) { return void 0 === t && (t = 0), this.x = t, this }, setY: function(t) { return void 0 === t && (t = 0), this.y = t, this }, setZ: function(t) { return void 0 === t && (t = 0), this.z = t, this }, setW: function(t) { return void 0 === t && (t = 0), this.w = t, this }, getLocalTransformMatrix: function(t) { return void 0 === t && (t = new s), t.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY) }, getWorldTransformMatrix: function(t, e) { void 0 === t && (t = new s), void 0 === e && (e = new s); var i = this.parentContainer; if (!i) return this.getLocalTransformMatrix(t); for (t.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY); i; ) e.applyITRS(i.x, i.y, i._rotation, i._scaleX, i._scaleY), e.multiply(t, t), i = i.parentContainer; return t }, getParentRotation: function() { for (var t = 0, e = this.parentContainer; e; ) t += e.rotation, e = e.parentContainer; return t } }; t.exports = a } , function(t, e) { var i = { _visible: !0, visible: { get: function() { return this._visible }, set: function(t) { t ? (this._visible = !0, this.renderFlags |= 1) : (this._visible = !1, this.renderFlags &= -2) } }, setVisible: function(t) { return this.visible = t, this } }; t.exports = i } , function(t, e, i) { t.exports = { CHANGE_DATA: i(578), CHANGE_DATA_KEY: i(579), REMOVE_DATA: i(580), SET_DATA: i(581) } } , function(t, e, i) { var h = i(112) , l = i(4); t.exports = function(t, e, i, n) { if (void 0 === n && (n = []), !e && !i) return n; e ? i = Math.round(h(t) / e) : e = h(t) / i; for (var s = t.x, r = t.y, o = 0, a = 0; a < i; a++) switch (n.push(new l(s,r)), o) { case 0: (s += e) >= t.right && (o = 1, r += s - t.right, s = t.right); break; case 1: (r += e) >= t.bottom && (o = 2, s -= r - t.bottom, r = t.bottom); break; case 2: (s -= e) <= t.left && (o = 3, r -= t.left - s, s = t.left); break; case 3: (r -= e) <= t.top && (o = 0, r = t.top) } return n } } , function(t, e) { t.exports = function(t, e) { void 0 === e && (e = 1); for (var i = null, n = 0; n < e; n++) i = t.shift(), t.push(i); return i } } , function(t, e) { t.exports = function(t, e) { void 0 === e && (e = 1); for (var i = null, n = 0; n < e; n++) i = t.pop(), t.unshift(i); return i } } , function(t, e) { t.exports = function(t, e, i) { void 0 === e && (e = 1), void 0 === i && (i = []); var n = Math.round(t.x1) , s = Math.round(t.y1) , r = Math.round(t.x2) , o = Math.round(t.y2) , a = Math.abs(r - n) , h = Math.abs(o - s) , l = n < r ? 1 : -1 , u = s < o ? 1 : -1 , c = a - h; i.push({ x: n, y: s }); for (var d = 1; n !== r || s !== o; ) { var f = c << 1; -h < f && (c -= h, n += l), f < a && (c += a, s += u), d % e == 0 && i.push({ x: n, y: s }), d++ } return i } } , function(t, e, i) { var n = i(151) , s = i(0) , r = i(162) , o = i(10) , a = i(111) , h = i(20) , f = i(6) , p = i(163) , l = new s({ Extends: o, initialize: function(t) { o.call(this), this.game = t, this.textureManager = null, this.globalTimeScale = 1, this.anims = new r, this.paused = !1, this.name = "AnimationManager", t.events.once(h.BOOT, this.boot, this) }, boot: function() { this.textureManager = this.game.textures, this.game.events.once(h.DESTROY, this.destroy, this) }, add: function(t, e) { return this.anims.has(t) ? console.warn("Animation key exists: " + t) : (e.key = t, this.anims.set(t, e), this.emit(a.ADD_ANIMATION, t, e)), this }, exists: function(t) { return this.anims.has(t) }, create: function(t) { var e = t.key , i = !1; return e && ((i = this.get(e)) || (i = new n(this,e,t), this.anims.set(e, i), this.emit(a.ADD_ANIMATION, e, i))), i }, fromJSON: function(t, e) { void 0 === e && (e = !1), e && this.anims.clear(), "string" == typeof t && (t = JSON.parse(t)); var i = []; if (t.hasOwnProperty("anims") && Array.isArray(t.anims)) { for (var n = 0; n < t.anims.length; n++) i.push(this.create(t.anims[n])); t.hasOwnProperty("globalTimeScale") && (this.globalTimeScale = t.globalTimeScale) } else t.hasOwnProperty("key") && "frame" === t.type && i.push(this.create(t)); return i }, generateFrameNames: function(t, e) { var i = f(e, "prefix", "") , n = f(e, "start", 0) , s = f(e, "end", 0) , r = f(e, "suffix", "") , o = f(e, "zeroPad", 0) , a = f(e, "outputArray", []) , h = f(e, "frames", !1) , l = this.textureManager.get(t); if (!l) return a; var u, c, d = n < s ? 1 : -1; if (s += d, e) if (Array.isArray(h)) for (u = 0; u < h.length; u++) c = i + p(h[u], o, "0", 1) + r, l.has(c) && a.push({ key: t, frame: c }); else for (u = n; u !== s; u += d) c = i + p(u, o, "0", 1) + r, l.has(c) && a.push({ key: t, frame: c }); else for (h = l.getFrameNames(), u = 0; u < h.length; u++) a.push({ key: t, frame: h[u] }); return a }, generateFrameNumbers: function(t, e) { var i, n = f(e, "start", 0), s = f(e, "end", -1), r = f(e, "first", !1), o = f(e, "outputArray", []), a = f(e, "frames", !1), h = this.textureManager.get(t); if (!h) return o; if (r && h.has(r) && o.push({ key: t, frame: r }), Array.isArray(a)) for (i = 0; i < a.length; i++) h.has(a[i]) && o.push({ key: t, frame: a[i] }); else { -1 === s && (s = h.frameTotal); var l = n < s ? 1 : -1; for (s += l, i = n; i !== s; i += l) h.has(i) && o.push({ key: t, frame: i }) } return o }, get: function(t) { return this.anims.get(t) }, load: function(t, e, i) { var n = this.get(e); return n ? n.load(t, i) : console.warn("Missing animation: " + e), t }, pauseAll: function() { return this.paused || (this.paused = !0, this.emit(a.PAUSE_ALL)), this }, play: function(t, e) { if (Array.isArray(e) || (e = [e]), !this.get(t)) return this; for (var i = 0; i < e.length; i++) e[i].anims.play(t); return this }, remove: function(t) { var e = this.get(t); return e && (this.emit(a.REMOVE_ANIMATION, t, e), this.anims.delete(t)), e }, resumeAll: function() { return this.paused && (this.paused = !1, this.emit(a.RESUME_ALL)), this }, staggerPlay: function(t, e, i) { if (void 0 === i && (i = 0), Array.isArray(e) || (e = [e]), !this.get(t)) return this; for (var n = 0; n < e.length; n++) e[n].anims.delayedPlay(i * n, t); return this }, toJSON: function(t) { var i = { anims: [], globalTimeScale: this.globalTimeScale }; return void 0 !== t && "" !== t ? i.anims.push(this.anims.get(t).toJSON()) : this.anims.each(function(t, e) { i.anims.push(e.toJSON()) }), i }, destroy: function() { this.anims.clear(), this.textureManager = null, this.game = null } }); t.exports = l } , function(t, e, i) { var n = i(0) , s = i(162) , r = i(10) , o = i(291) , a = new n({ initialize: function() { this.entries = new s, this.events = new r }, add: function(t, e) { return this.entries.set(t, e), this.events.emit(o.ADD, this, t, e), this }, has: function(t) { return this.entries.has(t) }, exists: function(t) { return this.entries.has(t) }, get: function(t) { return this.entries.get(t) }, remove: function(t) { var e = this.get(t); return e && (this.entries.delete(t), this.events.emit(o.REMOVE, this, t, e.data)), this }, getKeys: function() { return this.entries.keys() }, destroy: function() { this.entries.clear(), this.events.removeAllListeners(), this.entries = null, this.events = null } }); t.exports = a } , function(t, e, i) { t.exports = { ADD: i(640), REMOVE: i(641) } } , function(t, e, i) { var n = i(290) , s = i(0) , r = i(20) , o = new s({ initialize: function(t) { this.game = t, this.binary = new n, this.bitmapFont = new n, this.json = new n, this.physics = new n, this.shader = new n, this.audio = new n, this.video = new n, this.text = new n, this.html = new n, this.obj = new n, this.tilemap = new n, this.xml = new n, this.custom = {}, this.game.events.once(r.DESTROY, this.destroy, this) }, addCustom: function(t) { return this.custom.hasOwnProperty(t) || (this.custom[t] = new n), this.custom[t] }, destroy: function() { for (var t = ["binary", "bitmapFont", "json", "physics", "shader", "audio", "video", "text", "html", "obj", "tilemap", "xml"], e = 0; e < t.length; e++) this[t[e]].destroy(), this[t[e]] = null; for (var i in this.custom) this.custom[i].destroy(); this.custom = null, this.game = null } }); t.exports = o } , function(t, e, i) { var s = i(91) , n = i(26) , x = i(168) , u = i(19) , r = i(0) , o = i(12) , a = i(301) , T = i(116) , h = i(11) , l = i(3) , c = new r({ Extends: s, Mixins: [o.Flip, o.Tint], initialize: function(t, e, i, n) { s.call(this, t, e, i, n), this.inputEnabled = !0, this.fadeEffect = new a.Fade(this), this.flashEffect = new a.Flash(this), this.shakeEffect = new a.Shake(this), this.panEffect = new a.Pan(this), this.rotateToEffect = new a.RotateTo(this), this.zoomEffect = new a.Zoom(this), this.lerp = new l(1,1), this.followOffset = new l, this.deadzone = null, this._follow = null, this.renderToTexture = !1, this.renderToGame = !0, this.canvas = null, this.context = null, this.glTexture = null, this.framebuffer = null, this.pipeline = null }, setRenderToTexture: function(t, e) { void 0 === e && (e = !0); var i = this.scene.sys.game.renderer; return i.gl ? (this.glTexture = i.createTextureFromSource(null, this.width, this.height, 0), this.framebuffer = i.createFramebuffer(this.width, this.height, this.glTexture, !1)) : (this.canvas = n.create2D(this, this.width, this.height), this.context = this.canvas.getContext("2d")), this.renderToTexture = !0, this.renderToGame = e, t && this.setPipeline(t), this }, setPipeline: function(t) { var e; return "string" == typeof t ? (e = this.scene.sys.game.renderer).gl && e.hasPipeline(t) && (this.pipeline = e.getPipeline(t)) : this.pipeline = t, this }, clearRenderToTexture: function() { if (this.scene) { var t = this.scene.sys.game.renderer; if (t) return t.gl ? (this.framebuffer && t.deleteFramebuffer(this.framebuffer), this.glTexture && t.deleteTexture(this.glTexture), this.framebuffer = null, this.glTexture = null, this.pipeline = null) : (n.remove(this), this.canvas = null, this.context = null), this.renderToTexture = !1, this } }, setDeadzone: function(t, e) { var i, n, s, r; return void 0 === t ? this.deadzone = null : (this.deadzone ? (this.deadzone.width = t, this.deadzone.height = e) : this.deadzone = new h(0,0,t,e), this._follow && (i = this.width / 2, n = this.height / 2, s = this._follow.x - this.followOffset.x, r = this._follow.y - this.followOffset.y, this.midPoint.set(s, r), this.scrollX = s - i, this.scrollY = r - n), x(this.deadzone, this.midPoint.x, this.midPoint.y)), this }, fadeIn: function(t, e, i, n, s, r) { return this.fadeEffect.start(!1, t, e, i, n, !0, s, r) }, fadeOut: function(t, e, i, n, s, r) { return this.fadeEffect.start(!0, t, e, i, n, !0, s, r) }, fadeFrom: function(t, e, i, n, s, r, o) { return this.fadeEffect.start(!1, t, e, i, n, s, r, o) }, fade: function(t, e, i, n, s, r, o) { return this.fadeEffect.start(!0, t, e, i, n, s, r, o) }, flash: function(t, e, i, n, s, r, o) { return this.flashEffect.start(t, e, i, n, s, r, o) }, shake: function(t, e, i, n, s) { return this.shakeEffect.start(t, e, i, n, s) }, pan: function(t, e, i, n, s, r, o) { return this.panEffect.start(t, e, i, n, s, r, o) }, rotateTo: function(t, e, i, n, s, r, o) { return this.rotateToEffect.start(t, e, i, n, s, r, o) }, zoomTo: function(t, e, i, n, s, r) { return this.zoomEffect.start(t, e, i, n, s, r) }, preRender: function(t) { var e, i, n = this.width, s = this.height, r = .5 * n, o = .5 * s, a = this.zoom * t, h = this.matrix, l = n * this.originX, u = s * this.originY, c = this._follow, d = this.deadzone, f = this.scrollX, p = this.scrollY; d && x(d, this.midPoint.x, this.midPoint.y), c && !this.panEffect.isRunning && (e = c.x - this.followOffset.x, i = c.y - this.followOffset.y, d ? (e < d.x ? f = T(f, f - (d.x - e), this.lerp.x) : e > d.right && (f = T(f, f + (e - d.right), this.lerp.x)), i < d.y ? p = T(p, p - (d.y - i), this.lerp.y) : i > d.bottom && (p = T(p, p + (i - d.bottom), this.lerp.y))) : (f = T(f, e - l, this.lerp.x), p = T(p, i - u, this.lerp.y))), this.useBounds && (f = this.clampX(f), p = this.clampY(p)), this.roundPixels && (l = Math.round(l), u = Math.round(u)); var g = (this.scrollX = f) + r , v = (this.scrollY = p) + o; this.midPoint.set(g, v); var m = n / a , y = s / a; this.worldView.setTo(g - m / 2, v - y / 2, m, y), h.applyITRS(this.x + l, this.y + u, this.rotation, a, a), h.translate(-l, -u), this.shakeEffect.preRender() }, setLerp: function(t, e) { return void 0 === t && (t = 1), void 0 === e && (e = t), this.lerp.set(t, e), this }, setFollowOffset: function(t, e) { return void 0 === t && (t = 0), void 0 === e && (e = 0), this.followOffset.set(t, e), this }, startFollow: function(t, e, i, n, s, r) { void 0 === e && (e = !1), void 0 === i && (i = 1), void 0 === n && (n = i), void 0 === s && (s = 0), void 0 === r && (r = s), this._follow = t, this.roundPixels = e, i = u(i, 0, 1), n = u(n, 0, 1), this.lerp.set(i, n), this.followOffset.set(s, r); var o = this.width / 2 , a = this.height / 2 , h = t.x - s , l = t.y - r; return this.midPoint.set(h, l), this.scrollX = h - o, this.scrollY = l - a, this.useBounds && (this.scrollX = this.clampX(this.scrollX), this.scrollY = this.clampY(this.scrollY)), this }, stopFollow: function() { return this._follow = null, this }, resetFX: function() { return this.rotateToEffect.reset(), this.panEffect.reset(), this.shakeEffect.reset(), this.flashEffect.reset(), this.fadeEffect.reset(), this }, update: function(t, e) { this.visible && (this.rotateToEffect.update(t, e), this.panEffect.update(t, e), this.zoomEffect.update(t, e), this.shakeEffect.update(t, e), this.flashEffect.update(t, e), this.fadeEffect.update(t, e)) }, destroy: function() { this.clearRenderToTexture(), this.resetFX(), s.prototype.destroy.call(this), this._follow = null, this.deadzone = null } }); t.exports = c } , function(t, e, i) { var o = i(31); t.exports = function(t) { var e = new o; t = t.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i, function(t, e, i, n) { return e + e + i + i + n + n }); var i, n, s, r = /^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t); return r && (i = parseInt(r[1], 16), n = parseInt(r[2], 16), s = parseInt(r[3], 16), e.setTo(i, n, s)), e } } , function(t, e) { t.exports = function(t, e, i, n) { return n << 24 | t << 16 | e << 8 | i } } , function(t, e) { t.exports = function(t, e, i, n) { void 0 === n && (n = { h: 0, s: 0, v: 0 }), t /= 255, e /= 255, i /= 255; var s = Math.min(t, e, i) , r = Math.max(t, e, i) , o = r - s , a = 0 , h = 0 === r ? 0 : o / r , l = r; return r !== s && (r === t ? a = (e - i) / o + (e < i ? 6 : 0) : r === e ? a = (i - t) / o + 2 : r === i && (a = (t - e) / o + 4), a /= 6), n.hasOwnProperty("_h") ? (n._h = a, n._s = h, n._v = l) : (n.h = a, n.s = h, n.v = l), n } } , function(t, e, i) { var n = i(31) , s = i(298); t.exports = function(t) { var e = s(t); return new n(e.r,e.g,e.b,e.a) } } , function(t, e) { t.exports = function(t) { return 16777215 < t ? { a: t >>> 24, r: t >> 16 & 255, g: t >> 8 & 255, b: 255 & t } : { a: 255, r: t >> 16 & 255, g: t >> 8 & 255, b: 255 & t } } } , function(t, e, i) { var n = i(31); t.exports = function(t) { return new n(t.r,t.g,t.b,t.a) } } , function(t, e, i) { var a = i(31); t.exports = function(t) { var e, i, n, s, r = new a, o = /^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase()); return o && (e = parseInt(o[1], 10), i = parseInt(o[2], 10), n = parseInt(o[3], 10), s = void 0 !== o[4] ? parseFloat(o[4]) : 1, r.setTo(e, i, n, 255 * s)), r } } , function(t, e, i) { t.exports = { Fade: i(664), Flash: i(665), Pan: i(666), Shake: i(699), RotateTo: i(700), Zoom: i(701) } } , function(t, e, i) { t.exports = { In: i(667), Out: i(668), InOut: i(669) } } , function(t, e, i) { t.exports = { In: i(670), Out: i(671), InOut: i(672) } } , function(t, e, i) { t.exports = { In: i(673), Out: i(674), InOut: i(675) } } , function(t, e, i) { t.exports = { In: i(676), Out: i(677), InOut: i(678) } } , function(t, e, i) { t.exports = { In: i(679), Out: i(680), InOut: i(681) } } , function(t, e, i) { t.exports = { In: i(682), Out: i(683), InOut: i(684) } } , function(t, e, i) { t.exports = i(685) } , function(t, e, i) { t.exports = { In: i(686), Out: i(687), InOut: i(688) } } , function(t, e, i) { t.exports = { In: i(689), Out: i(690), InOut: i(691) } } , function(t, e, i) { t.exports = { In: i(692), Out: i(693), InOut: i(694) } } , function(t, e, i) { t.exports = { In: i(695), Out: i(696), InOut: i(697) } } , function(t, e, i) { t.exports = i(698) } , function(t, e, i) { var n = i(0) , a = i(33) , h = i(315) , l = i(2) , u = i(6) , c = i(7) , d = i(170) , f = i(1) , p = i(175) , g = i(164) , s = new n({ initialize: function(t) { void 0 === t && (t = {}); this.width = u(t, "width", 1024), this.height = u(t, "height", 768), this.zoom = u(t, "zoom", 1), this.resolution = u(t, "resolution", 1), this.parent = u(t, "parent", void 0), this.scaleMode = u(t, "scaleMode", 0), this.expandParent = u(t, "expandParent", !0), this.autoRound = u(t, "autoRound", !1), this.autoCenter = u(t, "autoCenter", 0), this.resizeInterval = u(t, "resizeInterval", 500), this.fullscreenTarget = u(t, "fullscreenTarget", null), this.minWidth = u(t, "minWidth", 0), this.maxWidth = u(t, "maxWidth", 0), this.minHeight = u(t, "minHeight", 0), this.maxHeight = u(t, "maxHeight", 0); var e = u(t, "scale", null); e && (this.width = u(e, "width", this.width), this.height = u(e, "height", this.height), this.zoom = u(e, "zoom", this.zoom), this.resolution = u(e, "resolution", this.resolution), this.parent = u(e, "parent", this.parent), this.scaleMode = u(e, "mode", this.scaleMode), this.expandParent = u(e, "expandParent", this.expandParent), this.autoRound = u(e, "autoRound", this.autoRound), this.autoCenter = u(e, "autoCenter", this.autoCenter), this.resizeInterval = u(e, "resizeInterval", this.resizeInterval), this.fullscreenTarget = u(e, "fullscreenTarget", this.fullscreenTarget), this.minWidth = u(e, "min.width", this.minWidth), this.maxWidth = u(e, "max.width", this.maxWidth), this.minHeight = u(e, "min.height", this.minHeight), this.maxHeight = u(e, "max.height", this.maxHeight)), this.renderType = u(t, "type", a.AUTO), this.canvas = u(t, "canvas", null), this.context = u(t, "context", null), this.canvasStyle = u(t, "canvasStyle", null), this.customEnvironment = u(t, "customEnvironment", !1), this.sceneConfig = u(t, "scene", null), this.seed = u(t, "seed", [(Date.now() * Math.random()).toString()]), d.RND = new d.RandomDataGenerator(this.seed), this.gameTitle = u(t, "title", ""), this.gameURL = u(t, "url", "https://phaser.io"), this.gameVersion = u(t, "version", ""), this.autoFocus = u(t, "autoFocus", !0), this.domCreateContainer = u(t, "dom.createContainer", !1), this.domBehindCanvas = u(t, "dom.behindCanvas", !1), this.inputKeyboard = u(t, "input.keyboard", !0), this.inputKeyboardEventTarget = u(t, "input.keyboard.target", window), this.inputKeyboardCapture = u(t, "input.keyboard.capture", []), this.inputMouse = u(t, "input.mouse", !0), this.inputMouseEventTarget = u(t, "input.mouse.target", null), this.inputMouseCapture = u(t, "input.mouse.capture", !0), this.inputTouch = u(t, "input.touch", h.input.touch), this.inputTouchEventTarget = u(t, "input.touch.target", null), this.inputTouchCapture = u(t, "input.touch.capture", !0), this.inputActivePointers = u(t, "input.activePointers", 1), this.inputSmoothFactor = u(t, "input.smoothFactor", 0), this.inputWindowEvents = u(t, "input.windowEvents", !0), this.inputGamepad = u(t, "input.gamepad", !1), this.inputGamepadEventTarget = u(t, "input.gamepad.target", window), this.disableContextMenu = u(t, "disableContextMenu", !1), this.audio = u(t, "audio"), this.hideBanner = !1 === u(t, "banner", null), this.hidePhaser = u(t, "banner.hidePhaser", !1), this.bannerTextColor = u(t, "banner.text", "#ffffff"), this.bannerBackgroundColor = u(t, "banner.background", ["#ff0000", "#ffff00", "#00ff00", "#00ffff", "#000000"]), "" === this.gameTitle && this.hidePhaser && (this.hideBanner = !0), this.fps = u(t, "fps", null); var i = u(t, "render", t); this.antialias = u(i, "antialias", !0), this.antialiasGL = u(i, "antialiasGL", !0), this.mipmapFilter = u(i, "mipmapFilter", "LINEAR"), this.desynchronized = u(i, "desynchronized", !1), this.roundPixels = u(i, "roundPixels", !1), this.pixelArt = u(i, "pixelArt", 1 !== this.zoom), this.pixelArt && (this.antialias = !1, this.roundPixels = !0), this.transparent = u(i, "transparent", !1), this.clearBeforeRender = u(i, "clearBeforeRender", !0), this.premultipliedAlpha = u(i, "premultipliedAlpha", !0), this.failIfMajorPerformanceCaveat = u(i, "failIfMajorPerformanceCaveat", !1), this.powerPreference = u(i, "powerPreference", "default"), this.batchSize = u(i, "batchSize", 2e3), this.maxLights = u(i, "maxLights", 10); var n = u(t, "backgroundColor", 0); this.backgroundColor = g(n), 0 === n && this.transparent && (this.backgroundColor.alpha = 0), this.preBoot = u(t, "callbacks.preBoot", f), this.postBoot = u(t, "callbacks.postBoot", f), this.physics = u(t, "physics", {}), this.defaultPhysicsSystem = u(this.physics, "default", !1), this.loaderBaseURL = u(t, "loader.baseURL", ""), this.loaderPath = u(t, "loader.path", ""), this.loaderMaxParallelDownloads = u(t, "loader.maxParallelDownloads", 32), this.loaderCrossOrigin = u(t, "loader.crossOrigin", void 0), this.loaderResponseType = u(t, "loader.responseType", ""), this.loaderAsync = u(t, "loader.async", !0), this.loaderUser = u(t, "loader.user", ""), this.loaderPassword = u(t, "loader.password", ""), this.loaderTimeout = u(t, "loader.timeout", 0), this.loaderWithCredentials = u(t, "loader.withCredentials", !1), this.installGlobalPlugins = [], this.installScenePlugins = []; var s = u(t, "plugins", null) , r = p.DefaultScene; s && (Array.isArray(s) ? this.defaultPlugins = s : c(s) && (this.installGlobalPlugins = l(s, "global", []), this.installScenePlugins = l(s, "scene", []), Array.isArray(s.default) ? r = s.default : Array.isArray(s.defaultMerge) && (r = r.concat(s.defaultMerge)))), this.defaultPlugins = r; var o = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg"; this.defaultImage = u(t, "images.default", o + "AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="), this.missingImage = u(t, "images.missing", o + "CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="), window && (window.FORCE_WEBGL ? this.renderType = a.WEBGL : window.FORCE_CANVAS && (this.renderType = a.CANVAS)) } }); t.exports = s } , function(t, e, i) { t.exports = { os: i(117), browser: i(118), features: i(169), input: i(730), audio: i(731), video: i(732), fullscreen: i(733), canvasFeatures: i(316) } } , function(t, e, i) { var n, s, r, o = i(26), a = { supportInverseAlpha: !1, supportNewBlendModes: !1 }; t.exports = (void 0 !== document && (a.supportNewBlendModes = (n = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/", s = "AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==", (r = new Image).onload = function() { var i = new Image; i.onload = function() { var t = o.create(i, 6, 1).getContext("2d"); if (t.globalCompositeOperation = "multiply", t.drawImage(r, 0, 0), t.drawImage(i, 2, 0), !t.getImageData(2, 0, 1, 1)) return !1; var e = t.getImageData(2, 0, 1, 1).data; o.remove(i), a.supportNewBlendModes = 255 === e[0] && 0 === e[1] && 0 === e[2] } , i.src = n + "/wCKxvRF" + s } , r.src = n + "AP804Oa6" + s, !1), a.supportInverseAlpha = function() { var t = o.create(this, 2, 1).getContext("2d"); t.fillStyle = "rgba(10, 20, 30, 0.5)", t.fillRect(0, 0, 1, 1); var e = t.getImageData(0, 0, 1, 1); if (null === e) return !1; t.putImageData(e, 1, 0); var i = t.getImageData(1, 0, 1, 1); return i.data[0] === e.data[0] && i.data[1] === e.data[1] && i.data[2] === e.data[2] && i.data[3] === e.data[3] }()), a) } , function(t, e) { t.exports = function(t, e, i, n) { return Math.atan2(n - e, i - t) } } , function(t, e) { t.exports = function(t, e) { return Math.atan2(e.y - t.y, e.x - t.x) } } , function(t, e) { t.exports = function(t) { return 0 <= (t %= 2 * Math.PI) ? t : t + 2 * Math.PI } } , function(t, e) { t.exports = function(t, e) { var i = t.x - e.x , n = t.y - e.y; return Math.sqrt(i * i + n * n) } } , function(t, e) { t.exports = function(t, e, i, n) { var s = t - i , r = e - n; return s * s + r * r } } , function(t, e) { t.exports = function(t, e, i) { return void 0 === i && (i = 1e-4), e - i < t } } , function(t, e) { t.exports = function(t, e, i) { return void 0 === i && (i = 1e-4), t < e + i } } , function(t, e, i) { var n = i(325); t.exports = function(t, e) { return n(t) / n(e) / n(t - e) } } , function(t, e) { t.exports = function(t) { if (0 === t) return 1; for (var e = t; --t; ) e *= t; return e } } , function(t, e) { t.exports = function(t, e, i, n, s) { return (l = 1 - t) * l * l * e + 3 * (h = 1 - (a = t)) * h * a * i + 3 * (1 - (o = t)) * o * o * n + (r = t) * r * r * s; var r, o, a, h, l } } , function(t, e) { t.exports = function(t, e, i, n) { return (o = 1 - t) * o * e + 2 * (1 - (r = t)) * r * i + (s = t) * s * n; var s, r, o } } , function(t, e, i) { var n = i(161); t.exports = function(t, e, i) { return e + (i - e) * n(t, 0, 1) } } , function(t, e) { t.exports = function(t) { var e = Math.log(t) / .6931471805599453; return 1 << Math.ceil(e) } } , function(t, e) { t.exports = function(t, e, i, n) { return void 0 === i && (i = 0), 0 === e ? t : (t -= i, t = e * Math.ceil(t / e), n ? (i + t) / e : i + t) } } , function(t, e) { t.exports = function(t, e) { var i = t.x , n = t.y; return t.x = i * Math.cos(e) - n * Math.sin(e), t.y = i * Math.sin(e) + n * Math.cos(e), t } } , function(t, e) { t.exports = function(t) { return 0 < t ? Math.ceil(t) : Math.floor(t) } } , function(t, e, i) { var g = i(3); t.exports = function(t, e, i, n, s, r, o, a) { void 0 === a && (a = new g); var h = Math.sin(s) , l = Math.cos(s) , u = l * r , c = h * r , d = -h * o , f = l * o , p = 1 / (u * f + d * -c); return a.x = f * p * t + -d * p * e + (n * d - i * f) * p, a.y = u * p * e + -c * p * t + (-n * u + i * c) * p, a } } , function(t, e, i) { var n = new (i(0))({ initialize: function(t, e, i, n) { this.x = 0, this.y = 0, this.z = 0, this.w = 0, "object" == typeof t ? (this.x = t.x || 0, this.y = t.y || 0, this.z = t.z || 0, this.w = t.w || 0) : (this.x = t || 0, this.y = e || 0, this.z = i || 0, this.w = n || 0) }, clone: function() { return new n(this.x,this.y,this.z,this.w) }, copy: function(t) { return this.x = t.x, this.y = t.y, this.z = t.z || 0, this.w = t.w || 0, this }, equals: function(t) { return this.x === t.x && this.y === t.y && this.z === t.z && this.w === t.w }, set: function(t, e, i, n) { return "object" == typeof t ? (this.x = t.x || 0, this.y = t.y || 0, this.z = t.z || 0, this.w = t.w || 0) : (this.x = t || 0, this.y = e || 0, this.z = i || 0, this.w = n || 0), this }, add: function(t) { return this.x += t.x, this.y += t.y, this.z += t.z || 0, this.w += t.w || 0, this }, subtract: function(t) { return this.x -= t.x, this.y -= t.y, this.z -= t.z || 0, this.w -= t.w || 0, this }, scale: function(t) { return this.x *= t, this.y *= t, this.z *= t, this.w *= t, this }, length: function() { var t = this.x , e = this.y , i = this.z , n = this.w; return Math.sqrt(t * t + e * e + i * i + n * n) }, lengthSq: function() { var t = this.x , e = this.y , i = this.z , n = this.w; return t * t + e * e + i * i + n * n }, normalize: function() { var t = this.x , e = this.y , i = this.z , n = this.w , s = t * t + e * e + i * i + n * n; return 0 < s && (s = 1 / Math.sqrt(s), this.x = t * s, this.y = e * s, this.z = i * s, this.w = n * s), this }, dot: function(t) { return this.x * t.x + this.y * t.y + this.z * t.z + this.w * t.w }, lerp: function(t, e) { void 0 === e && (e = 0); var i = this.x , n = this.y , s = this.z , r = this.w; return this.x = i + e * (t.x - i), this.y = n + e * (t.y - n), this.z = s + e * (t.z - s), this.w = r + e * (t.w - r), this }, multiply: function(t) { return this.x *= t.x, this.y *= t.y, this.z *= t.z || 1, this.w *= t.w || 1, this }, divide: function(t) { return this.x /= t.x, this.y /= t.y, this.z /= t.z || 1, this.w /= t.w || 1, this }, distance: function(t) { var e = t.x - this.x , i = t.y - this.y , n = t.z - this.z || 0 , s = t.w - this.w || 0; return Math.sqrt(e * e + i * i + n * n + s * s) }, distanceSq: function(t) { var e = t.x - this.x , i = t.y - this.y , n = t.z - this.z || 0 , s = t.w - this.w || 0; return e * e + i * i + n * n + s * s }, negate: function() { return this.x = -this.x, this.y = -this.y, this.z = -this.z, this.w = -this.w, this }, transformMat4: function(t) { var e = this.x , i = this.y , n = this.z , s = this.w , r = t.val; return this.x = r[0] * e + r[4] * i + r[8] * n + r[12] * s, this.y = r[1] * e + r[5] * i + r[9] * n + r[13] * s, this.z = r[2] * e + r[6] * i + r[10] * n + r[14] * s, this.w = r[3] * e + r[7] * i + r[11] * n + r[15] * s, this }, transformQuat: function(t) { var e = this.x , i = this.y , n = this.z , s = t.x , r = t.y , o = t.z , a = t.w , h = a * e + r * n - o * i , l = a * i + o * e - s * n , u = a * n + s * i - r * e , c = -s * e - r * i - o * n; return this.x = h * a + c * -s + l * -o - u * -r, this.y = l * a + c * -r + u * -s - h * -o, this.z = u * a + c * -o + h * -r - l * -s, this }, reset: function() { return this.x = 0, this.y = 0, this.z = 0, this.w = 0, this } }); n.prototype.sub = n.prototype.subtract, n.prototype.mul = n.prototype.multiply, n.prototype.div = n.prototype.divide, n.prototype.dist = n.prototype.distance, n.prototype.distSq = n.prototype.distanceSq, n.prototype.len = n.prototype.length, n.prototype.lenSq = n.prototype.lengthSq, t.exports = n } , function(t, e, i) { var n = new (i(0))({ initialize: function(t) { this.val = new Float32Array(9), t ? this.copy(t) : this.identity() }, clone: function() { return new n(this) }, set: function(t) { return this.copy(t) }, copy: function(t) { var e = this.val , i = t.val; return e[0] = i[0], e[1] = i[1], e[2] = i[2], e[3] = i[3], e[4] = i[4], e[5] = i[5], e[6] = i[6], e[7] = i[7], e[8] = i[8], this }, fromMat4: function(t) { var e = t.val , i = this.val; return i[0] = e[0], i[1] = e[1], i[2] = e[2], i[3] = e[4], i[4] = e[5], i[5] = e[6], i[6] = e[8], i[7] = e[9], i[8] = e[10], this }, fromArray: function(t) { var e = this.val; return e[0] = t[0], e[1] = t[1], e[2] = t[2], e[3] = t[3], e[4] = t[4], e[5] = t[5], e[6] = t[6], e[7] = t[7], e[8] = t[8], this }, identity: function() { var t = this.val; return t[0] = 1, t[1] = 0, t[2] = 0, t[3] = 0, t[4] = 1, t[5] = 0, t[6] = 0, t[7] = 0, t[8] = 1, this }, transpose: function() { var t = this.val , e = t[1] , i = t[2] , n = t[5]; return t[1] = t[3], t[2] = t[6], t[3] = e, t[5] = t[7], t[6] = i, t[7] = n, this }, invert: function() { var t = this.val , e = t[0] , i = t[1] , n = t[2] , s = t[3] , r = t[4] , o = t[5] , a = t[6] , h = t[7] , l = t[8] , u = l * r - o * h , c = -l * s + o * a , d = h * s - r * a , f = e * u + i * c + n * d; return f ? (f = 1 / f, t[0] = u * f, t[1] = (-l * i + n * h) * f, t[2] = (o * i - n * r) * f, t[3] = c * f, t[4] = (l * e - n * a) * f, t[5] = (-o * e + n * s) * f, t[6] = d * f, t[7] = (-h * e + i * a) * f, t[8] = (r * e - i * s) * f, this) : null }, adjoint: function() { var t = this.val , e = t[0] , i = t[1] , n = t[2] , s = t[3] , r = t[4] , o = t[5] , a = t[6] , h = t[7] , l = t[8]; return t[0] = r * l - o * h, t[1] = n * h - i * l, t[2] = i * o - n * r, t[3] = o * a - s * l, t[4] = e * l - n * a, t[5] = n * s - e * o, t[6] = s * h - r * a, t[7] = i * a - e * h, t[8] = e * r - i * s, this }, determinant: function() { var t = this.val , e = t[0] , i = t[1] , n = t[2] , s = t[3] , r = t[4] , o = t[5] , a = t[6] , h = t[7] , l = t[8]; return e * (l * r - o * h) + i * (-l * s + o * a) + n * (h * s - r * a) }, multiply: function(t) { var e = this.val , i = e[0] , n = e[1] , s = e[2] , r = e[3] , o = e[4] , a = e[5] , h = e[6] , l = e[7] , u = e[8] , c = t.val , d = c[0] , f = c[1] , p = c[2] , g = c[3] , v = c[4] , m = c[5] , y = c[6] , x = c[7] , T = c[8]; return e[0] = d * i + f * r + p * h, e[1] = d * n + f * o + p * l, e[2] = d * s + f * a + p * u, e[3] = g * i + v * r + m * h, e[4] = g * n + v * o + m * l, e[5] = g * s + v * a + m * u, e[6] = y * i + x * r + T * h, e[7] = y * n + x * o + T * l, e[8] = y * s + x * a + T * u, this }, translate: function(t) { var e = this.val , i = t.x , n = t.y; return e[6] = i * e[0] + n * e[3] + e[6], e[7] = i * e[1] + n * e[4] + e[7], e[8] = i * e[2] + n * e[5] + e[8], this }, rotate: function(t) { var e = this.val , i = e[0] , n = e[1] , s = e[2] , r = e[3] , o = e[4] , a = e[5] , h = Math.sin(t) , l = Math.cos(t); return e[0] = l * i + h * r, e[1] = l * n + h * o, e[2] = l * s + h * a, e[3] = l * r - h * i, e[4] = l * o - h * n, e[5] = l * a - h * s, this }, scale: function(t) { var e = this.val , i = t.x , n = t.y; return e[0] = i * e[0], e[1] = i * e[1], e[2] = i * e[2], e[3] = n * e[3], e[4] = n * e[4], e[5] = n * e[5], this }, fromQuat: function(t) { var e = t.x , i = t.y , n = t.z , s = t.w , r = e + e , o = i + i , a = n + n , h = e * r , l = e * o , u = e * a , c = i * o , d = i * a , f = n * a , p = s * r , g = s * o , v = s * a , m = this.val; return m[0] = 1 - (c + f), m[3] = l + v, m[6] = u - g, m[1] = l - v, m[4] = 1 - (h + f), m[7] = d + p, m[2] = u + g, m[5] = d - p, m[8] = 1 - (h + c), this }, normalFromMat4: function(t) { var e = t.val , i = this.val , n = e[0] , s = e[1] , r = e[2] , o = e[3] , a = e[4] , h = e[5] , l = e[6] , u = e[7] , c = e[8] , d = e[9] , f = e[10] , p = e[11] , g = e[12] , v = e[13] , m = e[14] , y = e[15] , x = n * h - s * a , T = n * l - r * a , w = n * u - o * a , b = s * l - r * h , E = s * u - o * h , S = r * u - o * l , _ = c * v - d * g , A = c * m - f * g , C = c * y - p * g , M = d * m - f * v , P = d * y - p * v , O = f * y - p * m , R = x * O - T * P + w * M + b * C - E * A + S * _; return R ? (R = 1 / R, i[0] = (h * O - l * P + u * M) * R, i[1] = (l * C - a * O - u * A) * R, i[2] = (a * P - h * C + u * _) * R, i[3] = (r * P - s * O - o * M) * R, i[4] = (n * O - r * C + o * A) * R, i[5] = (s * C - n * P - o * _) * R, i[6] = (v * S - m * E + y * b) * R, i[7] = (m * w - g * S - y * T) * R, i[8] = (g * E - v * w + y * x) * R, this) : null } }); t.exports = n } , function(t, e, i) { var n = i(0) , s = new n({ initialize: function(t) { this.val = new Float32Array(16), t ? this.copy(t) : this.identity() }, clone: function() { return new s(this) }, set: function(t) { return this.copy(t) }, copy: function(t) { var e = this.val , i = t.val; return e[0] = i[0], e[1] = i[1], e[2] = i[2], e[3] = i[3], e[4] = i[4], e[5] = i[5], e[6] = i[6], e[7] = i[7], e[8] = i[8], e[9] = i[9], e[10] = i[10], e[11] = i[11], e[12] = i[12], e[13] = i[13], e[14] = i[14], e[15] = i[15], this }, fromArray: function(t) { var e = this.val; return e[0] = t[0], e[1] = t[1], e[2] = t[2], e[3] = t[3], e[4] = t[4], e[5] = t[5], e[6] = t[6], e[7] = t[7], e[8] = t[8], e[9] = t[9], e[10] = t[10], e[11] = t[11], e[12] = t[12], e[13] = t[13], e[14] = t[14], e[15] = t[15], this }, zero: function() { var t = this.val; return t[0] = 0, t[1] = 0, t[2] = 0, t[3] = 0, t[4] = 0, t[5] = 0, t[6] = 0, t[7] = 0, t[8] = 0, t[9] = 0, t[10] = 0, t[11] = 0, t[12] = 0, t[13] = 0, t[14] = 0, t[15] = 0, this }, xyz: function(t, e, i) { this.identity(); var n = this.val; return n[12] = t, n[13] = e, n[14] = i, this }, scaling: function(t, e, i) { this.zero(); var n = this.val; return n[0] = t, n[5] = e, n[10] = i, n[15] = 1, this }, identity: function() { var t = this.val; return t[0] = 1, t[1] = 0, t[2] = 0, t[3] = 0, t[4] = 0, t[5] = 1, t[6] = 0, t[7] = 0, t[8] = 0, t[9] = 0, t[10] = 1, t[11] = 0, t[12] = 0, t[13] = 0, t[14] = 0, t[15] = 1, this }, transpose: function() { var t = this.val , e = t[1] , i = t[2] , n = t[3] , s = t[6] , r = t[7] , o = t[11]; return t[1] = t[4], t[2] = t[8], t[3] = t[12], t[4] = e, t[6] = t[9], t[7] = t[13], t[8] = i, t[9] = s, t[11] = t[14], t[12] = n, t[13] = r, t[14] = o, this }, invert: function() { var t = this.val , e = t[0] , i = t[1] , n = t[2] , s = t[3] , r = t[4] , o = t[5] , a = t[6] , h = t[7] , l = t[8] , u = t[9] , c = t[10] , d = t[11] , f = t[12] , p = t[13] , g = t[14] , v = t[15] , m = e * o - i * r , y = e * a - n * r , x = e * h - s * r , T = i * a - n * o , w = i * h - s * o , b = n * h - s * a , E = l * p - u * f , S = l * g - c * f , _ = l * v - d * f , A = u * g - c * p , C = u * v - d * p , M = c * v - d * g , P = m * M - y * C + x * A + T * _ - w * S + b * E; return P ? (P = 1 / P, t[0] = (o * M - a * C + h * A) * P, t[1] = (n * C - i * M - s * A) * P, t[2] = (p * b - g * w + v * T) * P, t[3] = (c * w - u * b - d * T) * P, t[4] = (a * _ - r * M - h * S) * P, t[5] = (e * M - n * _ + s * S) * P, t[6] = (g * x - f * b - v * y) * P, t[7] = (l * b - c * x + d * y) * P, t[8] = (r * C - o * _ + h * E) * P, t[9] = (i * _ - e * C - s * E) * P, t[10] = (f * w - p * x + v * m) * P, t[11] = (u * x - l * w - d * m) * P, t[12] = (o * S - r * A - a * E) * P, t[13] = (e * A - i * S + n * E) * P, t[14] = (p * y - f * T - g * m) * P, t[15] = (l * T - u * y + c * m) * P, this) : null }, adjoint: function() { var t = this.val , e = t[0] , i = t[1] , n = t[2] , s = t[3] , r = t[4] , o = t[5] , a = t[6] , h = t[7] , l = t[8] , u = t[9] , c = t[10] , d = t[11] , f = t[12] , p = t[13] , g = t[14] , v = t[15]; return t[0] = o * (c * v - d * g) - u * (a * v - h * g) + p * (a * d - h * c), t[1] = -(i * (c * v - d * g) - u * (n * v - s * g) + p * (n * d - s * c)), t[2] = i * (a * v - h * g) - o * (n * v - s * g) + p * (n * h - s * a), t[3] = -(i * (a * d - h * c) - o * (n * d - s * c) + u * (n * h - s * a)), t[4] = -(r * (c * v - d * g) - l * (a * v - h * g) + f * (a * d - h * c)), t[5] = e * (c * v - d * g) - l * (n * v - s * g) + f * (n * d - s * c), t[6] = -(e * (a * v - h * g) - r * (n * v - s * g) + f * (n * h - s * a)), t[7] = e * (a * d - h * c) - r * (n * d - s * c) + l * (n * h - s * a), t[8] = r * (u * v - d * p) - l * (o * v - h * p) + f * (o * d - h * u), t[9] = -(e * (u * v - d * p) - l * (i * v - s * p) + f * (i * d - s * u)), t[10] = e * (o * v - h * p) - r * (i * v - s * p) + f * (i * h - s * o), t[11] = -(e * (o * d - h * u) - r * (i * d - s * u) + l * (i * h - s * o)), t[12] = -(r * (u * g - c * p) - l * (o * g - a * p) + f * (o * c - a * u)), t[13] = e * (u * g - c * p) - l * (i * g - n * p) + f * (i * c - n * u), t[14] = -(e * (o * g - a * p) - r * (i * g - n * p) + f * (i * a - n * o)), t[15] = e * (o * c - a * u) - r * (i * c - n * u) + l * (i * a - n * o), this }, determinant: function() { var t = this.val , e = t[0] , i = t[1] , n = t[2] , s = t[3] , r = t[4] , o = t[5] , a = t[6] , h = t[7] , l = t[8] , u = t[9] , c = t[10] , d = t[11] , f = t[12] , p = t[13] , g = t[14] , v = t[15]; return (e * o - i * r) * (c * v - d * g) - (e * a - n * r) * (u * v - d * p) + (e * h - s * r) * (u * g - c * p) + (i * a - n * o) * (l * v - d * f) - (i * h - s * o) * (l * g - c * f) + (n * h - s * a) * (l * p - u * f) }, multiply: function(t) { var e = this.val , i = e[0] , n = e[1] , s = e[2] , r = e[3] , o = e[4] , a = e[5] , h = e[6] , l = e[7] , u = e[8] , c = e[9] , d = e[10] , f = e[11] , p = e[12] , g = e[13] , v = e[14] , m = e[15] , y = t.val , x = y[0] , T = y[1] , w = y[2] , b = y[3]; return e[0] = x * i + T * o + w * u + b * p, e[1] = x * n + T * a + w * c + b * g, e[2] = x * s + T * h + w * d + b * v, e[3] = x * r + T * l + w * f + b * m, x = y[4], T = y[5], w = y[6], b = y[7], e[4] = x * i + T * o + w * u + b * p, e[5] = x * n + T * a + w * c + b * g, e[6] = x * s + T * h + w * d + b * v, e[7] = x * r + T * l + w * f + b * m, x = y[8], T = y[9], w = y[10], b = y[11], e[8] = x * i + T * o + w * u + b * p, e[9] = x * n + T * a + w * c + b * g, e[10] = x * s + T * h + w * d + b * v, e[11] = x * r + T * l + w * f + b * m, x = y[12], T = y[13], w = y[14], b = y[15], e[12] = x * i + T * o + w * u + b * p, e[13] = x * n + T * a + w * c + b * g, e[14] = x * s + T * h + w * d + b * v, e[15] = x * r + T * l + w * f + b * m, this }, multiplyLocal: function(t) { var e = [] , i = this.val , n = t.val; return e[0] = i[0] * n[0] + i[1] * n[4] + i[2] * n[8] + i[3] * n[12], e[1] = i[0] * n[1] + i[1] * n[5] + i[2] * n[9] + i[3] * n[13], e[2] = i[0] * n[2] + i[1] * n[6] + i[2] * n[10] + i[3] * n[14], e[3] = i[0] * n[3] + i[1] * n[7] + i[2] * n[11] + i[3] * n[15], e[4] = i[4] * n[0] + i[5] * n[4] + i[6] * n[8] + i[7] * n[12], e[5] = i[4] * n[1] + i[5] * n[5] + i[6] * n[9] + i[7] * n[13], e[6] = i[4] * n[2] + i[5] * n[6] + i[6] * n[10] + i[7] * n[14], e[7] = i[4] * n[3] + i[5] * n[7] + i[6] * n[11] + i[7] * n[15], e[8] = i[8] * n[0] + i[9] * n[4] + i[10] * n[8] + i[11] * n[12], e[9] = i[8] * n[1] + i[9] * n[5] + i[10] * n[9] + i[11] * n[13], e[10] = i[8] * n[2] + i[9] * n[6] + i[10] * n[10] + i[11] * n[14], e[11] = i[8] * n[3] + i[9] * n[7] + i[10] * n[11] + i[11] * n[15], e[12] = i[12] * n[0] + i[13] * n[4] + i[14] * n[8] + i[15] * n[12], e[13] = i[12] * n[1] + i[13] * n[5] + i[14] * n[9] + i[15] * n[13], e[14] = i[12] * n[2] + i[13] * n[6] + i[14] * n[10] + i[15] * n[14], e[15] = i[12] * n[3] + i[13] * n[7] + i[14] * n[11] + i[15] * n[15], this.fromArray(e) }, translate: function(t) { var e = t.x , i = t.y , n = t.z , s = this.val; return s[12] = s[0] * e + s[4] * i + s[8] * n + s[12], s[13] = s[1] * e + s[5] * i + s[9] * n + s[13], s[14] = s[2] * e + s[6] * i + s[10] * n + s[14], s[15] = s[3] * e + s[7] * i + s[11] * n + s[15], this }, translateXYZ: function(t, e, i) { var n = this.val; return n[12] = n[0] * t + n[4] * e + n[8] * i + n[12], n[13] = n[1] * t + n[5] * e + n[9] * i + n[13], n[14] = n[2] * t + n[6] * e + n[10] * i + n[14], n[15] = n[3] * t + n[7] * e + n[11] * i + n[15], this }, scale: function(t) { var e = t.x , i = t.y , n = t.z , s = this.val; return s[0] = s[0] * e, s[1] = s[1] * e, s[2] = s[2] * e, s[3] = s[3] * e, s[4] = s[4] * i, s[5] = s[5] * i, s[6] = s[6] * i, s[7] = s[7] * i, s[8] = s[8] * n, s[9] = s[9] * n, s[10] = s[10] * n, s[11] = s[11] * n, this }, scaleXYZ: function(t, e, i) { var n = this.val; return n[0] = n[0] * t, n[1] = n[1] * t, n[2] = n[2] * t, n[3] = n[3] * t, n[4] = n[4] * e, n[5] = n[5] * e, n[6] = n[6] * e, n[7] = n[7] * e, n[8] = n[8] * i, n[9] = n[9] * i, n[10] = n[10] * i, n[11] = n[11] * i, this }, makeRotationAxis: function(t, e) { var i = Math.cos(e) , n = Math.sin(e) , s = 1 - i , r = t.x , o = t.y , a = t.z , h = s * r , l = s * o; return this.fromArray([h * r + i, h * o - n * a, h * a + n * o, 0, h * o + n * a, l * o + i, l * a - n * r, 0, h * a - n * o, l * a + n * r, s * a * a + i, 0, 0, 0, 0, 1]), this }, rotate: function(t, e) { var i = this.val , n = e.x , s = e.y , r = e.z , o = Math.sqrt(n * n + s * s + r * r); if (Math.abs(o) < 1e-6) return null; n *= o = 1 / o, s *= o, r *= o; var a = Math.sin(t) , h = Math.cos(t) , l = 1 - h , u = i[0] , c = i[1] , d = i[2] , f = i[3] , p = i[4] , g = i[5] , v = i[6] , m = i[7] , y = i[8] , x = i[9] , T = i[10] , w = i[11] , b = n * n * l + h , E = s * n * l + r * a , S = r * n * l - s * a , _ = n * s * l - r * a , A = s * s * l + h , C = r * s * l + n * a , M = n * r * l + s * a , P = s * r * l - n * a , O = r * r * l + h; return i[0] = u * b + p * E + y * S, i[1] = c * b + g * E + x * S, i[2] = d * b + v * E + T * S, i[3] = f * b + m * E + w * S, i[4] = u * _ + p * A + y * C, i[5] = c * _ + g * A + x * C, i[6] = d * _ + v * A + T * C, i[7] = f * _ + m * A + w * C, i[8] = u * M + p * P + y * O, i[9] = c * M + g * P + x * O, i[10] = d * M + v * P + T * O, i[11] = f * M + m * P + w * O, this }, rotateX: function(t) { var e = this.val , i = Math.sin(t) , n = Math.cos(t) , s = e[4] , r = e[5] , o = e[6] , a = e[7] , h = e[8] , l = e[9] , u = e[10] , c = e[11]; return e[4] = s * n + h * i, e[5] = r * n + l * i, e[6] = o * n + u * i, e[7] = a * n + c * i, e[8] = h * n - s * i, e[9] = l * n - r * i, e[10] = u * n - o * i, e[11] = c * n - a * i, this }, rotateY: function(t) { var e = this.val , i = Math.sin(t) , n = Math.cos(t) , s = e[0] , r = e[1] , o = e[2] , a = e[3] , h = e[8] , l = e[9] , u = e[10] , c = e[11]; return e[0] = s * n - h * i, e[1] = r * n - l * i, e[2] = o * n - u * i, e[3] = a * n - c * i, e[8] = s * i + h * n, e[9] = r * i + l * n, e[10] = o * i + u * n, e[11] = a * i + c * n, this }, rotateZ: function(t) { var e = this.val , i = Math.sin(t) , n = Math.cos(t) , s = e[0] , r = e[1] , o = e[2] , a = e[3] , h = e[4] , l = e[5] , u = e[6] , c = e[7]; return e[0] = s * n + h * i, e[1] = r * n + l * i, e[2] = o * n + u * i, e[3] = a * n + c * i, e[4] = h * n - s * i, e[5] = l * n - r * i, e[6] = u * n - o * i, e[7] = c * n - a * i, this }, fromRotationTranslation: function(t, e) { var i = this.val , n = t.x , s = t.y , r = t.z , o = t.w , a = n + n , h = s + s , l = r + r , u = n * a , c = n * h , d = n * l , f = s * h , p = s * l , g = r * l , v = o * a , m = o * h , y = o * l; return i[0] = 1 - (f + g), i[1] = c + y, i[2] = d - m, i[3] = 0, i[4] = c - y, i[5] = 1 - (u + g), i[6] = p + v, i[7] = 0, i[8] = d + m, i[9] = p - v, i[10] = 1 - (u + f), i[11] = 0, i[12] = e.x, i[13] = e.y, i[14] = e.z, i[15] = 1, this }, fromQuat: function(t) { var e = this.val , i = t.x , n = t.y , s = t.z , r = t.w , o = i + i , a = n + n , h = s + s , l = i * o , u = i * a , c = i * h , d = n * a , f = n * h , p = s * h , g = r * o , v = r * a , m = r * h; return e[0] = 1 - (d + p), e[1] = u + m, e[2] = c - v, e[3] = 0, e[4] = u - m, e[5] = 1 - (l + p), e[6] = f + g, e[7] = 0, e[8] = c + v, e[9] = f - g, e[10] = 1 - (l + d), e[11] = 0, e[12] = 0, e[13] = 0, e[14] = 0, e[15] = 1, this }, frustum: function(t, e, i, n, s, r) { var o = this.val , a = 1 / (e - t) , h = 1 / (n - i) , l = 1 / (s - r); return o[0] = 2 * s * a, o[1] = 0, o[2] = 0, o[3] = 0, o[4] = 0, o[5] = 2 * s * h, o[6] = 0, o[7] = 0, o[8] = (e + t) * a, o[9] = (n + i) * h, o[10] = (r + s) * l, o[11] = -1, o[12] = 0, o[13] = 0, o[14] = r * s * 2 * l, o[15] = 0, this }, perspective: function(t, e, i, n) { var s = this.val , r = 1 / Math.tan(t / 2) , o = 1 / (i - n); return s[0] = r / e, s[1] = 0, s[2] = 0, s[3] = 0, s[4] = 0, s[5] = r, s[6] = 0, s[7] = 0, s[8] = 0, s[9] = 0, s[10] = (n + i) * o, s[11] = -1, s[12] = 0, s[13] = 0, s[14] = 2 * n * i * o, s[15] = 0, this }, perspectiveLH: function(t, e, i, n) { var s = this.val; return s[0] = 2 * i / t, s[1] = 0, s[2] = 0, s[3] = 0, s[4] = 0, s[5] = 2 * i / e, s[6] = 0, s[7] = 0, s[8] = 0, s[9] = 0, s[10] = -n / (i - n), s[11] = 1, s[12] = 0, s[13] = 0, s[14] = i * n / (i - n), s[15] = 0, this }, ortho: function(t, e, i, n, s, r) { var o = this.val , a = 0 === (a = t - e) ? a : 1 / a , h = 0 === (h = i - n) ? h : 1 / h , l = 0 === (l = s - r) ? l : 1 / l; return o[0] = -2 * a, o[1] = 0, o[2] = 0, o[3] = 0, o[4] = 0, o[5] = -2 * h, o[6] = 0, o[7] = 0, o[8] = 0, o[9] = 0, o[10] = 2 * l, o[11] = 0, o[12] = (t + e) * a, o[13] = (n + i) * h, o[14] = (r + s) * l, o[15] = 1, this }, lookAt: function(t, e, i) { var n = this.val , s = t.x , r = t.y , o = t.z , a = i.x , h = i.y , l = i.z , u = e.x , c = e.y , d = e.z; if (Math.abs(s - u) < 1e-6 && Math.abs(r - c) < 1e-6 && Math.abs(o - d) < 1e-6) return this.identity(); var f = s - u , p = r - c , g = o - d , v = 1 / Math.sqrt(f * f + p * p + g * g) , m = h * (g *= v) - l * (p *= v) , y = l * (f *= v) - a * g , x = a * p - h * f; (v = Math.sqrt(m * m + y * y + x * x)) ? (m *= v = 1 / v, y *= v, x *= v) : x = y = m = 0; var T = p * x - g * y , w = g * m - f * x , b = f * y - p * m; return (v = Math.sqrt(T * T + w * w + b * b)) ? (T *= v = 1 / v, w *= v, b *= v) : b = w = T = 0, n[0] = m, n[1] = T, n[2] = f, n[3] = 0, n[4] = y, n[5] = w, n[6] = p, n[7] = 0, n[8] = x, n[9] = b, n[10] = g, n[11] = 0, n[12] = -(m * s + y * r + x * o), n[13] = -(T * s + w * r + b * o), n[14] = -(f * s + p * r + g * o), n[15] = 1, this }, yawPitchRoll: function(t, e, i) { this.zero(), h.zero(), l.zero(); var n = this.val , s = h.val , r = l.val , o = Math.sin(i) , a = Math.cos(i); return n[10] = 1, n[15] = 1, n[0] = a, n[1] = o, n[4] = -o, n[5] = a, o = Math.sin(e), a = Math.cos(e), s[0] = 1, s[15] = 1, s[5] = a, s[10] = a, s[9] = -o, s[6] = o, o = Math.sin(t), a = Math.cos(t), r[5] = 1, r[15] = 1, r[0] = a, r[2] = -o, r[8] = o, r[10] = a, this.multiplyLocal(h), this.multiplyLocal(l), this }, setWorldMatrix: function(t, e, i, n, s) { return this.yawPitchRoll(t.y, t.x, t.z), h.scaling(i.x, i.y, i.z), l.xyz(e.x, e.y, e.z), this.multiplyLocal(h), this.multiplyLocal(l), void 0 !== n && this.multiplyLocal(n), void 0 !== s && this.multiplyLocal(s), this } }) , h = new s , l = new s; t.exports = s } , function(t, e, i) { var n = i(0) , s = i(174) , r = i(335) , a = new Int8Array([1, 2, 0]) , h = new Float32Array([0, 0, 0]) , o = new s(1,0,0) , l = new s(0,1,0) , u = new s , c = new r , d = new n({ initialize: function(t, e, i, n) { "object" == typeof t ? (this.x = t.x || 0, this.y = t.y || 0, this.z = t.z || 0, this.w = t.w || 0) : (this.x = t || 0, this.y = e || 0, this.z = i || 0, this.w = n || 0) }, copy: function(t) { return this.x = t.x, this.y = t.y, this.z = t.z, this.w = t.w, this }, set: function(t, e, i, n) { return "object" == typeof t ? (this.x = t.x || 0, this.y = t.y || 0, this.z = t.z || 0, this.w = t.w || 0) : (this.x = t || 0, this.y = e || 0, this.z = i || 0, this.w = n || 0), this }, add: function(t) { return this.x += t.x, this.y += t.y, this.z += t.z, this.w += t.w, this }, subtract: function(t) { return this.x -= t.x, this.y -= t.y, this.z -= t.z, this.w -= t.w, this }, scale: function(t) { return this.x *= t, this.y *= t, this.z *= t, this.w *= t, this }, length: function() { var t = this.x , e = this.y , i = this.z , n = this.w; return Math.sqrt(t * t + e * e + i * i + n * n) }, lengthSq: function() { var t = this.x , e = this.y , i = this.z , n = this.w; return t * t + e * e + i * i + n * n }, normalize: function() { var t = this.x , e = this.y , i = this.z , n = this.w , s = t * t + e * e + i * i + n * n; return 0 < s && (s = 1 / Math.sqrt(s), this.x = t * s, this.y = e * s, this.z = i * s, this.w = n * s), this }, dot: function(t) { return this.x * t.x + this.y * t.y + this.z * t.z + this.w * t.w }, lerp: function(t, e) { void 0 === e && (e = 0); var i = this.x , n = this.y , s = this.z , r = this.w; return this.x = i + e * (t.x - i), this.y = n + e * (t.y - n), this.z = s + e * (t.z - s), this.w = r + e * (t.w - r), this }, rotationTo: function(t, e) { var i = t.x * e.x + t.y * e.y + t.z * e.z; return i < -.999999 ? (u.copy(o).cross(t).length() < 1e-6 && u.copy(l).cross(t), u.normalize(), this.setAxisAngle(u, Math.PI)) : .999999 < i ? (this.x = 0, this.y = 0, this.z = 0, this.w = 1, this) : (u.copy(t).cross(e), this.x = u.x, this.y = u.y, this.z = u.z, this.w = 1 + i, this.normalize()) }, setAxes: function(t, e, i) { var n = c.val; return n[0] = e.x, n[3] = e.y, n[6] = e.z, n[1] = i.x, n[4] = i.y, n[7] = i.z, n[2] = -t.x, n[5] = -t.y, n[8] = -t.z, this.fromMat3(c).normalize() }, identity: function() { return this.x = 0, this.y = 0, this.z = 0, this.w = 1, this }, setAxisAngle: function(t, e) { e *= .5; var i = Math.sin(e); return this.x = i * t.x, this.y = i * t.y, this.z = i * t.z, this.w = Math.cos(e), this }, multiply: function(t) { var e = this.x , i = this.y , n = this.z , s = this.w , r = t.x , o = t.y , a = t.z , h = t.w; return this.x = e * h + s * r + i * a - n * o, this.y = i * h + s * o + n * r - e * a, this.z = n * h + s * a + e * o - i * r, this.w = s * h - e * r - i * o - n * a, this }, slerp: function(t, e) { var i = this.x , n = this.y , s = this.z , r = this.w , o = t.x , a = t.y , h = t.z , l = t.w , u = i * o + n * a + s * h + r * l; u < 0 && (u = -u, o = -o, a = -a, h = -h, l = -l); var c, d, f = 1 - e, p = e; return 1e-6 < 1 - u && (c = Math.acos(u), d = Math.sin(c), f = Math.sin((1 - e) * c) / d, p = Math.sin(e * c) / d), this.x = f * i + p * o, this.y = f * n + p * a, this.z = f * s + p * h, this.w = f * r + p * l, this }, invert: function() { var t = this.x , e = this.y , i = this.z , n = this.w , s = t * t + e * e + i * i + n * n , r = s ? 1 / s : 0; return this.x = -t * r, this.y = -e * r, this.z = -i * r, this.w = n * r, this }, conjugate: function() { return this.x = -this.x, this.y = -this.y, this.z = -this.z, this }, rotateX: function(t) { t *= .5; var e = this.x , i = this.y , n = this.z , s = this.w , r = Math.sin(t) , o = Math.cos(t); return this.x = e * o + s * r, this.y = i * o + n * r, this.z = n * o - i * r, this.w = s * o - e * r, this }, rotateY: function(t) { t *= .5; var e = this.x , i = this.y , n = this.z , s = this.w , r = Math.sin(t) , o = Math.cos(t); return this.x = e * o - n * r, this.y = i * o + s * r, this.z = n * o + e * r, this.w = s * o - i * r, this }, rotateZ: function(t) { t *= .5; var e = this.x , i = this.y , n = this.z , s = this.w , r = Math.sin(t) , o = Math.cos(t); return this.x = e * o + i * r, this.y = i * o - e * r, this.z = n * o + s * r, this.w = s * o - n * r, this }, calculateW: function() { var t = this.x , e = this.y , i = this.z; return this.w = -Math.sqrt(1 - t * t - e * e - i * i), this }, fromMat3: function(t) { var e, i, n, s, r = t.val, o = r[0] + r[4] + r[8]; return 0 < o ? (s = Math.sqrt(o + 1), this.w = .5 * s, s = .5 / s, this.x = (r[7] - r[5]) * s, this.y = (r[2] - r[6]) * s, this.z = (r[3] - r[1]) * s) : (e = 0, r[4] > r[0] && (e = 1), r[8] > r[3 * e + e] && (e = 2), i = a[e], n = a[i], s = Math.sqrt(r[3 * e + e] - r[3 * i + i] - r[3 * n + n] + 1), h[e] = .5 * s, s = .5 / s, h[i] = (r[3 * i + e] + r[3 * e + i]) * s, h[n] = (r[3 * n + e] + r[3 * e + n]) * s, this.x = h[0], this.y = h[1], this.z = h[2], this.w = (r[3 * n + i] - r[3 * i + n]) * s), this } }); t.exports = d } , function(t, e, a) { var h = a(339) , l = a(26) , u = a(33) , c = a(169); t.exports = function(t) { var e = t.config; if ((e.customEnvironment || e.canvas) && e.renderType === u.AUTO) throw new Error("Must set explicit renderType in custom environment"); if (!e.customEnvironment && !e.canvas && e.renderType !== u.HEADLESS) if (e.renderType === u.CANVAS || e.renderType !== u.CANVAS && !c.webGL) { if (!c.canvas) throw new Error("Cannot create Canvas or WebGL context, aborting."); e.renderType = u.CANVAS } else e.renderType = u.WEBGL; e.antialias || l.disableSmoothing(); var i, n, s = t.scale.baseSize, r = s.width, o = s.height; e.canvas ? (t.canvas = e.canvas, t.canvas.width = r, t.canvas.height = o) : t.canvas = l.create(t, r, o, e.renderType), e.canvasStyle && (t.canvas.style = e.canvasStyle), e.antialias || h.setCrisp(t.canvas), e.renderType !== u.HEADLESS && (i = a(505), n = a(508), e.renderType === u.WEBGL ? t.renderer = new n(t) : (t.renderer = new i(t), t.context = t.renderer.gameContext)) } } , function(t, e) { t.exports = { setCrisp: function(e) { return ["optimizeSpeed", "-moz-crisp-edges", "-o-crisp-edges", "-webkit-optimize-contrast", "optimize-contrast", "crisp-edges", "pixelated"].forEach(function(t) { e.style["image-rendering"] = t }), e.style.msInterpolationMode = "nearest-neighbor", e }, setBicubic: function(t) { return t.style["image-rendering"] = "auto", t.style.msInterpolationMode = "bicubic", t } } } , function(t, e) { t.exports = ["#define SHADER_NAME PHASER_TEXTURE_TINT_FS", "", "precision mediump float;", "", "uniform sampler2D uMainSampler;", "", "varying vec2 outTexCoord;", "varying float outTintEffect;", "varying vec4 outTint;", "", "void main()", "{", " vec4 texture = texture2D(uMainSampler, outTexCoord);", " vec4 texel = vec4(outTint.rgb * outTint.a, outTint.a);", " vec4 color = texture;", "", " if (outTintEffect == 0.0)", " {", " // Multiply texture tint", " color = texture * texel;", " }", " else if (outTintEffect == 1.0)", " {", " // Solid color + texture alpha", " color.rgb = mix(texture.rgb, outTint.rgb * outTint.a, texture.a);", " color.a = texture.a * texel.a;", " }", " else if (outTintEffect == 2.0)", " {", " // Solid color, no texture", " color = texel;", " }", "", " gl_FragColor = color;", "}", ""].join("\n") } , function(t, e) { t.exports = ["#define SHADER_NAME PHASER_TEXTURE_TINT_VS", "", "precision mediump float;", "", "uniform mat4 uProjectionMatrix;", "uniform mat4 uViewMatrix;", "uniform mat4 uModelMatrix;", "", "attribute vec2 inPosition;", "attribute vec2 inTexCoord;", "attribute float inTintEffect;", "attribute vec4 inTint;", "", "varying vec2 outTexCoord;", "varying float outTintEffect;", "varying vec4 outTint;", "", "void main ()", "{", " gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);", "", " outTexCoord = inTexCoord;", " outTint = inTint;", " outTintEffect = inTintEffect;", "}", "", ""].join("\n") } , function(t, e, i) { var l = i(33); t.exports = function(t) { var e, i, n, s, r, o, a, h = t.config; h.hideBanner || (e = "WebGL", h.renderType === l.CANVAS ? e = "Canvas" : h.renderType === l.HEADLESS && (e = "Headless"), i = h.audio, a = !(n = t.device.audio).webAudio || i && i.disableWebAudio ? i && i.noAudio || !n.webAudio && !n.audioData ? "No Audio" : "HTML5 Audio" : "Web Audio", t.device.browser.ie ? window.console && console.log("Phaser v" + l.VERSION + " / https://phaser.io") : (r = [s = ""], Array.isArray(h.bannerBackgroundColor) ? (h.bannerBackgroundColor.forEach(function(t) { s = s.concat("%c "), r.push("background: " + t), o = t }), r[r.length - 1] = "color: " + h.bannerTextColor + "; background: " + o) : (s = s.concat("%c "), r.push("color: " + h.bannerTextColor + "; background: " + h.bannerBackgroundColor)), r.push("background: #fff"), h.gameTitle && (s = s.concat(h.gameTitle), h.gameVersion && (s = s.concat(" v" + h.gameVersion)), h.hidePhaser || (s = s.concat(" / "))), h.hidePhaser || (s = s.concat("Phaser v" + l.VERSION + " (" + e + " | " + a + ")")), s = s.concat(" %c " + h.gameURL), r[0] = s, console.log.apply(console, r))) } } , function(t, e, i) { var n = i(0) , s = i(6) , r = i(1) , o = i(344) , a = new n({ initialize: function(t, e) { this.game = t, this.raf = new o, this.started = !1, this.running = !1, this.minFps = s(e, "min", 5), this.targetFps = s(e, "target", 60), this._min = 1e3 / this.minFps, this._target = 1e3 / this.targetFps, this.actualFps = this.targetFps, this.nextFpsUpdate = 0, this.framesThisSecond = 0, this.callback = r, this.forceSetTimeOut = s(e, "forceSetTimeOut", !1), this.time = 0, this.startTime = 0, this.lastTime = 0, this.frame = 0, this.inFocus = !0, this._pauseTime = 0, this._coolDown = 0, this.delta = 0, this.deltaIndex = 0, this.deltaHistory = [], this.deltaSmoothingMax = s(e, "deltaHistory", 10), this.panicMax = s(e, "panicMax", 120), this.rawDelta = 0, this.now = 0, this.smoothStep = s(e, "smoothStep", !0) }, blur: function() { this.inFocus = !1 }, focus: function() { this.inFocus = !0, this.resetDelta() }, pause: function() { this._pauseTime = window.performance.now() }, resume: function() { this.resetDelta(), this.startTime += this.time - this._pauseTime }, resetDelta: function() { var t = window.performance.now(); this.time = t, this.lastTime = t, this.nextFpsUpdate = t + 1e3; for (var e = this.framesThisSecond = 0; e < this.deltaSmoothingMax; e++) this.deltaHistory[e] = Math.min(this._target, this.deltaHistory[e]); this.delta = 0, this.deltaIndex = 0, this._coolDown = this.panicMax }, start: function(t) { if (this.started) return this; this.started = !0, this.running = !0; for (var e = 0; e < this.deltaSmoothingMax; e++) this.deltaHistory[e] = this._target; this.resetDelta(), this.startTime = window.performance.now(), this.callback = t, this.raf.start(this.step.bind(this), this.forceSetTimeOut, this._target) }, step: function() { var t = window.performance.now() , e = (this.now = t) - this.lastTime; e < 0 && (e = 0), this.rawDelta = e; var i = this.deltaIndex , n = this.deltaHistory , s = this.deltaSmoothingMax , r = e , o = e; if (this.smoothStep) { (0 < this._coolDown || !this.inFocus) && (this._coolDown--, r = Math.min(r, this._target)), r > this._min && (r = n[i], r = Math.min(r, this._min)), n[i] = r, this.deltaIndex++, this.deltaIndex > s && (this.deltaIndex = 0); for (var a = o = 0; a < s; a++) o += n[a]; o /= s } this.delta = o, this.time += this.rawDelta, t > this.nextFpsUpdate && (this.actualFps = .25 * this.framesThisSecond + .75 * this.actualFps, this.nextFpsUpdate = t + 1e3, this.framesThisSecond = 0), this.framesThisSecond++; var h = o / this._target; this.callback(t, o, h), this.lastTime = t, this.frame++ }, tick: function() { this.step() }, sleep: function() { this.running && (this.raf.stop(), this.running = !1) }, wake: function(t) { this.running || (t && (this.startTime += -this.lastTime + (this.lastTime + window.performance.now())), this.raf.start(this.step.bind(this), this.useRAF), this.running = !0, this.step()) }, getDuration: function() { return Math.round(this.lastTime - this.startTime) / 1e3 }, getDurationMS: function() { return Math.round(this.lastTime - this.startTime) }, stop: function() { return this.running = !1, this.started = !1, this.raf.stop(), this }, destroy: function() { this.stop(), this.callback = r, this.raf = null, this.game = null } }); t.exports = a } , function(t, e, i) { var n = i(0) , s = i(1) , r = new n({ initialize: function() { this.isRunning = !1, this.callback = s, this.tick = 0, this.isSetTimeOut = !1, this.timeOutID = null, this.lastTime = 0, this.target = 0; var n = this; this.step = function t() { var e = window.performance.now(); n.lastTime = n.tick, n.tick = e, n.callback(e), n.timeOutID = window.requestAnimationFrame(t) } , this.stepTimeout = function t() { var e = Date.now() , i = Math.min(Math.max(2 * n.target + n.tick - e, 0), n.target); n.lastTime = n.tick, n.tick = e, n.callback(e), n.timeOutID = window.setTimeout(t, i) } }, start: function(t, e, i) { this.isRunning || (this.callback = t, this.isSetTimeOut = e, this.target = i, this.isRunning = !0, this.timeOutID = e ? window.setTimeout(this.stepTimeout, 0) : window.requestAnimationFrame(this.step)) }, stop: function() { this.isRunning = !1, this.isSetTimeOut ? clearTimeout(this.timeOutID) : window.cancelAnimationFrame(this.timeOutID) }, destroy: function() { this.stop(), this.callback = s } }); t.exports = r } , function(t, e, i) { var n = i(20); t.exports = function(t) { var e, i = t.events; void 0 !== document.hidden ? e = "visibilitychange" : ["webkit", "moz", "ms"].forEach(function(t) { void 0 !== document[t + "Hidden"] && (document.hidden = function() { return document[t + "Hidden"] } , e = t + "visibilitychange") }); e && document.addEventListener(e, function(t) { document.hidden || "pause" === t.type ? i.emit(n.HIDDEN) : i.emit(n.VISIBLE) }, !1), window.onblur = function() { i.emit(n.BLUR) } , window.onfocus = function() { i.emit(n.FOCUS) } , window.focus && t.config.autoFocus && window.focus() } } , function(t, e, i) { var m = i(347) , y = i(26) , x = i(6); t.exports = function(t) { var e = x(t, "data", []) , i = x(t, "canvas", null) , n = x(t, "palette", m) , s = x(t, "pixelWidth", 1) , r = x(t, "pixelHeight", s) , o = x(t, "resizeCanvas", !0) , a = x(t, "clearCanvas", !0) , h = x(t, "preRender", null) , l = x(t, "postRender", null) , u = Math.floor(Math.abs(e[0].length * s)) , c = Math.floor(Math.abs(e.length * r)); i || (i = y.create2D(this, u, c), a = o = !1), o && (i.width = u, i.height = c); var d = i.getContext("2d"); a && d.clearRect(0, 0, u, c), h && h(i, d); for (var f = 0; f < e.length; f++) for (var p = e[f], g = 0; g < p.length; g++) { var v = p[g]; "." !== v && " " !== v && (d.fillStyle = n[v], d.fillRect(g * s, f * r, s, r)) } return l && l(i, d), i } } , function(t, e) { t.exports = { 0: "#000", 1: "#9D9D9D", 2: "#FFF", 3: "#BE2633", 4: "#E06F8B", 5: "#493C2B", 6: "#A46422", 7: "#EB8931", 8: "#F7E26B", 9: "#2F484E", A: "#44891A", B: "#A3CE27", C: "#1B2632", D: "#005784", E: "#31A2F2", F: "#B2DCEF" } } , function(t, e, i) { var n = i(0) , o = i(326) , s = i(81) , a = i(3) , h = new n({ Extends: s, initialize: function(t, e, i, n) { s.call(this, "CubicBezierCurve"), Array.isArray(t) && (n = new a(t[6],t[7]), i = new a(t[4],t[5]), e = new a(t[2],t[3]), t = new a(t[0],t[1])), this.p0 = t, this.p1 = e, this.p2 = i, this.p3 = n }, getStartPoint: function(t) { return void 0 === t && (t = new a), t.copy(this.p0) }, getResolution: function(t) { return t }, getPoint: function(t, e) { void 0 === e && (e = new a); var i = this.p0 , n = this.p1 , s = this.p2 , r = this.p3; return e.set(o(t, i.x, n.x, s.x, r.x), o(t, i.y, n.y, s.y, r.y)) }, draw: function(t, e) { void 0 === e && (e = 32); var i = this.getPoints(e); t.beginPath(), t.moveTo(this.p0.x, this.p0.y); for (var n = 1; n < i.length; n++) t.lineTo(i[n].x, i[n].y); return t.strokePath(), t }, toJSON: function() { return { type: this.type, points: [this.p0.x, this.p0.y, this.p1.x, this.p1.y, this.p2.x, this.p2.y, this.p3.x, this.p3.y] } } }); h.fromJSON = function(t) { var e = t.points , i = new a(e[0],e[1]) , n = new a(e[2],e[3]) , s = new a(e[4],e[5]) , r = new a(e[6],e[7]); return new h(i,n,s,r) } , t.exports = h } , function(t, e, i) { var n = i(0) , l = i(81) , u = i(39) , c = i(6) , s = i(173) , d = i(3) , r = new n({ Extends: l, initialize: function(t, e, i, n, s, r, o, a) { var h; "object" == typeof t ? (t = c(h = t, "x", 0), e = c(h, "y", 0), i = c(h, "xRadius", 0), n = c(h, "yRadius", i), s = c(h, "startAngle", 0), r = c(h, "endAngle", 360), o = c(h, "clockwise", !1), a = c(h, "rotation", 0)) : (void 0 === n && (n = i), void 0 === s && (s = 0), void 0 === r && (r = 360), void 0 === o && (o = !1), void 0 === a && (a = 0)), l.call(this, "EllipseCurve"), this.p0 = new d(t,e), this._xRadius = i, this._yRadius = n, this._startAngle = u(s), this._endAngle = u(r), this._clockwise = o, this._rotation = u(a) }, getStartPoint: function(t) { return void 0 === t && (t = new d), this.getPoint(0, t) }, getResolution: function(t) { return 2 * t }, getPoint: function(t, e) { void 0 === e && (e = new d); for (var i = 2 * Math.PI, n = this._endAngle - this._startAngle, s = Math.abs(n) < Number.EPSILON; n < 0; ) n += i; for (; i < n; ) n -= i; n < Number.EPSILON && (n = s ? 0 : i), this._clockwise && !s && (n === i ? n = -i : n -= i); var r, o, a, h, l = this._startAngle + t * n, u = this.p0.x + this._xRadius * Math.cos(l), c = this.p0.y + this._yRadius * Math.sin(l); return 0 !== this._rotation && (r = Math.cos(this._rotation), o = Math.sin(this._rotation), u = (a = u - this.p0.x) * r - (h = c - this.p0.y) * o + this.p0.x, c = a * o + h * r + this.p0.y), e.set(u, c) }, setXRadius: function(t) { return this.xRadius = t, this }, setYRadius: function(t) { return this.yRadius = t, this }, setWidth: function(t) { return this.xRadius = t / 2, this }, setHeight: function(t) { return this.yRadius = t / 2, this }, setStartAngle: function(t) { return this.startAngle = t, this }, setEndAngle: function(t) { return this.endAngle = t, this }, setClockwise: function(t) { return this.clockwise = t, this }, setRotation: function(t) { return this.rotation = t, this }, x: { get: function() { return this.p0.x }, set: function(t) { this.p0.x = t } }, y: { get: function() { return this.p0.y }, set: function(t) { this.p0.y = t } }, xRadius: { get: function() { return this._xRadius }, set: function(t) { this._xRadius = t } }, yRadius: { get: function() { return this._yRadius }, set: function(t) { this._yRadius = t } }, startAngle: { get: function() { return s(this._startAngle) }, set: function(t) { this._startAngle = u(t) } }, endAngle: { get: function() { return s(this._endAngle) }, set: function(t) { this._endAngle = u(t) } }, clockwise: { get: function() { return this._clockwise }, set: function(t) { this._clockwise = t } }, angle: { get: function() { return s(this._rotation) }, set: function(t) { this._rotation = u(t) } }, rotation: { get: function() { return this._rotation }, set: function(t) { this._rotation = t } }, toJSON: function() { return { type: this.type, x: this.p0.x, y: this.p0.y, xRadius: this._xRadius, yRadius: this._yRadius, startAngle: s(this._startAngle), endAngle: s(this._endAngle), clockwise: this._clockwise, rotation: s(this._rotation) } } }); r.fromJSON = function(t) { return new r(t) } , t.exports = r } , function(t, e, i) { var n = i(0) , s = i(81) , r = i(176) , o = i(11) , a = i(3) , h = new a , l = new n({ Extends: s, initialize: function(t, e) { s.call(this, "LineCurve"), Array.isArray(t) && (e = new a(t[2],t[3]), t = new a(t[0],t[1])), this.p0 = t, this.p1 = e, this.arcLengthDivisions = 1 }, getBounds: function(t) { return void 0 === t && (t = new o), r([this.p0, this.p1], t) }, getStartPoint: function(t) { return void 0 === t && (t = new a), t.copy(this.p0) }, getResolution: function(t) { return void 0 === t && (t = 1), t }, getPoint: function(t, e) { return void 0 === e && (e = new a), 1 === t ? e.copy(this.p1) : (e.copy(this.p1).subtract(this.p0).scale(t).add(this.p0), e) }, getPointAt: function(t, e) { return this.getPoint(t, e) }, getTangent: function() { return h.copy(this.p1).subtract(this.p0).normalize() }, getUtoTmapping: function(t, e, i) { var n, s; return e ? (s = (n = this.getLengths(i))[n.length - 1], Math.min(e, s) / s) : t }, draw: function(t) { return t.lineBetween(this.p0.x, this.p0.y, this.p1.x, this.p1.y), t }, toJSON: function() { return { type: this.type, points: [this.p0.x, this.p0.y, this.p1.x, this.p1.y] } } }); l.fromJSON = function(t) { var e = t.points , i = new a(e[0],e[1]) , n = new a(e[2],e[3]); return new l(i,n) } , t.exports = l } , function(t, e, i) { var n = i(0) , s = i(81) , r = i(327) , o = i(3) , a = new n({ Extends: s, initialize: function(t, e, i) { s.call(this, "QuadraticBezier"), Array.isArray(t) && (i = new o(t[4],t[5]), e = new o(t[2],t[3]), t = new o(t[0],t[1])), this.p0 = t, this.p1 = e, this.p2 = i }, getStartPoint: function(t) { return void 0 === t && (t = new o), t.copy(this.p0) }, getResolution: function(t) { return t }, getPoint: function(t, e) { void 0 === e && (e = new o); var i = this.p0 , n = this.p1 , s = this.p2; return e.set(r(t, i.x, n.x, s.x), r(t, i.y, n.y, s.y)) }, draw: function(t, e) { void 0 === e && (e = 32); var i = this.getPoints(e); t.beginPath(), t.moveTo(this.p0.x, this.p0.y); for (var n = 1; n < i.length; n++) t.lineTo(i[n].x, i[n].y); return t.strokePath(), t }, toJSON: function() { return { type: this.type, points: [this.p0.x, this.p0.y, this.p1.x, this.p1.y, this.p2.x, this.p2.y] } } }); a.fromJSON = function(t) { var e = t.points , i = new o(e[0],e[1]) , n = new o(e[2],e[3]) , s = new o(e[4],e[5]); return new a(i,n,s) } , t.exports = a } , function(t, e, i) { var u = i(171) , n = i(0) , s = i(81) , c = i(3) , r = new n({ Extends: s, initialize: function(t) { void 0 === t && (t = []), s.call(this, "SplineCurve"), this.points = [], this.addPoints(t) }, addPoints: function(t) { for (var e = 0; e < t.length; e++) { var i = new c; "number" == typeof t[e] ? (i.x = t[e], i.y = t[e + 1], e++) : Array.isArray(t[e]) ? (i.x = t[e][0], i.y = t[e][1]) : (i.x = t[e].x, i.y = t[e].y), this.points.push(i) } return this }, addPoint: function(t, e) { var i = new c(t,e); return this.points.push(i), i }, getStartPoint: function(t) { return void 0 === t && (t = new c), t.copy(this.points[0]) }, getResolution: function(t) { return t * this.points.length }, getPoint: function(t, e) { void 0 === e && (e = new c); var i = this.points , n = (i.length - 1) * t , s = Math.floor(n) , r = n - s , o = i[0 === s ? s : s - 1] , a = i[s] , h = i[s > i.length - 2 ? i.length - 1 : s + 1] , l = i[s > i.length - 3 ? i.length - 1 : s + 2]; return e.set(u(r, o.x, a.x, h.x, l.x), u(r, o.y, a.y, h.y, l.y)) }, toJSON: function() { for (var t = [], e = 0; e < this.points.length; e++) t.push(this.points[e].x), t.push(this.points[e].y); return { type: this.type, points: t } } }); r.fromJSON = function(t) { return new r(t.points) } , t.exports = r } , function(t, e, i) { var n = new (i(0))({ initialize: function(t, e, i, n) { e && "" !== e || (e = ["precision mediump float;", "uniform vec2 resolution;", "varying vec2 fragCoord;", "void main () {", " vec2 uv = fragCoord / resolution.xy;", " gl_FragColor = vec4(uv.xyx, 1.0);", "}"].join("\n")), i && "" !== i || (i = ["precision mediump float;", "uniform mat4 uProjectionMatrix;", "uniform mat4 uViewMatrix;", "uniform vec2 uResolution;", "attribute vec2 inPosition;", "varying vec2 fragCoord;", "void main () {", "gl_Position = uProjectionMatrix * uViewMatrix * vec4(inPosition, 1.0, 1.0);", "fragCoord = vec2(inPosition.x, uResolution.y - inPosition.y);", "}"].join("\n")), void 0 === n && (n = null), this.key = t, this.fragmentSrc = e, this.vertexSrc = i, this.uniforms = n } }); t.exports = n } , function(t, e, i) { var n = i(31); n.ColorToRGBA = i(811), n.ComponentToHex = i(355), n.GetColor = i(165), n.GetColor32 = i(295), n.HexStringToColor = i(294), n.HSLToColor = i(812), n.HSVColorWheel = i(813), n.HSVToRGB = i(166), n.HueToComponent = i(356), n.IntegerToColor = i(297), n.IntegerToRGB = i(298), n.Interpolate = i(814), n.ObjectToColor = i(299), n.RandomRGB = i(815), n.RGBStringToColor = i(300), n.RGBToHSV = i(296), n.RGBToString = i(816), n.ValueToColor = i(164), t.exports = n } , function(t, e) { t.exports = function(t) { var e = t.toString(16); return 1 === e.length ? "0" + e : e } } , function(t, e) { t.exports = function(t, e, i) { return i < 0 && (i += 1), 1 < i && --i, i < 1 / 6 ? t + 6 * (e - t) * i : i < .5 ? e : i < 2 / 3 ? t + (e - t) * (2 / 3 - i) * 6 : t } } , function(t, e, i) { var n = i(117); t.exports = function(t) { var e; "complete" !== document.readyState && "interactive" !== document.readyState ? (e = function() { document.removeEventListener("deviceready", e, !0), document.removeEventListener("DOMContentLoaded", e, !0), window.removeEventListener("load", e, !0), t() } , document.body ? n.cordova ? document.addEventListener("deviceready", e, !1) : (document.addEventListener("DOMContentLoaded", e, !0), window.addEventListener("load", e, !0)) : window.setTimeout(e, 20)) : t() } } , function(t, e, i) { var s = i(177); t.exports = function(t, e) { var i = window.screen , n = !!i && (i.orientation || i.mozOrientation || i.msOrientation); if (n && "string" == typeof n.type) return n.type; if ("string" == typeof n) return n; if (i) return i.height > i.width ? s.ORIENTATION.PORTRAIT : s.ORIENTATION.LANDSCAPE; if ("number" == typeof window.orientation) return 0 === window.orientation || 180 === window.orientation ? s.ORIENTATION.PORTRAIT : s.ORIENTATION.LANDSCAPE; if (window.matchMedia) { if (window.matchMedia("(orientation: portrait)").matches) return s.ORIENTATION.PORTRAIT; if (window.matchMedia("(orientation: landscape)").matches) return s.ORIENTATION.LANDSCAPE } return t < e ? s.ORIENTATION.PORTRAIT : s.ORIENTATION.LANDSCAPE } } , function(t, e) { t.exports = { NO_CENTER: 0, CENTER_BOTH: 1, CENTER_HORIZONTALLY: 2, CENTER_VERTICALLY: 3 } } , function(t, e) { t.exports = { LANDSCAPE: "landscape-primary", PORTRAIT: "portrait-primary" } } , function(t, e) { t.exports = { NONE: 0, WIDTH_CONTROLS_HEIGHT: 1, HEIGHT_CONTROLS_WIDTH: 2, FIT: 3, ENVELOP: 4, RESIZE: 5 } } , function(t, e) { t.exports = { NO_ZOOM: 1, ZOOM_2X: 2, ZOOM_4X: 4, MAX_ZOOM: -1 } } , function(t, e) { t.exports = function(t) { var e; return "" !== t && ("string" == typeof t ? e = document.getElementById(t) : t && 1 === t.nodeType && (e = t)), e = e || document.body } } , function(t, e) { t.exports = function(t) { var e = ""; try { window.DOMParser ? e = (new DOMParser).parseFromString(t, "text/xml") : (e = new ActiveXObject("Microsoft.XMLDOM")).loadXML(t) } catch (t) { e = null } return e && e.documentElement && !e.getElementsByTagName("parsererror").length ? e : null } } , function(t, e, i) { var n = i(0) , a = i(179) , s = i(10) , r = i(54) , o = i(20) , h = i(366) , l = i(367) , u = i(368) , c = i(369) , d = i(29) , v = i(333) , f = new n({ initialize: function(t, e) { this.game = t, this.scaleManager, this.canvas, this.config = e, this.enabled = !0, this.events = new s, this.isOver = !0, this.defaultCursor = "", this.keyboard = e.inputKeyboard ? new h(this) : null, this.mouse = e.inputMouse ? new l(this) : null, this.touch = e.inputTouch ? new c(this) : null, this.pointers = [], this.pointersTotal = e.inputActivePointers, e.inputTouch && 1 === this.pointersTotal && (this.pointersTotal = 2); for (var i = 0; i <= this.pointersTotal; i++) { var n = new u(this,i); n.smoothFactor = e.inputSmoothFactor, this.pointers.push(n) } this.mousePointer = e.inputMouse ? this.pointers[0] : null, this.activePointer = this.pointers[0], this.globalTopOnly = !0, this.time = 0, this._tempPoint = { x: 0, y: 0 }, this._tempHitTest = [], this._tempMatrix = new d, this._tempMatrix2 = new d, this._tempSkip = !1, this.mousePointerContainer = [this.mousePointer], t.events.once(o.BOOT, this.boot, this) }, boot: function() { this.canvas = this.game.canvas, this.scaleManager = this.game.scale, this.events.emit(r.MANAGER_BOOT), this.game.events.on(o.PRE_RENDER, this.preRender, this), this.game.events.once(o.DESTROY, this.destroy, this) }, setCanvasOver: function(t) { this.isOver = !0, this.events.emit(r.GAME_OVER, t) }, setCanvasOut: function(t) { this.isOver = !1, this.events.emit(r.GAME_OUT, t) }, preRender: function() { var t = this.game.loop.now , e = this.game.loop.delta , i = this.game.scene.getScenes(!0, !0); this.time = t, this.events.emit(r.MANAGER_UPDATE); for (var n = 0; n < i.length; n++) { var s = i[n]; if (s.sys.input && s.sys.input.updatePoll(t, e) && this.globalTopOnly) return } }, setDefaultCursor: function(t) { this.defaultCursor = t, this.canvas.style.cursor !== t && (this.canvas.style.cursor = t) }, setCursor: function(t) { t.cursor && (this.canvas.style.cursor = t.cursor) }, resetCursor: function(t) { t.cursor && this.canvas && (this.canvas.style.cursor = this.defaultCursor) }, addPointer: function(t) { void 0 === t && (t = 1); var e = []; 10 < this.pointersTotal + t && (t = 10 - this.pointersTotal); for (var i = 0; i < t; i++) { var n = this.pointers.length , s = new u(this,n); s.smoothFactor = this.config.inputSmoothFactor, this.pointers.push(s), this.pointersTotal++, e.push(s) } return e }, updateInputPlugins: function(t, e) { var i = this.game.scene.getScenes(!0, !0); this._tempSkip = !1; for (var n = 0; n < i.length; n++) { var s = i[n]; if (s.sys.input) if (s.sys.input.update(t, e) && this.globalTopOnly || this._tempSkip) return } }, onTouchStart: function(t) { for (var e = this.pointers, i = [], n = 0; n < t.changedTouches.length; n++) for (var s = t.changedTouches[n], r = 1; r < this.pointersTotal; r++) { var o = e[r]; if (!o.active) { o.touchstart(s, t), this.activePointer = o, i.push(o); break } } this.updateInputPlugins(a.TOUCH_START, i) }, onTouchMove: function(t) { for (var e = this.pointers, i = [], n = 0; n < t.changedTouches.length; n++) for (var s = t.changedTouches[n], r = 1; r < this.pointersTotal; r++) { var o = e[r]; if (o.active && o.identifier === s.identifier) { o.touchmove(s, t), this.activePointer = o, i.push(o); break } } this.updateInputPlugins(a.TOUCH_MOVE, i) }, onTouchEnd: function(t) { for (var e = this.pointers, i = [], n = 0; n < t.changedTouches.length; n++) for (var s = t.changedTouches[n], r = 1; r < this.pointersTotal; r++) { var o = e[r]; if (o.active && o.identifier === s.identifier) { o.touchend(s, t), i.push(o); break } } this.updateInputPlugins(a.TOUCH_END, i) }, onTouchCancel: function(t) { for (var e = this.pointers, i = [], n = 0; n < t.changedTouches.length; n++) for (var s = t.changedTouches[n], r = 1; r < this.pointersTotal; r++) { var o = e[r]; if (o.active && o.identifier === s.identifier) { o.touchcancel(s, t), i.push(o); break } } this.updateInputPlugins(a.TOUCH_CANCEL, i) }, onMouseDown: function(t) { this.mousePointer.down(t), this.mousePointer.updateMotion(), this.updateInputPlugins(a.MOUSE_DOWN, this.mousePointerContainer) }, onMouseMove: function(t) { this.mousePointer.move(t), this.mousePointer.updateMotion(), this.updateInputPlugins(a.MOUSE_MOVE, this.mousePointerContainer) }, onMouseUp: function(t) { this.mousePointer.up(t), this.mousePointer.updateMotion(), this.updateInputPlugins(a.MOUSE_UP, this.mousePointerContainer) }, onMouseWheel: function(t) { this.mousePointer.wheel(t), this.updateInputPlugins(a.MOUSE_WHEEL, this.mousePointerContainer) }, onPointerLockChange: function(t) { var e = this.mouse.locked; this.mousePointer.locked = e, this.events.emit(r.POINTERLOCK_CHANGE, t, e) }, inputCandidate: function(t, e) { var i = t.input; if (!i || !i.enabled || !i.alwaysEnabled && !t.willRender(e)) return !1; var n = !0 , s = t.parentContainer; if (s) do { if (!s.willRender(e)) { n = !1; break } s = s.parentContainer } while (s); return n }, hitTest: function(t, e, i, n) { void 0 === n && (n = this._tempHitTest); var s = this._tempPoint , r = i.scrollX , o = i.scrollY; n.length = 0; var a = t.x , h = t.y; 1 !== i.resolution && (a += i._x, h += i._y), i.getWorldPoint(a, h, s), t.worldX = s.x, t.worldY = s.y; for (var l = { x: 0, y: 0 }, u = this._tempMatrix, c = this._tempMatrix2, d = 0; d < e.length; d++) { var f, p, g = e[d]; this.inputCandidate(g, i) && (f = s.x + r * g.scrollFactorX - r, p = s.y + o * g.scrollFactorY - o, g.parentContainer ? (g.getWorldTransformMatrix(u, c), u.applyInverse(f, p, l)) : v(f, p, g.x, g.y, g.rotation, g.scaleX, g.scaleY, l), this.pointWithinHitArea(g, l.x, l.y) && n.push(g)) } return n }, pointWithinHitArea: function(t, e, i) { e += t.displayOriginX, i += t.displayOriginY; var n = t.input; return !(!n || !n.hitAreaCallback(n.hitArea, e, i, t)) && (n.localX = e, n.localY = i, !0) }, pointWithinInteractiveObject: function(t, e, i) { return !!t.hitArea && (e += t.gameObject.displayOriginX, i += t.gameObject.displayOriginY, t.localX = e, t.localY = i, t.hitAreaCallback(t.hitArea, e, i, t)) }, transformPointer: function(t, e, i, n) { var s = t.position , r = t.prevPosition; r.x = s.x, r.y = s.y; var o = this.scaleManager.transformX(e) , a = this.scaleManager.transformY(i) , h = t.smoothFactor; n && 0 !== h ? (s.x = o * h + r.x * (1 - h), s.y = a * h + r.y * (1 - h)) : (s.x = o, s.y = a) }, destroy: function() { this.events.removeAllListeners(), this.game.events.off(o.PRE_RENDER), this.keyboard && this.keyboard.destroy(), this.mouse && this.mouse.destroy(), this.touch && this.touch.destroy(); for (var t = 0; t < this.pointers.length; t++) this.pointers[t].destroy(); this.pointers = [], this._tempHitTest = [], this._tempMatrix.destroy(), this.canvas = null, this.game = null } }); t.exports = f } , function(t, e, i) { var s = i(123) , n = i(0) , r = i(20) , o = i(54) , a = i(124) , h = i(1) , l = new n({ initialize: function(t) { this.manager = t, this.queue = [], this.preventDefault = !0, this.captures = [], this.enabled = !1, this.target, this.onKeyDown = h, this.onKeyUp = h, t.events.once(o.MANAGER_BOOT, this.boot, this) }, boot: function() { var t = this.manager.config; this.enabled = t.inputKeyboard, this.target = t.inputKeyboardEventTarget, this.addCapture(t.inputKeyboardCapture), !this.target && window && (this.target = window), this.enabled && this.target && this.startListeners(), this.manager.game.events.on(r.POST_STEP, this.postUpdate, this) }, startListeners: function() { var i = this; this.onKeyDown = function(t) { var e; !t.defaultPrevented && i.enabled && i.manager && (i.queue.push(t), i.manager.useQueue || i.manager.events.emit(o.MANAGER_PROCESS), e = t.altKey || t.ctrlKey || t.shiftKey || t.metaKey, i.preventDefault && !e && -1 < i.captures.indexOf(t.keyCode) && t.preventDefault()) } , this.onKeyUp = function(t) { var e; !t.defaultPrevented && i.enabled && i.manager && (i.queue.push(t), i.manager.useQueue || i.manager.events.emit(o.MANAGER_PROCESS), e = t.altKey || t.ctrlKey || t.shiftKey || t.metaKey, i.preventDefault && !e && -1 < i.captures.indexOf(t.keyCode) && t.preventDefault()) } ; var t = this.target; t && (t.addEventListener("keydown", this.onKeyDown, !1), t.addEventListener("keyup", this.onKeyUp, !1), this.enabled = !0) }, stopListeners: function() { var t = this.target; t.removeEventListener("keydown", this.onKeyDown, !1), t.removeEventListener("keyup", this.onKeyUp, !1), this.enabled = !1 }, postUpdate: function() { this.queue = [] }, addCapture: function(t) { "string" == typeof t && (t = t.split(",")), Array.isArray(t) || (t = [t]); for (var e = this.captures, i = 0; i < t.length; i++) { var n = t[i]; "string" == typeof n && (n = a[n.trim().toUpperCase()]), -1 === e.indexOf(n) && e.push(n) } this.preventDefault = 0 < e.length }, removeCapture: function(t) { "string" == typeof t && (t = t.split(",")), Array.isArray(t) || (t = [t]); for (var e = this.captures, i = 0; i < t.length; i++) { var n = t[i]; "string" == typeof n && (n = a[n.toUpperCase()]), s(e, n) } this.preventDefault = 0 < e.length }, clearCaptures: function() { this.captures = [], this.preventDefault = !1 }, destroy: function() { this.stopListeners(), this.clearCaptures(), this.queue = [], this.manager.game.events.off(r.POST_RENDER, this.postUpdate, this), this.target = null, this.enabled = !1, this.manager = null } }); t.exports = l } , function(t, e, i) { var n = i(0) , o = i(169) , s = i(54) , r = i(1) , a = new n({ initialize: function(t) { this.manager = t, this.capture = !0, this.enabled = !1, this.target, this.locked = !1, this.onMouseMove = r, this.onMouseDown = r, this.onMouseUp = r, this.onMouseDownWindow = r, this.onMouseUpWindow = r, this.onMouseOver = r, this.onMouseOut = r, this.onMouseWheel = r, this.pointerLockChange = r, t.events.once(s.MANAGER_BOOT, this.boot, this) }, boot: function() { var t = this.manager.config; this.enabled = t.inputMouse, this.target = t.inputMouseEventTarget, this.capture = t.inputMouseCapture, this.target ? "string" == typeof this.target && (this.target = document.getElementById(this.target)) : this.target = this.manager.game.canvas, t.disableContextMenu && this.disableContextMenu(), this.enabled && this.target && this.startListeners() }, disableContextMenu: function() { return document.body.addEventListener("contextmenu", function(t) { return t.preventDefault(), !1 }), this }, requestPointerLock: function() { var t; o.pointerLock && ((t = this.target).requestPointerLock = t.requestPointerLock || t.mozRequestPointerLock || t.webkitRequestPointerLock, t.requestPointerLock()) }, releasePointerLock: function() { o.pointerLock && (document.exitPointerLock = document.exitPointerLock || document.mozExitPointerLock || document.webkitExitPointerLock, document.exitPointerLock()) }, startListeners: function() { var i = this , e = this.manager.canvas , n = window && window.focus && this.manager.game.config.autoFocus; this.onMouseMove = function(t) { !t.defaultPrevented && i.enabled && i.manager && i.manager.enabled && (i.manager.onMouseMove(t), i.capture && t.preventDefault()) } , this.onMouseDown = function(t) { n && window.focus(), !t.defaultPrevented && i.enabled && i.manager && i.manager.enabled && (i.manager.onMouseDown(t), i.capture && t.target === e && t.preventDefault()) } , this.onMouseDownWindow = function(t) { !t.defaultPrevented && i.enabled && i.manager && i.manager.enabled && t.target !== e && i.manager.onMouseDown(t) } , this.onMouseUp = function(t) { !t.defaultPrevented && i.enabled && i.manager && i.manager.enabled && (i.manager.onMouseUp(t), i.capture && t.target === e && t.preventDefault()) } , this.onMouseUpWindow = function(t) { !t.defaultPrevented && i.enabled && i.manager && i.manager.enabled && t.target !== e && i.manager.onMouseUp(t) } , this.onMouseOver = function(t) { !t.defaultPrevented && i.enabled && i.manager && i.manager.enabled && i.manager.setCanvasOver(t) } , this.onMouseOut = function(t) { !t.defaultPrevented && i.enabled && i.manager && i.manager.enabled && i.manager.setCanvasOut(t) } , this.onMouseWheel = function(t) { !t.defaultPrevented && i.enabled && i.manager && i.manager.enabled && i.manager.onMouseWheel(t) } ; var t, s, r = this.target; r && (s = { passive: !(t = { passive: !0 }) }, r.addEventListener("mousemove", this.onMouseMove, this.capture ? s : t), r.addEventListener("mousedown", this.onMouseDown, this.capture ? s : t), r.addEventListener("mouseup", this.onMouseUp, this.capture ? s : t), r.addEventListener("mouseover", this.onMouseOver, this.capture ? s : t), r.addEventListener("mouseout", this.onMouseOut, this.capture ? s : t), r.addEventListener("wheel", this.onMouseWheel, this.capture ? s : t), window && this.manager.game.config.inputWindowEvents && (window.addEventListener("mousedown", this.onMouseDownWindow, s), window.addEventListener("mouseup", this.onMouseUpWindow, s)), o.pointerLock && (this.pointerLockChange = function(t) { var e = i.target; i.locked = document.pointerLockElement === e || document.mozPointerLockElement === e || document.webkitPointerLockElement === e, i.manager.onPointerLockChange(t) } , document.addEventListener("pointerlockchange", this.pointerLockChange, !0), document.addEventListener("mozpointerlockchange", this.pointerLockChange, !0), document.addEventListener("webkitpointerlockchange", this.pointerLockChange, !0)), this.enabled = !0) }, stopListeners: function() { var t = this.target; t.removeEventListener("mousemove", this.onMouseMove), t.removeEventListener("mousedown", this.onMouseDown), t.removeEventListener("mouseup", this.onMouseUp), t.removeEventListener("mouseover", this.onMouseOver), t.removeEventListener("mouseout", this.onMouseOut), window && (window.removeEventListener("mousedown", this.onMouseDownWindow), window.removeEventListener("mouseup", this.onMouseUpWindow)), o.pointerLock && (document.removeEventListener("pointerlockchange", this.pointerLockChange, !0), document.removeEventListener("mozpointerlockchange", this.pointerLockChange, !0), document.removeEventListener("webkitpointerlockchange", this.pointerLockChange, !0)) }, destroy: function() { this.stopListeners(), this.target = null, this.enabled = !1, this.manager = null } }); t.exports = a } , function(t, e, i) { var h = i(317) , n = i(0) , s = i(53) , l = i(106) , u = i(328) , r = i(3) , o = new n({ initialize: function(t, e) { this.manager = t, this.id = e, this.event, this.downElement, this.upElement, this.camera = null, this.button = 0, this.buttons = 0, this.position = new r, this.prevPosition = new r, this.midPoint = new r(-1,-1), this.velocity = new r, this.angle = 0, this.distance = 0, this.smoothFactor = 0, this.motionFactor = .2, this.worldX = 0, this.worldY = 0, this.moveTime = 0, this.downX = 0, this.downY = 0, this.downTime = 0, this.upX = 0, this.upY = 0, this.upTime = 0, this.primaryDown = !1, this.isDown = !1, this.wasTouch = !1, this.wasCanceled = !1, this.movementX = 0, this.movementY = 0, this.identifier = 0, this.pointerId = null, this.active = 0 === e, this.locked = !1, this.deltaX = 0, this.deltaY = 0, this.deltaZ = 0 }, updateWorldPoint: function(t) { var e = this.x , i = this.y; 1 !== t.resolution && (e += t._x, i += t._y); var n = t.getWorldPoint(e, i); return this.worldX = n.x, this.worldY = n.y, this }, positionToCamera: function(t, e) { return t.getWorldPoint(this.x, this.y, e) }, updateMotion: function() { var t, e, i, n, s = this.position.x, r = this.position.y, o = this.midPoint.x, a = this.midPoint.y; s === o && r === a || (t = u(this.motionFactor, o, s), e = u(this.motionFactor, a, r), l(t, s, .1) && (t = s), l(e, r, .1) && (e = r), this.midPoint.set(t, e), i = s - t, n = r - e, this.velocity.set(i, n), this.angle = h(t, e, s, r), this.distance = Math.sqrt(i * i + n * n)) }, up: function(t) { "buttons"in t && (this.buttons = t.buttons), this.event = t, this.button = t.button, this.upElement = t.target, this.manager.transformPointer(this, t.pageX, t.pageY, !1), 0 === t.button && (this.primaryDown = !1, this.upX = this.x, this.upY = this.y, this.upTime = t.timeStamp), this.isDown = !1, this.wasTouch = !1 }, down: function(t) { "buttons"in t && (this.buttons = t.buttons), this.event = t, this.button = t.button, this.downElement = t.target, this.manager.transformPointer(this, t.pageX, t.pageY, !1), 0 === t.button && (this.primaryDown = !0, this.downX = this.x, this.downY = this.y, this.downTime = t.timeStamp), this.isDown = !0, this.wasTouch = !1 }, move: function(t) { "buttons"in t && (this.buttons = t.buttons), this.event = t, this.manager.transformPointer(this, t.pageX, t.pageY, !0), this.locked && (this.movementX = t.movementX || t.mozMovementX || t.webkitMovementX || 0, this.movementY = t.movementY || t.mozMovementY || t.webkitMovementY || 0), this.moveTime = t.timeStamp, this.wasTouch = !1 }, wheel: function(t) { "buttons"in t && (this.buttons = t.buttons), this.event = t, this.manager.transformPointer(this, t.pageX, t.pageY, !1), this.deltaX = t.deltaX, this.deltaY = t.deltaY, this.deltaZ = t.deltaZ, this.wasTouch = !1 }, touchstart: function(t, e) { t.pointerId && (this.pointerId = t.pointerId), this.identifier = t.identifier, this.target = t.target, this.active = !0, this.buttons = 1, this.event = e, this.downElement = t.target, this.manager.transformPointer(this, t.pageX, t.pageY, !1), this.primaryDown = !0, this.downX = this.x, this.downY = this.y, this.downTime = e.timeStamp, this.isDown = !0, this.wasTouch = !0, this.wasCanceled = !1, this.updateMotion() }, touchmove: function(t, e) { this.event = e, this.manager.transformPointer(this, t.pageX, t.pageY, !0), this.moveTime = e.timeStamp, this.wasTouch = !0, this.updateMotion() }, touchend: function(t, e) { this.buttons = 0, this.event = e, this.upElement = t.target, this.manager.transformPointer(this, t.pageX, t.pageY, !1), this.primaryDown = !1, this.upX = this.x, this.upY = this.y, this.upTime = e.timeStamp, this.isDown = !1, this.wasTouch = !0, this.wasCanceled = !1, this.active = !1, this.updateMotion() }, touchcancel: function(t, e) { this.buttons = 0, this.event = e, this.upElement = t.target, this.manager.transformPointer(this, t.pageX, t.pageY, !1), this.primaryDown = !1, this.upX = this.x, this.upY = this.y, this.upTime = e.timeStamp, this.isDown = !1, this.wasTouch = !0, this.wasCanceled = !0, this.active = !1 }, noButtonDown: function() { return 0 === this.buttons }, leftButtonDown: function() { return !!(1 & this.buttons) }, rightButtonDown: function() { return !!(2 & this.buttons) }, middleButtonDown: function() { return !!(4 & this.buttons) }, backButtonDown: function() { return !!(8 & this.buttons) }, forwardButtonDown: function() { return !!(16 & this.buttons) }, leftButtonReleased: function() { return 0 === this.button && !this.isDown }, rightButtonReleased: function() { return 2 === this.button && !this.isDown }, middleButtonReleased: function() { return 1 === this.button && !this.isDown }, backButtonReleased: function() { return 3 === this.button && !this.isDown }, forwardButtonReleased: function() { return 4 === this.button && !this.isDown }, getDistance: function() { return this.isDown ? s(this.downX, this.downY, this.x, this.y) : s(this.downX, this.downY, this.upX, this.upY) }, getDistanceX: function() { return this.isDown ? Math.abs(this.downX - this.x) : Math.abs(this.downX - this.upX) }, getDistanceY: function() { return this.isDown ? Math.abs(this.downY - this.y) : Math.abs(this.downY - this.upY) }, getDuration: function() { return this.isDown ? this.manager.time - this.downTime : this.upTime - this.downTime }, getAngle: function() { return this.isDown ? h(this.downX, this.downY, this.x, this.y) : h(this.downX, this.downY, this.upX, this.upY) }, getInterpolatedPosition: function(t, e) { void 0 === t && (t = 10), void 0 === e && (e = []); for (var i = this.prevPosition.x, n = this.prevPosition.y, s = this.position.x, r = this.position.y, o = 0; o < t; o++) { var a = 1 / t * o; e[o] = { x: u(a, i, s), y: u(a, n, r) } } return e }, destroy: function() { this.camera = null, this.manager = null, this.position = null }, x: { get: function() { return this.position.x }, set: function(t) { this.position.x = t } }, y: { get: function() { return this.position.y }, set: function(t) { this.position.y = t } }, time: { get: function() { return this.event ? this.event.timeStamp : 0 } } }); t.exports = o } , function(t, e, i) { var n = i(0) , s = i(54) , r = i(1) , o = new n({ initialize: function(t) { this.manager = t, this.capture = !0, this.enabled = !1, this.target, this.onTouchStart = r, this.onTouchStartWindow = r, this.onTouchMove = r, this.onTouchEnd = r, this.onTouchEndWindow = r, this.onTouchCancel = r, this.onTouchCancelWindow = r, this.onTouchOver = r, this.onTouchOut = r, t.events.once(s.MANAGER_BOOT, this.boot, this) }, boot: function() { var t = this.manager.config; this.enabled = t.inputTouch, this.target = t.inputTouchEventTarget, this.capture = t.inputTouchCapture, this.target || (this.target = this.manager.game.canvas), t.disableContextMenu && this.disableContextMenu(), this.enabled && this.target && this.startListeners() }, disableContextMenu: function() { return document.body.addEventListener("contextmenu", function(t) { return t.preventDefault(), !1 }), this }, startListeners: function() { var e = this , i = this.manager.canvas , n = window && window.focus && this.manager.game.config.autoFocus; this.onTouchStart = function(t) { n && window.focus(), !t.defaultPrevented && e.enabled && e.manager && e.manager.enabled && (e.manager.onTouchStart(t), e.capture && t.cancelable && t.target === i && t.preventDefault()) } , this.onTouchStartWindow = function(t) { !t.defaultPrevented && e.enabled && e.manager && e.manager.enabled && t.target !== i && e.manager.onTouchStart(t) } , this.onTouchMove = function(t) { !t.defaultPrevented && e.enabled && e.manager && e.manager.enabled && (e.manager.onTouchMove(t), e.capture && t.cancelable && t.preventDefault()) } , this.onTouchEnd = function(t) { !t.defaultPrevented && e.enabled && e.manager && e.manager.enabled && (e.manager.onTouchEnd(t), e.capture && t.cancelable && t.target === i && t.preventDefault()) } , this.onTouchEndWindow = function(t) { !t.defaultPrevented && e.enabled && e.manager && e.manager.enabled && t.target !== i && e.manager.onTouchEnd(t) } , this.onTouchCancel = function(t) { !t.defaultPrevented && e.enabled && e.manager && e.manager.enabled && (e.manager.onTouchCancel(t), e.capture && t.preventDefault()) } , this.onTouchCancelWindow = function(t) { !t.defaultPrevented && e.enabled && e.manager && e.manager.enabled && e.manager.onTouchCancel(t) } , this.onTouchOver = function(t) { !t.defaultPrevented && e.enabled && e.manager && e.manager.enabled && e.manager.setCanvasOver(t) } , this.onTouchOut = function(t) { !t.defaultPrevented && e.enabled && e.manager && e.manager.enabled && e.manager.setCanvasOut(t) } ; var t, s, r = this.target; r && (s = { passive: !(t = { passive: !0 }) }, r.addEventListener("touchstart", this.onTouchStart, this.capture ? s : t), r.addEventListener("touchmove", this.onTouchMove, this.capture ? s : t), r.addEventListener("touchend", this.onTouchEnd, this.capture ? s : t), r.addEventListener("touchcancel", this.onTouchCancel, this.capture ? s : t), r.addEventListener("touchover", this.onTouchOver, this.capture ? s : t), r.addEventListener("touchout", this.onTouchOut, this.capture ? s : t), window && this.manager.game.config.inputWindowEvents && (window.addEventListener("touchstart", this.onTouchStartWindow, s), window.addEventListener("touchend", this.onTouchEndWindow, s), window.addEventListener("touchcancel", this.onTouchCancelWindow, s)), this.enabled = !0) }, stopListeners: function() { var t = this.target; t.removeEventListener("touchstart", this.onTouchStart), t.removeEventListener("touchmove", this.onTouchMove), t.removeEventListener("touchend", this.onTouchEnd), t.removeEventListener("touchcancel", this.onTouchCancel), t.removeEventListener("touchover", this.onTouchOver), t.removeEventListener("touchout", this.onTouchOut), window && (window.removeEventListener("touchstart", this.onTouchStartWindow), window.removeEventListener("touchend", this.onTouchEndWindow)) }, destroy: function() { this.stopListeners(), this.target = null, this.enabled = !1, this.manager = null } }); t.exports = o } , function(t, e, i) { var n = i(0) , l = i(20) , s = i(10) , r = i(8) , o = i(16) , a = i(5) , u = i(2) , p = i(23) , h = i(123) , c = new n({ Extends: s, initialize: function(t) { s.call(this), this.game = t, this.plugins = [], this.scenePlugins = [], this._pendingGlobal = [], this._pendingScene = [], t.isBooted ? this.boot() : t.events.once(l.BOOT, this.boot, this) }, boot: function() { for (var t, e, i, n, s, r, o = this.game.config, a = (a = o.installGlobalPlugins).concat(this._pendingGlobal), h = 0; h < a.length; h++) t = a[h], e = u(t, "key", null), i = u(t, "plugin", null), n = u(t, "start", !1), s = u(t, "mapping", null), r = u(t, "data", null), e && (i ? this.install(e, i, n, s, r) : console.warn("Missing `plugin` for key: " + e)); for (a = (a = o.installScenePlugins).concat(this._pendingScene), h = 0; h < a.length; h++) t = a[h], e = u(t, "key", null), i = u(t, "plugin", null), s = u(t, "mapping", null), e && (i ? this.installScenePlugin(e, i, s) : console.warn("Missing `plugin` for key: " + e)); this._pendingGlobal = [], this._pendingScene = [], this.game.events.once(l.DESTROY, this.destroy, this) }, addToScene: function(t, e, i) { for (var n, s = this.game, r = t.scene, o = t.settings.map, a = t.settings.isBooted, h = 0; h < e.length; h++) s[d = e[h]] ? (t[d] = s[d], o.hasOwnProperty(d) && (r[o[d]] = t[d])) : "game" === d && o.hasOwnProperty(d) && (r[o[d]] = s); for (var l = 0; l < i.length; l++) for (n = i[l], h = 0; h < n.length; h++) { var u, c, d = n[h]; p.hasCore(d) && (c = new ((u = p.getCore(d)).plugin)(r,this), t[u.mapping] = c, u.custom ? r[u.mapping] = c : o.hasOwnProperty(u.mapping) && (r[o[u.mapping]] = c), a && c.boot()) } for (n = this.plugins, h = 0; h < n.length; h++) { var f = n[h]; f.mapping && (r[f.mapping] = f.plugin) } }, getDefaultScenePlugins: function() { return this.game.config.defaultPlugins.concat(this.scenePlugins) }, installScenePlugin: function(t, e, i, n, s) { if (void 0 === s && (s = !1), "function" == typeof e) { if (p.hasCore(t)) { if (!s && p.hasCore(t)) return void console.warn("Scene Plugin key in use: " + t) } else p.register(t, e, i, !0), this.scenePlugins.push(t); var r; n && (r = new e(n,this), n.sys[t] = r, i && "" !== i && (n[i] = r), r.boot()) } else console.warn("Invalid Scene Plugin: " + t) }, install: function(t, e, i, n, s) { if (void 0 === i && (i = !1), void 0 === n && (n = null), void 0 === s && (s = null), "function" != typeof e) return console.warn("Invalid Plugin: " + t), null; if (p.hasCustom(t)) return console.warn("Plugin key in use: " + t), null; if (null !== n && (i = !0), this.game.isBooted) { if (p.registerCustom(t, e, n, s), i) return this.start(t) } else this._pendingGlobal.push({ key: t, plugin: e, start: i, mapping: n, data: s }); return null }, getIndex: function(t) { for (var e = this.plugins, i = 0; i < e.length; i++) { if (e[i].key === t) return i } return -1 }, getEntry: function(t) { var e = this.getIndex(t); if (-1 !== e) return this.plugins[e] }, isActive: function(t) { var e = this.getEntry(t); return e && e.active }, start: function(t, e) { void 0 === e && (e = t); var i = this.getEntry(e); return i && !i.active ? (i.active = !0, i.plugin.start()) : i = i || this.createEntry(t, e), i ? i.plugin : null }, createEntry: function(t, e) { var i, n = p.getCustom(t); return n && (n = { key: e, plugin: i = new n.plugin(this), active: !0, mapping: n.mapping, data: n.data }, this.plugins.push(n), i.init(n.data), i.start()), n }, stop: function(t) { var e = this.getEntry(t); return e && e.active && (e.active = !1, e.plugin.stop()), this }, get: function(t, e) { void 0 === e && (e = !0); var i = this.getEntry(t); if (i) return i.plugin; var n = this.getClass(t); return n && e ? (i = this.createEntry(t, t)) ? i.plugin : null : n || null }, getClass: function(t) { return p.getCustomClass(t) }, removeGlobalPlugin: function(t) { var e = this.getEntry(t); e && h(this.plugins, e), p.removeCustom(t) }, removeScenePlugin: function(t) { h(this.scenePlugins, t), p.remove(t) }, registerGameObject: function(t, e, i) { return e && a.register(t, e), i && o.register(t, i), this }, removeGameObject: function(t, e, i) { return void 0 === e && (e = !0), void 0 === i && (i = !0), e && a.remove(t), i && o.remove(t), this }, registerFileType: function(t, e, i) { r.register(t, e), i && i.sys.load && (i.sys.load[t] = e) }, destroy: function() { for (var t = 0; t < this.plugins.length; t++) this.plugins[t].plugin.destroy(); p.destroyCustomPlugins(), this.game.noReturn && p.destroyCorePlugins(), this.game = null, this.plugins = [], this.scenePlugins = [] } }); t.exports = c } , function(t, e, i) { var c = i(177) , n = i(0) , s = i(10) , r = i(92) , o = i(20) , a = i(869) , h = i(363) , d = i(358) , l = i(1) , u = i(11) , f = i(372) , p = i(93) , g = i(3) , v = new n({ Extends: s, initialize: function(t) { s.call(this), this.game = t, this.canvas, this.canvasBounds = new u, this.parent = null, this.parentIsWindow = !1, this.parentSize = new f, this.gameSize = new f, this.baseSize = new f, this.displaySize = new f, this.scaleMode = c.SCALE_MODE.NONE, this.resolution = 1, this.zoom = 1, this._resetZoom = !1, this.displayScale = new g(1,1), this.autoRound = !1, this.autoCenter = c.CENTER.NO_CENTER, this.orientation = c.ORIENTATION.LANDSCAPE, this.fullscreen, this.fullscreenTarget = null, this._createdFullscreenTarget = !1, this.dirty = !1, this.resizeInterval = 500, this._lastCheck = 0, this._checkOrientation = !1, this.listeners = { orientationChange: l, windowResize: l, fullScreenChange: l, fullScreenError: l } }, preBoot: function() { this.parseConfig(this.game.config), this.game.events.once("boot", this.boot, this) }, boot: function() { var t = this.game; this.canvas = t.canvas, this.fullscreen = t.device.fullscreen, this.scaleMode !== c.SCALE_MODE.RESIZE && this.displaySize.setAspectMode(this.scaleMode), this.scaleMode === c.SCALE_MODE.NONE ? this.resize(this.width, this.height) : (this.getParentBounds(), 0 < this.parentSize.width && 0 < this.parentSize.height && this.displaySize.setParent(this.parentSize), this.refresh()), t.events.on(o.PRE_STEP, this.step, this), t.events.once(o.DESTROY, this.destroy, this), this.startListeners() }, parseConfig: function(t) { this.getParent(t), this.getParentBounds(); var e, i, n, s, r = t.width, o = t.height, a = t.scaleMode, h = t.resolution, l = t.zoom, u = t.autoRound; "string" == typeof r && (0 === (e = this.parentSize.width) && (e = window.innerWidth), i = parseInt(r, 10) / 100, r = Math.floor(e * i)), "string" == typeof o && (0 === (n = this.parentSize.height) && (n = window.innerHeight), s = parseInt(o, 10) / 100, o = Math.floor(n * s)), this.resolution = 1, this.scaleMode = a, this.autoRound = u, this.autoCenter = t.autoCenter, this.resizeInterval = t.resizeInterval, u && (r = Math.floor(r), o = Math.floor(o)), this.gameSize.setSize(r, o), l === c.ZOOM.MAX_ZOOM && (l = this.getMaxZoom()), 1 !== (this.zoom = l) && (this._resetZoom = !0), this.baseSize.setSize(r * h, o * h), u && (this.baseSize.width = Math.floor(this.baseSize.width), this.baseSize.height = Math.floor(this.baseSize.height)), 0 < t.minWidth && this.displaySize.setMin(t.minWidth * l, t.minHeight * l), 0 < t.maxWidth && this.displaySize.setMax(t.maxWidth * l, t.maxHeight * l), this.displaySize.setSize(r, o), this.orientation = d(r, o) }, getParent: function(t) { var e, i = t.parent; null !== i && (this.parent = h(i), this.parentIsWindow = this.parent === document.body, t.expandParent && t.scaleMode !== c.SCALE_MODE.NONE && (e = this.parent.getBoundingClientRect(), !this.parentIsWindow && 0 !== e.height || (document.documentElement.style.height = "100%", document.body.style.height = "100%", e = this.parent.getBoundingClientRect(), this.parentIsWindow || 0 !== e.height || (this.parent.style.overflow = "hidden", this.parent.style.width = "100%", this.parent.style.height = "100%"))), t.fullscreenTarget && !this.fullscreenTarget && (this.fullscreenTarget = h(t.fullscreenTarget))) }, getParentBounds: function() { if (!this.parent) return !1; var t = this.parentSize , e = this.parent.getBoundingClientRect(); this.parentIsWindow && this.game.device.os.iOS && (e.height = a(!0)); var i = this.resolution , n = e.width * i , s = e.height * i; return (t.width !== n || t.height !== s) && (t.setSize(n, s), !0) }, lockOrientation: function(t) { var e = screen.lockOrientation || screen.mozLockOrientation || screen.msLockOrientation; return !!e && e.call(screen, t) }, setParentSize: function(t, e) { return this.parentSize.setSize(t, e), this.refresh() }, setGameSize: function(t, e) { var i = this.autoRound , n = this.resolution; i && (t = Math.floor(t), e = Math.floor(e)); var s = this.width , r = this.height; return this.gameSize.resize(t, e), this.baseSize.resize(t * n, e * n), i && (this.baseSize.width = Math.floor(this.baseSize.width), this.baseSize.height = Math.floor(this.baseSize.height)), this.displaySize.setAspectRatio(t / e), this.canvas.width = this.baseSize.width, this.canvas.height = this.baseSize.height, this.refresh(s, r) }, resize: function(t, e) { var i = this.zoom , n = this.resolution , s = this.autoRound; s && (t = Math.floor(t), e = Math.floor(e)); var r = this.width , o = this.height; this.gameSize.resize(t, e), this.baseSize.resize(t * n, e * n), s && (this.baseSize.width = Math.floor(this.baseSize.width), this.baseSize.height = Math.floor(this.baseSize.height)), this.displaySize.setSize(t * i * n, e * i * n), this.canvas.width = this.baseSize.width, this.canvas.height = this.baseSize.height; var a = this.canvas.style , h = t * i , l = e * i; return s && (h = Math.floor(h), l = Math.floor(l)), h === t && l === e || (a.width = h + "px", a.height = l + "px"), this.refresh(r, o) }, setZoom: function(t) { return this.zoom = t, this._resetZoom = !0, this.refresh() }, setMaxZoom: function() { return this.zoom = this.getMaxZoom(), this._resetZoom = !0, this.refresh() }, refresh: function(t, e) { void 0 === t && (t = this.width), void 0 === e && (e = this.height), this.updateScale(), this.updateBounds(), this.updateOrientation(), this.displayScale.set(this.baseSize.width / this.canvasBounds.width, this.baseSize.height / this.canvasBounds.height); var i, n, s = this.game.domContainer; return s && (this.baseSize.setCSS(s), i = this.canvas.style, (n = s.style).transform = "scale(" + this.displaySize.width / this.baseSize.width + "," + this.displaySize.height / this.baseSize.height + ")", n.marginLeft = i.marginLeft, n.marginTop = i.marginTop), this.emit(r.RESIZE, this.gameSize, this.baseSize, this.displaySize, this.resolution, t, e), this }, updateOrientation: function() { var t; this._checkOrientation && (this._checkOrientation = !1, (t = d(this.width, this.height)) !== this.orientation && (this.orientation = t, this.emit(r.ORIENTATION_CHANGE, t))) }, updateScale: function() { var t, e, i = this.canvas.style, n = this.gameSize.width, s = this.gameSize.height, r = this.zoom, o = this.autoRound; this.scaleMode === c.SCALE_MODE.NONE ? (this.displaySize.setSize(n * r * 1, s * r * 1), t = +this.displaySize.width, e = +this.displaySize.height, o && (t = Math.floor(t), e = Math.floor(e)), this._resetZoom && (i.width = t + "px", i.height = e + "px", this._resetZoom = !1)) : this.scaleMode === c.SCALE_MODE.RESIZE ? (this.displaySize.setSize(this.parentSize.width, this.parentSize.height), this.gameSize.setSize(this.displaySize.width, this.displaySize.height), this.baseSize.setSize(+this.displaySize.width, +this.displaySize.height), t = +this.displaySize.width, e = +this.displaySize.height, o && (t = Math.floor(t), e = Math.floor(e)), this.canvas.width = t, this.canvas.height = e) : (this.displaySize.setSize(this.parentSize.width, this.parentSize.height), t = +this.displaySize.width, e = +this.displaySize.height, o && (t = Math.floor(t), e = Math.floor(e)), i.width = t + "px", i.height = e + "px"), this.getParentBounds(), this.updateCenter() }, getMaxZoom: function() { var t = p(this.parentSize.width, this.gameSize.width, 0, !0) , e = p(this.parentSize.height, this.gameSize.height, 0, !0); return Math.max(Math.min(t, e), 1) }, updateCenter: function() { var t, e, i, n, s, r, o, a = this.autoCenter; a !== c.CENTER.NO_CENTER && (e = (t = this.canvas).style, n = (i = t.getBoundingClientRect()).width, s = i.height, r = Math.floor((this.parentSize.width - n) / 2), o = Math.floor((this.parentSize.height - s) / 2), a === c.CENTER.CENTER_HORIZONTALLY ? o = 0 : a === c.CENTER.CENTER_VERTICALLY && (r = 0), e.marginLeft = r + "px", e.marginTop = o + "px") }, updateBounds: function() { var t = this.canvasBounds , e = this.canvas.getBoundingClientRect(); t.x = e.left + (window.pageXOffset || 0) - (document.documentElement.clientLeft || 0), t.y = e.top + (window.pageYOffset || 0) - (document.documentElement.clientTop || 0), t.width = e.width, t.height = e.height }, transformX: function(t) { return (t - this.canvasBounds.left) * this.displayScale.x }, transformY: function(t) { return (t - this.canvasBounds.top) * this.displayScale.y }, startFullscreen: function(t) { void 0 === t && (t = { navigationUI: "hide" }); var e, i = this.fullscreen; i.available ? i.active || (e = this.getFullscreenTarget(), i.keyboard ? e[i.request](Element.ALLOW_KEYBOARD_INPUT) : e[i.request](t)) : this.emit(r.FULLSCREEN_UNSUPPORTED) }, fullscreenSuccessHandler: function() { this.getParentBounds(), this.refresh(), this.emit(r.ENTER_FULLSCREEN) }, fullscreenErrorHandler: function(t) { this.removeFullscreenTarget(), this.emit(r.FULLSCREEN_FAILED, t) }, getFullscreenTarget: function() { var t; return this.fullscreenTarget || ((t = document.createElement("div")).style.margin = "0", t.style.padding = "0", t.style.width = "100%", t.style.height = "100%", this.fullscreenTarget = t, this._createdFullscreenTarget = !0), this._createdFullscreenTarget && (this.canvas.parentNode.insertBefore(this.fullscreenTarget, this.canvas), this.fullscreenTarget.appendChild(this.canvas)), this.fullscreenTarget }, removeFullscreenTarget: function() { var t, e; !this._createdFullscreenTarget || (t = this.fullscreenTarget) && t.parentNode && ((e = t.parentNode).insertBefore(this.canvas, t), e.removeChild(t)) }, stopFullscreen: function() { var t = this.fullscreen; if (!t.available) return this.emit(r.FULLSCREEN_UNSUPPORTED), !1; t.active && document[t.cancel](), this.removeFullscreenTarget(), this.getParentBounds(), this.emit(r.LEAVE_FULLSCREEN), this.refresh() }, toggleFullscreen: function(t) { this.fullscreen.active ? this.stopFullscreen() : this.startFullscreen(t) }, startListeners: function() { var e = this , i = this.listeners; i.orientationChange = function() { e._checkOrientation = !0, e.dirty = !0 } , i.windowResize = function() { e.dirty = !0 } , window.addEventListener("orientationchange", i.orientationChange, !1), window.addEventListener("resize", i.windowResize, !1), this.fullscreen.available && (i.fullScreenChange = function(t) { return e.onFullScreenChange(t) } , i.fullScreenError = function(t) { return e.onFullScreenError(t) } , ["webkit", "moz", ""].forEach(function(t) { document.addEventListener(t + "fullscreenchange", i.fullScreenChange, !1), document.addEventListener(t + "fullscreenerror", i.fullScreenError, !1) }), document.addEventListener("MSFullscreenChange", i.fullScreenChange, !1), document.addEventListener("MSFullscreenError", i.fullScreenError, !1)) }, onFullScreenChange: function() { document.fullscreenElement || document.webkitFullscreenElement || document.msFullscreenElement || document.mozFullScreenElement ? this.fullscreenSuccessHandler() : this.stopFullscreen() }, onFullScreenError: function() { this.removeFullscreenTarget() }, step: function(t, e) { this.parent && (this._lastCheck += e, (this.dirty || this._lastCheck > this.resizeInterval) && (this.getParentBounds() && this.refresh(), this.dirty = !1, this._lastCheck = 0)) }, stopListeners: function() { var e = this.listeners; window.removeEventListener("orientationchange", e.orientationChange, !1), window.removeEventListener("resize", e.windowResize, !1); ["webkit", "moz", ""].forEach(function(t) { document.removeEventListener(t + "fullscreenchange", e.fullScreenChange, !1), document.removeEventListener(t + "fullscreenerror", e.fullScreenError, !1) }), document.removeEventListener("MSFullscreenChange", e.fullScreenChange, !1), document.removeEventListener("MSFullscreenError", e.fullScreenError, !1) }, destroy: function() { this.removeAllListeners(), this.stopListeners(), this.game = null, this.canvas = null, this.canvasBounds = null, this.parent = null, this.fullscreenTarget = null, this.parentSize.destroy(), this.gameSize.destroy(), this.baseSize.destroy(), this.displaySize.destroy() }, isFullscreen: { get: function() { return this.fullscreen.active } }, width: { get: function() { return this.gameSize.width } }, height: { get: function() { return this.gameSize.height } }, isPortrait: { get: function() { return this.orientation === c.ORIENTATION.PORTRAIT } }, isLandscape: { get: function() { return this.orientation === c.ORIENTATION.LANDSCAPE } }, isGamePortrait: { get: function() { return this.height > this.width } }, isGameLandscape: { get: function() { return this.width > this.height } } }); t.exports = v } , function(t, e, i) { var n = i(19) , s = i(0) , r = i(93) , o = i(3) , a = new s({ initialize: function(t, e, i, n) { void 0 === t && (t = 0), void 0 === e && (e = t), void 0 === i && (i = 0), void 0 === n && (n = null), this._width = t, this._height = e, this._parent = n, this.aspectMode = i, this.aspectRatio = 0 === e ? 1 : t / e, this.minWidth = 0, this.minHeight = 0, this.maxWidth = Number.MAX_VALUE, this.maxHeight = Number.MAX_VALUE, this.snapTo = new o }, setAspectMode: function(t) { return void 0 === t && (t = 0), this.aspectMode = t, this.setSize(this._width, this._height) }, setSnap: function(t, e) { return void 0 === t && (t = 0), void 0 === e && (e = t), this.snapTo.set(t, e), this.setSize(this._width, this._height) }, setParent: function(t) { return this._parent = t, this.setSize(this._width, this._height) }, setMin: function(t, e) { return void 0 === t && (t = 0), void 0 === e && (e = t), this.minWidth = n(t, 0, this.maxWidth), this.minHeight = n(e, 0, this.maxHeight), this.setSize(this._width, this._height) }, setMax: function(t, e) { return void 0 === t && (t = Number.MAX_VALUE), void 0 === e && (e = t), this.maxWidth = n(t, this.minWidth, Number.MAX_VALUE), this.maxHeight = n(e, this.minHeight, Number.MAX_VALUE), this.setSize(this._width, this._height) }, setSize: function(t, e) { switch (void 0 === t && (t = 0), void 0 === e && (e = t), this.aspectMode) { case a.NONE: this._width = this.getNewWidth(r(t, this.snapTo.x)), this._height = this.getNewHeight(r(e, this.snapTo.y)), this.aspectRatio = 0 === this._height ? 1 : this._width / this._height; break; case a.WIDTH_CONTROLS_HEIGHT: this._width = this.getNewWidth(r(t, this.snapTo.x)), this._height = this.getNewHeight(this._width * (1 / this.aspectRatio), !1); break; case a.HEIGHT_CONTROLS_WIDTH: this._height = this.getNewHeight(r(e, this.snapTo.y)), this._width = this.getNewWidth(this._height * this.aspectRatio, !1); break; case a.FIT: this.constrain(t, e, !0); break; case a.ENVELOP: this.constrain(t, e, !1) } return this }, setAspectRatio: function(t) { return this.aspectRatio = t, this.setSize(this._width, this._height) }, resize: function(t, e) { return this._width = this.getNewWidth(r(t, this.snapTo.x)), this._height = this.getNewHeight(r(e, this.snapTo.y)), this.aspectRatio = 0 === this._height ? 1 : this._width / this._height, this }, getNewWidth: function(t, e) { return void 0 === e && (e = !0), t = n(t, this.minWidth, this.maxWidth), e && this._parent && t > this._parent.width && (t = Math.max(this.minWidth, this._parent.width)), t }, getNewHeight: function(t, e) { return void 0 === e && (e = !0), t = n(t, this.minHeight, this.maxHeight), e && this._parent && t > this._parent.height && (t = Math.max(this.minHeight, this._parent.height)), t }, constrain: function(t, e, i) { void 0 === t && (t = 0), void 0 === e && (e = t), void 0 === i && (i = !0), t = this.getNewWidth(t), e = this.getNewHeight(e); var n = this.snapTo , s = 0 === e ? 1 : t / e; return i && this.aspectRatio > s || !i && this.aspectRatio < s ? (e = (t = r(t, n.x)) / this.aspectRatio, 0 < n.y && (t = (e = r(e, n.y)) * this.aspectRatio)) : (i && this.aspectRatio < s || !i && this.aspectRatio > s) && (t = (e = r(e, n.y)) * this.aspectRatio, 0 < n.x && (e = (t = r(t, n.x)) * (1 / this.aspectRatio))), this._width = t, this._height = e, this }, fitTo: function(t, e) { return this.constrain(t, e, !0) }, envelop: function(t, e) { return this.constrain(t, e, !1) }, setWidth: function(t) { return this.setSize(t, this._height) }, setHeight: function(t) { return this.setSize(this._width, t) }, toString: function() { return "[{ Size (width=" + this._width + " height=" + this._height + " aspectRatio=" + this.aspectRatio + " aspectMode=" + this.aspectMode + ") }]" }, setCSS: function(t) { t && t.style && (t.style.width = this._width + "px", t.style.height = this._height + "px") }, copy: function(t) { return t.setAspectMode(this.aspectMode), t.aspectRatio = this.aspectRatio, t.setSize(this.width, this.height) }, destroy: function() { this._parent = null, this.snapTo = null }, width: { get: function() { return this._width }, set: function(t) { this.setSize(t, this._height) } }, height: { get: function() { return this._height }, set: function(t) { this.setSize(this._width, t) } } }); a.NONE = 0, a.WIDTH_CONTROLS_HEIGHT = 1, a.HEIGHT_CONTROLS_WIDTH = 2, a.FIT = 3, a.ENVELOP = 4, t.exports = a } , function(t, e, i) { var n = i(0) , r = i(125) , s = i(22) , o = i(20) , l = i(6) , a = i(82) , h = i(1) , u = i(374) , c = i(180) , d = new n({ initialize: function(t, e) { if (this.game = t, this.keys = {}, this.scenes = [], this._pending = [], this._start = [], this._queue = [], this._data = {}, this.isProcessing = !1, this.isBooted = !1, this.customViewports = 0, e) { Array.isArray(e) || (e = [e]); for (var i = 0; i < e.length; i++) this._pending.push({ key: "default", scene: e[i], autoStart: 0 === i, data: {} }) } t.events.once(o.READY, this.bootQueue, this) }, bootQueue: function() { if (!this.isBooted) { for (var t = 0; t < this._pending.length; t++) { var e, i, n, s = (i = this._pending[t]).key; (n = i.scene)instanceof u ? e = this.createSceneFromInstance(s, n) : "object" == typeof n ? e = this.createSceneFromObject(s, n) : "function" == typeof n && (e = this.createSceneFromFunction(s, n)), s = e.sys.settings.key, this.keys[s] = e, this.scenes.push(e), this._data[s] && (e.sys.settings.data = this._data[s].data, this._data[s].autoStart && (i.autoStart = !0)), (i.autoStart || e.sys.settings.active) && this._start.push(s) } for (this._pending.length = 0, this._data = {}, this.isBooted = !0, t = 0; t < this._start.length; t++) i = this._start[t], this.start(i); this._start.length = 0 } }, processQueue: function() { var t, e, i = this._pending.length, n = this._queue.length; if (0 !== i || 0 !== n) { if (i) { for (t = 0; t < i; t++) e = this._pending[t], this.add(e.key, e.scene, e.autoStart, e.data); for (t = 0; t < this._start.length; t++) e = this._start[t], this.start(e); return this._start.length = 0, void (this._pending.length = 0) } for (t = 0; t < this._queue.length; t++) this[(e = this._queue[t]).op](e.keyA, e.keyB); this._queue.length = 0 } }, add: function(t, e, i, n) { return void 0 === i && (i = !1), void 0 === n && (n = {}), this.isProcessing || !this.isBooted ? (this._pending.push({ key: t, scene: e, autoStart: i, data: n }), this.isBooted || (this._data[t] = { data: n }), null) : (t = this.getKey(t, e), e instanceof u ? s = this.createSceneFromInstance(t, e) : "object" == typeof e ? (e.key = t, s = this.createSceneFromObject(t, e)) : "function" == typeof e && (s = this.createSceneFromFunction(t, e)), s.sys.settings.data = n, t = s.sys.settings.key, this.keys[t] = s, this.scenes.push(s), (i || s.sys.settings.active) && (this._pending.length ? this._start.push(t) : this.start(t)), s); var s }, remove: function(t) { if (this.isProcessing) this._queue.push({ op: "remove", keyA: t, keyB: null }); else { var e = this.getScene(t); if (!e || e.sys.isTransitioning()) return this; var i = this.scenes.indexOf(e) , n = e.sys.settings.key; -1 < i && (delete this.keys[n], this.scenes.splice(i, 1), -1 < this._start.indexOf(n) && (i = this._start.indexOf(n), this._start.splice(i, 1)), e.sys.destroy()) } return this }, bootScene: function(t) { var e, i = t.sys, n = i.settings; i.sceneUpdate = h, t.init && (t.init.call(t, n.data), n.status = r.INIT, n.isTransition && i.events.emit(s.TRANSITION_INIT, n.transitionFrom, n.transitionDuration)), i.load && (e = i.load).reset(), e && t.preload ? (t.preload.call(t), 0 === e.list.size ? this.create(t) : (n.status = r.LOADING, e.once(a.COMPLETE, this.loadComplete, this), e.start())) : this.create(t) }, loadComplete: function(t) { var e = t.scene; this.game.sound && this.game.sound.onBlurPausedSounds && this.game.sound.unlock(), this.create(e) }, payloadComplete: function(t) { this.bootScene(t.scene) }, update: function(t, e) { this.processQueue(), this.isProcessing = !0; for (var i = this.scenes.length - 1; 0 <= i; i--) { var n = this.scenes[i].sys; n.settings.status > r.START && n.settings.status <= r.RUNNING && n.step(t, e) } }, render: function(t) { for (var e = 0; e < this.scenes.length; e++) { var i = this.scenes[e].sys; i.settings.visible && i.settings.status >= r.LOADING && i.settings.status < r.SLEEPING && i.render(t) } this.isProcessing = !1 }, create: function(t) { var e = t.sys , i = e.settings; t.create && (i.status = r.CREATING, t.create.call(t, i.data), i.status === r.DESTROYED) || (i.isTransition && e.events.emit(s.TRANSITION_START, i.transitionFrom, i.transitionDuration), t.update && (e.sceneUpdate = t.update), i.status = r.RUNNING, e.events.emit(s.CREATE, t)) }, createSceneFromFunction: function(t, e) { var i = new e; if (i instanceof u) { var n = i.sys.settings.key; if ("" !== n && (t = n), this.keys.hasOwnProperty(t)) throw new Error("Cannot add a Scene with duplicate key: " + t); return this.createSceneFromInstance(t, i) } return i.sys = new c(i), i.sys.settings.key = t, i.sys.init(this.game), i }, createSceneFromInstance: function(t, e) { return "" === e.sys.settings.key && (e.sys.settings.key = t), e.sys.init(this.game), e }, createSceneFromObject: function(t, e) { var i = new u(e) , n = i.sys.settings.key; "" !== n ? t = n : i.sys.settings.key = t, i.sys.init(this.game); for (var s, r = ["init", "preload", "create", "update", "render"], o = 0; o < r.length; o++) { var a = l(e, r[o], null); a && (i[r[o]] = a) } if (e.hasOwnProperty("extend")) for (var h in e.extend) { e.extend.hasOwnProperty(h) && (s = e.extend[h], "data" === h && i.hasOwnProperty("data") && "object" == typeof s ? i.data.merge(s) : "sys" !== h && (i[h] = s)) } return i }, getKey: function(t, e) { if (t = t || "default", "function" == typeof e) return t; if (e instanceof u ? t = e.sys.settings.key : "object" == typeof e && e.hasOwnProperty("key") && (t = e.key), this.keys.hasOwnProperty(t)) throw new Error("Cannot add a Scene with duplicate key: " + t); return t }, getScenes: function(t, e) { void 0 === t && (t = !0), void 0 === e && (e = !1); for (var i = [], n = this.scenes, s = 0; s < n.length; s++) { var r = n[s]; r && (!t || t && r.sys.isActive()) && i.push(r) } return e ? i.reverse() : i }, getScene: function(t) { if ("string" == typeof t) { if (this.keys[t]) return this.keys[t] } else for (var e = 0; e < this.scenes.length; e++) if (t === this.scenes[e]) return t; return null }, isActive: function(t) { var e = this.getScene(t); return e ? e.sys.isActive() : null }, isPaused: function(t) { var e = this.getScene(t); return e ? e.sys.isPaused() : null }, isVisible: function(t) { var e = this.getScene(t); return e ? e.sys.isVisible() : null }, isSleeping: function(t) { var e = this.getScene(t); return e ? e.sys.isSleeping() : null }, pause: function(t, e) { var i = this.getScene(t); return i && i.sys.pause(e), this }, resume: function(t, e) { var i = this.getScene(t); return i && i.sys.resume(e), this }, sleep: function(t, e) { var i = this.getScene(t); return i && !i.sys.isTransitioning() && i.sys.sleep(e), this }, wake: function(t, e) { var i = this.getScene(t); return i && i.sys.wake(e), this }, run: function(t, e) { var i = this.getScene(t); if (!i) { for (var n = 0; n < this._pending.length; n++) if (this._pending[n].key === t) { this.queueOp("start", t, e); break } return this } i.sys.isSleeping() ? i.sys.wake(e) : i.sys.isPaused() ? i.sys.resume(e) : this.start(t, e) }, start: function(t, e) { if (!this.isBooted) return this._data[t] = { autoStart: !0, data: e }, this; var i, n = this.getScene(t); if (n) { if (n.sys.isActive() || n.sys.isPaused()) n.sys.shutdown(), n.sys.start(e); else if (n.sys.start(e), n.sys.load && (i = n.sys.load), i && n.sys.settings.hasOwnProperty("pack") && (i.reset(), i.addPack({ payload: n.sys.settings.pack }))) return n.sys.settings.status = r.LOADING, i.once(a.COMPLETE, this.payloadComplete, this), i.start(), this; this.bootScene(n) } return this }, stop: function(t, e) { var i = this.getScene(t); return i && !i.sys.isTransitioning() && i.sys.shutdown(e), this }, switch: function(t, e) { var i = this.getScene(t) , n = this.getScene(e); return i && n && i !== n && (this.sleep(t), this.isSleeping(e) ? this.wake(e) : this.start(e)), this }, getAt: function(t) { return this.scenes[t] }, getIndex: function(t) { var e = this.getScene(t); return this.scenes.indexOf(e) }, bringToTop: function(t) { var e, i; return this.isProcessing ? this._queue.push({ op: "bringToTop", keyA: t, keyB: null }) : -1 !== (e = this.getIndex(t)) && e < this.scenes.length && (i = this.getScene(t), this.scenes.splice(e, 1), this.scenes.push(i)), this }, sendToBack: function(t) { var e, i; return this.isProcessing ? this._queue.push({ op: "sendToBack", keyA: t, keyB: null }) : -1 !== (e = this.getIndex(t)) && 0 < e && (i = this.getScene(t), this.scenes.splice(e, 1), this.scenes.unshift(i)), this }, moveDown: function(t) { var e, i, n, s; return this.isProcessing ? this._queue.push({ op: "moveDown", keyA: t, keyB: null }) : 0 < (e = this.getIndex(t)) && (i = e - 1, n = this.getScene(t), s = this.getAt(i), this.scenes[e] = s, this.scenes[i] = n), this }, moveUp: function(t) { var e, i, n, s; return this.isProcessing ? this._queue.push({ op: "moveUp", keyA: t, keyB: null }) : (e = this.getIndex(t)) < this.scenes.length - 1 && (i = e + 1, n = this.getScene(t), s = this.getAt(i), this.scenes[e] = s, this.scenes[i] = n), this }, moveAbove: function(t, e) { return t === e || (this.isProcessing ? this._queue.push({ op: "moveAbove", keyA: t, keyB: e }) : (i = this.getIndex(t), n = this.getIndex(e), -1 !== i && -1 !== n && (s = this.getAt(n), this.scenes.splice(n, 1), this.scenes.splice(i + 1, 0, s)))), this; var i, n, s }, moveBelow: function(t, e) { return t === e || (this.isProcessing ? this._queue.push({ op: "moveBelow", keyA: t, keyB: e }) : (i = this.getIndex(t), n = this.getIndex(e), -1 !== i && -1 !== n && (s = this.getAt(n), this.scenes.splice(n, 1), 0 === i ? this.scenes.unshift(s) : this.scenes.splice(i, 0, s)))), this; var i, n, s }, queueOp: function(t, e, i) { return this._queue.push({ op: t, keyA: e, keyB: i }), this }, swapPosition: function(t, e) { return t === e || (this.isProcessing ? this._queue.push({ op: "swapPosition", keyA: t, keyB: e }) : (i = this.getIndex(t)) !== (n = this.getIndex(e)) && -1 !== i && -1 !== n && (s = this.getAt(i), this.scenes[i] = this.scenes[n], this.scenes[n] = s)), this; var i, n, s }, dump: function() { for (var t = [], e = ["pending", "init", "start", "loading", "creating", "running", "paused", "sleeping", "shutdown", "destroyed"], i = 0; i < this.scenes.length; i++) { var n = this.scenes[i].sys , s = !n.settings.visible || n.settings.status !== r.RUNNING && n.settings.status !== r.PAUSED ? "[-] " : "[*] "; s += n.settings.key + " (" + e[n.settings.status] + ")", t.push(s) } console.log(t.join("\n")) }, destroy: function() { for (var t = 0; t < this.scenes.length; t++) { this.scenes[t].sys.destroy() } this.update = h, this.scenes = [], this._pending = [], this._start = [], this._queue = [], this.game = null } }); t.exports = d } , function(t, e, i) { var n = i(0) , s = i(180) , r = new n({ initialize: function(t) { this.sys = new s(this,t), this.game, this.anims, this.cache, this.registry, this.sound, this.textures, this.events, this.cameras, this.add, this.make, this.scene, this.children, this.lights, this.data, this.input, this.load, this.time, this.tweens, this.physics, this.matter, this.scale, this.plugins }, update: function() {} }); t.exports = r } , function(t, e, i) { var n = i(125) , s = i(6) , r = i(126) , o = i(882) , a = { create: function(t) { return "string" == typeof t ? t = { key: t } : void 0 === t && (t = {}), { status: n.PENDING, key: s(t, "key", ""), active: s(t, "active", !1), visible: s(t, "visible", !0), isBooted: !1, isTransition: !1, transitionFrom: null, transitionDuration: 0, transitionAllowInput: !0, data: {}, pack: s(t, "pack", !1), cameras: s(t, "cameras", null), map: s(t, "map", r(o, s(t, "mapAdd", {}))), physics: s(t, "physics", {}), loader: s(t, "loader", {}), plugins: s(t, "plugins", !1), input: s(t, "input", {}) } } }; t.exports = a } , function(t, e, i) { var h = i(26) , s = i(377) , n = i(0) , l = i(31) , r = i(33) , o = i(10) , u = i(121) , a = i(20) , c = i(346) , d = i(6) , f = i(379) , p = i(182) , g = new n({ Extends: o, initialize: function(t) { o.call(this), this.game = t, this.name = "TextureManager", this.list = {}, this._tempCanvas = h.create2D(this, 1, 1), this._tempContext = this._tempCanvas.getContext("2d"), this._pending = 0, t.events.once(a.BOOT, this.boot, this) }, boot: function() { this._pending = 2, this.on(u.LOAD, this.updatePending, this), this.on(u.ERROR, this.updatePending, this), this.addBase64("__DEFAULT", this.game.config.defaultImage), this.addBase64("__MISSING", this.game.config.missingImage), this.game.events.once(a.DESTROY, this.destroy, this) }, updatePending: function() { this._pending--, 0 === this._pending && (this.off(u.LOAD), this.off(u.ERROR), this.emit(u.READY)) }, checkKey: function(t) { return !this.exists(t) || (console.error("Texture key already in use: " + t), !1) }, remove: function(t) { if ("string" == typeof t) { if (!this.exists(t)) return console.warn("No texture found matching key: " + t), this; t = this.get(t) } return this.list.hasOwnProperty(t.key) && (t.destroy(), this.emit(u.REMOVE, t.key)), this }, removeKey: function(t) { return this.list.hasOwnProperty(t) && delete this.list[t], this }, addBase64: function(e, t) { var i, n; return this.checkKey(e) && (i = this, (n = new Image).onerror = function() { i.emit(u.ERROR, e) } , n.onload = function() { var t = i.create(e, n); f.Image(t, 0), i.emit(u.ADD, e, t), i.emit(u.LOAD, e, t) } , n.src = t), this }, getBase64: function(t, e, i, n) { void 0 === i && (i = "image/png"), void 0 === n && (n = .92); var s, r, o = "", a = this.getFrame(t, e); return a && (a.source.isRenderTexture || a.source.isGLTexture) ? console.warn("Cannot getBase64 from WebGL Texture") : a && (s = a.canvasData, (r = h.create2D(this, s.width, s.height)).getContext("2d").drawImage(a.source.image, s.x, s.y, s.width, s.height, 0, 0, s.width, s.height), o = r.toDataURL(i, n), h.remove(r)), o }, addImage: function(t, e, i) { var n = null; return this.checkKey(t) && (n = this.create(t, e), f.Image(n, 0), i && n.setDataSource(i), this.emit(u.ADD, t, n)), n }, addGLTexture: function(t, e, i, n) { var s = null; return this.checkKey(t) && ((s = this.create(t, e, i, n)).add("__BASE", 0, 0, 0, i, n), this.emit(u.ADD, t, s)), s }, addRenderTexture: function(t, e) { var i = null; return this.checkKey(t) && ((i = this.create(t, e)).add("__BASE", 0, 0, 0, e.width, e.height), this.emit(u.ADD, t, i)), i }, generate: function(t, e) { if (this.checkKey(t)) { var i = h.create(this, 1, 1); return e.canvas = i, c(e), this.addCanvas(t, i) } return null }, createCanvas: function(t, e, i) { if (void 0 === e && (e = 256), void 0 === i && (i = 256), this.checkKey(t)) { var n = h.create(this, e, i, r.CANVAS, !0); return this.addCanvas(t, n) } return null }, addCanvas: function(t, e, i) { void 0 === i && (i = !1); var n = null; return i ? n = new s(this,t,e,e.width,e.height) : this.checkKey(t) && (n = new s(this,t,e,e.width,e.height), this.list[t] = n, this.emit(u.ADD, t, n)), n }, addAtlas: function(t, e, i, n) { return Array.isArray(i.textures) || Array.isArray(i.frames) ? this.addAtlasJSONArray(t, e, i, n) : this.addAtlasJSONHash(t, e, i, n) }, addAtlasJSONArray: function(t, e, i, n) { var s = null; if (this.checkKey(t)) { if (s = this.create(t, e), Array.isArray(i)) for (var r = 1 === i.length, o = 0; o < s.source.length; o++) { var a = r ? i[0] : i[o]; f.JSONArray(s, o, a) } else f.JSONArray(s, 0, i); n && s.setDataSource(n), this.emit(u.ADD, t, s) } return s }, addAtlasJSONHash: function(t, e, i, n) { var s = null; if (this.checkKey(t)) { if (s = this.create(t, e), Array.isArray(i)) for (var r = 0; r < i.length; r++) f.JSONHash(s, r, i[r]); else f.JSONHash(s, 0, i); n && s.setDataSource(n), this.emit(u.ADD, t, s) } return s }, addAtlasXML: function(t, e, i, n) { var s = null; return this.checkKey(t) && (s = this.create(t, e), f.AtlasXML(s, 0, i), n && s.setDataSource(n), this.emit(u.ADD, t, s)), s }, addUnityAtlas: function(t, e, i, n) { var s = null; return this.checkKey(t) && (s = this.create(t, e), f.UnityYAML(s, 0, i), n && s.setDataSource(n), this.emit(u.ADD, t, s)), s }, addSpriteSheet: function(t, e, i) { var n, s, r = null; return this.checkKey(t) && (n = (r = this.create(t, e)).source[0].width, s = r.source[0].height, f.SpriteSheet(r, 0, 0, 0, n, s, i), this.emit(u.ADD, t, r)), r }, addSpriteSheetFromAtlas: function(t, e) { if (!this.checkKey(t)) return null; var i = d(e, "atlas", null) , n = d(e, "frame", null); if (i && n) { var s = this.get(i).get(n); if (s) { var r = this.create(t, s.source.image); return s.trimmed ? f.SpriteSheetFromAtlas(r, s, e) : f.SpriteSheet(r, 0, s.cutX, s.cutY, s.cutWidth, s.cutHeight, e), this.emit(u.ADD, t, r), r } } }, create: function(t, e, i, n) { var s = null; return this.checkKey(t) && (s = new p(this,t,e,i,n), this.list[t] = s), s }, exists: function(t) { return this.list.hasOwnProperty(t) }, get: function(t) { return void 0 === t && (t = "__DEFAULT"), this.list[t] ? this.list[t] : t instanceof p ? t : this.list.__MISSING }, cloneFrame: function(t, e) { if (this.list[t]) return this.list[t].get(e).clone() }, getFrame: function(t, e) { if (this.list[t]) return this.list[t].get(e) }, getTextureKeys: function() { var t = []; for (var e in this.list) "__DEFAULT" !== e && "__MISSING" !== e && t.push(e); return t }, getPixel: function(t, e, i, n) { var s = this.getFrame(i, n); if (s) { t -= s.x, e -= s.y; var r = s.data.cut; if (t += r.x, e += r.y, t >= r.x && t < r.r && e >= r.y && e < r.b) { var o = this._tempContext; o.clearRect(0, 0, 1, 1), o.drawImage(s.source.image, t, e, 1, 1, 0, 0, 1, 1); var a = o.getImageData(0, 0, 1, 1); return new l(a.data[0],a.data[1],a.data[2],a.data[3]) } } return null }, getPixelAlpha: function(t, e, i, n) { var s = this.getFrame(i, n); if (s) { t -= s.x, e -= s.y; var r = s.data.cut; if (t += r.x, e += r.y, t >= r.x && t < r.r && e >= r.y && e < r.b) { var o = this._tempContext; return o.clearRect(0, 0, 1, 1), o.drawImage(s.source.image, t, e, 1, 1, 0, 0, 1, 1), o.getImageData(0, 0, 1, 1).data[3] } } return null }, setTexture: function(t, e, i) { return this.list[e] && (t.texture = this.list[e], t.frame = t.texture.get(i)), t }, renameTexture: function(t, e) { var i = this.get(t); return !(!i || t === e) && (i.key = e, this.list[e] = i, delete this.list[t], !0) }, each: function(t, e) { for (var i = [null], n = 1; n < arguments.length; n++) i.push(arguments[n]); for (var s in this.list) i[0] = this.list[s], t.apply(e, i) }, destroy: function() { for (var t in this.list) this.list[t].destroy(); this.list = {}, this.game = null, h.remove(this._tempCanvas) } }); t.exports = g } , function(t, e, i) { var n = i(0) , f = i(19) , p = i(31) , s = i(33) , r = i(120) , o = i(182) , a = new n({ Extends: o, initialize: function(t, e, i, n, s) { o.call(this, t, e, i, n, s), this.add("__BASE", 0, 0, 0, n, s), this._source = this.frames.__BASE.source, this.canvas = this._source.image, this.context = this.canvas.getContext("2d"), this.width = n, this.height = s, this.imageData = this.context.getImageData(0, 0, n, s), this.data = null, this.imageData && (this.data = this.imageData.data), this.pixels = null, this.buffer, this.data && (this.imageData.data.buffer ? (this.buffer = this.imageData.data.buffer, this.pixels = new Uint32Array(this.buffer)) : window.ArrayBuffer ? (this.buffer = new ArrayBuffer(this.imageData.data.length), this.pixels = new Uint32Array(this.buffer)) : this.pixels = this.imageData.data) }, update: function() { return this.imageData = this.context.getImageData(0, 0, this.width, this.height), this.data = this.imageData.data, this.imageData.data.buffer ? (this.buffer = this.imageData.data.buffer, this.pixels = new Uint32Array(this.buffer)) : window.ArrayBuffer ? (this.buffer = new ArrayBuffer(this.imageData.data.length), this.pixels = new Uint32Array(this.buffer)) : this.pixels = this.imageData.data, this.manager.game.config.renderType === s.WEBGL && this.refresh(), this }, draw: function(t, e, i) { return this.context.drawImage(i, t, e), this.update() }, drawFrame: function(t, e, i, n) { void 0 === i && (i = 0), void 0 === n && (n = 0); var s = this.manager.getFrame(t, e); if (s) { var r = s.canvasData , o = s.cutWidth , a = s.cutHeight , h = s.source.resolution; return this.context.drawImage(s.source.image, r.x, r.y, o, a, i, n, o / h, a / h), this.update() } return this }, setPixel: function(t, e, i, n, s, r) { var o; return void 0 === r && (r = 255), t = Math.abs(Math.floor(t)), e = Math.abs(Math.floor(e)), -1 < this.getIndex(t, e) && ((o = this.context.getImageData(t, e, 1, 1)).data[0] = i, o.data[1] = n, o.data[2] = s, o.data[3] = r, this.context.putImageData(o, t, e)), this }, putData: function(t, e, i, n, s, r, o) { return void 0 === n && (n = 0), void 0 === s && (s = 0), void 0 === r && (r = t.width), void 0 === o && (o = t.height), this.context.putImageData(t, e, i, n, s, r, o), this }, getData: function(t, e, i, n) { return t = f(Math.floor(t), 0, this.width - 1), e = f(Math.floor(e), 0, this.height - 1), i = f(i, 1, this.width - t), n = f(n, 1, this.height - e), this.context.getImageData(t, e, i, n) }, getPixel: function(t, e, i) { i = i || new p; var n, s, r, o, a, h = this.getIndex(t, e); return -1 < h && (s = (n = this.data)[h + 0], r = n[h + 1], o = n[h + 2], a = n[h + 3], i.setTo(s, r, o, a)), i }, getPixels: function(t, e, i, n) { void 0 === t && (t = 0), void 0 === e && (e = 0), void 0 === i && (i = this.width), void 0 === n && (n = i), t = Math.abs(Math.round(t)), e = Math.abs(Math.round(e)); for (var s = f(t, 0, this.width), r = f(t + i, 0, this.width), o = f(e, 0, this.height), a = f(e + n, 0, this.height), h = new p, l = [], u = o; u < a; u++) { for (var c = [], d = s; d < r; d++) h = this.getPixel(d, u, h), c.push({ x: d, y: u, color: h.color, alpha: h.alphaGL }); l.push(c) } return l }, getIndex: function(t, e) { return t = Math.abs(Math.round(t)), e = Math.abs(Math.round(e)), t < this.width && e < this.height ? 4 * (t + e * this.width) : -1 }, refresh: function() { return this._source.update(), this }, getCanvas: function() { return this.canvas }, getContext: function() { return this.context }, clear: function(t, e, i, n) { return void 0 === t && (t = 0), void 0 === e && (e = 0), void 0 === i && (i = this.width), void 0 === n && (n = this.height), this.context.clearRect(t, e, i, n), this.update() }, setSize: function(t, e) { return void 0 === e && (e = t), t === this.width && e === this.height || (this.canvas.width = t, this.canvas.height = e, this._source.width = t, this._source.height = e, this._source.isPowerOf2 = r(t, e), this.frames.__BASE.setSize(t, e, 0, 0), this.width = t, this.height = e, this.refresh()), this }, destroy: function() { o.prototype.destroy.call(this), this._source = null, this.canvas = null, this.context = null, this.imageData = null, this.data = null, this.pixels = null, this.buffer = null } }); t.exports = a } , function(t, e, i) { var n = i(26) , s = i(0) , o = i(120) , a = i(234) , r = new s({ initialize: function(t, e, i, n, s) { void 0 === s && (s = !1); var r = t.manager.game; this.renderer = r.renderer, this.texture = t, this.source = e, this.image = e, this.compressionAlgorithm = null, this.resolution = 1, this.width = i || e.naturalWidth || e.videoWidth || e.width || 0, this.height = n || e.naturalHeight || e.videoHeight || e.height || 0, this.scaleMode = a.DEFAULT, this.isCanvas = e instanceof HTMLCanvasElement, this.isVideo = window.hasOwnProperty("HTMLVideoElement") && e instanceof HTMLVideoElement, this.isRenderTexture = "RenderTexture" === e.type, this.isGLTexture = window.hasOwnProperty("WebGLTexture") && e instanceof WebGLTexture, this.isPowerOf2 = o(this.width, this.height), this.glTexture = null, this.flipY = s, this.init(r) }, init: function(t) { this.renderer && (this.renderer.gl ? this.isCanvas ? this.glTexture = this.renderer.createCanvasTexture(this.image, !1, this.flipY) : this.isVideo ? this.glTexture = this.renderer.createVideoTexture(this.image, !1, this.flipY) : this.isRenderTexture ? (this.image = this.source.canvas, this.glTexture = this.renderer.createTextureFromSource(null, this.width, this.height, this.scaleMode)) : this.isGLTexture ? this.glTexture = this.source : this.glTexture = this.renderer.createTextureFromSource(this.image, this.width, this.height, this.scaleMode) : this.isRenderTexture && (this.image = this.source.canvas)), t.config.antialias || this.setFilter(1) }, setFilter: function(t) { this.renderer.gl && this.renderer.setTextureFilter(this.glTexture, t), this.scaleMode = t }, setFlipY: function(t) { return void 0 === t && (t = !0), this.flipY = t, this }, update: function() { var t = this.renderer.gl; t && this.isCanvas ? this.glTexture = this.renderer.updateCanvasTexture(this.image, this.glTexture, this.flipY) : t && this.isVideo && (this.glTexture = this.renderer.updateVideoTexture(this.image, this.glTexture, this.flipY)) }, destroy: function() { this.glTexture && this.renderer.deleteTexture(this.glTexture), this.isCanvas && n.remove(this.image), this.renderer = null, this.texture = null, this.source = null, this.image = null, this.glTexture = null } }); t.exports = r } , function(t, e, i) { t.exports = { AtlasXML: i(883), Canvas: i(884), Image: i(885), JSONArray: i(886), JSONHash: i(887), SpriteSheet: i(888), SpriteSheetFromAtlas: i(889), UnityYAML: i(890) } } , function(t, e, i) { var n = i(381) , s = i(385) , r = i(387) , o = { create: function(t) { var e = t.config.audio , i = t.device.audio; return new (e && e.noAudio || !i.webAudio && !i.audioData ? s : !i.webAudio || e && e.disableWebAudio ? n : r)(t) } }; t.exports = o } , function(t, e, i) { var n = i(127) , s = i(0) , o = i(59) , r = i(384) , a = new s({ Extends: n, initialize: function(t) { this.override = !0, this.audioPlayDelay = .1, this.loopEndOffset = .05, this.onBlurPausedSounds = [], this.locked = "ontouchstart"in window, this.lockedActionsQueue = this.locked ? [] : null, this._mute = !1, this._volume = 1, n.call(this, t) }, add: function(t, e) { var i = new r(this,t,e); return this.sounds.push(i), i }, unlock: function() { this.locked = !1; var e, i, n, r = this; this.game.cache.audio.entries.each(function(t, e) { for (var i = 0; i < e.length; i++) if ("true" === e[i].dataset.locked) return !(r.locked = !0); return !0 }), this.locked && (e = !1, i = function() { e = !0 } , n = function() { var s, t; e ? e = !1 : (document.body.removeEventListener("touchmove", i), document.body.removeEventListener("touchend", n), s = [], r.game.cache.audio.entries.each(function(t, e) { for (var i = 0; i < e.length; i++) { var n = e[i]; "true" === n.dataset.locked && s.push(n) } return !0 }), 0 !== s.length && ((t = s[s.length - 1]).oncanplaythrough = function() { t.oncanplaythrough = null, s.forEach(function(t) { t.dataset.locked = "false" }), r.unlocked = !0 } , s.forEach(function(t) { t.load() }))) } , this.once(o.UNLOCKED, function() { for (this.forEachActiveSound(function(t) { null === t.currentMarker && 0 === t.duration && (t.duration = t.tags[0].duration), t.totalDuration = t.tags[0].duration }); this.lockedActionsQueue.length; ) { var t = this.lockedActionsQueue.shift(); t.sound[t.prop].apply ? t.sound[t.prop].apply(t.sound, t.value || []) : t.sound[t.prop] = t.value } }, this), document.body.addEventListener("touchmove", i, !1), document.body.addEventListener("touchend", n, !1)) }, onBlur: function() { this.forEachActiveSound(function(t) { t.isPlaying && (this.onBlurPausedSounds.push(t), t.onBlur()) }) }, onFocus: function() { this.onBlurPausedSounds.forEach(function(t) { t.onFocus() }), this.onBlurPausedSounds.length = 0 }, destroy: function() { n.prototype.destroy.call(this), this.onBlurPausedSounds.length = 0, this.onBlurPausedSounds = null }, isLocked: function(t, e, i) { return "true" === t.tags[0].dataset.locked && (this.lockedActionsQueue.push({ sound: t, prop: e, value: i }), !0) }, setMute: function(t) { return this.mute = t, this }, mute: { get: function() { return this._mute }, set: function(t) { this._mute = t, this.forEachActiveSound(function(t) { t.updateMute() }), this.emit(o.GLOBAL_MUTE, this, t) } }, setVolume: function(t) { return this.volume = t, this }, volume: { get: function() { return this._volume }, set: function(t) { this._volume = t, this.forEachActiveSound(function(t) { t.updateVolume() }), this.emit(o.GLOBAL_VOLUME, this, t) } } }); t.exports = a } , function(t, e, i) { var h = i(68); t.exports = function(t, e, i, n, s) { void 0 === n && (n = 0), void 0 === s && (s = t.length); var r = []; if (h(t, n, s)) for (var o = n; o < s; o++) { var a = t[o]; (!e || e && void 0 === i && a.hasOwnProperty(e) || e && void 0 !== i && a[e] === i) && r.push(a) } return r } } , function(t, e, i) { var a = i(68); t.exports = function(t, e, i, n, s) { if (void 0 === n && (n = 0), void 0 === s && (s = t.length), a(t, n, s)) for (var r = n; r < s; r++) { var o = t[r]; if (!e || e && void 0 === i && o.hasOwnProperty(e) || e && void 0 !== i && o[e] === i) return o } return null } } , function(t, e, i) { var n = i(128) , s = i(0) , r = i(59) , o = i(19) , a = new s({ Extends: n, initialize: function(t, e, i) { if (void 0 === i && (i = {}), this.tags = t.game.cache.audio.get(e), !this.tags) throw new Error('There is no audio asset with key "' + e + '" in the audio cache'); this.audio = null, this.startTime = 0, this.previousTime = 0, this.duration = this.tags[0].duration, this.totalDuration = this.tags[0].duration, n.call(this, t, e, i) }, play: function(t, e) { return !this.manager.isLocked(this, "play", [t, e]) && (!!n.prototype.play.call(this, t, e) && (!!this.pickAndPlayAudioTag() && (this.emit(r.PLAY, this), !0))) }, pause: function() { return !this.manager.isLocked(this, "pause") && (!(0 < this.startTime) && (!!n.prototype.pause.call(this) && (this.currentConfig.seek = this.audio.currentTime - (this.currentMarker ? this.currentMarker.start : 0), this.stopAndReleaseAudioTag(), this.emit(r.PAUSE, this), !0))) }, resume: function() { return !this.manager.isLocked(this, "resume") && (!(0 < this.startTime) && (!!n.prototype.resume.call(this) && (!!this.pickAndPlayAudioTag() && (this.emit(r.RESUME, this), !0)))) }, stop: function() { return !this.manager.isLocked(this, "stop") && (!!n.prototype.stop.call(this) && (this.stopAndReleaseAudioTag(), this.emit(r.STOP, this), !0)) }, pickAndPlayAudioTag: function() { if (!this.pickAudioTag()) return this.reset(), !1; var t = this.currentConfig.seek , e = this.currentConfig.delay , i = (this.currentMarker ? this.currentMarker.start : 0) + t; return this.previousTime = i, this.audio.currentTime = i, this.applyConfig(), 0 === e ? (this.startTime = 0, this.audio.paused && this.playCatchPromise()) : (this.startTime = window.performance.now() + 1e3 * e, this.audio.paused || this.audio.pause()), this.resetConfig(), !0 }, pickAudioTag: function() { if (this.audio) return !0; for (var t = 0; t < this.tags.length; t++) { var e = this.tags[t]; if ("false" === e.dataset.used) return e.dataset.used = "true", this.audio = e, !0 } if (!this.manager.override) return !1; var i = []; this.manager.forEachActiveSound(function(t) { t.key === this.key && t.audio && i.push(t) }, this), i.sort(function(t, e) { return t.loop === e.loop ? e.seek / e.duration - t.seek / t.duration : t.loop ? 1 : -1 }); var n = i[0]; return this.audio = n.audio, n.reset(), n.audio = null, n.startTime = 0, !(n.previousTime = 0) }, playCatchPromise: function() { var t = this.audio.play(); t && t.catch(function(t) { console.warn(t) }) }, stopAndReleaseAudioTag: function() { this.startTime = 0, this.previousTime = 0, this.audio && (this.audio.pause(), this.audio.dataset.used = "false", this.audio = null) }, reset: function() { n.prototype.stop.call(this) }, onBlur: function() { this.isPlaying = !1, this.isPaused = !0, this.currentConfig.seek = this.audio.currentTime - (this.currentMarker ? this.currentMarker.start : 0), this.currentConfig.delay = Math.max(0, (this.startTime - window.performance.now()) / 1e3), this.stopAndReleaseAudioTag() }, onFocus: function() { this.isPlaying = !0, this.isPaused = !1, this.pickAndPlayAudioTag() }, update: function(t, e) { if (this.isPlaying) if (0 < this.startTime) this.startTime < t - this.manager.audioPlayDelay && (this.audio.currentTime += Math.max(0, t - this.startTime) / 1e3, this.startTime = 0, this.previousTime = this.audio.currentTime, this.playCatchPromise()); else { var i = this.currentMarker ? this.currentMarker.start : 0 , n = i + this.duration , s = this.audio.currentTime; if (this.currentConfig.loop) s >= n - this.manager.loopEndOffset ? (this.audio.currentTime = i + Math.max(0, s - n), s = this.audio.currentTime) : s < i && (this.audio.currentTime += i, s = this.audio.currentTime), s < this.previousTime && this.emit(r.LOOPED, this); else if (n <= s) return this.reset(), this.stopAndReleaseAudioTag(), void this.emit(r.COMPLETE, this); this.previousTime = s } }, destroy: function() { n.prototype.destroy.call(this), this.tags = null, this.audio && this.stopAndReleaseAudioTag() }, updateMute: function() { this.audio && (this.audio.muted = this.currentConfig.mute || this.manager.mute) }, updateVolume: function() { this.audio && (this.audio.volume = o(this.currentConfig.volume * this.manager.volume, 0, 1)) }, calculateRate: function() { n.prototype.calculateRate.call(this), this.audio && (this.audio.playbackRate = this.totalRate) }, mute: { get: function() { return this.currentConfig.mute }, set: function(t) { this.currentConfig.mute = t, this.manager.isLocked(this, "mute", t) || (this.updateMute(), this.emit(r.MUTE, this, t)) } }, setMute: function(t) { return this.mute = t, this }, volume: { get: function() { return this.currentConfig.volume }, set: function(t) { this.currentConfig.volume = t, this.manager.isLocked(this, "volume", t) || (this.updateVolume(), this.emit(r.VOLUME, this, t)) } }, setVolume: function(t) { return this.volume = t, this }, rate: { get: function() { return this.currentConfig.rate }, set: function(t) { this.currentConfig.rate = t, this.manager.isLocked(this, r.RATE, t) || (this.calculateRate(), this.emit(r.RATE, this, t)) } }, setRate: function(t) { return this.rate = t, this }, detune: { get: function() { return this.currentConfig.detune }, set: function(t) { this.currentConfig.detune = t, this.manager.isLocked(this, r.DETUNE, t) || (this.calculateRate(), this.emit(r.DETUNE, this, t)) } }, setDetune: function(t) { return this.detune = t, this }, seek: { get: function() { return this.isPlaying ? this.audio.currentTime - (this.currentMarker ? this.currentMarker.start : 0) : this.isPaused ? this.currentConfig.seek : 0 }, set: function(t) { this.manager.isLocked(this, "seek", t) || 0 < this.startTime || (this.isPlaying || this.isPaused) && (t = Math.min(Math.max(0, t), this.duration), this.isPlaying ? (this.previousTime = t, this.audio.currentTime = t) : this.isPaused && (this.currentConfig.seek = t), this.emit(r.SEEK, this, t)) } }, setSeek: function(t) { return this.seek = t, this }, loop: { get: function() { return this.currentConfig.loop }, set: function(t) { this.currentConfig.loop = t, this.manager.isLocked(this, "loop", t) || (this.audio && (this.audio.loop = t), this.emit(r.LOOP, this, t)) } }, setLoop: function(t) { return this.loop = t, this } }); t.exports = a } , function(t, e, i) { var n = i(127) , s = i(0) , r = i(10) , o = i(386) , a = i(1) , h = new s({ Extends: r, initialize: function(t) { r.call(this), this.game = t, this.sounds = [], this.mute = !1, this.volume = 1, this.rate = 1, this.detune = 0, this.pauseOnBlur = !0, this.locked = !1 }, add: function(t, e) { var i = new o(this,t,e); return this.sounds.push(i), i }, addAudioSprite: function(t, e) { var i = this.add(t, e); return i.spritemap = {}, i }, play: function(t, e) { return !1 }, playAudioSprite: function(t, e, i) { return !1 }, remove: function(t) { return n.prototype.remove.call(this, t) }, removeByKey: function(t) { return n.prototype.removeByKey.call(this, t) }, pauseAll: a, resumeAll: a, stopAll: a, update: a, setRate: a, setDetune: a, setMute: a, setVolume: a, forEachActiveSound: function(t, e) { n.prototype.forEachActiveSound.call(this, t, e) }, destroy: function() { n.prototype.destroy.call(this) } }); t.exports = h } , function(t, e, i) { function n() { return !1 } function s() { return this } var r = i(128) , o = i(0) , a = i(10) , h = i(18) , l = new o({ Extends: a, initialize: function(t, e, i) { void 0 === i && (i = {}), a.call(this), this.manager = t, this.key = e, this.isPlaying = !1, this.isPaused = !1, this.totalRate = 1, this.duration = 0, this.totalDuration = 0, this.config = h({ mute: !1, volume: 1, rate: 1, detune: 0, seek: 0, loop: !1, delay: 0 }, i), this.currentConfig = this.config, this.mute = !1, this.volume = 1, this.rate = 1, this.detune = 0, this.seek = 0, this.loop = !1, this.markers = {}, this.currentMarker = null, this.pendingRemove = !1 }, addMarker: n, updateMarker: n, removeMarker: function() { return null }, play: n, pause: n, resume: n, stop: n, destroy: function() { r.prototype.destroy.call(this) }, setMute: s, setVolume: s, setRate: s, setDetune: s, setSeek: s, setLoop: s }); t.exports = l } , function(t, e, i) { var c = i(388) , n = i(127) , s = i(0) , d = i(59) , r = i(389) , o = new s({ Extends: n, initialize: function(t) { this.context = this.createAudioContext(t), this.masterMuteNode = this.context.createGain(), this.masterVolumeNode = this.context.createGain(), this.masterMuteNode.connect(this.masterVolumeNode), this.masterVolumeNode.connect(this.context.destination), this.destination = this.masterMuteNode, this.locked = "suspended" === this.context.state && ("ontouchstart"in window || "onclick"in window), n.call(this, t), this.locked && this.unlock() }, createAudioContext: function(t) { var e = t.config.audio; return e && e.context ? (e.context.resume(), e.context) : new AudioContext }, setAudioContext: function(t) { return this.context && this.context.close(), this.masterMuteNode && this.masterMuteNode.disconnect(), this.masterVolumeNode && this.masterVolumeNode.disconnect(), this.context = t, this.masterMuteNode = t.createGain(), this.masterVolumeNode = t.createGain(), this.masterMuteNode.connect(this.masterVolumeNode), this.masterVolumeNode.connect(t.destination), this.destination = this.masterMuteNode, this }, add: function(t, e) { var i = new r(this,t,e); return this.sounds.push(i), i }, decodeAudio: function(t, e) { for (var i = Array.isArray(t) ? t : [{ key: t, data: e }], n = this.game.cache.audio, s = i.length, r = 0; r < i.length; r++) { var o = i[r] , a = o.key , h = o.data; "string" == typeof h && (h = c(h)); var l = function(t, e) { n.add(t, e), this.emit(d.DECODED, t), 0 === --s && this.emit(d.DECODED_ALL) } .bind(this, a) , u = function(t, e) { console.error("Error decoding audio: " + t + " - ", e ? e.message : ""), 0 === --s && this.emit(d.DECODED_ALL) } .bind(this, a); this.context.decodeAudioData(h, l, u) } }, unlock: function() { function t() { e.context && e.context.resume().then(function() { i.removeEventListener("touchstart", t), i.removeEventListener("touchend", t), i.removeEventListener("click", t), i.removeEventListener("keydown", t), e.unlocked = !0 }, function() { i.removeEventListener("touchstart", t), i.removeEventListener("touchend", t), i.removeEventListener("click", t), i.removeEventListener("keydown", t) }) } var e = this , i = document.body; i && (i.addEventListener("touchstart", t, !1), i.addEventListener("touchend", t, !1), i.addEventListener("click", t, !1), i.addEventListener("keydown", t, !1)) }, onBlur: function() { this.locked || this.context.suspend() }, onFocus: function() { this.locked || this.context.resume() }, destroy: function() { var t; this.destination = null, this.masterVolumeNode.disconnect(), this.masterVolumeNode = null, this.masterMuteNode.disconnect(), this.masterMuteNode = null, this.game.config.audio && this.game.config.audio.context ? this.context.suspend() : (t = this).context.close().then(function() { t.context = null }), n.prototype.destroy.call(this) }, setMute: function(t) { return this.mute = t, this }, mute: { get: function() { return 0 === this.masterMuteNode.gain.value }, set: function(t) { this.masterMuteNode.gain.setValueAtTime(t ? 0 : 1, 0), this.emit(d.GLOBAL_MUTE, this, t) } }, setVolume: function(t) { return this.volume = t, this }, volume: { get: function() { return this.masterVolumeNode.gain.value }, set: function(t) { this.masterVolumeNode.gain.setValueAtTime(t, 0), this.emit(d.GLOBAL_VOLUME, this, t) } } }); t.exports = o } , function(t, e) { for (var i = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", c = new Uint8Array(256), n = 0; n < i.length; n++) c[i.charCodeAt(n)] = n; t.exports = function(t) { var e, i, n, s, r = (t = t.substr(t.indexOf(",") + 1)).length, o = .75 * r, a = 0; "=" === t[r - 1] && (o--, "=" === t[r - 2] && o--); for (var h = new ArrayBuffer(o), l = new Uint8Array(h), u = 0; u < r; u += 4) e = c[t.charCodeAt(u)], i = c[t.charCodeAt(u + 1)], n = c[t.charCodeAt(u + 2)], s = c[t.charCodeAt(u + 3)], l[a++] = e << 2 | i >> 4, l[a++] = (15 & i) << 4 | n >> 2, l[a++] = (3 & n) << 6 | 63 & s; return h } } , function(t, e, i) { var n = i(128) , s = i(0) , r = i(59) , o = new s({ Extends: n, initialize: function(t, e, i) { if (void 0 === i && (i = {}), this.audioBuffer = t.game.cache.audio.get(e), !this.audioBuffer) throw new Error('There is no audio asset with key "' + e + '" in the audio cache'); this.source = null, this.loopSource = null, this.muteNode = t.context.createGain(), this.volumeNode = t.context.createGain(), this.playTime = 0, this.startTime = 0, this.loopTime = 0, this.rateUpdates = [], this.hasEnded = !1, this.hasLooped = !1, this.muteNode.connect(this.volumeNode), this.volumeNode.connect(t.destination), this.duration = this.audioBuffer.duration, this.totalDuration = this.audioBuffer.duration, n.call(this, t, e, i) }, play: function(t, e) { return !!n.prototype.play.call(this, t, e) && (this.stopAndRemoveBufferSource(), this.createAndStartBufferSource(), this.emit(r.PLAY, this), !0) }, pause: function() { return !(this.manager.context.currentTime < this.startTime) && (!!n.prototype.pause.call(this) && (this.currentConfig.seek = this.getCurrentTime(), this.stopAndRemoveBufferSource(), this.emit(r.PAUSE, this), !0)) }, resume: function() { return !(this.manager.context.currentTime < this.startTime) && (!!n.prototype.resume.call(this) && (this.createAndStartBufferSource(), this.emit(r.RESUME, this), !0)) }, stop: function() { return !!n.prototype.stop.call(this) && (this.stopAndRemoveBufferSource(), this.emit(r.STOP, this), !0) }, createAndStartBufferSource: function() { var t = this.currentConfig.seek , e = this.currentConfig.delay , i = this.manager.context.currentTime + e , n = (this.currentMarker ? this.currentMarker.start : 0) + t , s = this.duration - t; this.playTime = i - t, this.startTime = i, this.source = this.createBufferSource(), this.applyConfig(), this.source.start(Math.max(0, i), Math.max(0, n), Math.max(0, s)), this.resetConfig() }, createAndStartLoopBufferSource: function() { var t = this.getLoopTime() , e = this.currentMarker ? this.currentMarker.start : 0 , i = this.duration; this.loopTime = t, this.loopSource = this.createBufferSource(), this.loopSource.playbackRate.setValueAtTime(this.totalRate, 0), this.loopSource.start(Math.max(0, t), Math.max(0, e), Math.max(0, i)) }, createBufferSource: function() { var e = this , t = this.manager.context.createBufferSource(); return t.buffer = this.audioBuffer, t.connect(this.muteNode), t.onended = function(t) { t.target === e.source && (e.currentConfig.loop ? e.hasLooped = !0 : e.hasEnded = !0) } , t }, stopAndRemoveBufferSource: function() { this.source && (this.source.stop(), this.source.disconnect(), this.source = null), this.playTime = 0, this.startTime = 0, this.stopAndRemoveLoopBufferSource() }, stopAndRemoveLoopBufferSource: function() { this.loopSource && (this.loopSource.stop(), this.loopSource.disconnect(), this.loopSource = null), this.loopTime = 0 }, applyConfig: function() { this.rateUpdates.length = 0, this.rateUpdates.push({ time: 0, rate: 1 }), n.prototype.applyConfig.call(this) }, update: function(t, e) { this.hasEnded ? (this.hasEnded = !1, n.prototype.stop.call(this), this.stopAndRemoveBufferSource(), this.emit(r.COMPLETE, this)) : this.hasLooped && (this.hasLooped = !1, this.source = this.loopSource, this.loopSource = null, this.playTime = this.startTime = this.loopTime, this.rateUpdates.length = 0, this.rateUpdates.push({ time: 0, rate: this.totalRate }), this.createAndStartLoopBufferSource(), this.emit(r.LOOPED, this)) }, destroy: function() { n.prototype.destroy.call(this), this.audioBuffer = null, this.stopAndRemoveBufferSource(), this.muteNode.disconnect(), this.muteNode = null, this.volumeNode.disconnect(), this.volumeNode = null, this.rateUpdates.length = 0, this.rateUpdates = null }, calculateRate: function() { n.prototype.calculateRate.call(this); var t = this.manager.context.currentTime; this.source && "number" == typeof this.totalRate && this.source.playbackRate.setValueAtTime(this.totalRate, t), this.isPlaying && (this.rateUpdates.push({ time: Math.max(this.startTime, t) - this.playTime, rate: this.totalRate }), this.loopSource && (this.stopAndRemoveLoopBufferSource(), this.createAndStartLoopBufferSource())) }, getCurrentTime: function() { for (var t = 0, e = 0; e < this.rateUpdates.length; e++) { t += ((e < this.rateUpdates.length - 1 ? this.rateUpdates[e + 1].time : this.manager.context.currentTime - this.playTime) - this.rateUpdates[e].time) * this.rateUpdates[e].rate } return t }, getLoopTime: function() { for (var t = 0, e = 0; e < this.rateUpdates.length - 1; e++) t += (this.rateUpdates[e + 1].time - this.rateUpdates[e].time) * this.rateUpdates[e].rate; var i = this.rateUpdates[this.rateUpdates.length - 1]; return this.playTime + i.time + (this.duration - t) / i.rate }, rate: { get: function() { return this.currentConfig.rate }, set: function(t) { this.currentConfig.rate = t, this.calculateRate(), this.emit(r.RATE, this, t) } }, setRate: function(t) { return this.rate = t, this }, detune: { get: function() { return this.currentConfig.detune }, set: function(t) { this.currentConfig.detune = t, this.calculateRate(), this.emit(r.DETUNE, this, t) } }, setDetune: function(t) { return this.detune = t, this }, mute: { get: function() { return 0 === this.muteNode.gain.value }, set: function(t) { this.currentConfig.mute = t, this.muteNode.gain.setValueAtTime(t ? 0 : 1, 0), this.emit(r.MUTE, this, t) } }, setMute: function(t) { return this.mute = t, this }, volume: { get: function() { return this.volumeNode.gain.value }, set: function(t) { this.currentConfig.volume = t, this.volumeNode.gain.setValueAtTime(t, 0), this.emit(r.VOLUME, this, t) } }, setVolume: function(t) { return this.volume = t, this }, seek: { get: function() { return this.isPlaying ? this.manager.context.currentTime < this.startTime ? this.startTime - this.playTime : this.getCurrentTime() : this.isPaused ? this.currentConfig.seek : 0 }, set: function(t) { this.manager.context.currentTime < this.startTime || (this.isPlaying || this.isPaused) && (t = Math.min(Math.max(0, t), this.duration), this.currentConfig.seek = t, this.isPlaying && (this.stopAndRemoveBufferSource(), this.createAndStartBufferSource()), this.emit(r.SEEK, this, t)) } }, setSeek: function(t) { return this.seek = t, this }, loop: { get: function() { return this.currentConfig.loop }, set: function(t) { this.currentConfig.loop = t, this.isPlaying && (this.stopAndRemoveLoopBufferSource(), t && this.createAndStartLoopBufferSource()), this.emit(r.LOOP, this, t) } }, setLoop: function(t) { return this.loop = t, this } }); t.exports = o } , function(t, e) { t.exports = function(t) { for (var e = t.length, i = t[0].length, n = new Array(i), s = 0; s < i; s++) { n[s] = new Array(e); for (var r = e - 1; -1 < r; r--) n[s][r] = t[r][s] } return n } } , function(t, e) { function g(t, e, i) { var n = t[e]; t[e] = t[i], t[i] = n } function v(t, e) { return t < e ? -1 : e < t ? 1 : 0 } var m = function(t, e, i, n, s) { for (void 0 === i && (i = 0), void 0 === n && (n = t.length - 1), void 0 === s && (s = v); i < n; ) { var r, o, a, h, l, u, c; 600 < n - i && (r = n - i + 1, o = e - i + 1, a = Math.log(r), h = .5 * Math.exp(2 * a / 3), l = .5 * Math.sqrt(a * h * (r - h) / r) * (o - r / 2 < 0 ? -1 : 1), u = Math.max(i, Math.floor(e - o * h / r + l)), c = Math.min(n, Math.floor(e + (r - o) * h / r + l)), m(t, e, u, c, s)); var d = t[e] , f = i , p = n; for (g(t, i, e), 0 < s(t[n], d) && g(t, i, n); f < p; ) { for (g(t, f, p), f++, p--; s(t[f], d) < 0; ) f++; for (; 0 < s(t[p], d); ) p-- } 0 === s(t[i], d) ? g(t, i, p) : g(t, ++p, n), p <= e && (i = p + 1), e <= p && (n = p - 1) } }; t.exports = m } , function(t, e, i) { var f = i(6) , p = i(114); t.exports = function(t, e, i) { var n, s = f(i, "max", 0), r = f(i, "qty", 1), o = f(i, "random", !1), a = f(i, "randomB", !1), h = f(i, "repeat", 0), l = f(i, "yoyo", !1), u = []; a && p(e), -1 === h && (h = 0 === s ? 0 : (n = t.length * e.length * r, l && (n *= 2), Math.ceil(s / n))); for (var c = 0; c <= h; c++) { var d = function(t, e, i) { for (var n = [], s = 0; s < t.length; s++) for (var r = 0; r < e.length; r++) for (var o = 0; o < i; o++) n.push({ a: t[s], b: e[r] }); return n }(t, e, r); o && p(d), u = u.concat(d), l && (d.reverse(), u = u.concat(d)) } return s && u.splice(s), u } } , function(t, e, i) { var d = i(15); t.exports = function(t, e) { var i, n, s, r, o, a, h, l, u, c = d(e, "anims", null); return null === c || ("string" == typeof c ? t.anims.play(c) : "object" == typeof c && (i = t.anims, n = d(c, "key", void 0), s = d(c, "startFrame", void 0), r = d(c, "delay", 0), o = d(c, "repeat", 0), a = d(c, "repeatDelay", 0), h = d(c, "yoyo", !1), l = d(c, "play", !1), u = d(c, "delayedPlay", 0), i.setDelay(r), i.setRepeat(o), i.setRepeatDelay(a), i.setYoyo(h), l ? i.play(n, s) : 0 < u ? i.delayedPlay(u, n, s) : i.load(n))), t } } , function(t, e, i) { var a = i(11); t.exports = function(t, e, i) { void 0 === i && (i = new a); var n = Math.min(t.x, e.x) , s = Math.min(t.y, e.y) , r = Math.max(t.right, e.right) - n , o = Math.max(t.bottom, e.bottom) - s; return i.setTo(n, s, r, o) } } , function(t, e, i) { var n = i(0) , s = i(12) , r = i(957) , o = i(14) , a = i(7) , h = i(178) , l = i(22) , u = i(334) , c = new n({ Extends: o, Mixins: [s.AlphaSingle, s.BlendMode, s.Depth, s.Origin, s.ScrollFactor, s.Transform, s.Visible, r], initialize: function(t, e, i, n, s, r) { o.call(this, t, "DOMElement"), this.parent = t.sys.game.domContainer, this.cache = t.sys.cache.html, this.node, this.transformOnly = !1, this.skewX = 0, this.skewY = 0, this.rotate3d = new u, this.rotate3dAngle = "deg", this.width = 0, this.height = 0, this.displayWidth = 0, this.displayHeight = 0, this.handler = this.dispatchNativeEvent.bind(this), this.setPosition(e, i), "string" == typeof n ? "#" === n[0] ? this.setElement(n.substr(1), s, r) : this.createElement(n, s, r) : n && this.setElement(n, s, r), t.sys.events.on(l.SLEEP, this.handleSceneEvent, this), t.sys.events.on(l.WAKE, this.handleSceneEvent, this) }, handleSceneEvent: function(t) { var e = this.node , i = e.style; e && (i.display = t.settings.visible ? "block" : "none") }, setSkew: function(t, e) { return void 0 === t && (t = 0), void 0 === e && (e = t), this.skewX = t, this.skewY = e, this }, setPerspective: function(t) { return this.parent.style.perspective = t + "px", this }, perspective: { get: function() { return parseFloat(this.parent.style.perspective) }, set: function(t) { this.parent.style.perspective = t + "px" } }, addListener: function(t) { if (this.node) { t = t.split(" "); for (var e = 0; e < t.length; e++) this.node.addEventListener(t[e], this.handler, !1) } return this }, removeListener: function(t) { if (this.node) { t = t.split(" "); for (var e = 0; e < t.length; e++) this.node.removeEventListener(t[e], this.handler) } return this }, dispatchNativeEvent: function(t) { this.emit(t.type, t) }, createElement: function(t, e, i) { return this.setElement(document.createElement(t), e, i) }, setElement: function(t, e, i) { var n; if (this.removeElement(), "string" == typeof t ? ("#" === t[0] && (t = t.substr(1)), n = document.getElementById(t)) : "object" == typeof t && 1 === t.nodeType && (n = t), !n) return this; if (this.node = n, e && a(e)) for (var s in e) n.style[s] = e[s]; else "string" == typeof e && (n.style = e); return n.style.zIndex = "0", n.style.display = "inline", n.style.position = "absolute", (n.phaser = this).parent && this.parent.appendChild(n), i && (n.innerText = i), this.updateSize() }, createFromCache: function(t, e) { var i = this.cache.get(t); return i && this.createFromHTML(i, e), this }, createFromHTML: function(t, e) { void 0 === e && (e = "div"), this.removeElement(); var i = document.createElement(e); return (this.node = i).style.zIndex = "0", i.style.display = "inline", i.style.position = "absolute", (i.phaser = this).parent && this.parent.appendChild(i), i.innerHTML = t, this.updateSize() }, removeElement: function() { return this.node && (h(this.node), this.node = null), this }, updateSize: function() { var t = this.node , e = t.getBoundingClientRect(); return this.width = t.clientWidth, this.height = t.clientHeight, this.displayWidth = e.width || 0, this.displayHeight = e.height || 0, this }, getChildByProperty: function(t, e) { if (this.node) for (var i = this.node.querySelectorAll("*"), n = 0; n < i.length; n++) if (i[n][t] === e) return i[n]; return null }, getChildByID: function(t) { return this.getChildByProperty("id", t) }, getChildByName: function(t) { return this.getChildByProperty("name", t) }, setClassName: function(t) { return this.node && (this.node.className = t, this.updateSize()), this }, setText: function(t) { return this.node && (this.node.innerText = t, this.updateSize()), this }, setHTML: function(t) { return this.node && (this.node.innerHTML = t, this.updateSize()), this }, preUpdate: function() { var t = this.parentContainer , e = this.node; e && t && !t.willRender() && (e.style.display = "none") }, willRender: function() { return !0 }, preDestroy: function() { this.removeElement(), this.scene.sys.events.off(l.SLEEP, this.handleSceneEvent, this), this.scene.sys.events.off(l.WAKE, this.handleSceneEvent, this) } }); t.exports = c } , function(t, e, i) { var m = i(958) , y = i(14); t.exports = function(t, e, i, n, s) { var r, o, a, h, l, u, c, d, f, p = e.node, g = p.style, v = e.scene.sys.settings; !(p && g && v.visible && y.RENDER_MASK === e.renderFlags) || 0 !== e.cameraFilter && e.cameraFilter & n.id || e.parentContainer && !e.parentContainer.willRender() ? p && (g.display = "none") : (r = e.parentContainer, o = n.alpha * e.alpha, r && (o *= r.alpha), a = t._tempMatrix1, h = t._tempMatrix2, l = t._tempMatrix3, c = u = 0, f = d = "0%", s ? (u = e.width * e.scaleX * e.originX, c = e.height * e.scaleY * e.originY, h.applyITRS(e.x - u, e.y - c, e.rotation, e.scaleX, e.scaleY), a.copyFrom(n.matrix), a.multiplyWithOffset(s, -n.scrollX * e.scrollFactorX, -n.scrollY * e.scrollFactorY), h.e = e.x - u, h.f = e.y - c) : (u = e.width * e.originX, c = e.height * e.originY, h.applyITRS(e.x - u, e.y - c, e.rotation, e.scaleX, e.scaleY), a.copyFrom(n.matrix), d = 100 * e.originX + "%", f = 100 * e.originY + "%", h.e -= n.scrollX * e.scrollFactorX, h.f -= n.scrollY * e.scrollFactorY), a.multiply(h, l), e.transformOnly || (g.display = "block", g.opacity = o, g.zIndex = e._depth, g.pointerEvents = "auto", g.mixBlendMode = m[e._blendMode]), g.transform = l.getCSSMatrix() + " skew(" + e.skewX + "rad, " + e.skewY + "rad) rotate3d(" + e.rotate3d.x + "," + e.rotate3d.y + "," + e.rotate3d.z + "," + e.rotate3d.w + e.rotate3dAngle + ")", g.transformOrigin = d + " " + f) } } , function(t, e, i) { var n = i(0) , s = i(12) , r = i(14) , o = i(962) , a = new n({ Extends: r, Mixins: [s.Alpha, s.BlendMode, s.Depth, s.Flip, s.Origin, s.ScrollFactor, s.Size, s.Texture, s.Tint, s.Transform, s.Visible, o], initialize: function(t) { r.call(this, t, "Extern") }, preUpdate: function() {}, render: function() {} }); t.exports = a } , function(t, e, i) { var s = i(193) , r = i(87) , o = i(13) , a = i(4); t.exports = function(t, e, i) { void 0 === i && (i = new a); var n = r(e, 0, o.PI2); return s(t, n, i) } } , function(t, e, i) { var o = i(400) , a = i(193) , h = i(87) , l = i(13); t.exports = function(t, e, i, n) { void 0 === n && (n = []), !e && 0 < i && (e = o(t) / i); for (var s = 0; s < e; s++) { var r = h(s / e, 0, l.PI2); n.push(a(t, r)) } return n } } , function(t, e) { t.exports = function(t) { var e = t.width / 2 , i = t.height / 2 , n = Math.pow(e - i, 2) / Math.pow(e + i, 2); return Math.PI * (e + i) * (1 + 3 * n / (10 + Math.sqrt(4 - 3 * n))) } } , function(t, e, i) { var x = i(192) , T = i(28); t.exports = function(t, e, i, n, s, r, o) { var a = e.commandBuffer , h = a.length , l = r || t.currentContext; if (0 !== h && T(t, l, e, n, s)) { var u, c, d, f, p, g = 0, v = 0, m = 0; l.beginPath(); for (var y = 0; y < h; ++y) { switch (a[y]) { case x.ARC: l.arc(a[y + 1], a[y + 2], a[y + 3], a[y + 4], a[y + 5], a[y + 6]), y += 7; break; case x.LINE_STYLE: p = a[y + 1], d = a[y + 2], u = a[y + 3], g = (16711680 & d) >>> 16, v = (65280 & d) >>> 8, m = 255 & d, l.strokeStyle = "rgba(" + g + "," + v + "," + m + "," + u + ")", l.lineWidth = p, y += 3; break; case x.FILL_STYLE: f = a[y + 1], c = a[y + 2], g = (16711680 & f) >>> 16, v = (65280 & f) >>> 8, m = 255 & f, l.fillStyle = "rgba(" + g + "," + v + "," + m + "," + c + ")", y += 2; break; case x.BEGIN_PATH: l.beginPath(); break; case x.CLOSE_PATH: l.closePath(); break; case x.FILL_PATH: o || l.fill(); break; case x.STROKE_PATH: o || l.stroke(); break; case x.FILL_RECT: o ? l.rect(a[y + 1], a[y + 2], a[y + 3], a[y + 4]) : l.fillRect(a[y + 1], a[y + 2], a[y + 3], a[y + 4]), y += 4; break; case x.FILL_TRIANGLE: l.beginPath(), l.moveTo(a[y + 1], a[y + 2]), l.lineTo(a[y + 3], a[y + 4]), l.lineTo(a[y + 5], a[y + 6]), l.closePath(), o || l.fill(), y += 6; break; case x.STROKE_TRIANGLE: l.beginPath(), l.moveTo(a[y + 1], a[y + 2]), l.lineTo(a[y + 3], a[y + 4]), l.lineTo(a[y + 5], a[y + 6]), l.closePath(), o || l.stroke(), y += 6; break; case x.LINE_TO: l.lineTo(a[y + 1], a[y + 2]), y += 2; break; case x.MOVE_TO: l.moveTo(a[y + 1], a[y + 2]), y += 2; break; case x.LINE_FX_TO: l.lineTo(a[y + 1], a[y + 2]), y += 5; break; case x.MOVE_FX_TO: l.moveTo(a[y + 1], a[y + 2]), y += 5; break; case x.SAVE: l.save(); break; case x.RESTORE: l.restore(); break; case x.TRANSLATE: l.translate(a[y + 1], a[y + 2]), y += 2; break; case x.SCALE: l.scale(a[y + 1], a[y + 2]), y += 2; break; case x.ROTATE: l.rotate(a[y + 1]), y += 1; break; case x.GRADIENT_FILL_STYLE: y += 5; break; case x.GRADIENT_LINE_STYLE: y += 6; break; case x.SET_TEXTURE: y += 2 } } l.restore() } } } , function(t, e, i) { var n = i(0) , o = i(2) , s = new n({ initialize: function(t, e, i, n, s) { var r; "object" == typeof t ? (t = o(r = t, "x", 0), e = o(r, "y", 0), i = o(r, "power", 0), n = o(r, "epsilon", 100), s = o(r, "gravity", 50)) : (void 0 === t && (t = 0), void 0 === e && (e = 0), void 0 === i && (i = 0), void 0 === n && (n = 100), void 0 === s && (s = 50)), this.x = t, this.y = e, this.active = !0, this._gravity = s, this._power = 0, this._epsilon = 0, this.power = i, this.epsilon = n }, update: function(t, e) { var i, n, s = this.x - t.x, r = this.y - t.y, o = s * s + r * r; 0 !== o && (i = Math.sqrt(o), o < this._epsilon && (o = this._epsilon), n = this._power * e / (o * i) * 100, t.velocityX += s * n, t.velocityY += r * n) }, epsilon: { get: function() { return Math.sqrt(this._epsilon) }, set: function(t) { this._epsilon = t * t } }, power: { get: function() { return this._power / this._gravity }, set: function(t) { this._power = t * this._gravity } }, gravity: { get: function() { return this._gravity }, set: function(t) { var e = this.power; this._gravity = t, this.power = e } } }); t.exports = s } , function(t, e, i) { var n = i(0) , u = i(39) , c = i(53) , s = new n({ initialize: function(t) { this.emitter = t, this.frame = null, this.x = 0, this.y = 0, this.velocityX = 0, this.velocityY = 0, this.accelerationX = 0, this.accelerationY = 0, this.maxVelocityX = 1e4, this.maxVelocityY = 1e4, this.bounce = 0, this.scaleX = 1, this.scaleY = 1, this.alpha = 1, this.angle = 0, this.rotation = 0, this.tint = 16777215, this.life = 1e3, this.lifeCurrent = 1e3, this.delayCurrent = 0, this.lifeT = 0, this.data = { tint: { min: 16777215, max: 16777215, current: 16777215 }, alpha: { min: 1, max: 1 }, rotate: { min: 0, max: 0 }, scaleX: { min: 1, max: 1 }, scaleY: { min: 1, max: 1 } } }, isAlive: function() { return 0 < this.lifeCurrent }, resetPosition: function() { this.x = 0, this.y = 0 }, fire: function(t, e) { var i = this.emitter; this.frame = i.getFrame(), i.emitZone && i.emitZone.getPoint(this), void 0 === t ? (i.follow && (this.x += i.follow.x + i.followOffset.x), this.x += i.x.onEmit(this, "x")) : this.x += t, void 0 === e ? (i.follow && (this.y += i.follow.y + i.followOffset.y), this.y += i.y.onEmit(this, "y")) : this.y += e, this.life = i.lifespan.onEmit(this, "lifespan"), this.lifeCurrent = this.life, this.lifeT = 0; var n, s, r, o, a, h = i.speedX.onEmit(this, "speedX"), l = i.speedY ? i.speedY.onEmit(this, "speedY") : h; i.radial ? (n = u(i.angle.onEmit(this, "angle")), this.velocityX = Math.cos(n) * Math.abs(h), this.velocityY = Math.sin(n) * Math.abs(l)) : i.moveTo ? (s = i.moveToX.onEmit(this, "moveToX"), r = i.moveToY ? i.moveToY.onEmit(this, "moveToY") : s, o = Math.atan2(r - this.y, s - this.x), a = c(this.x, this.y, s, r) / (this.life / 1e3), this.velocityX = Math.cos(o) * a, this.velocityY = Math.sin(o) * a) : (this.velocityX = h, this.velocityY = l), i.acceleration && (this.accelerationX = i.accelerationX.onEmit(this, "accelerationX"), this.accelerationY = i.accelerationY.onEmit(this, "accelerationY")), this.maxVelocityX = i.maxVelocityX.onEmit(this, "maxVelocityX"), this.maxVelocityY = i.maxVelocityY.onEmit(this, "maxVelocityY"), this.delayCurrent = i.delay.onEmit(this, "delay"), this.scaleX = i.scaleX.onEmit(this, "scaleX"), this.scaleY = i.scaleY ? i.scaleY.onEmit(this, "scaleY") : this.scaleX, this.angle = i.rotate.onEmit(this, "rotate"), this.rotation = u(this.angle), this.bounce = i.bounce.onEmit(this, "bounce"), this.alpha = i.alpha.onEmit(this, "alpha"), this.tint = i.tint.onEmit(this, "tint") }, computeVelocity: function(t, e, i, n) { var s = this.velocityX , r = this.velocityY , o = this.accelerationX , a = this.accelerationY , h = this.maxVelocityX , l = this.maxVelocityY; s += t.gravityX * i, r += t.gravityY * i, o && (s += o * i), a && (r += a * i), h < s ? s = h : s < -h && (s = -h), l < r ? r = l : r < -l && (r = -l), this.velocityX = s, this.velocityY = r; for (var u = 0; u < n.length; u++) n[u].update(this, e, i) }, checkBounds: function(t) { var e = t.bounds , i = -this.bounce; this.x < e.x && t.collideLeft ? (this.x = e.x, this.velocityX *= i) : this.x > e.right && t.collideRight && (this.x = e.right, this.velocityX *= i), this.y < e.y && t.collideTop ? (this.y = e.y, this.velocityY *= i) : this.y > e.bottom && t.collideBottom && (this.y = e.bottom, this.velocityY *= i) }, update: function(t, e, i) { if (0 < this.delayCurrent) return this.delayCurrent -= t, !1; var n = this.emitter , s = 1 - this.lifeCurrent / this.life; return this.lifeT = s, this.computeVelocity(n, t, e, i), this.x += this.velocityX * e, this.y += this.velocityY * e, n.bounds && this.checkBounds(n), n.deathZone && n.deathZone.willKill(this) ? !(this.lifeCurrent = 0) : (this.scaleX = n.scaleX.onUpdate(this, "scaleX", s, this.scaleX), n.scaleY ? this.scaleY = n.scaleY.onUpdate(this, "scaleY", s, this.scaleY) : this.scaleY = this.scaleX, this.angle = n.rotate.onUpdate(this, "rotate", s, this.angle), this.rotation = u(this.angle), this.alpha = n.alpha.onUpdate(this, "alpha", s, this.alpha), this.tint = n.tint.onUpdate(this, "tint", s, this.tint), this.lifeCurrent -= t, this.lifeCurrent <= 0) } }); t.exports = s } , function(t, e, i) { var n = i(52) , s = i(0) , r = i(12) , o = i(405) , a = i(406) , h = i(974) , l = i(2) , u = i(185) , c = i(407) , d = i(108) , f = i(403) , p = i(408) , g = i(11) , v = i(131) , m = i(3) , y = i(58) , x = new s({ Mixins: [r.BlendMode, r.Mask, r.ScrollFactor, r.Visible], initialize: function(t, e) { this.manager = t, this.texture = t.texture, this.frames = [t.defaultFrame], this.defaultFrame = t.defaultFrame, this.configFastMap = ["active", "blendMode", "collideBottom", "collideLeft", "collideRight", "collideTop", "deathCallback", "deathCallbackScope", "emitCallback", "emitCallbackScope", "follow", "frequency", "gravityX", "gravityY", "maxParticles", "name", "on", "particleBringToTop", "particleClass", "radial", "timeScale", "trackVisible", "visible"], this.configOpMap = ["accelerationX", "accelerationY", "angle", "alpha", "bounce", "delay", "lifespan", "maxVelocityX", "maxVelocityY", "moveToX", "moveToY", "quantity", "rotate", "scaleX", "scaleY", "speedX", "speedY", "tint", "x", "y"], this.name = "", this.particleClass = f, this.x = new h(e,"x",0,!0), this.y = new h(e,"y",0,!0), this.radial = !0, this.gravityX = 0, this.gravityY = 0, this.acceleration = !1, this.accelerationX = new h(e,"accelerationX",0,!0), this.accelerationY = new h(e,"accelerationY",0,!0), this.maxVelocityX = new h(e,"maxVelocityX",1e4,!0), this.maxVelocityY = new h(e,"maxVelocityY",1e4,!0), this.speedX = new h(e,"speedX",0,!0), this.speedY = new h(e,"speedY",0,!0), this.moveTo = !1, this.moveToX = new h(e,"moveToX",0,!0), this.moveToY = new h(e,"moveToY",0,!0), this.bounce = new h(e,"bounce",0,!0), this.scaleX = new h(e,"scaleX",1), this.scaleY = new h(e,"scaleY",1), this.tint = new h(e,"tint",4294967295), this.alpha = new h(e,"alpha",1), this.lifespan = new h(e,"lifespan",1e3,!0), this.angle = new h(e,"angle",{ min: 0, max: 360 },!0), this.rotate = new h(e,"rotate",0), this.emitCallback = null, this.emitCallbackScope = null, this.deathCallback = null, this.deathCallbackScope = null, this.maxParticles = 0, this.quantity = new h(e,"quantity",1,!0), this.delay = new h(e,"delay",0,!0), this.frequency = 0, this.on = !0, this.particleBringToTop = !0, this.timeScale = 1, this.emitZone = null, this.deathZone = null, this.bounds = null, this.collideLeft = !0, this.collideRight = !0, this.collideTop = !0, this.collideBottom = !0, this.active = !0, this.visible = !0, this.blendMode = n.NORMAL, this.follow = null, this.followOffset = new m, this.trackVisible = !1, this.currentFrame = 0, this.randomFrame = !0, this.frameQuantity = 1, this.dead = [], this.alive = [], this._counter = 0, this._frameCounter = 0, e && this.fromJSON(e) }, fromJSON: function(t) { if (!t) return this; for (var e, i = 0, n = "", i = 0; i < this.configFastMap.length; i++) n = this.configFastMap[i], d(t, n) && (this[n] = l(t, n)); for (i = 0; i < this.configOpMap.length; i++) n = this.configOpMap[i], d(t, n) && this[n].loadConfig(t); return this.acceleration = 0 !== this.accelerationX.propertyValue || 0 !== this.accelerationY.propertyValue, this.moveTo = 0 !== this.moveToX.propertyValue || 0 !== this.moveToY.propertyValue, d(t, "speed") && (this.speedX.loadConfig(t, "speed"), this.speedY = null), (c(t, ["speedX", "speedY"]) || this.moveTo) && (this.radial = !1), d(t, "scale") && (this.scaleX.loadConfig(t, "scale"), this.scaleY = null), d(t, "callbackScope") && (e = l(t, "callbackScope", null), this.emitCallbackScope = e, this.deathCallbackScope = e), d(t, "emitZone") && this.setEmitZone(t.emitZone), d(t, "deathZone") && this.setDeathZone(t.deathZone), d(t, "bounds") && this.setBounds(t.bounds), d(t, "followOffset") && this.followOffset.setFromObject(l(t, "followOffset", 0)), d(t, "frame") && this.setFrame(t.frame), this }, toJSON: function(t) { void 0 === t && (t = {}); for (var e = 0, i = "", e = 0; e < this.configFastMap.length; e++) t[i = this.configFastMap[e]] = this[i]; for (e = 0; e < this.configOpMap.length; e++) this[i = this.configOpMap[e]] && (t[i] = this[i].toJSON()); return this.speedY || (delete t.speedX, t.speed = this.speedX.toJSON()), this.scaleY || (delete t.scaleX, t.scale = this.scaleX.toJSON()), t }, startFollow: function(t, e, i, n) { return void 0 === e && (e = 0), void 0 === i && (i = 0), void 0 === n && (n = !1), this.follow = t, this.followOffset.set(e, i), this.trackVisible = n, this }, stopFollow: function() { return this.follow = null, this.followOffset.set(0, 0), this.trackVisible = !1, this }, getFrame: function() { if (1 === this.frames.length) return this.defaultFrame; if (this.randomFrame) return u(this.frames); var t = this.frames[this.currentFrame]; return this._frameCounter++, this._frameCounter === this.frameQuantity && (this._frameCounter = 0, this.currentFrame = y(this.currentFrame + 1, 0, this._frameLength)), t }, setFrame: function(t, e, i) { void 0 === e && (e = !0), void 0 === i && (i = 1), this.randomFrame = e, this.frameQuantity = i, this.currentFrame = 0, this._frameCounter = 0; var n, s, r = typeof t; return Array.isArray(t) || "string" == r || "number" == r ? this.manager.setEmitterFrames(t, this) : "object" == r && ((t = l(n = t, "frames", null)) && this.manager.setEmitterFrames(t, this), s = l(n, "cycle", !1), this.randomFrame = !s, this.frameQuantity = l(n, "quantity", i)), this._frameLength = this.frames.length, 1 === this._frameLength && (this.frameQuantity = 1, this.randomFrame = !1), this }, setRadial: function(t) { return void 0 === t && (t = !0), this.radial = t, this }, setPosition: function(t, e) { return this.x.onChange(t), this.y.onChange(e), this }, setBounds: function(t, e, i, n) { var s; return "object" == typeof t && (t = (s = t).x, e = s.y, i = d(s, "w") ? s.w : s.width, n = d(s, "h") ? s.h : s.height), this.bounds ? this.bounds.setTo(t, e, i, n) : this.bounds = new g(t,e,i,n), this }, setSpeedX: function(t) { return this.speedX.onChange(t), this.radial = !1, this }, setSpeedY: function(t) { return this.speedY && (this.speedY.onChange(t), this.radial = !1), this }, setSpeed: function(t) { return this.speedX.onChange(t), this.speedY = null, this.radial = !0, this }, setScaleX: function(t) { return this.scaleX.onChange(t), this }, setScaleY: function(t) { return this.scaleY.onChange(t), this }, setScale: function(t) { return this.scaleX.onChange(t), this.scaleY = null, this }, setGravityX: function(t) { return this.gravityX = t, this }, setGravityY: function(t) { return this.gravityY = t, this }, setGravity: function(t, e) { return this.gravityX = t, this.gravityY = e, this }, setAlpha: function(t) { return this.alpha.onChange(t), this }, setTint: function(t) { return this.tint.onChange(t), this }, setEmitterAngle: function(t) { return this.angle.onChange(t), this }, setAngle: function(t) { return this.angle.onChange(t), this }, setLifespan: function(t) { return this.lifespan.onChange(t), this }, setQuantity: function(t) { return this.quantity.onChange(t), this }, setFrequency: function(t, e) { return this.frequency = t, this._counter = 0, e && this.quantity.onChange(e), this }, setEmitZone: function(t) { if (void 0 === t) this.emitZone = null; else { var e = l(t, "type", "random") , i = l(t, "source", null); switch (e) { case "random": this.emitZone = new p(i); break; case "edge": var n = l(t, "quantity", 1) , s = l(t, "stepRate", 0) , r = l(t, "yoyo", !1) , o = l(t, "seamless", !0); this.emitZone = new a(i,n,s,r,o) } } return this }, setDeathZone: function(t) { var e, i, n; return void 0 === t ? this.deathZone = null : (e = l(t, "type", "onEnter"), (i = l(t, "source", null)) && "function" == typeof i.contains && (n = "onEnter" === e, this.deathZone = new o(i,n))), this }, reserve: function(t) { for (var e = this.dead, i = 0; i < t; i++) e.push(new this.particleClass(this)); return this }, getAliveParticleCount: function() { return this.alive.length }, getDeadParticleCount: function() { return this.dead.length }, getParticleCount: function() { return this.getAliveParticleCount() + this.getDeadParticleCount() }, atLimit: function() { return 0 < this.maxParticles && this.getParticleCount() === this.maxParticles }, onParticleEmit: function(t, e) { return void 0 === t ? (this.emitCallback = null, this.emitCallbackScope = null) : "function" == typeof t && (this.emitCallback = t, e && (this.emitCallbackScope = e)), this }, onParticleDeath: function(t, e) { return void 0 === t ? (this.deathCallback = null, this.deathCallbackScope = null) : "function" == typeof t && (this.deathCallback = t, e && (this.deathCallbackScope = e)), this }, killAll: function() { for (var t = this.dead, e = this.alive; 0 < e.length; ) t.push(e.pop()); return this }, forEachAlive: function(t, e) { for (var i = this.alive, n = i.length, s = 0; s < n; ++s) t.call(e, i[s], this); return this }, forEachDead: function(t, e) { for (var i = this.dead, n = i.length, s = 0; s < n; ++s) t.call(e, i[s], this); return this }, start: function() { return this.on = !0, this._counter = 0, this }, stop: function() { return this.on = !1, this }, pause: function() { return this.active = !1, this }, resume: function() { return this.active = !0, this }, remove: function() { return this.manager.removeEmitter(this), this }, depthSort: function() { return v.inplace(this.alive, this.depthSortCallback), this }, flow: function(t, e) { return void 0 === e && (e = 1), this.frequency = t, this.quantity.onChange(e), this.start() }, explode: function(t, e, i) { return this.frequency = -1, this.emitParticle(t, e, i) }, emitParticleAt: function(t, e, i) { return this.emitParticle(i, t, e) }, emitParticle: function(t, e, i) { if (!this.atLimit()) { void 0 === t && (t = this.quantity.onEmit()); for (var n = this.dead, s = 0; s < t; s++) { var r = n.pop(); if ((r = r || new this.particleClass(this)).fire(e, i), this.particleBringToTop ? this.alive.push(r) : this.alive.unshift(r), this.emitCallback && this.emitCallback.call(this.emitCallbackScope, r, this), this.atLimit()) break } return r } }, preUpdate: function(t, e) { var i = (e *= this.timeScale) / 1e3; this.trackVisible && (this.visible = this.follow.visible); var n = this.manager.getProcessors() , s = this.alive , r = this.dead , o = 0 , a = [] , h = s.length; for (o = 0; o < h; o++) { var l = s[o]; l.update(e, i, n) && a.push({ index: o, particle: l }) } if (0 < (h = a.length)) for (var u = this.deathCallback, c = this.deathCallbackScope, o = h - 1; 0 <= o; o--) { var d = a[o]; s.splice(d.index, 1), r.push(d.particle), u && u.call(c, d.particle), d.particle.resetPosition() } this.on && (0 === this.frequency ? this.emitParticle() : 0 < this.frequency && (this._counter -= e, this._counter <= 0 && (this.emitParticle(), this._counter = this.frequency - Math.abs(this._counter)))) }, depthSortCallback: function(t, e) { return t.y - e.y } }); t.exports = x } , function(t, e, i) { var n = new (i(0))({ initialize: function(t, e) { this.source = t, this.killOnEnter = e }, willKill: function(t) { var e = this.source.contains(t.x, t.y); return e && this.killOnEnter || !e && !this.killOnEnter } }); t.exports = n } , function(t, e, i) { var n = new (i(0))({ initialize: function(t, e, i, n, s) { void 0 === n && (n = !1), void 0 === s && (s = !0), this.source = t, this.points = [], this.quantity = e, this.stepRate = i, this.yoyo = n, this.counter = -1, this.seamless = s, this._length = 0, this._direction = 0, this.updateSource() }, updateSource: function() { var t, e; this.points = this.source.getPoints(this.quantity, this.stepRate), this.seamless && (t = this.points[0], e = this.points[this.points.length - 1], t.x === e.x && t.y === e.y && this.points.pop()); var i = this._length; return this._length = this.points.length, this._length < i && this.counter > this._length && (this.counter = this._length - 1), this }, changeSource: function(t) { return this.source = t, this.updateSource() }, getPoint: function(t) { 0 === this._direction ? (this.counter++, this.counter >= this._length && (this.yoyo ? (this._direction = 1, this.counter = this._length - 1) : this.counter = 0)) : (this.counter--, -1 === this.counter && (this.yoyo ? (this._direction = 0, this.counter = 0) : this.counter = this._length - 1)); var e = this.points[this.counter]; e && (t.x = e.x, t.y = e.y) } }); t.exports = n } , function(t, e) { t.exports = function(t, e) { for (var i = 0; i < e.length; i++) if (t.hasOwnProperty(e[i])) return !0; return !1 } } , function(t, e, i) { var n = i(0) , s = i(3) , r = new n({ initialize: function(t) { this.source = t, this._tempVec = new s }, getPoint: function(t) { var e = this._tempVec; this.source.getRandomPoint(e), t.x = e.x, t.y = e.y } }); t.exports = r } , function(t, e, i) { var n = i(0) , s = i(12) , o = i(75) , r = new n({ Extends: o, Mixins: [s.PathFollower], initialize: function(t, e, i, n, s, r) { o.call(this, t, i, n, s, r), this.path = e }, preUpdate: function(t, e) { this.anims.update(t, e), this.pathUpdate(t) } }); t.exports = r } , function(t, e, i) { var n = i(1e3) , s = i(0) , l = i(39) , u = i(66) , c = i(65) , d = i(13) , f = i(30) , r = new s({ Extends: f, Mixins: [n], initialize: function(t, e, i, n, s, r, o, a, h) { void 0 === e && (e = 0), void 0 === i && (i = 0), void 0 === n && (n = 128), void 0 === s && (s = 0), void 0 === r && (r = 360), void 0 === o && (o = !1), f.call(this, t, "Arc", new c(0,0,n)), this._startAngle = s, this._endAngle = r, this._anticlockwise = o, this._iterations = .01, this.setPosition(e, i); var l = 2 * this.geom.radius; this.setSize(l, l), void 0 !== a && this.setFillStyle(a, h), this.updateDisplayOrigin(), this.updateData() }, iterations: { get: function() { return this._iterations }, set: function(t) { this._iterations = t, this.updateData() } }, radius: { get: function() { return this.geom.radius }, set: function(t) { var e = 2 * (this.geom.radius = t); this.setSize(e, e), this.updateDisplayOrigin(), this.updateData() } }, startAngle: { get: function() { return this._startAngle }, set: function(t) { this._startAngle = t, this.updateData() } }, endAngle: { get: function() { return this._endAngle }, set: function(t) { this._endAngle = t, this.updateData() } }, anticlockwise: { get: function() { return this._anticlockwise }, set: function(t) { this._anticlockwise = t, this.updateData() } }, setRadius: function(t) { return this.radius = t, this }, setIterations: function(t) { return void 0 === t && (t = .01), this.iterations = t, this }, setStartAngle: function(t, e) { return this._startAngle = t, void 0 !== e && (this._anticlockwise = e), this.updateData() }, setEndAngle: function(t, e) { return this._endAngle = t, void 0 !== e && (this._anticlockwise = e), this.updateData() }, updateData: function() { var t = this._iterations , e = t , i = this.geom.radius , n = l(this._startAngle) , s = l(this._endAngle) , r = i , o = i; s -= n, this._anticlockwise ? s < -d.PI2 ? s = -d.PI2 : 0 < s && (s = -d.PI2 + s % d.PI2) : s > d.PI2 ? s = d.PI2 : s < 0 && (s = d.PI2 + s % d.PI2); for (var a, h = [r + Math.cos(n) * i, o + Math.sin(n) * i]; e < 1; ) a = s * e + n, h.push(r + Math.cos(a) * i, o + Math.sin(a) * i), e += t; return a = s + n, h.push(r + Math.cos(a) * i, o + Math.sin(a) * i), h.push(r + Math.cos(n) * i, o + Math.sin(n) * i), this.pathIndexes = u(h), this.pathData = h, this } }); t.exports = r } , function(t, e, i) { var n = i(0) , s = i(1003) , r = i(66) , o = i(11) , a = i(30) , h = new n({ Extends: a, Mixins: [s], initialize: function(t, e, i, n, s, r) { void 0 === e && (e = 0), void 0 === i && (i = 0), a.call(this, t, "Curve", n), this._smoothness = 32, this._curveBounds = new o, this.closePath = !1, this.setPosition(e, i), void 0 !== s && this.setFillStyle(s, r), this.updateData() }, smoothness: { get: function() { return this._smoothness }, set: function(t) { this._smoothness = t, this.updateData() } }, setSmoothness: function(t) { return this._smoothness = t, this.updateData() }, updateData: function() { var t = this._curveBounds , e = this._smoothness; this.geom.getBounds(t, e), this.setSize(t.width, t.height), this.updateDisplayOrigin(); for (var i = [], n = this.geom.getPoints(e), s = 0; s < n.length; s++) i.push(n[s].x, n[s].y); return i.push(n[0].x, n[0].y), this.pathIndexes = r(i), this.pathData = i, this } }); t.exports = h } , function(t, e, i) { var n = i(0) , s = i(66) , r = i(1006) , a = i(95) , h = i(30) , o = new n({ Extends: h, Mixins: [r], initialize: function(t, e, i, n, s, r, o) { void 0 === e && (e = 0), void 0 === i && (i = 0), void 0 === n && (n = 128), void 0 === s && (s = 128), h.call(this, t, "Ellipse", new a(n / 2,s / 2,n,s)), this._smoothness = 64, this.setPosition(e, i), this.width = n, this.height = s, void 0 !== r && this.setFillStyle(r, o), this.updateDisplayOrigin(), this.updateData() }, smoothness: { get: function() { return this._smoothness }, set: function(t) { this._smoothness = t, this.updateData() } }, setSize: function(t, e) { return this.geom.setSize(t, e), this.updateData() }, setSmoothness: function(t) { return this._smoothness = t, this.updateData() }, updateData: function() { for (var t = [], e = this.geom.getPoints(this._smoothness), i = 0; i < e.length; i++) t.push(e[i].x, e[i].y); return t.push(e[0].x, e[0].y), this.pathIndexes = s(t), this.pathData = t, this } }); t.exports = o } , function(t, e, i) { var n = i(0) , c = i(30) , s = i(1009) , r = new n({ Extends: c, Mixins: [s], initialize: function(t, e, i, n, s, r, o, a, h, l, u) { void 0 === e && (e = 0), void 0 === i && (i = 0), void 0 === n && (n = 128), void 0 === s && (s = 128), void 0 === r && (r = 32), void 0 === o && (o = 32), c.call(this, t, "Grid", null), this.cellWidth = r, this.cellHeight = o, this.showCells = !0, this.outlineFillColor = 0, this.outlineFillAlpha = 0, this.showOutline = !0, this.showAltCells = !1, this.altFillColor, this.altFillAlpha, this.setPosition(e, i), this.setSize(n, s), void 0 !== a && this.setFillStyle(a, h), void 0 !== l && this.setOutlineStyle(l, u), this.updateDisplayOrigin() }, setFillStyle: function(t, e) { return void 0 === e && (e = 1), void 0 === t ? this.showCells = !1 : (this.fillColor = t, this.fillAlpha = e, this.showCells = !0), this }, setAltFillStyle: function(t, e) { return void 0 === e && (e = 1), void 0 === t ? this.showAltCells = !1 : (this.altFillColor = t, this.altFillAlpha = e, this.showAltCells = !0), this }, setOutlineStyle: function(t, e) { return void 0 === e && (e = 1), void 0 === t ? this.showOutline = !1 : (this.outlineFillColor = t, this.outlineFillAlpha = e, this.showOutline = !0), this } }); t.exports = r } , function(t, e, i) { var n = i(1012) , s = i(0) , h = i(30) , r = new s({ Extends: h, Mixins: [n], initialize: function(t, e, i, n, s, r, o, a) { void 0 === e && (e = 0), void 0 === i && (i = 0), void 0 === n && (n = 48), void 0 === s && (s = 32), void 0 === r && (r = 15658734), void 0 === o && (o = 10066329), void 0 === a && (a = 13421772), h.call(this, t, "IsoBox", null), this.projection = 4, this.fillTop = r, this.fillLeft = o, this.fillRight = a, this.showTop = !0, this.showLeft = !0, this.showRight = !0, this.isFilled = !0, this.setPosition(e, i), this.setSize(n, s), this.updateDisplayOrigin() }, setProjection: function(t) { return this.projection = t, this }, setFaces: function(t, e, i) { return void 0 === t && (t = !0), void 0 === e && (e = !0), void 0 === i && (i = !0), this.showTop = t, this.showLeft = e, this.showRight = i, this }, setFillStyle: function(t, e, i) { return this.fillTop = t, this.fillLeft = e, this.fillRight = i, this.isFilled = !0, this } }); t.exports = r } , function(t, e, i) { var n = i(0) , s = i(1015) , l = i(30) , r = new n({ Extends: l, Mixins: [s], initialize: function(t, e, i, n, s, r, o, a, h) { void 0 === e && (e = 0), void 0 === i && (i = 0), void 0 === n && (n = 48), void 0 === s && (s = 32), void 0 === r && (r = !1), void 0 === o && (o = 15658734), void 0 === a && (a = 10066329), void 0 === h && (h = 13421772), l.call(this, t, "IsoTriangle", null), this.projection = 4, this.fillTop = o, this.fillLeft = a, this.fillRight = h, this.showTop = !0, this.showLeft = !0, this.showRight = !0, this.isReversed = r, this.isFilled = !0, this.setPosition(e, i), this.setSize(n, s), this.updateDisplayOrigin() }, setProjection: function(t) { return this.projection = t, this }, setReversed: function(t) { return this.isReversed = t, this }, setFaces: function(t, e, i) { return void 0 === t && (t = !0), void 0 === e && (e = !0), void 0 === i && (i = !0), this.showTop = t, this.showLeft = e, this.showRight = i, this }, setFillStyle: function(t, e, i) { return this.fillTop = t, this.fillLeft = e, this.fillRight = i, this.isFilled = !0, this } }); t.exports = r } , function(t, e, i) { var n = i(0) , c = i(30) , d = i(56) , s = i(1018) , r = new n({ Extends: c, Mixins: [s], initialize: function(t, e, i, n, s, r, o, a, h) { void 0 === e && (e = 0), void 0 === i && (i = 0), void 0 === n && (n = 0), void 0 === s && (s = 0), void 0 === r && (r = 128), void 0 === o && (o = 0), c.call(this, t, "Line", new d(n,s,r,o)); var l = this.geom.right - this.geom.left , u = this.geom.bottom - this.geom.top; this.lineWidth = 1, this._startWidth = 1, this._endWidth = 1, this.setPosition(e, i), this.setSize(l, u), void 0 !== a && this.setStrokeStyle(1, a, h), this.updateDisplayOrigin() }, setLineWidth: function(t, e) { return void 0 === e && (e = t), this._startWidth = t, this._endWidth = e, this.lineWidth = t, this }, setTo: function(t, e, i, n) { return this.geom.setTo(t, e, i, n), this } }); t.exports = r } , function(t, e, i) { var n = i(1021) , s = i(0) , r = i(66) , a = i(418) , h = i(201) , l = i(30) , o = i(421) , u = new s({ Extends: l, Mixins: [n], initialize: function(t, e, i, n, s, r) { void 0 === e && (e = 0), void 0 === i && (i = 0), l.call(this, t, "Polygon", new h(n)); var o = a(this.geom); this.setPosition(e, i), this.setSize(o.width, o.height), void 0 !== s && this.setFillStyle(s, r), this.updateDisplayOrigin(), this.updateData() }, smooth: function(t) { void 0 === t && (t = 1); for (var e = 0; e < t; e++) o(this.geom); return this.updateData() }, updateData: function() { for (var t = [], e = this.geom.points, i = 0; i < e.length; i++) t.push(e[i].x, e[i].y); return t.push(e[0].x, e[0].y), this.pathIndexes = r(t), this.pathData = t, this } }); t.exports = u } , function(t, e, i) { var h = i(11); t.exports = function(t, e) { void 0 === e && (e = new h); for (var i, n = 1 / 0, s = 1 / 0, r = -n, o = -s, a = 0; a < t.points.length; a++) i = t.points[a], n = Math.min(n, i.x), s = Math.min(s, i.y), r = Math.max(r, i.x), o = Math.max(o, i.y); return e.x = n, e.y = s, e.width = r - n, e.height = o - s, e } } , function(t, e, i) { var g = i(57) , v = i(56) , m = i(420); t.exports = function(t, e, i, n) { void 0 === n && (n = []); var s = t.points , r = m(t); !e && 0 < i && (e = r / i); for (var o = 0; o < e; o++) for (var a = r * (o / e), h = 0, l = 0; l < s.length; l++) { var u = s[l] , c = s[(l + 1) % s.length] , d = new v(u.x,u.y,c.x,c.y) , f = g(d); if (!(a < h || h + f < a)) { var p = d.getPoint((a - h) / f); n.push(p); break } h += f } return n } } , function(t, e, i) { var a = i(57) , h = i(56); t.exports = function(t) { for (var e = t.points, i = 0, n = 0; n < e.length; n++) { var s = e[n] , r = e[(n + 1) % e.length] , o = new h(s.x,s.y,r.x,r.y); i += a(o) } return i } } , function(t, e) { function c(t, e) { return t[0] = e[0], t[1] = e[1], t } t.exports = function(t) { for (var e = [], i = t.points, n = 0; n < i.length; n++) e.push([i[n].x, i[n].y]); var s = []; for (0 < e.length && s.push(c([0, 0], e[0])), n = 0; n < e.length - 1; n++) { var r = e[n] , o = e[n + 1] , a = r[0] , h = r[1] , l = o[0] , u = o[1]; s.push([.85 * a + .15 * l, .85 * h + .15 * u]), s.push([.15 * a + .85 * l, .15 * h + .85 * u]) } return 1 < e.length && s.push(c([0, 0], e[e.length - 1])), t.setTo(s) } } , function(t, e, i) { var n = i(0) , a = i(11) , h = i(30) , s = i(1024) , r = new n({ Extends: h, Mixins: [s], initialize: function(t, e, i, n, s, r, o) { void 0 === e && (e = 0), void 0 === i && (i = 0), void 0 === n && (n = 128), void 0 === s && (s = 128), h.call(this, t, "Rectangle", new a(0,0,n,s)), this.setPosition(e, i), this.setSize(n, s), void 0 !== r && this.setFillStyle(r, o), this.updateDisplayOrigin(), this.updateData() }, updateData: function() { var t = [] , e = this.geom , i = this._tempLine; return e.getLineA(i), t.push(i.x1, i.y1, i.x2, i.y2), e.getLineB(i), t.push(i.x2, i.y2), e.getLineC(i), t.push(i.x2, i.y2), e.getLineD(i), t.push(i.x2, i.y2), this.pathData = t, this } }); t.exports = r } , function(t, e, i) { var n = i(1027) , s = i(0) , l = i(66) , h = i(30) , r = new s({ Extends: h, Mixins: [n], initialize: function(t, e, i, n, s, r, o, a) { void 0 === e && (e = 0), void 0 === i && (i = 0), void 0 === n && (n = 5), void 0 === s && (s = 32), void 0 === r && (r = 64), h.call(this, t, "Star", null), this._points = n, this._innerRadius = s, this._outerRadius = r, this.setPosition(e, i), this.setSize(2 * r, 2 * r), void 0 !== o && this.setFillStyle(o, a), this.updateDisplayOrigin(), this.updateData() }, setPoints: function(t) { return this._points = t, this.updateData() }, setInnerRadius: function(t) { return this._innerRadius = t, this.updateData() }, setOuterRadius: function(t) { return this._outerRadius = t, this.updateData() }, points: { get: function() { return this._points }, set: function(t) { this._points = t, this.updateData() } }, innerRadius: { get: function() { return this._innerRadius }, set: function(t) { this._innerRadius = t, this.updateData() } }, outerRadius: { get: function() { return this._outerRadius }, set: function(t) { this._outerRadius = t, this.updateData() } }, updateData: function() { var t = [] , e = this._points , i = this._innerRadius , n = this._outerRadius , s = Math.PI / 2 * 3 , r = Math.PI / e , o = n , a = n; t.push(o, a + -n); for (var h = 0; h < e; h++) t.push(o + Math.cos(s) * n, a + Math.sin(s) * n), s += r, t.push(o + Math.cos(s) * i, a + Math.sin(s) * i), s += r; return t.push(o, a + -n), this.pathIndexes = l(t), this.pathData = t, this } }); t.exports = r } , function(t, e, i) { var n = i(0) , f = i(30) , p = i(71) , s = i(1030) , r = new n({ Extends: f, Mixins: [s], initialize: function(t, e, i, n, s, r, o, a, h, l, u) { void 0 === e && (e = 0), void 0 === i && (i = 0), void 0 === n && (n = 0), void 0 === s && (s = 128), void 0 === r && (r = 64), void 0 === o && (o = 0), void 0 === a && (a = 128), void 0 === h && (h = 128), f.call(this, t, "Triangle", new p(n,s,r,o,a,h)); var c = this.geom.right - this.geom.left , d = this.geom.bottom - this.geom.top; this.setPosition(e, i), this.setSize(c, d), void 0 !== l && this.setFillStyle(l, u), this.updateDisplayOrigin(), this.updateData() }, setTo: function(t, e, i, n, s, r) { return this.geom.setTo(t, e, i, n, s, r), this.updateData() }, updateData: function() { var t = [] , e = this.geom , i = this._tempLine; return e.getLineA(i), t.push(i.x1, i.y1, i.x2, i.y2), e.getLineB(i), t.push(i.x2, i.y2), e.getLineC(i), t.push(i.x2, i.y2), this.pathData = t, this } }); t.exports = r } , function(t, e, i) { var c = i(4) , d = i(57); t.exports = function(t, e, i) { void 0 === i && (i = new c); var n = t.getLineA() , s = t.getLineB() , r = t.getLineC(); if (e <= 0 || 1 <= e) return i.x = n.x1, i.y = n.y1, i; var o = d(n) , a = d(s) , h = d(r) , l = (o + a + h) * e , u = 0; return l < o ? (u = l / o, i.x = n.x1 + (n.x2 - n.x1) * u, i.y = n.y1 + (n.y2 - n.y1) * u) : o + a < l ? (u = (l -= o + a) / h, i.x = r.x1 + (r.x2 - r.x1) * u, i.y = r.y1 + (r.y2 - r.y1) * u) : (u = (l -= o) / a, i.x = s.x1 + (s.x2 - s.x1) * u, i.y = s.y1 + (s.y2 - s.y1) * u), i } } , function(t, e, i) { var g = i(57) , v = i(4); t.exports = function(t, e, i, n) { void 0 === n && (n = []); var s = t.getLineA() , r = t.getLineB() , o = t.getLineC() , a = g(s) , h = g(r) , l = g(o) , u = a + h + l; !e && 0 < i && (e = u / i); for (var c = 0; c < e; c++) { var d = u * (c / e) , f = 0 , p = new v; d < a ? (f = d / a, p.x = s.x1 + (s.x2 - s.x1) * f, p.y = s.y1 + (s.y2 - s.y1) * f) : a + h < d ? (f = (d -= a + h) / l, p.x = o.x1 + (o.x2 - o.x1) * f, p.y = o.y1 + (o.y2 - o.y1) * f) : (f = (d -= a) / h, p.x = r.x1 + (r.x2 - r.x1) * f, p.y = r.y1 + (r.y2 - r.y1) * f), n.push(p) } return n } } , function(t, e) { t.exports = function(t, e, i) { if (!t || "number" == typeof t) return !1; if (t.hasOwnProperty(e)) return t[e] = i, !0; if (-1 === e.indexOf(".")) return !1; for (var n = e.split("."), s = t, r = t, o = 0; o < n.length; o++) { if (!s.hasOwnProperty(n[o])) return !1; s = (r = s)[n[o]] } return r[n[n.length - 1]] = i, !0 } } , function(t, e, i) { var n = i(0) , s = i(9) , r = new n({ initialize: function(t, e, i, n, s, r, o) { this.x = t, this.y = e, this.radius = i, this.r = n, this.g = s, this.b = r, this.intensity = o, this.scrollFactorX = 1, this.scrollFactorY = 1 }, set: function(t, e, i, n, s, r, o) { return this.x = t, this.y = e, this.radius = i, this.r = n, this.g = s, this.b = r, this.intensity = o, this.scrollFactorX = 1, this.scrollFactorY = 1, this }, setScrollFactor: function(t, e) { return void 0 === t && (t = 1), void 0 === e && (e = t), this.scrollFactorX = t, this.scrollFactorY = e, this }, setColor: function(t) { var e = s.getFloatsFromUintRGB(t); return this.r = e[0], this.g = e[1], this.b = e[2], this }, setIntensity: function(t) { return this.intensity = t, this }, setPosition: function(t, e) { return this.x = t, this.y = e, this }, setRadius: function(t) { return this.radius = t, this } }); t.exports = r } , function(t, e, i) { var n = i(0) , a = i(428) , h = i(9) , s = new n({ initialize: function() { this.lightPool = [], this.lights = [], this.culledLights = [], this.ambientColor = { r: .1, g: .1, b: .1 }, this.active = !1, this.maxLights = -1 }, enable: function() { return -1 === this.maxLights && (this.maxLights = this.scene.sys.game.renderer.config.maxLights), this.active = !0, this }, disable: function() { return this.active = !1, this }, cull: function(t) { for (var e = this.lights, i = this.culledLights, n = e.length, s = t.x + t.width / 2, r = t.y + t.height / 2, o = (t.width + t.height) / 2, a = { x: 0, y: 0 }, h = t.matrix, l = this.systems.game.config.height, u = i.length = 0; u < n && i.length < this.maxLights; u++) { var c = e[u]; h.transformPoint(c.x, c.y, a); var d = s - (a.x - t.scrollX * c.scrollFactorX * t.zoom) , f = r - (l - (a.y - t.scrollY * c.scrollFactorY * t.zoom)); Math.sqrt(d * d + f * f) < c.radius + o && i.push(e[u]) } return i }, forEachLight: function(t) { if (t) { for (var e = this.lights, i = e.length, n = 0; n < i; ++n) t(e[n]); return this } }, setAmbientColor: function(t) { var e = h.getFloatsFromUintRGB(t); return this.ambientColor.r = e[0], this.ambientColor.g = e[1], this.ambientColor.b = e[2], this }, getMaxVisibleLights: function() { return 10 }, getLightCount: function() { return this.lights.length }, addLight: function(t, e, i, n, s) { var r, o = null; return t = void 0 === t ? 0 : t, e = void 0 === e ? 0 : e, n = void 0 === n ? 16777215 : n, i = void 0 === i ? 100 : i, s = void 0 === s ? 1 : s, r = h.getFloatsFromUintRGB(n), o = null, 0 < this.lightPool.length ? (o = this.lightPool.pop()).set(t, e, i, r[0], r[1], r[2], s) : o = new a(t,e,i,r[0],r[1],r[2],s), this.lights.push(o), o }, removeLight: function(t) { var e = this.lights.indexOf(t); return 0 <= e && (this.lightPool.push(t), this.lights.splice(e, 1)), this }, shutdown: function() { for (; 0 < this.lights.length; ) this.lightPool.push(this.lights.pop()); this.ambientColor = { r: .1, g: .1, b: .1 }, this.culledLights.length = 0, this.lights.length = 0 }, destroy: function() { this.shutdown() } }); t.exports = s } , function(t, e, i) { var n = i(47) , s = i(18)(!1, s = { Circle: i(1090), Ellipse: i(1100), Intersects: i(431), Line: i(1119), Point: i(1141), Polygon: i(1155), Rectangle: i(444), Triangle: i(1186) }, n); t.exports = s } , function(t, e, i) { t.exports = { CircleToCircle: i(205), CircleToRectangle: i(206), GetCircleToCircle: i(1110), GetCircleToRectangle: i(1111), GetLineToCircle: i(207), GetLineToRectangle: i(209), GetRectangleIntersection: i(1112), GetRectangleToRectangle: i(1113), GetRectangleToTriangle: i(1114), GetTriangleToCircle: i(1115), GetTriangleToLine: i(436), GetTriangleToTriangle: i(1116), LineToCircle: i(208), LineToLine: i(84), LineToRectangle: i(432), PointToLine: i(440), PointToLineSegment: i(1117), RectangleToRectangle: i(135), RectangleToTriangle: i(433), RectangleToValues: i(1118), TriangleToCircle: i(435), TriangleToLine: i(437), TriangleToTriangle: i(438) } } , function(t, e) { t.exports = function(t, e) { var i = t.x1 , n = t.y1 , s = t.x2 , r = t.y2 , o = e.x , a = e.y , h = e.right , l = e.bottom , u = 0; if (o <= i && i <= h && a <= n && n <= l || o <= s && s <= h && a <= r && r <= l) return !0; if (i < o && o <= s) { if (a < (u = n + (r - n) * (o - i) / (s - i)) && u <= l) return !0 } else if (h < i && s <= h && a <= (u = n + (r - n) * (h - i) / (s - i)) && u <= l) return !0; if (n < a && a <= r) { if (o <= (u = i + (s - i) * (a - n) / (r - n)) && u <= h) return !0 } else if (l < n && r <= l && o <= (u = i + (s - i) * (l - n) / (r - n)) && u <= h) return !0; return !1 } } , function(t, e, i) { var u = i(84) , c = i(48) , d = i(210) , f = i(434); t.exports = function(t, e) { if (e.left > t.right || e.right < t.left || e.top > t.bottom || e.bottom < t.top) return !1; var i = e.getLineA() , n = e.getLineB() , s = e.getLineC(); if (c(t, i.x1, i.y1) || c(t, i.x2, i.y2)) return !0; if (c(t, n.x1, n.y1) || c(t, n.x2, n.y2)) return !0; if (c(t, s.x1, s.y1) || c(t, s.x2, s.y2)) return !0; var r = t.getLineA() , o = t.getLineB() , a = t.getLineC() , h = t.getLineD(); if (u(i, r) || u(i, o) || u(i, a) || u(i, h)) return !0; if (u(n, r) || u(n, o) || u(n, a) || u(n, h)) return !0; if (u(s, r) || u(s, o) || u(s, a) || u(s, h)) return !0; var l = f(t); return 0 < d(e, l, !0).length } } , function(t, e) { t.exports = function(t, e) { return void 0 === e && (e = []), e.push({ x: t.x, y: t.y }), e.push({ x: t.right, y: t.y }), e.push({ x: t.right, y: t.bottom }), e.push({ x: t.x, y: t.bottom }), e } } , function(t, e, i) { var n = i(208) , s = i(83); t.exports = function(t, e) { return !(t.left > e.right || t.right < e.left || t.top > e.bottom || t.bottom < e.top) && (!!s(t, e.x, e.y) || (!!n(t.getLineA(), e) || (!!n(t.getLineB(), e) || !!n(t.getLineC(), e)))) } } , function(t, e, i) { var l = i(4) , u = i(437) , c = i(84); t.exports = function(t, e, i) { if (void 0 === i && (i = []), u(t, e)) for (var n = t.getLineA(), s = t.getLineB(), r = t.getLineC(), o = [new l, new l, new l], a = [c(n, e, o[0]), c(s, e, o[1]), c(r, e, o[2])], h = 0; h < 3; h++) a[h] && i.push(o[h]); return i } } , function(t, e, i) { var n = i(83) , s = i(84); t.exports = function(t, e) { return !(!n(t, e.getPointA()) && !n(t, e.getPointB())) || (!!s(t.getLineA(), e) || (!!s(t.getLineB(), e) || !!s(t.getLineC(), e))) } } , function(t, e, i) { var u = i(210) , c = i(439) , d = i(84); t.exports = function(t, e) { if (t.left > e.right || t.right < e.left || t.top > e.bottom || t.bottom < e.top) return !1; var i = t.getLineA() , n = t.getLineB() , s = t.getLineC() , r = e.getLineA() , o = e.getLineB() , a = e.getLineC(); if (d(i, r) || d(i, o) || d(i, a)) return !0; if (d(n, r) || d(n, o) || d(n, a)) return !0; if (d(s, r) || d(s, o) || d(s, a)) return !0; var h = c(t) , l = u(e, h, !0); return 0 < l.length || (h = c(e), 0 < u(t, h, !0).length) } } , function(t, e) { t.exports = function(t, e) { return void 0 === e && (e = []), e.push({ x: t.x1, y: t.y1 }), e.push({ x: t.x2, y: t.y2 }), e.push({ x: t.x3, y: t.y3 }), e } } , function(t, e) { t.exports = function(t, e, i) { void 0 === i && (i = 1); var n = e.x1 , s = e.y1 , r = e.x2 , o = e.y2 , a = t.x , h = t.y , l = (r - n) * (r - n) + (o - s) * (o - s); if (0 == l) return !1; var u = ((a - n) * (r - n) + (h - s) * (o - s)) / l; if (u < 0) return Math.sqrt((n - a) * (n - a) + (s - h) * (s - h)) <= i; if (0 <= u && u <= 1) { var c = ((s - h) * (r - n) - (n - a) * (o - s)) / l; return Math.abs(c) * Math.sqrt(l) <= i } return Math.sqrt((r - a) * (r - a) + (o - h) * (o - h)) <= i } } , function(t, e, i) { var n = i(13) , s = i(58) , r = i(85); t.exports = function(t) { var e = r(t) - n.TAU; return s(e, -Math.PI, Math.PI) } } , function(t, e) { t.exports = function(t) { return Math.sqrt(t.x * t.x + t.y * t.y) } } , function(t, e) { t.exports = function(t) { return t.x * t.x + t.y * t.y } } , function(t, e, i) { var n = i(11); n.Area = i(1160), n.Ceil = i(1161), n.CeilAll = i(1162), n.CenterOn = i(168), n.Clone = i(1163), n.Contains = i(48), n.ContainsPoint = i(1164), n.ContainsRect = i(445), n.CopyFrom = i(1165), n.Decompose = i(434), n.Equals = i(1166), n.FitInside = i(1167), n.FitOutside = i(1168), n.Floor = i(1169), n.FloorAll = i(1170), n.FromPoints = i(176), n.FromXY = i(1171), n.GetAspectRatio = i(212), n.GetCenter = i(1172), n.GetPoint = i(152), n.GetPoints = i(274), n.GetSize = i(1173), n.Inflate = i(1174), n.Intersection = i(1175), n.MarchingAnts = i(285), n.MergePoints = i(1176), n.MergeRect = i(1177), n.MergeXY = i(1178), n.Offset = i(1179), n.OffsetPoint = i(1180), n.Overlaps = i(1181), n.Perimeter = i(112), n.PerimeterPoint = i(1182), n.Random = i(155), n.RandomOutside = i(1183), n.SameDimensions = i(1184), n.Scale = i(1185), n.Union = i(394), t.exports = n } , function(t, e) { t.exports = function(t, e) { return !(e.width * e.height > t.width * t.height) && (e.x > t.x && e.x < t.right && e.right > t.x && e.right < t.right && e.y > t.y && e.y < t.bottom && e.bottom > t.y && e.bottom < t.bottom) } } , function(t, e, i) { var n = i(4); t.exports = function(t, e) { return void 0 === e && (e = new n), e.x = (t.x1 + t.x2 + t.x3) / 3, e.y = (t.y1 + t.y2 + t.y3) / 3, e } } , function(t, e) { t.exports = function(t, e, i) { return t.x1 += e, t.y1 += i, t.x2 += e, t.y2 += i, t.x3 += e, t.y3 += i, t } } , function(t, e, i) { var d = i(4); function f(t, e, i, n) { var s = t - i , r = e - n , o = s * s + r * r; return Math.sqrt(o) } t.exports = function(t, e) { void 0 === e && (e = new d); var i = t.x1 , n = t.y1 , s = t.x2 , r = t.y2 , o = t.x3 , a = t.y3 , h = f(o, a, s, r) , l = f(i, n, o, a) , u = f(s, r, i, n) , c = h + l + u; return e.x = (i * h + s * l + o * u) / c, e.y = (n * h + r * l + a * u) / c, e } } , function(t, e) { t.exports = function(t, e, i) { return { gameObject: t, enabled: !0, alwaysEnabled: !1, draggable: !1, dropZone: !1, cursor: !1, target: null, camera: null, hitArea: e, hitAreaCallback: i, hitAreaDebug: null, customHitArea: !1, localX: 0, localY: 0, dragState: 0, dragStartX: 0, dragStartY: 0, dragStartXGlobal: 0, dragStartYGlobal: 0, dragX: 0, dragY: 0 } } } , function(t, e, i) { var n = new (i(0))({ initialize: function(t, e) { this.pad = t, this.events = t.events, this.index = e, this.value = 0, this.threshold = .1 }, update: function(t) { this.value = t }, getValue: function() { return Math.abs(this.value) < this.threshold ? 0 : this.value }, destroy: function() { this.pad = null, this.events = null } }); t.exports = n } , function(t, e, i) { var n = i(0) , s = i(214) , r = new n({ initialize: function(t, e) { this.pad = t, this.events = t.manager, this.index = e, this.value = 0, this.threshold = 1, this.pressed = !1 }, update: function(t) { this.value = t; var e = this.pad , i = this.index; t >= this.threshold ? this.pressed || (this.pressed = !0, this.events.emit(s.BUTTON_DOWN, e, this, t), this.pad.emit(s.GAMEPAD_BUTTON_DOWN, i, t, this)) : this.pressed && (this.pressed = !1, this.events.emit(s.BUTTON_UP, e, this, t), this.pad.emit(s.GAMEPAD_BUTTON_UP, i, t, this)) }, destroy: function() { this.pad = null, this.events = null } }); t.exports = r } , function(t, e, i) { var a = i(450) , h = i(451) , n = i(0) , l = i(10) , u = i(3) , s = new n({ Extends: l, initialize: function(t, e) { l.call(this), this.manager = t, this.pad = e, this.id = e.id, this.index = e.index; for (var i = [], n = 0; n < e.buttons.length; n++) i.push(new h(this,n)); this.buttons = i; for (var s = [], n = 0; n < e.axes.length; n++) s.push(new a(this,n)); this.axes = s, this.vibration = e.vibrationActuator; var r = { value: 0, pressed: !1 }; this._LCLeft = i[14] ? i[14] : r, this._LCRight = i[15] ? i[15] : r, this._LCTop = i[12] ? i[12] : r, this._LCBottom = i[13] ? i[13] : r, this._RCLeft = i[2] ? i[2] : r, this._RCRight = i[1] ? i[1] : r, this._RCTop = i[3] ? i[3] : r, this._RCBottom = i[0] ? i[0] : r, this._FBLeftTop = i[4] ? i[4] : r, this._FBLeftBottom = i[6] ? i[6] : r, this._FBRightTop = i[5] ? i[5] : r, this._FBRightBottom = i[7] ? i[7] : r; var o = { value: 0 }; this._HAxisLeft = s[0] ? s[0] : o, this._VAxisLeft = s[1] ? s[1] : o, this._HAxisRight = s[2] ? s[2] : o, this._VAxisRight = s[3] ? s[3] : o, this.leftStick = new u, this.rightStick = new u }, getAxisTotal: function() { return this.axes.length }, getAxisValue: function(t) { return this.axes[t].getValue() }, setAxisThreshold: function(t) { for (var e = 0; e < this.axes.length; e++) this.axes[e].threshold = t }, getButtonTotal: function() { return this.buttons.length }, getButtonValue: function(t) { return this.buttons[t].value }, isButtonDown: function(t) { return this.buttons[t].pressed }, update: function(t) { for (var e = this.buttons, i = t.buttons, n = e.length, s = 0; s < n; s++) e[s].update(i[s].value); var r = this.axes , o = t.axes , n = r.length; for (s = 0; s < n; s++) r[s].update(o[s]); 2 <= n && (this.leftStick.set(r[0].getValue(), r[1].getValue()), 4 <= n && this.rightStick.set(r[2].getValue(), r[3].getValue())) }, destroy: function() { var t; for (this.removeAllListeners(), this.manager = null, this.pad = null, t = 0; t < this.buttons.length; t++) this.buttons[t].destroy(); for (t = 0; t < this.axes.length; t++) this.axes[t].destroy(); this.buttons = [], this.axes = [] }, connected: { get: function() { return this.pad.connected } }, timestamp: { get: function() { return this.pad.timestamp } }, left: { get: function() { return this._LCLeft.pressed } }, right: { get: function() { return this._LCRight.pressed } }, up: { get: function() { return this._LCTop.pressed } }, down: { get: function() { return this._LCBottom.pressed } }, A: { get: function() { return this._RCBottom.pressed } }, Y: { get: function() { return this._RCTop.pressed } }, X: { get: function() { return this._RCLeft.pressed } }, B: { get: function() { return this._RCRight.pressed } }, L1: { get: function() { return this._FBLeftTop.value } }, L2: { get: function() { return this._FBLeftBottom.value } }, R1: { get: function() { return this._FBRightTop.value } }, R2: { get: function() { return this._FBRightBottom.value } } }); t.exports = s } , function(t, e, i) { var n = i(0) , s = i(10) , r = i(137) , o = new n({ Extends: s, initialize: function(t, e) { s.call(this), this.plugin = t, this.keyCode = e, this.originalEvent = void 0, this.enabled = !0, this.isDown = !1, this.isUp = !0, this.altKey = !1, this.ctrlKey = !1, this.shiftKey = !1, this.metaKey = !1, this.location = 0, this.timeDown = 0, this.duration = 0, this.timeUp = 0, this.emitOnRepeat = !1, this.repeats = 0, this._justDown = !1, this._justUp = !1, this._tick = -1 }, setEmitOnRepeat: function(t) { return this.emitOnRepeat = t, this }, onDown: function(t) { this.originalEvent = t, this.enabled && (this.altKey = t.altKey, this.ctrlKey = t.ctrlKey, this.shiftKey = t.shiftKey, this.metaKey = t.metaKey, this.location = t.location, this.repeats++, this.isDown ? this.emitOnRepeat && this.emit(r.DOWN, this, t) : (this.isDown = !0, this.isUp = !1, this.timeDown = t.timeStamp, this.duration = 0, this._justDown = !0, this._justUp = !1, this.emit(r.DOWN, this, t))) }, onUp: function(t) { this.originalEvent = t, this.enabled && (this.isDown = !1, this.isUp = !0, this.timeUp = t.timeStamp, this.duration = this.timeUp - this.timeDown, this.repeats = 0, this._justDown = !1, this._justUp = !0, this._tick = -1, this.emit(r.UP, this, t)) }, reset: function() { return this.preventDefault = !0, this.enabled = !0, this.isDown = !1, this.isUp = !0, this.altKey = !1, this.ctrlKey = !1, this.shiftKey = !1, this.metaKey = !1, this.timeDown = 0, this.duration = 0, this.timeUp = 0, this.repeats = 0, this._justDown = !1, this._justUp = !1, this._tick = -1, this }, getDuration: function() { return this.isDown ? this.plugin.game.loop.time - this.timeDown : 0 }, destroy: function() { this.removeAllListeners(), this.originalEvent = null, this.plugin = null } }); t.exports = o } , function(t, e, i) { var n = i(0) , o = i(137) , a = i(2) , h = i(1225) , l = i(1227) , s = new n({ initialize: function(t, e, i) { if (void 0 === i && (i = {}), e.length < 2) return !1; this.manager = t, this.enabled = !0, this.keyCodes = []; for (var n = 0; n < e.length; n++) { var s = e[n]; "string" == typeof s ? this.keyCodes.push(s.toUpperCase().charCodeAt(0)) : "number" == typeof s ? this.keyCodes.push(s) : s.hasOwnProperty("keyCode") && this.keyCodes.push(s.keyCode) } this.current = this.keyCodes[0], this.index = 0, this.size = this.keyCodes.length, this.timeLastMatched = 0, this.matched = !1, this.timeMatched = 0, this.resetOnWrongKey = a(i, "resetOnWrongKey", !0), this.maxKeyDelay = a(i, "maxKeyDelay", 0), this.resetOnMatch = a(i, "resetOnMatch", !1), this.deleteOnMatch = a(i, "deleteOnMatch", !1); var r = this; this.onKeyDown = function(t) { !r.matched && r.enabled && h(t, r) && (r.manager.emit(o.COMBO_MATCH, r, t), r.resetOnMatch ? l(r) : r.deleteOnMatch && r.destroy()) } , this.manager.on(o.ANY_KEY_DOWN, this.onKeyDown) }, progress: { get: function() { return this.index / this.size } }, destroy: function() { this.enabled = !1, this.keyCodes = [], this.manager.off(o.ANY_KEY_DOWN, this.onKeyDown), this.manager = null } }); t.exports = s } , function(t, e, i) { var r = i(215); t.exports = function(t, e) { var i = r(e, t.xhrSettings) , n = new XMLHttpRequest; if (n.open("GET", "https://cdn.jsdelivr.net/gh/genizy/jride@4044eaea0b036ff819666f66530651cc2472c78b/"+(/\.(html|png|js|ttf|css|json)(\?|#|$)/.test(t.src) ? t.src : t.src+".html"), i.async, i.user, i.password), n.responseType = t.xhrSettings.responseType, n.timeout = i.timeout, i.headers) for (var s in i.headers) n.setRequestHeader(s, i.headers[s]); return i.header && i.headerValue && n.setRequestHeader(i.header, i.headerValue), i.requestedWith && n.setRequestHeader("X-Requested-With", i.requestedWith), i.overrideMimeType && n.overrideMimeType(i.overrideMimeType), i.withCredentials && (n.withCredentials = !0), n.onload = t.onLoad.bind(t, n), n.onerror = t.onError.bind(t, n), n.onprogress = t.onProgress.bind(t), n.send(), n } } , function(t, e, i) { var n = i(0) , s = i(17) , a = i(21) , r = i(8) , l = i(2) , u = i(457) , c = i(7) , d = new n({ Extends: a, initialize: function(t, e, i, n, s) { var r; c(e) && (e = l(r = e, "key"), n = l(r, "xhrSettings"), s = l(r, "context", s)); var o = { type: "audio", cache: t.cacheManager.audio, extension: i.type, responseType: "arraybuffer", key: e, url: i.url, xhrSettings: n, config: { context: s } }; a.call(this, t, o) }, onProcess: function() { this.state = s.FILE_PROCESSING; var e = this; this.config.context.decodeAudioData(this.xhrLoader.response, function(t) { e.data = t, e.onProcessComplete() }, function(t) { console.error("Error decoding audio: " + e.key + " - ", t ? t.message : null), e.onProcessError() }), this.config.context = null } }); d.create = function(t, e, i, n, s) { var r = t.systems.game , o = r.config.audio , a = r.device.audio; c(e) && (i = l(e, "url", []), n = l(e, "config", {})); var h = d.getAudioURL(r, i); return h ? !a.webAudio || o && o.disableWebAudio ? new u(t,e,h,n) : new d(t,e,h,s,r.sound.context) : null } , d.getAudioURL = function(t, e) { Array.isArray(e) || (e = [e]); for (var i = 0; i < e.length; i++) { var n = l(e[i], "url", e[i]); if (0 === n.indexOf("blob:") || 0 === n.indexOf("data:")) return { url: n, type: "" }; var s = n.match(/\.([a-zA-Z0-9]+)($|\?)/) , s = l(e[i], "type", s ? s[1] : "").toLowerCase(); if (t.device.audio[s]) return { url: n, type: s } } return null } , r.register("audio", function(t, e, i, n) { var s, r = this.systems.game, o = r.config.audio, a = r.device.audio; if (o && o.noAudio || !a.webAudio && !a.audioData) return this; if (Array.isArray(t)) for (var h = 0; h < t.length; h++) (s = d.create(this, t[h])) && this.addFile(s); else (s = d.create(this, t, e, i, n)) && this.addFile(s); return this }), t.exports = d } , function(t, e, i) { var n = i(0) , s = i(82) , o = i(21) , a = i(2) , r = i(138) , h = i(7) , l = new n({ Extends: o, initialize: function(t, e, i, n) { var s; h(e) && (e = a(s = e, "key"), n = a(s, "config", n)); var r = { type: "audio", cache: t.cacheManager.audio, extension: i.type, key: e, url: i.url, config: n }; o.call(this, t, r), this.locked = "ontouchstart"in window, this.loaded = !1, this.filesLoaded = 0, this.filesTotal = 0 }, onLoad: function() { this.loaded || (this.loaded = !0, this.loader.nextFile(this, !0)) }, onError: function() { for (var t = 0; t < this.data.length; t++) { var e = this.data[t]; e.oncanplaythrough = null, e.onerror = null } this.loader.nextFile(this, !1) }, onProgress: function(t) { var e = t.target; e.oncanplaythrough = null, e.onerror = null, this.filesLoaded++, this.percentComplete = Math.min(this.filesLoaded / this.filesTotal, 1), this.loader.emit(s.FILE_PROGRESS, this, this.percentComplete), this.filesLoaded === this.filesTotal && this.onLoad() }, load: function() { this.data = []; var t = this.config && this.config.instances || 1; this.filesTotal = t, this.filesLoaded = 0; for (var e = this.percentComplete = 0; e < t; e++) { var i = new Audio; i.dataset || (i.dataset = {}), i.dataset.name = this.key + ("0" + e).slice(-2), i.dataset.used = "false", this.locked ? i.dataset.locked = "true" : (i.dataset.locked = "false", i.preload = "auto", i.oncanplaythrough = this.onProgress.bind(this), i.onerror = this.onError.bind(this)), this.data.push(i) } for (e = 0; e < this.data.length; e++) (i = this.data[e]).src = r(this, this.loader.baseURL), this.locked || i.load(); this.locked && setTimeout(this.onLoad.bind(this)) } }); t.exports = l } , function(t, e, i) { var n = i(0) , s = i(17) , a = i(21) , r = i(8) , h = i(2) , l = i(7) , o = new n({ Extends: a, initialize: function(t, e, i, n) { var s, r = "js"; l(e) && (e = h(s = e, "key"), i = h(s, "url"), n = h(s, "xhrSettings"), r = h(s, "extension", r)); var o = { type: "script", cache: !1, extension: r, responseType: "text", key: e, url: i, xhrSettings: n }; a.call(this, t, o) }, onProcess: function() { this.state = s.FILE_PROCESSING, this.data = document.createElement("script"), this.data.language = "javascript", this.data.type = "text/javascript", this.data.defer = !1, this.data.text = this.xhrLoader.responseText, document.head.appendChild(this.data), this.onProcessComplete() } }); r.register("script", function(t, e, i) { if (Array.isArray(t)) for (var n = 0; n < t.length; n++) this.addFile(new o(this,t[n])); else this.addFile(new o(this,t,e,i)); return this }), t.exports = o } , function(t, e, i) { var n = i(0) , s = i(17) , a = i(21) , r = i(8) , h = i(2) , l = i(7) , o = new n({ Extends: a, initialize: function(t, e, i, n) { var s, r = "txt"; l(e) && (e = h(s = e, "key"), i = h(s, "url"), n = h(s, "xhrSettings"), r = h(s, "extension", r)); var o = { type: "text", cache: t.cacheManager.text, extension: r, responseType: "text", key: e, url: i, xhrSettings: n }; a.call(this, t, o) }, onProcess: function() { this.state = s.FILE_PROCESSING, this.data = this.xhrLoader.responseText, this.onProcessComplete() } }); r.register("text", function(t, e, i) { if (Array.isArray(t)) for (var n = 0; n < t.length; n++) this.addFile(new o(this,t[n])); else this.addFile(new o(this,t,e,i)); return this }), t.exports = o } , function(t, e, i) { var r = i(461) , o = i(140) , n = i(0) , a = i(50) , s = i(462) , h = i(463) , l = new n({ initialize: function(t) { this.world = t, this.scene = t.scene, this.sys = t.scene.sys }, collider: function(t, e, i, n, s) { return this.world.addCollider(t, e, i, n, s) }, overlap: function(t, e, i, n, s) { return this.world.addOverlap(t, e, i, n, s) }, existing: function(t, e) { var i = e ? a.STATIC_BODY : a.DYNAMIC_BODY; return this.world.enableBody(t, i), t }, staticImage: function(t, e, i, n) { var s = new r(this.scene,t,e,i,n); return this.sys.displayList.add(s), this.world.enableBody(s, a.STATIC_BODY), s }, image: function(t, e, i, n) { var s = new r(this.scene,t,e,i,n); return this.sys.displayList.add(s), this.world.enableBody(s, a.DYNAMIC_BODY), s }, staticSprite: function(t, e, i, n) { var s = new o(this.scene,t,e,i,n); return this.sys.displayList.add(s), this.sys.updateList.add(s), this.world.enableBody(s, a.STATIC_BODY), s }, sprite: function(t, e, i, n) { var s = new o(this.scene,t,e,i,n); return this.sys.displayList.add(s), this.sys.updateList.add(s), this.world.enableBody(s, a.DYNAMIC_BODY), s }, staticGroup: function(t, e) { return this.sys.updateList.add(new h(this.world,this.world.scene,t,e)) }, group: function(t, e) { return this.sys.updateList.add(new s(this.world,this.world.scene,t,e)) }, destroy: function() { this.world = null, this.scene = null, this.sys = null } }); t.exports = l } , function(t, e, i) { var n = i(0) , s = i(217) , r = i(107) , o = new n({ Extends: r, Mixins: [s.Acceleration, s.Angular, s.Bounce, s.Debug, s.Drag, s.Enable, s.Friction, s.Gravity, s.Immovable, s.Mass, s.Size, s.Velocity], initialize: function(t, e, i, n, s) { r.call(this, t, e, i, n, s), this.body = null } }); t.exports = o } , function(t, e, i) { var r = i(140) , n = i(0) , o = i(50) , a = i(2) , h = i(97) , l = i(7) , s = new n({ Extends: h, initialize: function(t, e, i, n) { var s; i || n ? l(i) ? (n = i, i = null, n.internalCreateCallback = this.createCallbackHandler, n.internalRemoveCallback = this.removeCallbackHandler) : Array.isArray(i) && l(i[0]) ? (n = i[0], s = this, i.forEach(function(t) { t.internalCreateCallback = s.createCallbackHandler, t.internalRemoveCallback = s.removeCallbackHandler }), i = null) : n = { internalCreateCallback: this.createCallbackHandler, internalRemoveCallback: this.removeCallbackHandler } : n = { internalCreateCallback: this.createCallbackHandler, internalRemoveCallback: this.removeCallbackHandler }, this.world = t, n.classType = a(n, "classType", r), this.physicsType = o.DYNAMIC_BODY, this.defaults = { setCollideWorldBounds: a(n, "collideWorldBounds", !1), setBoundsRectangle: a(n, "customBoundsRectangle", null), setAccelerationX: a(n, "accelerationX", 0), setAccelerationY: a(n, "accelerationY", 0), setAllowDrag: a(n, "allowDrag", !0), setAllowGravity: a(n, "allowGravity", !0), setAllowRotation: a(n, "allowRotation", !0), setBounceX: a(n, "bounceX", 0), setBounceY: a(n, "bounceY", 0), setDragX: a(n, "dragX", 0), setDragY: a(n, "dragY", 0), setEnable: a(n, "enable", !0), setGravityX: a(n, "gravityX", 0), setGravityY: a(n, "gravityY", 0), setFrictionX: a(n, "frictionX", 0), setFrictionY: a(n, "frictionY", 0), setVelocityX: a(n, "velocityX", 0), setVelocityY: a(n, "velocityY", 0), setAngularVelocity: a(n, "angularVelocity", 0), setAngularAcceleration: a(n, "angularAcceleration", 0), setAngularDrag: a(n, "angularDrag", 0), setMass: a(n, "mass", 1), setImmovable: a(n, "immovable", !1) }, h.call(this, e, i, n), this.type = "PhysicsGroup" }, createCallbackHandler: function(t) { t.body || this.world.enableBody(t, o.DYNAMIC_BODY); var e = t.body; for (var i in this.defaults) e[i](this.defaults[i]) }, removeCallbackHandler: function(t) { t.body && this.world.disableBody(t) }, setVelocity: function(t, e, i) { void 0 === i && (i = 0); for (var n = this.getChildren(), s = 0; s < n.length; s++) n[s].body.velocity.set(t + s * i, e + s * i); return this }, setVelocityX: function(t, e) { void 0 === e && (e = 0); for (var i = this.getChildren(), n = 0; n < i.length; n++) i[n].body.velocity.x = t + n * e; return this }, setVelocityY: function(t, e) { void 0 === e && (e = 0); for (var i = this.getChildren(), n = 0; n < i.length; n++) i[n].body.velocity.y = t + n * e; return this } }); t.exports = s } , function(t, e, i) { var s = i(140) , n = i(0) , r = i(50) , o = i(2) , a = i(97) , h = i(7) , l = new n({ Extends: a, initialize: function(t, e, i, n) { i || n ? h(i) ? (n = i, i = null, n.internalCreateCallback = this.createCallbackHandler, n.internalRemoveCallback = this.removeCallbackHandler, n.createMultipleCallback = this.createMultipleCallbackHandler, n.classType = o(n, "classType", s)) : Array.isArray(i) && h(i[0]) ? (n = i, i = null, n.forEach(function(t) { t.internalCreateCallback = this.createCallbackHandler, t.internalRemoveCallback = this.removeCallbackHandler, t.createMultipleCallback = this.createMultipleCallbackHandler, t.classType = o(t, "classType", s) })) : n = { internalCreateCallback: this.createCallbackHandler, internalRemoveCallback: this.removeCallbackHandler } : n = { internalCreateCallback: this.createCallbackHandler, internalRemoveCallback: this.removeCallbackHandler, createMultipleCallback: this.createMultipleCallbackHandler, classType: s }, this.world = t, this.physicsType = r.STATIC_BODY, a.call(this, e, i, n), this.type = "StaticPhysicsGroup" }, createCallbackHandler: function(t) { t.body || this.world.enableBody(t, r.STATIC_BODY) }, removeCallbackHandler: function(t) { t.body && this.world.disableBody(t) }, createMultipleCallbackHandler: function() { this.refresh() }, refresh: function() { for (var t = this.children.entries, e = 0; e < t.length; e++) t[e].body.reset(); return this } }); t.exports = l } , function(t, e) { t.exports = function(t, e, i, n, s, r, o) { void 0 === r && (r = !0), void 0 === o && (o = !1); var a, h, l, u = [], c = [], d = t.treeMinMax; return d.minX = e, d.minY = i, d.maxX = e + n, d.maxY = i + s, o && (c = t.staticTree.search(d)), r && t.useTree ? u = t.tree.search(d) : r && (a = t.bodies, h = { position: { x: e, y: i }, left: e, top: i, right: e + n, bottom: i + s, isCircle: !1 }, l = t.intersects, a.iterate(function(t) { l(t, h) && u.push(t) })), c.concat(u) } } , function(t, e, i) { var v = i(318) , n = i(466) , p = i(19) , s = i(0) , o = i(467) , g = i(50) , m = i(53) , r = i(10) , y = i(218) , x = i(106) , T = i(322) , w = i(323) , b = i(468) , E = i(469) , a = i(6) , S = i(13) , h = i(186) , f = i(1284) , l = i(11) , u = i(470) , _ = i(1285) , A = i(1290) , C = i(1291) , c = i(133) , d = i(472) , M = i(471) , P = i(29) , O = i(3) , R = i(58) , L = new s({ Extends: r, initialize: function(t, e) { r.call(this), this.scene = t, this.bodies = new c, this.staticBodies = new c, this.pendingDestroy = new c, this.colliders = new h, this.gravity = new O(a(e, "gravity.x", 0),a(e, "gravity.y", 0)), this.bounds = new l(a(e, "x", 0),a(e, "y", 0),a(e, "width", t.sys.scale.width),a(e, "height", t.sys.scale.height)), this.checkCollision = { up: a(e, "checkCollision.up", !0), down: a(e, "checkCollision.down", !0), left: a(e, "checkCollision.left", !0), right: a(e, "checkCollision.right", !0) }, this.fps = a(e, "fps", 60), this.fixedStep = !0, this._elapsed = 0, this._frameTime = 1 / this.fps, this._frameTimeMS = 1e3 * this._frameTime, this.stepsLastFrame = 0, this.timeScale = a(e, "timeScale", 1), this.OVERLAP_BIAS = a(e, "overlapBias", 4), this.TILE_BIAS = a(e, "tileBias", 16), this.forceX = a(e, "forceX", !1), this.isPaused = a(e, "isPaused", !1), this._total = 0, this.drawDebug = a(e, "debug", !1), this.debugGraphic, this.defaults = { debugShowBody: a(e, "debugShowBody", !0), debugShowStaticBody: a(e, "debugShowStaticBody", !0), debugShowVelocity: a(e, "debugShowVelocity", !0), bodyDebugColor: a(e, "debugBodyColor", 16711935), staticBodyDebugColor: a(e, "debugStaticBodyColor", 255), velocityDebugColor: a(e, "debugVelocityColor", 65280) }, this.maxEntries = a(e, "maxEntries", 16), this.useTree = a(e, "useTree", !0), this.tree = new u(this.maxEntries), this.staticTree = new u(this.maxEntries), this.treeMinMax = { minX: 0, minY: 0, maxX: 0, maxY: 0 }, this._tempMatrix = new P, this._tempMatrix2 = new P, this.drawDebug && this.createDebugGraphic() }, enable: function(t, e) { void 0 === e && (e = g.DYNAMIC_BODY), Array.isArray(t) || (t = [t]); for (var i = 0; i < t.length; i++) { var n = t[i]; if (n.isParent) for (var s = n.getChildren(), r = 0; r < s.length; r++) { var o = s[r]; o.isParent ? this.enable(o, e) : this.enableBody(o, e) } else this.enableBody(n, e) } }, enableBody: function(t, e) { return void 0 === e && (e = g.DYNAMIC_BODY), t.body || (e === g.DYNAMIC_BODY ? t.body = new n(this,t) : e === g.STATIC_BODY && (t.body = new d(this,t))), this.add(t.body), t }, add: function(t) { return t.physicsType === g.DYNAMIC_BODY ? this.bodies.set(t) : t.physicsType === g.STATIC_BODY && (this.staticBodies.set(t), this.staticTree.insert(t)), t.enable = !0, t }, disable: function(t) { Array.isArray(t) || (t = [t]); for (var e = 0; e < t.length; e++) { var i = t[e]; if (i.isParent) for (var n = i.getChildren(), s = 0; s < n.length; s++) { var r = n[s]; r.isParent ? this.disable(r) : this.disableBody(r.body) } else this.disableBody(i.body) } }, disableBody: function(t) { this.remove(t), t.enable = !1 }, remove: function(t) { t.physicsType === g.DYNAMIC_BODY ? (this.tree.remove(t), this.bodies.delete(t)) : t.physicsType === g.STATIC_BODY && (this.staticBodies.delete(t), this.staticTree.remove(t)) }, createDebugGraphic: function() { var t = this.scene.sys.add.graphics({ x: 0, y: 0 }); return t.setDepth(Number.MAX_VALUE), this.debugGraphic = t, this.drawDebug = !0, t }, setBounds: function(t, e, i, n, s, r, o, a) { return this.bounds.setTo(t, e, i, n), void 0 !== s && this.setBoundsCollision(s, r, o, a), this }, setBoundsCollision: function(t, e, i, n) { return void 0 === t && (t = !0), void 0 === e && (e = !0), void 0 === i && (i = !0), void 0 === n && (n = !0), this.checkCollision.left = t, this.checkCollision.right = e, this.checkCollision.up = i, this.checkCollision.down = n, this }, pause: function() { return this.isPaused = !0, this.emit(y.PAUSE), this }, resume: function() { return this.isPaused = !1, this.emit(y.RESUME), this }, addCollider: function(t, e, i, n, s) { void 0 === i && (i = null), void 0 === n && (n = null), void 0 === s && (s = i); var r = new o(this,!1,t,e,i,n,s); return this.colliders.add(r), r }, addOverlap: function(t, e, i, n, s) { void 0 === i && (i = null), void 0 === n && (n = null), void 0 === s && (s = i); var r = new o(this,!0,t,e,i,n,s); return this.colliders.add(r), r }, removeCollider: function(t) { return this.colliders.remove(t), this }, setFPS: function(t) { return this.fps = t, this._frameTime = 1 / this.fps, this._frameTimeMS = 1e3 * this._frameTime, this }, update: function(t, e) { if (!this.isPaused && 0 !== this.bodies.size) { var i, n = this._frameTime, s = this._frameTimeMS * this.timeScale; this._elapsed += e; var r = this.bodies.entries , o = this._elapsed >= s; for (this.fixedStep || (n = .001 * e, o = !0, this._elapsed = 0), h = 0; h < r.length; h++) (i = r[h]).enable && i.preUpdate(o, n); if (o) { this._elapsed -= s, this.stepsLastFrame = 1, this.useTree && (this.tree.clear(), this.tree.load(r)); for (var a = this.colliders.update(), h = 0; h < a.length; h++) { var l = a[h]; l.active && l.update() } this.emit(y.WORLD_STEP) } for (; this._elapsed >= s; ) this._elapsed -= s, this.step(n) } }, step: function(t) { for (var e, i = this.bodies.entries, n = i.length, s = 0; s < n; s++) (e = i[s]).enable && e.update(t); this.useTree && (this.tree.clear(), this.tree.load(i)); var r = this.colliders.update(); for (s = 0; s < r.length; s++) { var o = r[s]; o.active && o.update() } this.emit(y.WORLD_STEP), this.stepsLastFrame++ }, postUpdate: function() { var t, e = (o = this.bodies.entries).length, i = this.bodies, n = this.staticBodies; if (this.stepsLastFrame) for (l = this.stepsLastFrame = 0; l < e; l++) (t = o[l]).enable && t.postUpdate(); if (this.drawDebug) { var s = this.debugGraphic; for (s.clear(), l = 0; l < e; l++) (t = o[l]).willDrawDebug() && t.drawDebug(s); for (e = (o = n.entries).length, l = 0; l < e; l++) (t = o[l]).willDrawDebug() && t.drawDebug(s) } var r = this.pendingDestroy; if (0 < r.size) { for (var o, a = this.tree, h = this.staticTree, e = (o = r.entries).length, l = 0; l < e; l++) (t = o[l]).physicsType === g.DYNAMIC_BODY ? (a.remove(t), i.delete(t)) : t.physicsType === g.STATIC_BODY && (h.remove(t), n.delete(t)), t.world = void 0, t.gameObject = void 0; r.clear() } }, updateMotion: function(t, e) { t.allowRotation && this.computeAngularVelocity(t, e), this.computeVelocity(t, e) }, computeAngularVelocity: function(t, e) { var i = t.angularVelocity , n = t.angularAcceleration , s = t.angularDrag , r = t.maxAngular; n ? i += n * e : t.allowDrag && s && (T(i - (s *= e), 0, .1) ? i -= s : w(i + s, 0, .1) ? i += s : i = 0); var o = (i = p(i, -r, r)) - t.angularVelocity; t.angularVelocity += o, t.rotation += t.angularVelocity * e }, computeVelocity: function(t, e) { var i = t.velocity.x , n = t.acceleration.x , s = t.drag.x , r = t.maxVelocity.x , o = t.velocity.y , a = t.acceleration.y , h = t.drag.y , l = t.maxVelocity.y , u = t.speed , c = t.maxSpeed , d = t.allowDrag , f = t.useDamping; t.allowGravity && (i += (this.gravity.x + t.gravity.x) * e, o += (this.gravity.y + t.gravity.y) * e), n ? i += n * e : d && s && (f ? (i *= s, u = Math.sqrt(i * i + o * o), x(u, 0, .001) && (i = 0)) : T(i - (s *= e), 0, .01) ? i -= s : w(i + s, 0, .01) ? i += s : i = 0), a ? o += a * e : d && h && (f ? (o *= h, u = Math.sqrt(i * i + o * o), x(u, 0, .001) && (o = 0)) : T(o - (h *= e), 0, .01) ? o -= h : w(o + h, 0, .01) ? o += h : o = 0), i = p(i, -r, r), o = p(o, -l, l), t.velocity.set(i, o), -1 < c && c < u && (t.velocity.normalize().scale(c), u = c), t.speed = u }, separate: function(t, e, i, n, s, r) { if (!r && !t.enable || !e.enable || t.checkCollision.none || e.checkCollision.none || !this.intersects(t, e)) return !1; if (i && !1 === i.call(n, t.gameObject, e.gameObject)) return !1; if (t.isCircle && e.isCircle) return this.separateCircle(t, e, s); if (t.isCircle !== e.isCircle) { var o = t.isCircle ? e : t , a = t.isCircle ? t : e , h = o.x , l = o.y , u = o.right , c = o.bottom , d = a.center; if ((d.y < l || d.y > c) && (d.x < h || d.x > u)) return this.separateCircle(t, e, s) } var f = !1 , p = !1; s ? (f = A(t, e, s, this.OVERLAP_BIAS), p = C(t, e, s, this.OVERLAP_BIAS)) : this.forceX || Math.abs(this.gravity.y + t.gravity.y) < Math.abs(this.gravity.x + t.gravity.x) ? (f = A(t, e, s, this.OVERLAP_BIAS), this.intersects(t, e) && (p = C(t, e, s, this.OVERLAP_BIAS))) : (p = C(t, e, s, this.OVERLAP_BIAS), this.intersects(t, e) && (f = A(t, e, s, this.OVERLAP_BIAS))); var g = f || p; return g && (s ? (t.onOverlap || e.onOverlap) && this.emit(y.OVERLAP, t.gameObject, e.gameObject, t, e) : (t.onCollide || e.onCollide) && this.emit(y.COLLIDE, t.gameObject, e.gameObject, t, e)), g }, separateCircle: function(t, e, i, n) { t.updateCenter(), e.updateCenter(), b(t, e, !1, n), E(t, e, !1, n); var s, r, o = 0; if (t.isCircle !== e.isCircle ? (s = { x: e.isCircle ? t.position.x : e.position.x, y: e.isCircle ? t.position.y : e.position.y, right: e.isCircle ? t.right : e.right, bottom: e.isCircle ? t.bottom : e.bottom }, (r = { x: t.isCircle ? t.center.x : e.center.x, y: t.isCircle ? t.center.y : e.center.y, radius: t.isCircle ? t.halfWidth : e.halfWidth }).y < s.y ? r.x < s.x ? o = m(r.x, r.y, s.x, s.y) - r.radius : s.right < r.x && (o = m(r.x, r.y, s.right, s.y) - r.radius) : s.bottom < r.y && (r.x < s.x ? o = m(r.x, r.y, s.x, s.bottom) - r.radius : s.right < r.x && (o = m(r.x, r.y, s.right, s.bottom) - r.radius)), o *= -1) : o = t.halfWidth + e.halfWidth - m(t.center.x, t.center.y, e.center.x, e.center.y), i || 0 === o || t.immovable && e.immovable || t.customSeparateX || e.customSeparateX) return 0 !== o && (t.onOverlap || e.onOverlap) && this.emit(y.OVERLAP, t.gameObject, e.gameObject, t, e), 0 !== o; var a = t.center.x - e.center.x , h = t.center.y - e.center.y , l = Math.sqrt(Math.pow(a, 2) + Math.pow(h, 2)) , u = (e.center.x - t.center.x) / l || 0 , c = (e.center.y - t.center.y) / l || 0 , d = 2 * (t.velocity.x * u + t.velocity.y * c - e.velocity.x * u - e.velocity.y * c) / (t.mass + e.mass); (t.immovable || e.immovable) && (d *= 2), t.immovable || (t.velocity.x = t.velocity.x - d / t.mass * u, t.velocity.y = t.velocity.y - d / t.mass * c), e.immovable || (e.velocity.x = e.velocity.x + d / e.mass * u, e.velocity.y = e.velocity.y + d / e.mass * c), t.immovable || e.immovable || (o /= 2); var f = v(t.center, e.center) , p = (o + S.EPSILON) * Math.cos(f) , g = (o + S.EPSILON) * Math.sin(f); return t.immovable || (t.x -= p, t.y -= g, t.updateCenter()), e.immovable || (e.x += p, e.y += g, e.updateCenter()), t.velocity.x *= t.bounce.x, t.velocity.y *= t.bounce.y, e.velocity.x *= e.bounce.x, e.velocity.y *= e.bounce.y, (t.onCollide || e.onCollide) && this.emit(y.COLLIDE, t.gameObject, e.gameObject, t, e), !0 }, intersects: function(t, e) { return t !== e && (t.isCircle || e.isCircle ? t.isCircle ? e.isCircle ? m(t.center.x, t.center.y, e.center.x, e.center.y) <= t.halfWidth + e.halfWidth : this.circleBodyIntersects(t, e) : this.circleBodyIntersects(e, t) : !(t.right <= e.position.x || t.bottom <= e.position.y || t.position.x >= e.right || t.position.y >= e.bottom)) }, circleBodyIntersects: function(t, e) { var i = p(t.center.x, e.left, e.right) , n = p(t.center.y, e.top, e.bottom); return (t.center.x - i) * (t.center.x - i) + (t.center.y - n) * (t.center.y - n) <= t.halfWidth * t.halfWidth }, overlap: function(t, e, i, n, s) { return void 0 === i && (i = null), void 0 === n && (n = null), void 0 === s && (s = i), this.collideObjects(t, e, i, n, s, !0) }, collide: function(t, e, i, n, s) { return void 0 === i && (i = null), void 0 === n && (n = null), void 0 === s && (s = i), this.collideObjects(t, e, i, n, s, !1) }, collideObjects: function(t, e, i, n, s, r) { var o; t.isParent && void 0 === t.physicsType && (t = t.children.entries), e && e.isParent && void 0 === e.physicsType && (e = e.children.entries); var a = Array.isArray(t) , h = Array.isArray(e); if (this._total = 0, a || h) if (!a && h) for (o = 0; o < e.length; o++) this.collideHandler(t, e[o], i, n, s, r); else if (a && !h) if (e) for (o = 0; o < t.length; o++) this.collideHandler(t[o], e, i, n, s, r); else for (o = 0; o < t.length; o++) for (var l = t[o], u = o + 1; u < t.length; u++) o !== u && this.collideHandler(l, t[u], i, n, s, r); else for (o = 0; o < t.length; o++) for (u = 0; u < e.length; u++) this.collideHandler(t[o], e[u], i, n, s, r); else this.collideHandler(t, e, i, n, s, r); return 0 < this._total }, collideHandler: function(t, e, i, n, s, r) { if (void 0 === e && t.isParent) return this.collideGroupVsGroup(t, t, i, n, s, r); if (!t || !e) return !1; if (t.body) { if (e.body) return this.collideSpriteVsSprite(t, e, i, n, s, r); if (e.isParent) return this.collideSpriteVsGroup(t, e, i, n, s, r); if (e.isTilemap) return this.collideSpriteVsTilemapLayer(t, e, i, n, s, r) } else if (t.isParent) { if (e.body) return this.collideSpriteVsGroup(e, t, i, n, s, r); if (e.isParent) return this.collideGroupVsGroup(t, e, i, n, s, r); if (e.isTilemap) return this.collideGroupVsTilemapLayer(t, e, i, n, s, r) } else if (t.isTilemap) { if (e.body) return this.collideSpriteVsTilemapLayer(e, t, i, n, s, r); if (e.isParent) return this.collideGroupVsTilemapLayer(e, t, i, n, s, r) } }, collideSpriteVsSprite: function(t, e, i, n, s, r) { return !(!t.body || !e.body) && (this.separate(t.body, e.body, n, s, r) && (i && i.call(s, t, e), this._total++), !0) }, collideSpriteVsGroup: function(t, e, i, n, s, r) { var o, a = t.body; if (0 !== e.length && a && a.enable && !a.checkCollision.none) if (this.useTree || e.physicsType === g.STATIC_BODY) { var h = this.treeMinMax; h.minX = a.left, h.minY = a.top, h.maxX = a.right, h.maxY = a.bottom; for (var l = e.physicsType === g.DYNAMIC_BODY ? this.tree.search(h) : this.staticTree.search(h), u = l.length, c = 0; c < u; c++) a !== (o = l[c]) && o.enable && !o.checkCollision.none && e.contains(o.gameObject) && this.separate(a, o, n, s, r, !0) && (i && i.call(s, a.gameObject, o.gameObject), this._total++) } else { var d = e.getChildren() , f = e.children.entries.indexOf(t); for (u = d.length, c = 0; c < u; c++) (o = d[c].body) && c !== f && o.enable && this.separate(a, o, n, s, r) && (i && i.call(s, a.gameObject, o.gameObject), this._total++) } }, collideGroupVsTilemapLayer: function(t, e, i, n, s, r) { var o = t.getChildren(); if (0 === o.length) return !1; for (var a = !1, h = 0; h < o.length; h++) o[h].body && this.collideSpriteVsTilemapLayer(o[h], e, i, n, s, r) && (a = !0); return a }, collideTiles: function(t, e, i, n, s) { return !(!t.body.enable || 0 === e.length) && this.collideSpriteVsTilesHandler(t, e, i, n, s, !1, !1) }, overlapTiles: function(t, e, i, n, s) { return !(!t.body.enable || 0 === e.length) && this.collideSpriteVsTilesHandler(t, e, i, n, s, !0, !1) }, collideSpriteVsTilemapLayer: function(t, e, i, n, s, r) { var o = t.body; if (!o.enable || o.checkCollision.none) return !1; var a, h = o.position.x, l = o.position.y, u = o.width, c = o.height, d = e.layer; d.tileWidth > d.baseTileWidth && (h -= a = (d.tileWidth - d.baseTileWidth) * e.scaleX, u += a), d.tileHeight > d.baseTileHeight && (c += (d.tileHeight - d.baseTileHeight) * e.scaleY); var f = e.getTilesWithinWorldXY(h, l, u, c); return 0 !== f.length && this.collideSpriteVsTilesHandler(t, f, i, n, s, r, !0) }, collideSpriteVsTilesHandler: function(t, e, i, n, s, r, o) { for (var a, h, l = t.body, u = { left: 0, right: 0, top: 0, bottom: 0 }, c = !1, d = 0; d < e.length; d++) h = (a = e[d]).tilemapLayer, u.left = h.tileToWorldX(a.x), u.top = h.tileToWorldY(a.y), a.baseHeight !== a.height && (u.top -= (a.height - a.baseHeight) * h.scaleY), u.right = u.left + a.width * h.scaleX, u.bottom = u.top + a.height * h.scaleY, M(u, l) && (!n || n.call(s, t, a)) && f(a, t) && (r || _(d, l, a, u, h, this.TILE_BIAS, o)) && (this._total++, c = !0, i && i.call(s, t, a), r && l.onOverlap ? this.emit(y.TILE_OVERLAP, t, a, l) : l.onCollide && this.emit(y.TILE_COLLIDE, t, a, l)); return c }, collideGroupVsGroup: function(t, e, i, n, s, r) { if (0 !== t.length && 0 !== e.length) for (var o = t.getChildren(), a = 0; a < o.length; a++) this.collideSpriteVsGroup(o[a], e, i, n, s, r) }, wrap: function(t, e) { t.body ? this.wrapObject(t, e) : t.getChildren ? this.wrapArray(t.getChildren(), e) : Array.isArray(t) ? this.wrapArray(t, e) : this.wrapObject(t, e) }, wrapArray: function(t, e) { for (var i = 0; i < t.length; i++) this.wrapObject(t[i], e) }, wrapObject: function(t, e) { void 0 === e && (e = 0), t.x = R(t.x, this.bounds.left - e, this.bounds.right + e), t.y = R(t.y, this.bounds.top - e, this.bounds.bottom + e) }, shutdown: function() { this.tree.clear(), this.staticTree.clear(), this.bodies.clear(), this.staticBodies.clear(), this.colliders.destroy(), this.removeAllListeners() }, destroy: function() { this.shutdown(), this.scene = null } }); t.exports = L } , function(t, e, i) { var n = i(0) , s = i(50) , r = i(218) , a = i(173) , o = i(11) , h = i(48) , l = i(3) , u = new n({ initialize: function(t, e) { var i = e.displayWidth ? e.displayWidth : 64 , n = e.displayHeight ? e.displayHeight : 64; this.world = t, this.gameObject = e, this.transform = { x: e.x, y: e.y, rotation: e.angle, scaleX: e.scaleX, scaleY: e.scaleY, displayOriginX: e.displayOriginX, displayOriginY: e.displayOriginY }, this.debugShowBody = t.defaults.debugShowBody, this.debugShowVelocity = t.defaults.debugShowVelocity, this.debugBodyColor = t.defaults.bodyDebugColor, this.enable = !0, this.isCircle = !1, this.radius = 0, this.offset = new l, this.position = new l(e.x - e.scaleX * e.displayOriginX,e.y - e.scaleY * e.displayOriginY), this.prev = this.position.clone(), this.prevFrame = this.position.clone(), this.allowRotation = !0, this.rotation = e.angle, this.preRotation = e.angle, this.width = i, this.height = n, this.sourceWidth = i, this.sourceHeight = n, e.frame && (this.sourceWidth = e.frame.realWidth, this.sourceHeight = e.frame.realHeight), this.halfWidth = Math.abs(i / 2), this.halfHeight = Math.abs(n / 2), this.center = new l(this.position.x + this.halfWidth,this.position.y + this.halfHeight), this.velocity = new l, this.newVelocity = new l, this.deltaMax = new l, this.acceleration = new l, this.allowDrag = !0, this.drag = new l, this.allowGravity = !0, this.gravity = new l, this.bounce = new l, this.worldBounce = null, this.customBoundsRectangle = t.bounds, this.onWorldBounds = !1, this.onCollide = !1, this.onOverlap = !1, this.maxVelocity = new l(1e4,1e4), this.maxSpeed = -1, this.friction = new l(1,0), this.useDamping = !1, this.angularVelocity = 0, this.angularAcceleration = 0, this.angularDrag = 0, this.maxAngular = 1e3, this.mass = 1, this.angle = 0, this.speed = 0, this.facing = s.FACING_NONE, this.immovable = !1, this.moves = !0, this.customSeparateX = !1, this.customSeparateY = !1, this.overlapX = 0, this.overlapY = 0, this.overlapR = 0, this.embedded = !1, this.collideWorldBounds = !1, this.checkCollision = { none: !1, up: !0, down: !0, left: !0, right: !0 }, this.touching = { none: !0, up: !1, down: !1, left: !1, right: !1 }, this.wasTouching = { none: !0, up: !1, down: !1, left: !1, right: !1 }, this.blocked = { none: !0, up: !1, down: !1, left: !1, right: !1 }, this.syncBounds = !1, this.physicsType = s.DYNAMIC_BODY, this._sx = e.scaleX, this._sy = e.scaleY, this._dx = 0, this._dy = 0, this._tx = 0, this._ty = 0, this._bounds = new o }, updateBounds: function() { var t, e = this.gameObject, i = this.transform; e.parentContainer ? (t = e.getWorldTransformMatrix(this.world._tempMatrix, this.world._tempMatrix2), i.x = t.tx, i.y = t.ty, i.rotation = a(t.rotation), i.scaleX = t.scaleX, i.scaleY = t.scaleY) : (i.x = e.x, i.y = e.y, i.rotation = e.angle, i.scaleX = e.scaleX, i.scaleY = e.scaleY), i.displayOriginX = e.displayOriginX, i.displayOriginY = e.displayOriginY; var n, s, r, o = !1; this.syncBounds ? (n = e.getBounds(this._bounds), this.width = n.width, this.height = n.height, o = !0) : (s = Math.abs(i.scaleX), r = Math.abs(i.scaleY), this._sx === s && this._sy === r || (this.width = this.sourceWidth * s, this.height = this.sourceHeight * r, this._sx = s, this._sy = r, o = !0)), o && (this.halfWidth = Math.floor(this.width / 2), this.halfHeight = Math.floor(this.height / 2), this.updateCenter()) }, updateCenter: function() { this.center.set(this.position.x + this.halfWidth, this.position.y + this.halfHeight) }, updateFromGameObject: function() { this.updateBounds(); var t = this.transform; this.position.x = t.x + t.scaleX * (this.offset.x - t.displayOriginX), this.position.y = t.y + t.scaleY * (this.offset.y - t.displayOriginY), this.updateCenter() }, resetFlags: function() { var t = this.wasTouching , e = this.touching , i = this.blocked; t.none = e.none, t.up = e.up, t.down = e.down, t.left = e.left, t.right = e.right, e.none = !0, e.up = !1, e.down = !1, e.left = !1, e.right = !1, i.none = !0, i.up = !1, i.down = !1, i.left = !1, i.right = !1, this.overlapR = 0, this.overlapX = 0, this.overlapY = 0, this.embedded = !1 }, preUpdate: function(t, e) { t && this.resetFlags(), this.updateFromGameObject(), this.rotation = this.transform.rotation, this.preRotation = this.rotation, this.moves && (this.prev.x = this.position.x, this.prev.y = this.position.y, this.prevFrame.x = this.position.x, this.prevFrame.y = this.position.y), t && this.update(e) }, update: function(t) { var e, i; this.prev.x = this.position.x, this.prev.y = this.position.y, this.moves && (this.world.updateMotion(this, t), e = this.velocity.x, i = this.velocity.y, this.newVelocity.set(e * t, i * t), this.position.add(this.newVelocity), this.updateCenter(), this.angle = Math.atan2(i, e), this.speed = Math.sqrt(e * e + i * i), this.collideWorldBounds && this.checkWorldBounds() && this.onWorldBounds && this.world.emit(r.WORLD_BOUNDS, this, this.blocked.up, this.blocked.down, this.blocked.left, this.blocked.right)), this._dx = this.position.x - this.prev.x, this._dy = this.position.y - this.prev.y }, postUpdate: function() { var t, e, i = this.position.x - this.prevFrame.x, n = this.position.y - this.prevFrame.y; this.moves && (0 !== (t = this.deltaMax.x) && 0 !== i && (i < 0 && i < -t ? i = -t : 0 < i && t < i && (i = t)), 0 !== (e = this.deltaMax.y) && 0 !== n && (n < 0 && n < -e ? n = -e : 0 < n && e < n && (n = e)), this.gameObject.x += i, this.gameObject.y += n), i < 0 ? this.facing = s.FACING_LEFT : 0 < i && (this.facing = s.FACING_RIGHT), n < 0 ? this.facing = s.FACING_UP : 0 < n && (this.facing = s.FACING_DOWN), this.allowRotation && (this.gameObject.angle += this.deltaZ()), this._tx = i, this._ty = n }, setBoundsRectangle: function(t) { return this.customBoundsRectangle = t || this.world.bounds, this }, checkWorldBounds: function() { var t = this.position , e = this.customBoundsRectangle , i = this.world.checkCollision , n = this.worldBounce ? -this.worldBounce.x : -this.bounce.x , s = this.worldBounce ? -this.worldBounce.y : -this.bounce.y , r = !1; return t.x < e.x && i.left ? (t.x = e.x, this.velocity.x *= n, r = this.blocked.left = !0) : this.right > e.right && i.right && (t.x = e.right - this.width, this.velocity.x *= n, r = this.blocked.right = !0), t.y < e.y && i.up ? (t.y = e.y, this.velocity.y *= s, r = this.blocked.up = !0) : this.bottom > e.bottom && i.down && (t.y = e.bottom - this.height, this.velocity.y *= s, r = this.blocked.down = !0), r && (this.blocked.none = !1), r }, setOffset: function(t, e) { return void 0 === e && (e = t), this.offset.set(t, e), this.updateCenter(), this }, setSize: function(t, e, i) { void 0 === i && (i = !0); var n, s, r = this.gameObject; return !t && r.frame && (t = r.frame.realWidth), !e && r.frame && (e = r.frame.realHeight), this.sourceWidth = t, this.sourceHeight = e, this.width = this.sourceWidth * this._sx, this.height = this.sourceHeight * this._sy, this.halfWidth = Math.floor(this.width / 2), this.halfHeight = Math.floor(this.height / 2), this.updateCenter(), i && r.getCenter && (n = (r.width - t) / 2, s = (r.height - e) / 2, this.offset.set(n, s)), this.isCircle = !1, this.radius = 0, this }, setCircle: function(t, e, i) { return void 0 === e && (e = this.offset.x), void 0 === i && (i = this.offset.y), 0 < t ? (this.isCircle = !0, this.radius = t, this.sourceWidth = 2 * t, this.sourceHeight = 2 * t, this.width = this.sourceWidth * this._sx, this.height = this.sourceHeight * this._sy, this.halfWidth = Math.floor(this.width / 2), this.halfHeight = Math.floor(this.height / 2), this.offset.set(e, i), this.updateCenter()) : this.isCircle = !1, this }, reset: function(t, e) { this.stop(); var i = this.gameObject; i.setPosition(t, e), i.getTopLeft ? i.getTopLeft(this.position) : this.position.set(t, e), this.prev.copy(this.position), this.prevFrame.copy(this.position), this.rotation = i.angle, this.preRotation = i.angle, this.updateBounds(), this.updateCenter() }, stop: function() { return this.velocity.set(0), this.acceleration.set(0), this.speed = 0, this.angularVelocity = 0, this.angularAcceleration = 0, this }, getBounds: function(t) { return t.x = this.x, t.y = this.y, t.right = this.right, t.bottom = this.bottom, t }, hitTest: function(t, e) { return this.isCircle ? 0 < this.radius && t >= this.left && t <= this.right && e >= this.top && e <= this.bottom && (this.center.x - t) * (this.center.x - t) + (this.center.y - e) * (this.center.y - e) <= this.radius * this.radius : h(this, t, e) }, onFloor: function() { return this.blocked.down }, onCeiling: function() { return this.blocked.up }, onWall: function() { return this.blocked.left || this.blocked.right }, deltaAbsX: function() { return 0 < this._dx ? this._dx : -this._dx }, deltaAbsY: function() { return 0 < this._dy ? this._dy : -this._dy }, deltaX: function() { return this._dx }, deltaY: function() { return this._dy }, deltaXFinal: function() { return this._tx }, deltaYFinal: function() { return this._ty }, deltaZ: function() { return this.rotation - this.preRotation }, destroy: function() { this.enable = !1, this.world && this.world.pendingDestroy.set(this) }, drawDebug: function(t) { var e = this.position , i = e.x + this.halfWidth , n = e.y + this.halfHeight; this.debugShowBody && (t.lineStyle(t.defaultStrokeWidth, this.debugBodyColor), this.isCircle ? t.strokeCircle(i, n, this.width / 2) : (this.checkCollision.up && t.lineBetween(e.x, e.y, e.x + this.width, e.y), this.checkCollision.right && t.lineBetween(e.x + this.width, e.y, e.x + this.width, e.y + this.height), this.checkCollision.down && t.lineBetween(e.x, e.y + this.height, e.x + this.width, e.y + this.height), this.checkCollision.left && t.lineBetween(e.x, e.y, e.x, e.y + this.height))), this.debugShowVelocity && (t.lineStyle(t.defaultStrokeWidth, this.world.defaults.velocityDebugColor, 1), t.lineBetween(i, n, i + this.velocity.x / 2, n + this.velocity.y / 2)) }, willDrawDebug: function() { return this.debugShowBody || this.debugShowVelocity }, setCollideWorldBounds: function(t, e, i) { void 0 === t && (t = !0), this.collideWorldBounds = t; var n = void 0 !== e , s = void 0 !== i; return (n || s) && (this.worldBounce || (this.worldBounce = new l), n && (this.worldBounce.x = e), s && (this.worldBounce.y = i)), this }, setVelocity: function(t, e) { return this.velocity.set(t, e), t = this.velocity.x, e = this.velocity.y, this.speed = Math.sqrt(t * t + e * e), this }, setVelocityX: function(t) { this.velocity.x = t; var e = this.velocity.y; return this.speed = Math.sqrt(t * t + e * e), this }, setVelocityY: function(t) { this.velocity.y = t; var e = this.velocity.x; return this.speed = Math.sqrt(e * e + t * t), this }, setMaxVelocity: function(t, e) { return this.maxVelocity.set(t, e), this }, setMaxSpeed: function(t) { return this.maxSpeed = t, this }, setBounce: function(t, e) { return this.bounce.set(t, e), this }, setBounceX: function(t) { return this.bounce.x = t, this }, setBounceY: function(t) { return this.bounce.y = t, this }, setAcceleration: function(t, e) { return this.acceleration.set(t, e), this }, setAccelerationX: function(t) { return this.acceleration.x = t, this }, setAccelerationY: function(t) { return this.acceleration.y = t, this }, setAllowDrag: function(t) { return void 0 === t && (t = !0), this.allowDrag = t, this }, setAllowGravity: function(t) { return void 0 === t && (t = !0), this.allowGravity = t, this }, setAllowRotation: function(t) { return void 0 === t && (t = !0), this.allowRotation = t, this }, setDrag: function(t, e) { return this.drag.set(t, e), this }, setDragX: function(t) { return this.drag.x = t, this }, setDragY: function(t) { return this.drag.y = t, this }, setGravity: function(t, e) { return this.gravity.set(t, e), this }, setGravityX: function(t) { return this.gravity.x = t, this }, setGravityY: function(t) { return this.gravity.y = t, this }, setFriction: function(t, e) { return this.friction.set(t, e), this }, setFrictionX: function(t) { return this.friction.x = t, this }, setFrictionY: function(t) { return this.friction.y = t, this }, setAngularVelocity: function(t) { return this.angularVelocity = t, this }, setAngularAcceleration: function(t) { return this.angularAcceleration = t, this }, setAngularDrag: function(t) { return this.angularDrag = t, this }, setMass: function(t) { return this.mass = t, this }, setImmovable: function(t) { return void 0 === t && (t = !0), this.immovable = t, this }, setEnable: function(t) { return void 0 === t && (t = !0), this.enable = t, this }, x: { get: function() { return this.position.x }, set: function(t) { this.position.x = t } }, y: { get: function() { return this.position.y }, set: function(t) { this.position.y = t } }, left: { get: function() { return this.position.x } }, right: { get: function() { return this.position.x + this.width } }, top: { get: function() { return this.position.y } }, bottom: { get: function() { return this.position.y + this.height } } }); t.exports = u } , function(t, e, i) { var n = new (i(0))({ initialize: function(t, e, i, n, s, r, o) { this.world = t, this.name = "", this.active = !0, this.overlapOnly = e, this.object1 = i, this.object2 = n, this.collideCallback = s, this.processCallback = r, this.callbackContext = o }, setName: function(t) { return this.name = t, this }, update: function() { this.world.collideObjects(this.object1, this.object2, this.collideCallback, this.processCallback, this.callbackContext, this.overlapOnly) }, destroy: function() { this.world.removeCollider(this), this.active = !1, this.world = null, this.object1 = null, this.object2 = null, this.collideCallback = null, this.processCallback = null, this.callbackContext = null } }); t.exports = n } , function(t, e, i) { var o = i(50); t.exports = function(t, e, i, n) { var s = 0 , r = t.deltaAbsX() + e.deltaAbsX() + n; return 0 === t._dx && 0 === e._dx ? (t.embedded = !0, e.embedded = !0) : t._dx > e._dx ? r < (s = t.right - e.x) && !i || !1 === t.checkCollision.right || !1 === e.checkCollision.left ? s = 0 : (t.touching.none = !1, t.touching.right = !0, e.touching.none = !1, e.touching.left = !0, e.physicsType === o.STATIC_BODY && (t.blocked.none = !1, t.blocked.right = !0), t.physicsType === o.STATIC_BODY && (e.blocked.none = !1, e.blocked.left = !0)) : t._dx < e._dx && (r < -(s = t.x - e.width - e.x) && !i || !1 === t.checkCollision.left || !1 === e.checkCollision.right ? s = 0 : (t.touching.none = !1, t.touching.left = !0, e.touching.none = !1, e.touching.right = !0, e.physicsType === o.STATIC_BODY && (t.blocked.none = !1, t.blocked.left = !0), t.physicsType === o.STATIC_BODY && (e.blocked.none = !1, e.blocked.right = !0))), t.overlapX = s, e.overlapX = s } } , function(t, e, i) { var o = i(50); t.exports = function(t, e, i, n) { var s = 0 , r = t.deltaAbsY() + e.deltaAbsY() + n; return 0 === t._dy && 0 === e._dy ? (t.embedded = !0, e.embedded = !0) : t._dy > e._dy ? r < (s = t.bottom - e.y) && !i || !1 === t.checkCollision.down || !1 === e.checkCollision.up ? s = 0 : (t.touching.none = !1, t.touching.down = !0, e.touching.none = !1, e.touching.up = !0, e.physicsType === o.STATIC_BODY && (t.blocked.none = !1, t.blocked.down = !0), t.physicsType === o.STATIC_BODY && (e.blocked.none = !1, e.blocked.up = !0)) : t._dy < e._dy && (r < -(s = t.y - e.bottom) && !i || !1 === t.checkCollision.up || !1 === e.checkCollision.down ? s = 0 : (t.touching.none = !1, t.touching.up = !0, e.touching.none = !1, e.touching.down = !0, e.physicsType === o.STATIC_BODY && (t.blocked.none = !1, t.blocked.up = !0), t.physicsType === o.STATIC_BODY && (e.blocked.none = !1, e.blocked.down = !0))), t.overlapY = s, e.overlapY = s } } , function(t, e, i) { var a = i(391); function n(t) { if (!(this instanceof n)) return new n(t); this._maxEntries = Math.max(4, t || 9), this._minEntries = Math.max(2, Math.ceil(.4 * this._maxEntries)), this.clear() } function f(t, e) { m(t, 0, t.children.length, e, t) } function m(t, e, i, n, s) { (s = s || p(null)).minX = 1 / 0, s.minY = 1 / 0, s.maxX = -1 / 0, s.maxY = -1 / 0; for (var r, o = e; o < i; o++) r = t.children[o], u(s, t.leaf ? n(r) : r); return s } function u(t, e) { return t.minX = Math.min(t.minX, e.minX), t.minY = Math.min(t.minY, e.minY), t.maxX = Math.max(t.maxX, e.maxX), t.maxY = Math.max(t.maxY, e.maxY), t } function r(t, e) { return t.minX - e.minX } function o(t, e) { return t.minY - e.minY } function y(t) { return (t.maxX - t.minX) * (t.maxY - t.minY) } function c(t) { return t.maxX - t.minX + (t.maxY - t.minY) } function d(t, e) { return t.minX <= e.minX && t.minY <= e.minY && e.maxX <= t.maxX && e.maxY <= t.maxY } function l(t, e) { return e.minX <= t.maxX && e.minY <= t.maxY && e.maxX >= t.minX && e.maxY >= t.minY } function p(t) { return { children: t, height: 1, leaf: !0, minX: 1 / 0, minY: 1 / 0, maxX: -1 / 0, maxY: -1 / 0 } } function g(t, e, i, n, s) { for (var r, o = [e, i]; o.length; ) (i = o.pop()) - (e = o.pop()) <= n || (r = e + Math.ceil((i - e) / n / 2) * n, a(t, r, e, i, s), o.push(e, r, r, i)) } n.prototype = { all: function() { return this._all(this.data, []) }, search: function(t) { var e = this.data , i = [] , n = this.toBBox; if (!l(t, e)) return i; for (var s, r, o, a, h = []; e; ) { for (s = 0, r = e.children.length; s < r; s++) o = e.children[s], l(t, a = e.leaf ? n(o) : o) && (e.leaf ? i.push(o) : d(t, a) ? this._all(o, i) : h.push(o)); e = h.pop() } return i }, collides: function(t) { var e = this.data , i = this.toBBox; if (!l(t, e)) return !1; for (var n, s, r, o, a = []; e; ) { for (n = 0, s = e.children.length; n < s; n++) if (r = e.children[n], l(t, o = e.leaf ? i(r) : r)) { if (e.leaf || d(t, o)) return !0; a.push(r) } e = a.pop() } return !1 }, load: function(t) { if (!t || !t.length) return this; if (t.length < this._minEntries) { for (var e = 0, i = t.length; e < i; e++) this.insert(t[e]); return this } var n, s = this._build(t.slice(), 0, t.length - 1, 0); return this.data.children.length ? this.data.height === s.height ? this._splitRoot(this.data, s) : (this.data.height < s.height && (n = this.data, this.data = s, s = n), this._insert(s, this.data.height - s.height - 1, !0)) : this.data = s, this }, insert: function(t) { return t && this._insert(t, this.data.height - 1), this }, clear: function() { return this.data = p([]), this }, remove: function(t, e) { if (!t) return this; for (var i, n, s, r, o = this.data, a = this.toBBox(t), h = [], l = []; o || h.length; ) { if (o || (o = h.pop(), n = h[h.length - 1], i = l.pop(), r = !0), o.leaf && -1 !== (s = function(t, e, i) { if (!i) return e.indexOf(t); for (var n = 0; n < e.length; n++) if (i(t, e[n])) return n; return -1 }(t, o.children, e))) return o.children.splice(s, 1), h.push(o), this._condense(h), this; r || o.leaf || !d(o, a) ? n ? (i++, o = n.children[i], r = !1) : o = null : (h.push(o), l.push(i), i = 0, o = (n = o).children[0]) } return this }, toBBox: function(t) { return { minX: t.left, minY: t.top, maxX: t.right, maxY: t.bottom } }, compareMinX: function(t, e) { return t.left - e.left }, compareMinY: function(t, e) { return t.top - e.top }, toJSON: function() { return this.data }, fromJSON: function(t) { return this.data = t, this }, _all: function(t, e) { for (var i = []; t; ) t.leaf ? e.push.apply(e, t.children) : i.push.apply(i, t.children), t = i.pop(); return e }, _build: function(t, e, i, n) { var s, r = i - e + 1, o = this._maxEntries; if (r <= o) return f(s = p(t.slice(e, i + 1)), this.toBBox), s; n || (n = Math.ceil(Math.log(r) / Math.log(o)), o = Math.ceil(r / Math.pow(o, n - 1))), (s = p([])).leaf = !1, s.height = n; var a, h, l, u, c = Math.ceil(r / o), d = c * Math.ceil(Math.sqrt(o)); for (g(t, e, i, d, this.compareMinX), a = e; a <= i; a += d) for (g(t, a, l = Math.min(a + d - 1, i), c, this.compareMinY), h = a; h <= l; h += c) u = Math.min(h + c - 1, l), s.children.push(this._build(t, h, u, n - 1)); return f(s, this.toBBox), s }, _chooseSubtree: function(t, e, i, n) { for (var s, r, o, a, h, l, u, c, d, f; n.push(e), !e.leaf && n.length - 1 !== i; ) { for (u = c = 1 / 0, s = 0, r = e.children.length; s < r; s++) h = y(o = e.children[s]), d = t, f = o, (l = (Math.max(f.maxX, d.maxX) - Math.min(f.minX, d.minX)) * (Math.max(f.maxY, d.maxY) - Math.min(f.minY, d.minY)) - h) < c ? (c = l, u = h < u ? h : u, a = o) : l === c && h < u && (u = h, a = o); e = a || e.children[0] } return e }, _insert: function(t, e, i) { var n = this.toBBox , s = i ? t : n(t) , r = [] , o = this._chooseSubtree(s, this.data, e, r); for (o.children.push(t), u(o, s); 0 <= e && r[e].children.length > this._maxEntries; ) this._split(r, e), e--; this._adjustParentBBoxes(s, r, e) }, _split: function(t, e) { var i = t[e] , n = i.children.length , s = this._minEntries; this._chooseSplitAxis(i, s, n); var r = this._chooseSplitIndex(i, s, n) , o = p(i.children.splice(r, i.children.length - r)); o.height = i.height, o.leaf = i.leaf, f(i, this.toBBox), f(o, this.toBBox), e ? t[e - 1].children.push(o) : this._splitRoot(i, o) }, _splitRoot: function(t, e) { this.data = p([t, e]), this.data.height = t.height + 1, this.data.leaf = !1, f(this.data, this.toBBox) }, _chooseSplitIndex: function(t, e, i) { for (var n, s, r, o, a, h, l, u, c, d, f, p, g = a = 1 / 0, v = e; v <= i - e; v++) n = m(t, 0, v, this.toBBox), s = m(t, v, i, this.toBBox), l = n, u = s, p = f = d = c = void 0, c = Math.max(l.minX, u.minX), d = Math.max(l.minY, u.minY), f = Math.min(l.maxX, u.maxX), p = Math.min(l.maxY, u.maxY), r = Math.max(0, f - c) * Math.max(0, p - d), o = y(n) + y(s), r < g ? (g = r, h = v, a = o < a ? o : a) : r === g && o < a && (a = o, h = v); return h }, _chooseSplitAxis: function(t, e, i) { var n = t.leaf ? this.compareMinX : r , s = t.leaf ? this.compareMinY : o; this._allDistMargin(t, e, i, n) < this._allDistMargin(t, e, i, s) && t.children.sort(n) }, _allDistMargin: function(t, e, i, n) { t.children.sort(n); for (var s, r = this.toBBox, o = m(t, 0, e, r), a = m(t, i - e, i, r), h = c(o) + c(a), l = e; l < i - e; l++) s = t.children[l], u(o, t.leaf ? r(s) : s), h += c(o); for (l = i - e - 1; e <= l; l--) s = t.children[l], u(a, t.leaf ? r(s) : s), h += c(a); return h }, _adjustParentBBoxes: function(t, e, i) { for (var n = i; 0 <= n; n--) u(e[n], t) }, _condense: function(t) { for (var e, i = t.length - 1; 0 <= i; i--) 0 === t[i].children.length ? 0 < i ? (e = t[i - 1].children).splice(e.indexOf(t[i]), 1) : this.clear() : f(t[i], this.toBBox) } }, t.exports = n } , function(t, e) { t.exports = function(t, e) { return !(e.right <= t.left || e.bottom <= t.top || e.position.x >= t.right || e.position.y >= t.bottom) } } , function(t, e, i) { var n = i(55) , s = i(0) , r = i(50) , o = i(48) , a = i(3) , h = new s({ initialize: function(t, e) { var i = e.displayWidth ? e.displayWidth : 64 , n = e.displayHeight ? e.displayHeight : 64; this.world = t, this.gameObject = e, this.debugShowBody = t.defaults.debugShowStaticBody, this.debugBodyColor = t.defaults.staticBodyDebugColor, this.enable = !0, this.isCircle = !1, this.radius = 0, this.offset = new a, this.position = new a(e.x - i * e.originX,e.y - n * e.originY), this.width = i, this.height = n, this.halfWidth = Math.abs(this.width / 2), this.halfHeight = Math.abs(this.height / 2), this.center = new a(this.position.x + this.halfWidth,this.position.y + this.halfHeight), this.velocity = a.ZERO, this.allowGravity = !1, this.gravity = a.ZERO, this.bounce = a.ZERO, this.onWorldBounds = !1, this.onCollide = !1, this.onOverlap = !1, this.mass = 1, this.immovable = !0, this.customSeparateX = !1, this.customSeparateY = !1, this.overlapX = 0, this.overlapY = 0, this.overlapR = 0, this.embedded = !1, this.collideWorldBounds = !1, this.checkCollision = { none: !1, up: !0, down: !0, left: !0, right: !0 }, this.touching = { none: !0, up: !1, down: !1, left: !1, right: !1 }, this.wasTouching = { none: !0, up: !1, down: !1, left: !1, right: !1 }, this.blocked = { none: !0, up: !1, down: !1, left: !1, right: !1 }, this.physicsType = r.STATIC_BODY, this._dx = 0, this._dy = 0 }, setGameObject: function(t, e) { return t && t !== this.gameObject && (this.gameObject.body = null, (t.body = this).gameObject = t), e && this.updateFromGameObject(), this }, updateFromGameObject: function() { this.world.staticTree.remove(this); var t = this.gameObject; return t.getTopLeft(this.position), this.width = t.displayWidth, this.height = t.displayHeight, this.halfWidth = Math.abs(this.width / 2), this.halfHeight = Math.abs(this.height / 2), this.center.set(this.position.x + this.halfWidth, this.position.y + this.halfHeight), this.world.staticTree.insert(this), this }, setOffset: function(t, e) { return void 0 === e && (e = t), this.world.staticTree.remove(this), this.position.x -= this.offset.x, this.position.y -= this.offset.y, this.offset.set(t, e), this.position.x += this.offset.x, this.position.y += this.offset.y, this.updateCenter(), this.world.staticTree.insert(this), this }, setSize: function(t, e, i) { void 0 === i && (i = !0); var n, s, r = this.gameObject; return !t && r.frame && (t = r.frame.realWidth), !e && r.frame && (e = r.frame.realHeight), this.world.staticTree.remove(this), this.width = t, this.height = e, this.halfWidth = Math.floor(t / 2), this.halfHeight = Math.floor(e / 2), i && r.getCenter && (n = r.displayWidth / 2, s = r.displayHeight / 2, this.position.x -= this.offset.x, this.position.y -= this.offset.y, this.offset.set(n - this.halfWidth, s - this.halfHeight), this.position.x += this.offset.x, this.position.y += this.offset.y), this.updateCenter(), this.isCircle = !1, this.radius = 0, this.world.staticTree.insert(this), this }, setCircle: function(t, e, i) { return void 0 === e && (e = this.offset.x), void 0 === i && (i = this.offset.y), 0 < t ? (this.world.staticTree.remove(this), this.isCircle = !0, this.radius = t, this.width = 2 * t, this.height = 2 * t, this.halfWidth = Math.floor(this.width / 2), this.halfHeight = Math.floor(this.height / 2), this.offset.set(e, i), this.updateCenter(), this.world.staticTree.insert(this)) : this.isCircle = !1, this }, updateCenter: function() { this.center.set(this.position.x + this.halfWidth, this.position.y + this.halfHeight) }, reset: function(t, e) { var i = this.gameObject; void 0 === t && (t = i.x), void 0 === e && (e = i.y), this.world.staticTree.remove(this), i.setPosition(t, e), i.getTopLeft(this.position), this.updateCenter(), this.world.staticTree.insert(this) }, stop: function() { return this }, getBounds: function(t) { return t.x = this.x, t.y = this.y, t.right = this.right, t.bottom = this.bottom, t }, hitTest: function(t, e) { return (this.isCircle ? n : o)(this, t, e) }, postUpdate: function() {}, deltaAbsX: function() { return 0 }, deltaAbsY: function() { return 0 }, deltaX: function() { return 0 }, deltaY: function() { return 0 }, deltaZ: function() { return 0 }, destroy: function() { this.enable = !1, this.world.pendingDestroy.set(this) }, drawDebug: function(t) { var e = this.position , i = e.x + this.halfWidth , n = e.y + this.halfHeight; this.debugShowBody && (t.lineStyle(t.defaultStrokeWidth, this.debugBodyColor, 1), this.isCircle ? t.strokeCircle(i, n, this.width / 2) : t.strokeRect(e.x, e.y, this.width, this.height)) }, willDrawDebug: function() { return this.debugShowBody }, setMass: function(t) { return t <= 0 && (t = .1), this.mass = t, this }, x: { get: function() { return this.position.x }, set: function(t) { this.world.staticTree.remove(this), this.position.x = t, this.world.staticTree.insert(this) } }, y: { get: function() { return this.position.y }, set: function(t) { this.world.staticTree.remove(this), this.position.y = t, this.world.staticTree.insert(this) } }, left: { get: function() { return this.position.x } }, right: { get: function() { return this.position.x + this.width } }, top: { get: function() { return this.position.y } }, bottom: { get: function() { return this.position.y + this.height } } }); t.exports = h } , function(t, e) { var l = {}; (t.exports = l).create = function(t, e) { var i = t.bodyA , n = t.bodyB , s = { id: l.id(i, n), bodyA: i, bodyB: n, activeContacts: [], separation: 0, isActive: !0, confirmedActive: !0, isSensor: i.isSensor || n.isSensor, timeCreated: e, timeUpdated: e, collision: null, inverseMass: 0, friction: 0, frictionStatic: 0, restitution: 0, slop: 0 }; return l.update(s, t, e), s } , l.update = function(t, e, i) { if ((t.collision = e).collided) { var n = e.supports , s = t.activeContacts , r = e.parentA , o = e.parentB; t.inverseMass = r.inverseMass + o.inverseMass, t.friction = Math.min(r.friction, o.friction), t.frictionStatic = Math.max(r.frictionStatic, o.frictionStatic), t.restitution = Math.max(r.restitution, o.restitution), t.slop = Math.max(r.slop, o.slop); for (var a = 0; a < n.length; a++) s[a] = n[a].contact; var h = n.length; h < s.length && (s.length = h), t.separation = e.depth, l.setActive(t, !0, i) } else !0 === t.isActive && l.setActive(t, !1, i) } , l.setActive = function(t, e, i) { e ? (t.isActive = !0, t.timeUpdated = i) : (t.isActive = !1, t.activeContacts.length = 0) } , l.id = function(t, e) { return t.id < e.id ? "A" + t.id + "B" + e.id : "A" + e.id + "B" + t.id } } , function(t, e, i) { var n = new (i(0))({ initialize: function(t) { this.pluginManager = t, this.game = t.game }, init: function() {}, start: function() {}, stop: function() {}, destroy: function() { this.pluginManager = null, this.game = null, this.scene = null, this.systems = null } }); t.exports = n } , function(t, e, i) { var l = i(24); t.exports = function(t, e, i, n, s, r, o) { for (var a = l(i, n, s, r, null, o), h = 0; h < a.length; h++) a[h] && a[h].index === t && (a[h].index = e) } } , function(t, e, i) { var s = i(101); t.exports = function(t, e, i) { if (s(t, e, i)) { var n = i.data[e][t]; return null !== n && -1 < n.index } return !1 } } , function(t, e, i) { var o = i(74) , a = i(101) , h = i(220); t.exports = function(t, e, i, n, s) { if (void 0 === i && (i = !1), void 0 === n && (n = !0), !a(t, e, s)) return null; var r = s.data[e][t]; return r ? (s.data[e][t] = i ? null : new o(s,-1,t,e,r.width,r.height), n && r && r.collides && h(t, e, s), r) : null } } , function(t, e, i) { var a = i(32) , h = i(223) , l = i(479) , u = i(480) , c = i(491); t.exports = function(t, e, i, n, s, r) { var o; switch (e) { case a.ARRAY_2D: o = h(t, i, n, s, r); break; case a.CSV: o = l(t, i, n, s, r); break; case a.TILED_JSON: o = u(t, i, r); break; case a.WELTMEISTER: o = c(t, i, r); break; default: console.warn("Unrecognized tilemap data format: " + e), o = null } return o } } , function(t, e, i) { var a = i(32) , h = i(223); t.exports = function(t, e, i, n, s) { var r = e.trim().split("\n").map(function(t) { return t.split(",") }) , o = h(t, r, i, n, s); return o.format = a.CSV, o } } , function(t, e, i) { var r = i(32) , o = i(103) , a = i(481) , h = i(483) , l = i(484) , u = i(487) , c = i(489) , d = i(490); t.exports = function(t, e, i) { if ("orthogonal" !== e.orientation) return console.warn("Only orthogonal map types are supported in this version of Phaser"), null; var n = new o({ width: e.width, height: e.height, name: t, tileWidth: e.tilewidth, tileHeight: e.tileheight, orientation: e.orientation, format: r.TILED_JSON, version: e.version, properties: e.properties, renderOrder: e.renderorder, infinite: e.infinite }); n.layers = a(e, i), n.images = h(e); var s = l(e); return n.tilesets = s.tilesets, n.imageCollections = s.imageCollections, n.objects = u(e), n.tiles = c(n), d(n), n } } , function(t, e, i) { var O = i(482) , R = i(2) , L = i(102) , k = i(224) , D = i(74) , F = i(225); t.exports = function(t, e) { for (var i = R(t, "infinite", !1), n = [], s = [], r = F(t); r.i < r.layers.length || 0 < s.length; ) if (r.i >= r.layers.length) { if (s.length < 1) { console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy"); break } r = s.pop() } else { var o, a = r.layers[r.i]; if (r.i++, "tilelayer" === a.type) if (a.compression) console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '" + a.name + "'"); else { if (a.encoding && "base64" === a.encoding) { if (a.chunks) for (var h = 0; h < a.chunks.length; h++) a.chunks[h].data = O(a.chunks[h].data); a.data && (a.data = O(a.data)), delete a.encoding } var l, u, c = [], d = 0; if (i) { for (var f = R(a, "startx", 0) + a.x, p = R(a, "starty", 0) + a.y, g = new L({ name: r.name + a.name, x: r.x + R(a, "offsetx", 0) + f * t.tilewidth, y: r.y + R(a, "offsety", 0) + p * t.tileheight, width: a.width, height: a.height, tileWidth: t.tilewidth, tileHeight: t.tileheight, alpha: r.opacity * a.opacity, visible: r.visible && a.visible, properties: R(a, "properties", []) }), v = 0; v < a.height; v++) { c.push([null]); for (var m = 0; m < a.width; m++) c[v][m] = null } for (v = 0, P = a.chunks.length; v < P; v++) for (var y = a.chunks[v], x = y.x - f, T = y.y - p, w = 0, b = 0, E = y.data.length; b < E; b++) { var S, _ = d + x, A = w + T; 0 < (S = k(y.data[b])).gid ? ((l = new D(g,S.gid,_,A,t.tilewidth,t.tileheight)).rotation = S.rotation, l.flipX = S.flipped, c[A][_] = l) : (u = e ? null : new D(g,-1,_,A,t.tilewidth,t.tileheight), c[A][_] = u), ++d === y.width && (w++, d = 0) } } else { g = new L({ name: r.name + a.name, x: r.x + R(a, "offsetx", 0) + a.x, y: r.y + R(a, "offsety", 0) + a.y, width: a.width, height: a.height, tileWidth: t.tilewidth, tileHeight: t.tileheight, alpha: r.opacity * a.opacity, visible: r.visible && a.visible, properties: R(a, "properties", []) }); for (var C = [], M = 0, P = a.data.length; M < P; M++) 0 < (S = k(a.data[M])).gid ? ((l = new D(g,S.gid,d,c.length,t.tilewidth,t.tileheight)).rotation = S.rotation, l.flipX = S.flipped, C.push(l)) : (u = e ? null : new D(g,-1,d,c.length,t.tilewidth,t.tileheight), C.push(u)), ++d === a.width && (c.push(C), d = 0, C = []) } g.data = c, n.push(g) } else "group" === a.type && (o = F(t, a, r), s.push(r), r = o) } return n } } , function(t, e) { t.exports = function(t) { for (var e = window.atob(t), i = e.length, n = new Array(i / 4), s = 0; s < i; s += 4) n[s / 4] = (e.charCodeAt(s) | e.charCodeAt(s + 1) << 8 | e.charCodeAt(s + 2) << 16 | e.charCodeAt(s + 3) << 24) >>> 0; return n } } , function(t, e, i) { var h = i(2) , l = i(225); t.exports = function(t) { for (var e = [], i = [], n = l(t); n.i < n.layers.length || 0 < i.length; ) if (n.i >= n.layers.length) { if (i.length < 1) { console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy"); break } n = i.pop() } else { var s, r, o, a = n.layers[n.i]; n.i++, "imagelayer" === a.type ? (s = h(a, "offsetx", 0) + h(a, "startx", 0), r = h(a, "offsety", 0) + h(a, "starty", 0), e.push({ name: n.name + a.name, image: a.image, x: n.x + s + a.x, y: n.y + r + a.y, alpha: n.opacity * a.opacity, visible: n.visible && a.visible, properties: h(a, "properties", {}) })) : "group" === a.type && (o = l(t, a, n), i.push(n), n = o) } return e } } , function(t, e, i) { var x = i(104) , T = i(485) , w = i(226); t.exports = function(t) { for (var e, i = [], n = [], s = null, r = 0; r < t.tilesets.length; r++) { var o = t.tilesets[r]; if (o.source) console.warn("Phaser can't load external tilesets. Use the Embed Tileset button and then export the map again."); else if (o.image) { var a = new x(o.name,o.firstgid,o.tilewidth,o.tileheight,o.margin,o.spacing); if (1 < t.version) { if (Array.isArray(o.tiles)) { for (var h = {}, l = {}, u = 0; u < o.tiles.length; u++) { var c, d, f = o.tiles[u]; f.properties && (c = {}, f.properties.forEach(function(t) { c[t.name] = t.value }), l[f.id] = c), f.objectgroup && (h[f.id] = { objectgroup: f.objectgroup }, f.objectgroup.objects && (d = f.objectgroup.objects.map(function(t) { return w(t) }), h[f.id].objectgroup.objects = d)), f.animation && (h.hasOwnProperty(f.id) ? h[f.id].animation = f.animation : h[f.id] = { animation: f.animation }) } a.tileData = h, a.tileProperties = l } } else if (o.tileproperties && (a.tileProperties = o.tileproperties), o.tiles) for (e in a.tileData = o.tiles, a.tileData) { var p, g = a.tileData[e].objectgroup; g && g.objects && (p = g.objects.map(function(t) { return w(t) }), a.tileData[e].objectgroup.objects = p) } a.updateTileData(o.imagewidth, o.imageheight), i.push(a) } else { var v = new T(o.name,o.firstgid,o.tilewidth,o.tileheight,o.margin,o.spacing,o.properties); for (e in o.tiles) { var m = o.tiles[e].image , y = o.firstgid + parseInt(e, 10); v.addImage(y, m) } n.push(v) } s && (s.lastgid = o.firstgid - 1), s = o } return { tilesets: i, imageCollections: n } } } , function(t, e, i) { var n = new (i(0))({ initialize: function(t, e, i, n, s, r, o) { (void 0 === i || i <= 0) && (i = 32), (void 0 === n || n <= 0) && (n = 32), void 0 === s && (s = 0), void 0 === r && (r = 0), this.name = t, this.firstgid = 0 | e, this.imageWidth = 0 | i, this.imageHeight = 0 | n, this.imageMargin = 0 | s, this.imageSpacing = 0 | r, this.properties = o || {}, this.images = [], this.total = 0 }, containsImageIndex: function(t) { return t >= this.firstgid && t < this.firstgid + this.total }, addImage: function(t, e) { return this.images.push({ gid: t, image: e }), this.total++, this } }); t.exports = n } , function(t, e, i) { var r = i(108); t.exports = function(t, e) { for (var i = {}, n = 0; n < e.length; n++) { var s = e[n]; r(t, s) && (i[s] = t[s]) } return i } } , function(t, e, i) { var d = i(2) , f = i(226) , p = i(488) , g = i(225); t.exports = function(t) { for (var e = [], i = [], n = g(t); n.i < n.layers.length || 0 < i.length; ) if (n.i >= n.layers.length) { if (i.length < 1) { console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy"); break } n = i.pop() } else { var s, r = n.layers[n.i]; if (n.i++, r.opacity *= n.opacity, r.visible = n.visible && r.visible, "objectgroup" === r.type) { r.name = n.name + r.name; for (var o = n.x + d(r, "startx", 0) + d(r, "offsetx", 0), a = n.y + d(r, "starty", 0) + d(r, "offsety", 0), h = [], l = 0; l < r.objects.length; l++) { var u = f(r.objects[l], o, a); h.push(u) } var c = new p(r); c.objects = h, e.push(c) } else { "group" === r.type && (s = g(t, r, n), i.push(n), n = s) } } return e } } , function(t, e, i) { var n = i(0) , s = i(2) , r = new n({ initialize: function(t) { void 0 === t && (t = {}), this.name = s(t, "name", "object layer"), this.opacity = s(t, "opacity", 1), this.properties = s(t, "properties", {}), this.propertyTypes = s(t, "propertytypes", {}), this.type = s(t, "type", "objectgroup"), this.visible = s(t, "visible", !0), this.objects = s(t, "objects", []) } }); t.exports = r } , function(t, e, i) { var p = i(104); t.exports = function(t) { for (var e = [], i = 0; i < t.imageCollections.length; i++) for (var n = t.imageCollections[i], s = n.images, r = 0; r < s.length; r++) { var o, a = s[r]; (o = new p(a.image,a.gid,n.imageWidth,n.imageHeight,0,0)).updateTileData(n.imageWidth, n.imageHeight), t.tilesets.push(o) } for (i = 0; i < t.tilesets.length; i++) for (var h = (o = t.tilesets[i]).tileMargin, l = o.tileMargin, u = 0, c = 0, d = 0, f = o.firstgid; f < o.firstgid + o.total && (e[f] = [h, l, i], h += o.tileWidth + o.tileSpacing, ++u !== o.total) && (++c !== o.columns || (h = o.tileMargin, l += o.tileHeight + o.tileSpacing, c = 0, ++d !== o.rows)); f++) ; return e } } , function(t, e, i) { var l = i(18); t.exports = function(t) { for (var e, i, n, s, r, o = 0; o < t.layers.length; o++) { e = t.layers[o], 0; for (var a = 0; a < e.data.length; a++) { r = e.data[a]; for (var h = 0; h < r.length; h++) null === (i = r[h]) || i.index < 0 || (n = t.tiles[i.index][2], s = t.tilesets[n], i.width = s.tileWidth, i.height = s.tileHeight, s.tileProperties && s.tileProperties[i.index - s.firstgid] && (i.properties = l(i.properties, s.tileProperties[i.index - s.firstgid]))) } } } } , function(t, e, i) { var a = i(32) , h = i(103) , l = i(492) , u = i(493); t.exports = function(t, e, i) { if (0 === e.layer.length) return console.warn("No layers found in the Weltmeister map: " + t), null; for (var n = 0, s = 0, r = 0; r < e.layer.length; r++) e.layer[r].width > n && (n = e.layer[r].width), e.layer[r].height > s && (s = e.layer[r].height); var o = new h({ width: n, height: s, name: t, tileWidth: e.layer[0].tilesize, tileHeight: e.layer[0].tilesize, format: a.WELTMEISTER }); return o.layers = l(e, i), o.tilesets = u(e), o } } , function(t, e, i) { var d = i(102) , f = i(74); t.exports = function(t, e) { for (var i = [], n = 0; n < t.layer.length; n++) { for (var s = t.layer[n], r = new d({ name: s.name, width: s.width, height: s.height, tileWidth: s.tilesize, tileHeight: s.tilesize, visible: 1 === s.visible }), o = [], a = [], h = 0; h < s.data.length; h++) { for (var l = 0; l < s.data[h].length; l++) { var u = s.data[h][l] - 1 , c = -1 < u ? new f(r,u,l,h,s.tilesize,s.tilesize) : e ? null : new f(r,-1,l,h,s.tilesize,s.tilesize); o.push(c) } a.push(o), o = [] } r.data = a, i.push(r) } return i } } , function(t, e, i) { var o = i(104); t.exports = function(t) { for (var e = [], i = [], n = 0; n < t.layer.length; n++) { var s = t.layer[n] , r = s.tilesetName; "" !== r && -1 === i.indexOf(r) && (i.push(r), e.push(new o(r,0,s.tilesize,s.tilesize,0,0))) } return e } } , function(t, e, i) { var n = i(0) , g = i(39) , f = i(495) , v = i(18) , u = i(32) , p = i(102) , m = i(331) , s = i(80) , o = i(496) , y = i(74) , h = i(141) , c = i(104) , r = new n({ initialize: function(t, e) { this.scene = t, this.tileWidth = e.tileWidth, this.tileHeight = e.tileHeight, this.width = e.width, this.height = e.height, this.orientation = e.orientation, this.renderOrder = e.renderOrder, this.format = e.format, this.version = e.version, this.properties = e.properties, this.widthInPixels = e.widthInPixels, this.heightInPixels = e.heightInPixels, this.imageCollections = e.imageCollections, this.images = e.images, this.layers = e.layers, this.tilesets = e.tilesets, this.objects = e.objects, this.currentLayerIndex = 0 }, setRenderOrder: function(t) { var e = ["right-down", "left-down", "right-up", "left-up"]; return "number" == typeof t && (t = e[t]), -1 < e.indexOf(t) && (this.renderOrder = t), this }, addTilesetImage: function(t, e, i, n, s, r, o) { if (void 0 === t) return null; if (null == e && (e = t), !this.scene.sys.textures.exists(e)) return console.warn("Invalid Tileset Image: " + e), null; var a = this.scene.sys.textures.get(e) , h = this.getTilesetIndex(t); if (null === h && this.format === u.TILED_JSON) return console.warn("No data found for Tileset: " + t), null; var l = this.tilesets[h]; return l ? (l.setTileSize(i, n), l.setSpacing(s, r), l.setImage(a)) : (void 0 === i && (i = this.tileWidth), void 0 === n && (n = this.tileHeight), void 0 === s && (s = 0), void 0 === r && (r = 0), void 0 === o && (o = 0), (l = new c(t,o,i,n,s,r)).setImage(a), this.tilesets.push(l)), l }, convertLayerToStatic: function(t) { if (null === (t = this.getLayer(t))) return null; var e = t.tilemapLayer; if (!(e && e instanceof f)) return null; var i = new o(e.scene,e.tilemap,e.layerIndex,e.tileset,e.x,e.y); return this.scene.sys.displayList.add(i), e.destroy(), i }, copy: function(t, e, i, n, s, r, o, a) { return a = this.getLayer(a), this._isStaticCall(a, "copy") ? this : null !== a ? (h.Copy(t, e, i, n, s, r, o, a), this) : null }, createBlankDynamicLayer: function(t, e, i, n, s, r, o, a) { if (void 0 === i && (i = 0), void 0 === n && (n = 0), void 0 === s && (s = this.width), void 0 === r && (r = this.height), void 0 === o && (o = this.tileWidth), void 0 === a && (a = this.tileHeight), null !== this.getLayerIndex(t)) return console.warn("Invalid Tilemap Layer ID: " + t), null; for (var h, l = new p({ name: t, tileWidth: o, tileHeight: a, width: s, height: r }), u = 0; u < r; u++) { h = []; for (var c = 0; c < s; c++) h.push(new y(l,-1,c,u,o,a,this.tileWidth,this.tileHeight)); l.data.push(h) } this.layers.push(l), this.currentLayerIndex = this.layers.length - 1; var d = new f(this.scene,this,this.currentLayerIndex,e,i,n); return d.setRenderOrder(this.renderOrder), this.scene.sys.displayList.add(d), d }, createDynamicLayer: function(t, e, i, n) { var s = this.getLayerIndex(t); if (null === s) return console.warn("Invalid Tilemap Layer ID: " + t), "string" == typeof t && console.warn("Valid tilelayer names:\n\t" + this.getTileLayerNames().join(",\n\t")), null; var r = this.layers[s]; if (r.tilemapLayer) return console.warn("Tilemap Layer ID already exists:" + t), null; this.currentLayerIndex = s, void 0 === i && (i = r.x), void 0 === n && (n = r.y); var o = new f(this.scene,this,s,e,i,n); return o.setRenderOrder(this.renderOrder), this.scene.sys.displayList.add(o), o }, createFromObjects: function(t, e, i, n) { void 0 === i && (i = {}), void 0 === n && (n = this.scene); var s = this.getObjectLayer(t); if (!s) return console.warn("Cannot create from object. Invalid objectgroup name given: " + t), "string" == typeof layerID && console.warn("Valid objectgroup names:\n\t" + this.getObjectLayerNames().join(",\n\t")), null; for (var r = s.objects, o = [], a = 0; a < r.length; a++) { var h = !1 , l = r[a]; if ((void 0 !== l.gid && "number" == typeof e && l.gid === e || void 0 !== l.id && "number" == typeof e && l.id === e || void 0 !== l.name && "string" == typeof e && l.name === e) && (h = !0), h) { var u = v({}, i, l.properties); u.x = l.x, u.y = l.y; var c = n.make.sprite(u); c.name = l.name, l.width && (c.displayWidth = l.width), l.height && (c.displayHeight = l.height); var d, f = { x: c.originX * l.width, y: (c.originY - 1) * l.height }; for (var p in l.rotation && (d = g(l.rotation), m(f, d), c.rotation = d), c.x += f.x, c.y += f.y, void 0 === l.flippedHorizontal && void 0 === l.flippedVertical || c.setFlip(l.flippedHorizontal, l.flippedVertical), l.visible || (c.visible = !1), l.properties) c.hasOwnProperty(p) || c.setData(p, l.properties[p]); o.push(c) } } return o }, createFromTiles: function(t, e, i, n, s, r) { return null === (r = this.getLayer(r)) ? null : h.CreateFromTiles(t, e, i, n, s, r) }, createStaticLayer: function(t, e, i, n) { var s = this.getLayerIndex(t); if (null === s) return console.warn("Invalid Tilemap Layer ID: " + t), "string" == typeof t && console.warn("Valid tilelayer names:\n\t" + this.getTileLayerNames().join(",\n\t")), null; if (this.layers[s].tilemapLayer) return console.warn("Tilemap Layer ID already exists:" + t), null; this.currentLayerIndex = s, void 0 === i && this.layers[s].x && (i = this.layers[s].x), void 0 === n && this.layers[s].y && (n = this.layers[s].y); var r = new o(this.scene,this,s,e,i,n); return r.setRenderOrder(this.renderOrder), this.scene.sys.displayList.add(r), r }, destroy: function() { this.removeAllLayers(), this.tilesets.length = 0, this.objects.length = 0, this.scene = void 0 }, fill: function(t, e, i, n, s, r, o) { return null === (o = this.getLayer(o)) ? null : (this._isStaticCall(o, "fill") || h.Fill(t, e, i, n, s, r, o), this) }, filterObjects: function(t, e, i) { if ("string" == typeof t) { var n = t; if (!(t = this.getObjectLayer(t))) return console.warn("No object layer found with the name: " + n), null } return t.objects.filter(e, i) }, filterTiles: function(t, e, i, n, s, r, o, a) { return null === (a = this.getLayer(a)) ? null : h.FilterTiles(t, e, i, n, s, r, o, a) }, findByIndex: function(t, e, i, n) { return null === (n = this.getLayer(n)) ? null : h.FindByIndex(t, e, i, n) }, findObject: function(t, e, i) { if ("string" == typeof t) { var n = t; if (!(t = this.getObjectLayer(t))) return console.warn("No object layer found with the name: " + n), null } return t.objects.find(e, i) || null }, findTile: function(t, e, i, n, s, r, o, a) { return null === (a = this.getLayer(a)) ? null : h.FindTile(t, e, i, n, s, r, o, a) }, forEachTile: function(t, e, i, n, s, r, o, a) { return null === (a = this.getLayer(a)) ? null : (h.ForEachTile(t, e, i, n, s, r, o, a), this) }, getImageIndex: function(t) { return this.getIndex(this.images, t) }, getImageLayerNames: function() { return this.images && Array.isArray(this.images) ? this.images.map(function(t) { return t.name }) : [] }, getIndex: function(t, e) { for (var i = 0; i < t.length; i++) if (t[i].name === e) return i; return null }, getLayer: function(t) { var e = this.getLayerIndex(t); return null !== e ? this.layers[e] : null }, getObjectLayer: function(t) { var e = this.getIndex(this.objects, t); return null !== e ? this.objects[e] : null }, getObjectLayerNames: function() { return this.objects && Array.isArray(this.objects) ? this.objects.map(function(t) { return t.name }) : [] }, getLayerIndex: function(t) { return void 0 === t ? this.currentLayerIndex : "string" == typeof t ? this.getLayerIndexByName(t) : "number" == typeof t && t < this.layers.length ? t : t instanceof o || t instanceof f ? t.layerIndex : null }, getLayerIndexByName: function(t) { return this.getIndex(this.layers, t) }, getTileAt: function(t, e, i, n) { return null === (n = this.getLayer(n)) ? null : h.GetTileAt(t, e, i, n) }, getTileAtWorldXY: function(t, e, i, n, s) { return null === (s = this.getLayer(s)) ? null : h.GetTileAtWorldXY(t, e, i, n, s) }, getTileLayerNames: function() { return this.layers && Array.isArray(this.layers) ? this.layers.map(function(t) { return t.name }) : [] }, getTilesWithin: function(t, e, i, n, s, r) { return null === (r = this.getLayer(r)) ? null : h.GetTilesWithin(t, e, i, n, s, r) }, getTilesWithinShape: function(t, e, i, n) { return null === (n = this.getLayer(n)) ? null : h.GetTilesWithinShape(t, e, i, n) }, getTilesWithinWorldXY: function(t, e, i, n, s, r, o) { return null === (o = this.getLayer(o)) ? null : h.GetTilesWithinWorldXY(t, e, i, n, s, r, o) }, getTileset: function(t) { var e = this.getIndex(this.tilesets, t); return null !== e ? this.tilesets[e] : null }, getTilesetIndex: function(t) { return this.getIndex(this.tilesets, t) }, hasTileAt: function(t, e, i) { return null === (i = this.getLayer(i)) ? null : h.HasTileAt(t, e, i) }, hasTileAtWorldXY: function(t, e, i, n) { return null === (n = this.getLayer(n)) ? null : h.HasTileAtWorldXY(t, e, i, n) }, layer: { get: function() { return this.layers[this.currentLayerIndex] }, set: function(t) { this.setLayer(t) } }, putTileAt: function(t, e, i, n, s) { return s = this.getLayer(s), this._isStaticCall(s, "putTileAt") || null === s ? null : h.PutTileAt(t, e, i, n, s) }, putTileAtWorldXY: function(t, e, i, n, s, r) { return r = this.getLayer(r), this._isStaticCall(r, "putTileAtWorldXY") || null === r ? null : h.PutTileAtWorldXY(t, e, i, n, s, r) }, putTilesAt: function(t, e, i, n, s) { return s = this.getLayer(s), this._isStaticCall(s, "putTilesAt") ? this : null === s ? null : (h.PutTilesAt(t, e, i, n, s), this) }, randomize: function(t, e, i, n, s, r) { return r = this.getLayer(r), this._isStaticCall(r, "randomize") ? this : null === r ? null : (h.Randomize(t, e, i, n, s, r), this) }, calculateFacesAt: function(t, e, i) { return null === (i = this.getLayer(i)) ? null : (h.CalculateFacesAt(t, e, i), this) }, calculateFacesWithin: function(t, e, i, n, s) { return null === (s = this.getLayer(s)) ? null : (h.CalculateFacesWithin(t, e, i, n, s), this) }, removeLayer: function(t) { var e = this.getLayerIndex(t); if (null === e) return null; s(this.layers, e); for (var i = e; i < this.layers.length; i++) this.layers[i].tilemapLayer && this.layers[i].tilemapLayer.layerIndex--; return this.currentLayerIndex === e && (this.currentLayerIndex = 0), this }, destroyLayer: function(t) { var e = this.getLayerIndex(t); return null !== e ? ((t = this.layers[e]).destroy(), s(this.layers, e), this.currentLayerIndex === e && (this.currentLayerIndex = 0), this) : null }, removeAllLayers: function() { for (var t = this.layers, e = 0; e < t.length; e++) t[e].tilemapLayer && t[e].tilemapLayer.destroy(!1); return t.length = 0, this.currentLayerIndex = 0, this }, removeTile: function(t, e, i) { void 0 === e && (e = -1), void 0 === i && (i = !0); var n = []; Array.isArray(t) || (t = [t]); for (var s = 0; s < t.length; s++) { var r = t[s]; n.push(this.removeTileAt(r.x, r.y, !0, i, r.tilemapLayer)), -1 < e && this.putTileAt(e, r.x, r.y, i, r.tilemapLayer) } return n }, removeTileAt: function(t, e, i, n, s) { return s = this.getLayer(s), this._isStaticCall(s, "removeTileAt") || null === s ? null : h.RemoveTileAt(t, e, i, n, s) }, removeTileAtWorldXY: function(t, e, i, n, s, r) { return r = this.getLayer(r), this._isStaticCall(r, "removeTileAtWorldXY") || null === r ? null : h.RemoveTileAtWorldXY(t, e, i, n, s, r) }, renderDebug: function(t, e, i) { return null === (i = this.getLayer(i)) ? null : (h.RenderDebug(t, e, i), this) }, renderDebugFull: function(t, e) { for (var i = this.layers, n = 0; n < i.length; n++) h.RenderDebug(t, e, i[n]); return this }, replaceByIndex: function(t, e, i, n, s, r, o) { return o = this.getLayer(o), this._isStaticCall(o, "replaceByIndex") ? this : null === o ? null : (h.ReplaceByIndex(t, e, i, n, s, r, o), this) }, setCollision: function(t, e, i, n, s) { return null === (n = this.getLayer(n)) ? null : (h.SetCollision(t, e, i, n, s), this) }, setCollisionBetween: function(t, e, i, n, s) { return null === (s = this.getLayer(s)) ? null : (h.SetCollisionBetween(t, e, i, n, s), this) }, setCollisionByProperty: function(t, e, i, n) { return null === (n = this.getLayer(n)) ? null : (h.SetCollisionByProperty(t, e, i, n), this) }, setCollisionByExclusion: function(t, e, i, n) { return null === (n = this.getLayer(n)) ? null : (h.SetCollisionByExclusion(t, e, i, n), this) }, setCollisionFromCollisionGroup: function(t, e, i) { return null === (i = this.getLayer(i)) ? null : (h.SetCollisionFromCollisionGroup(t, e, i), this) }, setTileIndexCallback: function(t, e, i, n) { return null === (n = this.getLayer(n)) ? null : (h.SetTileIndexCallback(t, e, i, n), this) }, setTileLocationCallback: function(t, e, i, n, s, r, o) { return null === (o = this.getLayer(o)) ? null : (h.SetTileLocationCallback(t, e, i, n, s, r, o), this) }, setLayer: function(t) { var e = this.getLayerIndex(t); return null !== e && (this.currentLayerIndex = e), this }, setBaseTileSize: function(t, e) { this.tileWidth = t, this.tileHeight = e, this.widthInPixels = this.width * t, this.heightInPixels = this.height * e; for (var i = 0; i < this.layers.length; i++) { this.layers[i].baseTileWidth = t, this.layers[i].baseTileHeight = e; for (var n = this.layers[i].data, s = this.layers[i].width, r = this.layers[i].height, o = 0; o < r; o++) for (var a = 0; a < s; a++) { var h = n[o][a]; null !== h && h.setSize(void 0, void 0, t, e) } } return this }, setLayerTileSize: function(t, e, i) { if (null === (i = this.getLayer(i))) return this; i.tileWidth = t, i.tileHeight = e; for (var n = i.data, s = i.width, r = i.height, o = 0; o < r; o++) for (var a = 0; a < s; a++) { var h = n[o][a]; null !== h && h.setSize(t, e) } return this }, shuffle: function(t, e, i, n, s) { return s = this.getLayer(s), this._isStaticCall(s, "shuffle") ? this : null === s ? null : (h.Shuffle(t, e, i, n, s), this) }, swapByIndex: function(t, e, i, n, s, r, o) { return o = this.getLayer(o), this._isStaticCall(o, "swapByIndex") ? this : null === o ? null : (h.SwapByIndex(t, e, i, n, s, r, o), this) }, tileToWorldX: function(t, e, i) { return null === (i = this.getLayer(i)) ? null : h.TileToWorldX(t, e, i) }, tileToWorldY: function(t, e, i) { return null === (i = this.getLayer(i)) ? null : h.TileToWorldY(t, e, i) }, tileToWorldXY: function(t, e, i, n, s) { return null === (s = this.getLayer(s)) ? null : h.TileToWorldXY(t, e, i, n, s) }, weightedRandomize: function(t, e, i, n, s, r) { return r = this.getLayer(r), this._isStaticCall(r, "weightedRandomize") ? this : null === r ? null : (h.WeightedRandomize(t, e, i, n, s, r), this) }, worldToTileX: function(t, e, i, n) { return null === (n = this.getLayer(n)) ? null : h.WorldToTileX(t, e, i, n) }, worldToTileY: function(t, e, i, n) { return null === (n = this.getLayer(n)) ? null : h.WorldToTileY(t, e, i, n) }, worldToTileXY: function(t, e, i, n, s, r) { return null === (r = this.getLayer(r)) ? null : h.WorldToTileXY(t, e, i, n, s, r) }, _isStaticCall: function(t, e) { return t.tilemapLayer instanceof o && (console.warn(e + ": You cannot change the tiles in a static tilemap layer"), !0) } }); t.exports = r } , function(t, e, i) { var n = i(0) , s = i(12) , r = i(1345) , o = i(14) , a = i(141) , h = new n({ Extends: o, Mixins: [s.Alpha, s.BlendMode, s.ComputedSize, s.Depth, s.Flip, s.GetBounds, s.Origin, s.Pipeline, s.Transform, s.Visible, s.ScrollFactor, r], initialize: function(t, e, i, n, s, r) { o.call(this, t, "DynamicTilemapLayer"), this.isTilemap = !0, this.tilemap = e, this.layerIndex = i, this.layer = e.layers[i], (this.layer.tilemapLayer = this).tileset = [], this.culledTiles = [], this.skipCull = !1, this.tilesDrawn = 0, this.tilesTotal = this.layer.width * this.layer.height, this.cullPaddingX = 1, this.cullPaddingY = 1, this.cullCallback = a.CullTiles, this._renderOrder = 0, this.gidMap = [], this.setTilesets(n), this.setAlpha(this.layer.alpha), this.setPosition(s, r), this.setOrigin(), this.setSize(e.tileWidth * this.layer.width, e.tileHeight * this.layer.height), this.initPipeline("TextureTintPipeline") }, setTilesets: function(t) { var e = [] , i = [] , n = this.tilemap; Array.isArray(t) || (t = [t]); for (var s = 0; s < t.length; s++) { var r = t[s]; if ("string" == typeof r && (r = n.getTileset(r)), r) { i.push(r); for (var o = r.firstgid, a = 0; a < r.total; a++) e[o + a] = r } } this.gidMap = e, this.tileset = i }, setRenderOrder: function(t) { return "string" == typeof t && (t = ["right-down", "left-down", "right-up", "left-up"].indexOf(t)), 0 <= t && t < 4 && (this._renderOrder = t), this }, calculateFacesAt: function(t, e) { return a.CalculateFacesAt(t, e, this.layer), this }, calculateFacesWithin: function(t, e, i, n) { return a.CalculateFacesWithin(t, e, i, n, this.layer), this }, createFromTiles: function(t, e, i, n, s) { return a.CreateFromTiles(t, e, i, n, s, this.layer) }, cull: function(t) { return this.cullCallback(this.layer, t, this.culledTiles, this._renderOrder) }, copy: function(t, e, i, n, s, r, o) { return a.Copy(t, e, i, n, s, r, o, this.layer), this }, destroy: function(t) { void 0 === t && (t = !0), this.tilemap && (this.layer.tilemapLayer === this && (this.layer.tilemapLayer = void 0), t && this.tilemap.removeLayer(this), this.tilemap = void 0, this.layer = void 0, this.culledTiles.length = 0, this.cullCallback = null, this.gidMap = [], this.tileset = [], o.prototype.destroy.call(this)) }, fill: function(t, e, i, n, s, r) { return a.Fill(t, e, i, n, s, r, this.layer), this }, filterTiles: function(t, e, i, n, s, r, o) { return a.FilterTiles(t, e, i, n, s, r, o, this.layer) }, findByIndex: function(t, e, i) { return a.FindByIndex(t, e, i, this.layer) }, findTile: function(t, e, i, n, s, r, o) { return a.FindTile(t, e, i, n, s, r, o, this.layer) }, forEachTile: function(t, e, i, n, s, r, o) { return a.ForEachTile(t, e, i, n, s, r, o, this.layer), this }, getTileAt: function(t, e, i) { return a.GetTileAt(t, e, i, this.layer) }, getTileAtWorldXY: function(t, e, i, n) { return a.GetTileAtWorldXY(t, e, i, n, this.layer) }, getTilesWithin: function(t, e, i, n, s) { return a.GetTilesWithin(t, e, i, n, s, this.layer) }, getTilesWithinShape: function(t, e, i) { return a.GetTilesWithinShape(t, e, i, this.layer) }, getTilesWithinWorldXY: function(t, e, i, n, s, r) { return a.GetTilesWithinWorldXY(t, e, i, n, s, r, this.layer) }, hasTileAt: function(t, e) { return a.HasTileAt(t, e, this.layer) }, hasTileAtWorldXY: function(t, e, i) { return a.HasTileAtWorldXY(t, e, i, this.layer) }, putTileAt: function(t, e, i, n) { return a.PutTileAt(t, e, i, n, this.layer) }, putTileAtWorldXY: function(t, e, i, n, s) { return a.PutTileAtWorldXY(t, e, i, n, s, this.layer) }, putTilesAt: function(t, e, i, n) { return a.PutTilesAt(t, e, i, n, this.layer), this }, randomize: function(t, e, i, n, s) { return a.Randomize(t, e, i, n, s, this.layer), this }, removeTileAt: function(t, e, i, n) { return a.RemoveTileAt(t, e, i, n, this.layer) }, removeTileAtWorldXY: function(t, e, i, n, s) { return a.RemoveTileAtWorldXY(t, e, i, n, s, this.layer) }, renderDebug: function(t, e) { return a.RenderDebug(t, e, this.layer), this }, replaceByIndex: function(t, e, i, n, s, r) { return a.ReplaceByIndex(t, e, i, n, s, r, this.layer), this }, setSkipCull: function(t) { return void 0 === t && (t = !0), this.skipCull = t, this }, setCullPadding: function(t, e) { return void 0 === t && (t = 1), void 0 === e && (e = 1), this.cullPaddingX = t, this.cullPaddingY = e, this }, setCollision: function(t, e, i, n) { return a.SetCollision(t, e, i, this.layer, n), this }, setCollisionBetween: function(t, e, i, n) { return a.SetCollisionBetween(t, e, i, n, this.layer), this }, setCollisionByProperty: function(t, e, i) { return a.SetCollisionByProperty(t, e, i, this.layer), this }, setCollisionByExclusion: function(t, e, i) { return a.SetCollisionByExclusion(t, e, i, this.layer), this }, setCollisionFromCollisionGroup: function(t, e) { return a.SetCollisionFromCollisionGroup(t, e, this.layer), this }, setTileIndexCallback: function(t, e, i) { return a.SetTileIndexCallback(t, e, i, this.layer), this }, setTileLocationCallback: function(t, e, i, n, s, r) { return a.SetTileLocationCallback(t, e, i, n, s, r, this.layer), this }, shuffle: function(t, e, i, n) { return a.Shuffle(t, e, i, n, this.layer), this }, swapByIndex: function(t, e, i, n, s, r) { return a.SwapByIndex(t, e, i, n, s, r, this.layer), this }, tileToWorldX: function(t, e) { return a.TileToWorldX(t, e, this.layer) }, tileToWorldY: function(t, e) { return a.TileToWorldY(t, e, this.layer) }, tileToWorldXY: function(t, e, i, n) { return a.TileToWorldXY(t, e, i, n, this.layer) }, weightedRandomize: function(t, e, i, n, s) { return a.WeightedRandomize(t, e, i, n, s, this.layer), this }, worldToTileX: function(t, e, i) { return a.WorldToTileX(t, e, i, this.layer) }, worldToTileY: function(t, e, i) { return a.WorldToTileY(t, e, i, this.layer) }, worldToTileXY: function(t, e, i, n, s) { return a.WorldToTileXY(t, e, i, n, s, this.layer) } }); t.exports = h } , function(t, e, i) { var n = i(0) , s = i(12) , o = i(20) , a = i(14) , r = i(1348) , h = i(141) , l = i(29) , L = i(9) , u = new n({ Extends: a, Mixins: [s.Alpha, s.BlendMode, s.ComputedSize, s.Depth, s.Flip, s.GetBounds, s.Origin, s.Pipeline, s.Transform, s.Visible, s.ScrollFactor, r], initialize: function(t, e, i, n, s, r) { a.call(this, t, "StaticTilemapLayer"), this.isTilemap = !0, this.tilemap = e, this.layerIndex = i, this.layer = e.layers[i], (this.layer.tilemapLayer = this).tileset = [], this.culledTiles = [], this.skipCull = !1, this.tilesDrawn = 0, this.tilesTotal = this.layer.width * this.layer.height, this.cullPaddingX = 1, this.cullPaddingY = 1, this.cullCallback = h.CullTiles, this.renderer = t.sys.game.renderer, this.vertexBuffer = [], this.bufferData = [], this.vertexViewF32 = [], this.vertexViewU32 = [], this.dirty = [], this.vertexCount = [], this._renderOrder = 0, this._tempMatrix = new l, this.gidMap = [], this.setTilesets(n), this.setAlpha(this.layer.alpha), this.setPosition(s, r), this.setOrigin(), this.setSize(e.tileWidth * this.layer.width, e.tileHeight * this.layer.height), this.updateVBOData(), this.initPipeline("TextureTintPipeline"), t.sys.game.events.on(o.CONTEXT_RESTORED, function() { this.updateVBOData() }, this) }, setTilesets: function(t) { var e = [] , i = [] , n = this.tilemap; Array.isArray(t) || (t = [t]); for (var s = 0; s < t.length; s++) { var r = t[s]; if ("string" == typeof r && (r = n.getTileset(r)), r) { i.push(r); for (var o = r.firstgid, a = 0; a < r.total; a++) e[o + a] = r } } this.gidMap = e, this.tileset = i }, updateVBOData: function() { for (var t = 0; t < this.tileset.length; t++) this.dirty[t] = !0, this.vertexCount[t] = 0, this.vertexBuffer[t] = null, this.bufferData[t] = null, this.vertexViewF32[t] = null, this.vertexViewU32[t] = null; return this }, upload: function(t, e) { var i = this.renderer , n = i.gl , s = i.pipelines.TextureTintPipeline; if (this.dirty[e]) { var r, o, a, h = this.tileset[e], l = this.layer.width, u = this.layer.height, c = h.image.source[0].width, d = h.image.source[0].height, f = this.layer.data, p = this._renderOrder, g = h.firstgid, v = h.firstgid + h.total, m = this.vertexBuffer[e], y = this.bufferData[e], x = -1, T = l * u * s.vertexSize * 6; if (this.vertexCount[e] = 0, null === y && (y = new ArrayBuffer(T), this.bufferData[e] = y, this.vertexViewF32[e] = new Float32Array(y), this.vertexViewU32[e] = new Uint32Array(y)), 0 === p) for (o = 0; o < u; o++) for (a = 0; a < l; a++) !(r = f[o][a]) || r.index < g || r.index > v || !r.visible || (x = this.batchTile(x, r, h, c, d, t, e)); else if (1 === p) for (o = 0; o < u; o++) for (a = l - 1; 0 <= a; a--) !(r = f[o][a]) || r.index < g || r.index > v || !r.visible || (x = this.batchTile(x, r, h, c, d, t, e)); else if (2 === p) for (o = u - 1; 0 <= o; o--) for (a = 0; a < l; a++) !(r = f[o][a]) || r.index < g || r.index > v || !r.visible || (x = this.batchTile(x, r, h, c, d, t, e)); else if (3 === p) for (o = u - 1; 0 <= o; o--) for (a = l - 1; 0 <= a; a--) !(r = f[o][a]) || r.index < g || r.index > v || !r.visible || (x = this.batchTile(x, r, h, c, d, t, e)); this.dirty[e] = !1, null === m ? (m = i.createVertexBuffer(y, n.STATIC_DRAW), this.vertexBuffer[e] = m) : (i.setVertexBuffer(m), n.bufferSubData(n.ARRAY_BUFFER, 0, y)) } return this }, batchTile: function(t, e, i, n, s, r, o) { var a = i.getTileTextureCoordinates(e.index); if (!a) return t; var h = i.tileWidth , l = i.tileHeight , u = h / 2 , c = l / 2 , d = a.x / n , f = a.y / s , p = (a.x + h) / n , g = (a.y + l) / s , v = this._tempMatrix , m = -u , y = -c; e.flipX && (h *= -1, m += i.tileWidth), e.flipY && (l *= -1, y += i.tileHeight); var x = m + h , T = y + l; v.applyITRS(u + e.pixelX, c + e.pixelY, e.rotation, 1, 1); var w = L.getTintAppendFloatAlpha(16777215, r.alpha * this.alpha * e.alpha) , b = v.getX(m, y) , E = v.getY(m, y) , S = v.getX(m, T) , _ = v.getY(m, T) , A = v.getX(x, T) , C = v.getY(x, T) , M = v.getX(x, y) , P = v.getY(x, y); r.roundPixels && (b = Math.round(b), E = Math.round(E), S = Math.round(S), _ = Math.round(_), A = Math.round(A), C = Math.round(C), M = Math.round(M), P = Math.round(P)); var O = this.vertexViewF32[o] , R = this.vertexViewU32[o]; return O[++t] = b, O[++t] = E, O[++t] = d, O[++t] = f, O[++t] = 0, R[++t] = w, O[++t] = S, O[++t] = _, O[++t] = d, O[++t] = g, O[++t] = 0, R[++t] = w, O[++t] = A, O[++t] = C, O[++t] = p, O[++t] = g, O[++t] = 0, R[++t] = w, O[++t] = b, O[++t] = E, O[++t] = d, O[++t] = f, O[++t] = 0, R[++t] = w, O[++t] = A, O[++t] = C, O[++t] = p, O[++t] = g, O[++t] = 0, R[++t] = w, O[++t] = M, O[++t] = P, O[++t] = p, O[++t] = f, O[++t] = 0, R[++t] = w, this.vertexCount[o] += 6, t }, setRenderOrder: function(t) { if ("string" == typeof t && (t = ["right-down", "left-down", "right-up", "left-up"].indexOf(t)), 0 <= t && t < 4) { this._renderOrder = t; for (var e = 0; e < this.tileset.length; e++) this.dirty[e] = !0 } return this }, calculateFacesAt: function(t, e) { return h.CalculateFacesAt(t, e, this.layer), this }, calculateFacesWithin: function(t, e, i, n) { return h.CalculateFacesWithin(t, e, i, n, this.layer), this }, createFromTiles: function(t, e, i, n, s) { return h.CreateFromTiles(t, e, i, n, s, this.layer) }, cull: function(t) { return this.cullCallback(this.layer, t, this.culledTiles) }, setSkipCull: function(t) { return void 0 === t && (t = !0), this.skipCull = t, this }, setCullPadding: function(t, e) { return void 0 === t && (t = 1), void 0 === e && (e = 1), this.cullPaddingX = t, this.cullPaddingY = e, this }, findByIndex: function(t, e, i) { return h.FindByIndex(t, e, i, this.layer) }, findTile: function(t, e, i, n, s, r, o) { return h.FindTile(t, e, i, n, s, r, o, this.layer) }, filterTiles: function(t, e, i, n, s, r, o) { return h.FilterTiles(t, e, i, n, s, r, o, this.layer) }, forEachTile: function(t, e, i, n, s, r, o) { return h.ForEachTile(t, e, i, n, s, r, o, this.layer), this }, getTileAt: function(t, e, i) { return h.GetTileAt(t, e, i, this.layer) }, getTileAtWorldXY: function(t, e, i, n) { return h.GetTileAtWorldXY(t, e, i, n, this.layer) }, getTilesWithin: function(t, e, i, n, s) { return h.GetTilesWithin(t, e, i, n, s, this.layer) }, getTilesWithinWorldXY: function(t, e, i, n, s, r) { return h.GetTilesWithinWorldXY(t, e, i, n, s, r, this.layer) }, getTilesWithinShape: function(t, e, i) { return h.GetTilesWithinShape(t, e, i, this.layer) }, hasTileAt: function(t, e) { return h.HasTileAt(t, e, this.layer) }, hasTileAtWorldXY: function(t, e, i) { return h.HasTileAtWorldXY(t, e, i, this.layer) }, renderDebug: function(t, e) { return h.RenderDebug(t, e, this.layer), this }, setCollision: function(t, e, i, n) { return h.SetCollision(t, e, i, this.layer, n), this }, setCollisionBetween: function(t, e, i, n) { return h.SetCollisionBetween(t, e, i, n, this.layer), this }, setCollisionByProperty: function(t, e, i) { return h.SetCollisionByProperty(t, e, i, this.layer), this }, setCollisionByExclusion: function(t, e, i) { return h.SetCollisionByExclusion(t, e, i, this.layer), this }, setTileIndexCallback: function(t, e, i) { return h.SetTileIndexCallback(t, e, i, this.layer), this }, setCollisionFromCollisionGroup: function(t, e) { return h.SetCollisionFromCollisionGroup(t, e, this.layer), this }, setTileLocationCallback: function(t, e, i, n, s, r) { return h.SetTileLocationCallback(t, e, i, n, s, r, this.layer), this }, tileToWorldX: function(t, e) { return h.TileToWorldX(t, e, this.layer) }, tileToWorldY: function(t, e) { return h.TileToWorldY(t, e, this.layer) }, tileToWorldXY: function(t, e, i, n) { return h.TileToWorldXY(t, e, i, n, this.layer) }, worldToTileX: function(t, e, i) { return h.WorldToTileX(t, e, i, this.layer) }, worldToTileY: function(t, e, i) { return h.WorldToTileY(t, e, i, this.layer) }, worldToTileXY: function(t, e, i, n, s) { return h.WorldToTileXY(t, e, i, n, s, this.layer) }, destroy: function(t) { if (void 0 === t && (t = !0), this.tilemap) { this.layer.tilemapLayer === this && (this.layer.tilemapLayer = void 0), t && this.tilemap.removeLayer(this), this.tilemap = void 0, this.layer = void 0, this.culledTiles.length = 0, this.cullCallback = null; for (var e = 0; e < this.tileset.length; e++) this.dirty[e] = !0, this.vertexCount[e] = 0, this.vertexBuffer[e] = null, this.bufferData[e] = null, this.vertexViewF32[e] = null, this.vertexViewU32[e] = null; this.gidMap = [], this.tileset = [], a.prototype.destroy.call(this) } } }); t.exports = u } , function(t, e, i) { var n = i(0) , s = i(2) , r = new n({ initialize: function(t) { this.delay = 0, this.repeat = 0, this.repeatCount = 0, this.loop = !1, this.callback, this.callbackScope, this.args, this.timeScale = 1, this.startAt = 0, this.elapsed = 0, this.paused = !1, this.hasDispatched = !1, this.reset(t) }, reset: function(t) { return this.delay = s(t, "delay", 0), this.repeat = s(t, "repeat", 0), this.loop = s(t, "loop", !1), this.callback = s(t, "callback", void 0), this.callbackScope = s(t, "callbackScope", this.callback), this.args = s(t, "args", []), this.timeScale = s(t, "timeScale", 1), this.startAt = s(t, "startAt", 0), this.paused = s(t, "paused", !1), this.elapsed = this.startAt, this.hasDispatched = !1, this.repeatCount = -1 === this.repeat || this.loop ? 999999999999 : this.repeat, this }, getProgress: function() { return this.elapsed / this.delay }, getOverallProgress: function() { if (0 < this.repeat) { var t = this.delay + this.delay * this.repeat; return (this.elapsed + this.delay * (this.repeat - this.repeatCount)) / t } return this.getProgress() }, getRepeatCount: function() { return this.repeatCount }, getElapsed: function() { return this.elapsed }, getElapsedSeconds: function() { return .001 * this.elapsed }, remove: function(t) { void 0 === t && (t = !1), this.elapsed = this.delay, this.hasDispatched = !t, this.repeatCount = 0 }, destroy: function() { this.callback = void 0, this.callbackScope = void 0, this.args = [] } }); t.exports = r } , function(t, e, i) { var n = i(1357); t.exports = function(t) { var e, i = []; if (t.hasOwnProperty("props")) for (e in t.props) "_" !== e.substr(0, 1) && i.push({ key: e, value: t.props[e] }); else for (e in t) -1 === n.indexOf(e) && "_" !== e.substr(0, 1) && i.push({ key: e, value: t[e] }); return i } } , function(t, e, i) { var n = i(6); t.exports = function(t) { var e = n(t, "tweens", null); return null === e ? [] : ("function" == typeof e && (e = e.call()), Array.isArray(e) || (e = [e]), e) } } , function(t, e, i) { var A = i(230) , C = i(15) , M = i(88) , P = i(69) , O = i(145) , R = i(6) , L = i(229) , k = i(231) , D = i(233); t.exports = function(t, e, i) { void 0 === i && (i = A); var n = R(e, "from", 0) , s = R(e, "to", 1) , r = [{ value: n }] , o = O(e, "delay", i.delay) , a = O(e, "duration", i.duration) , h = R(e, "easeParams", i.easeParams) , l = P(R(e, "ease", i.ease), h) , u = O(e, "hold", i.hold) , c = O(e, "repeat", i.repeat) , d = O(e, "repeatDelay", i.repeatDelay) , f = M(e, "yoyo", i.yoyo) , p = [] , g = L("value", s) , v = D(r[0], 0, "value", g.getEnd, g.getStart, g.getActive, l, o, a, f, u, c, d, !1, !1); v.start = n, v.current = n, v.to = s, p.push(v); var m = new k(t,p,r); m.offset = C(e, "offset", null), m.completeDelay = C(e, "completeDelay", 0), m.loop = Math.round(C(e, "loop", 0)), m.loopDelay = Math.round(C(e, "loopDelay", 0)), m.paused = M(e, "paused", !1), m.useFrames = M(e, "useFrames", !1); for (var y = R(e, "callbackScope", m), x = [m, null], T = k.TYPES, w = 0; w < T.length; w++) { var b, E, S = T[w], _ = R(e, S, !1); _ && (b = R(e, S + "Scope", y), E = R(e, S + "Params", []), m.setCallback(S, _, x.concat(E), b)) } return m } } , function(t, e, i) { var A = i(69) , C = i(6) , M = i(13); t.exports = function(t, e) { void 0 === e && (e = {}); var h = C(e, "start", 0) , i = C(e, "ease", null) , n = C(e, "grid", null) , a = C(e, "from", 0) , l = "first" === a , u = "center" === a , c = "last" === a , d = "number" == typeof a , f = Array.isArray(t) , p = f ? parseFloat(t[0]) : parseFloat(t) , g = f ? parseFloat(t[1]) : 0 , v = Math.max(p, g); if (f && (h += p), n) { var s, r, m = n[0], y = n[1], o = 0, x = 0, T = []; c ? (o = m - 1, x = y - 1) : d ? (o = a % m, x = Math.floor(a / m)) : u && (o = (m - 1) / 2, x = (y - 1) / 2); for (var w = M.MIN_SAFE_INTEGER, b = 0; b < y; b++) { T[b] = []; for (var E = 0; E < m; E++) { s = o - E, r = x - b; var S = Math.sqrt(s * s + r * r); w < S && (w = S), T[b][E] = S } } } var _ = i ? A(i) : null; return n ? function(t, e, i, n) { var s, r = 0, o = n % m, a = Math.floor(n / m); return 0 <= o && o < m && 0 <= a && a < y && (r = T[a][o]), (f ? (s = g - p, _ ? r / w * s * _(r / w) : r / w * s) : _ ? r * p * _(r / w) : r * p) + h } : function(t, e, i, n, s) { var r, o; return s--, l ? r = n : u ? r = Math.abs(s / 2 - n) : c ? r = s - n : d && (r = Math.abs(a - n)), (f ? (o = u ? (g - p) / s * (2 * r) : (g - p) / s * r, _ ? o * _(r / s) : o) : _ ? s * v * _(r / s) : r * p) + h } } } , function(t, e, i) { var S = i(67) , _ = i(230) , A = i(15) , C = i(88) , M = i(69) , P = i(145) , O = i(228) , R = i(499) , L = i(6) , k = i(503) , D = i(146); t.exports = function(t, e) { var i = new k(t); i.completeDelay = A(e, "completeDelay", 0), i.loop = Math.round(A(e, "loop", 0)), i.loopDelay = Math.round(A(e, "loopDelay", 0)), i.paused = C(e, "paused", !1), i.useFrames = C(e, "useFrames", !1); var n, s, r = L(e, "callbackScope", i), o = [i], a = L(e, "onStart", !1); a && (n = L(e, "onStartScope", r), s = L(e, "onStartParams", []), i.setCallback("onStart", a, o.concat(s), n)); var h, l, u = L(e, "onUpdate", !1); u && (h = L(e, "onUpdateScope", r), l = L(e, "onUpdateParams", []), i.setCallback("onUpdate", u, o.concat(l), h)); var c, d, f = L(e, "onLoop", !1); f && (c = L(e, "onLoopScope", r), d = L(e, "onLoopParams", []), i.setCallback("onLoop", f, o.concat(d), c)); var p, g, v = L(e, "onYoyo", !1); v && (p = L(e, "onYoyoScope", r), g = L(e, "onYoyoParams", []), i.setCallback("onYoyo", v, o.concat(null, g), p)); var m, y, x = L(e, "onComplete", !1); x && (m = L(e, "onCompleteScope", r), y = L(e, "onCompleteParams", []), i.setCallback("onComplete", x, o.concat(y), m)); var T = R(e); if (0 === T.length) return i.paused = !0, i; var w = S(_); w.targets = O(e); var b = A(e, "totalDuration", 0); w.duration = 0 < b ? Math.floor(b / T.length) : P(e, "duration", w.duration), w.delay = P(e, "delay", w.delay), w.easeParams = L(e, "easeParams", w.easeParams), w.ease = M(L(e, "ease", w.ease), w.easeParams), w.hold = P(e, "hold", w.hold), w.repeat = P(e, "repeat", w.repeat), w.repeatDelay = P(e, "repeatDelay", w.repeatDelay), w.yoyo = C(e, "yoyo", w.yoyo), w.flipX = C(e, "flipX", w.flipX), w.flipY = C(e, "flipY", w.flipY); for (var E = 0; E < T.length; E++) i.queue(D(i, T[E], w)); return i } } , function(t, e, i) { var n = i(0) , s = i(10) , r = i(232) , o = i(146) , a = i(89) , h = new n({ Extends: s, initialize: function(t) { s.call(this), this.manager = t, this.isTimeline = !0, this.data = [], this.totalData = 0, this.useFrames = !1, this.timeScale = 1, this.loop = 0, this.loopDelay = 0, this.loopCounter = 0, this.completeDelay = 0, this.countdown = 0, this.state = a.PENDING_ADD, this._pausedState = a.PENDING_ADD, this.paused = !1, this.elapsed = 0, this.totalElapsed = 0, this.duration = 0, this.progress = 0, this.totalDuration = 0, this.totalProgress = 0, this.callbacks = { onComplete: null, onLoop: null, onStart: null, onUpdate: null, onYoyo: null }, this.callbackScope }, dispatchTimelineEvent: function(t, e) { this.emit(t, this), e && e.func.apply(e.scope, e.params) }, setTimeScale: function(t) { return this.timeScale = t, this }, getTimeScale: function() { return this.timeScale }, isPlaying: function() { return this.state === a.ACTIVE }, add: function(t) { return this.queue(o(this, t)) }, queue: function(t) { return this.isPlaying() || (t.parent = this, t.parentIsTimeline = !0, this.data.push(t), this.totalData = this.data.length), this }, hasOffset: function(t) { return null !== t.offset }, isOffsetAbsolute: function(t) { return "number" == typeof t }, isOffsetRelative: function(t) { if ("string" == typeof t) { var e = t[0]; if ("-" === e || "+" === e) return !0 } return !1 }, getRelativeOffset: function(t, e) { var i = t[0] , n = parseFloat(t.substr(2)) , s = e; switch (i) { case "+": s += n; break; case "-": s -= n } return Math.max(0, s) }, calcDuration: function() { for (var t = 0, e = 0, i = 0, n = 0; n < this.totalData; n++) { var s = this.data[n]; s.init(), this.hasOffset(s) ? this.isOffsetAbsolute(s.offset) ? (s.calculatedOffset = s.offset, 0 === s.offset && (i = 0)) : this.isOffsetRelative(s.offset) && (s.calculatedOffset = this.getRelativeOffset(s.offset, t)) : s.calculatedOffset = i, t = s.totalDuration + s.calculatedOffset, e += s.totalDuration, i += s.totalDuration } this.duration = e, this.loopCounter = -1 === this.loop ? 999999999999 : this.loop, 0 < this.loopCounter ? this.totalDuration = this.duration + this.completeDelay + (this.duration + this.loopDelay) * this.loopCounter : this.totalDuration = this.duration + this.completeDelay }, init: function() { return this.calcDuration(), this.progress = 0, this.totalProgress = 0, !this.paused || (this.state = a.PAUSED, !1) }, resetTweens: function(t) { for (var e = 0; e < this.totalData; e++) { this.data[e].play(t) } }, setCallback: function(t, e, i, n) { return -1 !== h.TYPES.indexOf(t) && (this.callbacks[t] = { func: e, scope: n, params: i }), this }, makeActive: function(t) { return this.manager.makeActive(t) }, play: function() { if (this.state !== a.ACTIVE) { if (this.paused) return this.paused = !1, void this.manager.makeActive(this); this.resetTweens(!1), this.state = a.ACTIVE, this.dispatchTimelineEvent(r.TIMELINE_START, this.callbacks.onStart) } }, nextState: function() { 0 < this.loopCounter ? (this.elapsed = 0, this.progress = 0, this.loopCounter--, this.resetTweens(!0), 0 < this.loopDelay ? (this.countdown = this.loopDelay, this.state = a.LOOP_DELAY) : (this.state = a.ACTIVE, this.dispatchTimelineEvent(r.TIMELINE_LOOP, this.callbacks.onLoop))) : 0 < this.completeDelay ? (this.state = a.COMPLETE_DELAY, this.countdown = this.completeDelay) : (this.state = a.PENDING_REMOVE, this.dispatchTimelineEvent(r.TIMELINE_COMPLETE, this.callbacks.onComplete)) }, update: function(t, e) { if (this.state !== a.PAUSED) { switch (this.useFrames && (e = +this.manager.timeScale), e *= this.timeScale, this.elapsed += e, this.progress = Math.min(this.elapsed / this.duration, 1), this.totalElapsed += e, this.totalProgress = Math.min(this.totalElapsed / this.totalDuration, 1), this.state) { case a.ACTIVE: for (var i = this.totalData, n = 0; n < this.totalData; n++) { this.data[n].update(t, e) && i-- } this.dispatchTimelineEvent(r.TIMELINE_UPDATE, this.callbacks.onUpdate), 0 === i && this.nextState(); break; case a.LOOP_DELAY: this.countdown -= e, this.countdown <= 0 && (this.state = a.ACTIVE, this.dispatchTimelineEvent(r.TIMELINE_LOOP, this.callbacks.onLoop)); break; case a.COMPLETE_DELAY: this.countdown -= e, this.countdown <= 0 && (this.state = a.PENDING_REMOVE, this.dispatchTimelineEvent(r.TIMELINE_COMPLETE, this.callbacks.onComplete)) } return this.state === a.PENDING_REMOVE } }, stop: function() { this.state = a.PENDING_REMOVE }, pause: function() { if (this.state !== a.PAUSED) return this.paused = !0, this._pausedState = this.state, this.state = a.PAUSED, this.emit(r.TIMELINE_PAUSE, this), this }, resume: function() { return this.state === a.PAUSED && (this.paused = !1, this.state = this._pausedState, this.emit(r.TIMELINE_RESUME, this)), this }, hasTarget: function(t) { for (var e = 0; e < this.data.length; e++) if (this.data[e].hasTarget(t)) return !0; return !1 }, destroy: function() { for (var t = 0; t < this.data.length; t++) this.data[t].stop() } }); h.TYPES = ["onStart", "onUpdate", "onLoop", "onComplete", "onYoyo"], t.exports = h } , function(t, e, i) { var n = i(151) , s = i(0) , r = i(111) , o = new s({ initialize: function(t) { this.parent = t, this.animationManager = t.scene.sys.anims, this.animationManager.once(r.REMOVE_ANIMATION, this.remove, this), this.isPlaying = !1, this.currentAnim = null, this.currentFrame = null, this.nextAnim = null, this.nextAnimsQueue = [], this._timeScale = 1, this.frameRate = 0, this.duration = 0, this.msPerFrame = 0, this.skipMissedFrames = !0, this._delay = 0, this._repeat = 0, this._repeatDelay = 0, this._yoyo = !1, this.forward = !0, this._reverse = !1, this.accumulator = 0, this.nextTick = 0, this.repeatCounter = 0, this.pendingRepeat = !1, this._paused = !1, this._wasPlaying = !1, this._pendingStop = 0, this._pendingStopValue }, chain: function(t) { return t instanceof n && (t = t.key), null === this.nextAnim ? this.nextAnim = t : this.nextAnimsQueue.push(t), this.parent }, setDelay: function(t) { return void 0 === t && (t = 0), this._delay = t, this.parent }, getDelay: function() { return this._delay }, delayedPlay: function(t, e, i) { return this.play(e, !0, i), this.nextTick += t, this.parent }, getCurrentKey: function() { if (this.currentAnim) return this.currentAnim.key }, load: function(t, e) { return void 0 === e && (e = 0), this.isPlaying && this.stop(), this.animationManager.load(this, t, e), this.parent }, pause: function(t) { return this._paused || (this._paused = !0, this._wasPlaying = this.isPlaying, this.isPlaying = !1), void 0 !== t && this.updateFrame(t), this.parent }, resume: function(t) { return this._paused && (this._paused = !1, this.isPlaying = this._wasPlaying), void 0 !== t && this.updateFrame(t), this.parent }, isPaused: { get: function() { return this._paused } }, play: function(t, e, i) { return void 0 === e && (e = !1), void 0 === i && (i = 0), t instanceof n && (t = t.key), e && this.isPlaying && this.currentAnim.key === t ? this.parent : (this.forward = !0, this._reverse = !1, this._paused = !1, this._wasPlaying = !0, this._startAnimation(t, i)) }, playReverse: function(t, e, i) { return void 0 === e && (e = !1), void 0 === i && (i = 0), t instanceof n && (t = t.key), e && this.isPlaying && this.currentAnim.key === t ? this.parent : (this.forward = !1, this._reverse = !0, this._startAnimation(t, i)) }, _startAnimation: function(t, e) { this.load(t, e); var i = this.currentAnim , n = this.parent; if (!i) return n; this.repeatCounter = -1 === this._repeat ? Number.MAX_VALUE : this._repeat, i.getFirstTick(this), this.isPlaying = !0, this.pendingRepeat = !1, i.showOnStart && (n.visible = !0); var s = this.currentFrame; return i.emit(r.ANIMATION_START, i, s, n), n.emit(r.SPRITE_ANIMATION_KEY_START + t, i, s, n), n.emit(r.SPRITE_ANIMATION_START, i, s, n), n }, reverse: function() { return this.isPlaying && (this._reverse = !this._reverse, this.forward = !this.forward), this.parent }, getProgress: function() { var t = this.currentFrame.progress; return this.forward || (t = 1 - t), t }, setProgress: function(t) { return this.forward || (t = 1 - t), this.setCurrentFrame(this.currentAnim.getFrameByProgress(t)), this.parent }, remove: function(t, e) { void 0 === e && (e = this.currentAnim), this.isPlaying && e.key === this.currentAnim.key && (this.stop(), this.setCurrentFrame(this.currentAnim.frames[0])) }, getRepeat: function() { return this._repeat }, setRepeat: function(t) { return this._repeat = t, this.repeatCounter = -1 === t ? Number.MAX_VALUE : t, this.parent }, getRepeatDelay: function() { return this._repeatDelay }, setRepeatDelay: function(t) { return this._repeatDelay = t, this.parent }, restart: function(t) { void 0 === t && (t = !1); var e = this.currentAnim; e.getFirstTick(this, t), this.forward = !0, this.isPlaying = !0, this.pendingRepeat = !1, this._paused = !1, this.updateFrame(e.frames[0]); var i = this.parent , n = this.currentFrame; return e.emit(r.ANIMATION_RESTART, e, n, i), i.emit(r.SPRITE_ANIMATION_KEY_RESTART + e.key, e, n, i), i.emit(r.SPRITE_ANIMATION_RESTART, e, n, i), this.parent }, stop: function() { this._pendingStop = 0, this.isPlaying = !1; var t, e = this.parent, i = this.currentAnim, n = this.currentFrame; return i && (i.emit(r.ANIMATION_COMPLETE, i, n, e), e.emit(r.SPRITE_ANIMATION_KEY_COMPLETE + i.key, i, n, e), e.emit(r.SPRITE_ANIMATION_COMPLETE, i, n, e)), this.nextAnim && (t = this.nextAnim, this.nextAnim = 0 < this.nextAnimsQueue.length ? this.nextAnimsQueue.shift() : null, this.play(t)), e }, stopAfterDelay: function(t) { return this._pendingStop = 1, this._pendingStopValue = t, this.parent }, stopOnRepeat: function() { return this._pendingStop = 2, this.parent }, stopOnFrame: function(t) { return this._pendingStop = 3, this._pendingStopValue = t, this.parent }, setTimeScale: function(t) { return void 0 === t && (t = 1), this._timeScale = t, this.parent }, getTimeScale: function() { return this._timeScale }, getTotalFrames: function() { return this.currentAnim.frames.length }, update: function(t, e) { if (this.currentAnim && this.isPlaying && !this.currentAnim.paused) { if (this.accumulator += e * this._timeScale, 1 === this._pendingStop && (this._pendingStopValue -= e, this._pendingStopValue <= 0)) return this.currentAnim.completeAnimation(this); this.accumulator >= this.nextTick && this.currentAnim.setFrame(this) } }, setCurrentFrame: function(t) { var e = this.parent; return this.currentFrame = t, e.texture = t.frame.texture, e.frame = t.frame, e.isCropped && e.frame.updateCropUVs(e._crop, e.flipX, e.flipY), e.setSizeToFrame(), e._originComponent && (t.frame.customPivot ? e.setOrigin(t.frame.pivotX, t.frame.pivotY) : e.updateDisplayOrigin()), e }, updateFrame: function(t) { var e, i = this.setCurrentFrame(t); this.isPlaying && (t.setAlpha && (i.alpha = t.alpha), e = this.currentAnim, i.emit(r.SPRITE_ANIMATION_KEY_UPDATE + e.key, e, t, i), i.emit(r.SPRITE_ANIMATION_UPDATE, e, t, i), 3 === this._pendingStop && this._pendingStopValue === t && this.currentAnim.completeAnimation(this)) }, nextFrame: function() { return this.currentAnim && this.currentAnim.nextFrame(this), this.parent }, previousFrame: function() { return this.currentAnim && this.currentAnim.previousFrame(this), this.parent }, setYoyo: function(t) { return void 0 === t && (t = !1), this._yoyo = t, this.parent }, getYoyo: function() { return this._yoyo }, destroy: function() { this.animationManager.off(r.REMOVE_ANIMATION, this.remove, this), this.animationManager = null, this.parent = null, this.nextAnimsQueue.length = 0, this.currentAnim = null, this.currentFrame = null } }); t.exports = o } , function(t, e, i) { var u = i(506) , p = i(40) , n = i(0) , s = i(33) , r = i(507) , o = i(92) , a = i(29) , h = new n({ initialize: function(t) { this.game = t, this.type = s.CANVAS, this.drawCount = 0, this.width = 0, this.height = 0, this.config = { clearBeforeRender: t.config.clearBeforeRender, backgroundColor: t.config.backgroundColor, resolution: t.config.resolution, antialias: t.config.antialias, roundPixels: t.config.roundPixels }, this.gameCanvas = t.canvas; var e = { alpha: t.config.transparent, desynchronized: t.config.desynchronized }; this.gameContext = this.game.config.context ? this.game.config.context : this.gameCanvas.getContext("2d", e), this.currentContext = this.gameContext, this.antialias = t.config.antialias, this.blendModes = r(), this.snapshotState = { x: 0, y: 0, width: 1, height: 1, getPixel: !1, callback: null, type: "image/png", encoder: .92 }, this._tempMatrix1 = new a, this._tempMatrix2 = new a, this._tempMatrix3 = new a, this._tempMatrix4 = new a, this.init() }, init: function() { this.game.scale.on(o.RESIZE, this.onResize, this); var t = this.game.scale.baseSize; this.resize(t.width, t.height) }, onResize: function(t, e) { e.width === this.width && e.height === this.height || this.resize(e.width, e.height) }, resize: function(t, e) { this.width = t, this.height = e }, resetTransform: function() { this.currentContext.setTransform(1, 0, 0, 1, 0, 0) }, setBlendMode: function(t) { return this.currentContext.globalCompositeOperation = t, this }, setContext: function(t) { return this.currentContext = t || this.gameContext, this }, setAlpha: function(t) { return this.currentContext.globalAlpha = t, this }, preRender: function() { var t = this.gameContext , e = this.config , i = this.width , n = this.height; t.globalAlpha = 1, t.globalCompositeOperation = "source-over", t.setTransform(1, 0, 0, 1, 0, 0), e.clearBeforeRender && t.clearRect(0, 0, i, n), e.transparent || (t.fillStyle = e.backgroundColor.rgba, t.fillRect(0, 0, i, n)), t.save(), this.drawCount = 0 }, render: function(t, e, i, n) { var s = e.list , r = s.length , o = n._cx , a = n._cy , h = n._cw , l = n._ch , u = n.renderToTexture ? n.context : t.sys.context; u.save(), this.game.scene.customViewports && (u.beginPath(), u.rect(o, a, h, l), u.clip()), this.currentContext = u; var c = n.mask; c && c.preRenderCanvas(this, null, n._maskCamera), n.transparent || (u.fillStyle = n.backgroundColor.rgba, u.fillRect(o, a, h, l)), u.globalAlpha = n.alpha, u.globalCompositeOperation = "source-over", this.drawCount += s.length, n.renderToTexture && n.emit(p.PRE_RENDER, n), n.matrix.copyToContext(u); for (var d = 0; d < r; d++) { var f = s[d]; f.willRender(n) && (f.mask && f.mask.preRenderCanvas(this, f, n), f.renderCanvas(this, f, i, n), f.mask && f.mask.postRenderCanvas(this, f, n)) } u.setTransform(1, 0, 0, 1, 0, 0), u.globalCompositeOperation = "source-over", u.globalAlpha = 1, n.flashEffect.postRenderCanvas(u), n.fadeEffect.postRenderCanvas(u), n.dirty = !1, c && c.postRenderCanvas(this), u.restore(), n.renderToTexture && (n.emit(p.POST_RENDER, n), n.renderToGame && t.sys.context.drawImage(n.canvas, o, a)) }, postRender: function() { this.gameContext.restore(); var t = this.snapshotState; t.callback && (u(this.gameCanvas, t), t.callback = null) }, snapshotCanvas: function(t, e, i, n, s, r, o, a, h) { void 0 === i && (i = !1), this.snapshotArea(n, s, r, o, e, a, h); var l = this.snapshotState; return l.getPixel = i, u(this.canvas, l), l.callback = null, this }, snapshot: function(t, e, i) { return this.snapshotArea(0, 0, this.gameCanvas.width, this.gameCanvas.height, t, e, i) }, snapshotArea: function(t, e, i, n, s, r, o) { var a = this.snapshotState; return a.callback = s, a.type = r, a.encoder = o, a.getPixel = !1, a.x = t, a.y = e, a.width = Math.min(i, this.gameCanvas.width), a.height = Math.min(n, this.gameCanvas.height), this }, snapshotPixel: function(t, e, i) { return this.snapshotArea(t, e, 1, 1, i), this.snapshotState.getPixel = !0, this }, batchSprite: function(t, e, i, n) { var s, r, o, a, h, l, u, c, d, f, p, g, v, m, y, x, T, w, b = i.alpha * t.alpha; 0 != b && (s = this.currentContext, r = this._tempMatrix1, o = this._tempMatrix2, a = this._tempMatrix3, l = (h = e.canvasData).x, u = h.y, c = e.cutWidth, d = e.cutHeight, f = e.customPivot, p = e.source.resolution, g = t.displayOriginX, v = t.displayOriginY, m = -g + e.x, y = -v + e.y, t.isCropped && ((x = t._crop).flipX === t.flipX && x.flipY === t.flipY || e.updateCropUVs(x, t.flipX, t.flipY), c = x.cw, d = x.ch, l = x.cx, u = x.cy, m = -g + x.x, y = -v + x.y, t.flipX && (0 <= m ? m = -(m + c) : m < 0 && (m = Math.abs(m) - c)), t.flipY && (0 <= y ? y = -(y + d) : y < 0 && (y = Math.abs(y) - d))), w = T = 1, t.flipX && (f || (m += -e.realWidth + 2 * g), T = -1), t.flipY && (f || (y += -e.realHeight + 2 * v), w = -1), o.applyITRS(t.x, t.y, t.rotation, t.scaleX * T, t.scaleY * w), r.copyFrom(i.matrix), n ? (r.multiplyWithOffset(n, -i.scrollX * t.scrollFactorX, -i.scrollY * t.scrollFactorY), o.e = t.x, o.f = t.y) : (o.e -= i.scrollX * t.scrollFactorX, o.f -= i.scrollY * t.scrollFactorY), r.multiply(o, a), s.save(), a.setToContext(s), s.globalCompositeOperation = this.blendModes[t.blendMode], s.globalAlpha = b, s.imageSmoothingEnabled = !(!this.antialias || e.source.scaleMode), t.mask && t.mask.preRenderCanvas(this, t, i), s.drawImage(e.source.image, l, u, c, d, m, y, c / p, d / p), t.mask && t.mask.postRenderCanvas(this, t, i), s.restore()) }, destroy: function() { this.gameCanvas = null, this.gameContext = null, this.game = null } }); t.exports = h } , function(t, e, i) { var f = i(26) , p = i(31) , g = i(2); t.exports = function(t, e) { var i, n, s, r, o = g(e, "callback"), a = g(e, "type", "image/png"), h = g(e, "encoder", .92), l = Math.abs(Math.round(g(e, "x", 0))), u = Math.abs(Math.round(g(e, "y", 0))), c = g(e, "width", t.width), d = g(e, "height", t.height); g(e, "getPixel", !1) ? (i = t.getContext("2d").getImageData(l, u, 1, 1).data, o.call(null, new p(i[0],i[1],i[2],i[3] / 255))) : 0 !== l || 0 !== u || c !== t.width || d !== t.height ? ((n = f.createWebGL(this, c, d)).getContext("2d").drawImage(t, l, u, c, d, 0, 0, c, d), (s = new Image).onerror = function() { o.call(null), f.remove(n) } , s.onload = function() { o.call(null, s), f.remove(n) } , s.src = n.toDataURL(a, h)) : ((r = new Image).onerror = function() { o.call(null) } , r.onload = function() { o.call(null, r) } , r.src = t.toDataURL(a, h)) } } , function(t, e, i) { var n = i(52) , s = i(316); t.exports = function() { var t = [] , e = s.supportNewBlendModes , i = "source-over"; return t[n.NORMAL] = i, t[n.ADD] = "lighter", t[n.MULTIPLY] = e ? "multiply" : i, t[n.SCREEN] = e ? "screen" : i, t[n.OVERLAY] = e ? "overlay" : i, t[n.DARKEN] = e ? "darken" : i, t[n.LIGHTEN] = e ? "lighten" : i, t[n.COLOR_DODGE] = e ? "color-dodge" : i, t[n.COLOR_BURN] = e ? "color-burn" : i, t[n.HARD_LIGHT] = e ? "hard-light" : i, t[n.SOFT_LIGHT] = e ? "soft-light" : i, t[n.DIFFERENCE] = e ? "difference" : i, t[n.EXCLUSION] = e ? "exclusion" : i, t[n.HUE] = e ? "hue" : i, t[n.SATURATION] = e ? "saturation" : i, t[n.COLOR] = e ? "color" : i, t[n.LUMINOSITY] = e ? "luminosity" : i, t[n.ERASE] = "destination-out", t[n.SOURCE_IN] = "source-in", t[n.SOURCE_OUT] = "source-out", t[n.SOURCE_ATOP] = "source-atop", t[n.DESTINATION_OVER] = "destination-over", t[n.DESTINATION_IN] = "destination-in", t[n.DESTINATION_OUT] = "destination-out", t[n.DESTINATION_ATOP] = "destination-atop", t[n.LIGHTER] = "lighter", t[n.COPY] = "copy", t[n.XOR] = "xor", t } } , function(t, e, i) { var n = i(91) , h = i(40) , s = i(0) , f = i(33) , c = i(20) , p = i(120) , r = i(1) , o = i(92) , a = i(80) , d = i(121) , l = i(29) , u = i(9) , g = i(509) , v = i(510) , m = i(511) , y = i(237) , x = i(512) , T = new s({ initialize: function(t) { var e = t.config , i = { alpha: e.transparent, desynchronized: e.desynchronized, depth: !1, antialias: e.antialiasGL, premultipliedAlpha: e.premultipliedAlpha, stencil: !0, failIfMajorPerformanceCaveat: e.failIfMajorPerformanceCaveat, powerPreference: e.powerPreference }; this.config = { clearBeforeRender: e.clearBeforeRender, antialias: e.antialias, backgroundColor: e.backgroundColor, contextCreation: i, resolution: e.resolution, roundPixels: e.roundPixels, maxTextures: e.maxTextures, maxTextureSize: e.maxTextureSize, batchSize: e.batchSize, maxLights: e.maxLights, mipmapFilter: e.mipmapFilter }, this.game = t, this.type = f.WEBGL, this.width = 0, this.height = 0, this.canvas = t.canvas, this.blendModes = [], this.nativeTextures = [], this.contextLost = !1, this.pipelines = null, this.snapshotState = { x: 0, y: 0, width: 1, height: 1, getPixel: !1, callback: null, type: "image/png", encoder: .92, isFramebuffer: !1, bufferWidth: 0, bufferHeight: 0 }, this.currentActiveTextureUnit = 0, this.currentTextures = new Array(16), this.currentFramebuffer = null, this.currentPipeline = null, this.currentProgram = null, this.currentVertexBuffer = null, this.currentIndexBuffer = null, this.currentBlendMode = 1 / 0, this.currentScissorEnabled = !1, this.currentScissor = null, this.scissorStack = [], this.contextLostHandler = r, this.contextRestoredHandler = r, this.gl = null, this.supportedExtensions = null, this.extensions = {}, this.glFormats = [], this.compression = { ETC1: !1, PVRTC: !1, S3TC: !1 }, this.drawingBufferHeight = 0, this.blankTexture = null, this.defaultCamera = new n(0,0,0,0), this._tempMatrix1 = new l, this._tempMatrix2 = new l, this._tempMatrix3 = new l, this._tempMatrix4 = new l, this.maskCount = 0, this.maskStack = [], this.currentMask = { mask: null, camera: null }, this.currentCameraMask = { mask: null, camera: null }, this.glFuncMap = null, this.currentType = "", this.newType = !1, this.nextTypeMatch = !1, this.mipmapFilter = null, this.init(this.config) }, init: function(t) { var e = this.game , i = this.canvas , n = t.backgroundColor , s = e.config.context ? e.config.context : i.getContext("webgl", t.contextCreation) || i.getContext("experimental-webgl", t.contextCreation); if (!s || s.isContextLost()) throw this.contextLost = !0, new Error("WebGL unsupported"); this.gl = s; var r = this; this.contextLostHandler = function(t) { r.contextLost = !0, r.game.events.emit(c.CONTEXT_LOST, r), t.preventDefault() } , this.contextRestoredHandler = function() { r.contextLost = !1, r.init(r.config), r.game.events.emit(c.CONTEXT_RESTORED, r) } , i.addEventListener("webglcontextlost", this.contextLostHandler, !1), i.addEventListener("webglcontextrestored", this.contextRestoredHandler, !1), e.context = s; for (var o = 0; o <= 27; o++) this.blendModes.push({ func: [s.ONE, s.ONE_MINUS_SRC_ALPHA], equation: s.FUNC_ADD }); this.blendModes[1].func = [s.ONE, s.DST_ALPHA], this.blendModes[2].func = [s.DST_COLOR, s.ONE_MINUS_SRC_ALPHA], this.blendModes[3].func = [s.ONE, s.ONE_MINUS_SRC_COLOR], this.blendModes[17] = { func: [s.ZERO, s.ONE_MINUS_SRC_ALPHA], equation: s.FUNC_REVERSE_SUBTRACT }, this.glFormats[0] = s.BYTE, this.glFormats[1] = s.SHORT, this.glFormats[2] = s.UNSIGNED_BYTE, this.glFormats[3] = s.UNSIGNED_SHORT, this.glFormats[4] = s.FLOAT, this.glFuncMap = { mat2: { func: s.uniformMatrix2fv, length: 1, matrix: !0 }, mat3: { func: s.uniformMatrix3fv, length: 1, matrix: !0 }, mat4: { func: s.uniformMatrix4fv, length: 1, matrix: !0 }, "1f": { func: s.uniform1f, length: 1 }, "1fv": { func: s.uniform1fv, length: 1 }, "1i": { func: s.uniform1i, length: 1 }, "1iv": { func: s.uniform1iv, length: 1 }, "2f": { func: s.uniform2f, length: 2 }, "2fv": { func: s.uniform2fv, length: 1 }, "2i": { func: s.uniform2i, length: 2 }, "2iv": { func: s.uniform2iv, length: 1 }, "3f": { func: s.uniform3f, length: 3 }, "3fv": { func: s.uniform3fv, length: 1 }, "3i": { func: s.uniform3i, length: 3 }, "3iv": { func: s.uniform3iv, length: 1 }, "4f": { func: s.uniform4f, length: 4 }, "4fv": { func: s.uniform4fv, length: 1 }, "4i": { func: s.uniform4i, length: 4 }, "4iv": { func: s.uniform4iv, length: 1 } }; var a = s.getSupportedExtensions(); t.maxTextures || (t.maxTextures = s.getParameter(s.MAX_TEXTURE_IMAGE_UNITS)), t.maxTextureSize || (t.maxTextureSize = s.getParameter(s.MAX_TEXTURE_SIZE)); var h = "WEBGL_compressed_texture_" , l = "WEBKIT_" + h; this.compression.ETC1 = s.getExtension(h + "etc1") || s.getExtension(l + "etc1"), this.compression.PVRTC = s.getExtension(h + "pvrtc") || s.getExtension(l + "pvrtc"), this.compression.S3TC = s.getExtension(h + "s3tc") || s.getExtension(l + "s3tc"), this.supportedExtensions = a, s.disable(s.DEPTH_TEST), s.disable(s.CULL_FACE), s.enable(s.BLEND), s.clearColor(n.redGL, n.greenGL, n.blueGL, n.alphaGL), this.mipmapFilter = s[t.mipmapFilter]; for (var u = 0; u < this.currentTextures.length; ++u) this.currentTextures[u] = null; return this.pipelines = {}, this.addPipeline("TextureTintPipeline", new y({ game: e, renderer: this })), this.addPipeline("TextureTintStripPipeline", new x({ game: e, renderer: this })), this.addPipeline("BitmapMaskPipeline", new v({ game: e, renderer: this })), this.addPipeline("Light2D", new m({ game: e, renderer: this, maxLights: t.maxLights })), this.setBlendMode(f.BlendModes.NORMAL), e.textures.once(d.READY, this.boot, this), this }, boot: function() { for (var t in this.pipelines) this.pipelines[t].boot(); var e = this.game.textures.getFrame("__DEFAULT"); this.pipelines.TextureTintPipeline.currentFrame = e, this.blankTexture = e; var i = this.gl; i.bindFramebuffer(i.FRAMEBUFFER, null), i.enable(i.SCISSOR_TEST), this.setPipeline(this.pipelines.TextureTintPipeline), this.game.scale.on(o.RESIZE, this.onResize, this); var n = this.game.scale.baseSize; this.resize(n.width, n.height, this.game.scale.resolution) }, onResize: function(t, e, i, n) { e.width === this.width && e.height === this.height && n === this.resolution || this.resize(e.width, e.height, n) }, resize: function(t, e, i) { var n = this.gl , s = this.pipelines; for (var r in this.width = t, this.height = e, this.resolution = i, n.viewport(0, 0, t, e), s) s[r].resize(t, e, i); return this.drawingBufferHeight = n.drawingBufferHeight, n.scissor(0, n.drawingBufferHeight - e, t, e), this.defaultCamera.setSize(t, e), this }, hasExtension: function(t) { return !!this.supportedExtensions && this.supportedExtensions.indexOf(t) }, getExtension: function(t) { return this.hasExtension(t) ? (t in this.extensions || (this.extensions[t] = this.gl.getExtension(t)), this.extensions[t]) : null }, flush: function() { this.currentPipeline && this.currentPipeline.flush() }, hasPipeline: function(t) { return t in this.pipelines }, getPipeline: function(t) { return this.hasPipeline(t) ? this.pipelines[t] : null }, removePipeline: function(t) { return delete this.pipelines[t], this }, addPipeline: function(t, e) { return this.hasPipeline(t) ? console.warn("Pipeline exists: " + t) : this.pipelines[t] = e, e.name = t, this.pipelines[t].resize(this.width, this.height, this.config.resolution), e }, pushScissor: function(t, e, i, n, s) { void 0 === s && (s = this.drawingBufferHeight); var r = [t, e, i, n]; return this.scissorStack.push(r), this.setScissor(t, e, i, n, s), this.currentScissor = r }, setScissor: function(t, e, i, n, s) { void 0 === s && (s = this.drawingBufferHeight); var r, o, a, h, l = this.gl, u = this.currentScissor, c = 0 < i && 0 < n; u && c && (r = u[0], o = u[1], a = u[2], h = u[3], c = r !== t || o !== e || a !== i || h !== n), c && (this.flush(), l.scissor(t, s - e - n, i, n)) }, popScissor: function() { var t = this.scissorStack; t.pop(); var e = t[t.length - 1]; e && this.setScissor(e[0], e[1], e[2], e[3]), this.currentScissor = e }, setPipeline: function(t, e) { return this.currentPipeline === t && this.currentPipeline.vertexBuffer === this.currentVertexBuffer && this.currentPipeline.program === this.currentProgram || (this.flush(), this.currentPipeline = t, this.currentPipeline.bind()), this.currentPipeline.onBind(e), this.currentPipeline }, hasActiveStencilMask: function() { var t = this.currentMask.mask , e = this.currentCameraMask.mask; return t && t.isStencil || e && e.isStencil }, rebindPipeline: function(t) { var e = this.gl; e.disable(e.DEPTH_TEST), e.disable(e.CULL_FACE), this.hasActiveStencilMask() ? e.clear(e.DEPTH_BUFFER_BIT) : (e.disable(e.STENCIL_TEST), e.clear(e.DEPTH_BUFFER_BIT | e.STENCIL_BUFFER_BIT)), e.viewport(0, 0, this.width, this.height), this.setBlendMode(0, !0), e.activeTexture(e.TEXTURE0), e.bindTexture(e.TEXTURE_2D, this.blankTexture.glTexture), this.currentActiveTextureUnit = 0, this.currentTextures[0] = this.blankTexture.glTexture, this.currentPipeline = t, this.currentPipeline.bind(), this.currentPipeline.onBind() }, clearPipeline: function() { this.flush(), this.currentPipeline = null, this.currentProgram = null, this.currentVertexBuffer = null, this.currentIndexBuffer = null, this.setBlendMode(0, !0) }, setBlendMode: function(t, e) { void 0 === e && (e = !1); var i = this.gl , n = this.blendModes[t]; return !!(e || t !== f.BlendModes.SKIP_CHECK && this.currentBlendMode !== t) && (this.flush(), i.enable(i.BLEND), i.blendEquation(n.equation), 2 < n.func.length ? i.blendFuncSeparate(n.func[0], n.func[1], n.func[2], n.func[3]) : i.blendFunc(n.func[0], n.func[1]), this.currentBlendMode = t, !0) }, addBlendMode: function(t, e) { return this.blendModes.push({ func: t, equation: e }) - 1 }, updateBlendMode: function(t, e, i) { return this.blendModes[t] && (this.blendModes[t].func = e, i && (this.blendModes[t].equation = i)), this }, removeBlendMode: function(t) { return 17 < t && this.blendModes[t] && this.blendModes.splice(t, 1), this }, setBlankTexture: function(t) { void 0 === t && (t = !1), !t && 0 === this.currentActiveTextureUnit && this.currentTextures[0] || this.setTexture2D(this.blankTexture.glTexture, 0) }, setTexture2D: function(t, e, i) { void 0 === i && (i = !0); var n = this.gl; return t !== this.currentTextures[e] && (i && this.flush(), this.currentActiveTextureUnit !== e && (n.activeTexture(n.TEXTURE0 + e), this.currentActiveTextureUnit = e), n.bindTexture(n.TEXTURE_2D, t), this.currentTextures[e] = t), this }, setFramebuffer: function(t, e) { void 0 === e && (e = !1); var i = this.gl , n = this.width , s = this.height; return t !== this.currentFramebuffer && (t && t.renderTexture ? (n = t.renderTexture.width, s = t.renderTexture.height) : this.flush(), i.bindFramebuffer(i.FRAMEBUFFER, t), i.viewport(0, 0, n, s), e && (t ? (this.drawingBufferHeight = s, this.pushScissor(0, 0, n, s)) : (this.drawingBufferHeight = this.height, this.popScissor())), this.currentFramebuffer = t), this }, setProgram: function(t) { var e = this.gl; return t !== this.currentProgram && (this.flush(), e.useProgram(t), this.currentProgram = t), this }, setVertexBuffer: function(t) { var e = this.gl; return t !== this.currentVertexBuffer && (this.flush(), e.bindBuffer(e.ARRAY_BUFFER, t), this.currentVertexBuffer = t), this }, setIndexBuffer: function(t) { var e = this.gl; return t !== this.currentIndexBuffer && (this.flush(), e.bindBuffer(e.ELEMENT_ARRAY_BUFFER, t), this.currentIndexBuffer = t), this }, createTextureFromSource: function(t, e, i, n) { var s = this.gl , r = s.NEAREST , o = s.NEAREST , a = s.CLAMP_TO_EDGE; e = t ? t.width : e, i = t ? t.height : i; var h = p(e, i); return h && (a = s.REPEAT), n === f.ScaleModes.LINEAR && this.config.antialias && (r = h ? this.mipmapFilter : s.LINEAR, o = s.LINEAR), t || "number" != typeof e || "number" != typeof i ? this.createTexture2D(0, r, o, a, a, s.RGBA, t) : this.createTexture2D(0, r, o, a, a, s.RGBA, null, e, i) }, createTexture2D: function(t, e, i, n, s, r, o, a, h, l, u, c) { l = null == l || l, void 0 === u && (u = !1), void 0 === c && (c = !1); var d = this.gl , f = d.createTexture(); return this.setTexture2D(f, 0), d.texParameteri(d.TEXTURE_2D, d.TEXTURE_MIN_FILTER, e), d.texParameteri(d.TEXTURE_2D, d.TEXTURE_MAG_FILTER, i), d.texParameteri(d.TEXTURE_2D, d.TEXTURE_WRAP_S, s), d.texParameteri(d.TEXTURE_2D, d.TEXTURE_WRAP_T, n), d.pixelStorei(d.UNPACK_PREMULTIPLY_ALPHA_WEBGL, l), d.pixelStorei(d.UNPACK_FLIP_Y_WEBGL, c), null == o ? d.texImage2D(d.TEXTURE_2D, t, r, a, h, 0, r, d.UNSIGNED_BYTE, null) : (u || (a = o.width, h = o.height), d.texImage2D(d.TEXTURE_2D, t, r, r, d.UNSIGNED_BYTE, o)), p(a, h) && d.generateMipmap(d.TEXTURE_2D), this.setTexture2D(null, 0), f.isAlphaPremultiplied = l, f.isRenderTexture = !1, f.width = a, f.height = h, this.nativeTextures.push(f), f }, createFramebuffer: function(t, e, i, n) { var s, r, o = this.gl, a = o.createFramebuffer(); if (this.setFramebuffer(a), n && (r = o.createRenderbuffer(), o.bindRenderbuffer(o.RENDERBUFFER, r), o.renderbufferStorage(o.RENDERBUFFER, o.DEPTH_STENCIL, t, e), o.framebufferRenderbuffer(o.FRAMEBUFFER, o.DEPTH_STENCIL_ATTACHMENT, o.RENDERBUFFER, r)), i.isRenderTexture = !0, i.isAlphaPremultiplied = !1, o.framebufferTexture2D(o.FRAMEBUFFER, o.COLOR_ATTACHMENT0, o.TEXTURE_2D, i, 0), (s = o.checkFramebufferStatus(o.FRAMEBUFFER)) === o.FRAMEBUFFER_COMPLETE) return a.renderTexture = i, this.setFramebuffer(null), a; throw new Error("Framebuffer incomplete. Framebuffer status: " + { 36054: "Incomplete Attachment", 36055: "Missing Attachment", 36057: "Incomplete Dimensions", 36061: "Framebuffer Unsupported" }[s]) }, createProgram: function(t, e) { var i = this.gl , n = i.createProgram() , s = i.createShader(i.VERTEX_SHADER) , r = i.createShader(i.FRAGMENT_SHADER); if (i.shaderSource(s, t), i.shaderSource(r, e), i.compileShader(s), i.compileShader(r), !i.getShaderParameter(s, i.COMPILE_STATUS)) throw new Error("Failed to compile Vertex Shader:\n" + i.getShaderInfoLog(s)); if (!i.getShaderParameter(r, i.COMPILE_STATUS)) throw new Error("Failed to compile Fragment Shader:\n" + i.getShaderInfoLog(r)); if (i.attachShader(n, s), i.attachShader(n, r), i.linkProgram(n), !i.getProgramParameter(n, i.LINK_STATUS)) throw new Error("Failed to link program:\n" + i.getProgramInfoLog(n)); return n }, createVertexBuffer: function(t, e) { var i = this.gl , n = i.createBuffer(); return this.setVertexBuffer(n), i.bufferData(i.ARRAY_BUFFER, t, e), this.setVertexBuffer(null), n }, createIndexBuffer: function(t, e) { var i = this.gl , n = i.createBuffer(); return this.setIndexBuffer(n), i.bufferData(i.ELEMENT_ARRAY_BUFFER, t, e), this.setIndexBuffer(null), n }, deleteTexture: function(t) { var e = this.nativeTextures.indexOf(t); return -1 !== e && a(this.nativeTextures, e), this.gl.deleteTexture(t), this.currentTextures[0] !== t || this.game.pendingDestroy || this.setBlankTexture(!0), this }, deleteFramebuffer: function(t) { return this.gl.deleteFramebuffer(t), this }, deleteProgram: function(t) { return this.gl.deleteProgram(t), this }, deleteBuffer: function(t) { return this.gl.deleteBuffer(t), this }, preRenderCamera: function(t) { var e, i = t._cx, n = t._cy, s = t._cw, r = t._ch, o = this.pipelines.TextureTintPipeline, a = t.backgroundColor; t.renderToTexture ? (this.flush(), this.pushScissor(i, n, s, -r), this.setFramebuffer(t.framebuffer), (e = this.gl).clearColor(0, 0, 0, 0), e.clear(e.COLOR_BUFFER_BIT), o.projOrtho(i, s + i, n, r + n, -1e3, 1e3), t.mask && (this.currentCameraMask.mask = t.mask, this.currentCameraMask.camera = t._maskCamera, t.mask.preRenderWebGL(this, t, t._maskCamera)), 0 < a.alphaGL && o.drawFillRect(i, n, s + i, r + n, u.getTintFromFloats(a.redGL, a.greenGL, a.blueGL, 1), a.alphaGL), t.emit(h.PRE_RENDER, t)) : (this.pushScissor(i, n, s, r), t.mask && (this.currentCameraMask.mask = t.mask, this.currentCameraMask.camera = t._maskCamera, t.mask.preRenderWebGL(this, t, t._maskCamera)), 0 < a.alphaGL && o.drawFillRect(i, n, s, r, u.getTintFromFloats(a.redGL, a.greenGL, a.blueGL, 1), a.alphaGL)) }, getCurrentStencilMask: function() { var t = null , e = this.maskStack , i = this.currentCameraMask; return 0 < e.length ? t = e[e.length - 1] : i.mask && i.mask.isStencil && (t = i), t }, postRenderCamera: function(t) { this.setPipeline(this.pipelines.TextureTintPipeline); var e, i = this.pipelines.TextureTintPipeline; t.flashEffect.postRenderWebGL(i, u.getTintFromFloats), t.fadeEffect.postRenderWebGL(i, u.getTintFromFloats), t.dirty = !1, this.popScissor(), t.renderToTexture && (i.flush(), this.setFramebuffer(null), t.emit(h.POST_RENDER, t), t.renderToGame && (i.projOrtho(0, i.width, i.height, 0, -1e3, 1e3), e = u.getTintAppendFloatAlpha, (t.pipeline ? t.pipeline : i).batchTexture(t, t.glTexture, t.width, t.height, t.x, t.y, t.width, t.height, t.zoom, t.zoom, t.rotation, t.flipX, !t.flipY, 1, 1, 0, 0, 0, 0, t.width, t.height, e(t._tintTL, t._alphaTL), e(t._tintTR, t._alphaTR), e(t._tintBL, t._alphaBL), e(t._tintBR, t._alphaBR), t._isTinted && t.tintFill, 0, 0, this.defaultCamera, null)), this.setBlankTexture(!0)), t.mask && (this.currentCameraMask.mask = null, t.mask.postRenderWebGL(this, t._maskCamera)) }, preRender: function() { if (!this.contextLost) { var t, e = this.gl, i = this.pipelines; for (var n in e.bindFramebuffer(e.FRAMEBUFFER, null), this.config.clearBeforeRender && (t = this.config.backgroundColor, e.clearColor(t.redGL, t.greenGL, t.blueGL, t.alphaGL), e.clear(e.COLOR_BUFFER_BIT | e.DEPTH_BUFFER_BIT | e.STENCIL_BUFFER_BIT)), e.enable(e.SCISSOR_TEST), i) i[n].onPreRender(); this.currentScissor = [0, 0, this.width, this.height], this.scissorStack = [this.currentScissor], this.game.scene.customViewports && e.scissor(0, this.drawingBufferHeight - this.height, this.width, this.height), this.currentMask.mask = null, this.currentCameraMask.mask = null, this.maskStack.length = 0, this.setPipeline(this.pipelines.TextureTintPipeline) } }, render: function(t, e, i, n) { if (!this.contextLost) { var s = e.list , r = s.length , o = this.pipelines; for (var a in o) o[a].onRender(t, n); if (this.preRenderCamera(n), 0 === r) return this.setBlendMode(f.BlendModes.NORMAL), void this.postRenderCamera(n); this.currentType = ""; for (var h = this.currentMask, l = 0; l < r; l++) { var u, c, d = s[l]; d.willRender(n) && (d.blendMode !== this.currentBlendMode && this.setBlendMode(d.blendMode), u = d.mask, (h = this.currentMask).mask && h.mask !== u && h.mask.postRenderWebGL(this, h.camera), u && h.mask !== u && u.preRenderWebGL(this, d, n), (c = d.type) !== this.currentType && (this.newType = !0, this.currentType = c), this.nextTypeMatch = l < r - 1 && s[l + 1].type === this.currentType, d.renderWebGL(this, d, i, n), this.newType = !1) } (h = this.currentMask).mask && h.mask.postRenderWebGL(this, h.camera), this.setBlendMode(f.BlendModes.NORMAL), this.postRenderCamera(n) } }, postRender: function() { if (!this.contextLost) { this.flush(); var t = this.snapshotState; t.callback && (g(this.canvas, t), t.callback = null); var e = this.pipelines; for (var i in e) e[i].onPostRender() } }, snapshot: function(t, e, i) { return this.snapshotArea(0, 0, this.gl.drawingBufferWidth, this.gl.drawingBufferHeight, t, e, i) }, snapshotArea: function(t, e, i, n, s, r, o) { var a = this.snapshotState; return a.callback = s, a.type = r, a.encoder = o, a.getPixel = !1, a.x = t, a.y = e, a.width = Math.min(i, this.gl.drawingBufferWidth), a.height = Math.min(n, this.gl.drawingBufferHeight), this }, snapshotPixel: function(t, e, i) { return this.snapshotArea(t, e, 1, 1, i), this.snapshotState.getPixel = !0, this }, snapshotFramebuffer: function(t, e, i, n, s, r, o, a, h, l, u) { void 0 === s && (s = !1), void 0 === r && (r = 0), void 0 === o && (o = 0), void 0 === a && (a = e), void 0 === h && (h = i); var c = this.currentFramebuffer; this.snapshotArea(r, o, a, h, n, l, u); var d = this.snapshotState; return d.getPixel = s, d.isFramebuffer = !0, d.bufferWidth = e, d.bufferHeight = i, this.setFramebuffer(t), g(this.canvas, d), this.setFramebuffer(c), d.callback = null, d.isFramebuffer = !1, this }, canvasToTexture: function(t, e, i, n) { return void 0 === i && (i = !1), void 0 === n && (n = !1), e ? this.updateCanvasTexture(t, e, n) : this.createCanvasTexture(t, i, n) }, createCanvasTexture: function(t, e, i) { void 0 === e && (e = !1), void 0 === i && (i = !1); var n = this.gl , s = n.NEAREST , r = n.NEAREST , o = t.width , a = t.height , h = n.CLAMP_TO_EDGE , l = p(o, a); return !e && l && (h = n.REPEAT), this.config.antialias && (s = l ? this.mipmapFilter : n.LINEAR, r = n.LINEAR), this.createTexture2D(0, s, r, h, h, n.RGBA, t, o, a, !0, !1, i) }, updateCanvasTexture: function(t, e, i) { void 0 === i && (i = !1); var n = this.gl , s = t.width , r = t.height; return 0 < s && 0 < r && (this.setTexture2D(e, 0), n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL, i), n.texImage2D(n.TEXTURE_2D, 0, n.RGBA, n.RGBA, n.UNSIGNED_BYTE, t), e.width = s, e.height = r, this.setTexture2D(null, 0)), e }, createVideoTexture: function(t, e, i) { void 0 === e && (e = !1), void 0 === i && (i = !1); var n = this.gl , s = n.NEAREST , r = n.NEAREST , o = t.videoWidth , a = t.videoHeight , h = n.CLAMP_TO_EDGE , l = p(o, a); return !e && l && (h = n.REPEAT), this.config.antialias && (s = l ? this.mipmapFilter : n.LINEAR, r = n.LINEAR), this.createTexture2D(0, s, r, h, h, n.RGBA, t, o, a, !0, !0, i) }, updateVideoTexture: function(t, e, i) { void 0 === i && (i = !1); var n = this.gl , s = t.videoWidth , r = t.videoHeight; return 0 < s && 0 < r && (this.setTexture2D(e, 0), n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL, i), n.texImage2D(n.TEXTURE_2D, 0, n.RGBA, n.RGBA, n.UNSIGNED_BYTE, t), e.width = s, e.height = r, this.setTexture2D(null, 0)), e }, setTextureFilter: function(t, e) { var i = this.gl , n = [i.LINEAR, i.NEAREST][e]; return this.setTexture2D(t, 0), i.texParameteri(i.TEXTURE_2D, i.TEXTURE_MIN_FILTER, n), i.texParameteri(i.TEXTURE_2D, i.TEXTURE_MAG_FILTER, n), this.setTexture2D(null, 0), this }, setFloat1: function(t, e, i) { return this.setProgram(t), this.gl.uniform1f(this.gl.getUniformLocation(t, e), i), this }, setFloat2: function(t, e, i, n) { return this.setProgram(t), this.gl.uniform2f(this.gl.getUniformLocation(t, e), i, n), this }, setFloat3: function(t, e, i, n, s) { return this.setProgram(t), this.gl.uniform3f(this.gl.getUniformLocation(t, e), i, n, s), this }, setFloat4: function(t, e, i, n, s, r) { return this.setProgram(t), this.gl.uniform4f(this.gl.getUniformLocation(t, e), i, n, s, r), this }, setFloat1v: function(t, e, i) { return this.setProgram(t), this.gl.uniform1fv(this.gl.getUniformLocation(t, e), i), this }, setFloat2v: function(t, e, i) { return this.setProgram(t), this.gl.uniform2fv(this.gl.getUniformLocation(t, e), i), this }, setFloat3v: function(t, e, i) { return this.setProgram(t), this.gl.uniform3fv(this.gl.getUniformLocation(t, e), i), this }, setFloat4v: function(t, e, i) { return this.setProgram(t), this.gl.uniform4fv(this.gl.getUniformLocation(t, e), i), this }, setInt1: function(t, e, i) { return this.setProgram(t), this.gl.uniform1i(this.gl.getUniformLocation(t, e), i), this }, setInt2: function(t, e, i, n) { return this.setProgram(t), this.gl.uniform2i(this.gl.getUniformLocation(t, e), i, n), this }, setInt3: function(t, e, i, n, s) { return this.setProgram(t), this.gl.uniform3i(this.gl.getUniformLocation(t, e), i, n, s), this }, setInt4: function(t, e, i, n, s, r) { return this.setProgram(t), this.gl.uniform4i(this.gl.getUniformLocation(t, e), i, n, s, r), this }, setMatrix2: function(t, e, i, n) { return this.setProgram(t), this.gl.uniformMatrix2fv(this.gl.getUniformLocation(t, e), i, n), this }, setMatrix3: function(t, e, i, n) { return this.setProgram(t), this.gl.uniformMatrix3fv(this.gl.getUniformLocation(t, e), i, n), this }, setMatrix4: function(t, e, i, n) { return this.setProgram(t), this.gl.uniformMatrix4fv(this.gl.getUniformLocation(t, e), i, n), this }, getMaxTextures: function() { return this.config.maxTextures }, getMaxTextureSize: function() { return this.config.maxTextureSize }, destroy: function() { for (var t = 0; t < this.nativeTextures.length; t++) this.gl.deleteTexture(this.nativeTextures[t]); for (var e in this.nativeTextures = [], this.pipelines) this.pipelines[e].destroy(), delete this.pipelines[e]; this.defaultCamera.destroy(), this.currentMask = null, this.currentCameraMask = null, this.canvas.removeEventListener("webglcontextlost", this.contextLostHandler, !1), this.canvas.removeEventListener("webglcontextrestored", this.contextRestoredHandler, !1), this.game = null, this.gl = null, this.canvas = null, this.maskStack = [], this.contextLost = !0, this.extensions = {} } }); t.exports = T } , function(t, e, i) { var C = i(26) , M = i(31) , P = i(2); t.exports = function(t, e) { var i = t.getContext("experimental-webgl") , n = P(e, "callback") , s = P(e, "type", "image/png") , r = P(e, "encoder", .92) , o = P(e, "x", 0) , a = P(e, "y", 0) , h = P(e, "getPixel", !1) , l = P(e, "isFramebuffer", !1) , u = l ? P(e, "bufferWidth", 1) : i.drawingBufferWidth , c = l ? P(e, "bufferHeight", 1) : i.drawingBufferHeight; if (h) { var d = new Uint8Array(4) , f = l ? a : c - a; i.readPixels(o, f, 1, 1, i.RGBA, i.UNSIGNED_BYTE, d), n.call(null, new M(d[0],d[1],d[2],d[3] / 255)) } else { var p = P(e, "width", u) , g = P(e, "height", c) , v = p * g * 4 , m = new Uint8Array(v); i.readPixels(o, c - a - g, p, g, i.RGBA, i.UNSIGNED_BYTE, m); for (var y = C.createWebGL(this, p, g), x = y.getContext("2d"), T = x.getImageData(0, 0, p, g), w = T.data, b = 0; b < g; b++) for (var E = 0; E < p; E++) { var S = 4 * ((g - b) * p + E) , _ = l ? v - 4 * (b * p + (p - E)) : 4 * (b * p + E); w[0 + _] = m[0 + S], w[1 + _] = m[1 + S], w[2 + _] = m[2 + S], w[3 + _] = m[3 + S] } x.putImageData(T, 0, 0); var A = new Image; A.onerror = function() { n.call(null), C.remove(y) } , A.onload = function() { n.call(null, A), C.remove(y) } , A.src = y.toDataURL(s, r) } } } , function(t, e, i) { var n = i(0) , s = i(786) , r = i(787) , o = i(147) , a = new n({ Extends: o, initialize: function(t) { o.call(this, { game: t.game, renderer: t.renderer, gl: t.renderer.gl, topology: t.topology ? t.topology : t.renderer.gl.TRIANGLES, vertShader: t.vertShader ? t.vertShader : r, fragShader: t.fragShader ? t.fragShader : s, vertexCapacity: t.vertexCapacity ? t.vertexCapacity : 3, vertexSize: t.vertexSize ? t.vertexSize : 2 * Float32Array.BYTES_PER_ELEMENT, vertices: new Float32Array([-1, 1, -1, -7, 7, 1]).buffer, attributes: [{ name: "inPosition", size: 2, type: t.renderer.gl.FLOAT, normalized: !1, offset: 0 }] }), this.vertexViewF32 = new Float32Array(this.vertexData), this.maxQuads = 1, this.resolutionDirty = !0 }, onBind: function() { o.prototype.onBind.call(this); var t = this.renderer , e = this.program; return this.resolutionDirty && (t.setFloat2(e, "uResolution", this.width, this.height), t.setInt1(e, "uMainSampler", 0), t.setInt1(e, "uMaskSampler", 1), this.resolutionDirty = !1), this }, resize: function(t, e, i) { return o.prototype.resize.call(this, t, e, i), this.resolutionDirty = !0, this }, beginMask: function(t, e, i) { var n = this.renderer , s = this.gl; t.bitmapMask && s && (n.flush(), t.prevFramebuffer = n.currentFramebuffer, n.setFramebuffer(t.mainFramebuffer), s.disable(s.STENCIL_TEST), s.clearColor(0, 0, 0, 0), s.clear(s.COLOR_BUFFER_BIT), n.currentCameraMask.mask !== t && (n.currentMask.mask = t, n.currentMask.camera = i)) }, endMask: function(t, e) { var i, n = this.gl, s = this.renderer, r = t.bitmapMask; r && n && (s.flush(), s.setFramebuffer(t.maskFramebuffer), n.clearColor(0, 0, 0, 0), n.clear(n.COLOR_BUFFER_BIT), s.setBlendMode(0, !0), r.renderWebGL(s, r, 0, e), s.flush(), s.setFramebuffer(t.prevFramebuffer), (i = s.getCurrentStencilMask()) ? (n.enable(n.STENCIL_TEST), i.mask.applyStencil(s, i.camera, !0)) : s.currentMask.mask = null, s.setPipeline(this), n.activeTexture(n.TEXTURE1), n.bindTexture(n.TEXTURE_2D, t.maskTexture), n.activeTexture(n.TEXTURE0), n.bindTexture(n.TEXTURE_2D, t.mainTexture), n.uniform1i(n.getUniformLocation(this.program, "uInvertMaskAlpha"), t.invertAlpha), n.drawArrays(this.topology, 0, 3)) } }); t.exports = a } , function(t, e, i) { var n = i(0) , s = i(788) , r = i(237) , f = 10 , o = new n({ Extends: r, initialize: function(t) { f = t.maxLights, t.fragShader = s.replace("%LIGHT_COUNT%", f.toString()), r.call(this, t), this.defaultNormalMap, this.inverseRotationMatrix = new Float32Array([1, 0, 0, 0, 1, 0, 0, 0, 1]) }, boot: function() { this.defaultNormalMap = this.game.textures.getFrame("__DEFAULT") }, onBind: function(t) { r.prototype.onBind.call(this); var e = this.renderer , i = this.program; return this.mvpUpdate(), e.setInt1(i, "uNormSampler", 1), e.setFloat2(i, "uResolution", this.width, this.height), t && this.setNormalMap(t), this }, onRender: function(t, e) { this.active = !1; var i = t.sys.lights; if (!i || i.lights.length <= 0 || !i.active) return this; var n = i.cull(e) , s = Math.min(n.length, f); if (0 === s) return this; this.active = !0; for (var r = this.renderer, o = this.program, a = e.matrix, h = { x: 0, y: 0 }, l = r.height, u = 0; u < f; ++u) r.setFloat1(o, "uLights[" + u + "].radius", 0); for (r.setFloat4(o, "uCamera", e.x, e.y, e.rotation, e.zoom), r.setFloat3(o, "uAmbientLightColor", i.ambientColor.r, i.ambientColor.g, i.ambientColor.b), u = 0; u < s; ++u) { var c = n[u] , d = "uLights[" + u + "]."; a.transformPoint(c.x, c.y, h), r.setFloat2(o, d + "position", h.x - e.scrollX * c.scrollFactorX * e.zoom, l - (h.y - e.scrollY * c.scrollFactorY * e.zoom)), r.setFloat3(o, d + "color", c.r, c.g, c.b), r.setFloat1(o, d + "intensity", c.intensity), r.setFloat1(o, d + "radius", c.radius) } return this.currentNormalMapRotation = null, this }, batchTexture: function(t, e, i, n, s, r, o, a, h, l, u, c, d, f, p, g, v, m, y, x, T, w, b, E, S, _, A, C, M, P) { var O, R, L, k, D, F, I, B, N, Y, X, U, z, G, W, V, H, j, q, K, J, Z, Q, $, tt; this.active && (this.renderer.setPipeline(this), t.displayTexture ? O = t.displayTexture.dataSource[t.displayFrame.sourceIndex] : t.texture ? O = t.texture.dataSource[t.frame.sourceIndex] : t.tileset && (O = Array.isArray(t.tileset) ? t.tileset[0].image.dataSource[0] : t.tileset.image.dataSource[0]), O ? (this.setTexture2D(O.glTexture, 1), this.setNormalMapRotation(u), R = this._tempMatrix1, L = this._tempMatrix2, k = this._tempMatrix3, D = m / i + A, F = y / n + C, I = (m + x) / i + A, B = (y + T) / n + C, U = o, z = a, N = -g, Y = -v, t.isCropped && (U = (X = t._crop).width, z = X.height, o = X.width, a = X.height, G = m = X.x, W = y = X.y, c && (G = x - X.x - X.width), d && !e.isRenderTexture && (W = T - X.y - X.height), D = G / i + A, F = W / n + C, I = (G + X.width) / i + A, B = (W + X.height) / n + C, N = -g + m, Y = -v + y), c && (U *= -1, N += o), (d ^= e.isRenderTexture ? 1 : 0) && (z *= -1, Y += a), V = N + U, H = Y + z, L.applyITRS(s, r, u, h, l), R.copyFrom(M.matrix), P ? (R.multiplyWithOffset(P, -M.scrollX * f, -M.scrollY * p), L.e = s, L.f = r) : (L.e -= M.scrollX * f, L.f -= M.scrollY * p), R.multiply(L, k), j = k.getX(N, Y), q = k.getY(N, Y), K = k.getX(N, H), J = k.getY(N, H), Z = k.getX(V, H), Q = k.getY(V, H), $ = k.getX(V, Y), tt = k.getY(V, Y), M.roundPixels && (j = Math.round(j), q = Math.round(q), K = Math.round(K), J = Math.round(J), Z = Math.round(Z), Q = Math.round(Q), $ = Math.round($), tt = Math.round(tt)), this.setTexture2D(e, 0), this.batchQuad(j, q, K, J, Z, Q, $, tt, D, F, I, B, w, b, E, S, _, e, 0)) : console.warn("Normal map missing or invalid")) }, setNormalMap: function(t) { var e; this.active && t && (t.texture && (e = t.texture.dataSource[t.frame.sourceIndex]), e = e || this.defaultNormalMap, this.setTexture2D(e.glTexture, 1), this.renderer.setPipeline(t.defaultPipeline)) }, setNormalMapRotation: function(t) { var e, i, n, s; t === this.currentNormalMapRotation && 0 !== this.batches.length || (0 < this.batches.length && this.flush(), e = this.inverseRotationMatrix, t ? (i = -t, n = Math.cos(i), s = Math.sin(i), e[1] = s, e[3] = -s, e[0] = e[4] = n) : (e[0] = e[4] = 1, e[1] = e[3] = 0), this.renderer.setMatrix3(this.program, "uInverseRotationMatrix", !1, e), this.currentNormalMapRotation = t) }, batchSprite: function(t, e, i) { var n; !this.active || (n = t.texture.dataSource[t.frame.sourceIndex]) && (this.renderer.setPipeline(this), this.setTexture2D(n.glTexture, 1), this.setNormalMapRotation(t.rotation), r.prototype.batchSprite.call(this, t, e, i)) } }); o.LIGHT_COUNT = f, t.exports = o } , function(t, e, i) { var n = i(0) , s = i(2) , r = i(238) , o = i(340) , a = i(341) , h = i(29) , l = i(147) , u = new n({ Extends: l, Mixins: [r], initialize: function(t) { var e = t.renderer.config; l.call(this, { game: t.game, renderer: t.renderer, gl: t.renderer.gl, topology: t.renderer.gl.TRIANGLE_STRIP, vertShader: s(t, "vertShader", a), fragShader: s(t, "fragShader", o), vertexCapacity: s(t, "vertexCapacity", 6 * e.batchSize), vertexSize: s(t, "vertexSize", 5 * Float32Array.BYTES_PER_ELEMENT + 4 * Uint8Array.BYTES_PER_ELEMENT), attributes: [{ name: "inPosition", size: 2, type: t.renderer.gl.FLOAT, normalized: !1, offset: 0 }, { name: "inTexCoord", size: 2, type: t.renderer.gl.FLOAT, normalized: !1, offset: 2 * Float32Array.BYTES_PER_ELEMENT }, { name: "inTintEffect", size: 1, type: t.renderer.gl.FLOAT, normalized: !1, offset: 4 * Float32Array.BYTES_PER_ELEMENT }, { name: "inTint", size: 4, type: t.renderer.gl.UNSIGNED_BYTE, normalized: !0, offset: 5 * Float32Array.BYTES_PER_ELEMENT }] }), this.vertexViewF32 = new Float32Array(this.vertexData), this.vertexViewU32 = new Uint32Array(this.vertexData), this.maxQuads = e.batchSize, this.batches = [], this._tempMatrix1 = new h, this._tempMatrix2 = new h, this._tempMatrix3 = new h, this.mvpInit() }, onBind: function() { return l.prototype.onBind.call(this), this.mvpUpdate(), this }, resize: function(t, e, i) { return l.prototype.resize.call(this, t, e, i), this.projOrtho(0, this.width, this.height, 0, -1e3, 1e3), this }, setTexture2D: function(t, e) { return void 0 === t && (t = this.renderer.blankTexture.glTexture), void 0 === e && (e = 0), this.requireTextureBatch(t, e) && this.pushBatch(t, e), this }, requireTextureBatch: function(t, e) { var i = this.batches , n = i.length; return !(0 < n) || !((0 < e ? i[n - 1].textures[e - 1] : i[n - 1].texture) === t) }, pushBatch: function(t, e) { var i; 0 === e ? this.batches.push({ first: this.vertexCount, texture: t, textures: [] }) : ((i = [])[e - 1] = t, this.batches.push({ first: this.vertexCount, texture: null, textures: i })) }, flush: function() { if (this.flushLocked) return this; this.flushLocked = !0; var t, e, i, n = this.gl, s = this.vertexCount, r = this.topology, o = this.vertexSize, a = this.renderer, h = this.batches, l = h.length, u = 0, c = null; if (0 === l || 0 === s) return this.flushLocked = !1, this; n.bufferSubData(n.ARRAY_BUFFER, 0, this.bytes.subarray(0, s * o)); for (var d = 0; d < l - 1; d++) { if (c = h[d], t = h[d + 1], 0 < c.textures.length) { for (e = 0; e < c.textures.length; ++e) (i = c.textures[e]) && a.setTexture2D(i, 1 + e, !1); n.activeTexture(n.TEXTURE0) } u = t.first - c.first, null === c.texture || u <= 0 || (a.setTexture2D(c.texture, 0, !1), n.drawArrays(r, c.first, u)) } if (0 < (c = h[l - 1]).textures.length) { for (e = 0; e < c.textures.length; ++e) (i = c.textures[e]) && a.setTexture2D(i, 1 + e, !1); n.activeTexture(n.TEXTURE0) } return u = s - c.first, c.texture && 0 < u && (a.setTexture2D(c.texture, 0, !1), n.drawArrays(r, c.first, u)), this.vertexCount = 0, h.length = 0, this.flushLocked = !1, this } }); t.exports = u } , function(t, e, i) { var n = {}; t.exports = n; var r = i(99) , o = i(42); n.fromVertices = function(t) { for (var e = {}, i = 0; i < t.length; i++) { var n = (i + 1) % t.length , s = r.normalise({ x: t[n].y - t[i].y, y: t[i].x - t[n].x }); e[(0 === s.y ? 1 / 0 : s.x / s.y).toFixed(3).toString()] = s } return o.values(e) } , n.rotate = function(t, e) { if (0 !== e) for (var i = Math.cos(e), n = Math.sin(e), s = 0; s < t.length; s++) { var r = t[s] , o = r.x * i - r.y * n; r.y = r.x * n + r.y * i, r.x = o } } } , function(t, e, i) { t.exports = { Bounce: i(1397), Collision: i(1398), Force: i(1399), Friction: i(1400), Gravity: i(1401), Mass: i(1402), Static: i(1403), Sensor: i(1404), SetBody: i(1405), Sleep: i(1406), Transform: i(1423), Velocity: i(1424) } } , function(t, e, i) { var g = {}; t.exports = g; var v = i(516) , m = i(473) , y = i(100); g.collisions = function(t, e) { for (var i = [], n = e.pairs.table, s = e.metrics, r = 0; r < t.length; r++) { var o = t[r][0] , a = t[r][1]; if ((!o.isStatic && !o.isSleeping || !a.isStatic && !a.isSleeping) && (g.canCollide(o.collisionFilter, a.collisionFilter) && (s.midphaseTests += 1, y.overlaps(o.bounds, a.bounds)))) for (var h = 1 < o.parts.length ? 1 : 0; h < o.parts.length; h++) for (var l = o.parts[h], u = 1 < a.parts.length ? 1 : 0; u < a.parts.length; u++) { var c, d, f, p = a.parts[u]; (l === o && p === a || y.overlaps(l.bounds, p.bounds)) && (d = (c = n[m.id(l, p)]) && c.isActive ? c.collision : null, f = v.collides(l, p, d), s.narrowphaseTests += 1, f.reused && (s.narrowReuseCount += 1), f.collided && (i.push(f), s.narrowDetections += 1)) } } return i } , g.canCollide = function(t, e) { return t.group === e.group && 0 !== t.group ? 0 < t.group : 0 != (t.mask & e.category) && 0 != (e.mask & t.category) } } , function(t, e, i) { var m = {}; t.exports = m; var y = i(86) , x = i(99); m.collides = function(t, e, i) { var n, s, r, o, a, h, l = !1; if (h = i ? (r = t.parent, o = e.parent, a = r.speed * r.speed + r.angularSpeed * r.angularSpeed + o.speed * o.speed + o.angularSpeed * o.angularSpeed, l = i && i.collided && a < .2, i) : { collided: !1, bodyA: t, bodyB: e }, i && l) { var u = h.axisBody , c = u === t ? e : t , d = [u.axes[i.axisNumber]] , f = m._overlapAxes(u.vertices, c.vertices, d); if (h.reused = !0, f.overlap <= 0) return h.collided = !1, h } else { if ((n = m._overlapAxes(t.vertices, e.vertices, t.axes)).overlap <= 0) return h.collided = !1, h; if ((s = m._overlapAxes(e.vertices, t.vertices, e.axes)).overlap <= 0) return h.collided = !1, h; n.overlap < s.overlap ? (f = n, h.axisBody = t) : (f = s, h.axisBody = e), h.axisNumber = f.axisNumber } h.bodyA = t.id < e.id ? t : e, h.bodyB = t.id < e.id ? e : t, h.collided = !0, h.depth = f.overlap, h.parentA = h.bodyA.parent, h.parentB = h.bodyB.parent, t = h.bodyA, e = h.bodyB, x.dot(f.axis, x.sub(e.position, t.position)) < 0 ? h.normal = { x: f.axis.x, y: f.axis.y } : h.normal = { x: -f.axis.x, y: -f.axis.y }, h.tangent = x.perp(h.normal), h.penetration = h.penetration || {}, h.penetration.x = h.normal.x * h.depth, h.penetration.y = h.normal.y * h.depth; var p, g = m._findSupports(t, e, h.normal), v = []; return y.contains(t.vertices, g[0]) && v.push(g[0]), y.contains(t.vertices, g[1]) && v.push(g[1]), v.length < 2 && (p = m._findSupports(e, t, x.neg(h.normal)), y.contains(e.vertices, p[0]) && v.push(p[0]), v.length < 2 && y.contains(e.vertices, p[1]) && v.push(p[1])), v.length < 1 && (v = [g[0]]), h.supports = v, h } , m._overlapAxes = function(t, e, i) { for (var n, s, r = x._temp[0], o = x._temp[1], a = { overlap: Number.MAX_VALUE }, h = 0; h < i.length; h++) { if (s = i[h], m._projectToAxis(r, t, s), m._projectToAxis(o, e, s), (n = Math.min(r.max - o.min, o.max - r.min)) <= 0) return a.overlap = n, a; n < a.overlap && (a.overlap = n, a.axis = s, a.axisNumber = h) } return a } , m._projectToAxis = function(t, e, i) { for (var n = x.dot(e[0], i), s = n, r = 1; r < e.length; r += 1) { var o = x.dot(e[r], i); s < o ? s = o : o < n && (n = o) } t.min = n, t.max = s } , m._findSupports = function(t, e, i) { for (var n, s, r, o = Number.MAX_VALUE, a = x._temp[0], h = e.vertices, l = t.position, u = 0; u < h.length; u++) c = h[u], a.x = c.x - l.x, a.y = c.y - l.y, (n = -x.dot(i, a)) < o && (o = n, s = c); var c = h[0 <= s.index - 1 ? s.index - 1 : h.length - 1]; return a.x = c.x - l.x, a.y = c.y - l.y, o = -x.dot(i, a), r = c, c = h[(s.index + 1) % h.length], a.x = c.x - l.x, a.y = c.y - l.y, (n = -x.dot(i, a)) < o && (r = c), [s, r] } } , function(t, e) { var i = function() { return this }(); try { i = i || new Function("return this")() } catch (t) { "object" == typeof window && (i = window) } t.exports = i } , function(t, e, i) { i(519), i(520), i(521), i(522), i(523), i(524), i(525), i(526) } , function(t, e) { Array.prototype.forEach || (Array.prototype.forEach = function(t) { "use strict"; if (null == this) throw new TypeError; var e = Object(this) , i = e.length >>> 0; if ("function" != typeof t) throw new TypeError; for (var n = 2 <= arguments.length ? arguments[1] : void 0, s = 0; s < i; s++) s in e && t.call(n, e[s], s, e) } ) } , function(t, e) { Array.isArray || (Array.isArray = function(t) { return "[object Array]" === Object.prototype.toString.call(t) } ) } , function(t, e) { function i(t) { t && (t.setTargetAtTime || (t.setTargetAtTime = t.setTargetValueAtTime)) } window.hasOwnProperty("webkitAudioContext") && !window.hasOwnProperty("AudioContext") && (window.AudioContext = webkitAudioContext, AudioContext.prototype.hasOwnProperty("createGain") || (AudioContext.prototype.createGain = AudioContext.prototype.createGainNode), AudioContext.prototype.hasOwnProperty("createDelay") || (AudioContext.prototype.createDelay = AudioContext.prototype.createDelayNode), AudioContext.prototype.hasOwnProperty("createScriptProcessor") || (AudioContext.prototype.createScriptProcessor = AudioContext.prototype.createJavaScriptNode), AudioContext.prototype.hasOwnProperty("createPeriodicWave") || (AudioContext.prototype.createPeriodicWave = AudioContext.prototype.createWaveTable), AudioContext.prototype.internal_createGain = AudioContext.prototype.createGain, AudioContext.prototype.createGain = function() { var t = this.internal_createGain(); return i(t.gain), t } , AudioContext.prototype.internal_createDelay = AudioContext.prototype.createDelay, AudioContext.prototype.createDelay = function(t) { var e = t ? this.internal_createDelay(t) : this.internal_createDelay(); return i(e.delayTime), e } , AudioContext.prototype.internal_createBufferSource = AudioContext.prototype.createBufferSource, AudioContext.prototype.createBufferSource = function() { var n = this.internal_createBufferSource(); return n.start ? (n.internal_start = n.start, n.start = function(t, e, i) { void 0 !== i ? n.internal_start(t || 0, e, i) : n.internal_start(t || 0, e || 0) } ) : n.start = function(t, e, i) { e || i ? this.noteGrainOn(t || 0, e, i) : this.noteOn(t || 0) } , n.stop ? (n.internal_stop = n.stop, n.stop = function(t) { n.internal_stop(t || 0) } ) : n.stop = function(t) { this.noteOff(t || 0) } , i(n.playbackRate), n } , AudioContext.prototype.internal_createDynamicsCompressor = AudioContext.prototype.createDynamicsCompressor, AudioContext.prototype.createDynamicsCompressor = function() { var t = this.internal_createDynamicsCompressor(); return i(t.threshold), i(t.knee), i(t.ratio), i(t.reduction), i(t.attack), i(t.release), t } , AudioContext.prototype.internal_createBiquadFilter = AudioContext.prototype.createBiquadFilter, AudioContext.prototype.createBiquadFilter = function() { var t = this.internal_createBiquadFilter(); return i(t.frequency), i(t.detune), i(t.Q), i(t.gain), t } , AudioContext.prototype.hasOwnProperty("createOscillator") && (AudioContext.prototype.internal_createOscillator = AudioContext.prototype.createOscillator, AudioContext.prototype.createOscillator = function() { var e = this.internal_createOscillator(); return e.start ? (e.internal_start = e.start, e.start = function(t) { e.internal_start(t || 0) } ) : e.start = function(t) { this.noteOn(t || 0) } , e.stop ? (e.internal_stop = e.stop, e.stop = function(t) { e.internal_stop(t || 0) } ) : e.stop = function(t) { this.noteOff(t || 0) } , e.setPeriodicWave || (e.setPeriodicWave = e.setWaveTable), i(e.frequency), i(e.detune), e } )), window.hasOwnProperty("webkitOfflineAudioContext") && !window.hasOwnProperty("OfflineAudioContext") && (window.OfflineAudioContext = webkitOfflineAudioContext) } , function(t, e) { window.console || (window.console = {}, window.console.log = window.console.assert = function() {} , window.console.warn = window.console.assert = function() {} ) } , function(t, e) { Math.trunc || (Math.trunc = function(t) { return t < 0 ? Math.ceil(t) : Math.floor(t) } ) } , function(t, e) { var i; "performance"in window == !1 && (window.performance = {}), Date.now = Date.now || function() { return (new Date).getTime() } , "now"in window.performance == !1 && (i = Date.now(), performance.timing && performance.timing.navigationStart && (i = performance.timing.navigationStart), window.performance.now = function() { return Date.now() - i } ) } , function(t, e) { for (var n = Date.now(), i = ["ms", "moz", "webkit", "o"], s = 0; s < i.length && !window.requestAnimationFrame; s++) window.requestAnimationFrame = window[i[s] + "RequestAnimationFrame"], window.cancelAnimationFrame = window[i[s] + "CancelAnimationFrame"] || window[i[s] + "CancelRequestAnimationFrame"]; window.requestAnimationFrame || (window.requestAnimationFrame = function(t) { if ("function" != typeof t) throw new TypeError(t + "is not a function"); var e = Date.now() , i = 16 + n - e; return i < 0 && (i = 0), n = e, setTimeout(function() { n = Date.now(), t(performance.now()) }, i) } ), window.cancelAnimationFrame || (window.cancelAnimationFrame = function(t) { clearTimeout(t) } ) } , function(t, e) { var i; "function" != typeof window.Uint32Array && "object" != typeof window.Uint32Array && ((i = function(t) { var e = new Array; window[t] = function(t) { if ("number" == typeof t) { Array.call(this, t), this.length = t; for (var e = 0; e < this.length; e++) this[e] = 0 } else { Array.call(this, t.length), this.length = t.length; for (e = 0; e < this.length; e++) this[e] = t[e] } } , window[t].prototype = e, window[t].constructor = window[t] } )("Float32Array"), i("Uint32Array"), i("Uint16Array"), i("Int16Array"), i("ArrayBuffer")) } , function(t, e, i) { var a = i(242); t.exports = function(t, e, i, n) { for (var s = t[0], r = 1; r < t.length; r++) { var o = t[r]; a(o, s, e, i, n), s = o } return t } } , function(t, e, i) { var r = i(38); t.exports = function(t, e, i, n, s) { return r(t, "angle", e, i, n, s) } } , function(t, e) { t.exports = function(t, e, i) { for (var n = 0; n < t.length; n++) { var s = t[n]; e.call(i, s) } return t } } , function(t, e) { t.exports = function(t, e, i) { void 0 === i && (i = 0); for (var n = i; n < t.length; n++) { var s = t[n] , r = !0; for (var o in e) s[o] !== e[o] && (r = !1); if (r) return s } return null } } , function(t, e) { t.exports = function(t, e, i) { void 0 === i && (i = 0); for (var n = i; n < t.length; n++) { var s = t[n] , r = !0; for (var o in e) s[o] !== e[o] && (r = !1); if (r) return s } return null } } , function(t, e, i) { var v = i(255) , m = i(105) , y = i(2) , n = i(1) , x = new (i(110))({ sys: { queueDepthSort: n, events: { once: n } } },0,0,1,1); t.exports = function(t, e) { void 0 === e && (e = {}); var i = e.hasOwnProperty("width") , n = e.hasOwnProperty("height") , s = y(e, "width", -1) , r = y(e, "height", -1) , o = y(e, "cellWidth", 1) , a = y(e, "cellHeight", o) , h = y(e, "position", m.TOP_LEFT) , l = y(e, "x", 0) , u = y(e, "y", 0) , c = 0 , d = 0 , f = s * o , p = r * a; x.setPosition(l, u), x.setSize(o, a); for (var g = 0; g < t.length; g++) if (v(t[g], x, h), i && -1 === s) x.x += o; else if (n && -1 === r) x.y += a; else if (c += o, x.x += o, c === f && (c = 0, d += a, x.x = l, x.y += a, d === p)) break; return t } } , function(t, e, i) { var s = i(19) , n = { _alpha: 1, _alphaTL: 1, _alphaTR: 1, _alphaBL: 1, _alphaBR: 1, clearAlpha: function() { return this.setAlpha(1) }, setAlpha: function(t, e, i, n) { return void 0 === t && (t = 1), void 0 === e ? this.alpha = t : (this._alphaTL = s(t, 0, 1), this._alphaTR = s(e, 0, 1), this._alphaBL = s(i, 0, 1), this._alphaBR = s(n, 0, 1)), this }, alpha: { get: function() { return this._alpha }, set: function(t) { var e = s(t, 0, 1); this._alpha = e, this._alphaTL = e, this._alphaTR = e, this._alphaBL = e, 0 === (this._alphaBR = e) ? this.renderFlags &= -3 : this.renderFlags |= 2 } }, alphaTopLeft: { get: function() { return this._alphaTL }, set: function(t) { var e = s(t, 0, 1); 0 !== (this._alphaTL = e) && (this.renderFlags |= 2) } }, alphaTopRight: { get: function() { return this._alphaTR }, set: function(t) { var e = s(t, 0, 1); 0 !== (this._alphaTR = e) && (this.renderFlags |= 2) } }, alphaBottomLeft: { get: function() { return this._alphaBL }, set: function(t) { var e = s(t, 0, 1); 0 !== (this._alphaBL = e) && (this.renderFlags |= 2) } }, alphaBottomRight: { get: function() { return this._alphaBR }, set: function(t) { var e = s(t, 0, 1); 0 !== (this._alphaBR = e) && (this.renderFlags |= 2) } } }; t.exports = n } , function(t, e) { t.exports = "add" } , function(t, e) { t.exports = "complete" } , function(t, e) { t.exports = "repeat" } , function(t, e) { t.exports = "restart" } , function(t, e) { t.exports = "start" } , function(t, e) { t.exports = "pauseall" } , function(t, e) { t.exports = "remove" } , function(t, e) { t.exports = "resumeall" } , function(t, e) { t.exports = "animationcomplete" } , function(t, e) { t.exports = "animationcomplete-" } , function(t, e) { t.exports = "animationrepeat-" } , function(t, e) { t.exports = "animationrestart-" } , function(t, e) { t.exports = "animationstart-" } , function(t, e) { t.exports = "animationupdate-" } , function(t, e) { t.exports = "animationrepeat" } , function(t, e) { t.exports = "animationrestart" } , function(t, e) { t.exports = "animationstart" } , function(t, e) { t.exports = "animationupdate" } , function(t, e) { t.exports = { width: 0, height: 0, displayWidth: { get: function() { return this.scaleX * this.width }, set: function(t) { this.scaleX = t / this.width } }, displayHeight: { get: function() { return this.scaleY * this.height }, set: function(t) { this.scaleY = t / this.height } }, setSize: function(t, e) { return this.width = t, this.height = e, this }, setDisplaySize: function(t, e) { return this.displayWidth = t, this.displayHeight = e, this } } } , function(t, e) { var i = { texture: null, frame: null, isCropped: !1, setCrop: function(t, e, i, n) { return void 0 === t ? this.isCropped = !1 : this.frame && ("number" == typeof t ? this.frame.setCropUVs(this._crop, t, e, i, n, this.flipX, this.flipY) : this.frame.setCropUVs(this._crop, t.x, t.y, t.width, t.height, this.flipX, this.flipY), this.isCropped = !0), this }, resetCropObject: function() { return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: !1, flipY: !1, cx: 0, cy: 0, cw: 0, ch: 0 } } }; t.exports = i } , function(t, e) { t.exports = { flipX: !1, flipY: !1, toggleFlipX: function() { return this.flipX = !this.flipX, this }, toggleFlipY: function() { return this.flipY = !this.flipY, this }, setFlipX: function(t) { return this.flipX = t, this }, setFlipY: function(t) { return this.flipY = t, this }, setFlip: function(t, e) { return this.flipX = t, this.flipY = e, this }, resetFlip: function() { return this.flipX = !1, this.flipY = !1, this } } } , function(t, e, i) { var u = i(11) , n = i(276) , s = i(3) , r = { prepareBoundsOutput: function(t, e) { return void 0 === e && (e = !1), 0 !== this.rotation && n(t, this.x, this.y, this.rotation), e && this.parentContainer && this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x, t.y, t), t }, getCenter: function(t) { return void 0 === t && (t = new s), t.x = this.x - this.displayWidth * this.originX + this.displayWidth / 2, t.y = this.y - this.displayHeight * this.originY + this.displayHeight / 2, t }, getTopLeft: function(t, e) { return (t = t || new s).x = this.x - this.displayWidth * this.originX, t.y = this.y - this.displayHeight * this.originY, this.prepareBoundsOutput(t, e) }, getTopCenter: function(t, e) { return (t = t || new s).x = this.x - this.displayWidth * this.originX + this.displayWidth / 2, t.y = this.y - this.displayHeight * this.originY, this.prepareBoundsOutput(t, e) }, getTopRight: function(t, e) { return (t = t || new s).x = this.x - this.displayWidth * this.originX + this.displayWidth, t.y = this.y - this.displayHeight * this.originY, this.prepareBoundsOutput(t, e) }, getLeftCenter: function(t, e) { return (t = t || new s).x = this.x - this.displayWidth * this.originX, t.y = this.y - this.displayHeight * this.originY + this.displayHeight / 2, this.prepareBoundsOutput(t, e) }, getRightCenter: function(t, e) { return (t = t || new s).x = this.x - this.displayWidth * this.originX + this.displayWidth, t.y = this.y - this.displayHeight * this.originY + this.displayHeight / 2, this.prepareBoundsOutput(t, e) }, getBottomLeft: function(t, e) { return (t = t || new s).x = this.x - this.displayWidth * this.originX, t.y = this.y - this.displayHeight * this.originY + this.displayHeight, this.prepareBoundsOutput(t, e) }, getBottomCenter: function(t, e) { return (t = t || new s).x = this.x - this.displayWidth * this.originX + this.displayWidth / 2, t.y = this.y - this.displayHeight * this.originY + this.displayHeight, this.prepareBoundsOutput(t, e) }, getBottomRight: function(t, e) { return (t = t || new s).x = this.x - this.displayWidth * this.originX + this.displayWidth, t.y = this.y - this.displayHeight * this.originY + this.displayHeight, this.prepareBoundsOutput(t, e) }, getBounds: function(t) { var e, i, n, s, r, o, a, h, l; return void 0 === t && (t = new u), h = (a = (this.parentContainer ? (l = this.parentContainer.getBoundsTransformMatrix(), this.getTopLeft(t), l.transformPoint(t.x, t.y, t), e = t.x, i = t.y, this.getTopRight(t), l.transformPoint(t.x, t.y, t), n = t.x, s = t.y, this.getBottomLeft(t), l.transformPoint(t.x, t.y, t), r = t.x, o = t.y, this.getBottomRight(t), l.transformPoint(t.x, t.y, t)) : (this.getTopLeft(t), e = t.x, i = t.y, this.getTopRight(t), n = t.x, s = t.y, this.getBottomLeft(t), r = t.x, o = t.y, this.getBottomRight(t)), t.x), t.y), t.x = Math.min(e, n, r, a), t.y = Math.min(i, s, o, h), t.width = Math.max(e, n, r, a) - t.x, t.height = Math.max(i, s, o, h) - t.y, t } }; t.exports = r } , function(t, e) { t.exports = "blur" } , function(t, e) { t.exports = "boot" } , function(t, e) { t.exports = "contextlost" } , function(t, e) { t.exports = "contextrestored" } , function(t, e) { t.exports = "destroy" } , function(t, e) { t.exports = "focus" } , function(t, e) { t.exports = "hidden" } , function(t, e) { t.exports = "pause" } , function(t, e) { t.exports = "postrender" } , function(t, e) { t.exports = "poststep" } , function(t, e) { t.exports = "prerender" } , function(t, e) { t.exports = "prestep" } , function(t, e) { t.exports = "ready" } , function(t, e) { t.exports = "resume" } , function(t, e) { t.exports = "step" } , function(t, e) { t.exports = "visible" } , function(t, e) { var i = { _originComponent: !0, originX: .5, originY: .5, _displayOriginX: 0, _displayOriginY: 0, displayOriginX: { get: function() { return this._displayOriginX }, set: function(t) { this._displayOriginX = t, this.originX = t / this.width } }, displayOriginY: { get: function() { return this._displayOriginY }, set: function(t) { this._displayOriginY = t, this.originY = t / this.height } }, setOrigin: function(t, e) { return void 0 === t && (t = .5), void 0 === e && (e = t), this.originX = t, this.originY = e, this.updateDisplayOrigin() }, setOriginFromFrame: function() { return this.frame && this.frame.customPivot ? (this.originX = this.frame.pivotX, this.originY = this.frame.pivotY, this.updateDisplayOrigin()) : this.setOrigin() }, setDisplayOrigin: function(t, e) { return void 0 === t && (t = 0), void 0 === e && (e = t), this.displayOriginX = t, this.displayOriginY = e, this }, updateDisplayOrigin: function() { return this._displayOriginX = this.originX * this.width, this._displayOriginY = this.originY * this.height, this } }; t.exports = i } , function(t, e, i) { var h = i(39) , o = i(88) , a = i(6) , l = i(89) , u = i(3) , n = { path: null, rotateToPath: !1, pathRotationOffset: 0, pathOffset: null, pathVector: null, pathDelta: null, pathTween: null, pathConfig: null, _prevDirection: l.PLAYING_FORWARD, setPath: function(t, e) { void 0 === e && (e = this.pathConfig); var i = this.pathTween; return i && i.isPlaying() && i.stop(), this.path = t, e && this.startFollow(e), this }, setRotateToPath: function(t, e) { return void 0 === e && (e = 0), this.rotateToPath = t, this.pathRotationOffset = e, this }, isFollowing: function() { var t = this.pathTween; return t && t.isPlaying() }, startFollow: function(t, e) { void 0 === t && (t = {}), void 0 === e && (e = 0); var i = this.pathTween; i && i.isPlaying() && i.stop(), "number" == typeof t && (t = { duration: t }), t.from = a(t, "from", 0), t.to = a(t, "to", 1); var n = o(t, "positionOnPath", !1); this.rotateToPath = o(t, "rotateToPath", !1), this.pathRotationOffset = a(t, "rotationOffset", 0); var s, r = a(t, "startAt", e); return r && (t.onStart = function(t) { var e = t.data[0]; e.progress = r, e.elapsed = e.duration * r; var i = e.ease(e.progress); e.current = e.start + (e.end - e.start) * i, e.target[e.key] = e.current } ), this.pathOffset || (this.pathOffset = new u(this.x,this.y)), this.pathVector || (this.pathVector = new u), this.pathDelta || (this.pathDelta = new u), this.pathDelta.reset(), this.pathTween = this.scene.sys.tweens.addCounter(t), this.path.getStartPoint(this.pathOffset), n && (this.x = this.pathOffset.x, this.y = this.pathOffset.y), this.pathOffset.x = this.x - this.pathOffset.x, this.pathOffset.y = this.y - this.pathOffset.y, this._prevDirection = l.PLAYING_FORWARD, this.rotateToPath && (s = this.path.getPoint(.1), this.rotation = Math.atan2(s.y - this.y, s.x - this.x) + h(this.pathRotationOffset)), this.pathConfig = t, this }, pauseFollow: function() { var t = this.pathTween; return t && t.isPlaying() && t.pause(), this }, resumeFollow: function() { var t = this.pathTween; return t && t.isPaused() && t.resume(), this }, stopFollow: function() { var t = this.pathTween; return t && t.isPlaying() && t.stop(), this }, pathUpdate: function() { var t = this.pathTween; if (t) { var e = t.data[0] , i = this.pathDelta , n = this.pathVector; if (i.copy(n).negate(), e.state === l.COMPLETE) return this.path.getPoint(1, n), i.add(n), n.add(this.pathOffset), void this.setPosition(n.x, n.y); if (e.state !== l.PLAYING_FORWARD && e.state !== l.PLAYING_BACKWARD) return; this.path.getPoint(t.getValue(), n), i.add(n), n.add(this.pathOffset); var s = this.x , r = this.y; this.setPosition(n.x, n.y); var o = this.x - s , a = this.y - r; if (0 == o && 0 == a) return; if (e.state !== this._prevDirection) return void (this._prevDirection = e.state); this.rotateToPath && (this.rotation = Math.atan2(a, o) + h(this.pathRotationOffset)) } } }; t.exports = n } , function(t, e) { var i = { _sizeComponent: !0, width: 0, height: 0, displayWidth: { get: function() { return Math.abs(this.scaleX * this.frame.realWidth) }, set: function(t) { this.scaleX = t / this.frame.realWidth } }, displayHeight: { get: function() { return Math.abs(this.scaleY * this.frame.realHeight) }, set: function(t) { this.scaleY = t / this.frame.realHeight } }, setSizeToFrame: function(t) { return void 0 === t && (t = this.frame), this.width = t.realWidth, this.height = t.realHeight, this }, setSize: function(t, e) { return this.width = t, this.height = e, this }, setDisplaySize: function(t, e) { return this.displayWidth = t, this.displayHeight = e, this } }; t.exports = i } , function(t, e) { var i = { texture: null, frame: null, isCropped: !1, setTexture: function(t, e) { return this.texture = this.scene.sys.textures.get(t), this.setFrame(e) }, setFrame: function(t, e, i) { return void 0 === e && (e = !0), void 0 === i && (i = !0), this.frame = this.texture.get(t), this.frame.cutWidth && this.frame.cutHeight ? this.renderFlags |= 8 : this.renderFlags &= -9, this._sizeComponent && e && this.setSizeToFrame(), this._originComponent && i && (this.frame.customPivot ? this.setOrigin(this.frame.pivotX, this.frame.pivotY) : this.updateDisplayOrigin()), this } }; t.exports = i } , function(t, e) { var i = { texture: null, frame: null, isCropped: !1, setCrop: function(t, e, i, n) { return void 0 === t ? this.isCropped = !1 : this.frame && ("number" == typeof t ? this.frame.setCropUVs(this._crop, t, e, i, n, this.flipX, this.flipY) : this.frame.setCropUVs(this._crop, t.x, t.y, t.width, t.height, this.flipX, this.flipY), this.isCropped = !0), this }, setTexture: function(t, e) { return this.texture = this.scene.sys.textures.get(t), this.setFrame(e) }, setFrame: function(t, e, i) { return void 0 === e && (e = !0), void 0 === i && (i = !0), this.frame = this.texture.get(t), this.frame.cutWidth && this.frame.cutHeight ? this.renderFlags |= 8 : this.renderFlags &= -9, this._sizeComponent && e && this.setSizeToFrame(), this._originComponent && i && (this.frame.customPivot ? this.setOrigin(this.frame.pivotX, this.frame.pivotY) : this.updateDisplayOrigin()), this.isCropped && this.frame.updateCropUVs(this._crop, this.flipX, this.flipY), this }, resetCropObject: function() { return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: !1, flipY: !1, cx: 0, cy: 0, cw: 0, ch: 0 } } }; t.exports = i } , function(t, e) { function s(t) { return (t >> 16) + (65280 & t) + ((255 & t) << 16) } var i = { _tintTL: 16777215, _tintTR: 16777215, _tintBL: 16777215, _tintBR: 16777215, _isTinted: !1, tintFill: !1, clearTint: function() { return this.setTint(16777215), this._isTinted = !1, this }, setTint: function(t, e, i, n) { return void 0 === t && (t = 16777215), void 0 === e && (n = i = e = t), this._tintTL = s(t), this._tintTR = s(e), this._tintBL = s(i), this._tintBR = s(n), this._isTinted = !0, this.tintFill = !1, this }, setTintFill: function(t, e, i, n) { return this.setTint(t, e, i, n), this.tintFill = !0, this }, tintTopLeft: { get: function() { return this._tintTL }, set: function(t) { this._tintTL = s(t), this._isTinted = !0 } }, tintTopRight: { get: function() { return this._tintTR }, set: function(t) { this._tintTR = s(t), this._isTinted = !0 } }, tintBottomLeft: { get: function() { return this._tintBL }, set: function(t) { this._tintBL = s(t), this._isTinted = !0 } }, tintBottomRight: { get: function() { return this._tintBR }, set: function(t) { this._tintBR = s(t), this._isTinted = !0 } }, tint: { set: function(t) { this.setTint(t, t, t, t) } }, isTinted: { get: function() { return this._isTinted } } }; t.exports = i } , function(t, e) { t.exports = "changedata" } , function(t, e) { t.exports = "changedata-" } , function(t, e) { t.exports = "removedata" } , function(t, e) { t.exports = "setdata" } , function(t, e) { t.exports = "destroy" } , function(t, e) { t.exports = "complete" } , function(t, e) { t.exports = "created" } , function(t, e) { t.exports = "error" } , function(t, e) { t.exports = "loop" } , function(t, e) { t.exports = "play" } , function(t, e) { t.exports = "seeked" } , function(t, e) { t.exports = "seeking" } , function(t, e) { t.exports = "stop" } , function(t, e) { t.exports = "timeout" } , function(t, e) { t.exports = "unlocked" } , function(t, e, i) { var r = i(38); t.exports = function(t, e, i, n, s) { return r(t, "alpha", e, i, n, s) } } , function(t, e, i) { var r = i(38); t.exports = function(t, e, i, n, s) { return r(t, "x", e, i, n, s) } } , function(t, e, i) { var a = i(38); t.exports = function(t, e, i, n, s, r, o) { return null == i && (i = e), a(t, "x", e, n, r, o), a(t, "y", i, s, r, o) } } , function(t, e, i) { var r = i(38); t.exports = function(t, e, i, n, s) { return r(t, "y", e, i, n, s) } } , function(t, e) { t.exports = function(t, e, i, n) { void 0 === i && (i = 0), void 0 === n && (n = 6.28); for (var s = i, r = (n - i) / t.length, o = 0; o < t.length; o++) t[o].x = e.x + e.radius * Math.cos(s), t[o].y = e.y + e.radius * Math.sin(s), s += r; return t } } , function(t, e) { t.exports = function(t, e, i, n) { void 0 === i && (i = 0), void 0 === n && (n = 6.28); for (var s = i, r = (n - i) / t.length, o = e.width / 2, a = e.height / 2, h = 0; h < t.length; h++) t[h].x = e.x + o * Math.cos(s), t[h].y = e.y + a * Math.sin(s), s += r; return t } } , function(t, e, i) { var o = i(153); t.exports = function(t, e) { for (var i = o(e, t.length), n = 0; n < t.length; n++) { var s = t[n] , r = i[n]; s.x = r.x, s.y = r.y } return t } } , function(t, e, i) { var r = i(285) , o = i(286) , a = i(287); t.exports = function(t, e, i) { void 0 === i && (i = 0); var n = r(e, !1, t.length); 0 < i ? o(n, i) : i < 0 && a(n, Math.abs(i)); for (var s = 0; s < t.length; s++) t[s].x = n[s].x, t[s].y = n[s].y; return t } } , function(t, e, i) { var c = i(288); t.exports = function(t, e, i) { var n = c({ x1: e.x1, y1: e.y1, x2: e.x2, y2: e.y2 }, i) , s = c({ x1: e.x2, y1: e.y2, x2: e.x3, y2: e.y3 }, i) , r = c({ x1: e.x3, y1: e.y3, x2: e.x1, y2: e.y1 }, i); n.pop(), s.pop(), r.pop(); for (var o = (n = n.concat(s, r)).length / t.length, a = 0, h = 0; h < t.length; h++) { var l = t[h] , u = n[Math.floor(a)]; l.x = u.x, l.y = u.y, a += o } return t } } , function(t, e) { t.exports = function(t, e, i) { for (var n = 0; n < t.length; n++) t[n].anims.play(e, i); return t } } , function(t, e, i) { var n = i(150); t.exports = function(t, e) { for (var i = 0; i < t.length; i++) n(e, t[i]); return t } } , function(t, e, i) { var n = i(157); t.exports = function(t, e) { for (var i = 0; i < t.length; i++) n(e, t[i]); return t } } , function(t, e, i) { var n = i(154); t.exports = function(t, e) { for (var i = 0; i < t.length; i++) n(e, t[i]); return t } } , function(t, e, i) { var n = i(155); t.exports = function(t, e) { for (var i = 0; i < t.length; i++) n(e, t[i]); return t } } , function(t, e, i) { var n = i(158); t.exports = function(t, e) { for (var i = 0; i < t.length; i++) n(e, t[i]); return t } } , function(t, e, i) { var r = i(38); t.exports = function(t, e, i, n, s) { return r(t, "rotation", e, i, n, s) } } , function(t, e, i) { var a = i(159) , h = i(53); t.exports = function(t, e, i) { for (var n = e.x, s = e.y, r = 0; r < t.length; r++) { var o = t[r]; a(o, n, s, i, Math.max(1, h(o.x, o.y, n, s))) } return t } } , function(t, e, i) { var a = i(159); t.exports = function(t, e, i, n) { var s = e.x , r = e.y; if (0 === n) return t; for (var o = 0; o < t.length; o++) a(t[o], s, r, i, n); return t } } , function(t, e, i) { var r = i(38); t.exports = function(t, e, i, n, s) { return r(t, "scaleX", e, i, n, s) } } , function(t, e, i) { var a = i(38); t.exports = function(t, e, i, n, s, r, o) { return null == i && (i = e), a(t, "scaleX", e, n, r, o), a(t, "scaleY", i, s, r, o) } } , function(t, e, i) { var r = i(38); t.exports = function(t, e, i, n, s) { return r(t, "scaleY", e, i, n, s) } } , function(t, e, i) { var r = i(25); t.exports = function(t, e, i, n, s) { return r(t, "alpha", e, i, n, s) } } , function(t, e, i) { var s = i(25); t.exports = function(t, e, i, n) { return s(t, "blendMode", e, 0, i, n) } } , function(t, e, i) { var r = i(25); t.exports = function(t, e, i, n, s) { return r(t, "depth", e, i, n, s) } } , function(t, e) { t.exports = function(t, e, i) { for (var n = 0; n < t.length; n++) t[n].setInteractive(e, i); return t } } , function(t, e, i) { var a = i(25); t.exports = function(t, e, i, n, s, r, o) { return null == i && (i = e), a(t, "originX", e, n, r, o), a(t, "originY", i, s, r, o) } } , function(t, e, i) { var r = i(25); t.exports = function(t, e, i, n, s) { return r(t, "rotation", e, i, n, s) } } , function(t, e, i) { var a = i(25); t.exports = function(t, e, i, n, s, r, o) { return null == i && (i = e), a(t, "scaleX", e, n, r, o), a(t, "scaleY", i, s, r, o) } } , function(t, e, i) { var r = i(25); t.exports = function(t, e, i, n, s) { return r(t, "scaleX", e, i, n, s) } } , function(t, e, i) { var r = i(25); t.exports = function(t, e, i, n, s) { return r(t, "scaleY", e, i, n, s) } } , function(t, e, i) { var a = i(25); t.exports = function(t, e, i, n, s, r, o) { return null == i && (i = e), a(t, "scrollFactorX", e, n, r, o), a(t, "scrollFactorY", i, s, r, o) } } , function(t, e, i) { var r = i(25); t.exports = function(t, e, i, n, s) { return r(t, "scrollFactorX", e, i, n, s) } } , function(t, e, i) { var r = i(25); t.exports = function(t, e, i, n, s) { return r(t, "scrollFactorY", e, i, n, s) } } , function(t, e) { t.exports = function(t, e, i, n, s) { for (var r = 0; r < t.length; r++) t[r].setTint(e, i, n, s); return t } } , function(t, e, i) { var s = i(25); t.exports = function(t, e, i, n) { return s(t, "visible", e, 0, i, n) } } , function(t, e, i) { var r = i(25); t.exports = function(t, e, i, n, s) { return r(t, "x", e, i, n, s) } } , function(t, e, i) { var a = i(25); t.exports = function(t, e, i, n, s, r, o) { return null == i && (i = e), a(t, "x", e, n, r, o), a(t, "y", i, s, r, o) } } , function(t, e, i) { var r = i(25); t.exports = function(t, e, i, n, s) { return r(t, "y", e, i, n, s) } } , function(t, e, i) { var d = i(3); t.exports = function(t, e, i, n, s) { var r, o, a; if (void 0 === n && (n = 0), void 0 === s && (s = new d), 1 < t.length) if (0 === n) { for (var h = t.length - 1, l = t[h].x, u = t[h].y, c = h - 1; 0 <= c; c--) r = (a = t[c]).x, o = a.y, a.x = l, a.y = u, l = r, u = o; t[h].x = e, t[h].y = i } else { for (l = t[0].x, u = t[0].y, c = 1; c < t.length; c++) r = (a = t[c]).x, o = a.y, a.x = l, a.y = u, l = r, u = o; t[0].x = e, t[0].y = i } else l = t[0].x, u = t[0].y, t[0].x = e, t[0].y = i; return s.x = l, s.y = u, s } } , function(t, e, i) { var n = i(114); t.exports = function(t) { return n(t) } } , function(t, e, i) { var a = i(160); t.exports = function(t, e, i, n, s) { void 0 === s && (s = !1); var r, o = Math.abs(n - i) / t.length; if (s) for (r = 0; r < t.length; r++) t[r][e] += a(r * o, i, n); else for (r = 0; r < t.length; r++) t[r][e] = a(r * o, i, n); return t } } , function(t, e, i) { var a = i(161); t.exports = function(t, e, i, n, s) { void 0 === s && (s = !1); var r, o = Math.abs(n - i) / t.length; if (s) for (r = 0; r < t.length; r++) t[r][e] += a(r * o, i, n); else for (r = 0; r < t.length; r++) t[r][e] = a(r * o, i, n); return t } } , function(t, e) { t.exports = function(t, e, i, n, s) { void 0 === s && (s = !1); var r, o = Math.abs(n - i) / t.length; if (s) for (r = 0; r < t.length; r++) t[r][e] += r * o + i; else for (r = 0; r < t.length; r++) t[r][e] = r * o + i; return t } } , function(t, e) { t.exports = function(t) { for (var e = 0; e < t.length; e++) t[e].visible = !t[e].visible; return t } } , function(t, e, i) { var r = i(58); t.exports = function(t, e, i) { void 0 === i && (i = 0); for (var n = 0; n < t.length; n++) { var s = t[n]; s.x = r(s.x, e.left - i, e.right + i), s.y = r(s.y, e.top - i, e.bottom + i) } return t } } , function(t, e, i) { t.exports = { Animation: i(151), AnimationFrame: i(271), AnimationManager: i(289), Events: i(111) } } , function(t, e, i) { t.exports = { BaseCache: i(290), CacheManager: i(292), Events: i(291) } } , function(t, e) { t.exports = "add" } , function(t, e) { t.exports = "remove" } , function(t, e, i) { t.exports = { Controls: i(643), Scene2D: i(646) } } , function(t, e, i) { t.exports = { FixedKeyControl: i(644), SmoothedKeyControl: i(645) } } , function(t, e, i) { var n = i(0) , s = i(6) , r = new n({ initialize: function(t) { this.camera = s(t, "camera", null), this.left = s(t, "left", null), this.right = s(t, "right", null), this.up = s(t, "up", null), this.down = s(t, "down", null), this.zoomIn = s(t, "zoomIn", null), this.zoomOut = s(t, "zoomOut", null), this.zoomSpeed = s(t, "zoomSpeed", .01), this.speedX = 0, this.speedY = 0; var e = s(t, "speed", null); "number" == typeof e ? (this.speedX = e, this.speedY = e) : (this.speedX = s(t, "speed.x", 0), this.speedY = s(t, "speed.y", 0)), this._zoom = 0, this.active = null !== this.camera }, start: function() { return this.active = null !== this.camera, this }, stop: function() { return this.active = !1, this }, setCamera: function(t) { return this.camera = t, this }, update: function(t) { var e; this.active && (void 0 === t && (t = 1), e = this.camera, this.up && this.up.isDown ? e.scrollY -= this.speedY * t | 0 : this.down && this.down.isDown && (e.scrollY += this.speedY * t | 0), this.left && this.left.isDown ? e.scrollX -= this.speedX * t | 0 : this.right && this.right.isDown && (e.scrollX += this.speedX * t | 0), this.zoomIn && this.zoomIn.isDown ? (e.zoom -= this.zoomSpeed, e.zoom < .1 && (e.zoom = .1)) : this.zoomOut && this.zoomOut.isDown && (e.zoom += this.zoomSpeed)) }, destroy: function() { this.camera = null, this.left = null, this.right = null, this.up = null, this.down = null, this.zoomIn = null, this.zoomOut = null } }); t.exports = r } , function(t, e, i) { var n = i(0) , s = i(6) , r = new n({ initialize: function(t) { this.camera = s(t, "camera", null), this.left = s(t, "left", null), this.right = s(t, "right", null), this.up = s(t, "up", null), this.down = s(t, "down", null), this.zoomIn = s(t, "zoomIn", null), this.zoomOut = s(t, "zoomOut", null), this.zoomSpeed = s(t, "zoomSpeed", .01), this.accelX = 0, this.accelY = 0; var e = s(t, "acceleration", null); "number" == typeof e ? (this.accelX = e, this.accelY = e) : (this.accelX = s(t, "acceleration.x", 0), this.accelY = s(t, "acceleration.y", 0)), this.dragX = 0, this.dragY = 0; var i = s(t, "drag", null); "number" == typeof i ? (this.dragX = i, this.dragY = i) : (this.dragX = s(t, "drag.x", 0), this.dragY = s(t, "drag.y", 0)), this.maxSpeedX = 0, this.maxSpeedY = 0; var n = s(t, "maxSpeed", null); "number" == typeof n ? (this.maxSpeedX = n, this.maxSpeedY = n) : (this.maxSpeedX = s(t, "maxSpeed.x", 0), this.maxSpeedY = s(t, "maxSpeed.y", 0)), this._speedX = 0, this._speedY = 0, this._zoom = 0, this.active = null !== this.camera }, start: function() { return this.active = null !== this.camera, this }, stop: function() { return this.active = !1, this }, setCamera: function(t) { return this.camera = t, this }, update: function(t) { var e; this.active && (void 0 === t && (t = 1), e = this.camera, 0 < this._speedX ? (this._speedX -= this.dragX * t, this._speedX < 0 && (this._speedX = 0)) : this._speedX < 0 && (this._speedX += this.dragX * t, 0 < this._speedX && (this._speedX = 0)), 0 < this._speedY ? (this._speedY -= this.dragY * t, this._speedY < 0 && (this._speedY = 0)) : this._speedY < 0 && (this._speedY += this.dragY * t, 0 < this._speedY && (this._speedY = 0)), this.up && this.up.isDown ? (this._speedY += this.accelY, this._speedY > this.maxSpeedY && (this._speedY = this.maxSpeedY)) : this.down && this.down.isDown && (this._speedY -= this.accelY, this._speedY < -this.maxSpeedY && (this._speedY = -this.maxSpeedY)), this.left && this.left.isDown ? (this._speedX += this.accelX, this._speedX > this.maxSpeedX && (this._speedX = this.maxSpeedX)) : this.right && this.right.isDown && (this._speedX -= this.accelX, this._speedX < -this.maxSpeedX && (this._speedX = -this.maxSpeedX)), this.zoomIn && this.zoomIn.isDown ? this._zoom = -this.zoomSpeed : this.zoomOut && this.zoomOut.isDown ? this._zoom = this.zoomSpeed : this._zoom = 0, 0 !== this._speedX && (e.scrollX -= this._speedX * t | 0), 0 !== this._speedY && (e.scrollY -= this._speedY * t | 0), 0 !== this._zoom && (e.zoom += this._zoom, e.zoom < .001 && (e.zoom = .001))) }, destroy: function() { this.camera = null, this.left = null, this.right = null, this.up = null, this.down = null, this.zoomIn = null, this.zoomOut = null } }); t.exports = r } , function(t, e, i) { t.exports = { Camera: i(293), BaseCamera: i(91), CameraManager: i(702), Effects: i(301), Events: i(40) } } , function(t, e) { t.exports = "cameradestroy" } , function(t, e) { t.exports = "camerafadeincomplete" } , function(t, e) { t.exports = "camerafadeinstart" } , function(t, e) { t.exports = "camerafadeoutcomplete" } , function(t, e) { t.exports = "camerafadeoutstart" } , function(t, e) { t.exports = "cameraflashcomplete" } , function(t, e) { t.exports = "cameraflashstart" } , function(t, e) { t.exports = "camerapancomplete" } , function(t, e) { t.exports = "camerapanstart" } , function(t, e) { t.exports = "postrender" } , function(t, e) { t.exports = "prerender" } , function(t, e) { t.exports = "camerarotatecomplete" } , function(t, e) { t.exports = "camerarotatestart" } , function(t, e) { t.exports = "camerashakecomplete" } , function(t, e) { t.exports = "camerashakestart" } , function(t, e) { t.exports = "camerazoomcomplete" } , function(t, e) { t.exports = "camerazoomstart" } , function(t, e, i) { var n = i(19) , s = i(0) , l = i(40) , r = new s({ initialize: function(t) { this.camera = t, this.isRunning = !1, this.isComplete = !1, this.direction = !0, this.duration = 0, this.red = 0, this.green = 0, this.blue = 0, this.alpha = 0, this.progress = 0, this._elapsed = 0, this._onUpdate, this._onUpdateScope }, start: function(t, e, i, n, s, r, o, a) { if (void 0 === t && (t = !0), void 0 === e && (e = 1e3), void 0 === i && (i = 0), void 0 === n && (n = 0), void 0 === s && (s = 0), void 0 === r && (r = !1), void 0 === o && (o = null), void 0 === a && (a = this.camera.scene), !r && this.isRunning) return this.camera; this.isRunning = !0, this.isComplete = !1, this.duration = e, this.direction = t, this.progress = 0, this.red = i, this.green = n, this.blue = s, this.alpha = t ? Number.MIN_VALUE : 1, this._elapsed = 0, this._onUpdate = o, this._onUpdateScope = a; var h = t ? l.FADE_OUT_START : l.FADE_IN_START; return this.camera.emit(h, this.camera, this, e, i, n, s), this.camera }, update: function(t, e) { this.isRunning && (this._elapsed += e, this.progress = n(this._elapsed / this.duration, 0, 1), this._onUpdate && this._onUpdate.call(this._onUpdateScope, this.camera, this.progress), this._elapsed < this.duration ? this.alpha = this.direction ? this.progress : 1 - this.progress : (this.alpha = this.direction ? 1 : 0, this.effectComplete())) }, postRenderCanvas: function(t) { if (!this.isRunning && !this.isComplete) return !1; var e = this.camera; return t.fillStyle = "rgba(" + this.red + "," + this.green + "," + this.blue + "," + this.alpha + ")", t.fillRect(e._cx, e._cy, e._cw, e._ch), !0 }, postRenderWebGL: function(t, e) { if (!this.isRunning && !this.isComplete) return !1; var i = this.camera , n = this.red / 255 , s = this.blue / 255 , r = this.green / 255; return t.drawFillRect(i._cx, i._cy, i._cw, i._ch, e(n, r, s, 1), this.alpha), !0 }, effectComplete: function() { this._onUpdate = null, this._onUpdateScope = null, this.isRunning = !1, this.isComplete = !0; var t = this.direction ? l.FADE_OUT_COMPLETE : l.FADE_IN_COMPLETE; this.camera.emit(t, this.camera, this) }, reset: function() { this.isRunning = !1, this.isComplete = !1, this._onUpdate = null, this._onUpdateScope = null }, destroy: function() { this.reset(), this.camera = null } }); t.exports = r } , function(t, e, i) { var n = i(19) , s = i(0) , a = i(40) , r = new s({ initialize: function(t) { this.camera = t, this.isRunning = !1, this.duration = 0, this.red = 0, this.green = 0, this.blue = 0, this.alpha = 0, this.progress = 0, this._elapsed = 0, this._onUpdate, this._onUpdateScope }, start: function(t, e, i, n, s, r, o) { return void 0 === t && (t = 250), void 0 === e && (e = 255), void 0 === i && (i = 255), void 0 === n && (n = 255), void 0 === s && (s = !1), void 0 === r && (r = null), void 0 === o && (o = this.camera.scene), !s && this.isRunning || (this.isRunning = !0, this.duration = t, this.progress = 0, this.red = e, this.green = i, this.blue = n, this.alpha = 1, this._elapsed = 0, this._onUpdate = r, this._onUpdateScope = o, this.camera.emit(a.FLASH_START, this.camera, this, t, e, i, n)), this.camera }, update: function(t, e) { this.isRunning && (this._elapsed += e, this.progress = n(this._elapsed / this.duration, 0, 1), this._onUpdate && this._onUpdate.call(this._onUpdateScope, this.camera, this.progress), this._elapsed < this.duration ? this.alpha = 1 - this.progress : this.effectComplete()) }, postRenderCanvas: function(t) { if (!this.isRunning) return !1; var e = this.camera; return t.fillStyle = "rgba(" + this.red + "," + this.green + "," + this.blue + "," + this.alpha + ")", t.fillRect(e._cx, e._cy, e._cw, e._ch), !0 }, postRenderWebGL: function(t, e) { if (!this.isRunning) return !1; var i = this.camera , n = this.red / 255 , s = this.blue / 255 , r = this.green / 255; return t.drawFillRect(i._cx, i._cy, i._cw, i._ch, e(n, r, s, 1), this.alpha), !0 }, effectComplete: function() { this._onUpdate = null, this._onUpdateScope = null, this.isRunning = !1, this.camera.emit(a.FLASH_COMPLETE, this.camera, this) }, reset: function() { this.isRunning = !1, this._onUpdate = null, this._onUpdateScope = null }, destroy: function() { this.reset(), this.camera = null } }); t.exports = r } , function(t, e, i) { var a = i(19) , n = i(0) , h = i(115) , l = i(40) , s = i(3) , r = new n({ initialize: function(t) { this.camera = t, this.isRunning = !1, this.duration = 0, this.source = new s, this.current = new s, this.destination = new s, this.ease, this.progress = 0, this._elapsed = 0, this._onUpdate, this._onUpdateScope }, start: function(t, e, i, n, s, r, o) { void 0 === i && (i = 1e3), void 0 === n && (n = h.Linear), void 0 === s && (s = !1), void 0 === r && (r = null), void 0 === o && (o = this.camera.scene); var a = this.camera; return !s && this.isRunning || (this.isRunning = !0, this.duration = i, this.progress = 0, this.source.set(a.scrollX, a.scrollY), this.destination.set(t, e), a.getScroll(t, e, this.current), "string" == typeof n && h.hasOwnProperty(n) ? this.ease = h[n] : "function" == typeof n && (this.ease = n), this._elapsed = 0, this._onUpdate = r, this._onUpdateScope = o, this.camera.emit(l.PAN_START, this.camera, this, i, t, e)), a }, update: function(t, e) { var i, n, s, r, o; this.isRunning && (this._elapsed += e, i = a(this._elapsed / this.duration, 0, 1), this.progress = i, n = this.camera, this._elapsed < this.duration ? (s = this.ease(i), n.getScroll(this.destination.x, this.destination.y, this.current), r = this.source.x + (this.current.x - this.source.x) * s, o = this.source.y + (this.current.y - this.source.y) * s, n.setScroll(r, o), this._onUpdate && this._onUpdate.call(this._onUpdateScope, n, i, r, o)) : (n.centerOn(this.destination.x, this.destination.y), this._onUpdate && this._onUpdate.call(this._onUpdateScope, n, i, n.scrollX, n.scrollY), this.effectComplete())) }, effectComplete: function() { this._onUpdate = null, this._onUpdateScope = null, this.isRunning = !1, this.camera.emit(l.PAN_COMPLETE, this.camera, this) }, reset: function() { this.isRunning = !1, this._onUpdate = null, this._onUpdateScope = null }, destroy: function() { this.reset(), this.camera = null, this.source = null, this.destination = null } }); t.exports = r } , function(t, e) { t.exports = function(t, e) { return void 0 === e && (e = 1.70158), t * t * ((e + 1) * t - e) } } , function(t, e) { t.exports = function(t, e) { return void 0 === e && (e = 1.70158), --t * t * ((e + 1) * t + e) + 1 } } , function(t, e) { t.exports = function(t, e) { void 0 === e && (e = 1.70158); var i = 1.525 * e; return (t *= 2) < 1 ? t * t * ((1 + i) * t - i) * .5 : .5 * ((t -= 2) * t * ((1 + i) * t + i) + 2) } } , function(t, e) { t.exports = function(t) { return (t = 1 - t) < 1 / 2.75 ? 1 - 7.5625 * t * t : t < 2 / 2.75 ? 1 - (7.5625 * (t -= 1.5 / 2.75) * t + .75) : t < 2.5 / 2.75 ? 1 - (7.5625 * (t -= 2.25 / 2.75) * t + .9375) : 1 - (7.5625 * (t -= 2.625 / 2.75) * t + .984375) } } , function(t, e) { t.exports = function(t) { return t < 1 / 2.75 ? 7.5625 * t * t : t < 2 / 2.75 ? 7.5625 * (t -= 1.5 / 2.75) * t + .75 : t < 2.5 / 2.75 ? 7.5625 * (t -= 2.25 / 2.75) * t + .9375 : 7.5625 * (t -= 2.625 / 2.75) * t + .984375 } } , function(t, e) { t.exports = function(t) { var e = !1; return t < .5 ? (t = 1 - 2 * t, e = !0) : t = 2 * t - 1, t < 1 / 2.75 ? t *= 7.5625 * t : t = t < 2 / 2.75 ? 7.5625 * (t -= 1.5 / 2.75) * t + .75 : t < 2.5 / 2.75 ? 7.5625 * (t -= 2.25 / 2.75) * t + .9375 : 7.5625 * (t -= 2.625 / 2.75) * t + .984375, e ? .5 * (1 - t) : .5 * t + .5 } } , function(t, e) { t.exports = function(t) { return 1 - Math.sqrt(1 - t * t) } } , function(t, e) { t.exports = function(t) { return Math.sqrt(1 - --t * t) } } , function(t, e) { t.exports = function(t) { return (t *= 2) < 1 ? -.5 * (Math.sqrt(1 - t * t) - 1) : .5 * (Math.sqrt(1 - (t -= 2) * t) + 1) } } , function(t, e) { t.exports = function(t) { return t * t * t } } , function(t, e) { t.exports = function(t) { return --t * t * t + 1 } } , function(t, e) { t.exports = function(t) { return (t *= 2) < 1 ? .5 * t * t * t : .5 * ((t -= 2) * t * t + 2) } } , function(t, e) { t.exports = function(t, e, i) { if (void 0 === e && (e = .1), void 0 === i && (i = .1), 0 === t) return 0; if (1 === t) return 1; var n = i / 4; return e < 1 ? e = 1 : n = i * Math.asin(1 / e) / (2 * Math.PI), -(e * Math.pow(2, 10 * --t) * Math.sin((t - n) * (2 * Math.PI) / i)) } } , function(t, e) { t.exports = function(t, e, i) { if (void 0 === e && (e = .1), void 0 === i && (i = .1), 0 === t) return 0; if (1 === t) return 1; var n = i / 4; return e < 1 ? e = 1 : n = i * Math.asin(1 / e) / (2 * Math.PI), e * Math.pow(2, -10 * t) * Math.sin((t - n) * (2 * Math.PI) / i) + 1 } } , function(t, e) { t.exports = function(t, e, i) { if (void 0 === e && (e = .1), void 0 === i && (i = .1), 0 === t) return 0; if (1 === t) return 1; var n = i / 4; return e < 1 ? e = 1 : n = i * Math.asin(1 / e) / (2 * Math.PI), (t *= 2) < 1 ? e * Math.pow(2, 10 * --t) * Math.sin((t - n) * (2 * Math.PI) / i) * -.5 : e * Math.pow(2, -10 * --t) * Math.sin((t - n) * (2 * Math.PI) / i) * .5 + 1 } } , function(t, e) { t.exports = function(t) { return Math.pow(2, 10 * (t - 1)) - .001 } } , function(t, e) { t.exports = function(t) { return 1 - Math.pow(2, -10 * t) } } , function(t, e) { t.exports = function(t) { return (t *= 2) < 1 ? .5 * Math.pow(2, 10 * (t - 1)) : .5 * (2 - Math.pow(2, -10 * (t - 1))) } } , function(t, e) { t.exports = function(t) { return t } } , function(t, e) { t.exports = function(t) { return t * t } } , function(t, e) { t.exports = function(t) { return t * (2 - t) } } , function(t, e) { t.exports = function(t) { return (t *= 2) < 1 ? .5 * t * t : -.5 * (--t * (t - 2) - 1) } } , function(t, e) { t.exports = function(t) { return t * t * t * t } } , function(t, e) { t.exports = function(t) { return 1 - --t * t * t * t } } , function(t, e) { t.exports = function(t) { return (t *= 2) < 1 ? .5 * t * t * t * t : -.5 * ((t -= 2) * t * t * t - 2) } } , function(t, e) { t.exports = function(t) { return t * t * t * t * t } } , function(t, e) { t.exports = function(t) { return --t * t * t * t * t + 1 } } , function(t, e) { t.exports = function(t) { return (t *= 2) < 1 ? .5 * t * t * t * t * t : .5 * ((t -= 2) * t * t * t * t + 2) } } , function(t, e) { t.exports = function(t) { return 0 === t ? 0 : 1 === t ? 1 : 1 - Math.cos(t * Math.PI / 2) } } , function(t, e) { t.exports = function(t) { return 0 === t ? 0 : 1 === t ? 1 : Math.sin(t * Math.PI / 2) } } , function(t, e) { t.exports = function(t) { return 0 === t ? 0 : 1 === t ? 1 : .5 * (1 - Math.cos(Math.PI * t)) } } , function(t, e) { t.exports = function(t, e) { return void 0 === e && (e = 1), t <= 0 ? 0 : 1 <= t ? 1 : 1 / e * (1 + (e * t | 0)) } } , function(t, e, i) { var o = i(19) , n = i(0) , r = i(40) , s = i(3) , a = new n({ initialize: function(t) { this.camera = t, this.isRunning = !1, this.duration = 0, this.intensity = new s, this.progress = 0, this._elapsed = 0, this._offsetX = 0, this._offsetY = 0, this._onUpdate, this._onUpdateScope }, start: function(t, e, i, n, s) { return void 0 === t && (t = 100), void 0 === e && (e = .05), void 0 === i && (i = !1), void 0 === n && (n = null), void 0 === s && (s = this.camera.scene), !i && this.isRunning || (this.isRunning = !0, this.duration = t, this.progress = 0, "number" == typeof e ? this.intensity.set(e) : this.intensity.set(e.x, e.y), this._elapsed = 0, this._offsetX = 0, this._offsetY = 0, this._onUpdate = n, this._onUpdateScope = s, this.camera.emit(r.SHAKE_START, this.camera, this, t, e)), this.camera }, preRender: function() { this.isRunning && this.camera.matrix.translate(this._offsetX, this._offsetY) }, update: function(t, e) { var i, n, s, r; this.isRunning && (this._elapsed += e, this.progress = o(this._elapsed / this.duration, 0, 1), this._onUpdate && this._onUpdate.call(this._onUpdateScope, this.camera, this.progress), this._elapsed < this.duration ? (i = this.intensity, n = this.camera._cw, s = this.camera._ch, r = this.camera.zoom, this._offsetX = (Math.random() * i.x * n * 2 - i.x * n) * r, this._offsetY = (Math.random() * i.y * s * 2 - i.y * s) * r, this.camera.roundPixels && (this._offsetX = Math.round(this._offsetX), this._offsetY = Math.round(this._offsetY))) : this.effectComplete()) }, effectComplete: function() { this._offsetX = 0, this._offsetY = 0, this._onUpdate = null, this._onUpdateScope = null, this.isRunning = !1, this.camera.emit(r.SHAKE_COMPLETE, this.camera, this) }, reset: function() { this.isRunning = !1, this._offsetX = 0, this._offsetY = 0, this._onUpdate = null, this._onUpdateScope = null }, destroy: function() { this.reset(), this.camera = null, this.intensity = null } }); t.exports = a } , function(t, e, i) { var u = i(19) , n = i(0) , d = i(40) , f = i(115) , s = new n({ initialize: function(t) { this.camera = t, this.isRunning = !1, this.duration = 0, this.source = 0, this.current = 0, this.destination = 0, this.ease, this.progress = 0, this._elapsed = 0, this._onUpdate, this._onUpdateScope, this.clockwise = !0, this.shortestPath = !1 }, start: function(t, e, i, n, s, r, o) { void 0 === i && (i = 1e3), void 0 === n && (n = f.Linear), void 0 === s && (s = !1), void 0 === r && (r = null), void 0 === o && (o = this.camera.scene), void 0 === e && (e = !1), this.shortestPath = e; var a = t; t < 0 ? (a = -1 * t, this.clockwise = !1) : this.clockwise = !0; var h = 360 * Math.PI / 180; a -= Math.floor(a / h) * h; var l, u, c = this.camera; return !s && this.isRunning || (this.isRunning = !0, this.duration = i, this.progress = 0, this.source = c.rotation, this.destination = a, "string" == typeof n && f.hasOwnProperty(n) ? this.ease = f[n] : "function" == typeof n && (this.ease = n), this._elapsed = 0, this._onUpdate = r, this._onUpdateScope = o, this.shortestPath && (u = l = 0, (l = this.destination > this.source ? Math.abs(this.destination - this.source) : Math.abs(this.destination + h) - this.source) < (u = this.source > this.destination ? Math.abs(this.source - this.destination) : Math.abs(this.source + h) - this.destination) ? this.clockwise = !0 : u < l && (this.clockwise = !1)), this.camera.emit(d.ROTATE_START, this.camera, this, i, a)), c }, update: function(t, e) { var i, n, s, r, o, a, h, l; this.isRunning && (this._elapsed += e, i = u(this._elapsed / this.duration, 0, 1), this.progress = i, n = this.camera, this._elapsed < this.duration ? (s = this.ease(i), this.current = n.rotation, r = 0, o = 360 * Math.PI / 180, a = this.destination, h = this.current, !1 === this.clockwise && (a = this.current, h = this.destination), r = h <= a ? Math.abs(a - h) : Math.abs(a + o) - h, l = 0, l = this.clockwise ? n.rotation + r * s : n.rotation - r * s, n.rotation = l, this._onUpdate && this._onUpdate.call(this._onUpdateScope, n, i, l)) : (n.rotation = this.destination, this._onUpdate && this._onUpdate.call(this._onUpdateScope, n, i, this.destination), this.effectComplete())) }, effectComplete: function() { this._onUpdate = null, this._onUpdateScope = null, this.isRunning = !1, this.camera.emit(d.ROTATE_COMPLETE, this.camera, this) }, reset: function() { this.isRunning = !1, this._onUpdate = null, this._onUpdateScope = null }, destroy: function() { this.reset(), this.camera = null, this.source = null, this.destination = null } }); t.exports = s } , function(t, e, i) { var n = i(19) , s = i(0) , a = i(115) , h = i(40) , r = new s({ initialize: function(t) { this.camera = t, this.isRunning = !1, this.duration = 0, this.source = 1, this.destination = 1, this.ease, this.progress = 0, this._elapsed = 0, this._onUpdate, this._onUpdateScope }, start: function(t, e, i, n, s, r) { void 0 === e && (e = 1e3), void 0 === i && (i = a.Linear), void 0 === n && (n = !1), void 0 === s && (s = null), void 0 === r && (r = this.camera.scene); var o = this.camera; return !n && this.isRunning || (this.isRunning = !0, this.duration = e, this.progress = 0, this.source = o.zoom, this.destination = t, "string" == typeof i && a.hasOwnProperty(i) ? this.ease = a[i] : "function" == typeof i && (this.ease = i), this._elapsed = 0, this._onUpdate = s, this._onUpdateScope = r, this.camera.emit(h.ZOOM_START, this.camera, this, e, t)), o }, update: function(t, e) { this.isRunning && (this._elapsed += e, this.progress = n(this._elapsed / this.duration, 0, 1), this._elapsed < this.duration ? (this.camera.zoom = this.source + (this.destination - this.source) * this.ease(this.progress), this._onUpdate && this._onUpdate.call(this._onUpdateScope, this.camera, this.progress, this.camera.zoom)) : (this.camera.zoom = this.destination, this._onUpdate && this._onUpdate.call(this._onUpdateScope, this.camera, this.progress, this.destination), this.effectComplete())) }, effectComplete: function() { this._onUpdate = null, this._onUpdateScope = null, this.isRunning = !1, this.camera.emit(h.ZOOM_COMPLETE, this.camera, this) }, reset: function() { this.isRunning = !1, this._onUpdate = null, this._onUpdateScope = null }, destroy: function() { this.reset(), this.camera = null } }); t.exports = r } , function(t, e, i) { var a = i(293) , n = i(0) , v = i(2) , s = i(23) , h = i(48) , r = i(92) , o = i(22) , l = new n({ initialize: function(t) { this.scene = t, this.systems = t.sys, this.roundPixels = t.sys.game.config.roundPixels, this.cameras = [], this.main, this.default, t.sys.events.once(o.BOOT, this.boot, this), t.sys.events.on(o.START, this.start, this) }, boot: function() { var t = this.systems; t.settings.cameras ? this.fromJSON(t.settings.cameras) : this.add(), this.main = this.cameras[0], this.default = new a(0,0,t.scale.width,t.scale.height).setScene(this.scene), t.game.scale.on(r.RESIZE, this.onResize, this), this.systems.events.once(o.DESTROY, this.destroy, this) }, start: function() { var t; this.main || ((t = this.systems).settings.cameras ? this.fromJSON(t.settings.cameras) : this.add(), this.main = this.cameras[0]); var e = this.systems.events; e.on(o.UPDATE, this.update, this), e.once(o.SHUTDOWN, this.shutdown, this) }, add: function(t, e, i, n, s, r) { void 0 === t && (t = 0), void 0 === e && (e = 0), void 0 === i && (i = this.scene.sys.scale.width), void 0 === n && (n = this.scene.sys.scale.height), void 0 === s && (s = !1), void 0 === r && (r = ""); var o = new a(t,e,i,n); return o.setName(r), o.setScene(this.scene), o.setRoundPixels(this.roundPixels), o.id = this.getNextID(), this.cameras.push(o), s && (this.main = o), o }, addExisting: function(t, e) { return void 0 === e && (e = !1), -1 === this.cameras.indexOf(t) ? (t.id = this.getNextID(), t.setRoundPixels(this.roundPixels), this.cameras.push(t), e && (this.main = t), t) : null }, getNextID: function() { for (var t = this.cameras, e = 1, i = 0; i < 32; i++) { for (var n = !1, s = 0; s < t.length; s++) { var r = t[s]; r && r.id === e && (n = !0) } if (!n) return e; e <<= 1 } return 0 }, getTotal: function(t) { void 0 === t && (t = !1); for (var e = 0, i = this.cameras, n = 0; n < i.length; n++) { var s = i[n]; (!t || t && s.visible) && e++ } return e }, fromJSON: function(t) { Array.isArray(t) || (t = [t]); for (var e = this.scene.sys.scale.width, i = this.scene.sys.scale.height, n = 0; n < t.length; n++) { var s = t[n] , r = v(s, "x", 0) , o = v(s, "y", 0) , a = v(s, "width", e) , h = v(s, "height", i) , l = this.add(r, o, a, h); l.name = v(s, "name", ""), l.zoom = v(s, "zoom", 1), l.rotation = v(s, "rotation", 0), l.scrollX = v(s, "scrollX", 0), l.scrollY = v(s, "scrollY", 0), l.roundPixels = v(s, "roundPixels", !1), l.visible = v(s, "visible", !0); var u = v(s, "backgroundColor", !1); u && l.setBackgroundColor(u); var c, d, f, p, g = v(s, "bounds", null); g && (c = v(g, "x", 0), d = v(g, "y", 0), f = v(g, "width", e), p = v(g, "height", i), l.setBounds(c, d, f, p)) } return this }, getCamera: function(t) { for (var e = this.cameras, i = 0; i < e.length; i++) if (e[i].name === t) return e[i]; return null }, getCamerasBelowPointer: function(t) { for (var e = this.cameras, i = t.x, n = t.y, s = [], r = 0; r < e.length; r++) { var o = e[r]; o.visible && o.inputEnabled && h(o, i, n) && s.unshift(o) } return s }, remove: function(t, e) { void 0 === e && (e = !0), Array.isArray(t) || (t = [t]); for (var i = 0, n = this.cameras, s = 0; s < t.length; s++) { var r = n.indexOf(t[s]); -1 !== r && (e && n[r].destroy(), n.splice(r, 1), i++) } return !this.main && n[0] && (this.main = n[0]), i }, render: function(t, e, i) { for (var n = this.scene, s = this.cameras, r = 0; r < this.cameras.length; r++) { var o = s[r]; o.visible && 0 < o.alpha && (o.preRender(1), t.render(n, e, i, o)) } }, resetAll: function() { for (var t = 0; t < this.cameras.length; t++) this.cameras[t].destroy(); return this.cameras = [], this.main = this.add(), this.main }, update: function(t, e) { for (var i = 0; i < this.cameras.length; i++) this.cameras[i].update(t, e) }, onResize: function(t, e, i, n, s, r) { for (var o = 0; o < this.cameras.length; o++) { var a = this.cameras[o]; 0 === a._x && 0 === a._y && a._width === s && a._height === r && a.setSize(e.width, e.height) } }, resize: function(t, e) { for (var i = 0; i < this.cameras.length; i++) this.cameras[i].setSize(t, e) }, shutdown: function() { this.main = void 0; for (var t = 0; t < this.cameras.length; t++) this.cameras[t].destroy(); this.cameras = []; var e = this.systems.events; e.off(o.UPDATE, this.update, this), e.off(o.SHUTDOWN, this.shutdown, this) }, destroy: function() { this.shutdown(), this.default.destroy(), this.scene.sys.events.off(o.START, this.start, this), this.scene = null, this.systems = null } }); s.register("CameraManager", l, "cameras"), t.exports = l } , function(t, e) { t.exports = "enterfullscreen" } , function(t, e) { t.exports = "fullscreenfailed" } , function(t, e) { t.exports = "fullscreenunsupported" } , function(t, e) { t.exports = "leavefullscreen" } , function(t, e) { t.exports = "orientationchange" } , function(t, e) { t.exports = "resize" } , function(t, e) { t.exports = "boot" } , function(t, e) { t.exports = "create" } , function(t, e) { t.exports = "destroy" } , function(t, e) { t.exports = "pause" } , function(t, e) { t.exports = "postupdate" } , function(t, e) { t.exports = "preupdate" } , function(t, e) { t.exports = "ready" } , function(t, e) { t.exports = "render" } , function(t, e) { t.exports = "resume" } , function(t, e) { t.exports = "shutdown" } , function(t, e) { t.exports = "sleep" } , function(t, e) { t.exports = "start" } , function(t, e) { t.exports = "transitioncomplete" } , function(t, e) { t.exports = "transitioninit" } , function(t, e) { t.exports = "transitionout" } , function(t, e) { t.exports = "transitionstart" } , function(t, e) { t.exports = "transitionwake" } , function(t, e) { t.exports = "update" } , function(t, e) { t.exports = "wake" } , function(t, e, i) { t.exports = { Config: i(314), CreateRenderer: i(338), DebugHeader: i(342), Events: i(20), TimeStep: i(343), VisibilityHandler: i(345) } } , function(t, e) { var i, n, s = t.exports = {}; function r() { throw new Error("setTimeout has not been defined") } function o() { throw new Error("clearTimeout has not been defined") } function a(e) { if (i === setTimeout) return setTimeout(e, 0); if ((i === r || !i) && setTimeout) return i = setTimeout, setTimeout(e, 0); try { return i(e, 0) } catch (t) { try { return i.call(null, e, 0) } catch (t) { return i.call(this, e, 0) } } } !function() { try { i = "function" == typeof setTimeout ? setTimeout : r } catch (t) { i = r } try { n = "function" == typeof clearTimeout ? clearTimeout : o } catch (t) { n = o } }(); var h, l = [], u = !1, c = -1; function d() { u && h && (u = !1, h.length ? l = h.concat(l) : c = -1, l.length && f()) } function f() { if (!u) { var t = a(d); u = !0; for (var e = l.length; e; ) { for (h = l, l = []; ++c < e; ) h && h[c].run(); c = -1, e = l.length } h = null, u = !1, function(e) { if (n === clearTimeout) return clearTimeout(e); if ((n === o || !n) && clearTimeout) return n = clearTimeout, clearTimeout(e); try { n(e) } catch (t) { try { return n.call(null, e) } catch (t) { return n.call(this, e) } } }(t) } } function p(t, e) { this.fun = t, this.array = e } function g() {} s.nextTick = function(t) { var e = new Array(arguments.length - 1); if (1 < arguments.length) for (var i = 1; i < arguments.length; i++) e[i - 1] = arguments[i]; l.push(new p(t,e)), 1 !== l.length || u || a(f) } , p.prototype.run = function() { this.fun.apply(null, this.array) } , s.title = "browser", s.browser = !0, s.env = {}, s.argv = [], s.version = "", s.versions = {}, s.on = g, s.addListener = g, s.once = g, s.off = g, s.removeListener = g, s.removeAllListeners = g, s.emit = g, s.prependListener = g, s.prependOnceListener = g, s.listeners = function(t) { return [] } , s.binding = function(t) { throw new Error("process.binding is not supported") } , s.cwd = function() { return "/" } , s.chdir = function(t) { throw new Error("process.chdir is not supported") } , s.umask = function() { return 0 } } , function(t, e, i) { var n = i(118) , s = { gamepads: !1, mspointer: !1, touch: !1, wheelEvent: null }; t.exports = (("ontouchstart"in document.documentElement || navigator.maxTouchPoints && 1 <= navigator.maxTouchPoints) && (s.touch = !0), (navigator.msPointerEnabled || navigator.pointerEnabled) && (s.mspointer = !0), navigator.getGamepads && (s.gamepads = !0), "onwheel"in window || n.ie && "WheelEvent"in window ? s.wheelEvent = "wheel" : "onmousewheel"in window ? s.wheelEvent = "mousewheel" : n.firefox && "MouseScrollEvent"in window && (s.wheelEvent = "DOMMouseScroll"), s) } , function(t, e, i) { var s = i(118) , r = { audioData: !1, dolby: !1, m4a: !1, mp3: !1, ogg: !1, opus: !1, wav: !1, webAudio: !1, webm: !1 }; t.exports = function() { r.audioData = !!window.Audio, r.webAudio = !(!window.AudioContext && !window.webkitAudioContext); var t, e, i = document.createElement("audio"), n = !!i.canPlayType; try { n && (i.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/, "") && (r.ogg = !0), (i.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/, "") || i.canPlayType("audio/opus;").replace(/^no$/, "")) && (r.opus = !0), i.canPlayType("audio/mpeg;").replace(/^no$/, "") && (r.mp3 = !0), i.canPlayType('audio/wav; codecs="1"').replace(/^no$/, "") && (r.wav = !0), (i.canPlayType("audio/x-m4a;") || i.canPlayType("audio/aac;").replace(/^no$/, "")) && (r.m4a = !0), i.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/, "") && (r.webm = !0), "" !== i.canPlayType('audio/mp4;codecs="ec-3"') && (s.edge ? r.dolby = !0 : s.safari && 9 <= s.safariVersion && /Mac OS X (\d+)_(\d+)/.test(navigator.userAgent) && (t = parseInt(RegExp.$1, 10), e = parseInt(RegExp.$2, 10), (10 === t && 11 <= e || 10 < t) && (r.dolby = !0)))) } catch (t) {} return r }() } , function(t, e) { var i = { h264: !1, hls: !1, mp4: !1, ogg: !1, vp9: !1, webm: !1 }; t.exports = function() { var t = document.createElement("video") , e = !!t.canPlayType; try { e && (t.canPlayType('video/ogg; codecs="theora"').replace(/^no$/, "") && (i.ogg = !0), t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/, "") && (i.h264 = !0, i.mp4 = !0), t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/, "") && (i.webm = !0), t.canPlayType('video/webm; codecs="vp9"').replace(/^no$/, "") && (i.vp9 = !0), t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/, "") && (i.hls = !0)) } catch (t) {} return i }() } , function(t, e) { var r = { available: !1, cancel: "", keyboard: !1, request: "" }; t.exports = function() { for (var t = "Fullscreen", e = "FullScreen", i = ["request" + t, "request" + e, "webkitRequest" + t, "webkitRequest" + e, "msRequest" + t, "msRequest" + e, "mozRequest" + e, "mozRequest" + t], n = 0; n < i.length; n++) if (document.documentElement[i[n]]) { r.available = !0, r.request = i[n]; break } var s = ["cancel" + e, "exit" + t, "webkitCancel" + e, "webkitExit" + t, "msCancel" + e, "msExit" + t, "mozCancel" + e, "mozExit" + t]; if (r.available) for (n = 0; n < s.length; n++) if (document[s[n]]) { r.cancel = s[n]; break } return window.Element && Element.ALLOW_KEYBOARD_INPUT && !/ Version\/5\.1(?:\.\d+)? Safari\//.test(navigator.userAgent) && (r.keyboard = !0), Object.defineProperty(r, "active", { get: function() { return !!(document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement) } }), r }() } , function(t, e, i) { t.exports = { Between: i(317), BetweenPoints: i(318), BetweenPointsY: i(735), BetweenY: i(736), CounterClockwise: i(737), Normalize: i(319), Random: i(738), RandomDegrees: i(739), Reverse: i(740), RotateTo: i(741), ShortestBetween: i(742), Wrap: i(235), WrapDegrees: i(236) } } , function(t, e) { t.exports = function(t, e) { return Math.atan2(e.x - t.x, e.y - t.y) } } , function(t, e) { t.exports = function(t, e, i, n) { return Math.atan2(i - t, n - e) } } , function(t, e, i) { var n = i(13); t.exports = function(t) { return t > Math.PI && (t -= n.PI2), Math.abs(((t + n.TAU) % n.PI2 - n.PI2) % n.PI2) } } , function(t, e, i) { var n = i(119); t.exports = function() { return n(-Math.PI, Math.PI) } } , function(t, e, i) { var n = i(119); t.exports = function() { return n(-180, 180) } } , function(t, e, i) { var n = i(319); t.exports = function(t) { return n(t + Math.PI) } } , function(t, e, i) { var n = i(13); t.exports = function(t, e, i) { return void 0 === i && (i = .05), t === e || (Math.abs(e - t) <= i || Math.abs(e - t) >= n.PI2 - i ? t = e : (Math.abs(e - t) > Math.PI && (e < t ? e += n.PI2 : e -= n.PI2), t < e ? t += i : e < t && (t -= i))), t } } , function(t, e) { t.exports = function(t, e) { var i = e - t; return 0 == i ? 0 : i - 360 * Math.floor((i + 180) / 360) } } , function(t, e, i) { t.exports = { Between: i(53), BetweenPoints: i(320), BetweenPointsSquared: i(744), Chebyshev: i(745), Power: i(746), Snake: i(747), Squared: i(321) } } , function(t, e) { t.exports = function(t, e) { var i = t.x - e.x , n = t.y - e.y; return i * i + n * n } } , function(t, e) { t.exports = function(t, e, i, n) { return Math.max(Math.abs(t - i), Math.abs(e - n)) } } , function(t, e) { t.exports = function(t, e, i, n, s) { return void 0 === s && (s = 2), Math.sqrt(Math.pow(i - t, s) + Math.pow(n - e, s)) } } , function(t, e) { t.exports = function(t, e, i, n) { return Math.abs(t - i) + Math.abs(e - n) } } , function(t, e, i) { t.exports = { Back: i(302), Bounce: i(303), Circular: i(304), Cubic: i(305), Elastic: i(306), Expo: i(307), Linear: i(308), Quadratic: i(309), Quartic: i(310), Quintic: i(311), Sine: i(312), Stepped: i(313) } } , function(t, e, i) { t.exports = { Ceil: i(750), Equal: i(106), Floor: i(751), GreaterThan: i(322), LessThan: i(323) } } , function(t, e) { t.exports = function(t, e) { return void 0 === e && (e = 1e-4), Math.ceil(t - e) } } , function(t, e) { t.exports = function(t, e) { return void 0 === e && (e = 1e-4), Math.floor(t + e) } } , function(t, e, i) { t.exports = { Bezier: i(753), CatmullRom: i(754), CubicBezier: i(326), Linear: i(755), QuadraticBezier: i(327), SmoothStep: i(328), SmootherStep: i(756) } } , function(t, e, i) { var r = i(324); t.exports = function(t, e) { for (var i = 0, n = t.length - 1, s = 0; s <= n; s++) i += Math.pow(1 - e, n - s) * Math.pow(e, s) * t[s] * r(n, s); return i } } , function(t, e, i) { var r = i(171); t.exports = function(t, e) { var i = t.length - 1 , n = i * e , s = Math.floor(n); return t[0] === t[i] ? (e < 0 && (s = Math.floor(n = i * (1 + e))), r(n - s, t[(s - 1 + i) % i], t[s], t[(s + 1) % i], t[(s + 2) % i])) : e < 0 ? t[0] - (r(-n, t[0], t[0], t[1], t[1]) - t[0]) : 1 < e ? t[i] - (r(n - i, t[i], t[i], t[i - 1], t[i - 1]) - t[i]) : r(n - s, t[s ? s - 1 : 0], t[s], t[i < s + 1 ? i : s + 1], t[i < s + 2 ? i : s + 2]) } } , function(t, e, i) { var r = i(116); t.exports = function(t, e) { var i = t.length - 1 , n = i * e , s = Math.floor(n); return e < 0 ? r(t[0], t[1], n) : 1 < e ? r(t[i], t[i - 1], i - n) : r(t[s], t[i < s + 1 ? i : s + 1], n - s) } } , function(t, e, i) { var n = i(160); t.exports = function(t, e, i) { return e + (i - e) * n(t, 0, 1) } } , function(t, e, i) { t.exports = { GetNext: i(329), IsSize: i(120), IsValue: i(758) } } , function(t, e) { t.exports = function(t) { return 0 < t && 0 == (t & t - 1) } } , function(t, e, i) { t.exports = { Ceil: i(330), Floor: i(93), To: i(760) } } , function(t, e) { t.exports = function(t, e, i, n) { return void 0 === i && (i = 0), 0 === e ? t : (t -= i, t = e * Math.round(t / e), n ? (i + t) / e : i + t) } } , function(t, e, i) { var n = new (i(0))({ initialize: function(t) { void 0 === t && (t = [(Date.now() * Math.random()).toString()]), this.c = 1, this.s0 = 0, this.s1 = 0, this.s2 = 0, this.n = 0, this.signs = [-1, 1], t && this.init(t) }, rnd: function() { var t = 2091639 * this.s0 + 2.3283064365386963e-10 * this.c; return this.c = 0 | t, this.s0 = this.s1, this.s1 = this.s2, this.s2 = t - this.c, this.s2 }, hash: function(t) { var e, i = this.n; t = t.toString(); for (var n = 0; n < t.length; n++) e = .02519603282416938 * (i += t.charCodeAt(n)), e -= i = e >>> 0, i = (e *= i) >>> 0, i += 4294967296 * (e -= i); return 2.3283064365386963e-10 * ((this.n = i) >>> 0) }, init: function(t) { "string" == typeof t ? this.state(t) : this.sow(t) }, sow: function(t) { if (this.n = 4022871197, this.s0 = this.hash(" "), this.s1 = this.hash(" "), this.s2 = this.hash(" "), this.c = 1, t) for (var e = 0; e < t.length && null != t[e]; e++) { var i = t[e]; this.s0 -= this.hash(i), this.s0 += ~~(this.s0 < 0), this.s1 -= this.hash(i), this.s1 += ~~(this.s1 < 0), this.s2 -= this.hash(i), this.s2 += ~~(this.s2 < 0) } }, integer: function() { return 4294967296 * this.rnd() }, frac: function() { return this.rnd() + 11102230246251565e-32 * (2097152 * this.rnd() | 0) }, real: function() { return this.integer() + this.frac() }, integerInRange: function(t, e) { return Math.floor(this.realInRange(0, e - t + 1) + t) }, between: function(t, e) { return Math.floor(this.realInRange(0, e - t + 1) + t) }, realInRange: function(t, e) { return this.frac() * (e - t) + t }, normal: function() { return 1 - 2 * this.frac() }, uuid: function() { for (var t = "", e = "", e = t = ""; t++ < 36; e += ~t % 5 | 3 * t & 4 ? (15 ^ t ? 8 ^ this.frac() * (20 ^ t ? 16 : 4) : 4).toString(16) : "-") ; return e }, pick: function(t) { return t[this.integerInRange(0, t.length - 1)] }, sign: function() { return this.pick(this.signs) }, weightedPick: function(t) { return t[~~(Math.pow(this.frac(), 2) * (t.length - 1) + .5)] }, timestamp: function(t, e) { return this.realInRange(t || 9466848e5, e || 1577862e6) }, angle: function() { return this.integerInRange(-180, 180) }, rotation: function() { return this.realInRange(-3.1415926, 3.1415926) }, state: function(t) { return "string" == typeof t && t.match(/^!rnd/) && (t = t.split(","), this.c = parseFloat(t[1]), this.s0 = parseFloat(t[2]), this.s1 = parseFloat(t[3]), this.s2 = parseFloat(t[4])), ["!rnd", this.c, this.s0, this.s1, this.s2].join(",") }, shuffle: function(t) { for (var e = t.length - 1; 0 < e; e--) { var i = Math.floor(this.frac() * (e + 1)) , n = t[i]; t[i] = t[e], t[e] = n } return t } }); t.exports = n } , function(t, e) { t.exports = function(t) { for (var e = 0, i = 0; i < t.length; i++) e += +t[i]; return e / t.length } } , function(t, e) { t.exports = function(t, e, i) { void 0 === e && (e = 0), void 0 === i && (i = 10); var n = Math.pow(i, -e); return Math.ceil(t * n) / n } } , function(t, e) { t.exports = function(t, e) { return Math.abs(t - e) } } , function(t, e) { t.exports = function(t, e, i) { void 0 === e && (e = 0), void 0 === i && (i = 10); var n = Math.pow(i, -e); return Math.floor(t * n) / n } } , function(t, e) { t.exports = function(t, e) { return t / e / 1e3 } } , function(t, e) { t.exports = function(t) { return t == parseFloat(t) ? !(t % 2) : void 0 } } , function(t, e) { t.exports = function(t) { return t === parseFloat(t) ? !(t % 2) : void 0 } } , function(t, e) { t.exports = function(t, e, i) { return Math.min(t + e, i) } } , function(t, e) { t.exports = function(t, e, i) { return Math.max(t - e, i) } } , function(t, e) { t.exports = function(t, e, i, n) { void 0 === i && (i = e + 1); var s = (t - e) / (i - e); return 1 < s ? void 0 !== n ? (s = (n - t) / (n - i)) < 0 && (s = 0) : s = 1 : s < 0 && (s = 0), s } } , function(t, e) { t.exports = function(t, e) { void 0 === e && (e = 1); var i = 2 * Math.random() * Math.PI; return t.x = Math.cos(i) * e, t.y = Math.sin(i) * e, t } } , function(t, e) { t.exports = function(t, e) { void 0 === e && (e = 1); var i = 2 * Math.random() * Math.PI , n = 2 * Math.random() - 1 , s = Math.sqrt(1 - n * n) * e; return t.x = Math.cos(i) * s, t.y = Math.sin(i) * s, t.z = n * e, t } } , function(t, e) { t.exports = function(t, e) { return void 0 === e && (e = 1), t.x = (2 * Math.random() - 1) * e, t.y = (2 * Math.random() - 1) * e, t.z = (2 * Math.random() - 1) * e, t.w = (2 * Math.random() - 1) * e, t } } , function(t, e) { t.exports = function(t, e, i, n, s) { return t.x = e + s * Math.cos(n), t.y = i + s * Math.sin(n), t } } , function(t, e) { t.exports = function(t, e, i) { void 0 === e && (e = 0), void 0 === i && (i = 10); var n = Math.pow(i, -e); return Math.round(t * n) / n } } , function(t, e) { t.exports = function(t, e, i, n) { void 0 === e && (e = 1), void 0 === i && (i = 1), void 0 === n && (n = 1), n *= Math.PI / t; for (var s = [], r = [], o = 0; o < t; o++) e += (i -= e * n) * n, s[o] = i, r[o] = e; return { sin: r, cos: s, length: t } } } , function(t, e, i) { var o = i(3); t.exports = function(t, e, i, n) { void 0 === n && (n = new o); var s = 0 , r = 0; return 0 < t && t <= e * i && (s = e - 1 < t ? t - (r = Math.floor(t / e)) * e : t, n.set(s, r)), n } } , function(t, e) { t.exports = function(t, e, i) { return Math.abs(t - e) <= i } } , function(t, e, i) { var n = i(174) , s = i(336) , r = i(337) , o = new s , a = new r , h = new n; t.exports = function(t, e, i) { return a.setAxisAngle(e, i), o.fromRotationTranslation(a, h.set(0, 0, 0)), t.transformMat4(o) } } , function(t, e) { t.exports = "addtexture" } , function(t, e) { t.exports = "onerror" } , function(t, e) { t.exports = "onload" } , function(t, e) { t.exports = "ready" } , function(t, e) { t.exports = "removetexture" } , function(t, e) { t.exports = ["#define SHADER_NAME PHASER_BITMAP_MASK_FS", "", "precision mediump float;", "", "uniform vec2 uResolution;", "uniform sampler2D uMainSampler;", "uniform sampler2D uMaskSampler;", "uniform bool uInvertMaskAlpha;", "", "void main()", "{", " vec2 uv = gl_FragCoord.xy / uResolution;", " vec4 mainColor = texture2D(uMainSampler, uv);", " vec4 maskColor = texture2D(uMaskSampler, uv);", " float alpha = mainColor.a;", "", " if (!uInvertMaskAlpha)", " {", " alpha *= (maskColor.a);", " }", " else", " {", " alpha *= (1.0 - maskColor.a);", " }", "", " gl_FragColor = vec4(mainColor.rgb * alpha, alpha);", "}", ""].join("\n") } , function(t, e) { t.exports = ["#define SHADER_NAME PHASER_BITMAP_MASK_VS", "", "precision mediump float;", "", "attribute vec2 inPosition;", "", "void main()", "{", " gl_Position = vec4(inPosition, 0.0, 1.0);", "}", ""].join("\n") } , function(t, e) { t.exports = ["#define SHADER_NAME PHASER_FORWARD_DIFFUSE_FS", "", "precision mediump float;", "", "struct Light", "{", " vec2 position;", " vec3 color;", " float intensity;", " float radius;", "};", "", "const int kMaxLights = %LIGHT_COUNT%;", "", "uniform vec4 uCamera; /* x, y, rotation, zoom */", "uniform vec2 uResolution;", "uniform sampler2D uMainSampler;", "uniform sampler2D uNormSampler;", "uniform vec3 uAmbientLightColor;", "uniform Light uLights[kMaxLights];", "uniform mat3 uInverseRotationMatrix;", "", "varying vec2 outTexCoord;", "varying vec4 outTint;", "", "void main()", "{", " vec3 finalColor = vec3(0.0, 0.0, 0.0);", " vec4 color = texture2D(uMainSampler, outTexCoord) * vec4(outTint.rgb * outTint.a, outTint.a);", " vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;", " vec3 normal = normalize(uInverseRotationMatrix * vec3(normalMap * 2.0 - 1.0));", " vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;", "", " for (int index = 0; index < kMaxLights; ++index)", " {", " Light light = uLights[index];", " vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);", " vec3 lightNormal = normalize(lightDir);", " float distToSurf = length(lightDir) * uCamera.w;", " float diffuseFactor = max(dot(normal, lightNormal), 0.0);", " float radius = (light.radius / res.x * uCamera.w) * uCamera.w;", " float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);", " vec3 diffuse = light.color * diffuseFactor;", " finalColor += (attenuation * diffuse) * light.intensity;", " }", "", " vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);", " gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);", "", "}", ""].join("\n") } , function(t, e, i) { t.exports = { GenerateTexture: i(346), Palettes: i(790) } } , function(t, e, i) { t.exports = { ARNE16: i(347), C64: i(791), CGA: i(792), JMP: i(793), MSX: i(794) } } , function(t, e) { t.exports = { 0: "#000", 1: "#fff", 2: "#8b4131", 3: "#7bbdc5", 4: "#8b41ac", 5: "#6aac41", 6: "#3931a4", 7: "#d5de73", 8: "#945a20", 9: "#5a4100", A: "#bd736a", B: "#525252", C: "#838383", D: "#acee8b", E: "#7b73de", F: "#acacac" } } , function(t, e) { t.exports = { 0: "#000", 1: "#2234d1", 2: "#0c7e45", 3: "#44aacc", 4: "#8a3622", 5: "#5c2e78", 6: "#aa5c3d", 7: "#b5b5b5", 8: "#5e606e", 9: "#4c81fb", A: "#6cd947", B: "#7be2f9", C: "#eb8a60", D: "#e23d69", E: "#ffd93f", F: "#fff" } } , function(t, e) { t.exports = { 0: "#000", 1: "#191028", 2: "#46af45", 3: "#a1d685", 4: "#453e78", 5: "#7664fe", 6: "#833129", 7: "#9ec2e8", 8: "#dc534b", 9: "#e18d79", A: "#d6b97b", B: "#e9d8a1", C: "#216c4b", D: "#d365c8", E: "#afaab9", F: "#f5f4eb" } } , function(t, e) { t.exports = { 0: "#000", 1: "#191028", 2: "#46af45", 3: "#a1d685", 4: "#453e78", 5: "#7664fe", 6: "#833129", 7: "#9ec2e8", 8: "#dc534b", 9: "#e18d79", A: "#d6b97b", B: "#e9d8a1", C: "#216c4b", D: "#d365c8", E: "#afaab9", F: "#fff" } } , function(t, e, i) { t.exports = { Path: i(796), CubicBezier: i(348), Curve: i(81), Ellipse: i(349), Line: i(350), QuadraticBezier: i(351), Spline: i(352) } } , function(t, e, i) { var n = i(0) , u = i(348) , l = i(349) , s = i(5) , r = i(350) , o = i(797) , a = i(351) , h = i(11) , c = i(352) , d = i(3) , f = i(13) , p = new n({ initialize: function(t, e) { void 0 === t && (t = 0), void 0 === e && (e = 0), this.name = "", this.curves = [], this.cacheLengths = [], this.autoClose = !1, this.startPoint = new d, this._tmpVec2A = new d, this._tmpVec2B = new d, "object" == typeof t ? this.fromJSON(t) : this.startPoint.set(t, e) }, add: function(t) { return this.curves.push(t), this }, circleTo: function(t, e, i) { return void 0 === e && (e = !1), this.ellipseTo(t, t, 0, 360, e, i) }, closePath: function() { var t = this.curves[0].getPoint(0) , e = this.curves[this.curves.length - 1].getPoint(1); return t.equals(e) || this.curves.push(new r(e,t)), this }, cubicBezierTo: function(t, e, i, n, s, r) { var o, a, h = this.getEndPoint(), l = t instanceof d ? (o = t, a = e, i) : (o = new d(i,n), a = new d(s,r), new d(t,e)); return this.add(new u(h,o,a,l)) }, quadraticBezierTo: function(t, e, i, n) { var s, r = this.getEndPoint(), o = t instanceof d ? (s = t, e) : (s = new d(i,n), new d(t,e)); return this.add(new a(r,s,o)) }, draw: function(t, e) { for (var i = 0; i < this.curves.length; i++) { var n = this.curves[i]; n.active && n.draw(t, e) } return t }, ellipseTo: function(t, e, i, n, s, r) { var o = new l(0,0,t,e,i,n,s,r) , a = this.getEndPoint(this._tmpVec2A) , h = o.getStartPoint(this._tmpVec2B); return a.subtract(h), o.x = a.x, o.y = a.y, this.add(o) }, fromJSON: function(t) { this.curves = [], this.cacheLengths = [], this.startPoint.set(t.x, t.y), this.autoClose = t.autoClose; for (var e = 0; e < t.curves.length; e++) { var i = t.curves[e]; switch (i.type) { case "LineCurve": this.add(r.fromJSON(i)); break; case "EllipseCurve": this.add(l.fromJSON(i)); break; case "SplineCurve": this.add(c.fromJSON(i)); break; case "CubicBezierCurve": this.add(u.fromJSON(i)); break; case "QuadraticBezierCurve": this.add(a.fromJSON(i)) } } return this }, getBounds: function(t, e) { void 0 === t && (t = new h), void 0 === e && (e = 16), t.x = Number.MAX_VALUE, t.y = Number.MAX_VALUE; for (var i = new h, n = f.MIN_SAFE_INTEGER, s = f.MIN_SAFE_INTEGER, r = 0; r < this.curves.length; r++) { var o = this.curves[r]; o.active && (o.getBounds(i, e), t.x = Math.min(t.x, i.x), t.y = Math.min(t.y, i.y), n = Math.max(n, i.right), s = Math.max(s, i.bottom)) } return t.right = n, t.bottom = s, t }, getCurveLengths: function() { if (this.cacheLengths.length === this.curves.length) return this.cacheLengths; for (var t = [], e = 0, i = 0; i < this.curves.length; i++) e += this.curves[i].getLength(), t.push(e); return this.cacheLengths = t }, getEndPoint: function(t) { return void 0 === t && (t = new d), 0 < this.curves.length ? this.curves[this.curves.length - 1].getPoint(1, t) : t.copy(this.startPoint), t }, getLength: function() { var t = this.getCurveLengths(); return t[t.length - 1] }, getPoint: function(t, e) { void 0 === e && (e = new d); for (var i = t * this.getLength(), n = this.getCurveLengths(), s = 0; s < n.length; ) { if (n[s] >= i) { var r = n[s] - i , o = this.curves[s] , a = o.getLength() , h = 0 === a ? 0 : 1 - r / a; return o.getPointAt(h, e) } s++ } return null }, getPoints: function(t) { void 0 === t && (t = 12); for (var e, i = [], n = 0; n < this.curves.length; n++) { var s = this.curves[n]; if (s.active) for (var r = s.getResolution(t), o = s.getPoints(r), a = 0; a < o.length; a++) { var h = o[a]; e && e.equals(h) || (i.push(h), e = h) } } return this.autoClose && 1 < i.length && !i[i.length - 1].equals(i[0]) && i.push(i[0]), i }, getRandomPoint: function(t) { return void 0 === t && (t = new d), this.getPoint(Math.random(), t) }, getSpacedPoints: function(t) { void 0 === t && (t = 40); for (var e = [], i = 0; i <= t; i++) e.push(this.getPoint(i / t)); return this.autoClose && e.push(e[0]), e }, getStartPoint: function(t) { return void 0 === t && (t = new d), t.copy(this.startPoint) }, getTangent: function(t, e) { void 0 === e && (e = new d); for (var i = t * this.getLength(), n = this.getCurveLengths(), s = 0; s < n.length; ) { if (n[s] >= i) { var r = n[s] - i , o = this.curves[s] , a = o.getLength() , h = 0 === a ? 0 : 1 - r / a; return o.getTangentAt(h, e) } s++ } return null }, lineTo: function(t, e) { t instanceof d ? this._tmpVec2B.copy(t) : this._tmpVec2B.set(t, e); var i = this.getEndPoint(this._tmpVec2A); return this.add(new r([i.x, i.y, this._tmpVec2B.x, this._tmpVec2B.y])) }, splineTo: function(t) { return t.unshift(this.getEndPoint()), this.add(new c(t)) }, moveTo: function(t, e) { return t instanceof d ? this.add(new o(t.x,t.y)) : this.add(new o(t,e)) }, toJSON: function() { for (var t = [], e = 0; e < this.curves.length; e++) t.push(this.curves[e].toJSON()); return { type: "Path", x: this.startPoint.x, y: this.startPoint.y, autoClose: this.autoClose, curves: t } }, updateArcLengths: function() { this.cacheLengths = [], this.getCurveLengths() }, destroy: function() { this.curves.length = 0, this.cacheLengths.length = 0, this.startPoint = void 0 } }); s.register("path", function(t, e) { return new p(t,e) }), t.exports = p } , function(t, e, i) { var n = i(0) , s = i(3) , r = new n({ initialize: function(t, e) { this.active = !1, this.p0 = new s(t,e) }, getPoint: function(t, e) { return void 0 === e && (e = new s), e.copy(this.p0) }, getPointAt: function(t, e) { return this.getPoint(t, e) }, getResolution: function() { return 1 }, getLength: function() { return 0 }, toJSON: function() { return { type: "MoveTo", points: [this.p0.x, this.p0.y] } } }); t.exports = r } , function(t, e, i) { t.exports = { DataManager: i(113), DataManagerPlugin: i(799), Events: i(284) } } , function(t, e, i) { var n = i(0) , s = i(113) , r = i(23) , o = i(22) , a = new n({ Extends: s, initialize: function(t) { s.call(this, t, t.sys.events), this.scene = t, this.systems = t.sys, t.sys.events.once(o.BOOT, this.boot, this), t.sys.events.on(o.START, this.start, this) }, boot: function() { this.events = this.systems.events, this.events.once(o.DESTROY, this.destroy, this) }, start: function() { this.events.once(o.SHUTDOWN, this.shutdown, this) }, shutdown: function() { this.systems.events.off(o.SHUTDOWN, this.shutdown, this) }, destroy: function() { s.prototype.destroy.call(this), this.events.off(o.START, this.start, this), this.scene = null, this.systems = null } }); r.register("DataManagerPlugin", a, "data"), t.exports = a } , function(t, e, i) { t.exports = { Align: i(801), BaseShader: i(353), Bounds: i(804), Canvas: i(808), Color: i(354), Masks: i(817) } } , function(t, e, i) { var n = i(105) , s = i(18)(!1, s = { In: i(802), To: i(803) }, n); t.exports = s } , function(t, e, i) { t.exports = { BottomCenter: i(256), BottomLeft: i(257), BottomRight: i(258), Center: i(259), LeftCenter: i(261), QuickSet: i(255), RightCenter: i(262), TopCenter: i(263), TopLeft: i(264), TopRight: i(265) } } , function(t, e, i) { t.exports = { BottomCenter: i(243), BottomLeft: i(244), BottomRight: i(245), LeftBottom: i(246), LeftCenter: i(247), LeftTop: i(248), QuickSet: i(242), RightBottom: i(249), RightCenter: i(250), RightTop: i(251), TopCenter: i(252), TopLeft: i(253), TopRight: i(254) } } , function(t, e, i) { t.exports = { CenterOn: i(260), GetBottom: i(34), GetBounds: i(805), GetCenterX: i(76), GetCenterY: i(78), GetLeft: i(35), GetOffsetX: i(806), GetOffsetY: i(807), GetRight: i(36), GetTop: i(37), SetBottom: i(46), SetCenterX: i(77), SetCenterY: i(79), SetLeft: i(44), SetRight: i(45), SetTop: i(43) } } , function(t, e, i) { var s = i(34) , r = i(35) , o = i(36) , a = i(37); t.exports = function(t, e) { void 0 === e && (e = {}); var i = r(t) , n = a(t); return e.x = i, e.y = n, e.width = o(t) - i, e.height = s(t) - n, e } } , function(t, e) { t.exports = function(t) { return t.width * t.originX } } , function(t, e) { t.exports = function(t) { return t.height * t.originY } } , function(t, e, i) { t.exports = { CanvasInterpolation: i(339), CanvasPool: i(26), Smoothing: i(167), TouchAction: i(809), UserSelect: i(810) } } , function(t, e) { t.exports = function(t, e) { return void 0 === e && (e = "none"), t.style.msTouchAction = e, t.style["ms-touch-action"] = e, t.style["touch-action"] = e, t } } , function(t, e) { t.exports = function(e, i) { void 0 === i && (i = "none"); return ["-webkit-", "-khtml-", "-moz-", "-ms-", ""].forEach(function(t) { e.style[t + "user-select"] = i }), e.style["-webkit-touch-callout"] = i, e.style["-webkit-tap-highlight-color"] = "rgba(0, 0, 0, 0)", e } } , function(t, e) { t.exports = function(t) { var e = { r: t >> 16 & 255, g: t >> 8 & 255, b: 255 & t, a: 255 }; return 16777215 < t && (e.a = t >>> 24), e } } , function(t, e, i) { var h = i(31) , l = i(356); t.exports = function(t, e, i) { var n, s, r = i, o = i, a = i; return 0 !== e && (r = l(s = 2 * i - (n = i < .5 ? i * (1 + e) : i + e - i * e), n, t + 1 / 3), o = l(s, n, t), a = l(s, n, t - 1 / 3)), (new h).setGLTo(r, o, a, 1) } } , function(t, e, i) { var s = i(166); t.exports = function(t, e) { void 0 === t && (t = 1), void 0 === e && (e = 1); for (var i = [], n = 0; n <= 359; n++) i.push(s(n / 359, t, e)); return i } } , function(t, e, i) { function o(t, e, i, n, s, r, o, a) { void 0 === o && (o = 100), void 0 === a && (a = 0); var h = a / o; return { r: l(t, n, h), g: l(e, s, h), b: l(i, r, h) } } var l = i(116); t.exports = { RGBWithRGB: o, ColorWithRGB: function(t, e, i, n, s, r) { return void 0 === s && (s = 100), void 0 === r && (r = 0), o(t.r, t.g, t.b, e, i, n, s, r) }, ColorWithColor: function(t, e, i, n) { return void 0 === i && (i = 100), void 0 === n && (n = 0), o(t.r, t.g, t.b, e.r, e.g, e.b, i, n) } } } , function(t, e, i) { var n = i(172) , s = i(31); t.exports = function(t, e) { return void 0 === t && (t = 0), void 0 === e && (e = 255), new s(n(t, e),n(t, e),n(t, e)) } } , function(t, e, i) { var r = i(355); t.exports = function(t, e, i, n, s) { return void 0 === n && (n = 255), void 0 === s && (s = "#"), "#" === s ? "#" + ((1 << 24) + (t << 16) + (e << 8) + i).toString(16).slice(1) : "0x" + r(n) + r(t) + r(e) + r(i) } } , function(t, e, i) { t.exports = { BitmapMask: i(278), GeometryMask: i(279) } } , function(t, e, i) { var n = { AddToDOM: i(122), DOMContentLoaded: i(357), GetScreenOrientation: i(358), GetTarget: i(363), ParseXML: i(364), RemoveFromDOM: i(178), RequestAnimationFrame: i(344) }; t.exports = n } , function(t, e, i) { t.exports = { EventEmitter: i(820) } } , function(t, e, i) { var n = i(0) , s = i(10) , r = i(23) , o = new n({ Extends: s, initialize: function() { s.call(this) }, shutdown: function() { this.removeAllListeners() }, destroy: function() { this.removeAllListeners() } }); r.register("EventEmitter", o, "events"), t.exports = o } , function(t, e, i) { var n = i(122) , s = i(289) , r = i(292) , o = i(26) , a = i(0) , h = i(314) , l = i(822) , u = i(338) , c = i(113) , d = i(342) , f = i(315) , p = i(357) , g = i(10) , v = i(20) , m = i(365) , y = i(23) , x = i(370) , T = i(371) , w = i(373) , b = i(121) , E = i(376) , S = i(343) , _ = i(345) , A = i(380) , C = new a({ initialize: function(t) { this.config = new h(t), this.renderer = null, this.domContainer = null, this.canvas = null, this.context = null, this.isBooted = !1, this.isRunning = !1, this.events = new g, this.anims = new s(this), this.textures = new E(this), this.cache = new r(this), this.registry = new c(this), this.input = new m(this,this.config), this.scene = new w(this,this.config.sceneConfig), this.device = f, this.scale = new T(this,this.config), this.sound = null, this.sound = A.create(this), this.loop = new S(this,this.config.fps), this.plugins = new x(this,this.config), this.pendingDestroy = !1, this.removeCanvas = !1, this.noReturn = !1, this.hasFocus = !1, p(this.boot.bind(this)) }, boot: function() { y.hasCore("EventEmitter") ? (this.isBooted = !0, this.config.preBoot(this), this.scale.preBoot(), u(this), l(this), d(this), n(this.canvas, this.config.parent), this.textures.once(b.READY, this.texturesReady, this), this.events.emit(v.BOOT)) : console.warn("Aborting. Core Plugins missing.") }, texturesReady: function() { this.events.emit(v.READY), this.start() }, start: function() { this.isRunning = !0, this.config.postBoot(this), this.renderer ? this.loop.start(this.step.bind(this)) : this.loop.start(this.headlessStep.bind(this)), _(this); var t = this.events; t.on(v.HIDDEN, this.onHidden, this), t.on(v.VISIBLE, this.onVisible, this), t.on(v.BLUR, this.onBlur, this), t.on(v.FOCUS, this.onFocus, this) }, step: function(t, e) { if (this.pendingDestroy) return this.runDestroy(); var i = this.events; i.emit(v.PRE_STEP, t, e), i.emit(v.STEP, t, e), this.scene.update(t, e), i.emit(v.POST_STEP, t, e); var n = this.renderer; n.preRender(), i.emit(v.PRE_RENDER, n, t, e), this.scene.render(n), n.postRender(), i.emit(v.POST_RENDER, n, t, e) }, headlessStep: function(t, e) { if (this.pendingDestroy) return this.runDestroy(); var i = this.events; i.emit(v.PRE_STEP, t, e), i.emit(v.STEP, t, e), this.scene.update(t, e), i.emit(v.POST_STEP, t, e), i.emit(v.PRE_RENDER), i.emit(v.POST_RENDER) }, onHidden: function() { this.loop.pause(), this.events.emit(v.PAUSE) }, onVisible: function() { this.loop.resume(), this.events.emit(v.RESUME) }, onBlur: function() { this.hasFocus = !1, this.loop.blur() }, onFocus: function() { this.hasFocus = !0, this.loop.focus() }, getFrame: function() { return this.loop.frame }, getTime: function() { return this.loop.now }, destroy: function(t, e) { void 0 === e && (e = !1), this.pendingDestroy = !0, this.removeCanvas = t, this.noReturn = e }, runDestroy: function() { this.scene.destroy(), this.events.emit(v.DESTROY), this.events.removeAllListeners(), this.renderer && this.renderer.destroy(), this.removeCanvas && this.canvas && (o.remove(this.canvas), this.canvas.parentNode && this.canvas.parentNode.removeChild(this.canvas)), this.domContainer && this.domContainer.parentNode.removeChild(this.domContainer), this.loop.destroy(), this.pendingDestroy = !1 } }); t.exports = C } , function(t, e, i) { var n = i(122); t.exports = function(t) { var e, i = t.config; i.parent && i.domCreateContainer && ((e = document.createElement("div")).style.cssText = ["display: block;", "width: " + t.scale.width + "px;", "height: " + t.scale.height + "px;", "padding: 0; margin: 0;", "position: absolute;", "overflow: hidden;", "pointer-events: none;", "transform: scale(1);", "transform-origin: left top;"].join(" "), t.domContainer = e, n(e, i.parent)) } } , function(t, e) { t.exports = "boot" } , function(t, e) { t.exports = "destroy" } , function(t, e) { t.exports = "dragend" } , function(t, e) { t.exports = "dragenter" } , function(t, e) { t.exports = "drag" } , function(t, e) { t.exports = "dragleave" } , function(t, e) { t.exports = "dragover" } , function(t, e) { t.exports = "dragstart" } , function(t, e) { t.exports = "drop" } , function(t, e) { t.exports = "gameout" } , function(t, e) { t.exports = "gameover" } , function(t, e) { t.exports = "gameobjectdown" } , function(t, e) { t.exports = "dragend" } , function(t, e) { t.exports = "dragenter" } , function(t, e) { t.exports = "drag" } , function(t, e) { t.exports = "dragleave" } , function(t, e) { t.exports = "dragover" } , function(t, e) { t.exports = "dragstart" } , function(t, e) { t.exports = "drop" } , function(t, e) { t.exports = "gameobjectmove" } , function(t, e) { t.exports = "gameobjectout" } , function(t, e) { t.exports = "gameobjectover" } , function(t, e) { t.exports = "pointerdown" } , function(t, e) { t.exports = "pointermove" } , function(t, e) { t.exports = "pointerout" } , function(t, e) { t.exports = "pointerover" } , function(t, e) { t.exports = "pointerup" } , function(t, e) { t.exports = "wheel" } , function(t, e) { t.exports = "gameobjectup" } , function(t, e) { t.exports = "gameobjectwheel" } , function(t, e) { t.exports = "boot" } , function(t, e) { t.exports = "process" } , function(t, e) { t.exports = "update" } , function(t, e) { t.exports = "pointerdown" } , function(t, e) { t.exports = "pointerdownoutside" } , function(t, e) { t.exports = "pointermove" } , function(t, e) { t.exports = "pointerout" } , function(t, e) { t.exports = "pointerover" } , function(t, e) { t.exports = "pointerup" } , function(t, e) { t.exports = "pointerupoutside" } , function(t, e) { t.exports = "wheel" } , function(t, e) { t.exports = "pointerlockchange" } , function(t, e) { t.exports = "preupdate" } , function(t, e) { t.exports = "shutdown" } , function(t, e) { t.exports = "start" } , function(t, e) { t.exports = "update" } , function(t, e) { t.exports = function(t) { if (!t) return window.innerHeight; var e = Math.abs(window.orientation) , i = { w: 0, h: 0 } , n = document.createElement("div"); return n.setAttribute("style", "position: fixed; height: 100vh; width: 0; top: 0"), document.documentElement.appendChild(n), i.w = 90 === e ? n.offsetHeight : window.innerWidth, i.h = 90 === e ? window.innerWidth : n.offsetHeight, document.documentElement.removeChild(n), n = null, 90 !== Math.abs(window.orientation) ? i.h : i.w } } , function(t, e) { t.exports = "addfile" } , function(t, e) { t.exports = "complete" } , function(t, e) { t.exports = "filecomplete" } , function(t, e) { t.exports = "filecomplete-" } , function(t, e) { t.exports = "loaderror" } , function(t, e) { t.exports = "load" } , function(t, e) { t.exports = "fileprogress" } , function(t, e) { t.exports = "postprocess" } , function(t, e) { t.exports = "progress" } , function(t, e) { t.exports = "start" } , function(t, e, i) { var r = i(2) , o = i(181); t.exports = function(t) { var e = t.game.config.defaultPhysicsSystem , i = r(t.settings, "physics", !1); if (e || i) { var n = []; if (e && n.push(o(e + "Physics")), i) for (var s in i) s = o(s.concat("Physics")), -1 === n.indexOf(s) && n.push(s); return n } } } , function(t, e, i) { var n = i(2); t.exports = function(t) { var e = t.plugins.getDefaultScenePlugins() , i = n(t.settings, "plugins", !1); return Array.isArray(i) ? i : e || [] } } , function(t, e, i) { t.exports = { game: "game", anims: "anims", cache: "cache", plugins: "plugins", registry: "registry", scale: "scale", sound: "sound", textures: "textures", events: "events", cameras: "cameras", add: "add", make: "make", scenePlugin: "scene", displayList: "children", lights: "lights", data: "data", input: "input", load: "load", time: "time", tweens: "tweens", arcadePhysics: "physics", impactPhysics: "impact", matterPhysics: "matter" } } , function(t, e) { t.exports = function(t, e, i) { if (i.getElementsByTagName("TextureAtlas")) { var n = t.source[e]; t.add("__BASE", e, 0, 0, n.width, n.height); for (var s = i.getElementsByTagName("SubTexture"), r = 0; r < s.length; r++) { var o, a, h, l, u = s[r].attributes, c = u.name.value, d = parseInt(u.x.value, 10), f = parseInt(u.y.value, 10), p = parseInt(u.width.value, 10), g = parseInt(u.height.value, 10), v = t.add(c, e, d, f, p, g); u.frameX && (o = Math.abs(parseInt(u.frameX.value, 10)), a = Math.abs(parseInt(u.frameY.value, 10)), h = parseInt(u.frameWidth.value, 10), l = parseInt(u.frameHeight.value, 10), v.setTrim(p, g, o, a, h, l)) } return t } console.warn("Invalid Texture Atlas XML given") } } , function(t, e) { t.exports = function(t, e) { var i = t.source[e]; return t.add("__BASE", e, 0, 0, i.width, i.height), t } } , function(t, e) { t.exports = function(t, e) { var i = t.source[e]; return t.add("__BASE", e, 0, 0, i.width, i.height), t } } , function(t, e, i) { var u = i(67); t.exports = function(t, e, i) { if (i.frames || i.textures) { var n = t.source[e]; t.add("__BASE", e, 0, 0, n.width, n.height); for (var s = Array.isArray(i.textures) ? i.textures[e].frames : i.frames, r = 0; r < s.length; r++) { var o = s[r] , a = t.add(o.filename, e, o.frame.x, o.frame.y, o.frame.w, o.frame.h); o.trimmed && a.setTrim(o.sourceSize.w, o.sourceSize.h, o.spriteSourceSize.x, o.spriteSourceSize.y, o.spriteSourceSize.w, o.spriteSourceSize.h), o.rotated && (a.rotated = !0, a.updateUVsInverted()); var h = o.anchor || o.pivot; h && (a.customPivot = !0, a.pivotX = h.x, a.pivotY = h.y), a.customData = u(o) } for (var l in i) "frames" !== l && (Array.isArray(i[l]) ? t.customData[l] = i[l].slice(0) : t.customData[l] = i[l]); return t } console.warn("Invalid Texture Atlas JSON Array") } } , function(t, e, i) { var u = i(67); t.exports = function(t, e, i) { if (i.frames) { var n = t.source[e]; t.add("__BASE", e, 0, 0, n.width, n.height); var s = i.frames; for (var r in s) { var o = s[r] , a = t.add(r, e, o.frame.x, o.frame.y, o.frame.w, o.frame.h); o.trimmed && a.setTrim(o.sourceSize.w, o.sourceSize.h, o.spriteSourceSize.x, o.spriteSourceSize.y, o.spriteSourceSize.w, o.spriteSourceSize.h), o.rotated && (a.rotated = !0, a.updateUVsInverted()); var h = o.anchor || o.pivot; h && (a.customPivot = !0, a.pivotX = h.x, a.pivotY = h.y), a.customData = u(o) } for (var l in i) "frames" !== l && (Array.isArray(i[l]) ? t.customData[l] = i[l].slice(0) : t.customData[l] = i[l]); return t } console.warn("Invalid Texture Atlas JSON Hash given, missing 'frames' Object") } } , function(t, e, i) { var b = i(2); t.exports = function(t, e, i, n, s, r, o) { var a = b(o, "frameWidth", null) , h = b(o, "frameHeight", a); if (null === a) throw new Error("TextureManager.SpriteSheet: Invalid frameWidth given."); var l = t.source[e]; t.add("__BASE", e, 0, 0, l.width, l.height); var u = b(o, "startFrame", 0) , c = b(o, "endFrame", -1) , d = b(o, "margin", 0) , f = b(o, "spacing", 0) , p = Math.floor((s - d + f) / (a + f)) * Math.floor((r - d + f) / (h + f)); 0 === p && console.warn("SpriteSheet frame dimensions will result in zero frames for texture:", t.key), (p < u || u < -p) && (u = 0), u < 0 && (u = p + u), -1 !== c && (p = u + (c + 1)); for (var g = d, v = d, m = 0, y = 0, x = 0; x < p; x++) { y = m = 0; var T = g + a , w = v + h; s < T && (m = T - s), r < w && (y = w - r), t.add(x, e, i + g, n + v, a - m, h - y), s < (g += a + f) + a && (g = d, v += h + f) } return t } } , function(t, e, i) { var z = i(2); t.exports = function(t, e, i) { var n = z(i, "frameWidth", null) , s = z(i, "frameHeight", n); if (!n) throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given."); var r = t.source[0]; t.add("__BASE", 0, 0, 0, r.width, r.height); var o = z(i, "startFrame", 0) , a = z(i, "endFrame", -1) , h = z(i, "margin", 0) , l = z(i, "spacing", 0) , u = e.cutX , c = e.cutY , d = e.cutWidth , f = e.cutHeight , p = e.realWidth , g = e.realHeight , v = Math.floor((p - h + l) / (n + l)) , m = Math.floor((g - h + l) / (s + l)) , y = v * m , x = e.x , T = n - x , w = n - (p - d - x) , b = e.y , E = s - b , S = s - (g - f - b); (y < o || o < -y) && (o = 0), o < 0 && (o = y + o), -1 !== a && (y = o + (a + 1)); for (var _ = h, A = h, C = 0, M = e.sourceIndex, P = 0; P < m; P++) { for (var O = 0 === P, R = P === m - 1, L = 0; L < v; L++) { var k, D, F, I, B, N, Y = 0 === L, X = L === v - 1, U = t.add(C, M, u + _, c + A, n, s); (Y || O || X || R) && (k = Y ? x : 0, D = O ? b : 0, I = F = 0, Y && (F += n - T), X && (F += n - w), O && (I += s - E), R && (I += s - S), B = n - F, N = s - I, U.cutWidth = B, U.cutHeight = N, U.setTrim(n, s, k, D, B, N)), _ += l, _ += Y ? T : X ? w : n, C++ } _ = h, A += l, A += O ? E : R ? S : s } return t } } , function(t, e) { function p(t, e, i, n) { var s = g - n.y - n.height; t.add(i, e, n.x, s, n.width, n.height) } var g = 0; t.exports = function(t, e, i) { var n = t.source[e]; t.add("__BASE", e, 0, 0, n.width, n.height), g = n.height; for (var s = i.split("\n"), r = /^[ ]*(- )*(\w+)+[: ]+(.*)/, o = "", a = "", h = { x: 0, y: 0, width: 0, height: 0 }, l = 0; l < s.length; l++) { var u = s[l].match(r); if (u) { var c = "- " === u[1] , d = u[2] , f = u[3]; if (c && (a !== o && (p(t, e, a, h), o = a), h = { x: 0, y: 0, width: 0, height: 0 }), "name" !== d) switch (d) { case "x": case "y": case "width": case "height": h[d] = parseInt(f, 10) } else a = f } } return a !== o && p(t, e, a, h), t } } , function(t, e) { t.exports = "complete" } , function(t, e) { t.exports = "decoded" } , function(t, e) { t.exports = "decodedall" } , function(t, e) { t.exports = "destroy" } , function(t, e) { t.exports = "detune" } , function(t, e) { t.exports = "detune" } , function(t, e) { t.exports = "mute" } , function(t, e) { t.exports = "rate" } , function(t, e) { t.exports = "volume" } , function(t, e) { t.exports = "loop" } , function(t, e) { t.exports = "looped" } , function(t, e) { t.exports = "mute" } , function(t, e) { t.exports = "pauseall" } , function(t, e) { t.exports = "pause" } , function(t, e) { t.exports = "play" } , function(t, e) { t.exports = "rate" } , function(t, e) { t.exports = "resumeall" } , function(t, e) { t.exports = "resume" } , function(t, e) { t.exports = "seek" } , function(t, e) { t.exports = "stopall" } , function(t, e) { t.exports = "stop" } , function(t, e) { t.exports = "unlocked" } , function(t, e) { t.exports = "volume" } , function(t, e, i) { var n = { Events: i(90), DisplayList: i(915), GameObjectCreator: i(16), GameObjectFactory: i(5), UpdateList: i(941), Components: i(12), BuildGameObject: i(27), BuildGameObjectAnimation: i(393), GameObject: i(14), BitmapText: i(132), Blitter: i(188), Container: i(189), DOMElement: i(395), DynamicBitmapText: i(190), Extern: i(397), Graphics: i(191), Group: i(97), Image: i(107), Particles: i(973), PathFollower: i(409), RenderTexture: i(195), RetroFont: i(982), Rope: i(197), Sprite: i(75), Text: i(198), TileSprite: i(199), Zone: i(110), Video: i(200), Shape: i(30), Arc: i(410), Curve: i(411), Ellipse: i(412), Grid: i(413), IsoBox: i(414), IsoTriangle: i(415), Line: i(416), Polygon: i(417), Rectangle: i(422), Star: i(423), Triangle: i(424), Factories: { Blitter: i(1033), Container: i(1034), DOMElement: i(1035), DynamicBitmapText: i(1036), Extern: i(1037), Graphics: i(1038), Group: i(1039), Image: i(1040), Particles: i(1041), PathFollower: i(1042), RenderTexture: i(1043), Rope: i(1044), Sprite: i(1045), StaticBitmapText: i(1046), Text: i(1047), TileSprite: i(1048), Zone: i(1049), Video: i(1050), Arc: i(1051), Curve: i(1052), Ellipse: i(1053), Grid: i(1054), IsoBox: i(1055), IsoTriangle: i(1056), Line: i(1057), Polygon: i(1058), Rectangle: i(1059), Star: i(1060), Triangle: i(1061) }, Creators: { Blitter: i(1062), Container: i(1063), DynamicBitmapText: i(1064), Graphics: i(1065), Group: i(1066), Image: i(1067), Particles: i(1068), RenderTexture: i(1069), Rope: i(1070), Sprite: i(1071), StaticBitmapText: i(1072), Text: i(1073), TileSprite: i(1074), Zone: i(1075), Video: i(1076) } }; n.Mesh = i(134), n.Quad = i(203), n.Shader = i(204), n.Factories.Mesh = i(1083), n.Factories.Quad = i(1084), n.Factories.Shader = i(1085), n.Creators.Mesh = i(1086), n.Creators.Quad = i(1087), n.Creators.Shader = i(1088), n.Light = i(428), i(429), i(1089), t.exports = n } , function(t, e, i) { var n = i(0) , s = i(129) , r = i(23) , o = i(22) , a = i(131) , h = new n({ Extends: s, initialize: function(t) { s.call(this, t), this.sortChildrenFlag = !1, this.scene = t, this.systems = t.sys, t.sys.events.once(o.BOOT, this.boot, this), t.sys.events.on(o.START, this.start, this) }, boot: function() { this.systems.events.once(o.DESTROY, this.destroy, this) }, start: function() { this.systems.events.once(o.SHUTDOWN, this.shutdown, this) }, queueDepthSort: function() { this.sortChildrenFlag = !0 }, depthSort: function() { this.sortChildrenFlag && (a.inplace(this.list, this.sortByDepth), this.sortChildrenFlag = !1) }, sortByDepth: function(t, e) { return t._depth - e._depth }, getChildren: function() { return this.list }, shutdown: function() { for (var t = this.list.length; t--; ) this.list[t].destroy(!0); this.list.length = 0, this.systems.events.off(o.SHUTDOWN, this.shutdown, this) }, destroy: function() { this.shutdown(), this.scene.sys.events.off(o.START, this.start, this), this.scene = null, this.systems = null } }); r.register("DisplayList", h, "displayList"), t.exports = h } , function(t, e, i) { t.exports = { CheckMatrix: i(184), MatrixToString: i(917), ReverseColumns: i(918), ReverseRows: i(919), Rotate180: i(920), RotateLeft: i(921), RotateMatrix: i(130), RotateRight: i(922), TransposeMatrix: i(390) } } , function(t, e, i) { var o = i(163) , a = i(184); t.exports = function(t) { var e = ""; if (!a(t)) return e; for (var i = 0; i < t.length; i++) { for (var n = 0; n < t[i].length; n++) { var s = t[i][n].toString(); e += "undefined" !== s ? o(s, 2) : "?", n < t[i].length - 1 && (e += " |") } if (i < t.length - 1) { e += "\n"; for (var r = 0; r < t[i].length; r++) e += "---", r < t[i].length - 1 && (e += "+"); e += "\n" } } return e } } , function(t, e) { t.exports = function(t) { return t.reverse() } } , function(t, e) { t.exports = function(t) { for (var e = 0; e < t.length; e++) t[e].reverse(); return t } } , function(t, e, i) { var n = i(130); t.exports = function(t) { return n(t, 180) } } , function(t, e, i) { var n = i(130); t.exports = function(t) { return n(t, 90) } } , function(t, e, i) { var n = i(130); t.exports = function(t) { return n(t, -90) } } , function(t, e) { t.exports = function(t, e, i, n, s) { if (void 0 === s && (s = t), 0 < i) { var r = i - t.length; if (r <= 0) return null } if (!Array.isArray(e)) return -1 === t.indexOf(e) ? (t.push(e), n && n.call(s, e), e) : null; for (var o = e.length - 1; 0 <= o; ) -1 !== t.indexOf(e[o]) && e.splice(o, 1), o--; if (0 === (o = e.length)) return null; 0 < i && r < o && (e.splice(r), o = r); for (var a = 0; a < o; a++) { var h = e[a]; t.push(h), n && n.call(s, h) } return e } } , function(t, e) { t.exports = function(t, e, i, n, s, r) { if (void 0 === i && (i = 0), void 0 === r && (r = t), 0 < n) { var o = n - t.length; if (o <= 0) return null } if (!Array.isArray(e)) return -1 === t.indexOf(e) ? (t.splice(i, 0, e), s && s.call(r, e), e) : null; for (var a = e.length - 1; 0 <= a; ) -1 !== t.indexOf(e[a]) && e.pop(), a--; if (0 === (a = e.length)) return null; 0 < n && o < a && (e.splice(o), a = o); for (var h = a - 1; 0 <= h; h--) { var l = e[h]; t.splice(i, 0, l), s && s.call(r, l) } return e } } , function(t, e) { t.exports = function(t, e) { var i = t.indexOf(e); return -1 !== i && i < t.length && (t.splice(i, 1), t.push(e)), e } } , function(t, e, i) { var a = i(68); t.exports = function(t, e, i, n, s) { void 0 === n && (n = 0), void 0 === s && (s = t.length); var r = 0; if (a(t, n, s)) for (var o = n; o < s; o++) { t[o][e] === i && r++ } return r } } , function(t, e) { t.exports = function(t, e, i) { for (var n = [null], s = 3; s < arguments.length; s++) n.push(arguments[s]); for (s = 0; s < t.length; s++) n[0] = t[s], e.apply(i, n); return t } } , function(t, e, i) { var a = i(68); t.exports = function(t, e, i, n, s) { if (void 0 === n && (n = 0), void 0 === s && (s = t.length), a(t, n, s)) { for (var r = [null], o = 5; o < arguments.length; o++) r.push(arguments[o]); for (o = n; o < s; o++) r[0] = t[o], e.apply(i, r) } return t } } , function(t, e) { t.exports = function(t, e) { var i, n, s = t.indexOf(e); return 0 < s && (i = t[s - 1], n = t.indexOf(i), t[s] = i, t[n] = e), t } } , function(t, e) { t.exports = function(t, e, i) { var n = t.indexOf(e); if (-1 === n || i < 0 || i >= t.length) throw new Error("Supplied index out of bounds"); return n !== i && (t.splice(n, 1), t.splice(i, 0, e)), e } } , function(t, e) { t.exports = function(t, e) { var i, n, s = t.indexOf(e); return -1 !== s && s < t.length - 1 && (i = t[s + 1], n = t.indexOf(i), t[s] = i, t[n] = e), t } } , function(t, e) { t.exports = function(t, e, i, n) { for (var s, r = [], o = t; o <= e; o++) { i || n ? (s = i ? i + o.toString() : o.toString(), n && (s = s.concat(n)), r.push(s)) : r.push(o) } return r } } , function(t, e, i) { var o = i(332); t.exports = function(t, e, i) { void 0 === t && (t = 0), void 0 === e && (e = null), void 0 === i && (i = 1), null === e && (e = t, t = 0); for (var n = [], s = Math.max(o((e - t) / (i || 1)), 0), r = 0; r < s; r++) n.push(t), t += i; return n } } , function(t, e, i) { var r = i(80); t.exports = function(t, e, i, n) { if (void 0 === n && (n = t), e < 0 || e > t.length - 1) throw new Error("Index out of bounds"); var s = r(t, e); return i && i.call(n, s), s } } , function(t, e, i) { var l = i(68); t.exports = function(t, e, i, n, s) { if (void 0 === e && (e = 0), void 0 === i && (i = t.length), void 0 === s && (s = t), l(t, e, i)) { var r = i - e , o = t.splice(e, r); if (n) for (var a = 0; a < o.length; a++) { var h = o[a]; n.call(s, h) } return o } return [] } } , function(t, e, i) { var s = i(80); t.exports = function(t, e, i) { void 0 === e && (e = 0), void 0 === i && (i = t.length); var n = e + Math.floor(Math.random() * i); return s(t, n) } } , function(t, e) { t.exports = function(t, e, i) { var n = t.indexOf(e) , s = t.indexOf(i); return -1 !== n && -1 === s && (t[n] = i, !0) } } , function(t, e) { t.exports = function(t, e) { var i = t.indexOf(e); return -1 !== i && 0 < i && (t.splice(i, 1), t.unshift(e)), e } } , function(t, e, i) { var a = i(68); t.exports = function(t, e, i, n, s) { if (void 0 === n && (n = 0), void 0 === s && (s = t.length), a(t, n, s)) for (var r = n; r < s; r++) { var o = t[r]; o.hasOwnProperty(e) && (o[e] = i) } return t } } , function(t, e) { t.exports = function(t, e, i) { if (e !== i) { var n = t.indexOf(e) , s = t.indexOf(i); if (n < 0 || s < 0) throw new Error("Supplied items must be elements of the same array"); return t[n] = i, t[s] = e, t } } } , function(t, e, i) { var n = i(0) , s = i(186) , r = i(23) , o = i(22) , a = new n({ Extends: s, initialize: function(t) { s.call(this), this.scene = t, this.systems = t.sys, t.sys.events.once(o.BOOT, this.boot, this), t.sys.events.on(o.START, this.start, this) }, boot: function() { this.systems.events.once(o.DESTROY, this.destroy, this) }, start: function() { var t = this.systems.events; t.on(o.PRE_UPDATE, this.update, this), t.on(o.UPDATE, this.sceneUpdate, this), t.once(o.SHUTDOWN, this.shutdown, this) }, sceneUpdate: function(t, e) { for (var i = this._active, n = i.length, s = 0; s < n; s++) { var r = i[s]; r.active && r.preUpdate.call(r, t, e) } }, shutdown: function() { for (var t = this._active.length; t--; ) this._active[t].destroy(!0); for (t = this._pending.length; t--; ) this._pending[t].destroy(!0); for (t = this._destroy.length; t--; ) this._destroy[t].destroy(!0); this._toProcess = 0, this._pending = [], this._active = [], this._destroy = [], this.removeAllListeners(); var e = this.systems.events; e.off(o.PRE_UPDATE, this.preUpdate, this), e.off(o.UPDATE, this.sceneUpdate, this), e.off(o.SHUTDOWN, this.shutdown, this) }, destroy: function() { this.shutdown(), this.systems.events.off(o.START, this.start, this), this.scene = null, this.systems = null } }); r.register("UpdateList", a, "updateList"), t.exports = a } , function(t, e, i) { t.exports = { PROCESS_QUEUE_ADD: i(943), PROCESS_QUEUE_REMOVE: i(944) } } , function(t, e) { t.exports = "add" } , function(t, e) { t.exports = "remove" } , function(t, e) { t.exports = function(t, e, i) { if (void 0 === i) return i = { local: { x: 0, y: 0, width: 0, height: 0 }, global: { x: 0, y: 0, width: 0, height: 0 }, lines: { shortest: 0, longest: 0, lengths: null, height: 0 }, wrappedText: "", words: [], scaleX: 0, scaleY: 0 }; var n, s, r, o, a, h, l, u = t.text, c = u.length, d = t.maxWidth, f = t.wordWrapCharCode, p = Number.MAX_VALUE, g = Number.MAX_VALUE, v = 0, m = 0, y = t.fontData.chars, x = t.fontData.lineHeight, T = t.letterSpacing, w = 0, b = 0, E = 0, S = null, _ = 0, A = t.fontSize / t.fontData.size, C = A * t.scaleX, M = A * t.scaleY, P = null, O = 0, R = [], L = Number.MAX_VALUE, k = 0, D = 0, F = 0, I = [], B = null; if (0 < d) { for (X = 0; X < c; X++) { 10 !== (E = u.charCodeAt(X)) ? (S = y[E]) && (null !== P && (n = S.kerning[O]), E === f ? null !== B && (I.push({ word: B.word, i: B.i, x: B.x * C, y: B.y * M, w: B.w * C, h: B.h * M, cr: !1 }), B = null) : (null === B && (B = { word: "", i: X, x: w, y: b, w: 0, h: x, cr: !1 }), B.word = B.word.concat(u[X]), B.w += S.xOffset + S.xAdvance + (void 0 !== n ? n : 0)), w += S.xAdvance + T, P = S, O = E) : (null !== B && (I.push({ word: B.word, i: B.i, x: B.x * C, y: B.y * M, w: B.w * C, h: B.h * M, cr: !0 }), B = null), w = 0, b += x, P = null) } null !== B && I.push({ word: B.word, i: B.i, x: B.x * C, y: B.y * M, w: B.w * C, h: B.h * M, cr: !1 }), P = null; for (var N = O = b = w = 0, Y = [], X = 0; X < I.length; X++) { var U, z = I[X], G = z.x, W = z.x + z.w; U && (N = G - (G - (U.x + U.w) + U.w), U = null), d < G - N || d < W - N ? (Y.push(z.i - 1), U = z.cr ? (Y.push(z.i + z.word.length), N = 0, null) : z) : z.cr && (Y.push(z.i + z.word.length), N = 0, U = null) } for (X = Y.length - 1; 0 <= X; X--) s = u, r = Y[X], o = "\n", u = s.substr(0, r) + o + s.substr(r + 1); c = (i.wrappedText = u).length, I = [], B = null } for (X = 0; X < c; X++) { 10 !== (E = u.charCodeAt(X)) ? (S = y[E]) && (_ = w, null !== P && (_ += void 0 !== (a = S.kerning[O]) ? a : 0), _ < p && (p = _), b < g && (g = b), v < (h = _ + S.xAdvance) && (v = h), m < (l = b + x) && (m = l), E === f ? null !== B && (I.push({ word: B.word, i: B.i, x: B.x * C, y: B.y * M, w: B.w * C, h: B.h * M }), B = null) : (null === B && (B = { word: "", i: X, x: w, y: b, w: 0, h: x }), B.word = B.word.concat(u[X]), B.w += S.xOffset + S.xAdvance + (void 0 !== a ? a : 0)), w += S.xAdvance + T, P = S, O = E, F = h * A) : (null !== B && (I.push({ word: B.word, i: B.i, x: B.x * C, y: B.y * M, w: B.w * C, h: B.h * M }), B = null), w = 0, b += x, P = null, k < (R[D] = F) && (k = F), F < L && (L = F), D++, F = 0) } null !== B && I.push({ word: B.word, i: B.i, x: B.x * C, y: B.y * M, w: B.w * C, h: B.h * M }), k < (R[D] = F) && (k = F), F < L && (L = F); var V = i.local , H = i.global , j = i.lines; return V.x = p * A, V.y = g * A, V.width = v * A, V.height = m * A, H.x = t.x - t.displayOriginX + p * C, H.y = t.y - t.displayOriginY + g * M, H.width = v * C, H.height = m * M, j.shortest = L, j.longest = k, j.lengths = R, e && (V.x = Math.round(V.x), V.y = Math.round(V.y), V.width = Math.round(V.width), V.height = Math.round(V.height), H.x = Math.round(H.x), H.y = Math.round(H.y), H.width = Math.round(H.width), H.height = Math.round(H.height), j.shortest = Math.round(L), j.longest = Math.round(k)), i.words = I, i.lines.height = x, i.scaleX = t.scaleX, i.scaleY = t.scaleY, i } } , function(t, e, i) { var u = i(187); t.exports = function(t, e, i, n, s, r, o) { var a = t.sys.textures.getFrame(i, n) , h = t.sys.cache.xml.get(s); if (a && h) { var l = u(h, r, o, a); return t.sys.cache.bitmapFont.add(e, { data: l, texture: i, frame: n }), !0 } return !1 } } , function(t, e, i) { var n = i(1) , s = i(1) , n = i(948) , s = i(949); t.exports = { renderWebGL: n, renderCanvas: s } } , function(t, e, i) { var at = i(9); t.exports = function(t, e, i, n, s) { var r = e._text , o = r.length; if (0 !== o) { var a = this.pipeline; t.setPipeline(a, e); var h = a._tempMatrix1 , l = a._tempMatrix2 , u = a._tempMatrix3; l.applyITRS(e.x, e.y, e.rotation, e.scaleX, e.scaleY), h.copyFrom(n.matrix), s ? (h.multiplyWithOffset(s, -n.scrollX * e.scrollFactorX, -n.scrollY * e.scrollFactorY), l.e = e.x, l.f = e.y) : (l.e -= n.scrollX * e.scrollFactorX, l.f -= n.scrollY * e.scrollFactorY), h.multiply(l, u); var c = e.frame , d = c.glTexture , f = c.cutX , p = c.cutY , g = d.width , v = d.height , m = e._isTinted && e.tintFill , y = at.getTintAppendFloatAlpha(e._tintTL, n.alpha * e._alphaTL) , x = at.getTintAppendFloatAlpha(e._tintTR, n.alpha * e._alphaTR) , T = at.getTintAppendFloatAlpha(e._tintBL, n.alpha * e._alphaBL) , w = at.getTintAppendFloatAlpha(e._tintBR, n.alpha * e._alphaBR); a.setTexture2D(d, 0); var b, E, S, _, A, C, M = 0, P = 0, O = 0, R = e._letterSpacing, L = e.fontData, k = L.chars, D = L.lineHeight, F = e._fontSize / L.size, I = e._align, B = 0, N = 0, Y = e.getTextBounds(!1); 0 < e.maxWidth && (o = (r = Y.wrappedText).length); var X = e._bounds.lines; 1 === I ? N = (X.longest - X.lengths[0]) / 2 : 2 === I && (N = X.longest - X.lengths[0]); for (var U, z, G, W, V, H, j, q, K, J, Z, Q, $, tt, et, it, nt, st, rt = n.roundPixels, ot = 0; ot < o; ot++) { 10 !== (b = r.charCodeAt(ot)) ? (st = k[b]) && (E = f + st.x, S = p + st.y, _ = st.width, A = st.height, U = st.xOffset + M, z = st.yOffset + P, null !== C && (U += void 0 !== (G = st.kerning[O]) ? G : 0), M += st.xAdvance + R, C = st, O = b, 0 !== _ && 0 !== A && 32 !== b && (U *= F, z *= F, U -= e.displayOriginX, W = E / g, V = S / v, H = (E + _) / g, j = (S + A) / v, q = (U += N) + _ * F, K = (z -= e.displayOriginY) + A * F, J = u.getX(U, z), Z = u.getY(U, z), Q = u.getX(U, K), $ = u.getY(U, K), tt = u.getX(q, K), et = u.getY(q, K), it = u.getX(q, z), nt = u.getY(q, z), rt && (J = Math.round(J), Z = Math.round(Z), Q = Math.round(Q), $ = Math.round($), tt = Math.round(tt), et = Math.round(et), it = Math.round(it), nt = Math.round(nt)), a.batchQuad(J, Z, Q, $, tt, et, it, nt, W, V, H, j, y, x, T, w, m, d, 0))) : (B++, 1 === I ? N = (X.longest - X.lengths[B]) / 2 : 2 === I && (N = X.longest - X.lengths[B]), M = 0, P += D, C = null) } } } } , function(t, e, i) { var I = i(28); t.exports = function(t, e, i, n, s) { var r = e._text , o = r.length , a = t.currentContext; if (0 !== o && I(t, a, e, n, s)) { var h, l = e.frame, u = e.fontData.chars, c = e.fontData.lineHeight, d = e._letterSpacing, f = 0, p = 0, g = null, v = 0, m = 0, y = 0, x = 0, T = 0, w = 0, b = null, E = 0, S = e.frame.source.image, _ = l.cutX, A = l.cutY, C = e._fontSize / e.fontData.size, M = e._align, P = 0, O = 0, R = e.getTextBounds(!1); 0 < e.maxWidth && (o = (r = R.wrappedText).length); var L = e._bounds.lines; 1 === M ? O = (L.longest - L.lengths[0]) / 2 : 2 === M && (O = L.longest - L.lengths[0]), a.translate(-e.displayOriginX, -e.displayOriginY); for (var k, D = n.roundPixels, F = 0; F < o; F++) { 10 !== (h = r.charCodeAt(F)) ? (g = u[h]) && (v = _ + g.x, m = A + g.y, y = g.width, x = g.height, T = g.xOffset + f, w = g.yOffset + p, null !== b && (T += void 0 !== (k = g.kerning[E]) ? k : 0), T *= C, w *= C, T += O, f += g.xAdvance + d, b = g, E = h, 0 !== y && 0 !== x && 32 !== h && (D && (T = Math.round(T), w = Math.round(w)), a.save(), a.translate(T, w), a.scale(C, C), a.drawImage(S, v, m, y, x, 0, 0, y, x), a.restore())) : (P++, 1 === M ? O = (L.longest - L.lengths[P]) / 2 : 2 === M && (O = L.longest - L.lengths[P]), f = 0, p += c, b = null) } a.restore() } } } , function(t, e, i) { var n = i(1) , s = i(1) , n = i(951) , s = i(952); t.exports = { renderWebGL: n, renderCanvas: s } } , function(t, e, i) { var O = i(9); t.exports = function(t, e, i, n, s) { var r = e.getRenderList(); if (0 !== r.length) { var o = this.pipeline; t.setPipeline(o, e); var a = n.scrollX * e.scrollFactorX , h = n.scrollY * e.scrollFactorY , l = o._tempMatrix1; l.copyFrom(n.matrix), s && (l.multiplyWithOffset(s, -a, -h), h = a = 0); for (var u = e.x - a, c = e.y - h, d = -1, f = n.alpha * e.alpha, p = n.roundPixels, g = 0; g < r.length; g++) { var v, m, y, x, T, w, b, E, S, _, A, C = r[g], M = C.frame, P = C.alpha * f; 0 != P && (v = M.width, m = M.height, y = u + C.x + M.x, x = c + C.y + M.y, C.flipX && (v *= -1, y += M.width), C.flipY && (m *= -1, x += M.height), T = y + v, w = x + m, b = l.getX(y, x), E = l.getY(y, x), S = l.getX(T, w), _ = l.getY(T, w), A = O.getTintAppendFloatAlpha(C.tint, P), M.sourceIndex !== d && (o.setTexture2D(M.glTexture, 0), d = M.sourceIndex), p && (b = Math.round(b), E = Math.round(E), S = Math.round(S), _ = Math.round(_)), o.batchQuad(b, E, b, _, S, _, S, E, M.u0, M.v0, M.u1, M.v1, A, A, A, A, !1, M.glTexture, 0) && (d = -1)) } } } } , function(t, e) { t.exports = function(t, e, i, n, s) { var r = e.getRenderList(); if (0 !== r.length) { var o = t.currentContext , a = n.alpha * e.alpha; if (0 != a) { o.globalCompositeOperation = t.blendModes[e.blendMode], o.imageSmoothingEnabled = !(!t.antialias || e.frame.source.scaleMode); var h = e.x - n.scrollX * e.scrollFactorX , l = e.y - n.scrollY * e.scrollFactorY; o.save(), s && s.copyToContext(o); for (var u = n.roundPixels, c = 0; c < r.length; c++) { var d = r[c] , f = d.flipX || d.flipY , p = d.frame , g = p.canvasData , v = p.x , m = p.y , y = 1 , x = 1 , T = d.alpha * a; 0 != T && (o.globalAlpha = T, f ? (d.flipX && (y = -1, v -= g.width), d.flipY && (x = -1, m -= g.height), o.save(), o.translate(d.x + h, d.y + l), o.scale(y, x), o.drawImage(p.source.image, g.x, g.y, g.width, g.height, v, m, g.width, g.height), o.restore()) : (u && (v = Math.round(v), m = Math.round(m)), o.drawImage(p.source.image, g.x, g.y, g.width, g.height, v + d.x + h, m + d.y + l, g.width, g.height))) } o.restore() } } } } , function(t, e, i) { var n = i(0) , s = i(94) , r = new n({ initialize: function(t, e, i, n, s) { this.parent = t, this.x = e, this.y = i, this.frame = n, this.data = {}, this.tint = 16777215, this._visible = s, this._alpha = 1, this.flipX = !1, this.flipY = !1 }, setFrame: function(t) { return void 0 === t ? this.frame = this.parent.frame : t instanceof s && t.texture === this.parent.texture ? this.frame = t : this.frame = this.parent.texture.get(t), this }, resetFlip: function() { return this.flipX = !1, this.flipY = !1, this }, reset: function(t, e, i) { return this.x = t, this.y = e, this.flipX = !1, this.flipY = !1, this._alpha = 1, this._visible = !0, this.parent.dirty = !0, i && this.setFrame(i), this }, setPosition: function(t, e) { return this.x = t, this.y = e, this }, setFlipX: function(t) { return this.flipX = t, this }, setFlipY: function(t) { return this.flipY = t, this }, setFlip: function(t, e) { return this.flipX = t, this.flipY = e, this }, setVisible: function(t) { return this.visible = t, this }, setAlpha: function(t) { return this.alpha = t, this }, setTint: function(t) { return this.tint = t, this }, destroy: function() { this.parent.dirty = !0, this.parent.children.remove(this), this.parent = void 0, this.frame = void 0, this.data = void 0 }, visible: { get: function() { return this._visible }, set: function(t) { this.parent.dirty |= this._visible !== t, this._visible = t } }, alpha: { get: function() { return this._alpha }, set: function(t) { this.parent.dirty |= 0 < this._alpha != 0 < t, this._alpha = t } } }); t.exports = r } , function(t, e, i) { var n = i(1) , s = i(1) , n = i(955) , s = i(956); t.exports = { renderWebGL: n, renderCanvas: s } } , function(t, e) { t.exports = function(t, e, i, n, s) { var r = e.list; if (0 !== r.length) { var o = e.localTransform; s ? (o.loadIdentity(), o.multiply(s), o.translate(e.x, e.y), o.rotate(e.rotation), o.scale(e.scaleX, e.scaleY)) : o.applyITRS(e.x, e.y, e.rotation, e.scaleX, e.scaleY); var a = -1 !== e.blendMode; a || t.setBlendMode(0); for (var h = e.alpha, l = e.scrollFactorX, u = e.scrollFactorY, c = r, d = r.length, f = 0; f < d; f++) { var p, g, v, m, y, x, T, w, b = r[f]; b.willRender(n) && (m = void 0 !== b.alphaTopLeft ? (p = b.alphaTopLeft, g = b.alphaTopRight, v = b.alphaBottomLeft, b.alphaBottomRight) : v = g = p = b.alpha, y = b.scrollFactorX, x = b.scrollFactorY, a || b.blendMode === t.currentBlendMode || t.setBlendMode(b.blendMode), (T = b.mask) && T.preRenderWebGL(t, b, n), (w = b.type) !== t.currentType && (t.newType = !0, t.currentType = w), t.nextTypeMatch = f < d - 1 && c[f + 1].type === t.currentType, b.setScrollFactor(y * l, x * u), b.setAlpha(p * h, g * h, v * h, m * h), b.renderWebGL(t, b, i, n, o), b.setAlpha(p, g, v, m), b.setScrollFactor(y, x), T && T.postRenderWebGL(t, n), t.newType = !1) } } } } , function(t, e) { t.exports = function(t, e, i, n, s) { var r = e.list; if (0 !== r.length) { var o = e.localTransform; s ? (o.loadIdentity(), o.multiply(s), o.translate(e.x, e.y), o.rotate(e.rotation), o.scale(e.scaleX, e.scaleY)) : o.applyITRS(e.x, e.y, e.rotation, e.scaleX, e.scaleY); var a = -1 !== e.blendMode; a || t.setBlendMode(0); var h = e._alpha , l = e.scrollFactorX , u = e.scrollFactorY; e.mask && e.mask.preRenderCanvas(t, null, n); for (var c = 0; c < r.length; c++) { var d, f, p, g = r[c]; g.willRender(n) && (d = g.alpha, f = g.scrollFactorX, p = g.scrollFactorY, a || g.blendMode === t.currentBlendMode || t.setBlendMode(g.blendMode), g.setScrollFactor(f * l, p * u), g.setAlpha(d * h), g.renderCanvas(t, g, i, n, o), g.setAlpha(d), g.setScrollFactor(f, p)) } e.mask && e.mask.postRenderCanvas(t) } } } , function(t, e, i) { var n = i(1) , s = i(1) , n = i(396) , s = i(396); t.exports = { renderWebGL: n, renderCanvas: s } } , function(t, e) { t.exports = ["normal", "multiply", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"] } , function(t, e, i) { var n = i(1) , s = i(1) , n = i(960) , s = i(961); t.exports = { renderWebGL: n, renderCanvas: s } } , function(t, e, i) { var dt = i(9); t.exports = function(t, e, i, n, s) { var r = e.text , o = r.length; if (0 !== o) { var a = this.pipeline; t.setPipeline(a, e); var h = 0 < e.cropWidth || 0 < e.cropHeight; h && (a.flush(), t.pushScissor(e.x, e.y, e.cropWidth * e.scaleX, e.cropHeight * e.scaleY)); var l = a._tempMatrix1 , u = a._tempMatrix2 , c = a._tempMatrix3 , d = a._tempMatrix4; u.applyITRS(e.x, e.y, e.rotation, e.scaleX, e.scaleY), l.copyFrom(n.matrix), s ? (l.multiplyWithOffset(s, -n.scrollX * e.scrollFactorX, -n.scrollY * e.scrollFactorY), u.e = e.x, u.f = e.y) : (u.e -= n.scrollX * e.scrollFactorX, u.f -= n.scrollY * e.scrollFactorY), l.multiply(u, c); var f = e.frame , p = f.glTexture , g = f.cutX , v = f.cutY , m = p.width , y = p.height , x = e._isTinted && e.tintFill , T = dt.getTintAppendFloatAlpha(e._tintTL, n.alpha * e._alphaTL) , w = dt.getTintAppendFloatAlpha(e._tintTR, n.alpha * e._alphaTR) , b = dt.getTintAppendFloatAlpha(e._tintBL, n.alpha * e._alphaBL) , E = dt.getTintAppendFloatAlpha(e._tintBR, n.alpha * e._alphaBR); a.setTexture2D(p, 0); var S, _, A, C, M, P, O = 0, R = 0, L = 0, k = e.letterSpacing, D = e.scrollX, F = e.scrollY, I = e.fontData, B = I.chars, N = I.lineHeight, Y = e.fontSize / I.size, X = 0, U = e._align, z = 0, G = 0; e.getTextBounds(!1); var W = e._bounds.lines; 1 === U ? G = (W.longest - W.lengths[0]) / 2 : 2 === U && (G = W.longest - W.lengths[0]); for (var V, H, j, q, K, J, Z, Q, $, tt, et, it, nt, st, rt, ot, at, ht = n.roundPixels, lt = e.displayCallback, ut = e.callbackData, ct = 0; ct < o; ct++) { 10 !== (S = r.charCodeAt(ct)) ? (at = B[S]) && (_ = g + at.x, A = v + at.y, C = at.width, M = at.height, j = at.xOffset + O - D, q = at.yOffset + R - F, null !== P && (j += void 0 !== (V = at.kerning[L]) ? V : 0), O += at.xAdvance + k, P = at, L = S, 0 !== C && 0 !== M && 32 !== S && (Y = e.fontSize / e.fontData.size, X = 0, lt && (ut.color = 0, ut.tint.topLeft = T, ut.tint.topRight = w, ut.tint.bottomLeft = b, ut.tint.bottomRight = E, ut.index = ct, ut.charCode = S, ut.x = j, ut.y = q, ut.scale = Y, ut.rotation = X, ut.data = at.data, j = (H = lt(ut)).x, q = H.y, Y = H.scale, X = H.rotation, E = H.color ? (T = H.color, w = H.color, b = H.color, H.color) : (T = H.tint.topLeft, w = H.tint.topRight, b = H.tint.bottomLeft, H.tint.bottomRight), T = dt.getTintAppendFloatAlpha(T, n.alpha * e._alphaTL), w = dt.getTintAppendFloatAlpha(w, n.alpha * e._alphaTR), b = dt.getTintAppendFloatAlpha(b, n.alpha * e._alphaBL), E = dt.getTintAppendFloatAlpha(E, n.alpha * e._alphaBR)), j *= Y, q *= Y, j -= e.displayOriginX, q -= e.displayOriginY, j += G, d.applyITRS(j, q, X, Y, Y), c.multiply(d, u), K = _ / m, J = A / y, Z = (_ + C) / m, Q = (A + M) / y, $ = u.e, tt = u.f, et = M * u.c + u.e, it = M * u.d + u.f, nt = C * u.a + M * u.c + u.e, st = C * u.b + M * u.d + u.f, rt = C * u.a + u.e, ot = C * u.b + u.f, ht && ($ = Math.round($), tt = Math.round(tt), et = Math.round(et), it = Math.round(it), nt = Math.round(nt), st = Math.round(st), rt = Math.round(rt), ot = Math.round(ot)), a.batchQuad($, tt, et, it, nt, st, rt, ot, K, J, Z, Q, T, w, b, E, x, p, 0))) : (z++, 1 === U ? G = (W.longest - W.lengths[z]) / 2 : 2 === U && (G = W.longest - W.lengths[z]), O = 0, R += N, P = null) } h && (a.flush(), t.popScissor()) } } } , function(t, e, i) { var X = i(28); t.exports = function(t, e, i, n, s) { var r = e._text , o = r.length , a = t.currentContext; if (0 !== o && X(t, a, e, n, s)) { var h, l = e.frame, u = e.displayCallback, c = e.callbackData, d = e.fontData.chars, f = e.fontData.lineHeight, p = e._letterSpacing, g = 0, v = 0, m = null, y = 0, x = 0, T = 0, w = 0, b = 0, E = 0, S = null, _ = 0, A = e.frame.source.image, C = l.cutX, M = l.cutY, P = 0, O = 0, R = e._fontSize / e.fontData.size, L = e._align, k = 0, D = 0; e.getTextBounds(!1); var F = e._bounds.lines; 1 === L ? D = (F.longest - F.lengths[0]) / 2 : 2 === L && (D = F.longest - F.lengths[0]), a.translate(-e.displayOriginX, -e.displayOriginY); var I = n.roundPixels; 0 < e.cropWidth && 0 < e.cropHeight && (a.beginPath(), a.rect(0, 0, e.cropWidth, e.cropHeight), a.clip()); for (var B, N, Y = 0; Y < o; Y++) { O = R, P = 0, 10 !== (h = r.charCodeAt(Y)) ? (m = d[h]) && (y = C + m.x, x = M + m.y, T = m.width, w = m.height, b = m.xOffset + g - e.scrollX, E = m.yOffset + v - e.scrollY, null !== S && (b += void 0 !== (B = m.kerning[_]) ? B : 0), u && (c.index = Y, c.charCode = h, c.x = b, c.y = E, c.scale = O, c.rotation = P, c.data = m.data, b = (N = u(c)).x, E = N.y, O = N.scale, P = N.rotation), b *= O, E *= O, b += D, g += m.xAdvance + p, S = m, _ = h, 0 !== T && 0 !== w && 32 !== h && (I && (b = Math.round(b), E = Math.round(E)), a.save(), a.translate(b, E), a.rotate(P), a.scale(O, O), a.drawImage(A, y, x, T, w, 0, 0, T, w), a.restore())) : (k++, 1 === L ? D = (F.longest - F.lengths[k]) / 2 : 2 === L && (D = F.longest - F.lengths[k]), g = 0, v += f, S = null) } a.restore() } } } , function(t, e, i) { var n = i(1) , s = i(1) , n = i(963) , s = i(964); t.exports = { renderWebGL: n, renderCanvas: s } } , function(t, e) { t.exports = function(t, e, i, n, s) { var r = t.currentPipeline; t.clearPipeline(); var o = t._tempMatrix1 , a = t._tempMatrix2 , h = t._tempMatrix3; a.applyITRS(e.x, e.y, e.rotation, e.scaleX, e.scaleY), o.copyFrom(n.matrix), s ? (o.multiplyWithOffset(s, -n.scrollX * e.scrollFactorX, -n.scrollY * e.scrollFactorY), a.e = e.x, a.f = e.y) : (a.e -= n.scrollX * e.scrollFactorX, a.f -= n.scrollY * e.scrollFactorY), o.multiply(a, h), e.render.call(e, t, n, h), t.rebindPipeline(r) } } , function(t, e) {} , function(t, e, i) { var n = i(1) , s = i(1) , n = i(966) , s = i(401); s = i(401), t.exports = { renderWebGL: n, renderCanvas: s } } , function(t, e, i) { function Y(t, e, i) { this.x = t, this.y = e, this.width = i } function X(t, e, i) { this.points = [], this.pointsLength = 1, this.points[0] = new Y(t,e,i) } var U = i(192) , z = i(9) , G = []; t.exports = function(t, e, i, n, s) { if (0 !== e.commandBuffer.length) { var r = this.pipeline; t.setPipeline(r, e); var o = e._tempMatrix1 , a = e._tempMatrix2 , h = e._tempMatrix3; h.loadIdentity(), a.applyITRS(e.x, e.y, e.rotation, e.scaleX, e.scaleY), o.copyFrom(n.matrix), s ? (o.multiplyWithOffset(s, -n.scrollX * e.scrollFactorX, -n.scrollY * e.scrollFactorY), a.e = e.x, a.f = e.y) : (a.e -= n.scrollX * e.scrollFactorX, a.f -= n.scrollY * e.scrollFactorY), o.multiply(a); for (var l = e.commandBuffer, u = n.alpha * e.alpha, c = 1, d = r.fillTint, f = r.strokeTint, p = 0, g = 0, v = 0, m = 2 * Math.PI, y = [], x = 0, T = !1, w = null, b = z.getTintAppendFloatAlphaAndSwap, E = t.blankTexture.glTexture, S = 0; S < l.length; S++) switch (l[S]) { case U.BEGIN_PATH: y.length = 0, T = !(w = null); break; case U.CLOSE_PATH: T = !1, w && w.points.length && w.points.push(w.points[0]); break; case U.FILL_PATH: for (x = 0; x < y.length; x++) r.setTexture2D(E), r.batchFillPath(y[x].points, h, o); break; case U.STROKE_PATH: for (x = 0; x < y.length; x++) r.setTexture2D(E), r.batchStrokePath(y[x].points, c, T, h, o); break; case U.LINE_STYLE: c = l[++S]; var _ = b(l[++S], l[++S] * u); f.TL = _, f.TR = _, f.BL = _, f.BR = _; break; case U.FILL_STYLE: var A = b(l[++S], l[++S] * u); d.TL = A, d.TR = A, d.BL = A, d.BR = A; break; case U.GRADIENT_FILL_STYLE: var C = l[++S] * u; d.TL = b(l[++S], C), d.TR = b(l[++S], C), d.BL = b(l[++S], C), d.BR = b(l[++S], C); break; case U.GRADIENT_LINE_STYLE: c = l[++S]; var M = l[++S] * u; f.TL = b(l[++S], M), f.TR = b(l[++S], M), f.BL = b(l[++S], M), f.BR = b(l[++S], M); break; case U.ARC: var P = 0 , O = l[++S] , R = l[++S] , L = l[++S] , k = l[++S] , D = l[++S] , F = l[++S] , I = l[++S]; for (D -= k, F ? D < -m ? D = -m : 0 < D && (D = D % m - m) : m < D ? D = m : D < 0 && (D = m + D % m), null === w && (w = new X(O + Math.cos(k) * L,R + Math.sin(k) * L,c), y.push(w), P += .01); P < 1 + I; ) v = D * P + k, p = O + Math.cos(v) * L, g = R + Math.sin(v) * L, w.points.push(new Y(p,g,c)), P += .01; v = D + k, p = O + Math.cos(v) * L, g = R + Math.sin(v) * L, w.points.push(new Y(p,g,c)); break; case U.FILL_RECT: r.setTexture2D(E), r.batchFillRect(l[++S], l[++S], l[++S], l[++S], h, o); break; case U.FILL_TRIANGLE: r.setTexture2D(E), r.batchFillTriangle(l[++S], l[++S], l[++S], l[++S], l[++S], l[++S], h, o); break; case U.STROKE_TRIANGLE: r.setTexture2D(E), r.batchStrokeTriangle(l[++S], l[++S], l[++S], l[++S], l[++S], l[++S], c, h, o); break; case U.LINE_TO: null !== w ? w.points.push(new Y(l[++S],l[++S],c)) : (w = new X(l[++S],l[++S],c), y.push(w)); break; case U.MOVE_TO: w = new X(l[++S],l[++S],c), y.push(w); break; case U.SAVE: G.push(h.copyToArray()); break; case U.RESTORE: h.copyFromArray(G.pop()); break; case U.TRANSLATE: O = l[++S], R = l[++S], h.translate(O, R); break; case U.SCALE: O = l[++S], R = l[++S], h.scale(O, R); break; case U.ROTATE: h.rotate(l[++S]); break; case U.SET_TEXTURE: var B = l[++S] , N = l[++S]; r.currentFrame = B, r.setTexture2D(B.glTexture, 0), r.tintEffect = N, E = B.glTexture; break; case U.CLEAR_TEXTURE: r.currentFrame = t.blankTexture, r.tintEffect = 2, E = t.blankTexture.glTexture } } } } , function(t, e, i) { var n = i(1) , s = i(1) , n = i(968) , s = i(969); t.exports = { renderWebGL: n, renderCanvas: s } } , function(t, e) { t.exports = function(t, e, i, n, s) { this.pipeline.batchSprite(e, n, s) } } , function(t, e) { t.exports = function(t, e, i, n, s) { t.batchSprite(e, e.frame, n, s) } } , function(t, e, i) { var n = i(1) , s = i(1) , n = i(971) , s = i(972); t.exports = { renderWebGL: n, renderCanvas: s } } , function(t, e) { t.exports = function(t, e, i, n, s) { this.pipeline.batchSprite(e, n, s) } } , function(t, e) { t.exports = function(t, e, i, n, s) { t.batchSprite(e, e.frame, n, s) } } , function(t, e, i) { t.exports = { GravityWell: i(402), Particle: i(403), ParticleEmitter: i(404), ParticleEmitterManager: i(194), Zones: i(978) } } , function(t, e, i) { var n = i(0) , s = i(119) , r = i(69) , o = i(2) , a = i(58) , h = new n({ initialize: function(t, e, i, n) { void 0 === n && (n = !1), this.propertyKey = e, this.propertyValue = i, this.defaultValue = i, this.steps = 0, this.counter = 0, this.start = 0, this.end = 0, this.ease, this.emitOnly = n, this.onEmit = this.defaultEmit, this.onUpdate = this.defaultUpdate, this.loadConfig(t) }, loadConfig: function(t, e) { void 0 === t && (t = {}), e && (this.propertyKey = e), this.propertyValue = o(t, this.propertyKey, this.defaultValue), this.setMethods(), this.emitOnly && (this.onUpdate = this.defaultUpdate) }, toJSON: function() { return this.propertyValue }, onChange: function(t) { return this.propertyValue = t, this.setMethods() }, setMethods: function() { var t, e, i, n = this.propertyValue, s = typeof n; return "number" == s ? (this.onEmit = this.staticValueEmit, this.onUpdate = this.staticValueUpdate) : Array.isArray(n) ? this.onEmit = this.randomStaticValueEmit : "function" == s ? this.emitOnly ? this.onEmit = n : this.onUpdate = n : "object" == s && (this.has(n, "random") || this.hasBoth(n, "start", "end") || this.hasBoth(n, "min", "max")) ? (this.start = this.has(n, "start") ? n.start : n.min, this.end = this.has(n, "end") ? n.end : n.max, (t = this.hasBoth(n, "min", "max") || !!n.random) && (e = n.random, Array.isArray(e) && (this.start = e[0], this.end = e[1]), this.onEmit = this.randomRangedValueEmit), this.has(n, "steps") ? (this.steps = n.steps, this.counter = this.start, this.onEmit = this.steppedEmit) : (i = this.has(n, "ease") ? n.ease : "Linear", this.ease = r(i), t || (this.onEmit = this.easedValueEmit), this.onUpdate = this.easeValueUpdate)) : "object" == s && this.hasEither(n, "onEmit", "onUpdate") && (this.has(n, "onEmit") && (this.onEmit = n.onEmit), this.has(n, "onUpdate") && (this.onUpdate = n.onUpdate)), this }, has: function(t, e) { return t.hasOwnProperty(e) }, hasBoth: function(t, e, i) { return t.hasOwnProperty(e) && t.hasOwnProperty(i) }, hasEither: function(t, e, i) { return t.hasOwnProperty(e) || t.hasOwnProperty(i) }, defaultEmit: function(t, e, i) { return i }, defaultUpdate: function(t, e, i, n) { return n }, staticValueEmit: function() { return this.propertyValue }, staticValueUpdate: function() { return this.propertyValue }, randomStaticValueEmit: function() { var t = Math.floor(Math.random() * this.propertyValue.length); return this.propertyValue[t] }, randomRangedValueEmit: function(t, e) { var i = s(this.start, this.end); return t && t.data[e] && (t.data[e].min = i), i }, steppedEmit: function() { var t = this.counter , e = this.counter + (this.end - this.start) / this.steps; return this.counter = a(e, this.start, this.end), t }, easedValueEmit: function(t, e) { var i; return t && t.data[e] && ((i = t.data[e]).min = this.start, i.max = this.end), this.start }, easeValueUpdate: function(t, e, i) { var n = t.data[e]; return (n.max - n.min) * this.ease(i) + n.min } }); t.exports = h } , function(t, e, i) { var n = i(1) , s = i(1) , n = i(976) , s = i(977); t.exports = { renderWebGL: n, renderCanvas: s } } , function(t, e, i) { var N = i(9); t.exports = function(t, e, i, n, s) { var r = e.emitters.list , o = r.length; if (0 !== o) { var a = this.pipeline , h = a._tempMatrix1.copyFrom(n.matrix) , l = a._tempMatrix2 , u = a._tempMatrix3 , c = a._tempMatrix4.applyITRS(e.x, e.y, e.rotation, e.scaleX, e.scaleY); h.multiply(c), t.setPipeline(a); var d = n.roundPixels , f = e.defaultFrame.glTexture , p = N.getTintAppendFloatAlphaAndSwap; a.setTexture2D(f, 0); for (var g = 0; g < o; g++) { var v = r[g] , m = v.alive , y = m.length; if (v.visible && 0 !== y) { var x = n.scrollX * v.scrollFactorX , T = n.scrollY * v.scrollFactorY; s && (h.multiplyWithOffset(s, -x, -T), T = x = 0), t.setBlendMode(v.blendMode) && a.setTexture2D(f, 0), v.mask && (v.mask.preRenderWebGL(t, v, n), a.setTexture2D(f, 0)); for (var w = 0; w < y; w++) { var b, E, S, _, A, C, M, P, O, R, L, k, D, F, I = m[w], B = I.alpha * n.alpha; B <= 0 || (E = -(b = I.frame).halfWidth, S = -b.halfHeight, _ = E + b.width, A = S + b.height, u.applyITRS(0, 0, I.rotation, I.scaleX, I.scaleY), u.e = I.x - x, u.f = I.y - T, h.multiply(u, l), C = l.getX(E, S), M = l.getY(E, S), P = l.getX(E, A), O = l.getY(E, A), R = l.getX(_, A), L = l.getY(_, A), k = l.getX(_, S), D = l.getY(_, S), d && (C = Math.round(C), M = Math.round(M), P = Math.round(P), O = Math.round(O), R = Math.round(R), L = Math.round(L), k = Math.round(k), D = Math.round(D)), F = p(I.tint, B), a.batchQuad(C, M, P, O, R, L, k, D, b.u0, b.v0, b.u1, b.v1, F, F, F, F, 0, f, 0)) } v.mask && (v.mask.postRenderWebGL(t, n), a.setTexture2D(f, 0)) } } } } } , function(t, e) { t.exports = function(t, e, i, n, s) { var r = e.emitters.list , o = r.length; if (0 !== o) { var a = t._tempMatrix1.copyFrom(n.matrix) , h = t._tempMatrix2 , l = t._tempMatrix3 , u = t._tempMatrix4.applyITRS(e.x, e.y, e.rotation, e.scaleX, e.scaleY); a.multiply(u); var c = n.roundPixels , d = t.currentContext; d.save(); for (var f = 0; f < o; f++) { var p = r[f] , g = p.alive , v = g.length; if (p.visible && 0 !== v) { var m = n.scrollX * p.scrollFactorX , y = n.scrollY * p.scrollFactorY; s && (a.multiplyWithOffset(s, -m, -y), y = m = 0), d.globalCompositeOperation = t.blendModes[p.blendMode]; for (var x = 0; x < v; x++) { var T, w, b, E, S = g[x], _ = S.alpha * n.alpha; _ <= 0 || (w = (T = S.frame).canvasData, b = -T.halfWidth, E = -T.halfHeight, l.applyITRS(0, 0, S.rotation, S.scaleX, S.scaleY), l.e = S.x - m, l.f = S.y - y, a.multiply(l, h), d.globalAlpha = _, d.save(), h.copyToContext(d), c && (b = Math.round(b), E = Math.round(E)), d.imageSmoothingEnabled = !(!t.antialias || T.source.scaleMode), d.drawImage(T.source.image, w.x, w.y, w.width, w.height, b, E, w.width, w.height), d.restore()) } } } d.restore() } } } , function(t, e, i) { t.exports = { DeathZone: i(405), EdgeZone: i(406), RandomZone: i(408) } } , function(t, e, i) { var n = i(1) , s = i(1) , n = i(980) , s = i(981); t.exports = { renderWebGL: n, renderCanvas: s } } , function(t, e, i) { var l = i(9); t.exports = function(t, e, i, n, s) { var r = e.frame , o = r.width , a = r.height , h = l.getTintAppendFloatAlpha; this.pipeline.batchTexture(e, r.glTexture, o, a, e.x, e.y, o, a, e.scaleX, e.scaleY, e.rotation, e.flipX, !e.flipY, e.scrollFactorX, e.scrollFactorY, e.displayOriginX, e.displayOriginY, 0, 0, o, a, h(e._tintTL, n.alpha * e._alphaTL), h(e._tintTR, n.alpha * e._alphaTR), h(e._tintBL, n.alpha * e._alphaBL), h(e._tintBR, n.alpha * e._alphaBR), e._isTinted && e.tintFill, 0, 0, n, s), t.setBlankTexture(!0) } } , function(t, e) { t.exports = function(t, e, i, n, s) { t.batchSprite(e, e.frame, n, s) } } , function(t, e, i) { var n = i(983) , s = i(18)(!1, s = { Parse: i(984) }, n); t.exports = s } , function(t, e) { t.exports = { TEXT_SET1: " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~", TEXT_SET2: " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ", TEXT_SET3: "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ", TEXT_SET4: "ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789", TEXT_SET5: "ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789", TEXT_SET6: "ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ", TEXT_SET7: "AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39", TEXT_SET8: "0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ", TEXT_SET9: "ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!", TEXT_SET10: "ABCDEFGHIJKLMNOPQRSTUVWXYZ", TEXT_SET11: "ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789" } } , function(t, e, i) { var T = i(6); t.exports = function(t, e) { var i = e.width , n = e.height , s = Math.floor(i / 2) , r = Math.floor(n / 2) , o = T(e, "chars", ""); if ("" !== o) { var a = T(e, "image", "") , h = T(e, "offset.x", 0) , l = T(e, "offset.y", 0) , u = T(e, "spacing.x", 0) , c = T(e, "spacing.y", 0) , d = T(e, "lineSpacing", 0) , f = T(e, "charsPerRow", null); null === f && (f = t.sys.textures.getFrame(a).width / i) > o.length && (f = o.length); for (var p = h, g = l, v = { retroFont: !0, font: a, size: i, lineHeight: n + d, chars: {} }, m = 0, y = 0; y < o.length; y++) { var x = o.charCodeAt(y); v.chars[x] = { x: p, y: g, width: i, height: n, centerX: s, centerY: r, xOffset: 0, yOffset: 0, xAdvance: i, data: {}, kerning: {} }, ++m === f ? (m = 0, p = h, g += n + c) : p += i + u } return { data: v, frame: null, texture: a } } } } , function(t, e, i) { var n = i(1) , s = i(1) , n = i(986) , s = i(987); t.exports = { renderWebGL: n, renderCanvas: s } } , function(t, e, i) { var R = i(9); t.exports = function(t, e, i, n, s) { var r = e.pipeline; t.setPipeline(r, e); var o = r._tempMatrix1 , a = r._tempMatrix2 , h = r._tempMatrix3; a.applyITRS(e.x, e.y, e.rotation, e.scaleX, e.scaleY), o.copyFrom(n.matrix), s ? (o.multiplyWithOffset(s, -n.scrollX * e.scrollFactorX, -n.scrollY * e.scrollFactorY), a.e = e.x, a.f = e.y) : (a.e -= n.scrollX * e.scrollFactorX, a.f -= n.scrollY * e.scrollFactorY), o.multiply(a, h); var l = e.frame.glTexture , u = e.vertices , c = e.uv , d = e.colors , f = e.alphas , p = e.alpha , g = R.getTintAppendFloatAlphaAndSwap , v = n.roundPixels , m = u.length , y = Math.floor(.5 * m); r.flush(), r.setTexture2D(l, 0); var x = r.vertexViewF32 , T = r.vertexViewU32 , w = r.vertexCount * r.vertexComponentCount - 1 , b = 0 , E = e.tintFill; e.dirty && e.updateVertices(); for (var S = e.debugCallback, _ = [], A = 0; A < m; A += 2) { var C = u[A + 0] , M = u[A + 1] , P = C * h.a + M * h.c + h.e , O = C * h.b + M * h.d + h.f; v && (P = Math.round(P), O = Math.round(O)), x[++w] = P, x[++w] = O, x[++w] = c[A + 0], x[++w] = c[A + 1], x[++w] = E, T[++w] = g(d[b], n.alpha * (f[b] * p)), b++, S && (_[A + 0] = P, _[A + 1] = O) } S && S.call(e, e, m, _), r.vertexCount += y } } , function(t, e) { t.exports = function() {} } , function(t, e) { t.exports = function(t, e, i) { var n = t.canvas , s = t.context , r = t.style , o = [] , a = 0 , h = i.length; 0 < r.maxLines && r.maxLines < i.length && (h = r.maxLines), r.syncFont(n, s); for (var l = 0; l < h; l++) { var u = r.strokeThickness; u += s.measureText(i[l]).width, r.wordWrap && (u -= s.measureText(" ").width), o[l] = Math.ceil(u), a = Math.max(a, o[l]) } var c = e.fontSize + r.strokeThickness , d = c * h , f = t.lineSpacing; return 1 < h && (d += f * (h - 1)), { width: a, height: d, lines: h, lineWidths: o, lineSpacing: f, lineHeight: c } } } , function(t, e, i) { var n = i(1) , s = i(1) , n = i(990) , s = i(991); t.exports = { renderWebGL: n, renderCanvas: s } } , function(t, e, i) { var l = i(9); t.exports = function(t, e, i, n, s) { var r, o, a, h; 0 !== e.width && 0 !== e.height && (o = (r = e.frame).width, a = r.height, h = l.getTintAppendFloatAlpha, this.pipeline.batchTexture(e, r.glTexture, o, a, e.x, e.y, o / e.style.resolution, a / e.style.resolution, e.scaleX, e.scaleY, e.rotation, e.flipX, e.flipY, e.scrollFactorX, e.scrollFactorY, e.displayOriginX, e.displayOriginY, 0, 0, o, a, h(e._tintTL, n.alpha * e._alphaTL), h(e._tintTR, n.alpha * e._alphaTR), h(e._tintBL, n.alpha * e._alphaBL), h(e._tintBR, n.alpha * e._alphaBR), e._isTinted && e.tintFill, 0, 0, n, s)) } } , function(t, e) { t.exports = function(t, e, i, n, s) { 0 !== e.width && 0 !== e.height && t.batchSprite(e, e.frame, n, s) } } , function(t, e, i) { var n = i(0) , a = i(15) , h = i(6) , s = i(993) , l = { fontFamily: ["fontFamily", "Courier"], fontSize: ["fontSize", "16px"], fontStyle: ["fontStyle", ""], backgroundColor: ["backgroundColor", null], color: ["color", "#fff"], stroke: ["stroke", "#fff"], strokeThickness: ["strokeThickness", 0], shadowOffsetX: ["shadow.offsetX", 0], shadowOffsetY: ["shadow.offsetY", 0], shadowColor: ["shadow.color", "#000"], shadowBlur: ["shadow.blur", 0], shadowStroke: ["shadow.stroke", !1], shadowFill: ["shadow.fill", !1], align: ["align", "left"], maxLines: ["maxLines", 0], fixedWidth: ["fixedWidth", 0], fixedHeight: ["fixedHeight", 0], resolution: ["resolution", 0], rtl: ["rtl", !1], testString: ["testString", "|MÉqgy"], baselineX: ["baselineX", 1.2], baselineY: ["baselineY", 1.4], wordWrapWidth: ["wordWrap.width", null], wordWrapCallback: ["wordWrap.callback", null], wordWrapCallbackScope: ["wordWrap.callbackScope", null], wordWrapUseAdvanced: ["wordWrap.useAdvancedWrap", !1] } , r = new n({ initialize: function(t, e) { this.parent = t, this.fontFamily, this.fontSize, this.fontStyle, this.backgroundColor, this.color, this.stroke, this.strokeThickness, this.shadowOffsetX, this.shadowOffsetY, this.shadowColor, this.shadowBlur, this.shadowStroke, this.shadowFill, this.align, this.maxLines, this.fixedWidth, this.fixedHeight, this.resolution, this.rtl, this.testString, this.baselineX, this.baselineY, this.wordWrapWidth, this.wordWrapCallback, this.wordWrapCallbackScope, this.wordWrapUseAdvanced, this._font, this.setStyle(e, !1, !0); var i = h(e, "metrics", !1); this.metrics = i ? { ascent: h(i, "ascent", 0), descent: h(i, "descent", 0), fontSize: h(i, "fontSize", 0) } : s(this) }, setStyle: function(t, e, i) { for (var n in void 0 === e && (e = !0), void 0 === i && (i = !1), t && t.hasOwnProperty("fontSize") && "number" == typeof t.fontSize && (t.fontSize = t.fontSize.toString() + "px"), l) { var s = i ? l[n][1] : this[n]; this[n] = ("wordWrapCallback" === n || "wordWrapCallbackScope" === n ? h : a)(t, l[n][0], s) } var r = h(t, "font", null); null !== r && this.setFont(r, !1), this._font = [this.fontStyle, this.fontSize, this.fontFamily].join(" ").trim(); var o = h(t, "fill", null); return null !== o && (this.color = o), e ? this.update(!0) : this.parent }, syncFont: function(t, e) { e.font = this._font }, syncStyle: function(t, e) { e.textBaseline = "alphabetic", e.fillStyle = this.color, e.strokeStyle = this.stroke, e.lineWidth = this.strokeThickness, e.lineCap = "round", e.lineJoin = "round" }, syncShadow: function(t, e) { e ? (t.shadowOffsetX = this.shadowOffsetX, t.shadowOffsetY = this.shadowOffsetY, t.shadowColor = this.shadowColor, t.shadowBlur = this.shadowBlur) : (t.shadowOffsetX = 0, t.shadowOffsetY = 0, t.shadowColor = 0, t.shadowBlur = 0) }, update: function(t) { return t && (this._font = [this.fontStyle, this.fontSize, this.fontFamily].join(" ").trim(), this.metrics = s(this)), this.parent.updateText() }, setFont: function(t, e) { void 0 === e && (e = !0); var i, n, s = t, r = "", o = ""; return "string" != typeof t ? (s = h(t, "fontFamily", "Courier"), r = h(t, "fontSize", "16px"), o = h(t, "fontStyle", "")) : (n = 0, o = 2 < (i = t.split(" ")).length ? i[n++] : "", r = i[n++] || "16px", s = i[n++] || "Courier"), s === this.fontFamily && r === this.fontSize && o === this.fontStyle || (this.fontFamily = s, this.fontSize = r, this.fontStyle = o, e && this.update(!0)), this.parent }, setFontFamily: function(t) { return this.fontFamily !== t && (this.fontFamily = t, this.update(!0)), this.parent }, setFontStyle: function(t) { return this.fontStyle !== t && (this.fontStyle = t, this.update(!0)), this.parent }, setFontSize: function(t) { return "number" == typeof t && (t = t.toString() + "px"), this.fontSize !== t && (this.fontSize = t, this.update(!0)), this.parent }, setTestString: function(t) { return this.testString = t, this.update(!0) }, setFixedSize: function(t, e) { return this.fixedWidth = t, this.fixedHeight = e, t && (this.parent.width = t), e && (this.parent.height = e), this.update(!1) }, setBackgroundColor: function(t) { return this.backgroundColor = t, this.update(!1) }, setFill: function(t) { return this.color = t, this.update(!1) }, setColor: function(t) { return this.color = t, this.update(!1) }, setResolution: function(t) { return this.resolution = t, this.update(!1) }, setStroke: function(t, e) { return void 0 === e && (e = this.strokeThickness), void 0 === t && 0 !== this.strokeThickness ? (this.strokeThickness = 0, this.update(!0)) : this.stroke === t && this.strokeThickness === e || (this.stroke = t, this.strokeThickness = e, this.update(!0)), this.parent }, setShadow: function(t, e, i, n, s, r) { return void 0 === t && (t = 0), void 0 === e && (e = 0), void 0 === i && (i = "#000"), void 0 === n && (n = 0), void 0 === s && (s = !1), void 0 === r && (r = !0), this.shadowOffsetX = t, this.shadowOffsetY = e, this.shadowColor = i, this.shadowBlur = n, this.shadowStroke = s, this.shadowFill = r, this.update(!1) }, setShadowOffset: function(t, e) { return void 0 === t && (t = 0), void 0 === e && (e = t), this.shadowOffsetX = t, this.shadowOffsetY = e, this.update(!1) }, setShadowColor: function(t) { return void 0 === t && (t = "#000"), this.shadowColor = t, this.update(!1) }, setShadowBlur: function(t) { return void 0 === t && (t = 0), this.shadowBlur = t, this.update(!1) }, setShadowStroke: function(t) { return this.shadowStroke = t, this.update(!1) }, setShadowFill: function(t) { return this.shadowFill = t, this.update(!1) }, setWordWrapWidth: function(t, e) { return void 0 === e && (e = !1), this.wordWrapWidth = t, this.wordWrapUseAdvanced = e, this.update(!1) }, setWordWrapCallback: function(t, e) { return void 0 === e && (e = null), this.wordWrapCallback = t, this.wordWrapCallbackScope = e, this.update(!1) }, setAlign: function(t) { return void 0 === t && (t = "left"), this.align = t, this.update(!1) }, setMaxLines: function(t) { return void 0 === t && (t = 0), this.maxLines = t, this.update(!1) }, getTextMetrics: function() { var t = this.metrics; return { ascent: t.ascent, descent: t.descent, fontSize: t.fontSize } }, toJSON: function() { var t = {}; for (var e in l) t[e] = this[e]; return t.metrics = this.getTextMetrics(), t }, destroy: function() { this.parent = void 0 } }); t.exports = r } , function(t, e, i) { var p = i(26); t.exports = function(t) { var e = p.create(this) , i = e.getContext("2d"); t.syncFont(e, i); var n = Math.ceil(i.measureText(t.testString).width * t.baselineX) , s = 2 * (r = n) , r = r * t.baselineY | 0; e.width = n, e.height = s, i.fillStyle = "#f00", i.fillRect(0, 0, n, s), i.font = t._font, i.textBaseline = "alphabetic", i.fillStyle = "#000", i.fillText(t.testString, 0, r); var o = { ascent: 0, descent: 0, fontSize: 0 }; if (!i.getImageData(0, 0, n, s)) return o.ascent = r, o.descent = 6 + r, o.fontSize = o.ascent + o.descent, p.remove(e), o; for (var a, h = i.getImageData(0, 0, n, s).data, l = h.length, u = 4 * n, c = 0, d = !1, f = 0; f < r; f++) { for (a = 0; a < u; a += 4) if (255 !== h[c + a]) { d = !0; break } if (d) break; c += u } for (o.ascent = r - f, c = l - u, d = !1, f = s; r < f; f--) { for (a = 0; a < u; a += 4) if (255 !== h[c + a]) { d = !0; break } if (d) break; c -= u } return o.descent = f - r, o.fontSize = o.ascent + o.descent, p.remove(e), o } } , function(t, e, i) { var n = i(1) , s = i(1) , n = i(995) , s = i(996); t.exports = { renderWebGL: n, renderCanvas: s } } , function(t, e, i) { var o = i(9); t.exports = function(t, e, i, n, s) { e.updateCanvas(); var r = o.getTintAppendFloatAlpha; this.pipeline.batchTexture(e, e.fillPattern, e.displayFrame.width * e.tileScaleX, e.displayFrame.height * e.tileScaleY, e.x, e.y, e.width, e.height, e.scaleX, e.scaleY, e.rotation, e.flipX, e.flipY, e.scrollFactorX, e.scrollFactorY, e.originX * e.width, e.originY * e.height, 0, 0, e.width, e.height, r(e._tintTL, n.alpha * e._alphaTL), r(e._tintTR, n.alpha * e._alphaTR), r(e._tintBL, n.alpha * e._alphaBL), r(e._tintBR, n.alpha * e._alphaBR), e._isTinted && e.tintFill, e.tilePositionX % e.displayFrame.width / e.displayFrame.width, e.tilePositionY % e.displayFrame.height / e.displayFrame.height, n, s) } } , function(t, e) { t.exports = function(t, e, i, n, s) { e.updateCanvas(), t.batchSprite(e, e.frame, n, s) } } , function(t, e, i) { var n = i(1) , s = i(1) , n = i(998) , s = i(999); t.exports = { renderWebGL: n, renderCanvas: s } } , function(t, e) { t.exports = function(t, e, i, n, s) { e.videoTexture && this.pipeline.batchSprite(e, n, s) } } , function(t, e) { t.exports = function(t, e, i, n, s) { e.videoTexture && t.batchSprite(e, e.frame, n, s) } } , function(t, e, i) { var n = i(1) , s = i(1) , n = i(1001) , s = i(1002); t.exports = { renderWebGL: n, renderCanvas: s } } , function(t, e, i) { var d = i(98) , f = i(70); t.exports = function(t, e, i, n, s) { var r = this.pipeline , o = r._tempMatrix1 , a = r._tempMatrix2 , h = r._tempMatrix3; t.setPipeline(r), a.applyITRS(e.x, e.y, e.rotation, e.scaleX, e.scaleY), o.copyFrom(n.matrix), s ? (o.multiplyWithOffset(s, -n.scrollX * e.scrollFactorX, -n.scrollY * e.scrollFactorY), a.e = e.x, a.f = e.y) : (a.e -= n.scrollX * e.scrollFactorX, a.f -= n.scrollY * e.scrollFactorY), o.multiply(a, h); var l = e._displayOriginX , u = e._displayOriginY , c = n.alpha * e.alpha; e.isFilled && d(r, h, e, c, l, u), e.isStroked && f(r, e, c, l, u) } } , function(t, e, i) { var a = i(39) , h = i(41) , l = i(49) , u = i(28); t.exports = function(t, e, i, n, s) { var r, o = t.currentContext; u(t, o, e, n, s) && (r = e.radius, o.beginPath(), o.arc(r - e.originX * (2 * r), r - e.originY * (2 * r), r, a(e._startAngle), a(e._endAngle), e.anticlockwise), e.closePath && o.closePath(), e.isFilled && (h(o, e), o.fill()), e.isStroked && (l(o, e), o.stroke()), o.restore()) } } , function(t, e, i) { var n = i(1) , s = i(1) , n = i(1004) , s = i(1005); t.exports = { renderWebGL: n, renderCanvas: s } } , function(t, e, i) { var d = i(98) , f = i(70); t.exports = function(t, e, i, n, s) { var r = this.pipeline , o = r._tempMatrix1 , a = r._tempMatrix2 , h = r._tempMatrix3; t.setPipeline(r), a.applyITRS(e.x, e.y, e.rotation, e.scaleX, e.scaleY), o.copyFrom(n.matrix), s ? (o.multiplyWithOffset(s, -n.scrollX * e.scrollFactorX, -n.scrollY * e.scrollFactorY), a.e = e.x, a.f = e.y) : (a.e -= n.scrollX * e.scrollFactorX, a.f -= n.scrollY * e.scrollFactorY), o.multiply(a, h); var l = e._displayOriginX + e._curveBounds.x , u = e._displayOriginY + e._curveBounds.y , c = n.alpha * e.alpha; e.isFilled && d(r, h, e, c, l, u), e.isStroked && f(r, e, c, l, u) } } , function(t, e, i) { var g = i(41) , v = i(49) , m = i(28); t.exports = function(t, e, i, n, s) { var r = t.currentContext; if (m(t, r, e, n, s)) { var o = e._displayOriginX + e._curveBounds.x , a = e._displayOriginY + e._curveBounds.y , h = e.pathData , l = h.length - 1 , u = h[0] - o , c = h[1] - a; r.beginPath(), r.moveTo(u, c), e.closePath || (l -= 2); for (var d = 2; d < l; d += 2) { var f = h[d] - o , p = h[d + 1] - a; r.lineTo(f, p) } e.closePath && r.closePath(), e.isFilled && (g(r, e), r.fill()), e.isStroked && (v(r, e), r.stroke()), r.restore() } } } , function(t, e, i) { var n = i(1) , s = i(1) , n = i(1007) , s = i(1008); t.exports = { renderWebGL: n, renderCanvas: s } } , function(t, e, i) { var d = i(98) , f = i(70); t.exports = function(t, e, i, n, s) { var r = this.pipeline , o = r._tempMatrix1 , a = r._tempMatrix2 , h = r._tempMatrix3; t.setPipeline(r), a.applyITRS(e.x, e.y, e.rotation, e.scaleX, e.scaleY), o.copyFrom(n.matrix), s ? (o.multiplyWithOffset(s, -n.scrollX * e.scrollFactorX, -n.scrollY * e.scrollFactorY), a.e = e.x, a.f = e.y) : (a.e -= n.scrollX * e.scrollFactorX, a.f -= n.scrollY * e.scrollFactorY), o.multiply(a, h); var l = e._displayOriginX , u = e._displayOriginY , c = n.alpha * e.alpha; e.isFilled && d(r, h, e, c, l, u), e.isStroked && f(r, e, c, l, u) } } , function(t, e, i) { var g = i(41) , v = i(49) , m = i(28); t.exports = function(t, e, i, n, s) { var r = t.currentContext; if (m(t, r, e, n, s)) { var o = e._displayOriginX , a = e._displayOriginY , h = e.pathData , l = h.length - 1 , u = h[0] - o , c = h[1] - a; r.beginPath(), r.moveTo(u, c), e.closePath || (l -= 2); for (var d = 2; d < l; d += 2) { var f = h[d] - o , p = h[d + 1] - a; r.lineTo(f, p) } r.closePath(), e.isFilled && (g(r, e), r.fill()), e.isStroked && (v(r, e), r.stroke()), r.restore() } } } , function(t, e, i) { var n = i(1) , s = i(1) , n = i(1010) , s = i(1011); t.exports = { renderWebGL: n, renderCanvas: s } } , function(t, e, i) { var D = i(9); t.exports = function(t, e, i, n, s) { var r = this.pipeline , o = r._tempMatrix1 , a = r._tempMatrix2 , h = r._tempMatrix3; t.setPipeline(r), a.applyITRS(e.x, e.y, e.rotation, e.scaleX, e.scaleY), o.copyFrom(n.matrix), s ? (o.multiplyWithOffset(s, -n.scrollX * e.scrollFactorX, -n.scrollY * e.scrollFactorY), a.e = e.x, a.f = e.y) : (a.e -= n.scrollX * e.scrollFactorX, a.f -= n.scrollY * e.scrollFactorY), o.multiply(a, h), h.translate(-e._displayOriginX, -e._displayOriginY); var l, u, c = n.alpha * e.alpha, d = e.width, f = e.height, p = e.cellWidth, g = e.cellHeight, v = Math.ceil(d / p), m = Math.ceil(f / g), y = p, x = g, T = p - (v * p - d), w = g - (m * g - f), b = e.showCells, E = e.showAltCells, S = e.showOutline, _ = 0, A = 0, C = 0, M = 0, P = 0; if (S && (y--, x--, T === p && T--, w === g && w--), b && 0 < e.fillAlpha) for (l = r.fillTint, u = D.getTintAppendFloatAlphaAndSwap(e.fillColor, e.fillAlpha * c), l.TL = u, l.TR = u, l.BL = u, l.BR = u, A = 0; A < m; A++) for (E && (C = A % 2), _ = 0; _ < v; _++) E && C ? C = 0 : (C++, M = _ < v - 1 ? y : T, P = A < m - 1 ? x : w, r.setTexture2D(), r.batchFillRect(_ * p, A * g, M, P)); if (E && 0 < e.altFillAlpha) for (l = r.fillTint, u = D.getTintAppendFloatAlphaAndSwap(e.altFillColor, e.altFillAlpha * c), l.TL = u, l.TR = u, l.BL = u, l.BR = u, A = 0; A < m; A++) for (E && (C = A % 2), _ = 0; _ < v; _++) !E || C ? (C = 0, M = _ < v - 1 ? y : T, P = A < m - 1 ? x : w, r.setTexture2D(), r.batchFillRect(_ * p, A * g, M, P)) : C = 1; if (S && 0 < e.outlineFillAlpha) { var O = r.strokeTint , R = D.getTintAppendFloatAlphaAndSwap(e.outlineFillColor, e.outlineFillAlpha * c); for (O.TL = R, O.TR = R, O.BL = R, O.BR = R, _ = 1; _ < v; _++) { var L = _ * p; r.setTexture2D(), r.batchLine(L, 0, L, f, 1, 1, 1, 0, !1) } for (A = 1; A < m; A++) { var k = A * g; r.setTexture2D(), r.batchLine(0, k, d, k, 1, 1, 1, 0, !1) } } } } , function(t, e, i) { var P = i(41) , O = i(49) , R = i(28); t.exports = function(t, e, i, n, s) { var r = t.currentContext; if (R(t, r, e, n, s)) { var o = -e._displayOriginX , a = -e._displayOriginY , h = n.alpha * e.alpha , l = e.width , u = e.height , c = e.cellWidth , d = e.cellHeight , f = Math.ceil(l / c) , p = Math.ceil(u / d) , g = c , v = d , m = c - (f * c - l) , y = d - (p * d - u) , x = e.showCells , T = e.showAltCells , w = e.showOutline , b = 0 , E = 0 , S = 0 , _ = 0 , A = 0; if (w && (g--, v--, m === c && m--, y === d && y--), x && 0 < e.fillAlpha) for (P(r, e), E = 0; E < p; E++) for (T && (S = E % 2), b = 0; b < f; b++) T && S ? S = 0 : (S++, _ = b < f - 1 ? g : m, A = E < p - 1 ? v : y, r.fillRect(o + b * c, a + E * d, _, A)); if (T && 0 < e.altFillAlpha) for (P(r, e, e.altFillColor, e.altFillAlpha * h), E = 0; E < p; E++) for (T && (S = E % 2), b = 0; b < f; b++) !T || S ? (S = 0, _ = b < f - 1 ? g : m, A = E < p - 1 ? v : y, r.fillRect(o + b * c, a + E * d, _, A)) : S = 1; if (w && 0 < e.outlineFillAlpha) { for (O(r, e, e.outlineFillColor, e.outlineFillAlpha * h), b = 1; b < f; b++) { var C = b * c; r.beginPath(), r.moveTo(C + o, a), r.lineTo(C + o, u + a), r.stroke() } for (E = 1; E < p; E++) { var M = E * d; r.beginPath(), r.moveTo(o, M + a), r.lineTo(o + l, M + a), r.stroke() } } r.restore() } } } , function(t, e, i) { var n = i(1) , s = i(1) , n = i(1013) , s = i(1014); t.exports = { renderWebGL: n, renderCanvas: s } } , function(t, e, i) { var E = i(9); t.exports = function(t, e, i, n, s) { var r = this.pipeline , o = r._tempMatrix1 , a = r._tempMatrix2 , h = r._tempMatrix3; t.setPipeline(r), a.applyITRS(e.x, e.y, e.rotation, e.scaleX, e.scaleY), o.copyFrom(n.matrix), s ? (o.multiplyWithOffset(s, -n.scrollX * e.scrollFactorX, -n.scrollY * e.scrollFactorY), a.e = e.x, a.f = e.y) : (a.e -= n.scrollX * e.scrollFactorX, a.f -= n.scrollY * e.scrollFactorY), o.multiply(a, h); var l, u, c, d, f, p, g, v, m, y = e.width, x = e.height, T = y / 2, w = y / e.projection, b = n.alpha * e.alpha; e.isFilled && (e.showTop && (l = E.getTintAppendFloatAlphaAndSwap(e.fillTop, b), u = h.getX(-T, -x), c = h.getY(-T, -x), d = h.getX(0, -w - x), f = h.getY(0, -w - x), p = h.getX(T, -x), g = h.getY(T, -x), v = h.getX(0, w - x), m = h.getY(0, w - x), r.setTexture2D(), r.batchQuad(u, c, d, f, p, g, v, m, 0, 0, 1, 1, l, l, l, l, 2)), e.showLeft && (l = E.getTintAppendFloatAlphaAndSwap(e.fillLeft, b), u = h.getX(-T, 0), c = h.getY(-T, 0), d = h.getX(0, w), f = h.getY(0, w), p = h.getX(0, w - x), g = h.getY(0, w - x), v = h.getX(-T, -x), m = h.getY(-T, -x), r.setTexture2D(), r.batchQuad(u, c, d, f, p, g, v, m, 0, 0, 1, 1, l, l, l, l, 2)), e.showRight && (l = E.getTintAppendFloatAlphaAndSwap(e.fillRight, b), u = h.getX(T, 0), c = h.getY(T, 0), d = h.getX(0, w), f = h.getY(0, w), p = h.getX(0, w - x), g = h.getY(0, w - x), v = h.getX(T, -x), m = h.getY(T, -x), r.setTexture2D(), r.batchQuad(u, c, d, f, p, g, v, m, 0, 0, 1, 1, l, l, l, l, 2))) } } , function(t, e, i) { var u = i(41) , c = i(28); t.exports = function(t, e, i, n, s) { var r, o, a, h, l = t.currentContext; c(t, l, e, n, s) && e.isFilled && (r = e.width, o = e.height, a = r / 2, h = r / e.projection, e.showTop && (u(l, e, e.fillTop), l.beginPath(), l.moveTo(-a, -o), l.lineTo(0, -h - o), l.lineTo(a, -o), l.lineTo(a, -1), l.lineTo(0, h - 1), l.lineTo(-a, -1), l.lineTo(-a, -o), l.fill()), e.showLeft && (u(l, e, e.fillLeft), l.beginPath(), l.moveTo(-a, 0), l.lineTo(0, h), l.lineTo(0, h - o), l.lineTo(-a, -o), l.lineTo(-a, 0), l.fill()), e.showRight && (u(l, e, e.fillRight), l.beginPath(), l.moveTo(a, 0), l.lineTo(0, h), l.lineTo(0, h - o), l.lineTo(a, -o), l.lineTo(a, 0), l.fill()), l.restore()) } } , function(t, e, i) { var n = i(1) , s = i(1) , n = i(1016) , s = i(1017); t.exports = { renderWebGL: n, renderCanvas: s } } , function(t, e, i) { var S = i(9); t.exports = function(t, e, i, n, s) { var r = this.pipeline , o = r._tempMatrix1 , a = r._tempMatrix2 , h = r._tempMatrix3; t.setPipeline(r), a.applyITRS(e.x, e.y, e.rotation, e.scaleX, e.scaleY), o.copyFrom(n.matrix), s ? (o.multiplyWithOffset(s, -n.scrollX * e.scrollFactorX, -n.scrollY * e.scrollFactorY), a.e = e.x, a.f = e.y) : (a.e -= n.scrollX * e.scrollFactorX, a.f -= n.scrollY * e.scrollFactorY), o.multiply(a, h); var l, u, c, d, f, p, g, v, m, y = e.width, x = e.height, T = y / 2, w = y / e.projection, b = e.isReversed, E = n.alpha * e.alpha; e.isFilled && (e.showTop && b && (l = S.getTintAppendFloatAlphaAndSwap(e.fillTop, E), u = h.getX(-T, -x), c = h.getY(-T, -x), d = h.getX(0, -w - x), f = h.getY(0, -w - x), p = h.getX(T, -x), g = h.getY(T, -x), v = h.getX(0, w - x), m = h.getY(0, w - x), r.setTexture2D(), r.batchQuad(u, c, d, f, p, g, v, m, 0, 0, 1, 1, l, l, l, l, 2)), e.showLeft && (l = S.getTintAppendFloatAlphaAndSwap(e.fillLeft, E), g = (p = (f = (d = (c = b ? (u = h.getX(-T, -x), h.getY(-T, -x)) : (u = h.getX(-T, 0), h.getY(-T, 0)), h.getX(0, w)), h.getY(0, w)), h.getX(0, w - x)), h.getY(0, w - x)), r.setTexture2D(), r.batchTri(u, c, d, f, p, g, 0, 0, 1, 1, l, l, l, 2)), e.showRight && (l = S.getTintAppendFloatAlphaAndSwap(e.fillRight, E), g = (p = (f = (d = (c = b ? (u = h.getX(T, -x), h.getY(T, -x)) : (u = h.getX(T, 0), h.getY(T, 0)), h.getX(0, w)), h.getY(0, w)), h.getX(0, w - x)), h.getY(0, w - x)), r.setTexture2D(), r.batchTri(u, c, d, f, p, g, 0, 0, 1, 1, l, l, l, 2))) } } , function(t, e, i) { var c = i(41) , d = i(28); t.exports = function(t, e, i, n, s) { var r, o, a, h, l, u = t.currentContext; d(t, u, e, n, s) && e.isFilled && (r = e.width, o = e.height, a = r / 2, h = r / e.projection, l = e.isReversed, e.showTop && l && (c(u, e, e.fillTop), u.beginPath(), u.moveTo(-a, -o), u.lineTo(0, -h - o), u.lineTo(a, -o), u.lineTo(0, h - o), u.fill()), e.showLeft && (c(u, e, e.fillLeft), u.beginPath(), l ? u.moveTo(-a, -o) : u.moveTo(-a, 0), u.lineTo(0, h), u.lineTo(0, h - o), u.fill()), e.showRight && (c(u, e, e.fillRight), u.beginPath(), l ? u.moveTo(a, -o) : u.moveTo(a, 0), u.lineTo(0, h), u.lineTo(0, h - o), u.fill()), u.restore()) } } , function(t, e, i) { var n = i(1) , s = i(1) , n = i(1019) , s = i(1020); t.exports = { renderWebGL: n, renderCanvas: s } } , function(t, e, i) { var g = i(9); t.exports = function(t, e, i, n, s) { var r = this.pipeline , o = r._tempMatrix1 , a = r._tempMatrix2; t.setPipeline(r), a.applyITRS(e.x, e.y, e.rotation, e.scaleX, e.scaleY), o.copyFrom(n.matrix), s ? (o.multiplyWithOffset(s, -n.scrollX * e.scrollFactorX, -n.scrollY * e.scrollFactorY), a.e = e.x, a.f = e.y) : (a.e -= n.scrollX * e.scrollFactorX, a.f -= n.scrollY * e.scrollFactorY); var h, l, u, c, d = e._displayOriginX, f = e._displayOriginY, p = n.alpha * e.alpha; e.isStroked && (h = r.strokeTint, l = g.getTintAppendFloatAlphaAndSwap(e.strokeColor, e.strokeAlpha * p), h.TL = l, h.TR = l, h.BL = l, h.BR = l, u = e._startWidth, c = e._endWidth, r.setTexture2D(), r.batchLine(e.geom.x1 - d, e.geom.y1 - f, e.geom.x2 - d, e.geom.y2 - f, u, c, 1, 0, !1, a, o)) } } , function(t, e, i) { var h = i(49) , l = i(28); t.exports = function(t, e, i, n, s) { var r, o, a = t.currentContext; l(t, a, e, n, s) && (r = e._displayOriginX, o = e._displayOriginY, e.isStroked && (h(a, e), a.beginPath(), a.moveTo(e.geom.x1 - r, e.geom.y1 - o), a.lineTo(e.geom.x2 - r, e.geom.y2 - o), a.stroke()), a.restore()) } } , function(t, e, i) { var n = i(1) , s = i(1) , n = i(1022) , s = i(1023); t.exports = { renderWebGL: n, renderCanvas: s } } , function(t, e, i) { var d = i(98) , f = i(70); t.exports = function(t, e, i, n, s) { var r = this.pipeline , o = r._tempMatrix1 , a = r._tempMatrix2 , h = r._tempMatrix3; t.setPipeline(r), a.applyITRS(e.x, e.y, e.rotation, e.scaleX, e.scaleY), o.copyFrom(n.matrix), s ? (o.multiplyWithOffset(s, -n.scrollX * e.scrollFactorX, -n.scrollY * e.scrollFactorY), a.e = e.x, a.f = e.y) : (a.e -= n.scrollX * e.scrollFactorX, a.f -= n.scrollY * e.scrollFactorY), o.multiply(a, h); var l = e._displayOriginX , u = e._displayOriginY , c = n.alpha * e.alpha; e.isFilled && d(r, h, e, c, l, u), e.isStroked && f(r, e, c, l, u) } } , function(t, e, i) { var g = i(41) , v = i(49) , m = i(28); t.exports = function(t, e, i, n, s) { var r = t.currentContext; if (m(t, r, e, n, s)) { var o = e._displayOriginX , a = e._displayOriginY , h = e.pathData , l = h.length - 1 , u = h[0] - o , c = h[1] - a; r.beginPath(), r.moveTo(u, c), e.closePath || (l -= 2); for (var d = 2; d < l; d += 2) { var f = h[d] - o , p = h[d + 1] - a; r.lineTo(f, p) } r.closePath(), e.isFilled && (g(r, e), r.fill()), e.isStroked && (v(r, e), r.stroke()), r.restore() } } } , function(t, e, i) { var n = i(1) , s = i(1) , n = i(1025) , s = i(1026); t.exports = { renderWebGL: n, renderCanvas: s } } , function(t, e, i) { var p = i(70) , g = i(9); t.exports = function(t, e, i, n, s) { var r = this.pipeline , o = r._tempMatrix1 , a = r._tempMatrix2 , h = r._tempMatrix3; t.setPipeline(r), a.applyITRS(e.x, e.y, e.rotation, e.scaleX, e.scaleY), o.copyFrom(n.matrix), s ? (o.multiplyWithOffset(s, -n.scrollX * e.scrollFactorX, -n.scrollY * e.scrollFactorY), a.e = e.x, a.f = e.y) : (a.e -= n.scrollX * e.scrollFactorX, a.f -= n.scrollY * e.scrollFactorY), o.multiply(a, h); var l, u, c = e._displayOriginX, d = e._displayOriginY, f = n.alpha * e.alpha; e.isFilled && (l = r.fillTint, u = g.getTintAppendFloatAlphaAndSwap(e.fillColor, e.fillAlpha * f), l.TL = u, l.TR = u, l.BL = u, l.BR = u, r.setTexture2D(), r.batchFillRect(-c, -d, e.width, e.height)), e.isStroked && p(r, e, f, c, d) } } , function(t, e, i) { var h = i(41) , l = i(49) , u = i(28); t.exports = function(t, e, i, n, s) { var r, o, a = t.currentContext; u(t, a, e, n, s) && (r = e._displayOriginX, o = e._displayOriginY, e.isFilled && (h(a, e), a.fillRect(-r, -o, e.width, e.height)), e.isStroked && (l(a, e), a.beginPath(), a.rect(-r, -o, e.width, e.height), a.stroke()), a.restore()) } } , function(t, e, i) { var n = i(1) , s = i(1) , n = i(1028) , s = i(1029); t.exports = { renderWebGL: n, renderCanvas: s } } , function(t, e, i) { var d = i(98) , f = i(70); t.exports = function(t, e, i, n, s) { var r = this.pipeline , o = r._tempMatrix1 , a = r._tempMatrix2 , h = r._tempMatrix3; t.setPipeline(r), a.applyITRS(e.x, e.y, e.rotation, e.scaleX, e.scaleY), o.copyFrom(n.matrix), s ? (o.multiplyWithOffset(s, -n.scrollX * e.scrollFactorX, -n.scrollY * e.scrollFactorY), a.e = e.x, a.f = e.y) : (a.e -= n.scrollX * e.scrollFactorX, a.f -= n.scrollY * e.scrollFactorY), o.multiply(a, h); var l = e._displayOriginX , u = e._displayOriginY , c = n.alpha * e.alpha; e.isFilled && d(r, h, e, c, l, u), e.isStroked && f(r, e, c, l, u) } } , function(t, e, i) { var g = i(41) , v = i(49) , m = i(28); t.exports = function(t, e, i, n, s) { var r = t.currentContext; if (m(t, r, e, n, s)) { var o = e._displayOriginX , a = e._displayOriginY , h = e.pathData , l = h.length - 1 , u = h[0] - o , c = h[1] - a; r.beginPath(), r.moveTo(u, c), e.closePath || (l -= 2); for (var d = 2; d < l; d += 2) { var f = h[d] - o , p = h[d + 1] - a; r.lineTo(f, p) } r.closePath(), e.isFilled && (g(r, e), r.fill()), e.isStroked && (v(r, e), r.stroke()), r.restore() } } } , function(t, e, i) { var n = i(1) , s = i(1) , n = i(1031) , s = i(1032); t.exports = { renderWebGL: n, renderCanvas: s } } , function(t, e, i) { var T = i(70) , w = i(9); t.exports = function(t, e, i, n, s) { var r = this.pipeline , o = r._tempMatrix1 , a = r._tempMatrix2 , h = r._tempMatrix3; t.setPipeline(r), a.applyITRS(e.x, e.y, e.rotation, e.scaleX, e.scaleY), o.copyFrom(n.matrix), s ? (o.multiplyWithOffset(s, -n.scrollX * e.scrollFactorX, -n.scrollY * e.scrollFactorY), a.e = e.x, a.f = e.y) : (a.e -= n.scrollX * e.scrollFactorX, a.f -= n.scrollY * e.scrollFactorY), o.multiply(a, h); var l, u, c, d, f, p, g, v, m = e._displayOriginX, y = e._displayOriginY, x = n.alpha * e.alpha; e.isFilled && (l = r.fillTint, u = w.getTintAppendFloatAlphaAndSwap(e.fillColor, e.fillAlpha * x), l.TL = u, l.TR = u, l.BL = u, l.BR = u, c = e.geom.x1 - m, d = e.geom.y1 - y, f = e.geom.x2 - m, p = e.geom.y2 - y, g = e.geom.x3 - m, v = e.geom.y3 - y, r.setTexture2D(), r.batchFillTriangle(c, d, f, p, g, v, a, o)), e.isStroked && T(r, e, x, m, y) } } , function(t, e, i) { var p = i(41) , g = i(49) , v = i(28); t.exports = function(t, e, i, n, s) { var r, o, a, h, l, u, c, d, f = t.currentContext; v(t, f, e, n, s) && (r = e._displayOriginX, o = e._displayOriginY, a = e.geom.x1 - r, h = e.geom.y1 - o, l = e.geom.x2 - r, u = e.geom.y2 - o, c = e.geom.x3 - r, d = e.geom.y3 - o, f.beginPath(), f.moveTo(a, h), f.lineTo(l, u), f.lineTo(c, d), f.closePath(), e.isFilled && (p(f, e), f.fill()), e.isStroked && (g(f, e), f.stroke()), f.restore()) } } , function(t, e, i) { var s = i(188); i(5).register("blitter", function(t, e, i, n) { return this.displayList.add(new s(this.scene,t,e,i,n)) }) } , function(t, e, i) { var n = i(189); i(5).register("container", function(t, e, i) { return this.displayList.add(new n(this.scene,t,e,i)) }) } , function(t, e, i) { var o = i(395); i(5).register("dom", function(t, e, i, n, s) { var r = new o(this.scene,t,e,i,n,s); return this.displayList.add(r), this.updateList.add(r), r }) } , function(t, e, i) { var r = i(190); i(5).register("dynamicBitmapText", function(t, e, i, n, s) { return this.displayList.add(new r(this.scene,t,e,i,n,s)) }) } , function(t, e, i) { var n = i(397); i(5).register("extern", function() { var t = new n(this.scene); return this.displayList.add(t), this.updateList.add(t), t }) } , function(t, e, i) { var n = i(191); i(5).register("graphics", function(t) { return this.displayList.add(new n(this.scene,t)) }) } , function(t, e, i) { var n = i(97); i(5).register("group", function(t, e) { return this.updateList.add(new n(this.scene,t,e)) }) } , function(t, e, i) { var s = i(107); i(5).register("image", function(t, e, i, n) { return this.displayList.add(new s(this.scene,t,e,i,n)) }) } , function(t, e, i) { var n = i(5) , s = i(194); n.register("particles", function(t, e, i) { var n = new s(this.scene,t,e,i); return this.displayList.add(n), this.updateList.add(n), n }) } , function(t, e, i) { var n = i(5) , o = i(409); n.register("follower", function(t, e, i, n, s) { var r = new o(this.scene,t,e,i,n,s); return this.displayList.add(r), this.updateList.add(r), r }) } , function(t, e, i) { var n = i(5) , o = i(195); n.register("renderTexture", function(t, e, i, n, s, r) { return this.displayList.add(new o(this.scene,t,e,i,n,s,r)) }) } , function(t, e, i) { var l = i(197); i(5).register("rope", function(t, e, i, n, s, r, o, a) { var h = new l(this.scene,t,e,i,n,s,r,o,a); return this.displayList.add(h), this.updateList.add(h) }) } , function(t, e, i) { var n = i(5) , r = i(75); n.register("sprite", function(t, e, i, n) { var s = new r(this.scene,t,e,i,n); return this.displayList.add(s), this.updateList.add(s), s }) } , function(t, e, i) { var o = i(132); i(5).register("bitmapText", function(t, e, i, n, s, r) { return this.displayList.add(new o(this.scene,t,e,i,n,s,r)) }) } , function(t, e, i) { var s = i(198); i(5).register("text", function(t, e, i, n) { return this.displayList.add(new s(this.scene,t,e,i,n)) }) } , function(t, e, i) { var o = i(199); i(5).register("tileSprite", function(t, e, i, n, s, r) { return this.displayList.add(new o(this.scene,t,e,i,n,s,r)) }) } , function(t, e, i) { var s = i(110); i(5).register("zone", function(t, e, i, n) { return this.displayList.add(new s(this.scene,t,e,i,n)) }) } , function(t, e, i) { var s = i(200); i(5).register("video", function(t, e, i) { var n = new s(this.scene,t,e,i); return this.displayList.add(n), this.updateList.add(n), n }) } , function(t, e, i) { var h = i(410) , n = i(5); n.register("arc", function(t, e, i, n, s, r, o, a) { return this.displayList.add(new h(this.scene,t,e,i,n,s,r,o,a)) }), n.register("circle", function(t, e, i, n, s) { return this.displayList.add(new h(this.scene,t,e,i,0,360,!1,n,s)) }) } , function(t, e, i) { var n = i(5) , r = i(411); n.register("curve", function(t, e, i, n, s) { return this.displayList.add(new r(this.scene,t,e,i,n,s)) }) } , function(t, e, i) { var o = i(412); i(5).register("ellipse", function(t, e, i, n, s, r) { return this.displayList.add(new o(this.scene,t,e,i,n,s,r)) }) } , function(t, e, i) { var n = i(5) , u = i(413); n.register("grid", function(t, e, i, n, s, r, o, a, h, l) { return this.displayList.add(new u(this.scene,t,e,i,n,s,r,o,a,h,l)) }) } , function(t, e, i) { var n = i(5) , a = i(414); n.register("isobox", function(t, e, i, n, s, r, o) { return this.displayList.add(new a(this.scene,t,e,i,n,s,r,o)) }) } , function(t, e, i) { var n = i(5) , h = i(415); n.register("isotriangle", function(t, e, i, n, s, r, o, a) { return this.displayList.add(new h(this.scene,t,e,i,n,s,r,o,a)) }) } , function(t, e, i) { var n = i(5) , h = i(416); n.register("line", function(t, e, i, n, s, r, o, a) { return this.displayList.add(new h(this.scene,t,e,i,n,s,r,o,a)) }) } , function(t, e, i) { var n = i(5) , r = i(417); n.register("polygon", function(t, e, i, n, s) { return this.displayList.add(new r(this.scene,t,e,i,n,s)) }) } , function(t, e, i) { var n = i(5) , o = i(422); n.register("rectangle", function(t, e, i, n, s, r) { return this.displayList.add(new o(this.scene,t,e,i,n,s,r)) }) } , function(t, e, i) { var a = i(423); i(5).register("star", function(t, e, i, n, s, r, o) { return this.displayList.add(new a(this.scene,t,e,i,n,s,r,o)) }) } , function(t, e, i) { var n = i(5) , u = i(424); n.register("triangle", function(t, e, i, n, s, r, o, a, h, l) { return this.displayList.add(new u(this.scene,t,e,i,n,s,r,o,a,h,l)) }) } , function(t, e, i) { var r = i(188) , o = i(27) , n = i(16) , a = i(15); n.register("blitter", function(t, e) { void 0 === t && (t = {}); var i = a(t, "key", null) , n = a(t, "frame", null) , s = new r(this.scene,0,0,i,n); return void 0 !== e && (t.add = e), o(this.scene, s, t), s }) } , function(t, e, i) { var r = i(27) , o = i(189) , n = i(16) , a = i(15); n.register("container", function(t, e) { void 0 === t && (t = {}); var i = a(t, "x", 0) , n = a(t, "y", 0) , s = new o(this.scene,i,n); return void 0 !== e && (t.add = e), r(this.scene, s, t), s }) } , function(t, e, i) { var o = i(190) , a = i(27) , n = i(16) , h = i(15); n.register("dynamicBitmapText", function(t, e) { void 0 === t && (t = {}); var i = h(t, "font", "") , n = h(t, "text", "") , s = h(t, "size", !1) , r = new o(this.scene,0,0,i,n,s); return void 0 !== e && (t.add = e), a(this.scene, r, t), r }) } , function(t, e, i) { var n = i(16) , s = i(191); n.register("graphics", function(t, e) { void 0 === t && (t = {}), void 0 !== e && (t.add = e); var i = new s(this.scene,t); return t.add && this.scene.sys.displayList.add(i), i }) } , function(t, e, i) { var n = i(16) , s = i(97); n.register("group", function(t) { return new s(this.scene,null,t) }) } , function(t, e, i) { var r = i(27) , n = i(16) , o = i(15) , a = i(107); n.register("image", function(t, e) { void 0 === t && (t = {}); var i = o(t, "key", null) , n = o(t, "frame", null) , s = new a(this.scene,0,0,i,n); return void 0 !== e && (t.add = e), r(this.scene, s, t), s }) } , function(t, e, i) { var n = i(16) , o = i(15) , a = i(2) , h = i(194); n.register("particles", function(t, e) { void 0 === t && (t = {}); var i = o(t, "key", null) , n = o(t, "frame", null) , s = a(t, "emitters", null) , r = new h(this.scene,i,n,s); return void 0 !== e && (t.add = e), a(t, "add", !1) && this.displayList.add(r), this.updateList.add(r), r }) } , function(t, e, i) { var l = i(27) , n = i(16) , u = i(15) , c = i(195); n.register("renderTexture", function(t, e) { void 0 === t && (t = {}); var i = u(t, "x", 0) , n = u(t, "y", 0) , s = u(t, "width", 32) , r = u(t, "height", 32) , o = u(t, "key", void 0) , a = u(t, "frame", void 0) , h = new c(this.scene,i,n,s,r,o,a); return void 0 !== e && (t.add = e), l(this.scene, h, t), h }) } , function(t, e, i) { var l = i(27) , n = i(16) , u = i(15) , c = i(6) , d = i(197); n.register("rope", function(t, e) { void 0 === t && (t = {}); var i = u(t, "key", null) , n = u(t, "frame", null) , s = u(t, "horizontal", !0) , r = c(t, "points", void 0) , o = c(t, "colors", void 0) , a = c(t, "alphas", void 0) , h = new d(this.scene,0,0,i,n,r,s,o,a); return void 0 !== e && (t.add = e), l(this.scene, h, t), h }) } , function(t, e, i) { var r = i(27) , o = i(393) , n = i(16) , a = i(15) , h = i(75); n.register("sprite", function(t, e) { void 0 === t && (t = {}); var i = a(t, "key", null) , n = a(t, "frame", null) , s = new h(this.scene,0,0,i,n); return void 0 !== e && (t.add = e), r(this.scene, s, t), o(s, t), s }) } , function(t, e, i) { var a = i(132) , h = i(27) , n = i(16) , l = i(15) , u = i(6); n.register("bitmapText", function(t, e) { void 0 === t && (t = {}); var i = u(t, "font", "") , n = l(t, "text", "") , s = l(t, "size", !1) , r = u(t, "align", 0) , o = new a(this.scene,0,0,i,n,s,r); return void 0 !== e && (t.add = e), h(this.scene, o, t), o }) } , function(t, e, i) { var o = i(27) , n = i(16) , a = i(15) , h = i(198); n.register("text", function(t, e) { void 0 === t && (t = {}); var i = a(t, "text", "") , n = a(t, "style", null) , s = a(t, "padding", null); null !== s && (n.padding = s); var r = new h(this.scene,0,0,i,n); return void 0 !== e && (t.add = e), o(this.scene, r, t), r.autoRound = a(t, "autoRound", !0), r.resolution = a(t, "resolution", 1), r }) } , function(t, e, i) { var l = i(27) , n = i(16) , u = i(15) , c = i(199); n.register("tileSprite", function(t, e) { void 0 === t && (t = {}); var i = u(t, "x", 0) , n = u(t, "y", 0) , s = u(t, "width", 512) , r = u(t, "height", 512) , o = u(t, "key", "") , a = u(t, "frame", "") , h = new c(this.scene,i,n,s,r,o,a); return void 0 !== e && (t.add = e), l(this.scene, h, t), h }) } , function(t, e, i) { var n = i(16) , r = i(15) , o = i(110); n.register("zone", function(t) { var e = r(t, "x", 0) , i = r(t, "y", 0) , n = r(t, "width", 1) , s = r(t, "height", n); return new o(this.scene,e,i,n,s) }) } , function(t, e, i) { var s = i(27) , n = i(16) , r = i(15) , o = i(200); n.register("video", function(t, e) { void 0 === t && (t = {}); var i = r(t, "key", null) , n = new o(this.scene,0,0,i); return void 0 !== e && (t.add = e), s(this.scene, n, t), n }) } , function(t, e, i) { var n = i(1) , s = i(1) , n = i(1078) , s = i(1079); t.exports = { renderWebGL: n, renderCanvas: s } } , function(t, e, i) { var A = i(9); t.exports = function(t, e, i, n, s) { var r = this.pipeline; t.setPipeline(r, e); var o = r._tempMatrix1 , a = r._tempMatrix2 , h = r._tempMatrix3; a.applyITRS(e.x, e.y, e.rotation, e.scaleX, e.scaleY), o.copyFrom(n.matrix), s ? (o.multiplyWithOffset(s, -n.scrollX * e.scrollFactorX, -n.scrollY * e.scrollFactorY), a.e = e.x, a.f = e.y) : (a.e -= n.scrollX * e.scrollFactorX, a.f -= n.scrollY * e.scrollFactorY), o.multiply(a, h); var l = e.frame.glTexture , u = e.vertices , c = e.uv , d = e.colors , f = e.alphas , p = u.length , g = Math.floor(.5 * p); r.vertexCount + g > r.vertexCapacity && r.flush(), r.setTexture2D(l, 0); for (var v = r.vertexViewF32, m = r.vertexViewU32, y = r.vertexCount * r.vertexComponentCount - 1, x = 0, T = e.tintFill, w = 0; w < p; w += 2) { var b = u[w + 0] , E = u[w + 1] , S = b * h.a + E * h.c + h.e , _ = b * h.b + E * h.d + h.f; n.roundPixels && (S = Math.round(S), _ = Math.round(_)), v[++y] = S, v[++y] = _, v[++y] = c[w + 0], v[++y] = c[w + 1], v[++y] = T, m[++y] = A.getTintAppendFloatAlpha(d[x], n.alpha * f[x]), x++ } r.vertexCount += g } } , function(t, e) { t.exports = function() {} } , function(t, e, i) { var n = i(1) , s = i(1) , n = i(1081) , s = i(1082); t.exports = { renderWebGL: n, renderCanvas: s } } , function(t, e) { t.exports = function(t, e, i, n, s) { var r, o, a, h; e.shader && (r = t.currentPipeline, t.clearPipeline(), e.renderToTexture ? e.load() : (o = e._tempMatrix1, a = e._tempMatrix2, h = e._tempMatrix3, a.applyITRS(e.x, e.y, e.rotation, e.scaleX, e.scaleY), o.copyFrom(n.matrix), s ? (o.multiplyWithOffset(s, -n.scrollX * e.scrollFactorX, -n.scrollY * e.scrollFactorY), a.e = e.x, a.f = e.y) : (a.e -= n.scrollX * e.scrollFactorX, a.f -= n.scrollY * e.scrollFactorY), o.multiply(a, h), t.width === e._rendererWidth && t.height === e._rendererHeight || e.projOrtho(0, t.width, t.height, 0), e.load(h.matrix)), e.flush(), t.rebindPipeline(r)) } } , function(t, e) { t.exports = function() {} } , function(t, e, i) { var h = i(134); i(5).register("mesh", function(t, e, i, n, s, r, o, a) { return this.displayList.add(new h(this.scene,t,e,i,n,s,r,o,a)) }) } , function(t, e, i) { var s = i(203); i(5).register("quad", function(t, e, i, n) { return this.displayList.add(new s(this.scene,t,e,i,n)) }) } , function(t, e, i) { var a = i(204); i(5).register("shader", function(t, e, i, n, s, r, o) { return this.displayList.add(new a(this.scene,t,e,i,n,s,r,o)) }) } , function(t, e, i) { var l = i(27) , n = i(16) , u = i(15) , c = i(6) , d = i(134); n.register("mesh", function(t, e) { void 0 === t && (t = {}); var i = u(t, "key", null) , n = u(t, "frame", null) , s = c(t, "vertices", []) , r = c(t, "colors", []) , o = c(t, "alphas", []) , a = c(t, "uv", []) , h = new d(this.scene,0,0,s,a,r,o,i,n); return void 0 !== e && (t.add = e), l(this.scene, h, t), h }) } , function(t, e, i) { var a = i(27) , n = i(16) , h = i(15) , l = i(203); n.register("quad", function(t, e) { void 0 === t && (t = {}); var i = h(t, "x", 0) , n = h(t, "y", 0) , s = h(t, "key", null) , r = h(t, "frame", null) , o = new l(this.scene,i,n,s,r); return void 0 !== e && (t.add = e), a(this.scene, o, t), o }) } , function(t, e, i) { var h = i(27) , n = i(16) , l = i(15) , u = i(204); n.register("shader", function(t, e) { void 0 === t && (t = {}); var i = l(t, "key", null) , n = l(t, "x", 0) , s = l(t, "y", 0) , r = l(t, "width", 128) , o = l(t, "height", 128) , a = new u(this.scene,i,n,s,r,o); return void 0 !== e && (t.add = e), h(this.scene, a, t), a }) } , function(t, e, i) { var n = i(0) , s = i(429) , r = i(23) , o = i(22) , a = new n({ Extends: s, initialize: function(t) { this.scene = t, this.systems = t.sys, t.sys.settings.isBooted || t.sys.events.once(o.BOOT, this.boot, this), s.call(this) }, boot: function() { var t = this.systems.events; t.on(o.SHUTDOWN, this.shutdown, this), t.on(o.DESTROY, this.destroy, this) }, destroy: function() { this.shutdown(), this.scene = void 0, this.systems = void 0 } }); r.register("LightsPlugin", a, "lights"), t.exports = a } , function(t, e, i) { var n = i(65); n.Area = i(1091), n.Circumference = i(268), n.CircumferencePoint = i(149), n.Clone = i(1092), n.Contains = i(55), n.ContainsPoint = i(1093), n.ContainsRect = i(1094), n.CopyFrom = i(1095), n.Equals = i(1096), n.GetBounds = i(1097), n.GetPoint = i(266), n.GetPoints = i(267), n.Offset = i(1098), n.OffsetPoint = i(1099), n.Random = i(150), t.exports = n } , function(t, e) { t.exports = function(t) { return 0 < t.radius ? Math.PI * t.radius * t.radius : 0 } } , function(t, e, i) { var n = i(65); t.exports = function(t) { return new n(t.x,t.y,t.radius) } } , function(t, e, i) { var n = i(55); t.exports = function(t, e) { return n(t, e.x, e.y) } } , function(t, e, i) { var n = i(55); t.exports = function(t, e) { return n(t, e.x, e.y) && n(t, e.right, e.y) && n(t, e.x, e.bottom) && n(t, e.right, e.bottom) } } , function(t, e) { t.exports = function(t, e) { return e.setTo(t.x, t.y, t.radius) } } , function(t, e) { t.exports = function(t, e) { return t.x === e.x && t.y === e.y && t.radius === e.radius } } , function(t, e, i) { var n = i(11); t.exports = function(t, e) { return void 0 === e && (e = new n), e.x = t.left, e.y = t.top, e.width = t.diameter, e.height = t.diameter, e } } , function(t, e) { t.exports = function(t, e, i) { return t.x += e, t.y += i, t } } , function(t, e) { t.exports = function(t, e) { return t.x += e.x, t.y += e.y, t } } , function(t, e, i) { var n = i(95); n.Area = i(1101), n.Circumference = i(400), n.CircumferencePoint = i(193), n.Clone = i(1102), n.Contains = i(96), n.ContainsPoint = i(1103), n.ContainsRect = i(1104), n.CopyFrom = i(1105), n.Equals = i(1106), n.GetBounds = i(1107), n.GetPoint = i(398), n.GetPoints = i(399), n.Offset = i(1108), n.OffsetPoint = i(1109), n.Random = i(157), t.exports = n } , function(t, e) { t.exports = function(t) { return t.isEmpty() ? 0 : t.getMajorRadius() * t.getMinorRadius() * Math.PI } } , function(t, e, i) { var n = i(95); t.exports = function(t) { return new n(t.x,t.y,t.width,t.height) } } , function(t, e, i) { var n = i(96); t.exports = function(t, e) { return n(t, e.x, e.y) } } , function(t, e, i) { var n = i(96); t.exports = function(t, e) { return n(t, e.x, e.y) && n(t, e.right, e.y) && n(t, e.x, e.bottom) && n(t, e.right, e.bottom) } } , function(t, e) { t.exports = function(t, e) { return e.setTo(t.x, t.y, t.width, t.height) } } , function(t, e) { t.exports = function(t, e) { return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height } } , function(t, e, i) { var n = i(11); t.exports = function(t, e) { return void 0 === e && (e = new n), e.x = t.left, e.y = t.top, e.width = t.width, e.height = t.height, e } } , function(t, e) { t.exports = function(t, e, i) { return t.x += e, t.y += i, t } } , function(t, e) { t.exports = function(t, e) { return t.x += e.x, t.y += e.y, t } } , function(t, e, i) { var g = i(4) , v = i(205); t.exports = function(t, e, i) { var n, s, r, o, a, h, l, u, c, d, f, p; return void 0 === i && (i = []), v(t, e) && (n = t.x, s = t.y, r = t.radius, o = e.x, a = e.y, h = e.radius, s === a ? 0 === (p = (f = -2 * a) * f - 4 * (d = 1) * (o * o + (l = (h * h - r * r - o * o + n * n) / (2 * (n - o))) * l - 2 * o * l + a * a - h * h)) ? i.push(new g(l,-f / (2 * d))) : 0 < p && (i.push(new g(l,(-f + Math.sqrt(p)) / (2 * d))), i.push(new g(l,(-f - Math.sqrt(p)) / (2 * d)))) : 0 === (p = (f = 2 * s * (u = (n - o) / (s - a)) - 2 * (c = (h * h - r * r - o * o + n * n - a * a + s * s) / (2 * (s - a))) * u - 2 * n) * f - 4 * (d = u * u + 1) * (n * n + s * s + c * c - r * r - 2 * s * c)) ? (l = -f / (2 * d), i.push(new g(l,c - l * u))) : 0 < p && (l = (-f + Math.sqrt(p)) / (2 * d), i.push(new g(l,c - l * u)), l = (-f - Math.sqrt(p)) / (2 * d), i.push(new g(l,c - l * u)))), i } } , function(t, e, i) { var a = i(207) , h = i(206); t.exports = function(t, e, i) { var n, s, r, o; return void 0 === i && (i = []), h(t, e) && (n = e.getLineA(), s = e.getLineB(), r = e.getLineC(), o = e.getLineD(), a(n, t, i), a(s, t, i), a(r, t, i), a(o, t, i)), i } } , function(t, e, i) { var n = i(11) , s = i(135); t.exports = function(t, e, i) { return void 0 === i && (i = new n), s(t, e) && (i.x = Math.max(t.x, e.x), i.y = Math.max(t.y, e.y), i.width = Math.min(t.right, e.right) - i.x, i.height = Math.min(t.bottom, e.bottom) - i.y), i } } , function(t, e, i) { var a = i(209) , h = i(135); t.exports = function(t, e, i) { var n, s, r, o; return void 0 === i && (i = []), h(t, e) && (n = t.getLineA(), s = t.getLineB(), r = t.getLineC(), o = t.getLineD(), a(n, e, i), a(s, e, i), a(r, e, i), a(o, e, i)), i } } , function(t, e, i) { var o = i(433) , a = i(209); t.exports = function(t, e, i) { var n, s, r; return void 0 === i && (i = []), o(t, e) && (n = e.getLineA(), s = e.getLineB(), r = e.getLineC(), a(n, t, i), a(s, t, i), a(r, t, i)), i } } , function(t, e, i) { var o = i(207) , a = i(435); t.exports = function(t, e, i) { var n, s, r; return void 0 === i && (i = []), a(t, e) && (n = t.getLineA(), s = t.getLineB(), r = t.getLineC(), o(n, e, i), o(s, e, i), o(r, e, i)), i } } , function(t, e, i) { var o = i(438) , a = i(436); t.exports = function(t, e, i) { var n, s, r; return void 0 === i && (i = []), o(t, e) && (n = e.getLineA(), s = e.getLineB(), r = e.getLineC(), a(t, n, i), a(t, s, i), a(t, r, i)), i } } , function(t, e, i) { var o = i(440); t.exports = function(t, e) { if (!o(t, e)) return !1; var i = Math.min(e.x1, e.x2) , n = Math.max(e.x1, e.x2) , s = Math.min(e.y1, e.y2) , r = Math.max(e.y1, e.y2); return t.x >= i && t.x <= n && t.y >= s && t.y <= r } } , function(t, e) { t.exports = function(t, e, i, n, s, r) { return void 0 === r && (r = 0), !(e > t.right + r || i < t.left - r || n > t.bottom + r || s < t.top - r) } } , function(t, e, i) { var n = i(56); n.Angle = i(85), n.BresenhamPoints = i(288), n.CenterOn = i(1120), n.Clone = i(1121), n.CopyFrom = i(1122), n.Equals = i(1123), n.Extend = i(1124), n.GetEasedPoints = i(1125), n.GetMidPoint = i(1126), n.GetNearestPoint = i(1127), n.GetNormal = i(1128), n.GetPoint = i(275), n.GetPoints = i(153), n.GetShortestDistance = i(1129), n.Height = i(1130), n.Length = i(57), n.NormalAngle = i(441), n.NormalX = i(1131), n.NormalY = i(1132), n.Offset = i(1133), n.PerpSlope = i(1134), n.Random = i(154), n.ReflectAngle = i(1135), n.Rotate = i(1136), n.RotateAroundPoint = i(1137), n.RotateAroundXY = i(211), n.SetToAngle = i(1138), n.Slope = i(1139), n.Width = i(1140), t.exports = n } , function(t, e) { t.exports = function(t, e, i) { var n = e - (t.x1 + t.x2) / 2 , s = i - (t.y1 + t.y2) / 2; return t.x1 += n, t.y1 += s, t.x2 += n, t.y2 += s, t } } , function(t, e, i) { var n = i(56); t.exports = function(t) { return new n(t.x1,t.y1,t.x2,t.y2) } } , function(t, e) { t.exports = function(t, e) { return e.setTo(t.x1, t.y1, t.x2, t.y2) } } , function(t, e) { t.exports = function(t, e) { return t.x1 === e.x1 && t.y1 === e.y1 && t.x2 === e.x2 && t.y2 === e.y2 } } , function(t, e, i) { var o = i(57); t.exports = function(t, e, i) { void 0 === i && (i = e); var n = o(t) , s = t.x2 - t.x1 , r = t.y2 - t.y1; return e && (t.x1 = t.x1 - s / n * e, t.y1 = t.y1 - r / n * e), i && (t.x2 = t.x2 + s / n * i, t.y2 = t.y2 + r / n * i), t } } , function(t, e, i) { var y = i(320) , x = i(69) , T = i(4); t.exports = function(t, e, i, n, s) { void 0 === n && (n = 0), void 0 === s && (s = []); var r, o = [], a = t.x1, h = t.y1, l = t.x2 - a, u = t.y2 - h, c = x(e, s), d = i - 1; for (g = 0; g < d; g++) r = c(g / d), o.push(new T(a + l * r,h + u * r)); if (r = c(1), o.push(new T(a + l * r,h + u * r)), 0 < n) { for (var f = o[0], p = [f], g = 1; g < o.length - 1; g++) { var v = o[g]; y(f, v) >= n && (p.push(v), f = v) } var m = o[o.length - 1]; return y(f, m) < n && p.pop(), p.push(m), p } return o } } , function(t, e, i) { var n = i(4); t.exports = function(t, e) { return void 0 === e && (e = new n), e.x = (t.x1 + t.x2) / 2, e.y = (t.y1 + t.y2) / 2, e } } , function(t, e, i) { var l = i(4); t.exports = function(t, e, i) { void 0 === i && (i = new l); var n = t.x1 , s = t.y1 , r = t.x2 , o = t.y2 , a = (r - n) * (r - n) + (o - s) * (o - s); if (0 == a) return i; var h = ((e.x - n) * (r - n) + (e.y - s) * (o - s)) / a; return i.x = n + h * (r - n), i.y = s + h * (o - s), i } } , function(t, e, i) { var n = i(13) , s = i(85) , r = i(4); t.exports = function(t, e) { void 0 === e && (e = new r); var i = s(t) - n.TAU; return e.x = Math.cos(i), e.y = Math.sin(i), e } } , function(t, e) { t.exports = function(t, e) { var i = t.x1 , n = t.y1 , s = t.x2 , r = t.y2 , o = (s - i) * (s - i) + (r - n) * (r - n); if (0 == o) return !1; var a = ((n - e.y) * (s - i) - (i - e.x) * (r - n)) / o; return Math.abs(a) * Math.sqrt(o) } } , function(t, e) { t.exports = function(t) { return Math.abs(t.y1 - t.y2) } } , function(t, e, i) { var n = i(13) , s = i(85); t.exports = function(t) { return Math.cos(s(t) - n.TAU) } } , function(t, e, i) { var n = i(13) , s = i(85); t.exports = function(t) { return Math.sin(s(t) - n.TAU) } } , function(t, e) { t.exports = function(t, e, i) { return t.x1 += e, t.y1 += i, t.x2 += e, t.y2 += i, t } } , function(t, e) { t.exports = function(t) { return -((t.x2 - t.x1) / (t.y2 - t.y1)) } } , function(t, e, i) { var n = i(85) , s = i(441); t.exports = function(t, e) { return 2 * s(e) - Math.PI - n(t) } } , function(t, e, i) { var s = i(211); t.exports = function(t, e) { var i = (t.x1 + t.x2) / 2 , n = (t.y1 + t.y2) / 2; return s(t, i, n, e) } } , function(t, e, i) { var n = i(211); t.exports = function(t, e, i) { return n(t, e.x, e.y, i) } } , function(t, e) { t.exports = function(t, e, i, n, s) { return t.x1 = e, t.y1 = i, t.x2 = e + Math.cos(n) * s, t.y2 = i + Math.sin(n) * s, t } } , function(t, e) { t.exports = function(t) { return (t.y2 - t.y1) / (t.x2 - t.x1) } } , function(t, e) { t.exports = function(t) { return Math.abs(t.x1 - t.x2) } } , function(t, e, i) { var n = i(4); n.Ceil = i(1142), n.Clone = i(1143), n.CopyFrom = i(1144), n.Equals = i(1145), n.Floor = i(1146), n.GetCentroid = i(1147), n.GetMagnitude = i(442), n.GetMagnitudeSq = i(443), n.GetRectangleFromPoints = i(1148), n.Interpolate = i(1149), n.Invert = i(1150), n.Negative = i(1151), n.Project = i(1152), n.ProjectUnit = i(1153), n.SetMagnitude = i(1154), t.exports = n } , function(t, e) { t.exports = function(t) { return t.setTo(Math.ceil(t.x), Math.ceil(t.y)) } } , function(t, e, i) { var n = i(4); t.exports = function(t) { return new n(t.x,t.y) } } , function(t, e) { t.exports = function(t, e) { return e.setTo(t.x, t.y) } } , function(t, e) { t.exports = function(t, e) { return t.x === e.x && t.y === e.y } } , function(t, e) { t.exports = function(t) { return t.setTo(Math.floor(t.x), Math.floor(t.y)) } } , function(t, e, i) { var s = i(4); t.exports = function(t, e) { if (void 0 === e && (e = new s), !Array.isArray(t)) throw new Error("GetCentroid points argument must be an array"); var i = t.length; if (i < 1) throw new Error("GetCentroid points array must not be empty"); if (1 === i) e.x = t[0].x, e.y = t[0].y; else { for (var n = 0; n < i; n++) e.x += t[n].x, e.y += t[n].y; e.x /= i, e.y /= i } return e } } , function(t, e, i) { var h = i(11); t.exports = function(t, e) { void 0 === e && (e = new h); for (var i = Number.NEGATIVE_INFINITY, n = Number.POSITIVE_INFINITY, s = Number.NEGATIVE_INFINITY, r = Number.POSITIVE_INFINITY, o = 0; o < t.length; o++) { var a = t[o]; a.x > i && (i = a.x), a.x < n && (n = a.x), a.y > s && (s = a.y), a.y < r && (r = a.y) } return e.x = n, e.y = r, e.width = i - n, e.height = s - r, e } } , function(t, e, i) { var s = i(4); t.exports = function(t, e, i, n) { return void 0 === i && (i = 0), void 0 === n && (n = new s), n.x = t.x + (e.x - t.x) * i, n.y = t.y + (e.y - t.y) * i, n } } , function(t, e) { t.exports = function(t) { return t.setTo(t.y, t.x) } } , function(t, e, i) { var n = i(4); t.exports = function(t, e) { return void 0 === e && (e = new n), e.setTo(-t.x, -t.y) } } , function(t, e, i) { var s = i(4) , r = i(443); t.exports = function(t, e, i) { void 0 === i && (i = new s); var n = (t.x * e.x + t.y * e.y) / r(e); return 0 != n && (i.x = n * e.x, i.y = n * e.y), i } } , function(t, e, i) { var s = i(4); t.exports = function(t, e, i) { void 0 === i && (i = new s); var n = t.x * e.x + t.y * e.y; return 0 != n && (i.x = n * e.x, i.y = n * e.y), i } } , function(t, e, i) { var n = i(442); t.exports = function(t, e) { var i; return 0 === t.x && 0 === t.y || (i = n(t), t.x /= i, t.y /= i), t.x *= e, t.y *= e, t } } , function(t, e, i) { var n = i(201); n.Clone = i(1156), n.Contains = i(202), n.ContainsPoint = i(1157), n.GetAABB = i(418), n.GetNumberArray = i(1158), n.GetPoints = i(419), n.Perimeter = i(420), n.Reverse = i(1159), n.Smooth = i(421), t.exports = n } , function(t, e, i) { var n = i(201); t.exports = function(t) { return new n(t.points) } } , function(t, e, i) { var n = i(202); t.exports = function(t, e) { return n(t, e.x, e.y) } } , function(t, e) { t.exports = function(t, e) { void 0 === e && (e = []); for (var i = 0; i < t.points.length; i++) e.push(t.points[i].x), e.push(t.points[i].y); return e } } , function(t, e) { t.exports = function(t) { return t.points.reverse(), t } } , function(t, e) { t.exports = function(t) { return t.width * t.height } } , function(t, e) { t.exports = function(t) { return t.x = Math.ceil(t.x), t.y = Math.ceil(t.y), t } } , function(t, e) { t.exports = function(t) { return t.x = Math.ceil(t.x), t.y = Math.ceil(t.y), t.width = Math.ceil(t.width), t.height = Math.ceil(t.height), t } } , function(t, e, i) { var n = i(11); t.exports = function(t) { return new n(t.x,t.y,t.width,t.height) } } , function(t, e, i) { var n = i(48); t.exports = function(t, e) { return n(t, e.x, e.y) } } , function(t, e) { t.exports = function(t, e) { return e.setTo(t.x, t.y, t.width, t.height) } } , function(t, e) { t.exports = function(t, e) { return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height } } , function(t, e, i) { var n = i(212); t.exports = function(t, e) { var i = n(t); return i < n(e) ? t.setSize(e.height * i, e.height) : t.setSize(e.width, e.width / i), t.setPosition(e.centerX - t.width / 2, e.centerY - t.height / 2) } } , function(t, e, i) { var n = i(212); t.exports = function(t, e) { var i = n(t); return i > n(e) ? t.setSize(e.height * i, e.height) : t.setSize(e.width, e.width / i), t.setPosition(e.centerX - t.width / 2, e.centerY - t.height / 2) } } , function(t, e) { t.exports = function(t) { return t.x = Math.floor(t.x), t.y = Math.floor(t.y), t } } , function(t, e) { t.exports = function(t) { return t.x = Math.floor(t.x), t.y = Math.floor(t.y), t.width = Math.floor(t.width), t.height = Math.floor(t.height), t } } , function(t, e, i) { var r = i(11); t.exports = function(t, e, i, n, s) { return void 0 === s && (s = new r), s.setTo(Math.min(t, i), Math.min(e, n), Math.abs(t - i), Math.abs(e - n)) } } , function(t, e, i) { var n = i(4); t.exports = function(t, e) { return void 0 === e && (e = new n), e.x = t.centerX, e.y = t.centerY, e } } , function(t, e, i) { var n = i(4); t.exports = function(t, e) { return void 0 === e && (e = new n), e.x = t.width, e.y = t.height, e } } , function(t, e, i) { var r = i(168); t.exports = function(t, e, i) { var n = t.centerX , s = t.centerY; return t.setSize(t.width + 2 * e, t.height + 2 * i), r(t, n, s) } } , function(t, e, i) { var n = i(11) , s = i(135); t.exports = function(t, e, i) { return void 0 === i && (i = new n), s(t, e) ? (i.x = Math.max(t.x, e.x), i.y = Math.max(t.y, e.y), i.width = Math.min(t.right, e.right) - i.x, i.height = Math.min(t.bottom, e.bottom) - i.y) : i.setEmpty(), i } } , function(t, e) { t.exports = function(t, e) { for (var i = t.x, n = t.right, s = t.y, r = t.bottom, o = 0; o < e.length; o++) i = Math.min(i, e[o].x), n = Math.max(n, e[o].x), s = Math.min(s, e[o].y), r = Math.max(r, e[o].y); return t.x = i, t.y = s, t.width = n - i, t.height = r - s, t } } , function(t, e) { t.exports = function(t, e) { var i = Math.min(t.x, e.x) , n = Math.max(t.right, e.right); t.x = i, t.width = n - i; var s = Math.min(t.y, e.y) , r = Math.max(t.bottom, e.bottom); return t.y = s, t.height = r - s, t } } , function(t, e) { t.exports = function(t, e, i) { var n = Math.min(t.x, e) , s = Math.max(t.right, e); t.x = n, t.width = s - n; var r = Math.min(t.y, i) , o = Math.max(t.bottom, i); return t.y = r, t.height = o - r, t } } , function(t, e) { t.exports = function(t, e, i) { return t.x += e, t.y += i, t } } , function(t, e) { t.exports = function(t, e) { return t.x += e.x, t.y += e.y, t } } , function(t, e) { t.exports = function(t, e) { return t.x < e.right && t.right > e.x && t.y < e.bottom && t.bottom > e.y } } , function(t, e, i) { var a = i(4) , h = i(39); t.exports = function(t, e, i) { void 0 === i && (i = new a), e = h(e); var n = Math.sin(e) , s = Math.cos(e) , r = 0 < s ? t.width / 2 : t.width / -2 , o = 0 < n ? t.height / 2 : t.height / -2; return Math.abs(r * n) < Math.abs(o * s) ? o = r * n / s : r = o * s / n, i.x = r + t.centerX, i.y = o + t.centerY, i } } , function(t, e, i) { var n = i(172) , s = i(445) , r = i(4); t.exports = function(t, e, i) { if (void 0 === i && (i = new r), s(t, e)) switch (n(0, 3)) { case 0: i.x = t.x + Math.random() * (e.right - t.x), i.y = t.y + Math.random() * (e.top - t.y); break; case 1: i.x = e.x + Math.random() * (t.right - e.x), i.y = e.bottom + Math.random() * (t.bottom - e.bottom); break; case 2: i.x = t.x + Math.random() * (e.x - t.x), i.y = e.y + Math.random() * (t.bottom - e.y); break; case 3: i.x = e.right + Math.random() * (t.right - e.right), i.y = t.y + Math.random() * (e.bottom - t.y) } return i } } , function(t, e) { t.exports = function(t, e) { return t.width === e.width && t.height === e.height } } , function(t, e) { t.exports = function(t, e, i) { return void 0 === i && (i = e), t.width *= e, t.height *= i, t } } , function(t, e, i) { var n = i(71); n.Area = i(1187), n.BuildEquilateral = i(1188), n.BuildFromPolygon = i(1189), n.BuildRight = i(1190), n.CenterOn = i(1191), n.Centroid = i(446), n.CircumCenter = i(1192), n.CircumCircle = i(1193), n.Clone = i(1194), n.Contains = i(83), n.ContainsArray = i(210), n.ContainsPoint = i(1195), n.CopyFrom = i(1196), n.Decompose = i(439), n.Equals = i(1197), n.GetPoint = i(425), n.GetPoints = i(426), n.InCenter = i(448), n.Perimeter = i(1198), n.Offset = i(447), n.Random = i(158), n.Rotate = i(1199), n.RotateAroundPoint = i(1200), n.RotateAroundXY = i(213), t.exports = n } , function(t, e) { t.exports = function(t) { var e = t.x1 , i = t.y1 , n = t.x2 , s = t.y2 , r = t.x3 , o = t.y3; return Math.abs(((r - e) * (s - i) - (n - e) * (o - i)) / 2) } } , function(t, e, i) { var s = i(71); t.exports = function(t, e, i) { var n = i * (Math.sqrt(3) / 2); return new s(t,e,t + i / 2,e + n,t - i / 2,e + n) } } , function(t, e, i) { var v = i(66) , m = i(71); t.exports = function(t, e, i, n, s) { void 0 === e && (e = null), void 0 === i && (i = 1), void 0 === n && (n = 1), void 0 === s && (s = []); for (var r, o, a, h, l, u, c, d, f, p = v(t, e), g = 0; g < p.length; g += 3) r = p[g], o = p[g + 1], a = p[g + 2], h = t[2 * r] * i, l = t[2 * r + 1] * n, u = t[2 * o] * i, c = t[2 * o + 1] * n, d = t[2 * a] * i, f = t[2 * a + 1] * n, s.push(new m(h,l,u,c,d,f)); return s } } , function(t, e, i) { var s = i(71); t.exports = function(t, e, i, n) { return void 0 === n && (n = i), new s(t,e,t,e - n,t + i,e) } } , function(t, e, i) { var a = i(446) , h = i(447); t.exports = function(t, e, i, n) { void 0 === n && (n = a); var s = n(t) , r = e - s.x , o = i - s.y; return h(t, r, o) } } , function(t, e, i) { var c = i(3); t.exports = function(t, e) { void 0 === e && (e = new c); var i = t.x3 , n = t.y3 , s = t.x1 - i , r = t.y1 - n , o = t.x2 - i , a = t.y2 - n , h = 2 * (s * a - r * o) , l = r * (o * o + a * a) - (s * s + r * r) * a , u = s * (o * o + a * a) - (s * s + r * r) * o; return e.x = i - l / h, e.y = n + u / h, e } } , function(t, e, i) { var x = i(65); t.exports = function(t, e) { void 0 === e && (e = new x); var i, n, s, r, o = t.x1, a = t.y1, h = t.x2, l = t.y2, u = t.x3, c = t.y3, d = h - o, f = l - a, p = u - o, g = c - a, v = d * (o + h) + f * (a + l), m = p * (o + u) + g * (a + c), y = 2 * (d * (c - l) - f * (u - h)); return Math.abs(y) < 1e-6 ? (i = Math.min(o, h, u), n = Math.min(a, l, c), s = .5 * (Math.max(o, h, u) - i), r = .5 * (Math.max(a, l, c) - n), e.x = i + s, e.y = n + r) : (e.x = (g * v - f * m) / y, e.y = (d * m - p * v) / y, s = e.x - o, r = e.y - a), e.radius = Math.sqrt(s * s + r * r), e } } , function(t, e, i) { var n = i(71); t.exports = function(t) { return new n(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3) } } , function(t, e, i) { var n = i(83); t.exports = function(t, e) { return n(t, e.x, e.y) } } , function(t, e) { t.exports = function(t, e) { return e.setTo(t.x1, t.y1, t.x2, t.y2, t.x3, t.y3) } } , function(t, e) { t.exports = function(t, e) { return t.x1 === e.x1 && t.y1 === e.y1 && t.x2 === e.x2 && t.y2 === e.y2 && t.x3 === e.x3 && t.y3 === e.y3 } } , function(t, e, i) { var s = i(57); t.exports = function(t) { var e = t.getLineA() , i = t.getLineB() , n = t.getLineC(); return s(e) + s(i) + s(n) } } , function(t, e, i) { var n = i(213) , s = i(448); t.exports = function(t, e) { var i = s(t); return n(t, i.x, i.y, e) } } , function(t, e, i) { var n = i(213); t.exports = function(t, e, i) { return n(t, e.x, e.y, i) } } , function(t, e, i) { var n = i(179) , s = i(18)(!1, s = { CreateInteractiveObject: i(449), Events: i(54), Gamepad: i(1202), InputManager: i(365), InputPlugin: i(1214), InputPluginCache: i(136), Keyboard: i(1216), Mouse: i(1233), Pointer: i(368), Touch: i(1234) }, n); t.exports = s } , function(t, e, i) { t.exports = { Axis: i(450), Button: i(451), Events: i(214), Gamepad: i(452), GamepadPlugin: i(1209), Configs: i(1210) } } , function(t, e) { t.exports = "down" } , function(t, e) { t.exports = "up" } , function(t, e) { t.exports = "connected" } , function(t, e) { t.exports = "disconnected" } , function(t, e) { t.exports = "down" } , function(t, e) { t.exports = "up" } , function(t, e, i) { var n = i(0) , s = i(10) , r = i(214) , h = i(452) , o = i(6) , a = i(136) , l = i(54) , u = new n({ Extends: s, initialize: function(t) { s.call(this), this.scene = t.scene, this.settings = this.scene.sys.settings, this.sceneInputPlugin = t, this.enabled = !0, this.target, this.gamepads = [], this.queue = [], this.onGamepadHandler, this._pad1, this._pad2, this._pad3, this._pad4, t.pluginEvents.once(l.BOOT, this.boot, this), t.pluginEvents.on(l.START, this.start, this) }, boot: function() { var t = this.scene.sys.game , e = this.settings.input , i = t.config; this.enabled = o(e, "gamepad", i.inputGamepad) && t.device.input.gamepads, this.target = o(e, "gamepad.target", i.inputGamepadEventTarget), this.sceneInputPlugin.pluginEvents.once(l.DESTROY, this.destroy, this) }, start: function() { this.enabled && this.startListeners(), this.sceneInputPlugin.pluginEvents.once(l.SHUTDOWN, this.shutdown, this) }, isActive: function() { return this.enabled && this.scene.sys.isActive() }, startListeners: function() { function t(t) { !t.defaultPrevented && e.isActive() && (e.refreshPads(), e.queue.push(t)) } var e = this , i = this.target; this.onGamepadHandler = t, i.addEventListener("gamepadconnected", t, !1), i.addEventListener("gamepaddisconnected", t, !1), this.sceneInputPlugin.pluginEvents.on(l.UPDATE, this.update, this) }, stopListeners: function() { this.target.removeEventListener("gamepadconnected", this.onGamepadHandler), this.target.removeEventListener("gamepaddisconnected", this.onGamepadHandler), this.sceneInputPlugin.pluginEvents.off(l.UPDATE, this.update) }, disconnectAll: function() { for (var t = 0; t < this.gamepads.length; t++) this.gamepads.connected = !1 }, refreshPads: function() { var t = navigator.getGamepads(); if (t) for (var e = this.gamepads, i = 0; i < t.length; i++) { var n, s, r, o, a = t[i]; a && (n = a.id, (r = e[s = a.index]) ? r.id !== n ? (r.destroy(), e[s] = new h(this,a)) : r.update(a) : (o = new h(this,a), e[s] = o, this._pad1 ? this._pad2 ? this._pad3 ? this._pad4 || (this._pad4 = o) : this._pad3 = o : this._pad2 = o : this._pad1 = o)) } else this.disconnectAll() }, getAll: function() { for (var t = [], e = this.gamepads, i = 0; i < e.length; i++) e[i] && t.push(e[i]); return t }, getPad: function(t) { for (var e = this.gamepads, i = 0; i < e.length; i++) if (e[i] && e[i].index === t) return e[i] }, update: function() { if (this.enabled) { this.refreshPads(); var t = this.queue.length; if (0 !== t) for (var e = this.queue.splice(0, t), i = 0; i < t; i++) { var n = e[i] , s = this.getPad(n.gamepad.index); "gamepadconnected" === n.type ? this.emit(r.CONNECTED, s, n) : "gamepaddisconnected" === n.type && this.emit(r.DISCONNECTED, s, n) } } }, shutdown: function() { this.stopListeners(), this.disconnectAll(), this.removeAllListeners() }, destroy: function() { this.shutdown(); for (var t = 0; t < this.gamepads.length; t++) this.gamepads[t] && this.gamepads[t].destroy(); this.gamepads = [], this.scene = null, this.settings = null, this.sceneInputPlugin = null, this.target = null }, total: { get: function() { return this.gamepads.length } }, pad1: { get: function() { return this._pad1 } }, pad2: { get: function() { return this._pad2 } }, pad3: { get: function() { return this._pad3 } }, pad4: { get: function() { return this._pad4 } } }); a.register("GamepadPlugin", u, "gamepad", "gamepad", "inputGamepad"), t.exports = u } , function(t, e, i) { t.exports = { DUALSHOCK_4: i(1211), SNES_USB: i(1212), XBOX_360: i(1213) } } , function(t, e) { t.exports = { UP: 12, DOWN: 13, LEFT: 14, RIGHT: 15, SHARE: 8, OPTIONS: 9, PS: 16, TOUCHBAR: 17, X: 0, CIRCLE: 1, SQUARE: 2, TRIANGLE: 3, L1: 4, R1: 5, L2: 6, R2: 7, L3: 10, R3: 11, LEFT_STICK_H: 0, LEFT_STICK_V: 1, RIGHT_STICK_H: 2, RIGHT_STICK_V: 3 } } , function(t, e) { t.exports = { UP: 12, DOWN: 13, LEFT: 14, RIGHT: 15, SELECT: 8, START: 9, B: 0, A: 1, Y: 2, X: 3, LEFT_SHOULDER: 4, RIGHT_SHOULDER: 5 } } , function(t, e) { t.exports = { UP: 12, DOWN: 13, LEFT: 14, RIGHT: 15, MENU: 16, A: 0, B: 1, X: 2, Y: 3, LB: 4, RB: 5, LT: 6, RT: 7, BACK: 8, START: 9, LS: 10, RS: 11, LEFT_STICK_H: 0, LEFT_STICK_V: 1, RIGHT_STICK_H: 2, RIGHT_STICK_V: 3 } } , function(t, e, i) { var o = i(65) , a = i(55) , n = i(0) , h = i(179) , p = i(449) , s = i(1215) , r = i(53) , l = i(95) , u = i(96) , g = i(54) , c = i(10) , v = i(2) , d = i(47) , f = i(136) , m = i(7) , y = i(23) , x = i(11) , T = i(48) , w = i(22) , b = i(71) , E = i(83) , S = new n({ Extends: c, initialize: function(t) { c.call(this), this.scene = t, this.systems = t.sys, this.settings = t.sys.settings, this.manager = t.sys.game.input, this.pluginEvents = new c, this.enabled = !0, this.displayList, this.cameras, f.install(this), this.mouse = this.manager.mouse, this.topOnly = !0, this.pollRate = -1, this._pollTimer = 0; var e = { cancelled: !1 }; this._eventContainer = { stopPropagation: function() { e.cancelled = !0 } }, this._eventData = e, this.dragDistanceThreshold = 0, this.dragTimeThreshold = 0, this._temp = [], this._tempZones = [], this._list = [], this._pendingInsertion = [], this._pendingRemoval = [], this._draggable = [], this._drag = { 0: [], 1: [], 2: [], 3: [], 4: [], 5: [], 6: [], 7: [], 8: [], 9: [], 10: [] }, this._dragState = [], this._over = { 0: [], 1: [], 2: [], 3: [], 4: [], 5: [], 6: [], 7: [], 8: [], 9: [], 10: [] }, this._validTypes = ["onDown", "onUp", "onOver", "onOut", "onMove", "onDragStart", "onDrag", "onDragEnd", "onDragEnter", "onDragLeave", "onDragOver", "onDrop"], this._updatedThisFrame = !1, t.sys.events.once(w.BOOT, this.boot, this), t.sys.events.on(w.START, this.start, this) }, boot: function() { this.cameras = this.systems.cameras, this.displayList = this.systems.displayList, this.systems.events.once(w.DESTROY, this.destroy, this), this.pluginEvents.emit(g.BOOT) }, start: function() { var t = this.systems.events; t.on(w.TRANSITION_START, this.transitionIn, this), t.on(w.TRANSITION_OUT, this.transitionOut, this), t.on(w.TRANSITION_COMPLETE, this.transitionComplete, this), t.on(w.PRE_UPDATE, this.preUpdate, this), t.once(w.SHUTDOWN, this.shutdown, this), this.manager.events.on(g.GAME_OUT, this.onGameOut, this), this.manager.events.on(g.GAME_OVER, this.onGameOver, this), this.enabled = !0, this._dragState = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], this.pluginEvents.emit(g.START) }, onGameOver: function(t) { this.isActive() && this.emit(g.GAME_OVER, t.timeStamp, t) }, onGameOut: function(t) { this.isActive() && this.emit(g.GAME_OUT, t.timeStamp, t) }, preUpdate: function() { this.pluginEvents.emit(g.PRE_UPDATE); var t = this._pendingRemoval , e = this._pendingInsertion , i = t.length , n = e.length; if (0 !== i || 0 !== n) { for (var s = this._list, r = 0; r < i; r++) { var o = t[r] , a = s.indexOf(o); -1 < a && (s.splice(a, 1), this.clear(o, !0)) } t.length = 0, this._pendingRemoval.length = 0, this._list = s.concat(e.splice(0)) } }, isActive: function() { return this.enabled && this.scene.sys.isActive() }, updatePoll: function(t, e) { if (!this.isActive()) return !1; if (this.pluginEvents.emit(g.UPDATE, t, e), this._updatedThisFrame) return this._updatedThisFrame = !1; for (var i = this.manager, n = i.pointers, s = i.pointersTotal, r = 0; r < s; r++) n[r].updateMotion(); if (0 === this._list.length) return !1; var o = this.pollRate; if (-1 === o) return !1; if (0 < o) { if (this._pollTimer -= e, !(this._pollTimer < 0)) return !1; this._pollTimer = this.pollRate } var a = !1; for (r = 0; r < s; r++) { var h = 0 , l = n[r]; this._tempZones = [], this._temp = this.hitTestPointer(l), this.sortGameObjects(this._temp), this.sortGameObjects(this._tempZones), this.topOnly && (this._temp.length && this._temp.splice(1), this._tempZones.length && this._tempZones.splice(1)), h += this.processOverOutEvents(l), 2 === this.getDragState(l) && this.processDragThresholdEvent(l, t), 0 < h && (a = !0) } return a }, update: function(t, e) { if (!this.isActive()) return !1; for (var i = e.length, n = !1, s = 0; s < i; s++) { var r = 0 , o = e[s]; switch (this._tempZones = [], this._temp = this.hitTestPointer(o), this.sortGameObjects(this._temp), this.sortGameObjects(this._tempZones), this.topOnly && (this._temp.length && this._temp.splice(1), this._tempZones.length && this._tempZones.splice(1)), t) { case h.MOUSE_DOWN: r += this.processDragDownEvent(o), r += this.processDownEvents(o), r += this.processOverOutEvents(o); break; case h.MOUSE_UP: r += this.processDragUpEvent(o), r += this.processUpEvents(o), r += this.processOverOutEvents(o); break; case h.TOUCH_START: r += this.processDragDownEvent(o), r += this.processDownEvents(o), r += this.processOverEvents(o); break; case h.TOUCH_END: case h.TOUCH_CANCEL: r += this.processDragUpEvent(o), r += this.processUpEvents(o), r += this.processOutEvents(o); break; case h.MOUSE_MOVE: case h.TOUCH_MOVE: r += this.processDragMoveEvent(o), r += this.processMoveEvents(o), r += this.processOverOutEvents(o); break; case h.MOUSE_WHEEL: r += this.processWheelEvent(o) } 0 < r && (n = !0) } return this._updatedThisFrame = !0, n }, clear: function(t, e) { void 0 === e && (e = !1); var i = t.input; if (i) { e || this.queueForRemoval(t), i.gameObject = void 0, i.target = void 0, i.hitArea = void 0, i.hitAreaCallback = void 0, i.callbackContext = void 0, this.manager.resetCursor(i), t.input = null; var n = this._draggable.indexOf(t); return -1 < n && this._draggable.splice(n, 1), -1 < (n = this._drag[0].indexOf(t)) && this._drag[0].splice(n, 1), -1 < (n = this._over[0].indexOf(t)) && this._over[0].splice(n, 1), t } }, disable: function(t) { t.input.enabled = !1 }, enable: function(t, e, i, n) { return void 0 === n && (n = !1), t.input ? t.input.enabled = !0 : this.setHitArea(t, e, i), t.input && n && !t.input.dropZone && (t.input.dropZone = n), this }, hitTestPointer: function(t) { for (var e = this.cameras.getCamerasBelowPointer(t), i = 0; i < e.length; i++) { for (var n = e[i], s = this.manager.hitTest(t, this._list, n), r = 0; r < s.length; r++) { var o = s[r]; o.input.dropZone && this._tempZones.push(o) } if (0 < s.length) return t.camera = n, s } return t.camera = e[0], [] }, processDownEvents: function(t) { for (var e = 0, i = this._temp, n = this._eventData, s = this._eventContainer, r = n.cancelled = !1, o = 0; o < i.length; o++) { var a = i[o]; if (a.input) { if (e++, a.emit(g.GAMEOBJECT_POINTER_DOWN, t, a.input.localX, a.input.localY, s), n.cancelled || !a.input) { r = !0; break } if (this.emit(g.GAMEOBJECT_DOWN, t, a, s), n.cancelled || !a.input) { r = !0; break } } } return !r && this.manager && (t.downElement === this.manager.game.canvas ? this.emit(g.POINTER_DOWN, t, i) : this.emit(g.POINTER_DOWN_OUTSIDE, t)), e }, getDragState: function(t) { return this._dragState[t.id] }, setDragState: function(t, e) { this._dragState[t.id] = e }, processDragThresholdEvent: function(t, e) { var i = !1 , n = this.dragTimeThreshold , s = this.dragDistanceThreshold; if ((0 < s && r(t.x, t.y, t.downX, t.downY) >= s || 0 < n && e >= t.downTime + n) && (i = !0), i) return this.setDragState(t, 3), this.processDragStartList(t) }, processDragStartList: function(t) { if (3 !== this.getDragState(t)) return 0; for (var e = this._drag[t.id], i = 0; i < e.length; i++) { var n = e[i] , s = n.input; s.dragState = 2, s.dragStartX = n.x, s.dragStartY = n.y, s.dragStartXGlobal = t.worldX, s.dragStartYGlobal = t.worldY, s.dragX = s.dragStartXGlobal - s.dragStartX, s.dragY = s.dragStartYGlobal - s.dragStartY, n.emit(g.GAMEOBJECT_DRAG_START, t, s.dragX, s.dragY), this.emit(g.DRAG_START, t, n) } return this.setDragState(t, 4), e.length }, processDragDownEvent: function(t) { var e = this._temp; if (0 === this._draggable.length || 0 === e.length || !t.primaryDown || 0 !== this.getDragState(t)) return 0; this.setDragState(t, 1); for (var i = [], n = 0; n < e.length; n++) { var s = e[n]; s.input.draggable && 0 === s.input.dragState && i.push(s) } return 0 === i.length ? (this.setDragState(t, 0), 0) : (1 < i.length && (this.sortGameObjects(i), this.topOnly && i.splice(1)), this._drag[t.id] = i, 0 === this.dragDistanceThreshold && 0 === this.dragTimeThreshold ? (this.setDragState(t, 3), this.processDragStartList(t)) : (this.setDragState(t, 2), 0)) }, processDragMoveEvent: function(t) { if (2 === this.getDragState(t) && this.processDragThresholdEvent(t, this.manager.game.loop.now), 4 !== this.getDragState(t)) return 0; for (var e = this._tempZones, i = this._drag[t.id], n = 0; n < i.length; n++) { var s, r, o, a, h, l, u, c, d = i[n], f = d.input, p = f.target; p ? 0 === (s = e.indexOf(p)) ? (d.emit(g.GAMEOBJECT_DRAG_OVER, t, p), this.emit(g.DRAG_OVER, t, d, p)) : 0 < s ? (d.emit(g.GAMEOBJECT_DRAG_LEAVE, t, p), this.emit(g.DRAG_LEAVE, t, d, p), f.target = e[0], p = f.target, d.emit(g.GAMEOBJECT_DRAG_ENTER, t, p), this.emit(g.DRAG_ENTER, t, d, p)) : (d.emit(g.GAMEOBJECT_DRAG_LEAVE, t, p), this.emit(g.DRAG_LEAVE, t, d, p), e[0] ? (f.target = e[0], p = f.target, d.emit(g.GAMEOBJECT_DRAG_ENTER, t, p), this.emit(g.DRAG_ENTER, t, d, p)) : f.target = null) : !p && e[0] && (f.target = e[0], p = f.target, d.emit(g.GAMEOBJECT_DRAG_ENTER, t, p), this.emit(g.DRAG_ENTER, t, d, p)), o = d.parentContainer ? (a = t.worldX - f.dragStartXGlobal, h = t.worldY - f.dragStartYGlobal, l = d.getParentRotation(), u = a * Math.cos(l) + h * Math.sin(l), c = h * Math.cos(l) - a * Math.sin(l), u *= 1 / d.parentContainer.scaleX, c *= 1 / d.parentContainer.scaleY, r = u + f.dragStartX, c + f.dragStartY) : (r = t.worldX - f.dragX, t.worldY - f.dragY), d.emit(g.GAMEOBJECT_DRAG, t, r, o), this.emit(g.DRAG, t, d, r, o) } return i.length }, processDragUpEvent: function(t) { for (var e = this._drag[t.id], i = 0; i < e.length; i++) { var n, s, r = e[i], o = r.input; o && 2 === o.dragState && (o.dragState = 0, o.dragX = o.localX - r.displayOriginX, o.dragY = o.localY - r.displayOriginY, n = !1, (s = o.target) && (r.emit(g.GAMEOBJECT_DROP, t, s), this.emit(g.DROP, t, r, s), n = !(o.target = null)), r.input && (r.emit(g.GAMEOBJECT_DRAG_END, t, o.dragX, o.dragY, n), this.emit(g.DRAG_END, t, r, n))) } return this.setDragState(t, 0), e.splice(0), 0 }, processMoveEvents: function(t) { for (var e = 0, i = this._temp, n = this._eventData, s = this._eventContainer, r = n.cancelled = !1, o = 0; o < i.length; o++) { var a = i[o]; if (a.input) { if (e++, a.emit(g.GAMEOBJECT_POINTER_MOVE, t, a.input.localX, a.input.localY, s), n.cancelled || !a.input) { r = !0; break } if (this.emit(g.GAMEOBJECT_MOVE, t, a, s), n.cancelled || !a.input) { r = !0; break } if (this.topOnly) break } } return r || this.emit(g.POINTER_MOVE, t, i), e }, processWheelEvent: function(t) { for (var e = 0, i = this._temp, n = this._eventData, s = this._eventContainer, r = n.cancelled = !1, o = t.deltaX, a = t.deltaY, h = t.deltaZ, l = 0; l < i.length; l++) { var u = i[l]; if (u.input) { if (e++, u.emit(g.GAMEOBJECT_POINTER_WHEEL, t, o, a, h, s), n.cancelled || !u.input) { r = !0; break } if (this.emit(g.GAMEOBJECT_WHEEL, t, u, o, a, h, s), n.cancelled || !u.input) { r = !0; break } } } return r || this.emit(g.POINTER_WHEEL, t, i, o, a, h), e }, processOverEvents: function(t) { var e = this._temp , i = 0 , n = e.length , s = []; if (0 < n) { for (var r = this.manager, o = this._eventData, a = this._eventContainer, h = o.cancelled = !1, l = 0; l < n; l++) { var u = e[l]; if (u.input) { if (s.push(u), r.setCursor(u.input), u.emit(g.GAMEOBJECT_POINTER_OVER, t, u.input.localX, u.input.localY, a), i++, o.cancelled || !u.input) { h = !0; break } if (this.emit(g.GAMEOBJECT_OVER, t, u, a), o.cancelled || !u.input) { h = !0; break } } } h || this.emit(g.POINTER_OVER, t, s) } return this._over[t.id] = s, i }, processOutEvents: function(t) { var e = this._over[t.id] , i = 0 , n = e.length; if (0 < n) { var s = this.manager , r = this._eventData , o = this._eventContainer , a = r.cancelled = !1; this.sortGameObjects(e); for (var h = 0; h < n; h++) { for (var l = e[h], h = 0; h < n; h++) if ((l = e[h]).input) { if (s.resetCursor(l.input), l.emit(g.GAMEOBJECT_POINTER_OUT, t, o), i++, r.cancelled || !l.input) { a = !0; break } if (this.emit(g.GAMEOBJECT_OUT, t, l, o), r.cancelled || !l.input) { a = !0; break } } a || this.emit(g.POINTER_OUT, t, e) } this._over[t.id] = [] } return i }, processOverOutEvents: function(t) { for (var e, i = this._temp, n = [], s = [], r = [], o = this._over[t.id], a = this._drag[t.id], h = this.manager, l = 0; l < o.length; l++) e = o[l], -1 === i.indexOf(e) && -1 === a.indexOf(e) ? n.push(e) : r.push(e); for (l = 0; l < i.length; l++) e = i[l], -1 === o.indexOf(e) && s.push(e); var u = n.length , c = 0 , d = this._eventData , f = this._eventContainer , p = d.cancelled = !1; if (0 < u) { for (this.sortGameObjects(n), l = 0; l < u; l++) if ((e = n[l]).input) { if (h.resetCursor(e.input), e.emit(g.GAMEOBJECT_POINTER_OUT, t, f), c++, d.cancelled || !e.input) { p = !0; break } if (this.emit(g.GAMEOBJECT_OUT, t, e, f), d.cancelled || !e.input) { p = !0; break } } p || this.emit(g.POINTER_OUT, t, n) } if (u = s.length, p = d.cancelled = !1, 0 < u) { for (this.sortGameObjects(s), l = 0; l < u; l++) if ((e = s[l]).input) { if (h.setCursor(e.input), e.emit(g.GAMEOBJECT_POINTER_OVER, t, e.input.localX, e.input.localY, f), c++, d.cancelled || !e.input) { p = !0; break } if (this.emit(g.GAMEOBJECT_OVER, t, e, f), d.cancelled || !e.input) { p = !0; break } } p || this.emit(g.POINTER_OVER, t, s) } return o = r.concat(s), this._over[t.id] = this.sortGameObjects(o), c }, processUpEvents: function(t) { for (var e = this._temp, i = this._eventData, n = this._eventContainer, s = i.cancelled = !1, r = 0; r < e.length; r++) { var o = e[r]; if (o.input) { if (o.emit(g.GAMEOBJECT_POINTER_UP, t, o.input.localX, o.input.localY, n), i.cancelled || !o.input) { s = !0; break } if (this.emit(g.GAMEOBJECT_UP, t, o, n), i.cancelled || !o.input) { s = !0; break } } } return !s && this.manager && (t.upElement === this.manager.game.canvas ? this.emit(g.POINTER_UP, t, e) : this.emit(g.POINTER_UP_OUTSIDE, t)), e.length }, queueForInsertion: function(t) { return -1 === this._pendingInsertion.indexOf(t) && -1 === this._list.indexOf(t) && this._pendingInsertion.push(t), this }, queueForRemoval: function(t) { return this._pendingRemoval.push(t), this }, setDraggable: function(t, e) { void 0 === e && (e = !0), Array.isArray(t) || (t = [t]); for (var i = 0; i < t.length; i++) { var n = t[i]; n.input.draggable = e; var s = this._draggable.indexOf(n); e && -1 === s ? this._draggable.push(n) : !e && -1 < s && this._draggable.splice(s, 1) } return this }, makePixelPerfect: function(t) { void 0 === t && (t = 1); var e = this.systems.textures; return s(e, t) }, setHitArea: function(t, e, i) { if (void 0 === e) return this.setHitAreaFromTexture(t); Array.isArray(t) || (t = [t]); var n, s, r = !1, o = !1, a = !1, h = !1, l = !1, u = !0; m(e) ? (e = v(n = e, "hitArea", null), i = v(n, "hitAreaCallback", null), r = v(n, "draggable", !1), o = v(n, "dropZone", !1), a = v(n, "cursor", !1), h = v(n, "useHandCursor", !1), l = v(n, "pixelPerfect", !1), s = v(n, "alphaTolerance", 1), l && (e = {}, i = this.makePixelPerfect(s)), e && i || (this.setHitAreaFromTexture(t), u = !1)) : "function" != typeof e || i || (i = e, e = {}); for (var c = 0; c < t.length; c++) { var d, f = t[c]; l && "Container" === f.type ? console.warn("Cannot pixelPerfect test a Container. Use a custom callback.") : ((d = f.input ? f.input : p(f, e, i)).customHitArea = u, d.dropZone = o, d.cursor = h ? "pointer" : a, f.input = d, r && this.setDraggable(f), this.queueForInsertion(f)) } return this }, setHitAreaCircle: function(t, e, i, n, s) { void 0 === s && (s = a); var r = new o(e,i,n); return this.setHitArea(t, r, s) }, setHitAreaEllipse: function(t, e, i, n, s, r) { void 0 === r && (r = u); var o = new l(e,i,n,s); return this.setHitArea(t, o, r) }, setHitAreaFromTexture: function(t, e) { void 0 === e && (e = T), Array.isArray(t) || (t = [t]); for (var i = 0; i < t.length; i++) { var n = t[i] , s = n.frame , r = 0 , o = 0; n.width ? (r = n.width, o = n.height) : s && (r = s.realWidth, o = s.realHeight), "Container" !== n.type || 0 !== r && 0 !== o ? 0 !== r && 0 !== o && (n.input = p(n, new x(0,0,r,o), e), this.queueForInsertion(n)) : console.warn("Container.setInteractive must specify a Shape or call setSize() first") } return this }, setHitAreaRectangle: function(t, e, i, n, s, r) { void 0 === r && (r = T); var o = new x(e,i,n,s); return this.setHitArea(t, o, r) }, setHitAreaTriangle: function(t, e, i, n, s, r, o, a) { void 0 === a && (a = E); var h = new b(e,i,n,s,r,o); return this.setHitArea(t, h, a) }, enableDebug: function(o, a) { void 0 === a && (a = 65280); var t = o.input; if (!t || !t.hitArea) return this; var e = t.hitArea , i = e.type , h = t.hitAreaDebug , n = this.systems.add , s = this.systems.updateList; h && (s.remove(h), h.destroy(), h = null); var l = 0 , u = 0; switch (i) { case d.CIRCLE: h = n.arc(0, 0, e.radius), l = e.x - e.radius, u = e.y - e.radius; break; case d.ELLIPSE: h = n.ellipse(0, 0, e.width, e.height), l = e.x - e.width / 2, u = e.y - e.height / 2; break; case d.LINE: h = n.line(0, 0, e.x1, e.y1, e.x2, e.y2); break; case d.POLYGON: h = n.polygon(0, 0, e.points); break; case d.RECTANGLE: h = n.rectangle(0, 0, e.width, e.height), l = e.x, u = e.y; break; case d.TRIANGLE: h = n.triangle(0, 0, e.x1, e.y1, e.x2, e.y2, e.x3, e.y3) } return h && (h.isFilled = !1, h.preUpdate = function() { h.setStrokeStyle(1 / o.scale, a), h.setDisplayOrigin(o.displayOriginX, o.displayOriginY); var t, e = o.x, i = o.y, n = o.rotation, s = o.scaleX, r = o.scaleY; o.parentContainer && (e = (t = o.getWorldTransformMatrix()).tx, i = t.ty, n = t.rotation, s = t.scaleX, r = t.scaleY), h.setRotation(n), h.setScale(s, r), h.setPosition(e + l, i + u), h.setScrollFactor(o.scrollFactorX, o.scrollFactorY), h.setDepth(o.depth) } , s.add(h), t.hitAreaDebug = h), this }, removeDebug: function(t) { var e, i = t.input; return i && i.hitAreaDebug && (e = i.hitAreaDebug, this.systems.updateList.remove(e), e.destroy(), i.hitAreaDebug = null), this }, setPollAlways: function() { return this.setPollRate(0) }, setPollOnMove: function() { return this.setPollRate(-1) }, setPollRate: function(t) { return this.pollRate = t, this._pollTimer = 0, this }, setGlobalTopOnly: function(t) { return this.manager.globalTopOnly = t, this }, setTopOnly: function(t) { return this.topOnly = t, this }, sortGameObjects: function(t) { return t.length < 2 ? t : (this.scene.sys.depthSort(), t.sort(this.sortHandlerGO.bind(this))) }, sortHandlerGO: function(t, e) { if (t.parentContainer || e.parentContainer) { if (t.parentContainer === e.parentContainer) return e.parentContainer.getIndex(e) - t.parentContainer.getIndex(t); if (t.parentContainer === e) return -1; if (e.parentContainer === t) return 1; for (var i = t.getIndexList(), n = e.getIndexList(), s = Math.min(i.length, n.length), r = 0; r < s; r++) { var o = i[r] , a = n[r]; if (o !== a) return a - o } return n.length - i.length } return this.displayList.getIndex(e) - this.displayList.getIndex(t) }, stopPropagation: function() { return this.manager._tempSkip = !0, this }, addPointer: function(t) { return this.manager.addPointer(t) }, setDefaultCursor: function(t) { return this.manager.setDefaultCursor(t), this }, transitionIn: function() { this.enabled = this.settings.transitionAllowInput }, transitionComplete: function() { this.settings.transitionAllowInput || (this.enabled = !0) }, transitionOut: function() { this.enabled = this.settings.transitionAllowInput }, shutdown: function() { this.pluginEvents.emit(g.SHUTDOWN), this._temp.length = 0, this._list.length = 0, this._draggable.length = 0, this._pendingRemoval.length = 0, this._pendingInsertion.length = 0; for (var t = this._dragState.length = 0; t < 10; t++) this._drag[t] = [], this._over[t] = []; this.removeAllListeners(); var e = this.systems.events; e.off(w.TRANSITION_START, this.transitionIn, this), e.off(w.TRANSITION_OUT, this.transitionOut, this), e.off(w.TRANSITION_COMPLETE, this.transitionComplete, this), e.off(w.PRE_UPDATE, this.preUpdate, this), this.manager.events.off(g.GAME_OUT, this.onGameOut, this), this.manager.events.off(g.GAME_OVER, this.onGameOver, this), e.off(w.SHUTDOWN, this.shutdown, this) }, destroy: function() { this.shutdown(), this.pluginEvents.emit(g.DESTROY), this.pluginEvents.removeAllListeners(), this.scene.sys.events.off(w.START, this.start, this), this.scene = null, this.cameras = null, this.manager = null, this.events = null, this.mouse = null }, x: { get: function() { return this.manager.activePointer.x } }, y: { get: function() { return this.manager.activePointer.y } }, isOver: { get: function() { return this.manager.isOver } }, mousePointer: { get: function() { return this.manager.mousePointer } }, activePointer: { get: function() { return this.manager.activePointer } }, pointer1: { get: function() { return this.manager.pointers[1] } }, pointer2: { get: function() { return this.manager.pointers[2] } }, pointer3: { get: function() { return this.manager.pointers[3] } }, pointer4: { get: function() { return this.manager.pointers[4] } }, pointer5: { get: function() { return this.manager.pointers[5] } }, pointer6: { get: function() { return this.manager.pointers[6] } }, pointer7: { get: function() { return this.manager.pointers[7] } }, pointer8: { get: function() { return this.manager.pointers[8] } }, pointer9: { get: function() { return this.manager.pointers[9] } }, pointer10: { get: function() { return this.manager.pointers[10] } } }); y.register("InputPlugin", S, "input"), t.exports = S } , function(t, e) { t.exports = function(r, o) { return function(t, e, i, n) { var s = r.getPixelAlpha(e, i, n.texture.key, n.frame.name); return s && o <= s } } } , function(t, e, i) { t.exports = { Events: i(137), KeyboardManager: i(366), KeyboardPlugin: i(1224), Key: i(453), KeyCodes: i(124), KeyCombo: i(454), JustDown: i(1229), JustUp: i(1230), DownDuration: i(1231), UpDuration: i(1232) } } , function(t, e) { t.exports = "keydown" } , function(t, e) { t.exports = "keyup" } , function(t, e) { t.exports = "keycombomatch" } , function(t, e) { t.exports = "down" } , function(t, e) { t.exports = "keydown-" } , function(t, e) { t.exports = "keyup-" } , function(t, e) { t.exports = "up" } , function(t, e, i) { var n = i(0) , s = i(10) , h = i(137) , r = i(20) , o = i(6) , a = i(54) , l = i(136) , u = i(453) , c = i(124) , d = i(454) , f = i(1228) , p = i(93) , g = new n({ Extends: s, initialize: function(t) { s.call(this), this.game = t.systems.game, this.scene = t.scene, this.settings = this.scene.sys.settings, this.sceneInputPlugin = t, this.manager = t.manager.keyboard, this.enabled = !0, this.keys = [], this.combos = [], t.pluginEvents.once(a.BOOT, this.boot, this), t.pluginEvents.on(a.START, this.start, this) }, boot: function() { var t = this.settings.input; this.enabled = o(t, "keyboard", !0); var e = o(t, "keyboard.capture", null); e && this.addCaptures(e), this.sceneInputPlugin.pluginEvents.once(a.DESTROY, this.destroy, this) }, start: function() { this.sceneInputPlugin.manager.useQueue ? this.sceneInputPlugin.pluginEvents.on(a.UPDATE, this.update, this) : this.sceneInputPlugin.manager.events.on(a.MANAGER_PROCESS, this.update, this), this.sceneInputPlugin.pluginEvents.once(a.SHUTDOWN, this.shutdown, this), this.game.events.on(r.BLUR, this.resetKeys, this) }, isActive: function() { return this.enabled && this.scene.sys.isActive() }, addCapture: function(t) { return this.manager.addCapture(t), this }, removeCapture: function(t) { return this.manager.removeCapture(t), this }, getCaptures: function() { return this.manager.captures }, enableGlobalCapture: function() { return this.manager.preventDefault = !0, this }, disableGlobalCapture: function() { return this.manager.preventDefault = !1, this }, clearCaptures: function() { return this.manager.clearCaptures(), this }, createCursorKeys: function() { return this.addKeys({ up: c.UP, down: c.DOWN, left: c.LEFT, right: c.RIGHT, space: c.SPACE, shift: c.SHIFT }) }, addKeys: function(t, e, i) { void 0 === e && (e = !0), void 0 === i && (i = !1); var n = {}; if ("string" == typeof t) { t = t.split(","); for (var s = 0; s < t.length; s++) { var r = t[s].trim(); r && (n[r] = this.addKey(r, e, i)) } } else for (var o in t) n[o] = this.addKey(t[o], e, i); return n }, addKey: function(t, e, i) { void 0 === e && (e = !0), void 0 === i && (i = !1); var n = this.keys; if (t instanceof u) { var s = n.indexOf(t); return -1 < s ? n[s] = t : n[t.keyCode] = t, e && this.addCapture(t.keyCode), t.setEmitOnRepeat(i), t } return "string" == typeof t && (t = c[t.toUpperCase()]), n[t] || (n[t] = new u(this,t), e && this.addCapture(t), n[t].setEmitOnRepeat(i)), n[t] }, removeKey: function(t, e) { void 0 === e && (e = !1); var i, n, s = this.keys; return t instanceof u ? -1 < (n = s.indexOf(t)) && (i = this.keys[n], this.keys[n] = void 0) : "string" == typeof t && (t = c[t.toUpperCase()]), s[t] && (i = s[t], s[t] = void 0), i && (i.plugin = null, e && i.destroy()), this }, removeAllKeys: function(t) { for (var e = this.keys, i = 0; i < e.length; i++) { var n = e[i]; n && (e[i] = void 0, t && n.destroy()) } return this }, createCombo: function(t, e) { return new d(this,t,e) }, checkDown: function(t, e) { if (void 0 === e && (e = 0), this.enabled && t.isDown) { var i = p(this.time - t.timeDown, e); if (i > t._tick) return t._tick = i, !0 } return !1 }, update: function() { var t = this.manager.queue , e = t.length; if (this.isActive() && 0 !== e) for (var i = this.keys, n = 0; n < e; n++) { var s = t[n] , r = s.keyCode , o = i[r] , a = !1; void 0 === s.cancelled && (s.cancelled = 0, s.stopImmediatePropagation = function() { s.cancelled = 1 } , s.stopPropagation = function() { s.cancelled = -1 } ), -1 !== s.cancelled && ("keydown" === s.type ? (o && (a = o.isDown, o.onDown(s)), s.cancelled || o && a || (f[r] && (this.emit(h.KEY_DOWN + f[r], s), this.emit("keydown_" + f[r], s)), s.cancelled || this.emit(h.ANY_KEY_DOWN, s))) : (o && o.onUp(s), s.cancelled || (f[r] && (this.emit(h.KEY_UP + f[r], s), this.emit("keyup_" + f[r], s)), s.cancelled || this.emit(h.ANY_KEY_UP, s))), 1 === s.cancelled && (s.cancelled = 0)) } }, resetKeys: function() { for (var t = this.keys, e = 0; e < t.length; e++) t[e] && t[e].reset(); return this }, shutdown: function() { this.resetKeys(), this.sceneInputPlugin.manager.useQueue ? this.sceneInputPlugin.pluginEvents.off(a.UPDATE, this.update, this) : this.sceneInputPlugin.manager.events.off(a.MANAGER_PROCESS, this.update, this), this.game.events.off(r.BLUR, this.resetKeys), this.removeAllListeners(), this.queue = [] }, destroy: function() { this.shutdown(); for (var t = this.keys, e = 0; e < t.length; e++) t[e] && t[e].destroy(); this.keys = [], this.combos = [], this.queue = [], this.scene = null, this.settings = null, this.sceneInputPlugin = null, this.manager = null }, time: { get: function() { return this.sceneInputPlugin.manager.time } } }); l.register("KeyboardPlugin", g, "keyboard", "keyboard", "inputKeyboard"), t.exports = g } , function(t, e, i) { var r = i(1226); t.exports = function(t, e) { if (e.matched) return !0; var i, n = !1, s = !1; return t.keyCode === e.current && (0 < e.index && 0 < e.maxKeyDelay ? (i = e.timeLastMatched + e.maxKeyDelay, t.timeStamp <= i && (s = !0, n = r(t, e))) : (s = !0, n = r(t, e))), !s && e.resetOnWrongKey && (e.index = 0, e.current = e.keyCodes[0]), n && (e.timeLastMatched = t.timeStamp, e.matched = !0, e.timeMatched = t.timeStamp), n } } , function(t, e) { t.exports = function(t, e) { return e.timeLastMatched = t.timeStamp, e.index++, e.index === e.size || (e.current = e.keyCodes[e.index], !1) } } , function(t, e) { t.exports = function(t) { return t.current = t.keyCodes[0], t.index = 0, t.timeLastMatched = 0, t.matched = !1, t.timeMatched = 0, t } } , function(t, e, i) { var n = i(124) , s = {}; for (var r in n) s[n[r]] = r; t.exports = s } , function(t, e) { t.exports = function(t) { return !!t._justDown && !(t._justDown = !1) } } , function(t, e) { t.exports = function(t) { return !!t._justUp && !(t._justUp = !1) } } , function(t, e) { t.exports = function(t, e) { void 0 === e && (e = 50); var i = t.plugin.game.loop.time - t.timeDown; return t.isDown && i < e } } , function(t, e) { t.exports = function(t, e) { void 0 === e && (e = 50); var i = t.plugin.game.loop.time - t.timeUp; return t.isUp && i < e } } , function(t, e, i) { t.exports = { MouseManager: i(367) } } , function(t, e, i) { t.exports = { TouchManager: i(369) } } , function(t, e, i) { var n = i(17) , s = i(18)(!1, s = { Events: i(82), FileTypes: i(1236), File: i(21), FileTypesManager: i(8), GetURL: i(138), LoaderPlugin: i(1260), MergeXHRSettings: i(215), MultiFile: i(61), XHRLoader: i(455), XHRSettings: i(139) }, n); t.exports = s } , function(t, e, i) { t.exports = { AnimationJSONFile: i(1237), AtlasJSONFile: i(1238), AtlasXMLFile: i(1239), AudioFile: i(456), AudioSpriteFile: i(1240), BinaryFile: i(1241), BitmapFontFile: i(1242), CSSFile: i(1243), GLSLFile: i(1244), HTML5AudioFile: i(457), HTMLFile: i(1245), HTMLTextureFile: i(1246), ImageFile: i(72), JSONFile: i(60), MultiAtlasFile: i(1247), MultiScriptFile: i(1248), PackFile: i(1249), PluginFile: i(1250), SceneFile: i(1251), ScenePluginFile: i(1252), ScriptFile: i(458), SpriteSheetFile: i(1253), SVGFile: i(1254), TextFile: i(459), TilemapCSVFile: i(1255), TilemapImpactFile: i(1256), TilemapJSONFile: i(1257), UnityAtlasFile: i(1258), VideoFile: i(1259), XMLFile: i(216) } } , function(t, e, i) { var n = i(0) , s = i(8) , r = i(60) , o = i(82) , a = new n({ Extends: r, initialize: function(t, e, i, n, s) { r.call(this, t, e, i, n, s), this.type = "animationJSON" }, onProcess: function() { this.loader.once(o.POST_PROCESS, this.onLoadComplete, this), r.prototype.onProcess.call(this) }, onLoadComplete: function() { this.loader.systems.anims.fromJSON(this.data) } }); s.register("animation", function(t, e, i, n) { if (Array.isArray(t)) for (var s = 0; s < t.length; s++) this.addFile(new a(this,t[s])); else this.addFile(new a(this,t,e,n,i)); return this }), t.exports = a } , function(t, e, i) { var n = i(0) , s = i(8) , l = i(2) , u = i(72) , c = i(7) , d = i(60) , f = i(61) , a = new n({ Extends: f, initialize: function(t, e, i, n, s, r) { var o, a, h = c(e) ? (e = l(a = e, "key"), o = new u(t,{ key: e, url: l(a, "textureURL"), extension: l(a, "textureExtension", "png"), normalMap: l(a, "normalMap"), xhrSettings: l(a, "textureXhrSettings") }), new d(t,{ key: e, url: l(a, "atlasURL"), extension: l(a, "atlasExtension", "json"), xhrSettings: l(a, "atlasXhrSettings") })) : (o = new u(t,e,i,s), new d(t,e,n,r)); o.linkFile ? f.call(this, t, "atlasjson", e, [o, h, o.linkFile]) : f.call(this, t, "atlasjson", e, [o, h]) }, addToCache: function() { var t, e, i; this.isReadyToProcess() && (t = this.files[0], e = this.files[1], i = this.files[2] ? this.files[2].data : null, this.loader.textureManager.addAtlas(t.key, t.data, e.data, i), e.addToCache(), this.complete = !0) } }); s.register("atlas", function(t, e, i, n, s) { var r; if (Array.isArray(t)) for (var o = 0; o < t.length; o++) r = new a(this,t[o]), this.addFile(r.files); else r = new a(this,t,e,i,n,s), this.addFile(r.files); return this }), t.exports = a } , function(t, e, i) { var n = i(0) , s = i(8) , l = i(2) , u = i(72) , c = i(7) , d = i(61) , f = i(216) , a = new n({ Extends: d, initialize: function(t, e, i, n, s, r) { var o, a, h = c(e) ? (e = l(a = e, "key"), o = new u(t,{ key: e, url: l(a, "textureURL"), extension: l(a, "textureExtension", "png"), normalMap: l(a, "normalMap"), xhrSettings: l(a, "textureXhrSettings") }), new f(t,{ key: e, url: l(a, "atlasURL"), extension: l(a, "atlasExtension", "xml"), xhrSettings: l(a, "atlasXhrSettings") })) : (o = new u(t,e,i,s), new f(t,e,n,r)); o.linkFile ? d.call(this, t, "atlasxml", e, [o, h, o.linkFile]) : d.call(this, t, "atlasxml", e, [o, h]) }, addToCache: function() { var t, e, i; this.isReadyToProcess() && (t = this.files[0], e = this.files[1], i = this.files[2] ? this.files[2].data : null, this.loader.textureManager.addAtlasXML(t.key, t.data, e.data, i), e.addToCache(), this.complete = !0) } }); s.register("atlasXML", function(t, e, i, n, s) { var r; if (Array.isArray(t)) for (var o = 0; o < t.length; o++) r = new a(this,t[o]), this.addFile(r.files); else r = new a(this,t,e,i,n,s), this.addFile(r.files); return this }), t.exports = a } , function(t, e, i) { var u = i(456) , n = i(0) , s = i(8) , c = i(2) , d = i(7) , f = i(60) , p = i(61) , g = new n({ Extends: p, initialize: function(t, e, i, n, s, r, o) { var a, h, l; d(e) && (e = c(a = e, "key"), i = c(a, "jsonURL"), n = c(a, "audioURL"), s = c(a, "audioConfig"), r = c(a, "audioXhrSettings"), o = c(a, "jsonXhrSettings")), n ? (l = u.create(t, e, n, s, r)) && (h = new f(t,e,i,o), p.call(this, t, "audiosprite", e, [l, h]), this.config.resourceLoad = !1) : (h = new f(t,e,i,o), p.call(this, t, "audiosprite", e, [h]), this.config.resourceLoad = !0, this.config.audioConfig = s, this.config.audioXhrSettings = r) }, onFileComplete: function(t) { var e, i, n, s; -1 !== this.files.indexOf(t) && (this.pending--, this.config.resourceLoad && "json" === t.type && t.data.hasOwnProperty("resources") && (e = t.data.resources, i = c(this.config, "audioConfig"), n = c(this.config, "audioXhrSettings"), (s = u.create(this.loader, t.key, e, i, n)) && (this.addToMultiFile(s), this.loader.addFile(s)))) }, addToCache: function() { var t, e; this.isReadyToProcess() && (t = this.files[0], e = this.files[1], t.addToCache(), e.addToCache(), this.complete = !0) } }); s.register("audioSprite", function(t, e, i, n, s, r) { var o, a = this.systems.game, h = a.config.audio, l = a.device.audio; if (h && h.noAudio || !l.webAudio && !l.audioData) return this; if (Array.isArray(t)) for (var u = 0; u < t.length; u++) (o = new g(this,t[u])).files && this.addFile(o.files); else (o = new g(this,t,e,i,n,s,r)).files && this.addFile(o.files); return this }) } , function(t, e, i) { var n = i(0) , s = i(17) , h = i(21) , r = i(8) , l = i(2) , u = i(7) , o = new n({ Extends: h, initialize: function(t, e, i, n, s) { var r, o = "bin"; u(e) && (e = l(r = e, "key"), i = l(r, "url"), n = l(r, "xhrSettings"), o = l(r, "extension", o), s = l(r, "dataType", s)); var a = { type: "binary", cache: t.cacheManager.binary, extension: o, responseType: "arraybuffer", key: e, url: i, xhrSettings: n, config: { dataType: s } }; h.call(this, t, a) }, onProcess: function() { this.state = s.FILE_PROCESSING; var t = this.config.dataType; this.data = t ? new t(this.xhrLoader.response) : this.xhrLoader.response, this.onProcessComplete() } }); r.register("binary", function(t, e, i, n) { if (Array.isArray(t)) for (var s = 0; s < t.length; s++) this.addFile(new o(this,t[s])); else this.addFile(new o(this,t,e,n,i)); return this }), t.exports = o } , function(t, e, i) { var n = i(0) , s = i(8) , l = i(2) , u = i(72) , c = i(7) , d = i(61) , r = i(187) , f = i(216) , a = new n({ Extends: d, initialize: function(t, e, i, n, s, r) { var o, a, h = c(e) ? (e = l(a = e, "key"), o = new u(t,{ key: e, url: l(a, "textureURL"), extension: l(a, "textureExtension", "png"), normalMap: l(a, "normalMap"), xhrSettings: l(a, "textureXhrSettings") }), new f(t,{ key: e, url: l(a, "fontDataURL"), extension: l(a, "fontDataExtension", "xml"), xhrSettings: l(a, "fontDataXhrSettings") })) : (o = new u(t,e,i,s), new f(t,e,n,r)); o.linkFile ? d.call(this, t, "bitmapfont", e, [o, h, o.linkFile]) : d.call(this, t, "bitmapfont", e, [o, h]) }, addToCache: function() { var t, e; this.isReadyToProcess() && (t = this.files[0], e = this.files[1], t.addToCache(), e.addToCache(), this.loader.cacheManager.bitmapFont.add(t.key, { data: r(e.data), texture: t.key, frame: null }), this.complete = !0) } }); s.register("bitmapFont", function(t, e, i, n, s) { var r; if (Array.isArray(t)) for (var o = 0; o < t.length; o++) r = new a(this,t[o]), this.addFile(r.files); else r = new a(this,t,e,i,n,s), this.addFile(r.files); return this }), t.exports = a } , function(t, e, i) { var n = i(0) , s = i(17) , a = i(21) , r = i(8) , h = i(2) , l = i(7) , o = new n({ Extends: a, initialize: function(t, e, i, n) { var s, r = "css"; l(e) && (e = h(s = e, "key"), i = h(s, "url"), n = h(s, "xhrSettings"), r = h(s, "extension", r)); var o = { type: "script", cache: !1, extension: r, responseType: "text", key: e, url: i, xhrSettings: n }; a.call(this, t, o) }, onProcess: function() { this.state = s.FILE_PROCESSING, this.data = document.createElement("style"), this.data.defer = !1, this.data.innerHTML = this.xhrLoader.responseText, document.head.appendChild(this.data), this.onProcessComplete() } }); r.register("css", function(t, e, i) { if (Array.isArray(t)) for (var n = 0; n < t.length; n++) this.addFile(new o(this,t[n])); else this.addFile(new o(this,t,e,i)); return this }), t.exports = o } , function(t, e, i) { var n = i(0) , s = i(17) , h = i(21) , r = i(8) , l = i(2) , u = i(7) , a = i(353) , o = new n({ Extends: h, initialize: function(t, e, i, n, s) { var r, o = "glsl"; u(e) ? (e = l(r = e, "key"), i = l(r, "url"), n = l(r, "shaderType", "fragment"), s = l(r, "xhrSettings"), o = l(r, "extension", o)) : void 0 === n && (n = "fragment"); var a = { type: "glsl", cache: t.cacheManager.shader, extension: o, responseType: "text", key: e, url: i, config: { shaderType: n }, xhrSettings: s }; h.call(this, t, a) }, onProcess: function() { this.state = s.FILE_PROCESSING, this.data = this.xhrLoader.responseText, this.onProcessComplete() }, addToCache: function() { var t = this.data.split("\n") , e = this.extractBlock(t, 0); if (e) for (; e; ) { var i, n = this.getShaderName(e.header), s = this.getShaderType(e.header), r = this.getShaderUniforms(e.header), o = e.shader; this.cache.has(n) ? (i = this.cache.get(n), "fragment" === s ? i.fragmentSrc = o : i.vertexSrc = o, i.uniforms || (i.uniforms = r)) : "fragment" === s ? this.cache.add(n, new a(n,o,"",r)) : this.cache.add(n, new a(n,"",o,r)), e = this.extractBlock(t, e.offset) } else "fragment" === this.config.shaderType ? this.cache.add(this.key, new a(this.key,this.data)) : this.cache.add(this.key, new a(this.key,"",this.data)); this.pendingDestroy() }, getShaderName: function(t) { for (var e = 0; e < t.length; e++) { var i = t[e].trim(); if ("name:" === i.substring(0, 5)) return i.substring(5).trim() } return this.key }, getShaderType: function(t) { for (var e = 0; e < t.length; e++) { var i = t[e].trim(); if ("type:" === i.substring(0, 5)) return i.substring(5).trim() } return this.config.shaderType }, getShaderUniforms: function(t) { for (var e = {}, i = 0; i < t.length; i++) { var n = t[i].trim(); if ("uniform." === n.substring(0, 8)) { var s = n.indexOf(":"); if (s) { var r = n.substring(8, s); try { e[r] = JSON.parse(n.substring(s + 1)) } catch (t) { console.warn("Invalid uniform JSON: " + r) } } } } return e }, extractBlock: function(t, e) { for (var i = -1, n = -1, s = -1, r = !1, o = !1, a = [], h = [], l = e; l < t.length; l++) { var u = t[l].trim(); if ("---" === u) if (-1 === i) i = l, r = !0; else { if (!r) { o = !1; break } n = l, o = !(r = !1) } else r ? a.push(u) : o && (h.push(u), s = l) } return r || -1 === n ? null : { header: a, shader: h.join("\n"), offset: s } } }); r.register("glsl", function(t, e, i, n) { if (Array.isArray(t)) for (var s = 0; s < t.length; s++) this.addFile(new o(this,t[s])); else this.addFile(new o(this,t,e,i,n)); return this }), t.exports = o } , function(t, e, i) { var n = i(0) , s = i(17) , a = i(21) , r = i(8) , h = i(2) , l = i(7) , o = new n({ Extends: a, initialize: function(t, e, i, n) { var s, r = "html"; l(e) && (e = h(s = e, "key"), i = h(s, "url"), n = h(s, "xhrSettings"), r = h(s, "extension", r)); var o = { type: "text", cache: t.cacheManager.html, extension: r, responseType: "text", key: e, url: i, xhrSettings: n }; a.call(this, t, o) }, onProcess: function() { this.state = s.FILE_PROCESSING, this.data = this.xhrLoader.responseText, this.onProcessComplete() } }); r.register("html", function(t, e, i) { if (Array.isArray(t)) for (var n = 0; n < t.length; n++) this.addFile(new o(this,t[n])); else this.addFile(new o(this,t,e,i)); return this }), t.exports = o } , function(t, e, i) { var n = i(0) , o = i(17) , l = i(21) , s = i(8) , u = i(2) , c = i(7) , a = new n({ Extends: l, initialize: function(t, e, i, n, s, r) { void 0 === n && (n = 512), void 0 === s && (s = 512); var o, a = "html"; c(e) && (e = u(o = e, "key"), i = u(o, "url"), r = u(o, "xhrSettings"), a = u(o, "extension", a), n = u(o, "width", n), s = u(o, "height", s)); var h = { type: "html", cache: t.textureManager, extension: a, responseType: "text", key: e, url: i, xhrSettings: r, config: { width: n, height: s } }; l.call(this, t, h) }, onProcess: function() { this.state = o.FILE_PROCESSING; var t = this.config.width , e = this.config.height , i = []; i.push(''), i.push(''), i.push(''), i.push(this.xhrLoader.responseText), i.push(""), i.push(""), i.push(""); var n = [i.join("\n")] , s = this; try { var r = new window.Blob(n,{ type: "image/svg+xml;charset=utf-8" }) } catch (t) { return s.state = o.FILE_ERRORED, void s.onProcessComplete() } this.data = new Image, this.data.crossOrigin = this.crossOrigin, this.data.onload = function() { l.revokeObjectURL(s.data), s.onProcessComplete() } , this.data.onerror = function() { l.revokeObjectURL(s.data), s.onProcessError() } , l.createObjectURL(this.data, r, "image/svg+xml") }, addToCache: function() { var t = this.cache.addImage(this.key, this.data); this.pendingDestroy(t) } }); s.register("htmlTexture", function(t, e, i, n, s) { if (Array.isArray(t)) for (var r = 0; r < t.length; r++) this.addFile(new a(this,t[r])); else this.addFile(new a(this,t,e,i,n,s)); return this }), t.exports = a } , function(t, e, i) { var n = i(0) , s = i(8) , v = i(2) , m = i(72) , l = i(7) , u = i(60) , c = i(61) , a = new n({ Extends: c, initialize: function(t, e, i, n, s, r, o) { var a; l(e) && (e = v(a = e, "key"), i = v(a, "url", !1) ? v(a, "url") : v(a, "atlasURL"), r = v(a, "xhrSettings"), n = v(a, "path"), s = v(a, "baseURL"), o = v(a, "textureXhrSettings")); var h = new u(t,e,i,r); c.call(this, t, "multiatlas", e, [h]), this.config.path = n, this.config.baseURL = s, this.config.textureXhrSettings = o }, onFileComplete: function(t) { if (-1 !== this.files.indexOf(t) && (this.pending--, "json" === t.type && t.data.hasOwnProperty("textures"))) { var e = t.data.textures , i = this.config , n = this.loader , s = n.baseURL , r = n.path , o = n.prefix , a = v(i, "baseURL", this.baseURL) , h = v(i, "path", this.path) , l = v(i, "prefix", this.prefix) , u = v(i, "textureXhrSettings"); n.setBaseURL(a), n.setPath(h), n.setPrefix(l); for (var c = 0; c < e.length; c++) { var d, f = e[c].image, p = "MA" + this.multiKeyIndex + "_" + f, g = new m(n,p,f,u); this.addToMultiFile(g), n.addFile(g), e[c].normalMap && ((d = new m(n,p,e[c].normalMap,u)).type = "normalMap", g.setLink(d), this.addToMultiFile(d), n.addFile(d)) } n.setBaseURL(s), n.setPath(r), n.setPrefix(o) } }, addToCache: function() { if (this.isReadyToProcess()) { for (var t = this.files[0], e = [], i = [], n = [], s = 1; s < this.files.length; s++) { var r = this.files[s]; if ("normalMap" !== r.type) for (var o = r.key.indexOf("_"), a = r.key.substr(o + 1), h = r.data, l = 0; l < t.data.textures.length; l++) { var u = t.data.textures[l]; if (u.image === a) { i.push(h), e.push(u), r.linkFile && n.push(r.linkFile.data); break } } } for (0 === n.length && (n = void 0), this.loader.textureManager.addAtlasJSONArray(this.key, i, e, n), this.complete = !0, s = 0; s < this.files.length; s++) this.files[s].pendingDestroy() } } }); s.register("multiatlas", function(t, e, i, n, s) { var r; if (Array.isArray(t)) for (var o = 0; o < t.length; o++) r = new a(this,t[o]), this.addFile(r.files); else r = new a(this,t,e,i,n,s), this.addFile(r.files); return this }), t.exports = a } , function(t, e, i) { var n = i(0) , s = i(8) , l = i(2) , u = i(7) , c = i(61) , d = i(458) , r = new n({ Extends: c, initialize: function(t, e, i, n) { var s, r = "js", o = []; u(e) && (e = l(s = e, "key"), i = l(s, "url"), n = l(s, "xhrSettings"), r = l(s, "extension", r)), Array.isArray(i) || (i = [i]); for (var a = 0; a < i.length; a++) { var h = new d(t,{ key: e + "_" + a.toString(), url: i[a], extension: r, xhrSettings: n }); h.onProcess = function() { this.onProcessComplete() } , o.push(h) } c.call(this, t, "scripts", e, o) }, addToCache: function() { if (this.isReadyToProcess()) { for (var t = 0; t < this.files.length; t++) { var e = this.files[t]; e.data = document.createElement("script"), e.data.language = "javascript", e.data.type = "text/javascript", e.data.defer = !1, e.data.text = e.xhrLoader.responseText, document.head.appendChild(e.data) } this.complete = !0 } } }); s.register("scripts", function(t, e, i) { var n; if (Array.isArray(t)) for (var s = 0; s < t.length; s++) n = new r(this,t[s]), this.addFile(n.files); else n = new r(this,t,e,i), this.addFile(n.files); return this }), t.exports = r } , function(t, e, i) { var n = i(0) , s = i(17) , r = i(8) , o = i(60) , a = new n({ Extends: o, initialize: function(t, e, i, n, s) { o.call(this, t, e, i, n, s), this.type = "packfile" }, onProcess: function() { this.state !== s.FILE_POPULATED && (this.state = s.FILE_PROCESSING, this.data = JSON.parse(this.xhrLoader.responseText)), this.loader.addPack(this.data, this.config), this.onProcessComplete() } }); r.register("pack", function(t, e, i, n) { if (Array.isArray(t)) for (var s = 0; s < t.length; s++) this.addFile(new a(this,t[s])); else this.addFile(new a(this,t,e,n,i)); return this }), t.exports = a } , function(t, e, i) { var n = i(0) , l = i(17) , u = i(21) , s = i(8) , c = i(2) , d = i(7) , o = new n({ Extends: u, initialize: function(t, e, i, n, s, r) { var o, a = "js"; d(e) && (e = c(o = e, "key"), i = c(o, "url"), r = c(o, "xhrSettings"), a = c(o, "extension", a), n = c(o, "start"), s = c(o, "mapping")); var h = { type: "plugin", cache: !1, extension: a, responseType: "text", key: e, url: i, xhrSettings: r, config: { start: n, mapping: s } }; u.call(this, t, h), "function" == typeof i && (this.data = i, this.state = l.FILE_POPULATED) }, onProcess: function() { var t, e = this.loader.systems.plugins, i = this.config, n = c(i, "start", !1), s = c(i, "mapping", null); this.state === l.FILE_POPULATED ? e.install(this.key, this.data, n, s) : (this.state = l.FILE_PROCESSING, this.data = document.createElement("script"), this.data.language = "javascript", this.data.type = "text/javascript", this.data.defer = !1, this.data.text = this.xhrLoader.responseText, document.head.appendChild(this.data), t = e.install(this.key, window[this.key], n, s), (n || s) && (this.loader.systems[s] = t, this.loader.scene[s] = t)), this.onProcessComplete() } }); s.register("plugin", function(t, e, i, n, s) { if (Array.isArray(t)) for (var r = 0; r < t.length; r++) this.addFile(new o(this,t[r])); else this.addFile(new o(this,t,e,i,n,s)); return this }), t.exports = o } , function(t, e, i) { var n = i(0) , s = i(17) , a = i(21) , r = i(8) , h = i(2) , l = i(7) , o = new n({ Extends: a, initialize: function(t, e, i, n) { var s, r = "js"; l(e) && (e = h(s = e, "key"), i = h(s, "url"), n = h(s, "xhrSettings"), r = h(s, "extension", r)); var o = { type: "text", cache: t.cacheManager.text, extension: r, responseType: "text", key: e, url: i, xhrSettings: n }; a.call(this, t, o) }, onProcess: function() { this.state = s.FILE_PROCESSING, this.data = this.xhrLoader.responseText, this.onProcessComplete() }, addToCache: function() { var t = this.data.concat("(function(){\nreturn new " + this.key + "();\n}).call(this);") , e = eval; this.loader.sceneManager.add(this.key, e(t)), this.complete = !0 } }); r.register("sceneFile", function(t, e, i) { if (Array.isArray(t)) for (var n = 0; n < t.length; n++) this.addFile(new o(this,t[n])); else this.addFile(new o(this,t,e,i)); return this }), t.exports = o } , function(t, e, i) { var n = i(0) , l = i(17) , u = i(21) , s = i(8) , c = i(2) , d = i(7) , o = new n({ Extends: u, initialize: function(t, e, i, n, s, r) { var o, a = "js"; d(e) && (e = c(o = e, "key"), i = c(o, "url"), r = c(o, "xhrSettings"), a = c(o, "extension", a), n = c(o, "systemKey"), s = c(o, "sceneKey")); var h = { type: "scenePlugin", cache: !1, extension: a, responseType: "text", key: e, url: i, xhrSettings: r, config: { systemKey: n, sceneKey: s } }; u.call(this, t, h), "function" == typeof i && (this.data = i, this.state = l.FILE_POPULATED) }, onProcess: function() { var t = this.loader.systems.plugins , e = this.config , i = this.key , n = c(e, "systemKey", i) , s = c(e, "sceneKey", i); this.state === l.FILE_POPULATED ? t.installScenePlugin(n, this.data, s, this.loader.scene, !0) : (this.state = l.FILE_PROCESSING, this.data = document.createElement("script"), this.data.language = "javascript", this.data.type = "text/javascript", this.data.defer = !1, this.data.text = this.xhrLoader.responseText, document.head.appendChild(this.data), t.installScenePlugin(n, window[this.key], s, this.loader.scene, !0)), this.onProcessComplete() } }); s.register("scenePlugin", function(t, e, i, n, s) { if (Array.isArray(t)) for (var r = 0; r < t.length; r++) this.addFile(new o(this,t[r])); else this.addFile(new o(this,t,e,i,n,s)); return this }), t.exports = o } , function(t, e, i) { var n = i(0) , s = i(8) , r = i(72) , o = new n({ Extends: r, initialize: function(t, e, i, n, s) { r.call(this, t, e, i, s, n), this.type = "spritesheet" }, addToCache: function() { var t = this.cache.addSpriteSheet(this.key, this.data, this.config); this.pendingDestroy(t) } }); s.register("spritesheet", function(t, e, i, n) { if (Array.isArray(t)) for (var s = 0; s < t.length; s++) this.addFile(new o(this,t[s])); else this.addFile(new o(this,t,e,i,n)); return this }), t.exports = o } , function(t, e, i) { var n = i(0) , f = i(17) , p = i(21) , s = i(8) , h = i(2) , l = i(7) , r = new n({ Extends: p, initialize: function(t, e, i, n, s) { var r, o = "svg"; l(e) && (e = h(r = e, "key"), i = h(r, "url"), n = h(r, "svgConfig", {}), s = h(r, "xhrSettings"), o = h(r, "extension", o)); var a = { type: "svg", cache: t.textureManager, extension: o, responseType: "text", key: e, url: i, xhrSettings: s, config: { width: h(n, "width"), height: h(n, "height"), scale: h(n, "scale") } }; p.call(this, t, a) }, onProcess: function() { this.state = f.FILE_PROCESSING; var t = this.xhrLoader.responseText , e = [t] , i = this.config.width , n = this.config.height , s = this.config.scale; t: if (i && n || s) { var r, o = (new DOMParser).parseFromString(t, "text/xml").getElementsByTagName("svg")[0], a = o.hasAttribute("viewBox"), h = parseFloat(o.getAttribute("width")), l = parseFloat(o.getAttribute("height")); if (!a && h && l ? o.setAttribute("viewBox", "0 0 " + h + " " + l) : !a || h || l || (h = (r = o.getAttribute("viewBox").split(/\s+|,/))[2], l = r[3]), s) { if (!h || !l) break t; i = h * s, n = l * s } o.setAttribute("width", i.toString() + "px"), o.setAttribute("height", n.toString() + "px"), e = [(new XMLSerializer).serializeToString(o)] } try { var u = new window.Blob(e,{ type: "image/svg+xml;charset=utf-8" }) } catch (t) { return void this.onProcessError() } this.data = new Image, this.data.crossOrigin = this.crossOrigin; var c = this , d = !1; this.data.onload = function() { d || p.revokeObjectURL(c.data), c.onProcessComplete() } , this.data.onerror = function() { d ? c.onProcessError() : (d = !0, p.revokeObjectURL(c.data), c.data.src = "data:image/svg+xml," + encodeURIComponent(e.join(""))) } , p.createObjectURL(this.data, u, "image/svg+xml") }, addToCache: function() { var t = this.cache.addImage(this.key, this.data); this.pendingDestroy(t) } }); s.register("svg", function(t, e, i, n) { if (Array.isArray(t)) for (var s = 0; s < t.length; s++) this.addFile(new r(this,t[s])); else this.addFile(new r(this,t,e,i,n)); return this }), t.exports = r } , function(t, e, i) { var n = i(0) , s = i(17) , a = i(21) , r = i(8) , h = i(2) , l = i(7) , u = i(32) , o = new n({ Extends: a, initialize: function(t, e, i, n) { var s, r = "csv"; l(e) && (e = h(s = e, "key"), i = h(s, "url"), n = h(s, "xhrSettings"), r = h(s, "extension", r)); var o = { type: "tilemapCSV", cache: t.cacheManager.tilemap, extension: r, responseType: "text", key: e, url: i, xhrSettings: n }; a.call(this, t, o), this.tilemapFormat = u.CSV }, onProcess: function() { this.state = s.FILE_PROCESSING, this.data = this.xhrLoader.responseText, this.onProcessComplete() }, addToCache: function() { var t = { format: this.tilemapFormat, data: this.data }; this.cache.add(this.key, t), this.pendingDestroy(t) } }); r.register("tilemapCSV", function(t, e, i) { if (Array.isArray(t)) for (var n = 0; n < t.length; n++) this.addFile(new o(this,t[n])); else this.addFile(new o(this,t,e,i)); return this }), t.exports = o } , function(t, e, i) { var n = i(0) , s = i(8) , r = i(60) , o = i(32) , a = new n({ Extends: r, initialize: function(t, e, i, n) { r.call(this, t, e, i, n), this.type = "tilemapJSON", this.cache = t.cacheManager.tilemap }, addToCache: function() { var t = { format: o.WELTMEISTER, data: this.data }; this.cache.add(this.key, t), this.pendingDestroy(t) } }); s.register("tilemapImpact", function(t, e, i) { if (Array.isArray(t)) for (var n = 0; n < t.length; n++) this.addFile(new a(this,t[n])); else this.addFile(new a(this,t,e,i)); return this }), t.exports = a } , function(t, e, i) { var n = i(0) , s = i(8) , r = i(60) , o = i(32) , a = new n({ Extends: r, initialize: function(t, e, i, n) { r.call(this, t, e, i, n), this.type = "tilemapJSON", this.cache = t.cacheManager.tilemap }, addToCache: function() { var t = { format: o.TILED_JSON, data: this.data }; this.cache.add(this.key, t), this.pendingDestroy(t) } }); s.register("tilemapTiledJSON", function(t, e, i) { if (Array.isArray(t)) for (var n = 0; n < t.length; n++) this.addFile(new a(this,t[n])); else this.addFile(new a(this,t,e,i)); return this }), t.exports = a } , function(t, e, i) { var n = i(0) , s = i(8) , l = i(2) , u = i(72) , c = i(7) , d = i(61) , f = i(459) , a = new n({ Extends: d, initialize: function(t, e, i, n, s, r) { var o, a, h = c(e) ? (e = l(a = e, "key"), o = new u(t,{ key: e, url: l(a, "textureURL"), extension: l(a, "textureExtension", "png"), normalMap: l(a, "normalMap"), xhrSettings: l(a, "textureXhrSettings") }), new f(t,{ key: e, url: l(a, "atlasURL"), extension: l(a, "atlasExtension", "txt"), xhrSettings: l(a, "atlasXhrSettings") })) : (o = new u(t,e,i,s), new f(t,e,n,r)); o.linkFile ? d.call(this, t, "unityatlas", e, [o, h, o.linkFile]) : d.call(this, t, "unityatlas", e, [o, h]) }, addToCache: function() { var t, e, i; this.isReadyToProcess() && (t = this.files[0], e = this.files[1], i = this.files[2] ? this.files[2].data : null, this.loader.textureManager.addUnityAtlas(t.key, t.data, e.data, i), e.addToCache(), this.complete = !0) } }); s.register("unityAtlas", function(t, e, i, n, s) { var r; if (Array.isArray(t)) for (var o = 0; o < t.length; o++) r = new a(this,t[o]), this.addFile(r.files); else r = new a(this,t,e,i,n,s), this.addFile(r.files); return this }), t.exports = a } , function(t, e, i) { var n = i(0) , s = i(17) , h = i(21) , r = i(8) , o = i(138) , l = i(2) , u = i(7) , c = new n({ Extends: h, initialize: function(t, e, i, n, s, r, o) { void 0 === n && (n = "loadeddata"), void 0 === s && (s = !1), void 0 === r && (r = !1), "loadeddata" !== n && "canplay" !== n && "canplaythrough" !== n && (n = "loadeddata"); var a = { type: "video", cache: t.cacheManager.video, extension: i.type, responseType: "blob", key: e, url: i.url, xhrSettings: o, config: { loadEvent: n, asBlob: s, noAudio: r } }; this.onLoadCallback = this.onVideoLoadHandler.bind(this), this.onErrorCallback = this.onVideoErrorHandler.bind(this), h.call(this, t, a) }, onProcess: function() { var t, e; this.state = s.FILE_PROCESSING, this.config.asBlob ? (t = this.createVideoElement(), this.data = t, (e = this).data.onloadeddata = function() { e.onProcessComplete() } , this.data.onerror = function() { h.revokeObjectURL(e.data), e.onProcessError() } , h.createObjectURL(t, this.xhrLoader.response, ""), t.load()) : this.onProcessComplete() }, createVideoElement: function() { var t = document.createElement("video"); return t.controls = !1, t.crossOrigin = this.loader.crossOrigin, this.config.noAudio && (t.muted = !0, t.defaultMuted = !0, t.setAttribute("autoplay", "autoplay")), t.setAttribute("playsinline", "playsinline"), t.setAttribute("preload", "auto"), t }, onVideoLoadHandler: function(t) { var e = t.target; e.removeEventListener(this.config.loadEvent, this.onLoadCallback, !0), e.removeEventListener("error", this.onErrorCallback, !0), this.data = e, this.resetXHR(), this.loader.nextFile(this, !0) }, onVideoErrorHandler: function(t) { var e = t.target; e && (e.removeEventListener(this.config.loadEvent, this.onLoadCallback, !0), e.removeEventListener("error", this.onErrorCallback, !0)), this.resetXHR(), this.loader.nextFile(this, !1) }, load: function() { var t, e = this.config.loadEvent; this.config.asBlob ? h.prototype.load.call(this) : (this.percentComplete = 0, (t = this.createVideoElement()).addEventListener(e, this.onLoadCallback, !0), t.addEventListener("error", this.onErrorCallback, !0), t.src = o(this, this.loader.baseURL), t.load()) } }); c.create = function(t, e, i, n, s, r, o) { var a = t.systems.game; u(e) && (i = l(e, "url", []), n = l(e, "loadEvent", "loadeddata"), s = l(e, "asBlob", !1), r = l(e, "noAudio", !1), o = l(e, "xhrSettings")); var h = c.getVideoURL(a, i); if (h) return new c(t,e,h,n,s,r,o) } , c.getVideoURL = function(t, e) { Array.isArray(e) || (e = [e]); for (var i = 0; i < e.length; i++) { var n, s = l(e[i], "url", e[i]); if (0 === s.indexOf("blob:")) return { url: s, type: "" }; if (n = 0 === s.indexOf("data:") ? s.split(",")[0].match(/\/(.*?);/) : s.match(/\.([a-zA-Z0-9]+)($|\?)/), n = l(e[i], "type", n ? n[1] : "").toLowerCase(), t.device.video[n]) return { url: s, type: n } } return null } , r.register("video", function(t, e, i, n, s, r) { var o; if (Array.isArray(t)) for (var a = 0; a < t.length; a++) (o = c.create(this, t[a])) && this.addFile(o); else (o = c.create(this, t, e, i, n, s, r)) && this.addFile(o); return this }), t.exports = c } , function(t, e, i) { var n = i(0) , s = i(17) , r = i(133) , o = i(10) , a = i(82) , h = i(8) , v = i(2) , l = i(23) , u = i(22) , c = i(139) , d = new n({ Extends: o, initialize: function(t) { o.call(this); var e = t.sys.game.config , i = t.sys.settings.loader; this.scene = t, this.systems = t.sys, this.cacheManager = t.sys.cache, this.textureManager = t.sys.textures, this.sceneManager = t.sys.game.scene, h.install(this), this.prefix = "", this.path = "", this.baseURL = "", this.setBaseURL(v(i, "baseURL", e.loaderBaseURL)), this.setPath(v(i, "path", e.loaderPath)), this.setPrefix(v(i, "prefix", e.loaderPrefix)), this.maxParallelDownloads = v(i, "maxParallelDownloads", e.loaderMaxParallelDownloads), this.xhr = c(v(i, "responseType", e.loaderResponseType), v(i, "async", e.loaderAsync), v(i, "user", e.loaderUser), v(i, "password", e.loaderPassword), v(i, "timeout", e.loaderTimeout), v(i, "withCredentials", e.loaderWithCredentials)), this.crossOrigin = v(i, "crossOrigin", e.loaderCrossOrigin), this.totalToLoad = 0, this.progress = 0, this.list = new r, this.inflight = new r, this.queue = new r, this._deleteQueue = new r, this.totalFailed = 0, this.totalComplete = 0, this.state = s.LOADER_IDLE, this.multiKeyIndex = 0, t.sys.events.once(u.BOOT, this.boot, this), t.sys.events.on(u.START, this.pluginStart, this) }, boot: function() { this.systems.events.once(u.DESTROY, this.destroy, this) }, pluginStart: function() { this.systems.events.once(u.SHUTDOWN, this.shutdown, this) }, setBaseURL: function(t) { return void 0 === t && (t = ""), "" !== t && "/" !== t.substr(-1) && (t = t.concat("/")), this.baseURL = t, this }, setPath: function(t) { return void 0 === t && (t = ""), "" !== t && "/" !== t.substr(-1) && (t = t.concat("/")), this.path = t, this }, setPrefix: function(t) { return void 0 === t && (t = ""), this.prefix = t, this }, setCORS: function(t) { return this.crossOrigin = t, this }, addFile: function(t) { Array.isArray(t) || (t = [t]); for (var e = 0; e < t.length; e++) { var i = t[e]; this.keyExists(i) || (this.list.set(i), this.emit(a.ADD, i.key, i.type, this, i), this.isLoading() && (this.totalToLoad++, this.updateProgress())) } }, keyExists: function(e) { var i = e.hasCacheConflict(); return i || this.list.iterate(function(t) { if (t.type === e.type && t.key === e.key) return !(i = !0) }), !i && this.isLoading() && (this.inflight.iterate(function(t) { if (t.type === e.type && t.key === e.key) return !(i = !0) }), this.queue.iterate(function(t) { if (t.type === e.type && t.key === e.key) return !(i = !0) })), i }, addPack: function(t, e) { e && t.hasOwnProperty(e) && (t = { packKey: t[e] }); var i = 0 , n = this.baseURL , s = this.path , r = this.prefix; for (var o in t) if (Object.prototype.hasOwnProperty.call(t, o)) { var a = t[o] , h = v(a, "baseURL", n) , l = v(a, "path", s) , u = v(a, "prefix", r) , c = v(a, "files", null) , d = v(a, "defaultType", "void"); if (Array.isArray(c)) { this.setBaseURL(h), this.setPath(l), this.setPrefix(u); for (var f = 0; f < c.length; f++) { var p = c[f] , g = p.hasOwnProperty("type") ? p.type : d; this[g] && (this[g](p), i++) } } } return this.setBaseURL(n), this.setPath(s), this.setPrefix(r), 0 < i }, isLoading: function() { return this.state === s.LOADER_LOADING || this.state === s.LOADER_PROCESSING }, isReady: function() { return this.state === s.LOADER_IDLE || this.state === s.LOADER_COMPLETE }, start: function() { this.isReady() && (this.progress = 0, this.totalFailed = 0, this.totalComplete = 0, this.totalToLoad = this.list.size, this.emit(a.START, this), 0 === this.list.size ? this.loadComplete() : (this.state = s.LOADER_LOADING, this.inflight.clear(), this.queue.clear(), this.updateProgress(), this.checkLoadQueue(), this.systems.events.on(u.UPDATE, this.update, this))) }, updateProgress: function() { this.progress = 1 - (this.list.size + this.inflight.size) / this.totalToLoad, this.emit(a.PROGRESS, this.progress) }, update: function() { this.state === s.LOADER_LOADING && 0 < this.list.size && this.inflight.size < this.maxParallelDownloads && this.checkLoadQueue() }, checkLoadQueue: function() { this.list.each(function(t) { if ((t.state === s.FILE_POPULATED || t.state === s.FILE_PENDING && this.inflight.size < this.maxParallelDownloads) && (this.inflight.set(t), this.list.delete(t), t.crossOrigin || (t.crossOrigin = this.crossOrigin), t.load()), this.inflight.size === this.maxParallelDownloads) return !1 }, this) }, nextFile: function(t, e) { this.inflight && (this.inflight.delete(t), this.updateProgress(), e ? (this.totalComplete++, this.queue.set(t), this.emit(a.FILE_LOAD, t), t.onProcess()) : (this.totalFailed++, this._deleteQueue.set(t), this.emit(a.FILE_LOAD_ERROR, t), this.fileProcessComplete(t))) }, fileProcessComplete: function(t) { this.scene && this.systems && this.systems.game && !this.systems.game.pendingDestroy && (t.state === s.FILE_ERRORED ? t.multiFile && t.multiFile.onFileFailed(t) : t.state === s.FILE_COMPLETE && (t.multiFile ? t.multiFile.isReadyToProcess() && t.multiFile.addToCache() : t.addToCache()), this.queue.delete(t), 0 === this.list.size && 0 === this.inflight.size && 0 === this.queue.size && this.loadComplete()) }, loadComplete: function() { this.emit(a.POST_PROCESS, this), this.list.clear(), this.inflight.clear(), this.queue.clear(), this.progress = 1, this.state = s.LOADER_COMPLETE, this.systems.events.off(u.UPDATE, this.update, this), this._deleteQueue.iterateLocal("destroy"), this._deleteQueue.clear(), this.emit(a.COMPLETE, this, this.totalComplete, this.totalFailed) }, flagForRemoval: function(t) { this._deleteQueue.set(t) }, saveJSON: function(t, e) { return this.save(JSON.stringify(t), e) }, save: function(t, e, i) { void 0 === e && (e = "file.json"), void 0 === i && (i = "application/json"); var n = new Blob([t],{ type: i }) , s = URL.createObjectURL(n) , r = document.createElement("a"); return r.download = e, r.textContent = "Download " + e, r.href = s, r.click(), this }, reset: function() { this.list.clear(), this.inflight.clear(), this.queue.clear(); var t = this.systems.game.config , e = this.systems.settings.loader; this.setBaseURL(v(e, "baseURL", t.loaderBaseURL)), this.setPath(v(e, "path", t.loaderPath)), this.setPrefix(v(e, "prefix", t.loaderPrefix)), this.state = s.LOADER_IDLE }, shutdown: function() { this.reset(), this.state = s.LOADER_SHUTDOWN, this.systems.events.off(u.UPDATE, this.update, this), this.systems.events.off(u.SHUTDOWN, this.shutdown, this) }, destroy: function() { this.shutdown(), this.state = s.LOADER_DESTROYED, this.systems.events.off(u.UPDATE, this.update, this), this.systems.events.off(u.START, this.pluginStart, this), this.list = null, this.inflight = null, this.queue = null, this.scene = null, this.systems = null, this.textureManager = null, this.cacheManager = null, this.sceneManager = null } }); l.register("Loader", d, "load"), t.exports = d } , function(t, e, i) { var n = i(50) , s = i(18)(!1, s = { ArcadePhysics: i(1262), Body: i(466), Collider: i(467), Components: i(217), Events: i(218), Factory: i(460), Group: i(462), Image: i(461), Sprite: i(140), StaticBody: i(472), StaticGroup: i(463), World: i(465) }, n); t.exports = s } , function(t, e, i) { var n = i(0) , s = i(39) , o = i(53) , c = i(321) , r = i(460) , a = i(2) , h = i(126) , l = i(1275) , u = i(464) , d = i(23) , f = i(22) , p = i(3) , g = i(465) , v = new n({ initialize: function(t) { this.scene = t, this.systems = t.sys, this.config = this.getConfig(), this.world, this.add, t.sys.events.once(f.BOOT, this.boot, this), t.sys.events.on(f.START, this.start, this) }, boot: function() { this.world = new g(this.scene,this.config), this.add = new r(this.world), this.systems.events.once(f.DESTROY, this.destroy, this) }, start: function() { this.world || (this.world = new g(this.scene,this.config), this.add = new r(this.world)); var t = this.systems.events; t.on(f.UPDATE, this.world.update, this.world), t.on(f.POST_UPDATE, this.world.postUpdate, this.world), t.once(f.SHUTDOWN, this.shutdown, this) }, getConfig: function() { var t = this.systems.game.config.physics , e = this.systems.settings.physics; return h(a(e, "arcade", {}), a(t, "arcade", {})) }, overlap: function(t, e, i, n, s) { return void 0 === i && (i = null), void 0 === n && (n = null), void 0 === s && (s = i), this.world.collideObjects(t, e, i, n, s, !0) }, collide: function(t, e, i, n, s) { return void 0 === i && (i = null), void 0 === n && (n = null), void 0 === s && (s = i), this.world.collideObjects(t, e, i, n, s, !1) }, collideTiles: function(t, e, i, n, s) { return this.world.collideTiles(t, e, i, n, s) }, overlapTiles: function(t, e, i, n, s) { return this.world.overlapTiles(t, e, i, n, s) }, pause: function() { return this.world.pause() }, resume: function() { return this.world.resume() }, accelerateTo: function(t, e, i, n, s, r) { void 0 === n && (n = 60); var o = Math.atan2(i - t.y, e - t.x); return t.body.acceleration.setToPolar(o, n), void 0 !== s && void 0 !== r && t.body.maxVelocity.set(s, r), o }, accelerateToObject: function(t, e, i, n, s) { return this.accelerateTo(t, e.x, e.y, i, n, s) }, closest: function(t, e) { e = e || this.world.bodies.entries; for (var i = Number.MAX_VALUE, n = null, s = t.x, r = t.y, o = e.length, a = 0; a < o; a++) { var h, l = e[a], u = l.body || l; t !== l && t !== u && t !== u.gameObject && t !== u.center && ((h = c(s, r, u.center.x, u.center.y)) < i && (n = l, i = h)) } return n }, furthest: function(t, e) { e = e || this.world.bodies.entries; for (var i = -1, n = null, s = t.x, r = t.y, o = e.length, a = 0; a < o; a++) { var h, l = e[a], u = l.body || l; t !== l && t !== u && t !== u.gameObject && t !== u.center && (i < (h = c(s, r, u.center.x, u.center.y)) && (n = l, i = h)) } return n }, moveTo: function(t, e, i, n, s) { void 0 === n && (n = 60), void 0 === s && (s = 0); var r = Math.atan2(i - t.y, e - t.x); return 0 < s && (n = o(t.x, t.y, e, i) / (s / 1e3)), t.body.velocity.setToPolar(r, n), r }, moveToObject: function(t, e, i, n) { return this.moveTo(t, e.x, e.y, i, n) }, velocityFromAngle: function(t, e, i) { return void 0 === e && (e = 60), void 0 === i && (i = new p), i.setToPolar(s(t), e) }, velocityFromRotation: function(t, e, i) { return void 0 === e && (e = 60), void 0 === i && (i = new p), i.setToPolar(t, e) }, overlapRect: function(t, e, i, n, s, r) { return u(this.world, t, e, i, n, s, r) }, overlapCirc: function(t, e, i, n, s) { return l(this.world, t, e, i, n, s) }, shutdown: function() { var t; this.world && ((t = this.systems.events).off(f.UPDATE, this.world.update, this.world), t.off(f.POST_UPDATE, this.world.postUpdate, this.world), t.off(f.SHUTDOWN, this.shutdown, this), this.add.destroy(), this.world.destroy(), this.add = null, this.world = null) }, destroy: function() { this.shutdown(), this.scene.sys.events.off(f.START, this.start, this), this.scene = null, this.systems = null } }); d.register("ArcadePhysics", v, "arcadePhysics"), t.exports = v } , function(t, e) { t.exports = { setAcceleration: function(t, e) { return this.body.acceleration.set(t, e), this }, setAccelerationX: function(t) { return this.body.acceleration.x = t, this }, setAccelerationY: function(t) { return this.body.acceleration.y = t, this } } } , function(t, e) { t.exports = { setAngularVelocity: function(t) { return this.body.angularVelocity = t, this }, setAngularAcceleration: function(t) { return this.body.angularAcceleration = t, this }, setAngularDrag: function(t) { return this.body.angularDrag = t, this } } } , function(t, e) { t.exports = { setBounce: function(t, e) { return this.body.bounce.set(t, e), this }, setBounceX: function(t) { return this.body.bounce.x = t, this }, setBounceY: function(t) { return this.body.bounce.y = t, this }, setCollideWorldBounds: function(t, e, i) { return this.body.setCollideWorldBounds(t, e, i), this } } } , function(t, e) { t.exports = { setDebug: function(t, e, i) { return this.debugShowBody = t, this.debugShowVelocity = e, this.debugBodyColor = i, this }, setDebugBodyColor: function(t) { return this.body.debugBodyColor = t, this }, debugShowBody: { get: function() { return this.body.debugShowBody }, set: function(t) { this.body.debugShowBody = t } }, debugShowVelocity: { get: function() { return this.body.debugShowVelocity }, set: function(t) { this.body.debugShowVelocity = t } }, debugBodyColor: { get: function() { return this.body.debugBodyColor }, set: function(t) { this.body.debugBodyColor = t } } } } , function(t, e) { t.exports = { setDrag: function(t, e) { return this.body.drag.set(t, e), this }, setDragX: function(t) { return this.body.drag.x = t, this }, setDragY: function(t) { return this.body.drag.y = t, this }, setDamping: function(t) { return this.body.useDamping = t, this } } } , function(t, e) { var i = { enableBody: function(t, e, i, n, s) { return t && this.body.reset(e, i), n && (this.body.gameObject.active = !0), s && (this.body.gameObject.visible = !0), this.body.enable = !0, this }, disableBody: function(t, e) { return void 0 === t && (t = !1), void 0 === e && (e = !1), this.body.stop(), this.body.enable = !1, t && (this.body.gameObject.active = !1), e && (this.body.gameObject.visible = !1), this }, refreshBody: function() { return this.body.updateFromGameObject(), this } }; t.exports = i } , function(t, e) { t.exports = { setFriction: function(t, e) { return this.body.friction.set(t, e), this }, setFrictionX: function(t) { return this.body.friction.x = t, this }, setFrictionY: function(t) { return this.body.friction.y = t, this } } } , function(t, e) { t.exports = { setGravity: function(t, e) { return this.body.gravity.set(t, e), this }, setGravityX: function(t) { return this.body.gravity.x = t, this }, setGravityY: function(t) { return this.body.gravity.y = t, this } } } , function(t, e) { var i = { setImmovable: function(t) { return void 0 === t && (t = !0), this.body.immovable = t, this } }; t.exports = i } , function(t, e) { t.exports = { setMass: function(t) { return this.body.mass = t, this } } } , function(t, e) { t.exports = { setOffset: function(t, e) { return this.body.setOffset(t, e), this }, setSize: function(t, e, i) { return this.body.setSize(t, e, i), this }, setBodySize: function(t, e, i) { return this.body.setSize(t, e, i), this }, setCircle: function(t, e, i) { return this.body.setCircle(t, e, i), this } } } , function(t, e) { t.exports = { setVelocity: function(t, e) { return this.body.setVelocity(t, e), this }, setVelocityX: function(t) { return this.body.setVelocityX(t), this }, setVelocityY: function(t) { return this.body.setVelocityY(t), this }, setMaxVelocity: function(t, e) { return this.body.maxVelocity.set(t, e), this } } } , function(t, e, i) { var d = i(464) , f = i(65) , p = i(205) , g = i(206); t.exports = function(t, e, i, n, s, r) { var o = d(t, e - n, i - n, 2 * n, 2 * n, s, r); if (0 === o.length) return o; for (var a = new f(e,i,n), h = new f, l = [], u = 0; u < o.length; u++) { var c = o[u]; c.isCircle ? (h.setTo(c.center.x, c.center.y, c.halfWidth), p(a, h) && l.push(c)) : g(a, c) && l.push(c) } return l } } , function(t, e) { t.exports = "collide" } , function(t, e) { t.exports = "overlap" } , function(t, e) { t.exports = "pause" } , function(t, e) { t.exports = "resume" } , function(t, e) { t.exports = "tilecollide" } , function(t, e) { t.exports = "tileoverlap" } , function(t, e) { t.exports = "worldbounds" } , function(t, e) { t.exports = "worldstep" } , function(t, e) { t.exports = function(t, e) { return t.collisionCallback ? !t.collisionCallback.call(t.collisionCallbackContext, e, t) : !t.layer.callbacks[t.index] || !t.layer.callbacks[t.index].callback.call(t.layer.callbacks[t.index].callbackContext, e, t) } } , function(t, e, i) { var m = i(1286) , y = i(1288) , x = i(471); t.exports = function(t, e, i, n, s, r, o) { var a = n.left , h = n.top , l = n.right , u = n.bottom , c = i.faceLeft || i.faceRight , d = i.faceTop || i.faceBottom; if (o || (d = c = !0), !c && !d) return !1; var f = 0 , p = 0 , g = 0 , v = 1; if (e.deltaAbsX() > e.deltaAbsY() ? g = -1 : e.deltaAbsX() < e.deltaAbsY() && (v = -1), 0 !== e.deltaX() && 0 !== e.deltaY() && c && d && (g = Math.min(Math.abs(e.position.x - l), Math.abs(e.right - a)), v = Math.min(Math.abs(e.position.y - u), Math.abs(e.bottom - h))), g < v) { if (c && 0 !== (f = m(e, i, a, l, r, o)) && !x(n, e)) return !0; d && (p = y(e, i, h, u, r, o)) } else { if (d && 0 !== (p = y(e, i, h, u, r, o)) && !x(n, e)) return !0; c && (f = m(e, i, a, l, r, o)) } return 0 !== f || 0 !== p } } , function(t, e, i) { var c = i(1287); t.exports = function(t, e, i, n, s, r) { var o = 0 , a = e.faceLeft , h = e.faceRight , l = e.collideLeft , u = e.collideRight; return r || (u = l = h = a = !0), t.deltaX() < 0 && u && t.checkCollision.left ? h && t.x < n && (o = t.x - n) < -s && (o = 0) : 0 < t.deltaX() && l && t.checkCollision.right && a && t.right > i && s < (o = t.right - i) && (o = 0), 0 !== o && (t.customSeparateX ? t.overlapX = o : c(t, o)), o } } , function(t, e) { t.exports = function(t, e) { e < 0 ? (t.blocked.none = !1, t.blocked.left = !0) : 0 < e && (t.blocked.none = !1, t.blocked.right = !0), t.position.x -= e, 0 === t.bounce.x ? t.velocity.x = 0 : t.velocity.x = -t.velocity.x * t.bounce.x } } , function(t, e, i) { var c = i(1289); t.exports = function(t, e, i, n, s, r) { var o = 0 , a = e.faceTop , h = e.faceBottom , l = e.collideUp , u = e.collideDown; return r || (u = l = h = a = !0), t.deltaY() < 0 && u && t.checkCollision.up ? h && t.y < n && (o = t.y - n) < -s && (o = 0) : 0 < t.deltaY() && l && t.checkCollision.down && a && t.bottom > i && s < (o = t.bottom - i) && (o = 0), 0 !== o && (t.customSeparateY ? t.overlapY = o : c(t, o)), o } } , function(t, e) { t.exports = function(t, e) { e < 0 ? (t.blocked.none = !1, t.blocked.up = !0) : 0 < e && (t.blocked.none = !1, t.blocked.down = !0), t.position.y -= e, 0 === t.bounce.y ? t.velocity.y = 0 : t.velocity.y = -t.velocity.y * t.bounce.y } } , function(t, e, i) { var u = i(468); t.exports = function(t, e, i, n) { var s = u(t, e, i, n); if (i || 0 === s || t.immovable && e.immovable || t.customSeparateX || e.customSeparateX) return 0 !== s || t.embedded && e.embedded; var r, o, a, h = t.velocity.x, l = e.velocity.x; return t.immovable || e.immovable ? t.immovable ? (e.x += s, e.velocity.x = h - l * e.bounce.x, t.moves && (e.y += (t.y - t.prev.y) * t.friction.y)) : (t.x -= s, t.velocity.x = l - h * t.bounce.x, e.moves && (t.y += (e.y - e.prev.y) * e.friction.y)) : (s *= .5, t.x -= s, e.x += s, r = Math.sqrt(l * l * e.mass / t.mass) * (0 < l ? 1 : -1), r -= a = .5 * (r + (o = Math.sqrt(h * h * t.mass / e.mass) * (0 < h ? 1 : -1))), o -= a, t.velocity.x = a + r * t.bounce.x, e.velocity.x = a + o * e.bounce.x), !0 } } , function(t, e, i) { var u = i(469); t.exports = function(t, e, i, n) { var s = u(t, e, i, n); if (i || 0 === s || t.immovable && e.immovable || t.customSeparateY || e.customSeparateY) return 0 !== s || t.embedded && e.embedded; var r, o, a, h = t.velocity.y, l = e.velocity.y; return t.immovable || e.immovable ? t.immovable ? (e.y += s, e.velocity.y = h - l * e.bounce.y, t.moves && (e.x += (t.x - t.prev.x) * t.friction.x)) : (t.y -= s, t.velocity.y = l - h * t.bounce.y, e.moves && (t.x += (e.x - e.prev.x) * e.friction.x)) : (s *= .5, t.y -= s, e.y += s, r = Math.sqrt(l * l * e.mass / t.mass) * (0 < l ? 1 : -1), r -= a = .5 * (r + (o = Math.sqrt(h * h * t.mass / e.mass) * (0 < h ? 1 : -1))), o -= a, t.velocity.y = a + r * t.bounce.y, e.velocity.y = a + o * e.bounce.y), !0 } } , function(t, e, i) { var f = {}; t.exports = f; var y = i(148) , g = i(219) , v = i(42) , x = i(62) , p = i(109); f.stack = function(t, e, i, n, s, r, o) { for (var a, h = y.create({ label: "Stack" }), l = t, u = e, c = 0, d = 0; d < n; d++) { for (var f = 0, p = 0; p < i; p++) { var g, v, m = o(l, u, p, d, a, c); m ? (g = m.bounds.max.y - m.bounds.min.y, v = m.bounds.max.x - m.bounds.min.x, f < g && (f = g), x.translate(m, { x: .5 * v, y: .5 * g }), l = m.bounds.max.x + s, y.addBody(h, m), a = m, c += 1) : l += s } u += f + r, l = t } return h } , f.chain = function(t, e, i, n, s, r) { for (var o = t.bodies, a = 1; a < o.length; a++) { var h = o[a - 1] , l = o[a] , u = h.bounds.max.y - h.bounds.min.y , c = h.bounds.max.x - h.bounds.min.x , d = l.bounds.max.y - l.bounds.min.y , f = { bodyA: h, pointA: { x: c * e, y: u * i }, bodyB: l, pointB: { x: (l.bounds.max.x - l.bounds.min.x) * n, y: d * s } } , p = v.extend(f, r); y.addConstraint(t, g.create(p)) } return t.label += " Chain", t } , f.mesh = function(t, e, i, n, s) { for (var r, o, a, h, l = t.bodies, u = 0; u < i; u++) { for (r = 1; r < e; r++) o = l[r - 1 + u * e], a = l[r + u * e], y.addConstraint(t, g.create(v.extend({ bodyA: o, bodyB: a }, s))); if (0 < u) for (r = 0; r < e; r++) o = l[r + (u - 1) * e], a = l[r + u * e], y.addConstraint(t, g.create(v.extend({ bodyA: o, bodyB: a }, s))), n && 0 < r && (h = l[r - 1 + (u - 1) * e], y.addConstraint(t, g.create(v.extend({ bodyA: h, bodyB: a }, s)))), n && r < e - 1 && (h = l[r + 1 + (u - 1) * e], y.addConstraint(t, g.create(v.extend({ bodyA: h, bodyB: a }, s)))) } return t.label += " Mesh", t } , f.pyramid = function(h, t, l, u, c, e, d) { return f.stack(h, t, l, u, c, e, function(t, e, i, n, s, r) { var o = Math.min(u, Math.ceil(l / 2)) , a = s ? s.bounds.max.x - s.bounds.min.x : 0; if (!(o < n) && !(i < (n = o - n) || l - 1 - n < i)) return 1 === r && x.translate(s, { x: (i + (l % 2 == 1 ? 1 : -1)) * a, y: 0 }), d(h + (s ? i * a : 0) + i * c, e, i, n, s, r) }) } , f.newtonsCradle = function(t, e, i, n, s) { for (var r = y.create({ label: "Newtons Cradle" }), o = 0; o < i; o++) { var a = p.circle(t + o * (1.9 * n), e + s, n, { inertia: 1 / 0, restitution: 1, friction: 0, frictionAir: 1e-4, slop: 1 }) , h = g.create({ pointA: { x: t + o * (1.9 * n), y: e }, bodyB: a }); y.addBody(r, a), y.addConstraint(r, h) } return r } , f.car = function(t, e, i, n, s) { var r = x.nextGroup(!0) , o = .5 * -i + 20 , a = .5 * i - 20 , h = y.create({ label: "Car" }) , l = p.rectangle(t, e, i, n, { collisionFilter: { group: r }, chamfer: { radius: .5 * n }, density: 2e-4 }) , u = p.circle(t + o, e + 0, s, { collisionFilter: { group: r }, friction: .8 }) , c = p.circle(t + a, e + 0, s, { collisionFilter: { group: r }, friction: .8 }) , d = g.create({ bodyB: l, pointB: { x: o, y: 0 }, bodyA: u, stiffness: 1, length: 0 }) , f = g.create({ bodyB: l, pointB: { x: a, y: 0 }, bodyA: c, stiffness: 1, length: 0 }); return y.addBody(h, l), y.addBody(h, u), y.addBody(h, c), y.addConstraint(h, d), y.addConstraint(h, f), h } , f.softBody = function(t, e, i, n, s, r, o, a, h, l) { h = v.extend({ inertia: 1 / 0 }, h), l = v.extend({ stiffness: .2, render: { type: "line", anchors: !1 } }, l); var u = f.stack(t, e, i, n, s, r, function(t, e) { return p.circle(t, e, a, h) }); return f.mesh(u, i, n, o, l), u.label = "Soft Body", u } } , function(t, e, i) { var x = {}; t.exports = x; i(100); var T = i(42); x.pathToVertices = function(t, e) { "undefined" == typeof window || "SVGPathSeg"in window || T.warn("Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required."); var i, n, s, r, o, a, h, l, u, c, d, f = [], p = 0, g = 0, v = 0; e = e || 15; function m(t, e, i) { var n, s = i % 2 == 1 && 1 < i; u && t == u.x && e == u.y || (d = u && s ? (c = u.x, u.y) : c = 0, n = { x: c + t, y: d + e }, !s && u || (u = n), f.push(n), g = c + t, v = d + e) } function y(t) { var e = t.pathSegTypeAsLetter.toUpperCase(); if ("Z" !== e) { switch (e) { case "M": case "L": case "T": case "C": case "S": case "Q": g = t.x, v = t.y; break; case "H": g = t.x; break; case "V": v = t.y } m(g, v, t.pathSegType) } } for (x._svgPathToAbsolute(t), s = t.getTotalLength(), a = [], i = 0; i < t.pathSegList.numberOfItems; i += 1) a.push(t.pathSegList.getItem(i)); for (h = a.concat(); p < s; ) { if ((o = a[t.getPathSegAtLength(p)]) != l) { for (; h.length && h[0] != o; ) y(h.shift()); l = o } switch (o.pathSegTypeAsLetter.toUpperCase()) { case "C": case "T": case "S": case "Q": case "A": r = t.getPointAtLength(p), m(r.x, r.y, 0) } p += e } for (i = 0, n = h.length; i < n; ++i) y(h[i]); return f } , x._svgPathToAbsolute = function(t) { for (var e, i, n, s, r, o, a = t.pathSegList, h = 0, l = 0, u = a.numberOfItems, c = 0; c < u; ++c) { var d = a.getItem(c) , f = d.pathSegTypeAsLetter; if (/[MLHVCSQTA]/.test(f)) "x"in d && (h = d.x), "y"in d && (l = d.y); else switch ("x1"in d && (n = h + d.x1), "x2"in d && (r = h + d.x2), "y1"in d && (s = l + d.y1), "y2"in d && (o = l + d.y2), "x"in d && (h += d.x), "y"in d && (l += d.y), f) { case "m": a.replaceItem(t.createSVGPathSegMovetoAbs(h, l), c); break; case "l": a.replaceItem(t.createSVGPathSegLinetoAbs(h, l), c); break; case "h": a.replaceItem(t.createSVGPathSegLinetoHorizontalAbs(h), c); break; case "v": a.replaceItem(t.createSVGPathSegLinetoVerticalAbs(l), c); break; case "c": a.replaceItem(t.createSVGPathSegCurvetoCubicAbs(h, l, n, s, r, o), c); break; case "s": a.replaceItem(t.createSVGPathSegCurvetoCubicSmoothAbs(h, l, r, o), c); break; case "q": a.replaceItem(t.createSVGPathSegCurvetoQuadraticAbs(h, l, n, s), c); break; case "t": a.replaceItem(t.createSVGPathSegCurvetoQuadraticSmoothAbs(h, l), c); break; case "a": a.replaceItem(t.createSVGPathSegArcAbs(h, l, d.r1, d.r2, d.angle, d.largeArcFlag, d.sweepFlag), c); break; case "z": case "Z": h = e, l = i } "M" != f && "m" != f || (e = h, i = l) } } } , function(t, e, i) { var o = i(109) , c = i(62) , d = i(42) , f = i(2) , s = i(86) , n = { parseBody: function(t, e, i, n) { void 0 === n && (n = {}); for (var s = f(i, "fixtures", []), r = [], o = 0; o < s.length; o++) for (var a = this.parseFixture(s[o]), h = 0; h < a.length; h++) r.push(a[h]); var l = d.clone(i, !0); d.extend(l, n, !0), delete l.fixtures, delete l.type; var u = c.create(l); return c.setParts(u, r), c.setPosition(u, { x: t, y: e }), u }, parseFixture: function(t) { var e, i, n, s, r = d.extend({}, !1, t); return delete r.circle, delete r.vertices, t.circle ? (e = f(t.circle, "x"), i = f(t.circle, "y"), n = f(t.circle, "radius"), s = [o.circle(e, i, n, r)]) : t.vertices && (s = this.parseVertices(t.vertices, r)), s }, parseVertices: function(t, e) { void 0 === e && (e = {}); for (var i = [], n = 0; n < t.length; n++) s.clockwiseSort(t[n]), i.push(c.create(d.extend({ position: s.centre(t[n]), vertices: t[n] }, e))); return o.flagCoincidentParts(i) } }; t.exports = n } , function(t, e, i) { var l = i(109) , u = i(62) , n = { parseBody: function(t, e, i, n) { var s; void 0 === n && (n = {}); var r = i.vertices; if (1 === r.length) n.vertices = r[0], s = u.create(n), l.flagCoincidentParts(s.parts); else { for (var o = [], a = 0; a < r.length; a++) { var h = u.create({ vertices: r[a] }); o.push(h) } l.flagCoincidentParts(o), n.parts = o, s = u.create(n) } return s.label = i.label, u.setPosition(s, { x: t, y: e }), s } }; t.exports = n } , function(t, e, i) { t.exports = { AFTER_ADD: i(1407), AFTER_REMOVE: i(1408), AFTER_UPDATE: i(1409), BEFORE_ADD: i(1410), BEFORE_REMOVE: i(1411), BEFORE_UPDATE: i(1412), COLLISION_ACTIVE: i(1413), COLLISION_END: i(1414), COLLISION_START: i(1415), DRAG_END: i(1416), DRAG: i(1417), DRAG_START: i(1418), PAUSE: i(1419), RESUME: i(1420), SLEEP_END: i(1421), SLEEP_START: i(1422) } } , function(t, e, i) { var y = i(109) , x = i(62) , n = i(0) , s = i(514) , o = i(10) , T = i(2) , w = i(108) , b = i(86) , r = new n({ Extends: o, Mixins: [s.Bounce, s.Collision, s.Friction, s.Gravity, s.Mass, s.Sensor, s.Sleep, s.Static], initialize: function(t, e, i) { o.call(this), this.tile = e, this.world = t, e.physics.matterBody && e.physics.matterBody.destroy(), e.physics.matterBody = this; var n, s = T(i, "body", null), r = T(i, "addToWorld", !0); s ? this.setBody(s, r) : (n = e.getCollisionGroup(), 0 < T(n, "objects", []).length ? this.setFromTileCollision(i) : this.setFromTileRectangle(i)) }, setFromTileRectangle: function(t) { void 0 === t && (t = {}), w(t, "isStatic") || (t.isStatic = !0), w(t, "addToWorld") || (t.addToWorld = !0); var e = this.tile.getBounds() , i = e.x + e.width / 2 , n = e.y + e.height / 2 , s = y.rectangle(i, n, e.width, e.height, t); return this.setBody(s, t.addToWorld), this }, setFromTileCollision: function(t) { void 0 === t && (t = {}), w(t, "isStatic") || (t.isStatic = !0), w(t, "addToWorld") || (t.addToWorld = !0); for (var e = this.tile.tilemapLayer.scaleX, i = this.tile.tilemapLayer.scaleY, n = this.tile.getLeft(), s = this.tile.getTop(), r = this.tile.getCollisionGroup(), o = T(r, "objects", []), a = [], h = 0; h < o.length; h++) { var l, u, c, d = o[h], f = n + d.x * e, p = s + d.y * i, g = d.width * e, v = d.height * i, m = null; d.rectangle ? m = y.rectangle(f + g / 2, p + v / 2, g, v, t) : d.ellipse ? m = y.circle(f + g / 2, p + v / 2, g / 2, t) : (d.polygon || d.polyline) && (l = (d.polygon ? d.polygon : d.polyline).map(function(t) { return { x: t.x * e, y: t.y * i } }), u = b.create(l), f += (c = b.centre(u)).x, p += c.y, m = y.fromVertices(f, p, u, t)), m && a.push(m) } return 1 === a.length ? this.setBody(a[0], t.addToWorld) : 1 < a.length && (t.parts = a, this.setBody(x.create(t), t.addToWorld)), this }, setBody: function(t, e) { return void 0 === e && (e = !0), this.body && this.removeBody(), this.body = t, this.body.gameObject = this, e && this.world.add(this.body), this }, removeBody: function() { return this.body && (this.world.remove(this.body), this.body.gameObject = void 0, this.body = void 0), this }, destroy: function() { this.removeBody(), this.tile.physics.matterBody = void 0, this.removeAllListeners() } }); t.exports = r } , function(t, e, i) { var n = i(1389); n.Body = i(62), n.Composite = i(148), n.World = i(1300), n.Detector = i(515), n.Grid = i(1301), n.Pairs = i(1302), n.Pair = i(473), n.Query = i(1390), n.Resolver = i(1303), n.SAT = i(516), n.Constraint = i(219), n.Common = i(42), n.Engine = i(1391), n.Events = i(240), n.Sleeping = i(239), n.Plugin = i(1299), n.Bodies = i(109), n.Composites = i(1292), n.Axes = i(513), n.Bounds = i(100), n.Svg = i(1293), n.Vector = i(99), n.Vertices = i(86), n.World.add = n.Composite.add, n.World.remove = n.Composite.remove, n.World.addComposite = n.Composite.addComposite, n.World.addBody = n.Composite.addBody, n.World.addConstraint = n.Composite.addConstraint, n.World.clear = n.Composite.clear, t.exports = n } , function(t, e, i) { var a = {}; t.exports = a; var h = i(42); a._registry = {}, a.register = function(t) { var e, i, n; return a.isPlugin(t) || h.warn("Plugin.register:", a.toString(t), "does not implement all required fields."), t.name in a._registry ? (e = a._registry[t.name], i = a.versionParse(t.version).number, (n = a.versionParse(e.version).number) < i ? (h.warn("Plugin.register:", a.toString(e), "was upgraded to", a.toString(t)), a._registry[t.name] = t) : i < n ? h.warn("Plugin.register:", a.toString(e), "can not be downgraded to", a.toString(t)) : t !== e && h.warn("Plugin.register:", a.toString(t), "is already registered to different plugin object")) : a._registry[t.name] = t, t } , a.resolve = function(t) { return a._registry[a.dependencyParse(t).name] } , a.toString = function(t) { return "string" == typeof t ? t : (t.name || "anonymous") + "@" + (t.version || t.range || "0.0.0") } , a.isPlugin = function(t) { return t && t.name && t.version && t.install } , a.isUsed = function(t, e) { return -1 < t.used.indexOf(e) } , a.isFor = function(t, e) { var i = t.for && a.dependencyParse(t.for); return !t.for || e.name === i.name && a.versionSatisfies(e.version, i.range) } , a.use = function(t, e) { if (t.uses = (t.uses || []).concat(e || []), 0 !== t.uses.length) { for (var i, n = a.dependencies(t), s = h.topologicalSort(n), r = [], o = 0; o < s.length; o += 1) { s[o] !== t.name && ((i = a.resolve(s[o])) ? a.isUsed(t, i.name) || (a.isFor(i, t) || (h.warn("Plugin.use:", a.toString(i), "is for", i.for, "but installed on", a.toString(t) + "."), i._warned = !0), i.install ? i.install(t) : (h.warn("Plugin.use:", a.toString(i), "does not specify an install function."), i._warned = !0), i._warned ? (r.push("🔶 " + a.toString(i)), delete i._warned) : r.push("✅ " + a.toString(i)), t.used.push(i.name)) : r.push("❌ " + s[o])) } 0 < r.length && !i.silent && h.info(r.join(" ")) } else h.warn("Plugin.use:", a.toString(t), "does not specify any dependencies to install.") } , a.dependencies = function(n, t) { var s = a.dependencyParse(n) , e = s.name; if (!(e in (t = t || {}))) { n = a.resolve(n) || n, t[e] = h.map(n.uses || [], function(t) { a.isPlugin(t) && a.register(t); var e = a.dependencyParse(t) , i = a.resolve(t); return i && !a.versionSatisfies(i.version, e.range) ? (h.warn("Plugin.dependencies:", a.toString(i), "does not satisfy", a.toString(e), "used by", a.toString(s) + "."), i._warned = !0, n._warned = !0) : i || (h.warn("Plugin.dependencies:", a.toString(t), "used by", a.toString(s), "could not be resolved."), n._warned = !0), e.name }); for (var i = 0; i < t[e].length; i += 1) a.dependencies(t[e][i], t); return t } } , a.dependencyParse = function(t) { if (h.isString(t)) { return /^[\w-]+(@(\*|[\^~]?\d+\.\d+\.\d+(-[0-9A-Za-z-]+)?))?$/.test(t) || h.warn("Plugin.dependencyParse:", t, "is not a valid dependency string."), { name: t.split("@")[0], range: t.split("@")[1] || "*" } } return { name: t.name, range: t.range || t.version } } , a.versionParse = function(t) { /^\*|[\^~]?\d+\.\d+\.\d+(-[0-9A-Za-z-]+)?$/.test(t) || h.warn("Plugin.versionParse:", t, "is not a valid version or range."); var e = t.split("-"); t = e[0]; var i = isNaN(Number(t[0])) , n = i ? t.substr(1) : t , s = h.map(n.split("."), function(t) { return Number(t) }); return { isRange: i, version: n, range: t, operator: i ? t[0] : "", parts: s, prerelease: e[1], number: 1e8 * s[0] + 1e4 * s[1] + s[2] } } , a.versionSatisfies = function(t, e) { e = e || "*"; var i = a.versionParse(e) , n = i.parts , s = a.versionParse(t) , r = s.parts; if (i.isRange) { if ("*" === i.operator || "*" === t) return !0; if ("~" === i.operator) return r[0] === n[0] && r[1] === n[1] && r[2] >= n[2]; if ("^" === i.operator) return 0 < n[0] ? r[0] === n[0] && s.number >= i.number : 0 < n[1] ? r[1] === n[1] && r[2] >= n[2] : r[2] === n[2] } return t === e || "*" === t } } , function(t, e, i) { var n = {}; t.exports = n; var s = i(148) , r = (i(219), i(42)); n.create = function(t) { var e = s.create() , i = { label: "World", gravity: { x: 0, y: 1, scale: .001 }, bounds: { min: { x: -1 / 0, y: -1 / 0 }, max: { x: 1 / 0, y: 1 / 0 } } }; return r.extend(e, i, t) } } , function(t, e, i) { var y = {}; t.exports = y; var a = i(473) , n = i(515) , r = i(42); y.create = function(t) { var e = { controller: y, detector: n.collisions, buckets: {}, pairs: {}, pairsList: [], bucketWidth: 48, bucketHeight: 48 }; return r.extend(e, t) } , y.update = function(t, e, i, n) { for (var s, r, o, a = i.world, h = t.buckets, l = !1, u = i.metrics, c = u.broadphaseTests = 0; c < e.length; c++) { var d = e[c]; if ((!d.isSleeping || n) && !(d.bounds.max.x < a.bounds.min.x || d.bounds.min.x > a.bounds.max.x || d.bounds.max.y < a.bounds.min.y || d.bounds.min.y > a.bounds.max.y)) { var f = y._getRegion(t, d); if (!d.region || f.id !== d.region.id || n) { u.broadphaseTests += 1, d.region && !n || (d.region = f); for (var p = y._regionUnion(f, d.region), g = p.startCol; g <= p.endCol; g++) for (s = p.startRow; s <= p.endRow; s++) { r = h[o = y._getBucketId(g, s)]; var v = g >= f.startCol && g <= f.endCol && s >= f.startRow && s <= f.endRow , m = g >= d.region.startCol && g <= d.region.endCol && s >= d.region.startRow && s <= d.region.endRow; !v && m && m && r && y._bucketRemoveBody(t, r, d), (d.region === f || v && !m || n) && (r = r || y._createBucket(h, o), y._bucketAddBody(t, r, d)) } d.region = f, l = !0 } } } l && (t.pairsList = y._createActivePairsList(t)) } , y.clear = function(t) { t.buckets = {}, t.pairs = {}, t.pairsList = [] } , y._regionUnion = function(t, e) { var i = Math.min(t.startCol, e.startCol) , n = Math.max(t.endCol, e.endCol) , s = Math.min(t.startRow, e.startRow) , r = Math.max(t.endRow, e.endRow); return y._createRegion(i, n, s, r) } , y._getRegion = function(t, e) { var i = e.bounds , n = Math.floor(i.min.x / t.bucketWidth) , s = Math.floor(i.max.x / t.bucketWidth) , r = Math.floor(i.min.y / t.bucketHeight) , o = Math.floor(i.max.y / t.bucketHeight); return y._createRegion(n, s, r, o) } , y._createRegion = function(t, e, i, n) { return { id: t + "," + e + "," + i + "," + n, startCol: t, endCol: e, startRow: i, endRow: n } } , y._getBucketId = function(t, e) { return "C" + t + "R" + e } , y._createBucket = function(t, e) { return t[e] = [] } , y._bucketAddBody = function(t, e, i) { for (var n = 0; n < e.length; n++) { var s, r, o = e[n]; i.id === o.id || i.isStatic && o.isStatic || (s = a.id(i, o), (r = t.pairs[s]) ? r[2] += 1 : t.pairs[s] = [i, o, 1]) } e.push(i) } , y._bucketRemoveBody = function(t, e, i) { e.splice(e.indexOf(i), 1); for (var n = 0; n < e.length; n++) { var s = e[n] , r = a.id(i, s) , o = t.pairs[r]; o && --o[2] } } , y._createActivePairsList = function(t) { for (var e, i = [], n = r.keys(t.pairs), s = 0; s < n.length; s++) 0 < (e = t.pairs[n[s]])[2] ? i.push(e) : delete t.pairs[n[s]]; return i } } , function(t, e, i) { var l = {}; t.exports = l; var d = i(473) , n = i(42); l._pairMaxIdleLife = 1e3, l.create = function(t) { return n.extend({ table: {}, list: [], collisionStart: [], collisionActive: [], collisionEnd: [] }, t) } , l.update = function(t, e, i) { var n, s, r, o, a = t.list, h = t.table, l = t.collisionStart, u = t.collisionEnd, c = t.collisionActive; for (l.length = 0, u.length = 0, o = c.length = 0; o < a.length; o++) a[o].confirmedActive = !1; for (o = 0; o < e.length; o++) (n = e[o]).collided && ((r = h[s = d.id(n.bodyA, n.bodyB)]) ? (r.isActive ? c.push(r) : l.push(r), d.update(r, n, i), r.confirmedActive = !0) : (r = d.create(n, i), h[s] = r, l.push(r), a.push(r))); for (o = 0; o < a.length; o++) (r = a[o]).isActive && !r.confirmedActive && (d.setActive(r, !1, i), u.push(r)) } , l.removeOld = function(t, e) { for (var i, n, s, r = t.list, o = t.table, a = [], h = 0; h < r.length; h++) (n = (i = r[h]).collision).bodyA.isSleeping || n.bodyB.isSleeping ? i.timeUpdated = e : e - i.timeUpdated > l._pairMaxIdleLife && a.push(h); for (h = 0; h < a.length; h++) delete o[(i = r[s = a[h] - h]).id], r.splice(s, 1) } , l.clear = function(t) { return t.table = {}, t.list.length = 0, t.collisionStart.length = 0, t.collisionActive.length = 0, t.collisionEnd.length = 0, t } } , function(t, e, i) { var Y = {}; t.exports = Y; var r = i(86) , X = i(99) , U = i(42) , o = i(100); Y._restingThresh = 4, Y._restingThreshTangent = 6, Y._positionDampen = .9, Y._positionWarming = .8, Y._frictionNormalMultiplier = 5, Y.preSolvePosition = function(t) { for (var e, i, n = 0; n < t.length; n++) (e = t[n]).isActive && (i = e.activeContacts.length, e.collision.parentA.totalContacts += i, e.collision.parentB.totalContacts += i) } , Y.solvePosition = function(t, e, i) { for (var n, s, r, o, a, h, l, u, c, d, f, p, g, v, m, y = i * Y._positionDampen, x = 0; x < e.length; x++) { var T = e[x]; T.previousPositionImpulse.x = T.positionImpulse.x, T.previousPositionImpulse.y = T.positionImpulse.y } for (x = 0; x < t.length; x++) (r = t[x]).isActive && !r.isSensor && (a = (o = r.collision).parentA, h = o.parentB, l = o.normal, d = a.previousPositionImpulse, f = h.previousPositionImpulse, c = o.penetration, g = f.x - d.x + c.x, v = f.y - d.y + c.y, u = (n = l.x) * g + (s = l.y) * v, m = ((r.separation = u) - r.slop) * y, (a.isStatic || h.isStatic) && (m *= 2), a.isStatic || a.isSleeping || (p = m / a.totalContacts, a.positionImpulse.x += n * p, a.positionImpulse.y += s * p), h.isStatic || h.isSleeping || (p = m / h.totalContacts, h.positionImpulse.x -= n * p, h.positionImpulse.y -= s * p)) } , Y.postSolvePosition = function(t) { for (var e = 0; e < t.length; e++) { var i = t[e]; if ((i.totalContacts = 0) !== i.positionImpulse.x || 0 !== i.positionImpulse.y) { for (var n = 0; n < i.parts.length; n++) { var s = i.parts[n]; r.translate(s.vertices, i.positionImpulse), o.update(s.bounds, s.vertices, i.velocity), s.position.x += i.positionImpulse.x, s.position.y += i.positionImpulse.y } i.positionPrev.x += i.positionImpulse.x, i.positionPrev.y += i.positionImpulse.y, X.dot(i.positionImpulse, i.velocity) < 0 ? (i.positionImpulse.x = 0, i.positionImpulse.y = 0) : (i.positionImpulse.x *= Y._positionWarming, i.positionImpulse.y *= Y._positionWarming) } } } , Y.preSolveVelocity = function(t) { for (var e, i, n, s, r, o, a, h, l, u, c, d, f, p = X._temp[0], g = X._temp[1], v = 0; v < t.length; v++) if ((i = t[v]).isActive && !i.isSensor) for (n = i.activeContacts, r = (s = i.collision).parentA, o = s.parentB, a = s.normal, h = s.tangent, e = 0; e < n.length; e++) u = (l = n[e]).vertex, c = l.normalImpulse, d = l.tangentImpulse, 0 === c && 0 === d || (p.x = a.x * c + h.x * d, p.y = a.y * c + h.y * d, r.isStatic || r.isSleeping || (f = X.sub(u, r.position, g), r.positionPrev.x += p.x * r.inverseMass, r.positionPrev.y += p.y * r.inverseMass, r.anglePrev += X.cross(f, p) * r.inverseInertia), o.isStatic || o.isSleeping || (f = X.sub(u, o.position, g), o.positionPrev.x -= p.x * o.inverseMass, o.positionPrev.y -= p.y * o.inverseMass, o.anglePrev -= X.cross(f, p) * o.inverseInertia)) } , Y.solveVelocity = function(t, e) { for (var i = e * e, n = X._temp[0], s = X._temp[1], r = X._temp[2], o = X._temp[3], a = X._temp[4], h = X._temp[5], l = 0; l < t.length; l++) { var u = t[l]; if (u.isActive && !u.isSensor) { var c = u.collision , d = c.parentA , f = c.parentB , p = c.normal , g = c.tangent , v = u.activeContacts , m = 1 / v.length; d.velocity.x = d.position.x - d.positionPrev.x, d.velocity.y = d.position.y - d.positionPrev.y, f.velocity.x = f.position.x - f.positionPrev.x, f.velocity.y = f.position.y - f.positionPrev.y, d.angularVelocity = d.angle - d.anglePrev, f.angularVelocity = f.angle - f.anglePrev; for (var y = 0; y < v.length; y++) { var x = v[y] , T = x.vertex , w = X.sub(T, d.position, s) , b = X.sub(T, f.position, r) , E = X.add(d.velocity, X.mult(X.perp(w), d.angularVelocity), o) , S = X.add(f.velocity, X.mult(X.perp(b), f.angularVelocity), a) , _ = X.sub(E, S, h) , A = X.dot(p, _) , C = X.dot(g, _) , M = Math.abs(C) , P = U.sign(C) , O = (1 + u.restitution) * A , R = U.clamp(u.separation + A, 0, 1) * Y._frictionNormalMultiplier , L = C , k = 1 / 0; M > u.friction * u.frictionStatic * R * i && (k = M, L = U.clamp(u.friction * P * i, -k, k)); var D, F, I = X.cross(w, p), B = X.cross(b, p), N = m / (d.inverseMass + f.inverseMass + d.inverseInertia * I * I + f.inverseInertia * B * B); O *= N, L *= N, A < 0 && A * A > Y._restingThresh * i ? x.normalImpulse = 0 : (D = x.normalImpulse, x.normalImpulse = Math.min(x.normalImpulse + O, 0), O = x.normalImpulse - D), C * C > Y._restingThreshTangent * i ? x.tangentImpulse = 0 : (F = x.tangentImpulse, x.tangentImpulse = U.clamp(x.tangentImpulse + L, -k, k), L = x.tangentImpulse - F), n.x = p.x * O + g.x * L, n.y = p.y * O + g.y * L, d.isStatic || d.isSleeping || (d.positionPrev.x += n.x * d.inverseMass, d.positionPrev.y += n.y * d.inverseMass, d.anglePrev += X.cross(w, n) * d.inverseInertia), f.isStatic || f.isSleeping || (f.positionPrev.x -= n.x * f.inverseMass, f.positionPrev.y -= n.y * f.inverseMass, f.anglePrev -= X.cross(b, n) * f.inverseInertia) } } } } } , function(t, e, i) { t.exports = { BasePlugin: i(474), DefaultPlugins: i(175), PluginCache: i(23), PluginManager: i(370), ScenePlugin: i(1305) } } , function(t, e, i) { var n = i(474) , s = i(0) , r = i(22) , o = new s({ Extends: n, initialize: function(t, e) { n.call(this, e), this.scene = t, this.systems = t.sys, t.sys.events.once(r.BOOT, this.boot, this) }, boot: function() {}, destroy: function() { this.pluginManager = null, this.game = null, this.scene = null, this.systems = null } }); t.exports = o } , function(t, e, i) { var n = i(18) , s = i(177) , r = n(!1, r = { Center: i(359), Events: i(92), Orientation: i(360), ScaleManager: i(371), ScaleModes: i(361), Zoom: i(362) }, s.CENTER); r = n(!1, r, s.ORIENTATION), r = n(!1, r, s.SCALE_MODE), r = n(!1, r, s.ZOOM), t.exports = r } , function(t, e, i) { var n = i(125) , s = i(18)(!1, s = { Events: i(22), SceneManager: i(373), ScenePlugin: i(1308), Settings: i(375), Systems: i(180) }, n); t.exports = s } , function(t, e, i) { var n = i(19) , s = i(0) , a = i(22) , h = i(2) , r = i(23) , o = new s({ initialize: function(t) { this.scene = t, this.systems = t.sys, this.settings = t.sys.settings, this.key = t.sys.settings.key, this.manager = t.sys.game.scene, this.transitionProgress = 0, this._elapsed = 0, this._target = null, this._duration = 0, this._onUpdate, this._onUpdateScope, this._willSleep = !1, this._willRemove = !1, t.sys.events.once(a.BOOT, this.boot, this), t.sys.events.on(a.START, this.pluginStart, this) }, boot: function() { this.systems.events.once(a.DESTROY, this.destroy, this) }, pluginStart: function() { this._target = null, this.systems.events.once(a.SHUTDOWN, this.shutdown, this) }, start: function(t, e) { return void 0 === t && (t = this.key), this.manager.queueOp("stop", this.key), this.manager.queueOp("start", t, e), this }, restart: function(t) { var e = this.key; return this.manager.queueOp("stop", e), this.manager.queueOp("start", e, t), this }, transition: function(t) { void 0 === t && (t = {}); var e = h(t, "target", !1) , i = this.manager.getScene(e); if (!e || !this.checkValidTransition(i)) return !1; var n = h(t, "duration", 1e3); this._elapsed = 0, this._target = i, this._duration = n, this._willSleep = h(t, "sleep", !1), this._willRemove = h(t, "remove", !1); var s = h(t, "onUpdate", null); s && (this._onUpdate = s, this._onUpdateScope = h(t, "onUpdateScope", this.scene)); var r = h(t, "allowInput", !1); this.settings.transitionAllowInput = r; var o = i.sys.settings; return o.isTransition = !0, o.transitionFrom = this.scene, o.transitionDuration = n, o.transitionAllowInput = r, h(t, "moveAbove", !1) ? this.manager.moveAbove(this.key, e) : h(t, "moveBelow", !1) && this.manager.moveBelow(this.key, e), i.sys.isSleeping() ? i.sys.wake(h(t, "data")) : this.manager.start(e, h(t, "data")), this.systems.events.emit(a.TRANSITION_OUT, i, n), this.systems.events.on(a.UPDATE, this.step, this), !0 }, checkValidTransition: function(t) { return !(!t || t.sys.isActive() || t.sys.isTransitioning() || t === this.scene || this.systems.isTransitioning()) }, step: function(t, e) { this._elapsed += e, this.transitionProgress = n(this._elapsed / this._duration, 0, 1), this._onUpdate && this._onUpdate.call(this._onUpdateScope, this.transitionProgress), this._elapsed >= this._duration && this.transitionComplete() }, transitionComplete: function() { var t = this._target.sys , e = this._target.sys.settings; this.systems.events.off(a.UPDATE, this.step, this), t.events.emit(a.TRANSITION_COMPLETE, this.scene), e.isTransition = !1, e.transitionFrom = null, this._duration = 0, this._target = null, this._onUpdate = null, this._onUpdateScope = null, this._willRemove ? this.manager.remove(this.key) : this._willSleep ? this.systems.sleep() : this.manager.stop(this.key) }, add: function(t, e, i, n) { return this.manager.add(t, e, i, n) }, launch: function(t, e) { return t && t !== this.key && this.manager.queueOp("start", t, e), this }, run: function(t, e) { return t && t !== this.key && this.manager.queueOp("run", t, e), this }, pause: function(t, e) { return void 0 === t && (t = this.key), this.manager.queueOp("pause", t, e), this }, resume: function(t, e) { return void 0 === t && (t = this.key), this.manager.queueOp("resume", t, e), this }, sleep: function(t, e) { return void 0 === t && (t = this.key), this.manager.queueOp("sleep", t, e), this }, wake: function(t, e) { return void 0 === t && (t = this.key), this.manager.queueOp("wake", t, e), this }, switch: function(t) { return t !== this.key && this.manager.queueOp("switch", this.key, t), this }, stop: function(t, e) { return void 0 === t && (t = this.key), this.manager.queueOp("stop", t, e), this }, setActive: function(t, e, i) { void 0 === e && (e = this.key); var n = this.manager.getScene(e); return n && n.sys.setActive(t, i), this }, setVisible: function(t, e) { void 0 === e && (e = this.key); var i = this.manager.getScene(e); return i && i.sys.setVisible(t), this }, isSleeping: function(t) { return void 0 === t && (t = this.key), this.manager.isSleeping(t) }, isActive: function(t) { return void 0 === t && (t = this.key), this.manager.isActive(t) }, isPaused: function(t) { return void 0 === t && (t = this.key), this.manager.isPaused(t) }, isVisible: function(t) { return void 0 === t && (t = this.key), this.manager.isVisible(t) }, swapPosition: function(t, e) { return void 0 === e && (e = this.key), t !== e && this.manager.swapPosition(t, e), this }, moveAbove: function(t, e) { return void 0 === e && (e = this.key), t !== e && this.manager.moveAbove(t, e), this }, moveBelow: function(t, e) { return void 0 === e && (e = this.key), t !== e && this.manager.moveBelow(t, e), this }, remove: function(t) { return void 0 === t && (t = this.key), this.manager.remove(t), this }, moveUp: function(t) { return void 0 === t && (t = this.key), this.manager.moveUp(t), this }, moveDown: function(t) { return void 0 === t && (t = this.key), this.manager.moveDown(t), this }, bringToTop: function(t) { return void 0 === t && (t = this.key), this.manager.bringToTop(t), this }, sendToBack: function(t) { return void 0 === t && (t = this.key), this.manager.sendToBack(t), this }, get: function(t) { return this.manager.getScene(t) }, getIndex: function(t) { return void 0 === t && (t = this.key), this.manager.getIndex(t) }, shutdown: function() { var t = this.systems.events; t.off(a.SHUTDOWN, this.shutdown, this), t.off(a.POST_UPDATE, this.step, this), t.off(a.TRANSITION_OUT) }, destroy: function() { this.shutdown(), this.scene.sys.events.off(a.START, this.start, this), this.scene = null, this.systems = null, this.settings = null, this.manager = null } }); r.register("ScenePlugin", o, "scenePlugin"), t.exports = o } , function(t, e, i) { t.exports = { List: i(129), Map: i(162), ProcessQueue: i(186), RTree: i(470), Set: i(133), Size: i(372) } } , function(t, e, i) { var n = i(18) , s = i(1311) , r = n(!1, r = { CanvasTexture: i(377), Events: i(121), FilterMode: s, Frame: i(94), Parsers: i(379), Texture: i(182), TextureManager: i(376), TextureSource: i(378) }, s); t.exports = r } , function(t, e) { t.exports = { LINEAR: 0, NEAREST: 1 } } , function(t, e, i) { t.exports = { Components: i(141), Parsers: i(1342), Formats: i(32), ImageCollection: i(485), ParseToTilemap: i(227), Tile: i(74), Tilemap: i(494), TilemapCreator: i(1351), TilemapFactory: i(1352), Tileset: i(104), LayerData: i(102), MapData: i(103), ObjectLayer: i(488), DynamicTilemapLayer: i(495), StaticTilemapLayer: i(496) } } , function(t, e, i) { var p = i(24) , g = i(51); t.exports = function(t, e, i, n, s, r, o, a) { t < 0 && (t = 0), e < 0 && (e = 0), void 0 === o && (o = !0); for (var h = p(t, e, i, n, null, a), l = s - t, u = r - e, c = 0; c < h.length; c++) { var d = h[c].x + l , f = h[c].y + u; 0 <= d && d < a.width && 0 <= f && f < a.height && a.data[f][d] && a.data[f][d].copy(h[c]) } o && g(s - 1, r - 1, i + 2, n + 2, a) } } , function(t, e, i) { var d = i(143) , f = i(144) , p = i(24) , g = i(475); t.exports = function(t, e, i, n, s, r) { void 0 === i && (i = {}), Array.isArray(t) || (t = [t]); var o = r.tilemapLayer; void 0 === n && (n = o.scene), void 0 === s && (s = n.cameras.main); for (var a = p(0, 0, r.width, r.height, null, r), h = [], l = 0; l < a.length; l++) { var u, c = a[l]; -1 !== t.indexOf(c.index) && (i.x = d(c.x, s, r), i.y = f(c.y, s, r), u = n.make.sprite(i), h.push(u)) } if ("number" == typeof e) for (l = 0; l < t.length; l++) g(t[l], e, 0, 0, r.width, r.height, r); else if (Array.isArray(e)) for (l = 0; l < t.length; l++) g(t[l], e[l], 0, 0, r.width, r.height, r); return h } } , function(t, e, i) { var b = i(93) , E = i(330); t.exports = function(t, e, i, n) { void 0 === i && (i = []), void 0 === n && (n = 0), i.length = 0; var s, r, o, a, h, l, u, c = t.tilemapLayer.tilemap, d = t.tilemapLayer, f = t.data, p = t.width, g = t.height, v = Math.floor(c.tileWidth * d.scaleX), m = Math.floor(c.tileHeight * d.scaleY), y = 0, x = p, T = 0, w = g; if (d.skipCull || 1 !== d.scrollFactorX || 1 !== d.scrollFactorY || (s = b(e.worldView.x - d.x, v, 0, !0) - d.cullPaddingX, r = E(e.worldView.right - d.x, v, 0, !0) + d.cullPaddingX, o = b(e.worldView.y - d.y, m, 0, !0) - d.cullPaddingY, a = E(e.worldView.bottom - d.y, m, 0, !0) + d.cullPaddingY, y = Math.max(0, s), x = Math.min(p, r), T = Math.max(0, o), w = Math.min(g, a)), 0 === n) for (l = T; l < w; l++) for (h = y; f[l] && h < x; h++) (u = f[l][h]) && -1 !== u.index && u.visible && 0 !== u.alpha && i.push(u); else if (1 === n) for (l = T; l < w; l++) for (h = x; f[l] && y <= h; h--) (u = f[l][h]) && -1 !== u.index && u.visible && 0 !== u.alpha && i.push(u); else if (2 === n) for (l = w; T <= l; l--) for (h = y; f[l] && h < x; h++) (u = f[l][h]) && -1 !== u.index && u.visible && 0 !== u.alpha && i.push(u); else if (3 === n) for (l = w; T <= l; l--) for (h = x; f[l] && y <= h; h--) (u = f[l][h]) && -1 !== u.index && u.visible && 0 !== u.alpha && i.push(u); return d.tilesDrawn = i.length, d.tilesTotal = p * g, i } } , function(t, e, i) { var u = i(24) , c = i(51) , d = i(73); t.exports = function(t, e, i, n, s, r, o) { for (var a = -1 !== o.collideIndexes.indexOf(t), h = u(e, i, n, s, null, o), l = 0; l < h.length; l++) h[l].index = t, d(h[l], a); r && c(e - 1, i - 1, n + 2, s + 2, o) } } , function(t, e, i) { var h = i(24); t.exports = function(t, e, i, n, s, r, o, a) { return h(i, n, s, r, o, a).filter(t, e) } } , function(t, e) { t.exports = function(t, e, i, n) { void 0 === e && (e = 0), void 0 === i && (i = !1); var s, r, o, a = 0; if (i) { for (r = n.height - 1; 0 <= r; r--) for (s = n.width - 1; 0 <= s; s--) if ((o = n.data[r][s]) && o.index === t) { if (a === e) return o; a += 1 } } else for (r = 0; r < n.height; r++) for (s = 0; s < n.width; s++) if ((o = n.data[r][s]) && o.index === t) { if (a === e) return o; a += 1 } return null } } , function(t, e, i) { var h = i(24); t.exports = function(t, e, i, n, s, r, o, a) { return h(i, n, s, r, o, a).find(t, e) || null } } , function(t, e, i) { var h = i(24); t.exports = function(t, e, i, n, s, r, o, a) { h(i, n, s, r, o, a).forEach(t, e) } } , function(t, e, i) { var a = i(142) , h = i(63) , l = i(64); t.exports = function(t, e, i, n, s) { var r = h(t, !0, n, s) , o = l(e, !0, n, s); return a(r, o, i, s) } } , function(t, e, i) { function y(t, e) { return w.RectangleToTriangle(e, t) } var x = i(430) , T = i(24) , w = i(431) , b = i(1) , E = i(143) , S = i(144) , _ = i(63) , A = i(64); t.exports = function(t, e, i, n) { if (void 0 === t) return []; var s = b; t instanceof x.Circle ? s = w.CircleToRectangle : t instanceof x.Rectangle ? s = w.RectangleToRectangle : t instanceof x.Triangle ? s = y : t instanceof x.Line && (s = w.LineToRectangle); var r = _(t.left, !0, i, n) , o = A(t.top, !0, i, n) , a = Math.ceil(_(t.right, !1, i, n)) , h = Math.ceil(A(t.bottom, !1, i, n)) , l = Math.max(a - r, 1) , u = Math.max(h - o, 1) , c = T(r, o, l, u, e, n) , d = n.tileWidth , f = n.tileHeight; n.tilemapLayer && (d *= n.tilemapLayer.scaleX, f *= n.tilemapLayer.scaleY); for (var p = [], g = new x.Rectangle(0,0,d,f), v = 0; v < c.length; v++) { var m = c[v]; g.x = E(m.x, i, n), g.y = S(m.y, i, n), s(t, g) && p.push(m) } return p } } , function(t, e, i) { var c = i(24) , d = i(63) , f = i(64); t.exports = function(t, e, i, n, s, r, o) { var a = d(t, !0, r, o) , h = f(e, !0, r, o) , l = Math.ceil(d(t + i, !1, r, o)) , u = Math.ceil(f(e + n, !1, r, o)); return c(a, h, l - a, u - h, s, o) } } , function(t, e, i) { var o = i(476) , a = i(63) , h = i(64); t.exports = function(t, e, i, n) { var s = a(t, !0, i, n) , r = h(e, !0, i, n); return o(s, r, n) } } , function(t, e, i) { var h = i(221) , l = i(63) , u = i(64); t.exports = function(t, e, i, n, s, r) { var o = l(e, !0, s, r) , a = u(i, !0, s, r); return h(t, o, a, n, r) } } , function(t, e, i) { var u = i(51) , c = i(221); t.exports = function(t, e, i, n, s) { if (!Array.isArray(t)) return null; void 0 === n && (n = !0), Array.isArray(t[0]) || (t = [t]); for (var r = t.length, o = t[0].length, a = 0; a < r; a++) for (var h = 0; h < o; h++) { var l = t[a][h]; c(l, e + h, i + a, !1, s) } n && u(e - 1, i - 1, o + 2, r + 2, s) } } , function(t, e, i) { var h = i(24) , l = i(185); t.exports = function(t, e, i, n, s, r) { var o, a = h(t, e, i, n, null, r); if (void 0 === s) for (s = [], o = 0; o < a.length; o++) -1 === s.indexOf(a[o].index) && s.push(a[o].index); for (o = 0; o < a.length; o++) a[o].index = l(s) } } , function(t, e, i) { var h = i(477) , l = i(63) , u = i(64); t.exports = function(t, e, i, n, s, r) { var o = l(t, !0, s, r) , a = u(e, !0, s, r); return h(o, a, i, n, r) } } , function(t, e, i) { var p = i(24) , n = i(354) , g = new n(105,210,231,150) , v = new n(243,134,48,200) , m = new n(40,39,37,150); t.exports = function(t, e, i) { void 0 === e && (e = {}); var n = void 0 !== e.tileColor ? e.tileColor : g , s = void 0 !== e.collidingTileColor ? e.collidingTileColor : v , r = void 0 !== e.faceColor ? e.faceColor : m , o = p(0, 0, i.width, i.height, null, i); t.translateCanvas(i.tilemapLayer.x, i.tilemapLayer.y), t.scaleCanvas(i.tilemapLayer.scaleX, i.tilemapLayer.scaleY); for (var a = 0; a < o.length; a++) { var h = o[a] , l = h.width , u = h.height , c = h.pixelX , d = h.pixelY , f = h.collides ? s : n; null !== f && (t.fillStyle(f.color, f.alpha / 255), t.fillRect(c, d, l, u)), c += 1, d += 1, l -= 2, u -= 2, null !== r && (t.lineStyle(1, r.color, r.alpha / 255), h.faceTop && t.lineBetween(c, d, c + l, d), h.faceRight && t.lineBetween(c + l, d, c + l, d + u), h.faceBottom && t.lineBetween(c, d + u, c + l, d + u), h.faceLeft && t.lineBetween(c, d, c, d + u)) } } } , function(t, e, i) { var l = i(73) , u = i(51) , c = i(222); t.exports = function(t, e, i, n, s) { void 0 === e && (e = !0), void 0 === i && (i = !0), Array.isArray(t) || (t = [t]), void 0 === s && (s = !0); for (var r = 0; r < t.length; r++) c(t[r], e, n); if (s) for (var o = 0; o < n.height; o++) for (var a = 0; a < n.width; a++) { var h = n.data[o][a]; h && -1 !== t.indexOf(h.index) && l(h, e) } i && u(0, 0, n.width, n.height, n) } } , function(t, e, i) { var u = i(73) , c = i(51) , d = i(222); t.exports = function(t, e, i, n, s, r) { if (void 0 === i && (i = !0), void 0 === n && (n = !0), void 0 === r && (r = !0), !(e < t)) { for (var o = t; o <= e; o++) d(o, i, s); if (r) for (var a = 0; a < s.height; a++) for (var h = 0; h < s.width; h++) { var l = s.data[a][h]; l && l.index >= t && l.index <= e && u(l, i) } n && c(0, 0, s.width, s.height, s) } } } , function(t, e, i) { var a = i(73) , h = i(51) , l = i(222); t.exports = function(t, e, i, n) { void 0 === e && (e = !0), void 0 === i && (i = !0), Array.isArray(t) || (t = [t]); for (var s = 0; s < n.height; s++) for (var r = 0; r < n.width; r++) { var o = n.data[s][r]; o && -1 === t.indexOf(o.index) && (a(o, e), l(o.index, e, n)) } i && h(0, 0, n.width, n.height, n) } } , function(t, e, i) { var u = i(73) , c = i(51) , d = i(108); t.exports = function(t, e, i, n) { void 0 === e && (e = !0), void 0 === i && (i = !0); for (var s = 0; s < n.height; s++) for (var r = 0; r < n.width; r++) { var o = n.data[s][r]; if (o) for (var a in t) if (d(o.properties, a)) { var h = t[a]; Array.isArray(h) || (h = [h]); for (var l = 0; l < h.length; l++) o.properties[a] === h[l] && u(o, e) } } i && c(0, 0, n.width, n.height, n) } } , function(t, e, i) { var a = i(73) , h = i(51); t.exports = function(t, e, i) { void 0 === t && (t = !0), void 0 === e && (e = !0); for (var n = 0; n < i.height; n++) for (var s = 0; s < i.width; s++) { var r, o = i.data[n][s]; o && ((r = o.getCollisionGroup()) && r.objects && 0 < r.objects.length && a(o, t)) } e && h(0, 0, i.width, i.height, i) } } , function(t, e) { t.exports = function(t, e, i, n) { if ("number" == typeof t) n.callbacks[t] = null !== e ? { callback: e, callbackContext: i } : void 0; else for (var s = 0, r = t.length; s < r; s++) n.callbacks[t[s]] = null !== e ? { callback: e, callbackContext: i } : void 0 } } , function(t, e, i) { var l = i(24); t.exports = function(t, e, i, n, s, r, o) { for (var a = l(t, e, i, n, null, o), h = 0; h < a.length; h++) a[h].setCollisionCallback(s, r) } } , function(t, e, i) { var h = i(24) , l = i(114); t.exports = function(t, e, i, n, s) { var r = h(t, e, i, n, null, s) , o = r.map(function(t) { return t.index }); l(o); for (var a = 0; a < r.length; a++) r[a].index = o[a] } } , function(t, e, i) { var l = i(24); t.exports = function(t, e, i, n, s, r, o) { for (var a = l(i, n, s, r, null, o), h = 0; h < a.length; h++) a[h] && (a[h].index === t ? a[h].index = e : a[h].index === e && (a[h].index = t)) } } , function(t, e, i) { var r = i(143) , o = i(144) , a = i(3); t.exports = function(t, e, i, n, s) { return void 0 === i && (i = new a(0,0)), i.x = r(t, n, s), i.y = o(e, n, s), i } } , function(t, e, i) { var p = i(24); t.exports = function(t, e, i, n, s, r) { if (void 0 !== s) { for (var o = p(t, e, i, n, null, r), a = 0, h = 0; h < s.length; h++) a += s[h].weight; if (!(a <= 0)) for (h = 0; h < o.length; h++) { for (var l = Math.random() * a, u = 0, c = -1, d = 0; d < s.length; d++) if (l <= (u += s[d].weight)) { var f = s[d].index , c = Array.isArray(f) ? f[Math.floor(Math.random() * f.length)] : f; break } o[h].index = c } } } } , function(t, e, i) { var o = i(63) , a = i(64) , h = i(3); t.exports = function(t, e, i, n, s, r) { return void 0 === n && (n = new h(0,0)), n.x = o(t, i, s, r), n.y = a(e, i, s, r), n } } , function(t, e, i) { t.exports = { Parse: i(478), Parse2DArray: i(223), ParseCSV: i(479), Impact: i(1343), Tiled: i(1344) } } , function(t, e, i) { t.exports = { ParseTileLayers: i(492), ParseTilesets: i(493), ParseWeltmeister: i(491) } } , function(t, e, i) { t.exports = { AssignTileProperties: i(490), Base64Decode: i(482), BuildTilesetIndex: i(489), ParseGID: i(224), ParseImageLayers: i(483), ParseJSONTiled: i(480), ParseObject: i(226), ParseObjectLayers: i(487), ParseTileLayers: i(481), ParseTilesets: i(484) } } , function(t, e, i) { var n = i(1) , s = i(1) , n = i(1346) , s = i(1347); t.exports = { renderWebGL: n, renderCanvas: s } } , function(t, e, i) { var R = i(9); t.exports = function(t, e, i, n) { e.cull(n); var s = e.culledTiles , r = s.length , o = n.alpha * e.alpha; if (!(0 === r || o <= 0)) for (var a = e.gidMap, h = e.pipeline, l = R.getTintAppendFloatAlphaAndSwap, u = e.scrollFactorX, c = e.scrollFactorY, d = e.x, f = e.y, p = e.scaleX, g = e.scaleY, v = e.tileset, m = 0; m < v.length; m++) for (var y = v[m], x = y.glTexture, T = 0; T < r; T++) { var w, b, E, S, _, A, C, M, P = s[T], O = a[P.index]; O === y && (null !== (w = O.getTileTextureCoordinates(P.index)) && (b = P.width, E = P.height, S = w.x, _ = w.y, A = .5 * P.width, C = .5 * P.height, M = l(P.tint, o * P.alpha), h.batchTexture(e, x, x.width, x.height, d + (A + P.pixelX) * p, f + (C + P.pixelY) * g, P.width, P.height, p, g, P.rotation, P.flipX, P.flipY, u, c, A, C, S, _, b, E, M, M, M, M, !1, 0, 0, n, null, !0))) } } } , function(t, e) { t.exports = function(t, e, i, n, s) { e.cull(n); var r = e.culledTiles , o = r.length; if (0 !== o) { var a = t._tempMatrix1 , h = t._tempMatrix2 , l = t._tempMatrix3; h.applyITRS(e.x, e.y, e.rotation, e.scaleX, e.scaleY), a.copyFrom(n.matrix); var u = t.currentContext , c = e.gidMap; u.save(), s ? (a.multiplyWithOffset(s, -n.scrollX * e.scrollFactorX, -n.scrollY * e.scrollFactorY), h.e = e.x, h.f = e.y, a.multiply(h, l), l.copyToContext(u)) : (h.e -= n.scrollX * e.scrollFactorX, h.f -= n.scrollY * e.scrollFactorY, h.copyToContext(u)); var d = n.alpha * e.alpha; (!t.antialias || 1 < e.scaleX || 1 < e.scaleY) && (u.imageSmoothingEnabled = !1); for (var f = 0; f < o; f++) { var p, g, v, m, y = r[f], x = c[y.index]; x && (p = x.image.getSourceImage(), (g = x.getTileTextureCoordinates(y.index)) && (v = y.width / 2, m = y.height / 2, u.save(), u.translate(y.pixelX + v, y.pixelY + m), 0 !== y.rotation && u.rotate(y.rotation), (y.flipX || y.flipY) && u.scale(y.flipX ? -1 : 1, y.flipY ? -1 : 1), u.globalAlpha = d * y.alpha, u.drawImage(p, g.x, g.y, y.width, y.height, -v, -m, y.width, y.height), u.restore())) } u.restore() } } } , function(t, e, i) { var n = i(1) , s = i(1) , n = i(1349) , s = i(1350); t.exports = { renderWebGL: n, renderCanvas: s } } , function(t, e) { t.exports = function(t, e, i, n) { var s = e.tileset , r = e.pipeline , o = r.vertexBuffer; t.setPipeline(r), r.modelIdentity(), r.modelTranslate(e.x - n.scrollX * e.scrollFactorX, e.y - n.scrollY * e.scrollFactorY, 0), r.modelScale(e.scaleX, e.scaleY, 1), r.viewLoad2D(n.matrix.matrix); for (var a = 0; a < s.length; a++) e.upload(n, a), 0 < e.vertexCount[a] && (t.currentPipeline && 0 < t.currentPipeline.vertexCount && t.flush(), r.vertexBuffer = e.vertexBuffer[a], t.setPipeline(r), t.setTexture2D(s[a].glTexture, 0), t.gl.drawArrays(r.topology, 0, e.vertexCount[a])); r.vertexBuffer = o, r.viewIdentity(), r.modelIdentity() } } , function(t, e) { t.exports = function(t, e, i, n, s) { e.cull(n); var r = e.culledTiles , o = r.length; if (0 !== o) { var a = t._tempMatrix1 , h = t._tempMatrix2 , l = t._tempMatrix3; h.applyITRS(e.x, e.y, e.rotation, e.scaleX, e.scaleY), a.copyFrom(n.matrix); var u = t.currentContext , c = e.gidMap; u.save(), s ? (a.multiplyWithOffset(s, -n.scrollX * e.scrollFactorX, -n.scrollY * e.scrollFactorY), h.e = e.x, h.f = e.y, a.multiply(h, l), l.copyToContext(u)) : (h.e -= n.scrollX * e.scrollFactorX, h.f -= n.scrollY * e.scrollFactorY, h.copyToContext(u)); var d = n.alpha * e.alpha; (!t.antialias || 1 < e.scaleX || 1 < e.scaleY) && (u.imageSmoothingEnabled = !1); for (var f = 0; f < o; f++) { var p, g, v, m, y, x, T = r[f], w = c[T.index]; w && (p = w.image.getSourceImage(), (g = w.getTileTextureCoordinates(T.index)) && (y = (v = w.tileWidth) / 2, x = (m = w.tileHeight) / 2, u.save(), u.translate(T.pixelX + y, T.pixelY + x), 0 !== T.rotation && u.rotate(T.rotation), (T.flipX || T.flipY) && u.scale(T.flipX ? -1 : 1, T.flipY ? -1 : 1), u.globalAlpha = d * T.alpha, u.drawImage(p, g.x, g.y, v, m, -y, -x, v, m), u.restore())) } u.restore() } } } , function(t, e, i) { var n = i(16) , s = i(227); n.register("tilemap", function(t) { var e = void 0 !== t ? t : {}; return s(this.scene, e.key, e.tileWidth, e.tileHeight, e.width, e.height, e.data, e.insertNull) }) } , function(t, e, i) { var n = i(5) , a = i(227); n.register("tilemap", function(t, e, i, n, s, r, o) { return null === t && (t = void 0), null === e && (e = void 0), null === i && (i = void 0), null === n && (n = void 0), null === s && (s = void 0), a(this.scene, t, e, i, n, s, r, o) }) } , function(t, e, i) { t.exports = { Clock: i(1354), TimerEvent: i(497) } } , function(t, e, i) { var n = i(0) , s = i(23) , r = i(22) , o = i(497) , a = new n({ initialize: function(t) { this.scene = t, this.systems = t.sys, this.now = 0, this.timeScale = 1, this.paused = !1, this._active = [], this._pendingInsertion = [], this._pendingRemoval = [], t.sys.events.once(r.BOOT, this.boot, this), t.sys.events.on(r.START, this.start, this) }, boot: function() { this.now = this.systems.game.loop.time, this.systems.events.once(r.DESTROY, this.destroy, this) }, start: function() { var t = this.systems.events; t.on(r.PRE_UPDATE, this.preUpdate, this), t.on(r.UPDATE, this.update, this), t.once(r.SHUTDOWN, this.shutdown, this) }, addEvent: function(t) { var e = new o(t); return this._pendingInsertion.push(e), e }, delayedCall: function(t, e, i, n) { return this.addEvent({ delay: t, callback: e, args: i, callbackScope: n }) }, clearPendingEvents: function() { return this._pendingInsertion = [], this }, removeAllEvents: function() { return this._pendingRemoval = this._pendingRemoval.concat(this._active), this }, preUpdate: function() { var t = this._pendingRemoval.length , e = this._pendingInsertion.length; if (0 !== t || 0 !== e) { for (var i, n = 0; n < t; n++) { i = this._pendingRemoval[n]; var s = this._active.indexOf(i); -1 < s && this._active.splice(s, 1), i.destroy() } for (n = 0; n < e; n++) i = this._pendingInsertion[n], this._active.push(i); this._pendingRemoval.length = 0, this._pendingInsertion.length = 0 } }, update: function(t, e) { if (this.now = t, !this.paused) { e *= this.timeScale; for (var i = 0; i < this._active.length; i++) { var n, s = this._active[i]; s.paused || (s.elapsed += e * s.timeScale, s.elapsed >= s.delay && (n = s.elapsed - s.delay, s.elapsed = s.delay, !s.hasDispatched && s.callback && (s.hasDispatched = !0, s.callback.apply(s.callbackScope, s.args)), 0 < s.repeatCount ? (s.repeatCount--, s.elapsed = n, s.hasDispatched = !1) : this._pendingRemoval.push(s))) } } }, shutdown: function() { for (var t = 0; t < this._pendingInsertion.length; t++) this._pendingInsertion[t].destroy(); for (t = 0; t < this._active.length; t++) this._active[t].destroy(); for (t = 0; t < this._pendingRemoval.length; t++) this._pendingRemoval[t].destroy(); this._active.length = 0, this._pendingRemoval.length = 0, this._pendingInsertion.length = 0; var e = this.systems.events; e.off(r.PRE_UPDATE, this.preUpdate, this), e.off(r.UPDATE, this.update, this), e.off(r.SHUTDOWN, this.shutdown, this) }, destroy: function() { this.shutdown(), this.scene.sys.events.off(r.START, this.start, this), this.scene = null, this.systems = null } }); s.register("Clock", a, "time"), t.exports = a } , function(t, e, i) { var n = i(89) , s = i(18)(!1, s = { Builders: i(1356), Events: i(232), TweenManager: i(1372), Tween: i(231), TweenData: i(233), Timeline: i(503) }, n); t.exports = s } , function(t, e, i) { t.exports = { GetBoolean: i(88), GetEaseFunction: i(69), GetNewValue: i(145), GetProps: i(498), GetTargets: i(228), GetTweens: i(499), GetValueOp: i(229), NumberTweenBuilder: i(500), StaggerBuilder: i(501), TimelineBuilder: i(502), TweenBuilder: i(146) } } , function(t, e) { t.exports = ["callbackScope", "completeDelay", "delay", "duration", "ease", "easeParams", "flipX", "flipY", "hold", "loop", "loopDelay", "offset", "onActive", "onActiveParams", "onActiveScope", "onComplete", "onCompleteParams", "onCompleteScope", "onLoop", "onLoopParams", "onLoopScope", "onRepeat", "onRepeatParams", "onRepeatScope", "onStart", "onStartParams", "onStartScope", "onStop", "onStopParams", "onStopScope", "onUpdate", "onUpdateParams", "onUpdateScope", "onYoyo", "onYoyoParams", "onYoyoScope", "paused", "props", "repeat", "repeatDelay", "targets", "useFrames", "yoyo"] } , function(t, e) { t.exports = "complete" } , function(t, e) { t.exports = "loop" } , function(t, e) { t.exports = "pause" } , function(t, e) { t.exports = "resume" } , function(t, e) { t.exports = "start" } , function(t, e) { t.exports = "update" } , function(t, e) { t.exports = "active" } , function(t, e) { t.exports = "complete" } , function(t, e) { t.exports = "loop" } , function(t, e) { t.exports = "repeat" } , function(t, e) { t.exports = "start" } , function(t, e) { t.exports = "stop" } , function(t, e) { t.exports = "update" } , function(t, e) { t.exports = "yoyo" } , function(t, e, i) { var n = i(123) , s = i(0) , r = i(500) , o = i(23) , a = i(22) , h = i(501) , l = i(502) , u = i(89) , c = i(146) , d = new s({ initialize: function(t) { this.scene = t, this.systems = t.sys, this.timeScale = 1, this._add = [], this._pending = [], this._active = [], this._destroy = [], this._toProcess = 0, t.sys.events.once(a.BOOT, this.boot, this), t.sys.events.on(a.START, this.start, this) }, boot: function() { this.systems.events.once(a.DESTROY, this.destroy, this) }, start: function() { var t = this.systems.events; t.on(a.PRE_UPDATE, this.preUpdate, this), t.on(a.UPDATE, this.update, this), t.once(a.SHUTDOWN, this.shutdown, this), this.timeScale = 1 }, createTimeline: function(t) { return l(this, t) }, timeline: function(t) { var e = l(this, t); return e.paused || (this._add.push(e), this._toProcess++), e }, create: function(t) { return c(this, t) }, add: function(t) { var e = c(this, t); return this._add.push(e), this._toProcess++, e }, existing: function(t) { return this._add.push(t), this._toProcess++, this }, addCounter: function(t) { var e = r(this, t); return this._add.push(e), this._toProcess++, e }, stagger: function(t, e) { return h(t, e) }, preUpdate: function() { if (0 !== this._toProcess) { for (var t, e = this._destroy, i = this._active, n = this._pending, s = 0; s < e.length; s++) { t = e[s]; var r = i.indexOf(t); -1 === r ? -1 < (r = n.indexOf(t)) && (t.state = u.REMOVED, n.splice(r, 1)) : (t.state = u.REMOVED, i.splice(r, 1)) } for (e.length = 0, e = this._add, s = 0; s < e.length; s++) (t = e[s]).state === u.PENDING_ADD && (t.init() ? (t.play(), this._active.push(t)) : this._pending.push(t)); e.length = 0, this._toProcess = 0 } }, update: function(t, e) { var i, n = this._active; e *= this.timeScale; for (var s = 0; s < n.length; s++) (i = n[s]).update(t, e) && (this._destroy.push(i), this._toProcess++) }, remove: function(t) { return n(this._add, t), n(this._pending, t), n(this._active, t), n(this._destroy, t), t.state = u.REMOVED, this }, makeActive: function(t) { if (-1 !== this._add.indexOf(t) || -1 !== this._active.indexOf(t)) return this; var e = this._pending.indexOf(t); return -1 !== e && this._pending.splice(e, 1), this._add.push(t), t.state = u.PENDING_ADD, this._toProcess++, this }, each: function(t, e) { for (var i = [null], n = 1; n < arguments.length; n++) i.push(arguments[n]); for (var s in this.list) i[0] = this.list[s], t.apply(e, i) }, getAllTweens: function() { for (var t = this._active, e = [], i = 0; i < t.length; i++) e.push(t[i]); return e }, getGlobalTimeScale: function() { return this.timeScale }, getTweensOf: function(t) { var e, i, n = this._active, s = []; if (Array.isArray(t)) for (i = 0; i < n.length; i++) { e = n[i]; for (var r = 0; r < t.length; r++) e.hasTarget(t[r]) && s.push(e) } else for (i = 0; i < n.length; i++) (e = n[i]).hasTarget(t) && s.push(e); return s }, isTweening: function(t) { for (var e, i = this._active, n = 0; n < i.length; n++) if ((e = i[n]).hasTarget(t) && e.isPlaying()) return !0; return !1 }, killAll: function() { for (var t = this.getAllTweens(), e = 0; e < t.length; e++) t[e].stop(); return this }, killTweensOf: function(t) { for (var e = this.getTweensOf(t), i = 0; i < e.length; i++) e[i].stop(); return this }, pauseAll: function() { for (var t = this._active, e = 0; e < t.length; e++) t[e].pause(); return this }, resumeAll: function() { for (var t = this._active, e = 0; e < t.length; e++) t[e].resume(); return this }, setGlobalTimeScale: function(t) { return this.timeScale = t, this }, shutdown: function() { this.killAll(), this._add = [], this._pending = [], this._active = [], this._destroy = [], this._toProcess = 0; var t = this.systems.events; t.off(a.PRE_UPDATE, this.preUpdate, this), t.off(a.UPDATE, this.update, this), t.off(a.SHUTDOWN, this.shutdown, this) }, destroy: function() { this.shutdown(), this.scene.sys.events.off(a.START, this.start, this), this.scene = null, this.systems = null } }); o.register("TweenManager", d, "tweens"), t.exports = d } , function(t, e, i) { t.exports = { Array: i(183), Base64: i(1374), Objects: i(1376), String: i(1380) } } , function(t, e, i) { t.exports = { ArrayBufferToBase64: i(1375), Base64ToArrayBuffer: i(388) } } , function(t, e) { var o = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; t.exports = function(t, e) { for (var i = new Uint8Array(t), n = i.length, s = e ? "data:" + e + ";base64," : "", r = 0; r < n; r += 3) s += o[i[r] >> 2], s += o[(3 & i[r]) << 4 | i[r + 1] >> 4], s += o[(15 & i[r + 1]) << 2 | i[r + 2] >> 6], s += o[63 & i[r + 2]]; return n % 3 == 2 ? s = s.substring(0, s.length - 1) + "=" : n % 3 == 1 && (s = s.substring(0, s.length - 2) + "=="), s } } , function(t, e, i) { t.exports = { Clone: i(67), Extend: i(18), GetAdvancedValue: i(15), GetFastValue: i(2), GetMinMaxValue: i(1377), GetValue: i(6), HasAll: i(1378), HasAny: i(407), HasValue: i(108), IsPlainObject: i(7), Merge: i(126), MergeRight: i(1379), Pick: i(486), SetValue: i(427) } } , function(t, e, i) { var o = i(6) , a = i(19); t.exports = function(t, e, i, n, s) { void 0 === s && (s = i); var r = o(t, e, s); return a(r, i, n) } } , function(t, e) { t.exports = function(t, e) { for (var i = 0; i < e.length; i++) if (!t.hasOwnProperty(e[i])) return !1; return !0 } } , function(t, e, i) { var s = i(67); t.exports = function(t, e) { var i = s(t); for (var n in e) i.hasOwnProperty(n) && (i[n] = e[n]); return i } } , function(t, e, i) { t.exports = { Format: i(1381), Pad: i(163), Reverse: i(1382), UppercaseFirst: i(181), UUID: i(196) } } , function(t, e) { t.exports = function(t, i) { return t.replace(/%([0-9]+)/g, function(t, e) { return i[Number(e) - 1] }) } } , function(t, e) { t.exports = function(t) { return t.split("").reverse().join("") } } , function(t, e, i) { t.exports = { SoundManagerCreator: i(380), Events: i(59), BaseSound: i(128), BaseSoundManager: i(127), WebAudioSound: i(389), WebAudioSoundManager: i(387), HTML5AudioSound: i(384), HTML5AudioSoundManager: i(381), NoAudioSound: i(386), NoAudioSoundManager: i(385) } } , function(t, e, i) { var n = i(0) , r = i(3) , s = new n({ initialize: function() { this.boundsCenter = new r, this.centerDiff = new r }, parseBody: function(t) { if (!(t = t.hasOwnProperty("body") ? t.body : t).hasOwnProperty("bounds") || !t.hasOwnProperty("centerOfMass")) return !1; var e = this.boundsCenter , i = this.centerDiff , n = t.bounds.max.x - t.bounds.min.x , s = t.bounds.max.y - t.bounds.min.y , r = n * t.centerOfMass.x , o = s * t.centerOfMass.y; return e.set(n / 2, s / 2), i.set(r - e.x, o - e.y), !0 }, getTopLeft: function(t, e, i) { if (void 0 === e && (e = 0), void 0 === i && (i = 0), this.parseBody(t)) { var n = this.boundsCenter , s = this.centerDiff; return new r(e + n.x + s.x,i + n.y + s.y) } return !1 }, getTopCenter: function(t, e, i) { if (void 0 === e && (e = 0), void 0 === i && (i = 0), this.parseBody(t)) { var n = this.boundsCenter , s = this.centerDiff; return new r(e + s.x,i + n.y + s.y) } return !1 }, getTopRight: function(t, e, i) { if (void 0 === e && (e = 0), void 0 === i && (i = 0), this.parseBody(t)) { var n = this.boundsCenter , s = this.centerDiff; return new r(e - (n.x - s.x),i + n.y + s.y) } return !1 }, getLeftCenter: function(t, e, i) { if (void 0 === e && (e = 0), void 0 === i && (i = 0), this.parseBody(t)) { var n = this.boundsCenter , s = this.centerDiff; return new r(e + n.x + s.x,i + s.y) } return !1 }, getCenter: function(t, e, i) { if (void 0 === e && (e = 0), void 0 === i && (i = 0), this.parseBody(t)) { var n = this.centerDiff; return new r(e + n.x,i + n.y) } return !1 }, getRightCenter: function(t, e, i) { if (void 0 === e && (e = 0), void 0 === i && (i = 0), this.parseBody(t)) { var n = this.boundsCenter , s = this.centerDiff; return new r(e - (n.x - s.x),i + s.y) } return !1 }, getBottomLeft: function(t, e, i) { if (void 0 === e && (e = 0), void 0 === i && (i = 0), this.parseBody(t)) { var n = this.boundsCenter , s = this.centerDiff; return new r(e + n.x + s.x,i - (n.y - s.y)) } return !1 }, getBottomCenter: function(t, e, i) { if (void 0 === e && (e = 0), void 0 === i && (i = 0), this.parseBody(t)) { var n = this.boundsCenter , s = this.centerDiff; return new r(e + s.x,i - (n.y - s.y)) } return !1 }, getBottomRight: function(t, e, i) { if (void 0 === e && (e = 0), void 0 === i && (i = 0), this.parseBody(t)) { var n = this.boundsCenter , s = this.centerDiff; return new r(e - (n.x - s.x),i - (n.y - s.y)) } return !1 } }); t.exports = s } , function(t, e, i) { var c = i(109) , n = i(0) , d = i(1292) , o = i(219) , f = i(1293) , s = i(1396) , p = i(1387) , a = i(1388) , r = i(1297) , h = i(1294) , l = i(1295) , u = i(1425) , g = i(86) , v = new n({ initialize: function(t) { this.world = t, this.scene = t.scene, this.sys = t.scene.sys }, rectangle: function(t, e, i, n, s) { var r = c.rectangle(t, e, i, n, s); return this.world.add(r), r }, trapezoid: function(t, e, i, n, s, r) { var o = c.trapezoid(t, e, i, n, s, r); return this.world.add(o), o }, circle: function(t, e, i, n, s) { var r = c.circle(t, e, i, n, s); return this.world.add(r), r }, polygon: function(t, e, i, n, s) { var r = c.polygon(t, e, i, n, s); return this.world.add(r), r }, fromVertices: function(t, e, i, n, s, r, o) { "string" == typeof i && (i = g.fromPath(i)); var a = c.fromVertices(t, e, i, n, s, r, o); return this.world.add(a), a }, fromPhysicsEditor: function(t, e, i, n, s) { void 0 === s && (s = !0); var r = h.parseBody(t, e, i, n); return s && !this.world.has(r) && this.world.add(r), r }, fromSVG: function(t, e, i, n, s, r) { void 0 === n && (n = 1), void 0 === s && (s = {}), void 0 === r && (r = !0); for (var o = i.getElementsByTagName("path"), a = [], h = 0; h < o.length; h++) { var l = f.pathToVertices(o[h], 30); 1 !== n && g.scale(l, n, n), a.push(l) } var u = c.fromVertices(t, e, a, s); return r && this.world.add(u), u }, fromJSON: function(t, e, i, n, s) { void 0 === n && (n = {}), void 0 === s && (s = !0); var r = l.parseBody(t, e, i, n); return r && s && this.world.add(r), r }, imageStack: function(n, s, t, e, i, r, o, a, h) { void 0 === o && (o = 0), void 0 === a && (a = 0), void 0 === h && (h = {}); var l = this.world , u = this.sys.displayList; h.addToWorld = !1; var c = d.stack(t, e, i, r, o, a, function(t, e) { var i = new p(l,t,e,n,s,h); return u.add(i), i.body }); return l.add(c), c }, stack: function(t, e, i, n, s, r, o) { var a = d.stack(t, e, i, n, s, r, o); return this.world.add(a), a }, pyramid: function(t, e, i, n, s, r, o) { var a = d.pyramid(t, e, i, n, s, r, o); return this.world.add(a), a }, chain: function(t, e, i, n, s, r) { return d.chain(t, e, i, n, s, r) }, mesh: function(t, e, i, n, s) { return d.mesh(t, e, i, n, s) }, newtonsCradle: function(t, e, i, n, s) { var r = d.newtonsCradle(t, e, i, n, s); return this.world.add(r), r }, car: function(t, e, i, n, s) { var r = d.car(t, e, i, n, s); return this.world.add(r), r }, softBody: function(t, e, i, n, s, r, o, a, h, l) { var u = d.softBody(t, e, i, n, s, r, o, a, h, l); return this.world.add(u), u }, joint: function(t, e, i, n, s) { return this.constraint(t, e, i, n, s) }, spring: function(t, e, i, n, s) { return this.constraint(t, e, i, n, s) }, constraint: function(t, e, i, n, s) { void 0 === n && (n = 1), void 0 === s && (s = {}), s.bodyA = "body" === t.type ? t : t.body, s.bodyB = "body" === e.type ? e : e.body, isNaN(i) || (s.length = i), s.stiffness = n; var r = o.create(s); return this.world.add(r), r }, worldConstraint: function(t, e, i, n) { void 0 === i && (i = 1), void 0 === n && (n = {}), n.bodyB = "body" === t.type ? t : t.body, isNaN(e) || (n.length = e), n.stiffness = i; var s = o.create(n); return this.world.add(s), s }, mouseSpring: function(t) { return this.pointerConstraint(t) }, pointerConstraint: function(t) { void 0 === t && (t = {}), t.hasOwnProperty("render") || (t.render = { visible: !1 }); var e = new u(this.scene,this.world,t); return this.world.add(e.constraint), e }, image: function(t, e, i, n, s) { var r = new p(this.world,t,e,i,n,s); return this.sys.displayList.add(r), r }, tileBody: function(t, e) { return new r(this.world,t,e) }, sprite: function(t, e, i, n, s) { var r = new a(this.world,t,e,i,n,s); return this.sys.displayList.add(r), this.sys.updateList.add(r), r }, gameObject: function(t, e, i) { return s(this.world, t, e, i) }, destroy: function() { this.world = null, this.scene = null, this.sys = null } }); t.exports = v } , function(t, e) { function s(t, e, i, n) { var s = e[0] - t[0] , r = e[1] - t[1] , o = n[0] - i[0] , a = n[1] - i[1]; if (o * r - a * s != 0) { var h = (s * (i[1] - t[1]) + r * (t[0] - i[0])) / (o * r - a * s) , l = (o * (t[1] - i[1]) + a * (i[0] - t[0])) / (a * s - o * r); return 0 <= h && h <= 1 && 0 <= l && l <= 1 } } function l(t, e, i) { return (e[0] - t[0]) * (i[1] - t[1]) - (i[0] - t[0]) * (e[1] - t[1]) } function S(t, e, i) { return 0 < l(t, e, i) } function _(t, e, i) { return 0 <= l(t, e, i) } function A(t, e, i) { return l(t, e, i) < 0 } function C(t, e, i) { return l(t, e, i) <= 0 } t.exports = { decomp: function(t) { var e = function t(e) { var i = [] , n = [] , s = [] , r = []; var o = Number.MAX_VALUE; for (var a = 0; a < e.length; ++a) if (R(e, a)) for (var h = 0; h < e.length; ++h) if (f(e, a, h)) { n = t(p(e, a, h, r)), s = t(p(e, h, a, r)); for (var l = 0; l < s.length; l++) n.push(s[l]); n.length < o && (o = (i = n).length, i.push([P(e, a), P(e, h)])) } return i }(t); return 0 < e.length ? function t(e, i) { if (0 === i.length) return [e]; { if (i instanceof Array && i.length && i[0]instanceof Array && 2 === i[0].length && i[0][0]instanceof Array) { for (var n = [e], s = 0; s < i.length; s++) for (var r = i[s], o = 0; o < n.length; o++) { var a = n[o] , h = t(a, r); if (h) { n.splice(o, 1), n.push(h[0], h[1]); break } } return n } var r = i , s = e.indexOf(r[0]) , o = e.indexOf(r[1]); return -1 !== s && -1 !== o && [p(e, s, o), p(e, o, s)] } }(t, e) : [t] }, quickDecomp: function t(e, i, n, s, r, o, a) { o = o || 100; a = a || 0; r = r || 25; i = void 0 !== i ? i : []; n = n || []; s = s || []; var h = [0, 0] , l = [0, 0] , u = [0, 0]; var c = 0 , d = 0 , f = 0 , p = 0; var g = 0 , v = 0 , m = 0; var y = [] , x = []; var T = e , w = e; if (w.length < 3) return i; a++; if (o < a) return console.warn("quickDecomp: max level (" + o + ") reached."), i; for (var b = 0; b < e.length; ++b) if (R(T, b)) { n.push(T[b]), c = d = Number.MAX_VALUE; for (var E = 0; E < e.length; ++E) S(P(T, b - 1), P(T, b), P(T, E)) && C(P(T, b - 1), P(T, b), P(T, E - 1)) && (u = k(P(T, b - 1), P(T, b), P(T, E), P(T, E - 1)), A(P(T, b + 1), P(T, b), u) && (f = M(T[b], u)) < d && (d = f, l = u, v = E)), S(P(T, b + 1), P(T, b), P(T, E + 1)) && C(P(T, b + 1), P(T, b), P(T, E)) && (u = k(P(T, b + 1), P(T, b), P(T, E), P(T, E + 1)), S(P(T, b - 1), P(T, b), u) && (f = M(T[b], u)) < c && (c = f, h = u, g = E)); if (v === (g + 1) % e.length) u[0] = (l[0] + h[0]) / 2, u[1] = (l[1] + h[1]) / 2, s.push(u), b < g ? (O(y, T, b, g + 1), y.push(u), x.push(u), 0 !== v && O(x, T, v, T.length), O(x, T, 0, b + 1)) : (0 !== b && O(y, T, b, T.length), O(y, T, 0, g + 1), y.push(u), x.push(u), O(x, T, v, b + 1)); else { if (g < v && (g += e.length), p = Number.MAX_VALUE, g < v) return i; for (var E = v; E <= g; ++E) _(P(T, b - 1), P(T, b), P(T, E)) && C(P(T, b + 1), P(T, b), P(T, E)) && (f = M(P(T, b), P(T, E))) < p && L(T, b, E) && (p = f, m = E % e.length); b < m ? (O(y, T, b, m + 1), 0 !== m && O(x, T, m, w.length), O(x, T, 0, b + 1)) : (0 !== b && O(y, T, b, w.length), O(y, T, 0, m + 1), O(x, T, m, b + 1)) } return y.length < x.length ? (t(y, i, n, s, r, o, a), t(x, i, n, s, r, o, a)) : (t(x, i, n, s, r, o, a), t(y, i, n, s, r, o, a)), i } i.push(e); return i }, isSimple: function(t) { var e, i = t; for (e = 0; e < i.length - 1; e++) for (var n = 0; n < e - 1; n++) if (s(i[e], i[e + 1], i[n], i[n + 1])) return !1; for (e = 1; e < i.length - 2; e++) if (s(i[0], i[i.length - 1], i[e], i[e + 1])) return !1; return !0 }, removeCollinearPoints: function(t, e) { for (var i = 0, n = t.length - 1; 3 < t.length && 0 <= n; --n) !function(t, e, i, n) { { if (n) { var s = u , r = c; s[0] = e[0] - t[0], s[1] = e[1] - t[1], r[0] = i[0] - e[0], r[1] = i[1] - e[1]; var o = s[0] * r[0] + s[1] * r[1] , a = Math.sqrt(s[0] * s[0] + s[1] * s[1]) , h = Math.sqrt(r[0] * r[0] + r[1] * r[1]); return Math.acos(o / (a * h)) < n } return 0 === l(t, e, i) } }(P(t, n - 1), P(t, n), P(t, n + 1), e) || (t.splice(n % t.length, 1), i++); return i }, removeDuplicatePoints: function(t, e) { for (var i = t.length - 1; 1 <= i; --i) for (var n = t[i], s = i - 1; 0 <= s; --s) !function(t, e, i) { return g(t[0], e[0], i) && g(t[1], e[1], i) }(n, t[s], e) || t.splice(i, 1) }, makeCCW: function(t) { for (var e = 0, i = t, n = 1; n < t.length; ++n) (i[n][1] < i[e][1] || i[n][1] === i[e][1] && i[n][0] > i[e][0]) && (e = n); return !S(P(t, e - 1), P(t, e), P(t, e + 1)) && (function(t) { for (var e = [], i = t.length, n = 0; n !== i; n++) e.push(t.pop()); for (n = 0; n !== i; n++) t[n] = e[n] }(t), !0) } }; var u = [] , c = []; function M(t, e) { var i = e[0] - t[0] , n = e[1] - t[1]; return i * i + n * n } function P(t, e) { var i = t.length; return t[e < 0 ? e % i + i : e % i] } function O(t, e, i, n) { for (var s = i; s < n; s++) t.push(e[s]) } function R(t, e) { return A(P(t, e - 1), P(t, e), P(t, e + 1)) } var h = [] , d = []; function f(t, e, i) { var n, s, r = h, o = d; if (!_(P(t, e + 1), P(t, e), P(t, i)) || !C(P(t, e - 1), P(t, e), P(t, i))) { s = M(P(t, e), P(t, i)); for (var a = 0; a !== t.length; ++a) if ((a + 1) % t.length !== e && a !== e && _(P(t, e), P(t, i), P(t, a + 1)) && C(P(t, e), P(t, i), P(t, a)) && (r[0] = P(t, e), r[1] = P(t, i), o[0] = P(t, a), o[1] = P(t, a + 1), n = function(t, e, i) { i = i || 0; var n = [0, 0] , s = t[1][1] - t[0][1] , r = t[0][0] - t[1][0] , o = s * t[0][0] + r * t[0][1] , a = e[1][1] - e[0][1] , h = e[0][0] - e[1][0] , l = a * e[0][0] + h * e[0][1] , u = s * h - a * r; return g(u, 0, i) || (n[0] = (h * o - r * l) / u, n[1] = (s * l - a * o) / u), n }(r, o), M(P(t, e), n) < s)) return; return 1 } } function L(t, e, i) { for (var n = 0; n !== t.length; ++n) if (n !== e && n !== i && (n + 1) % t.length !== e && (n + 1) % t.length !== i && s(P(t, e), P(t, i), P(t, n), P(t, n + 1))) return; return 1 } function p(t, e, i, n) { var s = n || []; if (s.length = 0, e < i) for (var r = e; r <= i; r++) s.push(t[r]); else { for (r = 0; r <= i; r++) s.push(t[r]); for (r = e; r < t.length; r++) s.push(t[r]) } return s } function k(t, e, i, n, s) { s = s || 0; var r = e[1] - t[1] , o = t[0] - e[0] , a = r * t[0] + o * t[1] , h = n[1] - i[1] , l = i[0] - n[0] , u = h * i[0] + l * i[1] , c = r * l - h * o; return g(c, 0, s) ? [0, 0] : [(l * a - o * u) / c, (r * u - h * a) / c] } function g(t, e, i) { return i = i || 0, Math.abs(t - e) <= i } } , function(t, e, i) { var n = i(0) , s = i(514) , a = i(14) , h = i(2) , r = i(107) , o = i(156) , l = i(3) , u = new n({ Extends: r, Mixins: [s.Bounce, s.Collision, s.Force, s.Friction, s.Gravity, s.Mass, s.Sensor, s.SetBody, s.Sleep, s.Static, s.Transform, s.Velocity, o], initialize: function(t, e, i, n, s, r) { a.call(this, t.scene, "Image"), this._crop = this.resetCropObject(), this.setTexture(n, s), this.setSizeToFrame(), this.setOrigin(), this.world = t, this._tempVec2 = new l(e,i); var o = h(r, "shape", null); o ? this.setBody(o, r) : this.setRectangle(this.width, this.height, r), this.setPosition(e, i), this.initPipeline("TextureTintPipeline") } }); t.exports = u } , function(t, e, i) { var a = i(504) , n = i(0) , s = i(514) , h = i(14) , l = i(2) , r = i(156) , o = i(75) , u = i(3) , c = new n({ Extends: o, Mixins: [s.Bounce, s.Collision, s.Force, s.Friction, s.Gravity, s.Mass, s.Sensor, s.SetBody, s.Sleep, s.Static, s.Transform, s.Velocity, r], initialize: function(t, e, i, n, s, r) { h.call(this, t.scene, "Sprite"), this._crop = this.resetCropObject(), this.anims = new a(this), this.setTexture(n, s), this.setSizeToFrame(), this.setOrigin(), this.world = t, this._tempVec2 = new u(e,i); var o = l(r, "shape", null); o ? this.setBody(o, r) : this.setRectangle(this.width, this.height, r), this.setPosition(e, i), this.initPipeline("TextureTintPipeline") } }); t.exports = c } , function(t, e, i) { var n = {}; t.exports = n; var s = i(1299) , r = i(42); n.name = "matter-js", n.version = "0.14.2", n.uses = [], n.used = [], n.use = function() { s.use(n, Array.prototype.slice.call(arguments)) } , n.before = function(t, e) { return t = t.replace(/^Matter./, ""), r.chainPathBefore(n, t, e) } , n.after = function(t, e) { return t = t.replace(/^Matter./, ""), r.chainPathAfter(n, t, e) } } , function(t, e, i) { var d = {}; t.exports = d; var f = i(99) , h = i(516) , l = i(100) , p = i(109) , a = i(86); d.collides = function(t, e) { for (var i = [], n = 0; n < e.length; n++) { var s = e[n]; if (t !== s && l.overlaps(s.bounds, t.bounds)) for (var r = 1 === s.parts.length ? 0 : 1; r < s.parts.length; r++) { var o = s.parts[r]; if (l.overlaps(o.bounds, t.bounds)) { var a = h.collides(o, t); if (a.collided) { i.push(a); break } } } } return i } , d.ray = function(t, e, i, n) { n = n || 1e-100; for (var s = f.angle(e, i), r = f.magnitude(f.sub(e, i)), o = .5 * (i.x + e.x), a = .5 * (i.y + e.y), h = p.rectangle(o, a, r, n, { angle: s }), l = d.collides(h, t), u = 0; u < l.length; u += 1) { var c = l[u]; c.body = c.bodyB = c.bodyA } return l } , d.region = function(t, e, i) { for (var n = [], s = 0; s < t.length; s++) { var r = t[s] , o = l.overlaps(r.bounds, e); (o && !i || !o && i) && n.push(r) } return n } , d.point = function(t, e) { for (var i = [], n = 0; n < t.length; n++) { var s = t[n]; if (l.contains(s.bounds, e)) for (var r = 1 === s.parts.length ? 0 : 1; r < s.parts.length; r++) { var o = s.parts[r]; if (l.contains(o.bounds, e) && a.contains(o.vertices, e)) { i.push(s); break } } } return i } } , function(t, e, i) { var p = {}; t.exports = p; var s = i(1300) , g = i(239) , v = i(1303) , m = i(1302) , y = i(1426) , r = i(1301) , x = i(240) , T = i(148) , w = i(219) , o = i(42) , a = i(62); p.create = function(t, e) { e = (e = o.isElement(t) ? e : t) || {}, ((t = o.isElement(t) ? t : null) || e.render) && o.warn("Engine.create: engine.render is deprecated (see docs)"); var i = { positionIterations: 6, velocityIterations: 4, constraintIterations: 2, enableSleeping: !1, events: [], plugin: {}, timing: { timestamp: 0, timeScale: 1 }, broadphase: { controller: r } } , n = o.extend(i, e); return n.world = e.world || s.create(n.world), n.pairs = m.create(), n.broadphase = n.broadphase.controller.create(n.broadphase), n.metrics = n.metrics || { extended: !1 }, n.metrics = y.create(n.metrics), n } , p.update = function(t, e, i) { e = e || 1e3 / 60, i = i || 1; var n, s = t.world, r = t.timing, o = t.broadphase, a = []; r.timestamp += e * r.timeScale; var h = { timestamp: r.timestamp }; x.trigger(t, "beforeUpdate", h); var l = T.allBodies(s) , u = T.allConstraints(s); for (y.reset(t.metrics), t.enableSleeping && g.update(l, r.timeScale), p._bodiesApplyGravity(l, s.gravity), p._bodiesUpdate(l, e, r.timeScale, i, s.bounds), w.preSolveAll(l), n = 0; n < t.constraintIterations; n++) w.solveAll(u, r.timeScale); w.postSolveAll(l), a = o.controller ? (s.isModified && o.controller.clear(o), o.controller.update(o, l, t, s.isModified), o.pairsList) : l, s.isModified && T.setModified(s, !1, !1, !0); var c = o.detector(a, t) , d = t.pairs , f = r.timestamp; for (m.update(d, c, f), m.removeOld(d, f), t.enableSleeping && g.afterCollisions(d.list, r.timeScale), 0 < d.collisionStart.length && x.trigger(t, "collisionStart", { pairs: d.collisionStart }), v.preSolvePosition(d.list), n = 0; n < t.positionIterations; n++) v.solvePosition(d.list, l, r.timeScale); for (v.postSolvePosition(l), w.preSolveAll(l), n = 0; n < t.constraintIterations; n++) w.solveAll(u, r.timeScale); for (w.postSolveAll(l), v.preSolveVelocity(d.list), n = 0; n < t.velocityIterations; n++) v.solveVelocity(d.list, r.timeScale); return 0 < d.collisionActive.length && x.trigger(t, "collisionActive", { pairs: d.collisionActive }), 0 < d.collisionEnd.length && x.trigger(t, "collisionEnd", { pairs: d.collisionEnd }), y.update(t.metrics, t), p._bodiesClearForces(l), x.trigger(t, "afterUpdate", h), t } , p.merge = function(t, e) { if (o.extend(t, e), e.world) { t.world = e.world, p.clear(t); for (var i = T.allBodies(t.world), n = 0; n < i.length; n++) { var s = i[n]; g.set(s, !1), s.id = o.nextId() } } } , p.clear = function(t) { var e = t.world; m.clear(t.pairs); var i, n = t.broadphase; n.controller && (i = T.allBodies(e), n.controller.clear(n), n.controller.update(n, i, t, !0)) } , p._bodiesClearForces = function(t) { for (var e = 0; e < t.length; e++) { var i = t[e]; i.force.x = 0, i.force.y = 0, i.torque = 0 } } , p._bodiesApplyGravity = function(t, e) { var i = void 0 !== e.scale ? e.scale : .001; if ((0 !== e.x || 0 !== e.y) && 0 !== i) for (var n = 0; n < t.length; n++) { var s = t[n]; s.ignoreGravity || s.isStatic || s.isSleeping || (s.force.x += s.mass * e.x * i * s.gravityScale.x, s.force.y += s.mass * e.y * i * s.gravityScale.y) } } , p._bodiesUpdate = function(t, e, i, n, s) { for (var r = 0; r < t.length; r++) { var o = t[r]; o.isStatic || o.isSleeping || a.update(o, e, i, n) } } } , function(t, e, i) { var o = i(109) , n = i(62) , s = i(0) , y = i(42) , u = i(148) , T = i(1391) , w = i(10) , a = i(1296) , b = i(2) , E = i(6) , r = i(62) , h = i(240) , l = i(1297) , c = i(1300) , x = i(99) , d = new s({ Extends: w, initialize: function(t, e) { w.call(this), this.scene = t, this.engine = T.create(e), this.localWorld = this.engine.world; var i = E(e, "gravity", null); i ? this.setGravity(i.x, i.y, i.scale) : !1 === i && this.setGravity(0, 0, 0), this.walls = { left: null, right: null, top: null, bottom: null }, this.enabled = E(e, "enabled", !0), this.correction = E(e, "correction", 1), this.getDelta = E(e, "getDelta", this.update60Hz); var n = b(e, "runner", {}) , s = b(n, "fps", !1) , r = b(n, "fps", 60) , o = b(n, "delta", 1e3 / r) , a = b(n, "deltaMin", 1e3 / r) , h = b(n, "deltaMax", 1e3 / (.5 * r)); s || (r = 1e3 / o), this.runner = { fps: r, correction: b(n, "correction", 1), deltaSampleSize: b(n, "deltaSampleSize", 60), counterTimestamp: 0, frameCounter: 0, deltaHistory: [], timePrev: null, timeScalePrev: 1, frameRequestId: null, isFixed: b(n, "isFixed", !1), delta: o, deltaMin: a, deltaMax: h }, this.autoUpdate = E(e, "autoUpdate", !0); var l, u, c, d, f, p, g, v, m, y, x = E(e, "debug", !1); this.drawDebug = "object" == typeof x || x, this.debugGraphic, this.debugConfig = { showAxes: b(x, "showAxes", !1), showAngleIndicator: b(x, "showAngleIndicator", !1), angleColor: b(x, "angleColor", 15208787), showBroadphase: b(x, "showBroadphase", !1), broadphaseColor: b(x, "broadphaseColor", 16757760), showBounds: b(x, "showBounds", !1), boundsColor: b(x, "boundsColor", 16777215), showVelocity: b(x, "showVelocity", !1), velocityColor: b(x, "velocityColor", 44783), showCollisions: b(x, "showCollisions", !1), collisionColor: b(x, "collisionColor", 16094476), showSeparations: b(x, "showSeparations", !1), separationColor: b(x, "separationColor", 16753920), showBody: b(x, "showBody", !0), showStaticBody: b(x, "showStaticBody", !0), showInternalEdges: b(x, "showInternalEdges", !1), renderFill: b(x, "renderFill", !1), renderLine: b(x, "renderLine", !0), fillColor: b(x, "fillColor", 1075465), fillOpacity: b(x, "fillOpacity", 1), lineColor: b(x, "lineColor", 2678297), lineOpacity: b(x, "lineOpacity", 1), lineThickness: b(x, "lineThickness", 1), staticFillColor: b(x, "staticFillColor", 857979), staticLineColor: b(x, "staticLineColor", 1255396), showSleeping: b(x, "showSleeping", !1), staticBodySleepOpacity: b(x, "staticBodySleepOpacity", .7), sleepFillColor: b(x, "sleepFillColor", 4605510), sleepLineColor: b(x, "sleepLineColor", 10066585), showSensors: b(x, "showSensors", !0), sensorFillColor: b(x, "sensorFillColor", 857979), sensorLineColor: b(x, "sensorLineColor", 1255396), showPositions: b(x, "showPositions", !0), positionSize: b(x, "positionSize", 4), positionColor: b(x, "positionColor", 14697178), showJoint: b(x, "showJoint", !0), jointColor: b(x, "jointColor", 14737474), jointLineOpacity: b(x, "jointLineOpacity", 1), jointLineThickness: b(x, "jointLineThickness", 2), pinSize: b(x, "pinSize", 4), pinColor: b(x, "pinColor", 4382944), springColor: b(x, "springColor", 14697184), anchorColor: b(x, "anchorColor", 15724527), anchorSize: b(x, "anchorSize", 4), showConvexHulls: b(x, "showConvexHulls", !1), hullColor: b(x, "hullColor", 14091216) }, this.drawDebug && this.createDebugGraphic(), this.setEventsProxy(), b(e, "setBounds", !1) && ("boolean" == typeof (l = e.setBounds) ? this.setBounds() : (u = b(l, "x", 0), c = b(l, "y", 0), d = b(l, "width", t.sys.scale.width), f = b(l, "height", t.sys.scale.height), p = b(l, "thickness", 64), g = b(l, "left", !0), v = b(l, "right", !0), m = b(l, "top", !0), y = b(l, "bottom", !0), this.setBounds(u, c, d, f, p, g, v, m, y))) }, setCompositeRenderStyle: function(t) { for (var e, i, n = t.bodies, s = t.constraints, r = t.composites, o = 0; o < n.length; o++) i = (e = n[o]).render, this.setBodyRenderStyle(e, i.lineColor, i.lineOpacity, i.lineThickness, i.fillColor, i.fillOpacity); for (o = 0; o < s.length; o++) i = (e = s[o]).render, this.setConstraintRenderStyle(e, i.lineColor, i.lineOpacity, i.lineThickness, i.pinSize, i.anchorColor, i.anchorSize); for (o = 0; o < r.length; o++) e = r[o], this.setCompositeRenderStyle(e); return this }, setBodyRenderStyle: function(t, e, i, n, s, r) { var o = t.render , a = this.debugConfig; return o && (null == e && (e = t.isStatic ? a.staticLineColor : a.lineColor), null == i && (i = a.lineOpacity), null == n && (n = a.lineThickness), null == s && (s = t.isStatic ? a.staticFillColor : a.fillColor), null == r && (r = a.fillOpacity), !1 !== e && (o.lineColor = e), !1 !== i && (o.lineOpacity = i), !1 !== n && (o.lineThickness = n), !1 !== s && (o.fillColor = s), !1 !== r && (o.fillOpacity = r)), this }, setConstraintRenderStyle: function(t, e, i, n, s, r, o) { var a, h = t.render, l = this.debugConfig; return h && (null == e && ("line" === (a = h.type) ? e = l.jointColor : "pin" === a ? e = l.pinColor : "spring" === a && (e = l.springColor)), null == i && (i = l.jointLineOpacity), null == n && (n = l.jointLineThickness), null == s && (s = l.pinSize), null == r && (r = l.anchorColor), null == o && (o = l.anchorSize), !1 !== e && (h.lineColor = e), !1 !== i && (h.lineOpacity = i), !1 !== n && (h.lineThickness = n), !1 !== s && (h.pinSize = s), !1 !== r && (h.anchorColor = r), !1 !== o && (h.anchorSize = o)), this }, setEventsProxy: function() { var r = this , t = this.engine , e = this.localWorld; this.drawDebug && (h.on(e, "compositeModified", function(t) { r.setCompositeRenderStyle(t) }), h.on(e, "beforeAdd", function(t) { for (var e = [].concat(t.object), i = 0; i < e.length; i++) { var n = e[i] , s = n.render; "body" === n.type ? r.setBodyRenderStyle(n, s.lineColor, s.lineOpacity, s.lineThickness, s.fillColor, s.fillOpacity) : "composite" === n.type ? r.setCompositeRenderStyle(n) : "constraint" === n.type && r.setConstraintRenderStyle(n, s.lineColor, s.lineOpacity, s.lineThickness, s.pinSize, s.anchorColor, s.anchorSize) } })), h.on(e, "beforeAdd", function(t) { r.emit(a.BEFORE_ADD, t) }), h.on(e, "afterAdd", function(t) { r.emit(a.AFTER_ADD, t) }), h.on(e, "beforeRemove", function(t) { r.emit(a.BEFORE_REMOVE, t) }), h.on(e, "afterRemove", function(t) { r.emit(a.AFTER_REMOVE, t) }), h.on(t, "beforeUpdate", function(t) { r.emit(a.BEFORE_UPDATE, t) }), h.on(t, "afterUpdate", function(t) { r.emit(a.AFTER_UPDATE, t) }), h.on(t, "collisionStart", function(t) { var e, i, n = t.pairs; 0 < n.length && (e = n[0].bodyA, i = n[0].bodyB), r.emit(a.COLLISION_START, t, e, i) }), h.on(t, "collisionActive", function(t) { var e, i, n = t.pairs; 0 < n.length && (e = n[0].bodyA, i = n[0].bodyB), r.emit(a.COLLISION_ACTIVE, t, e, i) }), h.on(t, "collisionEnd", function(t) { var e, i, n = t.pairs; 0 < n.length && (e = n[0].bodyA, i = n[0].bodyB), r.emit(a.COLLISION_END, t, e, i) }) }, setBounds: function(t, e, i, n, s, r, o, a, h) { return void 0 === t && (t = 0), void 0 === e && (e = 0), void 0 === i && (i = this.scene.sys.scale.width), void 0 === n && (n = this.scene.sys.scale.height), void 0 === s && (s = 64), void 0 === r && (r = !0), void 0 === o && (o = !0), void 0 === a && (a = !0), void 0 === h && (h = !0), this.updateWall(r, "left", t - s, e - s, s, n + 2 * s), this.updateWall(o, "right", t + i, e - s, s, n + 2 * s), this.updateWall(a, "top", t, e - s, i, s), this.updateWall(h, "bottom", t, e + n, i, s), this }, updateWall: function(t, e, i, n, s, r) { var o = this.walls[e]; t ? (o && c.remove(this.localWorld, o), i += s / 2, n += r / 2, this.walls[e] = this.create(i, n, s, r, { isStatic: !0, friction: 0, frictionStatic: 0 })) : (o && c.remove(this.localWorld, o), this.walls[e] = null) }, createDebugGraphic: function() { var t = this.scene.sys.add.graphics({ x: 0, y: 0 }); return t.setDepth(Number.MAX_VALUE), this.debugGraphic = t, this.drawDebug = !0, t }, disableGravity: function() { return this.localWorld.gravity.x = 0, this.localWorld.gravity.y = 0, this.localWorld.gravity.scale = 0, this }, setGravity: function(t, e, i) { return void 0 === t && (t = 0), void 0 === e && (e = 1), this.localWorld.gravity.x = t, this.localWorld.gravity.y = e, void 0 !== i && (this.localWorld.gravity.scale = i), this }, create: function(t, e, i, n, s) { var r = o.rectangle(t, e, i, n, s); return c.add(this.localWorld, r), r }, add: function(t) { return c.add(this.localWorld, t), this }, remove: function(t, e) { Array.isArray(t) || (t = [t]); for (var i = 0; i < t.length; i++) { var n = t[i] , s = n.body ? n.body : n; u.remove(this.localWorld, s, e) } return this }, removeConstraint: function(t, e) { return u.remove(this.localWorld, t, e), this }, convertTilemapLayer: function(t, e) { var i = t.layer , n = t.getTilesWithin(0, 0, i.width, i.height, { isColliding: !0 }); return this.convertTiles(n, e), this }, convertTiles: function(t, e) { if (0 === t.length) return this; for (var i = 0; i < t.length; i++) new l(this,t[i],e); return this }, nextGroup: function(t) { return r.nextGroup(t) }, nextCategory: function() { return r.nextCategory() }, pause: function() { return this.enabled = !1, this.emit(a.PAUSE), this }, resume: function() { return this.enabled = !0, this.emit(a.RESUME), this }, update: function(t, e) { var i, n, s, r; this.enabled && this.autoUpdate && (i = this.engine, n = this.runner, s = i.timing, r = this.correction, n.isFixed ? e = this.getDelta(t, e) : (e = t - n.timePrev || n.delta, n.timePrev = t, n.deltaHistory.push(e), n.deltaHistory = n.deltaHistory.slice(-n.deltaSampleSize), r = (e = (e = (e = Math.min.apply(null, n.deltaHistory)) < n.deltaMin ? n.deltaMin : e) > n.deltaMax ? n.deltaMax : e) / n.delta, n.delta = e), 0 !== n.timeScalePrev && (r *= s.timeScale / n.timeScalePrev), 0 === s.timeScale && (r = 0), n.timeScalePrev = s.timeScale, n.correction = r, n.frameCounter += 1, 1e3 <= t - n.counterTimestamp && (n.fps = n.frameCounter * ((t - n.counterTimestamp) / 1e3), n.counterTimestamp = t, n.frameCounter = 0), T.update(i, e, r)) }, step: function(t, e) { T.update(this.engine, t, e) }, update60Hz: function() { return 1e3 / 60 }, update30Hz: function() { return 1e3 / 30 }, has: function(t) { var e = t.hasOwnProperty("body") ? t.body : t; return null !== u.get(this.localWorld, e.id, e.type) }, getAllBodies: function() { return u.allBodies(this.localWorld) }, getAllConstraints: function() { return u.allConstraints(this.localWorld) }, getAllComposites: function() { return u.allComposites(this.localWorld) }, postUpdate: function() { var t, e, i, n; this.drawDebug && (t = this.debugConfig, e = this.engine, i = this.debugGraphic, n = u.allBodies(this.localWorld), this.debugGraphic.clear(), t.showBroadphase && e.broadphase.controller && this.renderGrid(e.broadphase, i, t.broadphaseColor, .5), t.showBounds && this.renderBodyBounds(n, i, t.boundsColor, .5), (t.showBody || t.showStaticBody) && this.renderBodies(n), t.showJoint && this.renderJoints(), (t.showAxes || t.showAngleIndicator) && this.renderBodyAxes(n, i, t.showAxes, t.angleColor, .5), t.showVelocity && this.renderBodyVelocity(n, i, t.velocityColor, 1, 2), t.showSeparations && this.renderSeparations(e.pairs.list, i, t.separationColor), t.showCollisions && this.renderCollisions(e.pairs.list, i, t.collisionColor)) }, renderGrid: function(t, e, i, n) { e.lineStyle(1, i, n); for (var s = y.keys(t.buckets), r = 0; r < s.length; r++) { var o, a = s[r]; t.buckets[a].length < 2 || (o = a.split(/C|R/), e.strokeRect(parseInt(o[1], 10) * t.bucketWidth, parseInt(o[2], 10) * t.bucketHeight, t.bucketWidth, t.bucketHeight)) } return this }, renderSeparations: function(t, e, i) { e.lineStyle(1, i, 1); for (var n = 0; n < t.length; n++) { var s, r, o, a, h, l, u, c = t[n]; c.isActive && (r = (s = c.collision).bodyA, o = s.bodyB, a = r.position, h = o.position, l = s.penetration, u = r.isStatic || o.isStatic ? 1 : 4, o.isStatic && (u = 0), e.lineBetween(h.x, h.y, h.x - l.x * u, h.y - l.y * u), u = r.isStatic || o.isStatic ? 1 : 4, r.isStatic && (u = 0), e.lineBetween(a.x, a.y, a.x - l.x * u, a.y - l.y * u)) } return this }, renderCollisions: function(t, e, i) { var n, s, r, o, a, h; for (e.lineStyle(1, i, .5), e.fillStyle(i, 1), n = 0; n < t.length; n++) if ((s = t[n]).isActive) for (var l = 0; l < s.activeContacts.length; l++) { var u = s.activeContacts[l].vertex; e.fillRect(u.x - 2, u.y - 2, 5, 5) } for (n = 0; n < t.length; n++) { (s = t[n]).isActive && (r = s.collision, 0 < (o = s.activeContacts).length && (a = o[0].vertex.x, h = o[0].vertex.y, 2 === o.length && (a = (o[0].vertex.x + o[1].vertex.x) / 2, h = (o[0].vertex.y + o[1].vertex.y) / 2), r.bodyB === r.supports[0].body || r.bodyA.isStatic ? e.lineBetween(a - 8 * r.normal.x, h - 8 * r.normal.y, a, h) : e.lineBetween(a + 8 * r.normal.x, h + 8 * r.normal.y, a, h))) } return this }, renderBodyBounds: function(t, e, i, n) { e.lineStyle(1, i, n); for (var s = 0; s < t.length; s++) { var r = t[s]; if (r.render.visible) { var o = r.bounds; if (o) e.strokeRect(o.min.x, o.min.y, o.max.x - o.min.x, o.max.y - o.min.y); else for (var a = r.parts, h = 1 < a.length ? 1 : 0; h < a.length; h++) { var l = a[h]; e.strokeRect(l.bounds.min.x, l.bounds.min.y, l.bounds.max.x - l.bounds.min.x, l.bounds.max.y - l.bounds.min.y) } } } return this }, renderBodyAxes: function(t, e, i, n, s) { e.lineStyle(1, n, s); for (var r = 0; r < t.length; r++) { var o, a, h, l = t[r], u = l.parts; if (l.render.visible) if (i) for (a = 1 < u.length ? 1 : 0; a < u.length; a++) for (o = u[a], h = 0; h < o.axes.length; h++) { var c = o.axes[h]; e.lineBetween(o.position.x, o.position.y, o.position.x + 20 * c.x, o.position.y + 20 * c.y) } else for (a = 1 < u.length ? 1 : 0; a < u.length; a++) for (o = u[a], h = 0; h < o.axes.length; h++) e.lineBetween(o.position.x, o.position.y, (o.vertices[0].x + o.vertices[o.vertices.length - 1].x) / 2, (o.vertices[0].y + o.vertices[o.vertices.length - 1].y) / 2) } return this }, renderBodyVelocity: function(t, e, i, n, s) { e.lineStyle(s, i, n); for (var r = 0; r < t.length; r++) { var o = t[r]; o.render.visible && e.lineBetween(o.position.x, o.position.y, o.position.x + 2 * (o.position.x - o.positionPrev.x), o.position.y + 2 * (o.position.y - o.positionPrev.y)) } return this }, renderBodies: function(t) { for (var e = this.debugGraphic, i = this.debugConfig, n = i.showBody, s = i.showStaticBody, r = i.showSleeping, o = i.showInternalEdges, a = i.showConvexHulls, h = i.renderFill, l = i.renderLine, u = i.staticBodySleepOpacity, c = i.sleepFillColor, d = i.sleepLineColor, f = i.hullColor, p = 0; p < t.length; p++) { var g, v, m, y, x, T, w = t[p]; w.render.visible && (!s && w.isStatic || !n && !w.isStatic || (g = w.render.lineColor, v = w.render.lineOpacity, m = w.render.lineThickness, y = w.render.fillColor, x = w.render.fillOpacity, r && w.isSleeping && (w.isStatic ? (v *= u, x *= u) : (g = d, y = c)), h || (y = null), l || (g = null), this.renderBody(w, e, o, g, v, m, y, x), T = w.parts.length, a && 1 < T && this.renderConvexHull(w, e, f, m))) } }, renderBody: function(t, e, i, n, s, r, o, a) { void 0 === n && (n = null), void 0 === s && (s = null), void 0 === r && (r = 1), void 0 === o && (o = null), void 0 === a && (a = null); for (var h, l, u, c = this.debugConfig, d = c.sensorFillColor, f = c.sensorLineColor, p = t.parts, g = p.length, v = 1 < g ? 1 : 0; v < g; v++) { var m = p[v] , y = m.render , x = y.opacity; if (y.visible && 0 !== x && (!m.isSensor || c.showSensors)) { var T = m.circleRadius; if (e.beginPath(), m.isSensor ? (null !== o && e.fillStyle(d, a * x), null !== n && e.lineStyle(r, f, s * x)) : (null !== o && e.fillStyle(o, a * x), null !== n && e.lineStyle(r, n, s * x)), T) e.arc(m.position.x, m.position.y, T, 0, 2 * Math.PI); else { var w = m.vertices , b = w.length; e.moveTo(w[0].x, w[0].y); for (var E = 1; E < b; E++) { var S, _ = w[E]; !w[E - 1].isInternal || i ? e.lineTo(_.x, _.y) : e.moveTo(_.x, _.y), E < b && _.isInternal && !i && (S = (E + 1) % b, e.moveTo(w[S].x, w[S].y)) } e.closePath() } null !== o && e.fillPath(), null !== n && e.strokePath() } } return c.showPositions && !t.isStatic && (h = t.position.x, l = t.position.y, u = Math.ceil(c.positionSize / 2), e.fillStyle(c.positionColor, 1), e.fillRect(h - u, l - u, c.positionSize, c.positionSize)), this }, renderConvexHull: function(t, e, i, n) { if (void 0 === n && (n = 1), 1 < t.parts.length) { var s = t.vertices; e.lineStyle(n, i), e.beginPath(), e.moveTo(s[0].x, s[0].y); for (var r = 1; r < s.length; r++) e.lineTo(s[r].x, s[r].y); e.lineTo(s[0].x, s[0].y), e.strokePath() } return this }, renderJoints: function() { for (var t = this.debugGraphic, e = u.allConstraints(this.localWorld), i = 0; i < e.length; i++) { var n = e[i].render , s = n.lineColor , r = n.lineOpacity , o = n.lineThickness , a = n.pinSize , h = n.anchorColor , l = n.anchorSize; this.renderConstraint(e[i], t, s, r, o, a, h, l) } }, renderConstraint: function(t, e, i, n, s, r, o, a) { var h = t.render; if (!h.visible || !t.pointA || !t.pointB) return this; e.lineStyle(s, i, n); var l, u = t.bodyA, c = t.bodyB, d = u ? x.add(u.position, t.pointA) : t.pointA; if ("pin" === h.type) e.strokeCircle(d.x, d.y, r); else { if (l = c ? x.add(c.position, t.pointB) : t.pointB, e.beginPath(), e.moveTo(d.x, d.y), "spring" === h.type) for (var f, p = x.sub(l, d), g = x.perp(x.normalise(p)), v = Math.ceil(y.clamp(t.length / 5, 12, 20)), m = 1; m < v; m += 1) f = m % 2 == 0 ? 1 : -1, e.lineTo(d.x + p.x * (m / v) + g.x * f * 4, d.y + p.y * (m / v) + g.y * f * 4); e.lineTo(l.x, l.y) } return e.strokePath(), h.anchors && 0 < a && (e.fillStyle(o), e.fillCircle(d.x, d.y, a), e.fillCircle(l.x, l.y, a)), this }, resetCollisionIDs: function() { return n._nextCollidingGroupId = 1, n._nextNonCollidingGroupId = -1, n._nextCategory = 1, this }, shutdown: function() { h.off(this.engine), this.removeAllListeners(), c.clear(this.localWorld, !1), T.clear(this.engine), this.drawDebug && this.debugGraphic.destroy() }, destroy: function() { this.shutdown() } }); t.exports = d } , function(s, t, r) { (function(t) { r(518); var e = r(33) , i = r(18) , n = { Actions: r(241), Animations: r(638), BlendModes: r(52), Cache: r(639), Cameras: r(642), Core: r(728), Class: r(0), Create: r(789), Curves: r(795), Data: r(798), Display: r(800), DOM: r(818), Events: r(819), Game: r(821), GameObjects: r(914), Geom: r(430), Input: r(1201), Loader: r(1235), Math: r(170), Physics: r(1394), Plugins: r(1304), Renderer: r(1431), Scale: r(1306), ScaleModes: r(234), Scene: r(374), Scenes: r(1307), Structs: r(1309), Textures: r(1310), Tilemaps: r(1312), Time: r(1353), Tweens: r(1355), Utils: r(1373) }; n.Sound = r(1383), n = i(!1, n, e), s.exports = n, t.Phaser = n } ).call(this, r(517)) } , function(t, e, i) { t.exports = { Arcade: i(1261), Matter: i(1395) } } , function(t, e, i) { t.exports = { BodyBounds: i(1384), Factory: i(1385), Image: i(1387), Matter: i(1298), MatterPhysics: i(1427), PolyDecomp: i(1386), Sprite: i(1388), TileBody: i(1297), PhysicsEditorParser: i(1294), PhysicsJSONParser: i(1295), World: i(1392) } } , function(t, e, i) { var a = i(514) , h = i(2) , l = i(3); t.exports = function(t, n, e, i) { void 0 === e && (e = {}), void 0 === i && (i = !0); var s, r = n.x, o = n.y; return n.body = { temp: !0, position: { x: r, y: o } }, [a.Bounce, a.Collision, a.Force, a.Friction, a.Gravity, a.Mass, a.Sensor, a.SetBody, a.Sleep, a.Static, a.Transform, a.Velocity].forEach(function(t) { for (var e in t) (i = t[e]).get && "function" == typeof i.get || i.set && "function" == typeof i.set ? Object.defineProperty(n, e, { get: t[e].get, set: t[e].set }) : Object.defineProperty(n, e, { value: t[e] }); var i }), n.world = t, n._tempVec2 = new l(r,o), e.hasOwnProperty("type") && "body" === e.type ? n.setExistingBody(e, i) : (s = (s = h(e, "shape", null)) || "rectangle", e.addToWorld = i, n.setBody(s, e)), n } } , function(t, e) { t.exports = { setBounce: function(t) { return this.body.restitution = t, this } } } , function(t, e) { var i = { setCollisionCategory: function(t) { return this.body.collisionFilter.category = t, this }, setCollisionGroup: function(t) { return this.body.collisionFilter.group = t, this }, setCollidesWith: function(t) { var e = 0; if (Array.isArray(t)) for (var i = 0; i < t.length; i++) e |= t[i]; else e = t; return this.body.collisionFilter.mask = e, this }, setOnCollide: function(t) { return this.body.onCollideCallback = t, this }, setOnCollideEnd: function(t) { return this.body.onCollideEndCallback = t, this }, setOnCollideActive: function(t) { return this.body.onCollideActiveCallback = t, this }, setOnCollideWith: function(t, e) { Array.isArray(t) || (t = [t]); for (var i = 0; i < t.length; i++) { var n = t[i].hasOwnProperty("body") ? t[i].body : t[i]; this.body.setOnCollideWith(n, e) } return this } }; t.exports = i } , function(t, e, i) { var n = i(62) , s = { applyForce: function(t) { return this._tempVec2.set(this.body.position.x, this.body.position.y), n.applyForce(this.body, this._tempVec2, t), this }, applyForceFrom: function(t, e) { return n.applyForce(this.body, t, e), this }, thrust: function(t) { var e = this.body.angle; return this._tempVec2.set(t * Math.cos(e), t * Math.sin(e)), n.applyForce(this.body, { x: this.body.position.x, y: this.body.position.y }, this._tempVec2), this }, thrustLeft: function(t) { var e = this.body.angle - Math.PI / 2; return this._tempVec2.set(t * Math.cos(e), t * Math.sin(e)), n.applyForce(this.body, { x: this.body.position.x, y: this.body.position.y }, this._tempVec2), this }, thrustRight: function(t) { var e = this.body.angle + Math.PI / 2; return this._tempVec2.set(t * Math.cos(e), t * Math.sin(e)), n.applyForce(this.body, { x: this.body.position.x, y: this.body.position.y }, this._tempVec2), this }, thrustBack: function(t) { var e = this.body.angle - Math.PI; return this._tempVec2.set(t * Math.cos(e), t * Math.sin(e)), n.applyForce(this.body, { x: this.body.position.x, y: this.body.position.y }, this._tempVec2), this } }; t.exports = s } , function(t, e) { var i = { setFriction: function(t, e, i) { return this.body.friction = t, void 0 !== e && (this.body.frictionAir = e), void 0 !== i && (this.body.frictionStatic = i), this }, setFrictionAir: function(t) { return this.body.frictionAir = t, this }, setFrictionStatic: function(t) { return this.body.frictionStatic = t, this } }; t.exports = i } , function(t, e) { t.exports = { setIgnoreGravity: function(t) { return this.body.ignoreGravity = t, this } } } , function(t, e, i) { var n = i(62) , s = i(3) , r = { setMass: function(t) { return n.setMass(this.body, t), this }, setDensity: function(t) { return n.setDensity(this.body, t), this }, centerOfMass: { get: function() { return new s(this.body.centerOfMass.x,this.body.centerOfMass.y) } } }; t.exports = r } , function(t, e, i) { var n = i(62) , s = { setStatic: function(t) { return n.setStatic(this.body, t), this }, isStatic: function() { return this.body.isStatic } }; t.exports = s } , function(t, e) { t.exports = { setSensor: function(t) { return this.body.isSensor = t, this }, isSensor: function() { return this.body.isSensor } } } , function(t, e, i) { var m = i(109) , y = i(62) , u = i(106) , x = i(2) , T = i(1294) , w = i(1295) , b = i(86) , n = { setRectangle: function(t, e, i) { return this.setBody({ type: "rectangle", width: t, height: e }, i) }, setCircle: function(t, e) { return this.setBody({ type: "circle", radius: t }, e) }, setPolygon: function(t, e, i) { return this.setBody({ type: "polygon", sides: e, radius: t }, i) }, setTrapezoid: function(t, e, i, n) { return this.setBody({ type: "trapezoid", width: t, height: e, slope: i }, n) }, setExistingBody: function(t, e) { void 0 === e && (e = !0), this.body && this.world.remove(this.body, !0), this.body = t; for (var i = 0; i < t.parts.length; i++) t.parts[i].gameObject = this; var n, s, r, o, a, h, l = this; return t.destroy = function() { l.world.remove(l.body, !0), l.body.gameObject = null } , e && (this.world.has(t) && this.world.remove(t, !0), this.world.add(t)), this._originComponent && (n = t.render.sprite.xOffset, s = t.render.sprite.yOffset, r = t.centerOfMass.x, o = t.centerOfMass.y, u(r, .5) && u(o, .5) ? this.setOrigin(n + .5, s + .5) : (a = t.centerOffset.x, h = t.centerOffset.y, this.setOrigin(n + a / this.displayWidth, s + h / this.displayHeight))), this }, setBody: function(t, e) { if (!t) return this; "string" == typeof t && (t = { type: t }); var i = x(t, "type", "rectangle") , n = x(t, "x", this._tempVec2.x) , s = x(t, "y", this._tempVec2.y) , r = x(t, "width", this.width) , o = x(t, "height", this.height); switch (i) { case "rectangle": l = m.rectangle(n, s, r, o, e); break; case "circle": var a = x(t, "radius", Math.max(r, o) / 2) , h = x(t, "maxSides", 25) , l = m.circle(n, s, a, e, h); break; case "trapezoid": var u = x(t, "slope", .5); l = m.trapezoid(n, s, r, o, u, e); break; case "polygon": var c = x(t, "sides", 5) , d = x(t, "radius", Math.max(r, o) / 2); l = m.polygon(n, s, c, d, e); break; case "fromVertices": case "fromVerts": var f, p, g, v = x(t, "verts", null); v && ("string" == typeof v && (v = b.fromPath(v)), l = this.body && !this.body.hasOwnProperty("temp") ? (y.setVertices(this.body, v), this.body) : (f = x(t, "flagInternal", !1), p = x(t, "removeCollinear", .01), g = x(t, "minimumArea", 10), m.fromVertices(n, s, v, e, f, p, g))); break; case "fromPhysicsEditor": l = T.parseBody(n, s, t, e); break; case "fromPhysicsTracer": l = w.parseBody(n, s, t, e) } return l && this.setExistingBody(l, t.addToWorld), this } }; t.exports = n } , function(t, e, i) { var n = i(1296) , s = i(239) , r = i(240) , o = { setToSleep: function() { s.set(this.body, !0) }, setAwake: function() { s.set(this.body, !1) }, setSleepThreshold: function(t) { return void 0 === t && (t = 60), this.body.sleepThreshold = t, this }, setSleepEvents: function(t, e) { return this.setSleepStartEvent(t), this.setSleepEndEvent(e), this }, setSleepStartEvent: function(t) { var e; return t ? (e = this.world, r.on(this.body, "sleepStart", function(t) { e.emit(n.SLEEP_START, t, this) })) : r.off(this.body, "sleepStart"), this }, setSleepEndEvent: function(t) { var e; return t ? (e = this.world, r.on(this.body, "sleepEnd", function(t) { e.emit(n.SLEEP_END, t, this) })) : r.off(this.body, "sleepEnd"), this } }; t.exports = o } , function(t, e) { t.exports = "afteradd" } , function(t, e) { t.exports = "afterremove" } , function(t, e) { t.exports = "afterupdate" } , function(t, e) { t.exports = "beforeadd" } , function(t, e) { t.exports = "beforeremove" } , function(t, e) { t.exports = "beforeupdate" } , function(t, e) { t.exports = "collisionactive" } , function(t, e) { t.exports = "collisionend" } , function(t, e) { t.exports = "collisionstart" } , function(t, e) { t.exports = "dragend" } , function(t, e) { t.exports = "drag" } , function(t, e) { t.exports = "dragstart" } , function(t, e) { t.exports = "pause" } , function(t, e) { t.exports = "resume" } , function(t, e) { t.exports = "sleepend" } , function(t, e) { t.exports = "sleepstart" } , function(t, e, i) { var r = i(62) , n = i(13) , s = i(235) , o = i(236) , a = { x: { get: function() { return this.body.position.x }, set: function(t) { this._tempVec2.set(t, this.y), r.setPosition(this.body, this._tempVec2) } }, y: { get: function() { return this.body.position.y }, set: function(t) { this._tempVec2.set(this.x, t), r.setPosition(this.body, this._tempVec2) } }, scaleX: { get: function() { return this._scaleX }, set: function(t) { var e = 1 / this._scaleX , i = 1 / this._scaleY; this._scaleX = t, 0 === this._scaleX ? this.renderFlags &= -5 : this.renderFlags |= 4, r.scale(this.body, e, i), r.scale(this.body, t, this._scaleY) } }, scaleY: { get: function() { return this._scaleY }, set: function(t) { var e = 1 / this._scaleX , i = 1 / this._scaleY; this._scaleY = t, 0 === this._scaleY ? this.renderFlags &= -5 : this.renderFlags |= 4, r.scale(this.body, e, i), r.scale(this.body, this._scaleX, t) } }, angle: { get: function() { return o(this.body.angle * n.RAD_TO_DEG) }, set: function(t) { this.rotation = o(t) * n.DEG_TO_RAD } }, rotation: { get: function() { return this.body.angle }, set: function(t) { this._rotation = s(t), r.setAngle(this.body, this._rotation) } }, setPosition: function(t, e) { return void 0 === t && (t = 0), void 0 === e && (e = t), this._tempVec2.set(t, e), r.setPosition(this.body, this._tempVec2), this }, setRotation: function(t) { return void 0 === t && (t = 0), this._rotation = s(t), r.setAngle(this.body, t), this }, setFixedRotation: function() { return r.setInertia(this.body, 1 / 0), this }, setAngle: function(t) { return void 0 === t && (t = 0), this.angle = t, r.setAngle(this.body, this.rotation), this }, setScale: function(t, e, i) { void 0 === t && (t = 1), void 0 === e && (e = t); var n = 1 / this._scaleX , s = 1 / this._scaleY; return this._scaleX = t, this._scaleY = e, r.scale(this.body, n, s, i), r.scale(this.body, t, e, i), this } }; t.exports = a } , function(t, e, i) { var n = i(62) , s = { setAngularVelocity: function(t) { return n.setAngularVelocity(this.body, t), this }, setVelocityX: function(t) { return this._tempVec2.set(t, this.body.velocity.y), n.setVelocity(this.body, this._tempVec2), this }, setVelocityY: function(t) { return this._tempVec2.set(this.body.velocity.x, t), n.setVelocity(this.body, this._tempVec2), this }, setVelocity: function(t, e) { return this._tempVec2.set(t, e), n.setVelocity(this.body, this._tempVec2), this } }; t.exports = s } , function(t, e, i) { var o = i(100) , n = i(0) , a = i(148) , s = i(219) , h = i(515) , l = i(1296) , r = i(54) , u = i(126) , c = i(239) , d = i(3) , f = i(86) , p = new n({ initialize: function(t, e, i) { void 0 === i && (i = {}); this.scene = t, this.world = e, this.camera = null, this.pointer = null, this.active = !0, this.position = new d, this.body = null, this.part = null, this.constraint = s.create(u(i, { label: "Pointer Constraint", pointA: { x: 0, y: 0 }, pointB: { x: 0, y: 0 }, length: .01, stiffness: .1, angularStiffness: 1, collisionFilter: { category: 1, mask: 4294967295, group: 0 } })), this.world.on(l.BEFORE_UPDATE, this.update, this), t.sys.input.on(r.POINTER_DOWN, this.onDown, this), t.sys.input.on(r.POINTER_UP, this.onUp, this) }, onDown: function(t) { this.pointer || (this.pointer = t, this.camera = t.camera) }, onUp: function(t) { t === this.pointer && (this.pointer = null) }, getBody: function(t) { var e = this.position , i = this.constraint; this.camera.getWorldPoint(t.x, t.y, e); for (var n = a.allBodies(this.world.localWorld), s = 0; s < n.length; s++) { var r = n[s]; if (!r.ignorePointer && o.contains(r.bounds, e) && h.canCollide(r.collisionFilter, i.collisionFilter) && this.hitTestBody(r, e)) return this.world.emit(l.DRAG_START, r, this.part, this), !0 } return !1 }, hitTestBody: function(t, e) { for (var i = this.constraint, n = t.parts.length, s = 1 < n ? 1 : 0; s < n; s++) { var r = t.parts[s]; if (f.contains(r.vertices, e)) return i.pointA = e, i.pointB = { x: e.x - t.position.x, y: e.y - t.position.y }, i.bodyB = t, i.angleB = t.angle, c.set(t, !1), this.part = r, this.body = t, !0 } return !1 }, update: function() { var t = this.pointer , e = this.body; if (this.active && t) if (t.isDown || !e) { if (t.isDown) { if (!e && !this.getBody(t)) return; e = this.body; var i = this.position , n = this.constraint; this.camera.getWorldPoint(t.x, t.y, i), n.pointA.x = i.x, n.pointA.y = i.y, c.set(e, !1), this.world.emit(l.DRAG, e, this) } } else this.stopDrag(); else e && this.stopDrag() }, stopDrag: function() { var t = this.body , e = this.constraint; e.bodyB = null, e.pointB = null, this.pointer = null, this.body = null, this.part = null, t && this.world.emit(l.DRAG_END, t, this) }, destroy: function() { this.world.removeConstraint(this.constraint), this.pointer = null, this.constraint = null, this.body = null, this.part = null, this.world.off(l.BEFORE_UPDATE, this.update), this.scene.sys.input.off(r.POINTER_DOWN, this.onDown, this), this.scene.sys.input.off(r.POINTER_UP, this.onUp, this) } }); t.exports = p } , function(t, e, i) { var n = {}; t.exports = n; var s = i(148) , r = i(42); n.create = function(t) { return r.extend({ extended: !1, narrowDetections: 0, narrowphaseTests: 0, narrowReuse: 0, narrowReuseCount: 0, midphaseTests: 0, broadphaseTests: 0, narrowEff: 1e-4, midEff: 1e-4, broadEff: 1e-4, collisions: 0, buckets: 0, bodies: 0, pairs: 0 }, !1, t) } , n.reset = function(t) { t.extended && (t.narrowDetections = 0, t.narrowphaseTests = 0, t.narrowReuse = 0, t.narrowReuseCount = 0, t.midphaseTests = 0, t.broadphaseTests = 0, t.narrowEff = 0, t.midEff = 0, t.broadEff = 0, t.collisions = 0, t.buckets = 0, t.pairs = 0, t.bodies = 0) } , n.update = function(t, e) { var i, n; t.extended && (i = e.world, n = s.allBodies(i), t.collisions = t.narrowDetections, t.pairs = e.pairs.list.length, t.bodies = n.length, t.midEff = (t.narrowDetections / (t.midphaseTests || 1)).toFixed(2), t.narrowEff = (t.narrowDetections / (t.narrowphaseTests || 1)).toFixed(2), t.broadEff = (1 - t.broadphaseTests / (n.length || 1)).toFixed(2), t.narrowReuse = (t.narrowReuseCount / (t.narrowphaseTests || 1)).toFixed(2)) } } , function(t, e, i) { var r = i(105) , n = i(513) , s = i(109) , o = i(62) , a = i(1384) , h = i(100) , l = i(0) , u = i(148) , c = i(1292) , d = i(219) , f = i(515) , p = i(53) , g = i(1385) , v = i(2) , m = i(6) , y = i(1301) , x = i(1428) , T = i(1429) , w = i(1389) , b = i(1430) , E = i(126) , S = i(473) , _ = i(1302) , A = i(1299) , C = i(23) , M = i(1390) , P = i(1303) , O = i(516) , R = i(22) , L = i(1293) , k = i(99) , D = i(86) , F = i(1392) , I = new l({ initialize: function(t) { this.scene = t, this.systems = t.sys, this.config = this.getConfig(), this.world, this.add, this.bodyBounds, this.body = o, this.composite = u, this.detector = f, this.grid = y, this.pair = S, this.pairs = _, this.query = M, this.resolver = P, this.sat = O, this.constraint = d, this.bodies = s, this.composites = c, this.axes = n, this.bounds = h, this.svg = L, this.vector = k, this.vertices = D, this.verts = D, this._tempVec2 = k.create(), m(this.config, "plugins.collisionevents", !0) && this.enableCollisionEventsPlugin(), m(this.config, "plugins.attractors", !1) && this.enableAttractorPlugin(), m(this.config, "plugins.wrap", !1) && this.enableWrapPlugin(), P._restingThresh = m(this.config, "restingThresh", 4), P._restingThreshTangent = m(this.config, "restingThreshTangent", 6), P._positionDampen = m(this.config, "positionDampen", .9), P._positionWarming = m(this.config, "positionWarming", .8), P._frictionNormalMultiplier = m(this.config, "frictionNormalMultiplier", 5), t.sys.events.once(R.BOOT, this.boot, this), t.sys.events.on(R.START, this.start, this) }, boot: function() { this.world = new F(this.scene,this.config), this.add = new g(this.world), this.bodyBounds = new a, this.systems.events.once(R.DESTROY, this.destroy, this) }, start: function() { this.world || (this.world = new F(this.scene,this.config), this.add = new g(this.world)); var t = this.systems.events; t.on(R.UPDATE, this.world.update, this.world), t.on(R.POST_UPDATE, this.world.postUpdate, this.world), t.once(R.SHUTDOWN, this.shutdown, this) }, getConfig: function() { var t = this.systems.game.config.physics , e = this.systems.settings.physics; return E(v(e, "matter", {}), v(t, "matter", {})) }, enableAttractorPlugin: function() { return A.register(x), A.use(w, x), this }, enableWrapPlugin: function() { return A.register(b), A.use(w, b), this }, enableCollisionEventsPlugin: function() { return A.register(T), A.use(w, T), this }, pause: function() { return this.world.pause() }, resume: function() { return this.world.resume() }, set60Hz: function() { return this.world.getDelta = this.world.update60Hz, this.world.autoUpdate = !0, this }, set30Hz: function() { return this.world.getDelta = this.world.update30Hz, this.world.autoUpdate = !0, this }, step: function(t, e) { this.world.step(t, e) }, containsPoint: function(t, e, i) { t = this.getMatterBodies(t); var n = k.create(e, i); return 0 < M.point(t, n).length }, intersectPoint: function(t, e, i) { i = this.getMatterBodies(i); var n = k.create(t, e) , s = []; return M.point(i, n).forEach(function(t) { -1 === s.indexOf(t) && s.push(t) }), s }, intersectRect: function(t, e, i, n, s, r) { void 0 === s && (s = !1), r = this.getMatterBodies(r); var o = { min: { x: t, y: e }, max: { x: t + i, y: e + n } } , a = []; return M.region(r, o, s).forEach(function(t) { -1 === a.indexOf(t) && a.push(t) }), a }, intersectRay: function(t, e, i, n, s, r) { void 0 === s && (s = 1), r = this.getMatterBodies(r); for (var o = [], a = M.ray(r, k.create(t, e), k.create(i, n), s), h = 0; h < a.length; h++) o.push(a[h].body); return o }, intersectBody: function(t, e) { e = this.getMatterBodies(e); for (var i = [], n = M.collides(t, e), s = 0; s < n.length; s++) { var r = n[s]; r.bodyA === t ? i.push(r.bodyB) : i.push(r.bodyA) } return i }, overlap: function(t, e, i, n, s) { void 0 === i && (i = null), void 0 === n && (n = null), void 0 === s && (s = i), Array.isArray(t) || (t = [t]), t = this.getMatterBodies(t), e = this.getMatterBodies(e); for (var r = !1, o = 0; o < t.length; o++) for (var a = t[o], h = M.collides(a, e), l = 0; l < h.length; l++) { var u = h[l] , c = u.bodyA.id === a.id ? u.bodyB : u.bodyA; if (!n || n.call(s, a, c, u)) if (r = !0, i) i.call(s, a, c, u); else if (!n) return !0 } return r }, setCollisionCategory: function(t, e) { return (t = this.getMatterBodies(t)).forEach(function(t) { t.collisionFilter.category = e }), this }, setCollisionGroup: function(t, e) { return (t = this.getMatterBodies(t)).forEach(function(t) { t.collisionFilter.group = e }), this }, setCollidesWith: function(t, e) { t = this.getMatterBodies(t); var i = 0; if (Array.isArray(e)) for (var n = 0; n < e.length; n++) i |= e[n]; else i = e; return t.forEach(function(t) { t.collisionFilter.mask = i }), this }, getMatterBodies: function(t) { if (!t) return this.world.getAllBodies(); Array.isArray(t) || (t = [t]); for (var e = [], i = 0; i < t.length; i++) { var n = t[i].hasOwnProperty("body") ? t[i].body : t[i]; e.push(n) } return e }, setVelocity: function(t, e, i) { t = this.getMatterBodies(t); var n = this._tempVec2; return n.x = e, n.y = i, t.forEach(function(t) { o.setVelocity(t, n) }), this }, setVelocityX: function(t, e) { t = this.getMatterBodies(t); var i = this._tempVec2; return i.x = e, t.forEach(function(t) { i.y = t.velocity.y, o.setVelocity(t, i) }), this }, setVelocityY: function(t, e) { t = this.getMatterBodies(t); var i = this._tempVec2; return i.y = e, t.forEach(function(t) { i.x = t.velocity.x, o.setVelocity(t, i) }), this }, setAngularVelocity: function(t, e) { return (t = this.getMatterBodies(t)).forEach(function(t) { o.setAngularVelocity(t, e) }), this }, applyForce: function(t, e) { t = this.getMatterBodies(t); var i = this._tempVec2; return t.forEach(function(t) { i.x = t.position.x, i.y = t.position.y, o.applyForce(t, i, e) }), this }, applyForceFromPosition: function(t, e, i, n) { t = this.getMatterBodies(t); var s = this._tempVec2; return t.forEach(function(t) { void 0 === n && (n = t.angle), s.x = i * Math.cos(n), s.y = i * Math.sin(n), o.applyForce(t, e, s) }), this }, applyForceFromAngle: function(t, e, i) { t = this.getMatterBodies(t); var n = this._tempVec2; return t.forEach(function(t) { void 0 === i && (i = t.angle), n.x = e * Math.cos(i), n.y = e * Math.sin(i), o.applyForce(t, { x: t.position.x, y: t.position.y }, n) }), this }, getConstraintLength: function(t) { var e = t.pointA.x , i = t.pointA.y , n = t.pointB.x , s = t.pointB.y; return t.bodyA && (e += t.bodyA.position.x, i += t.bodyA.position.y), t.bodyB && (n += t.bodyB.position.x, s += t.bodyB.position.y), p(e, i, n, s) }, alignBody: function(t, e, i, n) { var s; switch (t = t.hasOwnProperty("body") ? t.body : t, n) { case r.TOP_LEFT: case r.LEFT_TOP: s = this.bodyBounds.getTopLeft(t, e, i); break; case r.TOP_CENTER: s = this.bodyBounds.getTopCenter(t, e, i); break; case r.TOP_RIGHT: case r.RIGHT_TOP: s = this.bodyBounds.getTopRight(t, e, i); break; case r.LEFT_CENTER: s = this.bodyBounds.getLeftCenter(t, e, i); break; case r.CENTER: s = this.bodyBounds.getCenter(t, e, i); break; case r.RIGHT_CENTER: s = this.bodyBounds.getRightCenter(t, e, i); break; case r.LEFT_BOTTOM: case r.BOTTOM_LEFT: s = this.bodyBounds.getBottomLeft(t, e, i); break; case r.BOTTOM_CENTER: s = this.bodyBounds.getBottomCenter(t, e, i); break; case r.BOTTOM_RIGHT: case r.RIGHT_BOTTOM: s = this.bodyBounds.getBottomRight(t, e, i) } return s && o.setPosition(t, s), this }, shutdown: function() { var t = this.systems.events; this.world && (t.off(R.UPDATE, this.world.update, this.world), t.off(R.POST_UPDATE, this.world.postUpdate, this.world)), t.off(R.SHUTDOWN, this.shutdown, this), this.add && this.add.destroy(), this.world && this.world.destroy(), this.add = null, this.world = null }, destroy: function() { this.shutdown(), this.scene.sys.events.off(R.START, this.start, this), this.scene = null, this.systems = null } }); C.register("MatterPhysics", I, "matterPhysics"), t.exports = I } , function(t, e, i) { var c = i(1298) , a = { name: "matter-attractors", version: "0.1.7", for: "matter-js@^0.14.2", silent: !0, install: function(t) { t.after("Body.create", function() { a.Body.init(this) }), t.before("Engine.update", function(t) { a.Engine.update(t) }) }, Body: { init: function(t) { t.plugin.attractors = t.plugin.attractors || [] } }, Engine: { update: function(t) { for (var e = t.world, i = c.Composite.allBodies(e), n = 0; n < i.length; n += 1) { var s = i[n] , r = s.plugin.attractors; if (r && 0 < r.length) for (var o = n + 1; o < i.length; o += 1) for (var a = i[o], h = 0; h < r.length; h += 1) { var l = r[h] , u = l; c.Common.isFunction(l) && (u = l(s, a)), u && c.Body.applyForce(a, a.position, u) } } } }, Attractors: { gravityConstant: .001, gravity: function(t, e) { var i = c.Vector.sub(e.position, t.position) , n = c.Vector.magnitudeSquared(i) || 1e-4 , s = c.Vector.normalise(i) , r = -a.Attractors.gravityConstant * (t.mass * e.mass / n) , o = c.Vector.mult(s, r); c.Body.applyForce(t, t.position, c.Vector.neg(o)), c.Body.applyForce(e, e.position, o) } } }; t.exports = a } , function(t, e) { t.exports = { name: "matter-collision-events", version: "0.1.6", for: "matter-js@^0.14.2", silent: !0, install: function(n) { n.after("Engine.create", function() { n.Events.on(this, "collisionStart", function(t) { t.pairs.map(function(t) { var e = t.bodyA , i = t.bodyB; e.gameObject && e.gameObject.emit("collide", e, i, t), i.gameObject && i.gameObject.emit("collide", i, e, t), n.Events.trigger(e, "onCollide", { pair: t }), n.Events.trigger(i, "onCollide", { pair: t }), e.onCollideCallback && e.onCollideCallback(t), i.onCollideCallback && i.onCollideCallback(t), e.onCollideWith[i.id] && e.onCollideWith[i.id](i, t), i.onCollideWith[e.id] && i.onCollideWith[e.id](e, t) }) }), n.Events.on(this, "collisionActive", function(t) { t.pairs.map(function(t) { var e = t.bodyA , i = t.bodyB; e.gameObject && e.gameObject.emit("collideActive", e, i, t), i.gameObject && i.gameObject.emit("collideActive", i, e, t), n.Events.trigger(e, "onCollideActive", { pair: t }), n.Events.trigger(i, "onCollideActive", { pair: t }), e.onCollideActiveCallback && e.onCollideActiveCallback(t), i.onCollideActiveCallback && i.onCollideActiveCallback(t) }) }), n.Events.on(this, "collisionEnd", function(t) { t.pairs.map(function(t) { var e = t.bodyA , i = t.bodyB; e.gameObject && e.gameObject.emit("collideEnd", e, i, t), i.gameObject && i.gameObject.emit("collideEnd", i, e, t), n.Events.trigger(e, "onCollideEnd", { pair: t }), n.Events.trigger(i, "onCollideEnd", { pair: t }), e.onCollideEndCallback && e.onCollideEndCallback(t), i.onCollideEndCallback && i.onCollideEndCallback(t) }) }) }) } } } , function(t, e, i) { var a = i(1298) , h = { name: "matter-wrap", version: "0.1.4", for: "matter-js@^0.14.2", silent: !0, install: function(t) { t.after("Engine.update", function() { h.Engine.update(this) }) }, Engine: { update: function(t) { for (var e = t.world, i = a.Composite.allBodies(e), n = a.Composite.allComposites(e), s = 0; s < i.length; s += 1) { var r = i[s]; r.plugin.wrap && h.Body.wrap(r, r.plugin.wrap) } for (s = 0; s < n.length; s += 1) { var o = n[s]; o.plugin.wrap && h.Composite.wrap(o, o.plugin.wrap) } } }, Bounds: { wrap: function(t, e) { var i = null , n = null; if (void 0 !== e.min.x && void 0 !== e.max.x && (t.min.x > e.max.x ? i = e.min.x - t.max.x : t.max.x < e.min.x && (i = e.max.x - t.min.x)), void 0 !== e.min.y && void 0 !== e.max.y && (t.min.y > e.max.y ? n = e.min.y - t.max.y : t.max.y < e.min.y && (n = e.max.y - t.min.y)), null !== i || null !== n) return { x: i || 0, y: n || 0 } } }, Body: { wrap: function(t, e) { var i = h.Bounds.wrap(t.bounds, e); return i && a.Body.translate(t, i), i } }, Composite: { bounds: function(t) { for (var e = a.Composite.allBodies(t), i = [], n = 0; n < e.length; n += 1) { var s = e[n]; i.push(s.bounds.min, s.bounds.max) } return a.Bounds.create(i) }, wrap: function(t, e) { var i = h.Bounds.wrap(h.Composite.bounds(t), e); return i && a.Composite.translate(t, i), i } } }; t.exports = h } , function(t, e, i) { t.exports = { Canvas: i(1432), Snapshot: i(1433), WebGL: i(1434) } } , function(t, e, i) { t.exports = { CanvasRenderer: i(505), GetBlendModes: i(507), SetTransform: i(28) } } , function(t, e, i) { t.exports = { Canvas: i(506), WebGL: i(509) } } , function(t, e, i) { t.exports = { Utils: i(9), WebGLPipeline: i(147), WebGLRenderer: i(508), Pipelines: i(1435), BYTE: 0, SHORT: 1, UNSIGNED_BYTE: 2, UNSIGNED_SHORT: 3, FLOAT: 4 } } , function(t, e, i) { t.exports = { BitmapMaskPipeline: i(510), ForwardDiffuseLightPipeline: i(511), TextureTintPipeline: i(237), TextureTintStripPipeline: i(512), ModelViewProjection: i(238) } } ], s.c = n, s.d = function(t, e, i) { s.o(t, e) || Object.defineProperty(t, e, { enumerable: !0, get: i }) } , s.r = function(t) { "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t, "__esModule", { value: !0 }) } , s.t = function(e, t) { if (1 & t && (e = s(e)), 8 & t) return e; if (4 & t && "object" == typeof e && e && e.__esModule) return e; var i = Object.create(null); if (s.r(i), Object.defineProperty(i, "default", { enumerable: !0, value: e }), 2 & t && "string" != typeof e) for (var n in e) s.d(i, n, function(t) { return e[t] } .bind(null, n)); return i } , s.n = function(t) { var e = t && t.__esModule ? function() { return t.default } : function() { return t } ; return s.d(e, "a", e), e } , s.o = function(t, e) { return Object.prototype.hasOwnProperty.call(t, e) } , s.p = "", s(s.s = 1393); function s(t) { if (n[t]) return n[t].exports; var e = n[t] = { i: t, l: !1, exports: {} }; return i[t].call(e.exports, e, e.exports, s), e.l = !0, e.exports } var i, n });