easeljs-0.7.1.min.js 107 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694
  1. /*!
  2. * @license EaselJS
  3. * Visit http://createjs.com/ for documentation, updates and examples.
  4. *
  5. * Copyright (c) 2011-2013 gskinner.com, inc.
  6. *
  7. * Distributed under the terms of the MIT license.
  8. * http://www.opensource.org/licenses/mit-license.html
  9. *
  10. * This notice shall be included in all copies or substantial portions of the Software.
  11. */
  12. this.createjs = this.createjs || {}, function () {
  13. "use strict";
  14. var a = function (a, b, c) {
  15. this.initialize(a, b, c)
  16. }, b = a.prototype;
  17. b.type = null, b.target = null, b.currentTarget = null, b.eventPhase = 0, b.bubbles = !1, b.cancelable = !1, b.timeStamp = 0, b.defaultPrevented = !1, b.propagationStopped = !1, b.immediatePropagationStopped = !1, b.removed = !1, b.initialize = function (a, b, c) {
  18. this.type = a, this.bubbles = b, this.cancelable = c, this.timeStamp = (new Date).getTime()
  19. }, b.preventDefault = function () {
  20. this.defaultPrevented = !0
  21. }, b.stopPropagation = function () {
  22. this.propagationStopped = !0
  23. }, b.stopImmediatePropagation = function () {
  24. this.immediatePropagationStopped = this.propagationStopped = !0
  25. }, b.remove = function () {
  26. this.removed = !0
  27. }, b.clone = function () {
  28. return new a(this.type, this.bubbles, this.cancelable)
  29. }, b.toString = function () {
  30. return "[Event (type=" + this.type + ")]"
  31. }, createjs.Event = a
  32. }(), this.createjs = this.createjs || {}, function () {
  33. "use strict";
  34. var a = function () {
  35. }, b = a.prototype;
  36. a.initialize = function (a) {
  37. a.addEventListener = b.addEventListener, a.on = b.on, a.removeEventListener = a.off = b.removeEventListener, a.removeAllEventListeners = b.removeAllEventListeners, a.hasEventListener = b.hasEventListener, a.dispatchEvent = b.dispatchEvent, a._dispatchEvent = b._dispatchEvent, a.willTrigger = b.willTrigger
  38. }, b._listeners = null, b._captureListeners = null, b.initialize = function () {
  39. }, b.addEventListener = function (a, b, c) {
  40. var d;
  41. d = c ? this._captureListeners = this._captureListeners || {} : this._listeners = this._listeners || {};
  42. var e = d[a];
  43. return e && this.removeEventListener(a, b, c), e = d[a], e ? e.push(b) : d[a] = [b], b
  44. }, b.on = function (a, b, c, d, e, f) {
  45. return b.handleEvent && (c = c || b, b = b.handleEvent), c = c || this, this.addEventListener(a, function (a) {
  46. b.call(c, a, e), d && a.remove()
  47. }, f)
  48. }, b.removeEventListener = function (a, b, c) {
  49. var d = c ? this._captureListeners : this._listeners;
  50. if (d) {
  51. var e = d[a];
  52. if (e)for (var f = 0, g = e.length; g > f; f++)if (e[f] == b) {
  53. 1 == g ? delete d[a] : e.splice(f, 1);
  54. break
  55. }
  56. }
  57. }, b.off = b.removeEventListener, b.removeAllEventListeners = function (a) {
  58. a ? (this._listeners && delete this._listeners[a], this._captureListeners && delete this._captureListeners[a]) : this._listeners = this._captureListeners = null
  59. }, b.dispatchEvent = function (a, b) {
  60. if ("string" == typeof a) {
  61. var c = this._listeners;
  62. if (!c || !c[a])return !1;
  63. a = new createjs.Event(a)
  64. }
  65. if (a.target = b || this, a.bubbles && this.parent) {
  66. for (var d = this, e = [d]; d.parent;)e.push(d = d.parent);
  67. var f, g = e.length;
  68. for (f = g - 1; f >= 0 && !a.propagationStopped; f--)e[f]._dispatchEvent(a, 1 + (0 == f));
  69. for (f = 1; g > f && !a.propagationStopped; f++)e[f]._dispatchEvent(a, 3)
  70. } else this._dispatchEvent(a, 2);
  71. return a.defaultPrevented
  72. }, b.hasEventListener = function (a) {
  73. var b = this._listeners, c = this._captureListeners;
  74. return !!(b && b[a] || c && c[a])
  75. }, b.willTrigger = function (a) {
  76. for (var b = this; b;) {
  77. if (b.hasEventListener(a))return !0;
  78. b = b.parent
  79. }
  80. return !1
  81. }, b.toString = function () {
  82. return "[EventDispatcher]"
  83. }, b._dispatchEvent = function (a, b) {
  84. var c, d = 1 == b ? this._captureListeners : this._listeners;
  85. if (a && d) {
  86. var e = d[a.type];
  87. if (!e || !(c = e.length))return;
  88. a.currentTarget = this, a.eventPhase = b, a.removed = !1, e = e.slice();
  89. for (var f = 0; c > f && !a.immediatePropagationStopped; f++) {
  90. var g = e[f];
  91. g.handleEvent ? g.handleEvent(a) : g(a), a.removed && (this.off(a.type, g, 1 == b), a.removed = !1)
  92. }
  93. }
  94. }, createjs.EventDispatcher = a
  95. }(), this.createjs = this.createjs || {}, function () {
  96. "use strict";
  97. createjs.indexOf = function (a, b) {
  98. for (var c = 0, d = a.length; d > c; c++)if (b === a[c])return c;
  99. return -1
  100. }
  101. }(), this.createjs = this.createjs || {}, function () {
  102. "use strict";
  103. var a = function () {
  104. throw"UID cannot be instantiated"
  105. };
  106. a._nextID = 0, a.get = function () {
  107. return a._nextID++
  108. }, createjs.UID = a
  109. }(), this.createjs = this.createjs || {}, function () {
  110. "use strict";
  111. var a = function () {
  112. throw"Ticker cannot be instantiated."
  113. };
  114. a.RAF_SYNCHED = "synched", a.RAF = "raf", a.TIMEOUT = "timeout", a.useRAF = !1, a.timingMode = null, a.maxDelta = 0, a.removeEventListener = null, a.removeAllEventListeners = null, a.dispatchEvent = null, a.hasEventListener = null, a._listeners = null, createjs.EventDispatcher.initialize(a), a._addEventListener = a.addEventListener, a.addEventListener = function () {
  115. return !a._inited && a.init(), a._addEventListener.apply(a, arguments)
  116. }, a._paused = !1, a._inited = !1, a._startTime = 0, a._pausedTime = 0, a._ticks = 0, a._pausedTicks = 0, a._interval = 50, a._lastTime = 0, a._times = null, a._tickTimes = null, a._timerId = null, a._raf = !0, a.init = function () {
  117. a._inited || (a._inited = !0, a._times = [], a._tickTimes = [], a._startTime = a._getTime(), a._times.push(a._lastTime = 0), a.setInterval(a._interval))
  118. }, a.reset = function () {
  119. if (a._raf) {
  120. var b = window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || window.oCancelAnimationFrame || window.msCancelAnimationFrame;
  121. b && b(a._timerId)
  122. } else clearTimeout(a._timerId);
  123. a.removeAllEventListeners("tick")
  124. }, a.setInterval = function (b) {
  125. a._interval = b, a._inited && a._setupTick()
  126. }, a.getInterval = function () {
  127. return a._interval
  128. }, a.setFPS = function (b) {
  129. a.setInterval(1e3 / b)
  130. }, a.getFPS = function () {
  131. return 1e3 / a._interval
  132. }, a.getMeasuredTickTime = function (b) {
  133. var c = 0, d = a._tickTimes;
  134. if (d.length < 1)return -1;
  135. b = Math.min(d.length, b || 0 | a.getFPS());
  136. for (var e = 0; b > e; e++)c += d[e];
  137. return c / b
  138. }, a.getMeasuredFPS = function (b) {
  139. var c = a._times;
  140. return c.length < 2 ? -1 : (b = Math.min(c.length - 1, b || 0 | a.getFPS()), 1e3 / ((c[0] - c[b]) / b))
  141. }, a.setPaused = function (b) {
  142. a._paused = b
  143. }, a.getPaused = function () {
  144. return a._paused
  145. }, a.getTime = function (b) {
  146. return a._getTime() - a._startTime - (b ? a._pausedTime : 0)
  147. }, a.getEventTime = function (b) {
  148. return (a._lastTime || a._startTime) - (b ? a._pausedTime : 0)
  149. }, a.getTicks = function (b) {
  150. return a._ticks - (b ? a._pausedTicks : 0)
  151. }, a._handleSynch = function () {
  152. var b = a._getTime() - a._startTime;
  153. a._timerId = null, a._setupTick(), b - a._lastTime >= .97 * (a._interval - 1) && a._tick()
  154. }, a._handleRAF = function () {
  155. a._timerId = null, a._setupTick(), a._tick()
  156. }, a._handleTimeout = function () {
  157. a._timerId = null, a._setupTick(), a._tick()
  158. }, a._setupTick = function () {
  159. if (null == a._timerId) {
  160. var b = a.timingMode || a.useRAF && a.RAF_SYNCHED;
  161. if (b == a.RAF_SYNCHED || b == a.RAF) {
  162. var c = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame;
  163. if (c)return a._timerId = c(b == a.RAF ? a._handleRAF : a._handleSynch), a._raf = !0, void 0
  164. }
  165. a._raf = !1, a._timerId = setTimeout(a._handleTimeout, a._interval)
  166. }
  167. }, a._tick = function () {
  168. var b = a._getTime() - a._startTime, c = b - a._lastTime, d = a._paused;
  169. if (a._ticks++, d && (a._pausedTicks++, a._pausedTime += c), a._lastTime = b, a.hasEventListener("tick")) {
  170. var e = new createjs.Event("tick"), f = a.maxDelta;
  171. e.delta = f && c > f ? f : c, e.paused = d, e.time = b, e.runTime = b - a._pausedTime, a.dispatchEvent(e)
  172. }
  173. for (a._tickTimes.unshift(a._getTime() - b); a._tickTimes.length > 100;)a._tickTimes.pop();
  174. for (a._times.unshift(b); a._times.length > 100;)a._times.pop()
  175. };
  176. var b = window.performance && (performance.now || performance.mozNow || performance.msNow || performance.oNow || performance.webkitNow);
  177. a._getTime = function () {
  178. return b && b.call(performance) || (new Date).getTime()
  179. }, createjs.Ticker = a
  180. }(), this.createjs = this.createjs || {}, function () {
  181. "use strict";
  182. var a = function (a, b, c, d, e, f, g, h, i, j) {
  183. this.initialize(a, b, c, d, e, f, g, h, i, j)
  184. }, b = a.prototype = new createjs.Event;
  185. b.stageX = 0, b.stageY = 0, b.rawX = 0, b.rawY = 0, b.nativeEvent = null, b.pointerID = 0, b.primary = !1, b.addEventListener = null, b.removeEventListener = null, b.removeAllEventListeners = null, b.dispatchEvent = null, b.hasEventListener = null, b._listeners = null, createjs.EventDispatcher.initialize(b), b._get_localX = function () {
  186. return this.currentTarget.globalToLocal(this.rawX, this.rawY).x
  187. }, b._get_localY = function () {
  188. return this.currentTarget.globalToLocal(this.rawX, this.rawY).y
  189. };
  190. try {
  191. Object.defineProperties(b, {localX: {get: b._get_localX}, localY: {get: b._get_localY}})
  192. } catch (c) {
  193. }
  194. b.Event_initialize = b.initialize, b.initialize = function (a, b, c, d, e, f, g, h, i, j) {
  195. this.Event_initialize(a, b, c), this.stageX = d, this.stageY = e, this.nativeEvent = f, this.pointerID = g, this.primary = h, this.rawX = null == i ? d : i, this.rawY = null == j ? e : j
  196. }, b.clone = function () {
  197. return new a(this.type, this.bubbles, this.cancelable, this.stageX, this.stageY, this.target, this.nativeEvent, this.pointerID, this.primary, this.rawX, this.rawY)
  198. }, b.toString = function () {
  199. return "[MouseEvent (type=" + this.type + " stageX=" + this.stageX + " stageY=" + this.stageY + ")]"
  200. }, createjs.MouseEvent = a
  201. }(), this.createjs = this.createjs || {}, function () {
  202. "use strict";
  203. var a = function (a, b, c, d, e, f) {
  204. this.initialize(a, b, c, d, e, f)
  205. }, b = a.prototype;
  206. a.identity = null, a.DEG_TO_RAD = Math.PI / 180, b.a = 1, b.b = 0, b.c = 0, b.d = 1, b.tx = 0, b.ty = 0, b.alpha = 1, b.shadow = null, b.compositeOperation = null, b.initialize = function (a, b, c, d, e, f) {
  207. return this.a = null == a ? 1 : a, this.b = b || 0, this.c = c || 0, this.d = null == d ? 1 : d, this.tx = e || 0, this.ty = f || 0, this
  208. }, b.prepend = function (a, b, c, d, e, f) {
  209. var g = this.tx;
  210. if (1 != a || 0 != b || 0 != c || 1 != d) {
  211. var h = this.a, i = this.c;
  212. this.a = h * a + this.b * c, this.b = h * b + this.b * d, this.c = i * a + this.d * c, this.d = i * b + this.d * d
  213. }
  214. return this.tx = g * a + this.ty * c + e, this.ty = g * b + this.ty * d + f, this
  215. }, b.append = function (a, b, c, d, e, f) {
  216. var g = this.a, h = this.b, i = this.c, j = this.d;
  217. return this.a = a * g + b * i, this.b = a * h + b * j, this.c = c * g + d * i, this.d = c * h + d * j, this.tx = e * g + f * i + this.tx, this.ty = e * h + f * j + this.ty, this
  218. }, b.prependMatrix = function (a) {
  219. return this.prepend(a.a, a.b, a.c, a.d, a.tx, a.ty), this.prependProperties(a.alpha, a.shadow, a.compositeOperation), this
  220. }, b.appendMatrix = function (a) {
  221. return this.append(a.a, a.b, a.c, a.d, a.tx, a.ty), this.appendProperties(a.alpha, a.shadow, a.compositeOperation), this
  222. }, b.prependTransform = function (b, c, d, e, f, g, h, i, j) {
  223. if (f % 360)var k = f * a.DEG_TO_RAD, l = Math.cos(k), m = Math.sin(k); else l = 1, m = 0;
  224. return (i || j) && (this.tx -= i, this.ty -= j), g || h ? (g *= a.DEG_TO_RAD, h *= a.DEG_TO_RAD, this.prepend(l * d, m * d, -m * e, l * e, 0, 0), this.prepend(Math.cos(h), Math.sin(h), -Math.sin(g), Math.cos(g), b, c)) : this.prepend(l * d, m * d, -m * e, l * e, b, c), this
  225. }, b.appendTransform = function (b, c, d, e, f, g, h, i, j) {
  226. if (f % 360)var k = f * a.DEG_TO_RAD, l = Math.cos(k), m = Math.sin(k); else l = 1, m = 0;
  227. return g || h ? (g *= a.DEG_TO_RAD, h *= a.DEG_TO_RAD, this.append(Math.cos(h), Math.sin(h), -Math.sin(g), Math.cos(g), b, c), this.append(l * d, m * d, -m * e, l * e, 0, 0)) : this.append(l * d, m * d, -m * e, l * e, b, c), (i || j) && (this.tx -= i * this.a + j * this.c, this.ty -= i * this.b + j * this.d), this
  228. }, b.rotate = function (a) {
  229. var b = Math.cos(a), c = Math.sin(a), d = this.a, e = this.c, f = this.tx;
  230. return this.a = d * b - this.b * c, this.b = d * c + this.b * b, this.c = e * b - this.d * c, this.d = e * c + this.d * b, this.tx = f * b - this.ty * c, this.ty = f * c + this.ty * b, this
  231. }, b.skew = function (b, c) {
  232. return b *= a.DEG_TO_RAD, c *= a.DEG_TO_RAD, this.append(Math.cos(c), Math.sin(c), -Math.sin(b), Math.cos(b), 0, 0), this
  233. }, b.scale = function (a, b) {
  234. return this.a *= a, this.d *= b, this.c *= a, this.b *= b, this.tx *= a, this.ty *= b, this
  235. }, b.translate = function (a, b) {
  236. return this.tx += a, this.ty += b, this
  237. }, b.identity = function () {
  238. return this.alpha = this.a = this.d = 1, this.b = this.c = this.tx = this.ty = 0, this.shadow = this.compositeOperation = null, this
  239. }, b.invert = function () {
  240. var a = this.a, b = this.b, c = this.c, d = this.d, e = this.tx, f = a * d - b * c;
  241. return this.a = d / f, this.b = -b / f, this.c = -c / f, this.d = a / f, this.tx = (c * this.ty - d * e) / f, this.ty = -(a * this.ty - b * e) / f, this
  242. }, b.isIdentity = function () {
  243. return 0 == this.tx && 0 == this.ty && 1 == this.a && 0 == this.b && 0 == this.c && 1 == this.d
  244. }, b.transformPoint = function (a, b, c) {
  245. return c = c || {}, c.x = a * this.a + b * this.c + this.tx, c.y = a * this.b + b * this.d + this.ty, c
  246. }, b.decompose = function (b) {
  247. null == b && (b = {}), b.x = this.tx, b.y = this.ty, b.scaleX = Math.sqrt(this.a * this.a + this.b * this.b), b.scaleY = Math.sqrt(this.c * this.c + this.d * this.d);
  248. var c = Math.atan2(-this.c, this.d), d = Math.atan2(this.b, this.a);
  249. return c == d ? (b.rotation = d / a.DEG_TO_RAD, this.a < 0 && this.d >= 0 && (b.rotation += b.rotation <= 0 ? 180 : -180), b.skewX = b.skewY = 0) : (b.skewX = c / a.DEG_TO_RAD, b.skewY = d / a.DEG_TO_RAD), b
  250. }, b.reinitialize = function (a, b, c, d, e, f, g, h, i) {
  251. return this.initialize(a, b, c, d, e, f), this.alpha = null == g ? 1 : g, this.shadow = h, this.compositeOperation = i, this
  252. }, b.copy = function (a) {
  253. return this.reinitialize(a.a, a.b, a.c, a.d, a.tx, a.ty, a.alpha, a.shadow, a.compositeOperation)
  254. }, b.appendProperties = function (a, b, c) {
  255. return this.alpha *= a, this.shadow = b || this.shadow, this.compositeOperation = c || this.compositeOperation, this
  256. }, b.prependProperties = function (a, b, c) {
  257. return this.alpha *= a, this.shadow = this.shadow || b, this.compositeOperation = this.compositeOperation || c, this
  258. }, b.clone = function () {
  259. return (new a).copy(this)
  260. }, b.toString = function () {
  261. return "[Matrix2D (a=" + this.a + " b=" + this.b + " c=" + this.c + " d=" + this.d + " tx=" + this.tx + " ty=" + this.ty + ")]"
  262. }, a.identity = new a, createjs.Matrix2D = a
  263. }(), this.createjs = this.createjs || {}, function () {
  264. "use strict";
  265. var a = function (a, b) {
  266. this.initialize(a, b)
  267. }, b = a.prototype;
  268. b.x = 0, b.y = 0, b.initialize = function (a, b) {
  269. return this.x = null == a ? 0 : a, this.y = null == b ? 0 : b, this
  270. }, b.copy = function (a) {
  271. return this.initialize(a.x, a.y)
  272. }, b.clone = function () {
  273. return new a(this.x, this.y)
  274. }, b.toString = function () {
  275. return "[Point (x=" + this.x + " y=" + this.y + ")]"
  276. }, createjs.Point = a
  277. }(), this.createjs = this.createjs || {}, function () {
  278. "use strict";
  279. var a = function (a, b, c, d) {
  280. this.initialize(a, b, c, d)
  281. }, b = a.prototype;
  282. b.x = 0, b.y = 0, b.width = 0, b.height = 0, b.initialize = function (a, b, c, d) {
  283. return this.x = a || 0, this.y = b || 0, this.width = c || 0, this.height = d || 0, this
  284. }, b.copy = function (a) {
  285. return this.initialize(a.x, a.y, a.width, a.height)
  286. }, b.clone = function () {
  287. return new a(this.x, this.y, this.width, this.height)
  288. }, b.toString = function () {
  289. return "[Rectangle (x=" + this.x + " y=" + this.y + " width=" + this.width + " height=" + this.height + ")]"
  290. }, createjs.Rectangle = a
  291. }(), this.createjs = this.createjs || {}, function () {
  292. "use strict";
  293. var a = function (a, b, c, d, e, f, g) {
  294. this.initialize(a, b, c, d, e, f, g)
  295. }, b = a.prototype;
  296. b.target = null, b.overLabel = null, b.outLabel = null, b.downLabel = null, b.play = !1, b._isPressed = !1, b._isOver = !1, b.initialize = function (a, b, c, d, e, f, g) {
  297. a.addEventListener && (this.target = a, a.cursor = "pointer", this.overLabel = null == c ? "over" : c, this.outLabel = null == b ? "out" : b, this.downLabel = null == d ? "down" : d, this.play = e, this.setEnabled(!0), this.handleEvent({}), f && (g && (f.actionsEnabled = !1, f.gotoAndStop && f.gotoAndStop(g)), a.hitArea = f))
  298. }, b.setEnabled = function (a) {
  299. var b = this.target;
  300. a ? (b.addEventListener("rollover", this), b.addEventListener("rollout", this), b.addEventListener("mousedown", this), b.addEventListener("pressup", this)) : (b.removeEventListener("rollover", this), b.removeEventListener("rollout", this), b.removeEventListener("mousedown", this), b.removeEventListener("pressup", this))
  301. }, b.toString = function () {
  302. return "[ButtonHelper]"
  303. }, b.handleEvent = function (a) {
  304. var b, c = this.target, d = a.type;
  305. "mousedown" == d ? (this._isPressed = !0, b = this.downLabel) : "pressup" == d ? (this._isPressed = !1, b = this._isOver ? this.overLabel : this.outLabel) : "rollover" == d ? (this._isOver = !0, b = this._isPressed ? this.downLabel : this.overLabel) : (this._isOver = !1, b = this._isPressed ? this.overLabel : this.outLabel), this.play ? c.gotoAndPlay && c.gotoAndPlay(b) : c.gotoAndStop && c.gotoAndStop(b)
  306. }, createjs.ButtonHelper = a
  307. }(), this.createjs = this.createjs || {}, function () {
  308. "use strict";
  309. var a = function (a, b, c, d) {
  310. this.initialize(a, b, c, d)
  311. }, b = a.prototype;
  312. a.identity = null, b.color = null, b.offsetX = 0, b.offsetY = 0, b.blur = 0, b.initialize = function (a, b, c, d) {
  313. this.color = a, this.offsetX = b, this.offsetY = c, this.blur = d
  314. }, b.toString = function () {
  315. return "[Shadow]"
  316. }, b.clone = function () {
  317. return new a(this.color, this.offsetX, this.offsetY, this.blur)
  318. }, a.identity = new a("transparent", 0, 0, 0), createjs.Shadow = a
  319. }(), this.createjs = this.createjs || {}, function () {
  320. "use strict";
  321. var a = function (a) {
  322. this.initialize(a)
  323. }, b = a.prototype = new createjs.EventDispatcher;
  324. b.complete = !0, b.framerate = 0, b._animations = null, b._frames = null, b._images = null, b._data = null, b._loadCount = 0, b._frameHeight = 0, b._frameWidth = 0, b._numFrames = 0, b._regX = 0, b._regY = 0, b.initialize = function (a) {
  325. var b, c, d, e;
  326. if (null != a) {
  327. if (this.framerate = a.framerate || 0, a.images && (c = a.images.length) > 0)for (e = this._images = [], b = 0; c > b; b++) {
  328. var f = a.images[b];
  329. if ("string" == typeof f) {
  330. var g = f;
  331. f = document.createElement("img"), f.src = g
  332. }
  333. e.push(f), f.getContext || f.complete || (this._loadCount++, this.complete = !1, function (a) {
  334. f.onload = function () {
  335. a._handleImageLoad()
  336. }
  337. }(this))
  338. }
  339. if (null == a.frames); else if (a.frames instanceof Array)for (this._frames = [], e = a.frames, b = 0, c = e.length; c > b; b++) {
  340. var h = e[b];
  341. this._frames.push({
  342. image: this._images[h[4] ? h[4] : 0],
  343. rect: new createjs.Rectangle(h[0], h[1], h[2], h[3]),
  344. regX: h[5] || 0,
  345. regY: h[6] || 0
  346. })
  347. } else d = a.frames, this._frameWidth = d.width, this._frameHeight = d.height, this._regX = d.regX || 0, this._regY = d.regY || 0, this._numFrames = d.count, 0 == this._loadCount && this._calculateFrames();
  348. if (this._animations = [], null != (d = a.animations)) {
  349. this._data = {};
  350. var i;
  351. for (i in d) {
  352. var j = {name: i}, k = d[i];
  353. if ("number" == typeof k)e = j.frames = [k]; else if (k instanceof Array)if (1 == k.length)j.frames = [k[0]]; else for (j.speed = k[3], j.next = k[2], e = j.frames = [], b = k[0]; b <= k[1]; b++)e.push(b); else {
  354. j.speed = k.speed, j.next = k.next;
  355. var l = k.frames;
  356. e = j.frames = "number" == typeof l ? [l] : l.slice(0)
  357. }
  358. (j.next === !0 || void 0 === j.next) && (j.next = i), (j.next === !1 || e.length < 2 && j.next == i) && (j.next = null), j.speed || (j.speed = 1), this._animations.push(i), this._data[i] = j
  359. }
  360. }
  361. }
  362. }, b.getNumFrames = function (a) {
  363. if (null == a)return this._frames ? this._frames.length : this._numFrames;
  364. var b = this._data[a];
  365. return null == b ? 0 : b.frames.length
  366. }, b.getAnimations = function () {
  367. return this._animations.slice(0)
  368. }, b.getAnimation = function (a) {
  369. return this._data[a]
  370. }, b.getFrame = function (a) {
  371. var b;
  372. return this._frames && (b = this._frames[a]) ? b : null
  373. }, b.getFrameBounds = function (a, b) {
  374. var c = this.getFrame(a);
  375. return c ? (b || new createjs.Rectangle).initialize(-c.regX, -c.regY, c.rect.width, c.rect.height) : null
  376. }, b.toString = function () {
  377. return "[SpriteSheet]"
  378. }, b.clone = function () {
  379. var b = new a;
  380. return b.complete = this.complete, b._animations = this._animations, b._frames = this._frames, b._images = this._images, b._data = this._data, b._frameHeight = this._frameHeight, b._frameWidth = this._frameWidth, b._numFrames = this._numFrames, b._loadCount = this._loadCount, b
  381. }, b._handleImageLoad = function () {
  382. 0 == --this._loadCount && (this._calculateFrames(), this.complete = !0, this.dispatchEvent("complete"))
  383. }, b._calculateFrames = function () {
  384. if (!this._frames && 0 != this._frameWidth) {
  385. this._frames = [];
  386. for (var a = 0, b = this._frameWidth, c = this._frameHeight, d = 0, e = this._images; d < e.length; d++) {
  387. for (var f = e[d], g = 0 | f.width / b, h = 0 | f.height / c, i = this._numFrames > 0 ? Math.min(this._numFrames - a, g * h) : g * h, j = 0; i > j; j++)this._frames.push({
  388. image: f,
  389. rect: new createjs.Rectangle(j % g * b, (0 | j / g) * c, b, c),
  390. regX: this._regX,
  391. regY: this._regY
  392. });
  393. a += i
  394. }
  395. this._numFrames = a
  396. }
  397. }, createjs.SpriteSheet = a
  398. }(), this.createjs = this.createjs || {}, function () {
  399. "use strict";
  400. function a(a, b, c) {
  401. this.f = a, this.params = b, this.path = null == c ? !0 : c
  402. }
  403. a.prototype.exec = function (a) {
  404. this.f.apply(a, this.params)
  405. };
  406. var b = function () {
  407. this.initialize()
  408. }, c = b.prototype;
  409. b.getRGB = function (a, b, c, d) {
  410. return null != a && null == c && (d = b, c = 255 & a, b = 255 & a >> 8, a = 255 & a >> 16), null == d ? "rgb(" + a + "," + b + "," + c + ")" : "rgba(" + a + "," + b + "," + c + "," + d + ")"
  411. }, b.getHSL = function (a, b, c, d) {
  412. return null == d ? "hsl(" + a % 360 + "," + b + "%," + c + "%)" : "hsla(" + a % 360 + "," + b + "%," + c + "%," + d + ")"
  413. }, b.Command = a, b.BASE_64 = {
  414. A: 0,
  415. B: 1,
  416. C: 2,
  417. D: 3,
  418. E: 4,
  419. F: 5,
  420. G: 6,
  421. H: 7,
  422. I: 8,
  423. J: 9,
  424. K: 10,
  425. L: 11,
  426. M: 12,
  427. N: 13,
  428. O: 14,
  429. P: 15,
  430. Q: 16,
  431. R: 17,
  432. S: 18,
  433. T: 19,
  434. U: 20,
  435. V: 21,
  436. W: 22,
  437. X: 23,
  438. Y: 24,
  439. Z: 25,
  440. a: 26,
  441. b: 27,
  442. c: 28,
  443. d: 29,
  444. e: 30,
  445. f: 31,
  446. g: 32,
  447. h: 33,
  448. i: 34,
  449. j: 35,
  450. k: 36,
  451. l: 37,
  452. m: 38,
  453. n: 39,
  454. o: 40,
  455. p: 41,
  456. q: 42,
  457. r: 43,
  458. s: 44,
  459. t: 45,
  460. u: 46,
  461. v: 47,
  462. w: 48,
  463. x: 49,
  464. y: 50,
  465. z: 51,
  466. 0: 52,
  467. 1: 53,
  468. 2: 54,
  469. 3: 55,
  470. 4: 56,
  471. 5: 57,
  472. 6: 58,
  473. 7: 59,
  474. 8: 60,
  475. 9: 61,
  476. "+": 62,
  477. "/": 63
  478. }, b.STROKE_CAPS_MAP = ["butt", "round", "square"], b.STROKE_JOINTS_MAP = ["miter", "round", "bevel"];
  479. var d = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas");
  480. if (d.getContext) {
  481. var e = b._ctx = d.getContext("2d");
  482. b.beginCmd = new a(e.beginPath, [], !1), b.fillCmd = new a(e.fill, [], !1), b.strokeCmd = new a(e.stroke, [], !1), d.width = d.height = 1
  483. }
  484. c._strokeInstructions = null, c._strokeStyleInstructions = null, c._strokeIgnoreScale = !1, c._fillInstructions = null, c._fillMatrix = null, c._instructions = null, c._oldInstructions = null, c._activeInstructions = null, c._active = !1, c._dirty = !1, c.initialize = function () {
  485. this.clear(), this._ctx = b._ctx
  486. }, c.isEmpty = function () {
  487. return !(this._instructions.length || this._oldInstructions.length || this._activeInstructions.length)
  488. }, c.draw = function (a) {
  489. this._dirty && this._updateInstructions();
  490. for (var b = this._instructions, c = 0, d = b.length; d > c; c++)b[c].exec(a)
  491. }, c.drawAsPath = function (a) {
  492. this._dirty && this._updateInstructions();
  493. for (var b, c = this._instructions, d = 0, e = c.length; e > d; d++)((b = c[d]).path || 0 == d) && b.exec(a)
  494. }, c.moveTo = function (b, c) {
  495. return this._activeInstructions.push(new a(this._ctx.moveTo, [b, c])), this
  496. }, c.lineTo = function (b, c) {
  497. return this._dirty = this._active = !0, this._activeInstructions.push(new a(this._ctx.lineTo, [b, c])), this
  498. }, c.arcTo = function (b, c, d, e, f) {
  499. return this._dirty = this._active = !0, this._activeInstructions.push(new a(this._ctx.arcTo, [b, c, d, e, f])), this
  500. }, c.arc = function (b, c, d, e, f, g) {
  501. return this._dirty = this._active = !0, null == g && (g = !1), this._activeInstructions.push(new a(this._ctx.arc, [b, c, d, e, f, g])), this
  502. }, c.quadraticCurveTo = function (b, c, d, e) {
  503. return this._dirty = this._active = !0, this._activeInstructions.push(new a(this._ctx.quadraticCurveTo, [b, c, d, e])), this
  504. }, c.bezierCurveTo = function (b, c, d, e, f, g) {
  505. return this._dirty = this._active = !0, this._activeInstructions.push(new a(this._ctx.bezierCurveTo, [b, c, d, e, f, g])), this
  506. }, c.rect = function (b, c, d, e) {
  507. return this._dirty = this._active = !0, this._activeInstructions.push(new a(this._ctx.rect, [b, c, d, e])), this
  508. }, c.closePath = function () {
  509. return this._active && (this._dirty = !0, this._activeInstructions.push(new a(this._ctx.closePath, []))), this
  510. }, c.clear = function () {
  511. return this._instructions = [], this._oldInstructions = [], this._activeInstructions = [], this._strokeStyleInstructions = this._strokeInstructions = this._fillInstructions = this._fillMatrix = null, this._active = this._dirty = this._strokeIgnoreScale = !1, this
  512. }, c.beginFill = function (b) {
  513. return this._active && this._newPath(), this._fillInstructions = b ? [new a(this._setProp, ["fillStyle", b], !1)] : null, this._fillMatrix = null, this
  514. }, c.beginLinearGradientFill = function (b, c, d, e, f, g) {
  515. this._active && this._newPath();
  516. for (var h = this._ctx.createLinearGradient(d, e, f, g), i = 0, j = b.length; j > i; i++)h.addColorStop(c[i], b[i]);
  517. return this._fillInstructions = [new a(this._setProp, ["fillStyle", h], !1)], this._fillMatrix = null, this
  518. }, c.beginRadialGradientFill = function (b, c, d, e, f, g, h, i) {
  519. this._active && this._newPath();
  520. for (var j = this._ctx.createRadialGradient(d, e, f, g, h, i), k = 0, l = b.length; l > k; k++)j.addColorStop(c[k], b[k]);
  521. return this._fillInstructions = [new a(this._setProp, ["fillStyle", j], !1)], this._fillMatrix = null, this
  522. }, c.beginBitmapFill = function (b, c, d) {
  523. this._active && this._newPath(), c = c || "";
  524. var e = this._ctx.createPattern(b, c);
  525. return this._fillInstructions = [new a(this._setProp, ["fillStyle", e], !1)], this._fillMatrix = d ? [d.a, d.b, d.c, d.d, d.tx, d.ty] : null, this
  526. }, c.endFill = function () {
  527. return this.beginFill()
  528. }, c.setStrokeStyle = function (c, d, e, f, g) {
  529. return this._active && this._newPath(), this._strokeStyleInstructions = [new a(this._setProp, ["lineWidth", null == c ? "1" : c], !1), new a(this._setProp, ["lineCap", null == d ? "butt" : isNaN(d) ? d : b.STROKE_CAPS_MAP[d]], !1), new a(this._setProp, ["lineJoin", null == e ? "miter" : isNaN(e) ? e : b.STROKE_JOINTS_MAP[e]], !1), new a(this._setProp, ["miterLimit", null == f ? "10" : f], !1)], this._strokeIgnoreScale = g, this
  530. }, c.beginStroke = function (b) {
  531. return this._active && this._newPath(), this._strokeInstructions = b ? [new a(this._setProp, ["strokeStyle", b], !1)] : null, this
  532. }, c.beginLinearGradientStroke = function (b, c, d, e, f, g) {
  533. this._active && this._newPath();
  534. for (var h = this._ctx.createLinearGradient(d, e, f, g), i = 0, j = b.length; j > i; i++)h.addColorStop(c[i], b[i]);
  535. return this._strokeInstructions = [new a(this._setProp, ["strokeStyle", h], !1)], this
  536. }, c.beginRadialGradientStroke = function (b, c, d, e, f, g, h, i) {
  537. this._active && this._newPath();
  538. for (var j = this._ctx.createRadialGradient(d, e, f, g, h, i), k = 0, l = b.length; l > k; k++)j.addColorStop(c[k], b[k]);
  539. return this._strokeInstructions = [new a(this._setProp, ["strokeStyle", j], !1)], this
  540. }, c.beginBitmapStroke = function (b, c) {
  541. this._active && this._newPath(), c = c || "";
  542. var d = this._ctx.createPattern(b, c);
  543. return this._strokeInstructions = [new a(this._setProp, ["strokeStyle", d], !1)], this
  544. }, c.endStroke = function () {
  545. return this.beginStroke(), this
  546. }, c.curveTo = c.quadraticCurveTo, c.drawRect = c.rect, c.drawRoundRect = function (a, b, c, d, e) {
  547. return this.drawRoundRectComplex(a, b, c, d, e, e, e, e), this
  548. }, c.drawRoundRectComplex = function (b, c, d, e, f, g, h, i) {
  549. var j = (e > d ? d : e) / 2, k = 0, l = 0, m = 0, n = 0;
  550. 0 > f && (f *= k = -1), f > j && (f = j), 0 > g && (g *= l = -1), g > j && (g = j), 0 > h && (h *= m = -1), h > j && (h = j), 0 > i && (i *= n = -1), i > j && (i = j), this._dirty = this._active = !0;
  551. var o = this._ctx.arcTo, p = this._ctx.lineTo;
  552. return this._activeInstructions.push(new a(this._ctx.moveTo, [b + d - g, c]), new a(o, [b + d + g * l, c - g * l, b + d, c + g, g]), new a(p, [b + d, c + e - h]), new a(o, [b + d + h * m, c + e + h * m, b + d - h, c + e, h]), new a(p, [b + i, c + e]), new a(o, [b - i * n, c + e + i * n, b, c + e - i, i]), new a(p, [b, c + f]), new a(o, [b - f * k, c - f * k, b + f, c, f]), new a(this._ctx.closePath)), this
  553. }, c.drawCircle = function (a, b, c) {
  554. return this.arc(a, b, c, 0, 2 * Math.PI), this
  555. }, c.drawEllipse = function (b, c, d, e) {
  556. this._dirty = this._active = !0;
  557. var f = .5522848, g = d / 2 * f, h = e / 2 * f, i = b + d, j = c + e, k = b + d / 2, l = c + e / 2;
  558. return this._activeInstructions.push(new a(this._ctx.moveTo, [b, l]), new a(this._ctx.bezierCurveTo, [b, l - h, k - g, c, k, c]), new a(this._ctx.bezierCurveTo, [k + g, c, i, l - h, i, l]), new a(this._ctx.bezierCurveTo, [i, l + h, k + g, j, k, j]), new a(this._ctx.bezierCurveTo, [k - g, j, b, l + h, b, l])), this
  559. }, c.inject = function (b, c) {
  560. return this._dirty = this._active = !0, this._activeInstructions.push(new a(b, [c])), this
  561. }, c.drawPolyStar = function (b, c, d, e, f, g) {
  562. this._dirty = this._active = !0, null == f && (f = 0), f = 1 - f, null == g ? g = 0 : g /= 180 / Math.PI;
  563. var h = Math.PI / e;
  564. this._activeInstructions.push(new a(this._ctx.moveTo, [b + Math.cos(g) * d, c + Math.sin(g) * d]));
  565. for (var i = 0; e > i; i++)g += h, 1 != f && this._activeInstructions.push(new a(this._ctx.lineTo, [b + Math.cos(g) * d * f, c + Math.sin(g) * d * f])), g += h, this._activeInstructions.push(new a(this._ctx.lineTo, [b + Math.cos(g) * d, c + Math.sin(g) * d]));
  566. return this
  567. }, c.decodePath = function (a) {
  568. for (var c = [this.moveTo, this.lineTo, this.quadraticCurveTo, this.bezierCurveTo, this.closePath], d = [2, 2, 4, 6, 0], e = 0, f = a.length, g = [], h = 0, i = 0, j = b.BASE_64; f > e;) {
  569. var k = a.charAt(e), l = j[k], m = l >> 3, n = c[m];
  570. if (!n || 3 & l)throw"bad path data (@" + e + "): " + k;
  571. var o = d[m];
  572. m || (h = i = 0), g.length = 0, e++;
  573. for (var p = (1 & l >> 2) + 2, q = 0; o > q; q++) {
  574. var r = j[a.charAt(e)], s = r >> 5 ? -1 : 1;
  575. r = (31 & r) << 6 | j[a.charAt(e + 1)], 3 == p && (r = r << 6 | j[a.charAt(e + 2)]), r = s * r / 10, q % 2 ? h = r += h : i = r += i, g[q] = r, e += p
  576. }
  577. n.apply(this, g)
  578. }
  579. return this
  580. }, c.clone = function () {
  581. var a = new b;
  582. return a._instructions = this._instructions.slice(), a._activeInstructions = this._activeInstructions.slice(), a._oldInstructions = this._oldInstructions.slice(), this._fillInstructions && (a._fillInstructions = this._fillInstructions.slice()), this._strokeInstructions && (a._strokeInstructions = this._strokeInstructions.slice()), this._strokeStyleInstructions && (a._strokeStyleInstructions = this._strokeStyleInstructions.slice()), a._active = this._active, a._dirty = this._dirty, a._fillMatrix = this._fillMatrix, a._strokeIgnoreScale = this._strokeIgnoreScale, a
  583. }, c.toString = function () {
  584. return "[Graphics]"
  585. }, c.mt = c.moveTo, c.lt = c.lineTo, c.at = c.arcTo, c.bt = c.bezierCurveTo, c.qt = c.quadraticCurveTo, c.a = c.arc, c.r = c.rect, c.cp = c.closePath, c.c = c.clear, c.f = c.beginFill, c.lf = c.beginLinearGradientFill, c.rf = c.beginRadialGradientFill, c.bf = c.beginBitmapFill, c.ef = c.endFill, c.ss = c.setStrokeStyle, c.s = c.beginStroke, c.ls = c.beginLinearGradientStroke, c.rs = c.beginRadialGradientStroke, c.bs = c.beginBitmapStroke, c.es = c.endStroke, c.dr = c.drawRect, c.rr = c.drawRoundRect, c.rc = c.drawRoundRectComplex, c.dc = c.drawCircle, c.de = c.drawEllipse, c.dp = c.drawPolyStar, c.p = c.decodePath, c._updateInstructions = function () {
  586. this._instructions = this._oldInstructions.slice(), this._instructions.push(b.beginCmd), this._appendInstructions(this._fillInstructions), this._appendInstructions(this._strokeInstructions), this._appendInstructions(this._strokeInstructions && this._strokeStyleInstructions), this._appendInstructions(this._activeInstructions), this._fillInstructions && this._appendDraw(b.fillCmd, this._fillMatrix), this._strokeInstructions && this._appendDraw(b.strokeCmd, this._strokeIgnoreScale && [1, 0, 0, 1, 0, 0])
  587. }, c._appendInstructions = function (a) {
  588. a && this._instructions.push.apply(this._instructions, a)
  589. }, c._appendDraw = function (b, c) {
  590. c ? this._instructions.push(new a(this._ctx.save, [], !1), new a(this._ctx.transform, c, !1), b, new a(this._ctx.restore, [], !1)) : this._instructions.push(b)
  591. }, c._newPath = function () {
  592. this._dirty && this._updateInstructions(), this._oldInstructions = this._instructions, this._activeInstructions = [], this._active = this._dirty = !1
  593. }, c._setProp = function (a, b) {
  594. this[a] = b
  595. }, createjs.Graphics = b
  596. }(), this.createjs = this.createjs || {}, function () {
  597. var a = function () {
  598. this.initialize()
  599. }, b = a.prototype = new createjs.EventDispatcher;
  600. a._MOUSE_EVENTS = ["click", "dblclick", "mousedown", "mouseout", "mouseover", "pressmove", "pressup", "rollout", "rollover"], a.suppressCrossDomainErrors = !1;
  601. var c = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas");
  602. c.getContext && (a._hitTestCanvas = c, a._hitTestContext = c.getContext("2d"), c.width = c.height = 1), a._nextCacheID = 1, b.alpha = 1, b.cacheCanvas = null, b.id = -1, b.mouseEnabled = !0, b.tickEnabled = !0, b.name = null, b.parent = null, b.regX = 0, b.regY = 0, b.rotation = 0, b.scaleX = 1, b.scaleY = 1, b.skewX = 0, b.skewY = 0, b.shadow = null, b.visible = !0, b.x = 0, b.y = 0, b.compositeOperation = null, b.snapToPixel = !1, b.filters = null, b.cacheID = 0, b.mask = null, b.hitArea = null, b.cursor = null, b._cacheOffsetX = 0, b._cacheOffsetY = 0, b._cacheScale = 1, b._cacheDataURLID = 0, b._cacheDataURL = null, b._matrix = null, b._rectangle = null, b._bounds = null, b.initialize = function () {
  603. this.id = createjs.UID.get(), this._matrix = new createjs.Matrix2D, this._rectangle = new createjs.Rectangle
  604. }, b.isVisible = function () {
  605. return !!(this.visible && this.alpha > 0 && 0 != this.scaleX && 0 != this.scaleY)
  606. }, b.draw = function (a, b) {
  607. var c = this.cacheCanvas;
  608. if (b || !c)return !1;
  609. var d, e = this._cacheScale, f = this._cacheOffsetX, g = this._cacheOffsetY;
  610. return (d = this._applyFilterBounds(f, g, 0, 0)) && (f = d.x, g = d.y), a.drawImage(c, f, g, c.width / e, c.height / e), !0
  611. }, b.updateContext = function (a) {
  612. var b, c = this.mask, d = this;
  613. c && c.graphics && !c.graphics.isEmpty() && (b = c.getMatrix(c._matrix), a.transform(b.a, b.b, b.c, b.d, b.tx, b.ty), c.graphics.drawAsPath(a), a.clip(), b.invert(), a.transform(b.a, b.b, b.c, b.d, b.tx, b.ty)), b = d._matrix.identity().appendTransform(d.x, d.y, d.scaleX, d.scaleY, d.rotation, d.skewX, d.skewY, d.regX, d.regY), createjs.Stage._snapToPixelEnabled && d.snapToPixel ? a.transform(b.a, b.b, b.c, b.d, 0 | b.tx + .5, 0 | b.ty + .5) : a.transform(b.a, b.b, b.c, b.d, b.tx, b.ty), a.globalAlpha *= d.alpha, d.compositeOperation && (a.globalCompositeOperation = d.compositeOperation), d.shadow && this._applyShadow(a, d.shadow)
  614. }, b.cache = function (a, b, c, d, e) {
  615. e = e || 1, this.cacheCanvas || (this.cacheCanvas = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas")), this._cacheWidth = c, this._cacheHeight = d, this._cacheOffsetX = a, this._cacheOffsetY = b, this._cacheScale = e, this.updateCache()
  616. }, b.updateCache = function (b) {
  617. var c, d = this.cacheCanvas, e = this._cacheScale, f = this._cacheOffsetX * e, g = this._cacheOffsetY * e, h = this._cacheWidth, i = this._cacheHeight;
  618. if (!d)throw"cache() must be called before updateCache()";
  619. var j = d.getContext("2d");
  620. (c = this._applyFilterBounds(f, g, h, i)) && (f = c.x, g = c.y, h = c.width, i = c.height), h = Math.ceil(h * e), i = Math.ceil(i * e), h != d.width || i != d.height ? (d.width = h, d.height = i) : b || j.clearRect(0, 0, h + 1, i + 1),j.width = j.width; j.save(), j.globalCompositeOperation = b, j.setTransform(e, 0, 0, e, -f, -g), this.draw(j, !0), this._applyFilters(), j.restore(), this.cacheID = a._nextCacheID++
  621. }, b.uncache = function () {
  622. this._cacheDataURL = this.cacheCanvas = null, this.cacheID = this._cacheOffsetX = this._cacheOffsetY = 0, this._cacheScale = 1
  623. }, b.getCacheDataURL = function () {
  624. return this.cacheCanvas ? (this.cacheID != this._cacheDataURLID && (this._cacheDataURL = this.cacheCanvas.toDataURL()), this._cacheDataURL) : null
  625. }, b.getStage = function () {
  626. for (var a = this; a.parent;)a = a.parent;
  627. return a instanceof createjs.Stage ? a : null
  628. }, b.localToGlobal = function (a, b) {
  629. var c = this.getConcatenatedMatrix(this._matrix);
  630. return null == c ? null : (c.append(1, 0, 0, 1, a, b), new createjs.Point(c.tx, c.ty))
  631. }, b.globalToLocal = function (a, b) {
  632. var c = this.getConcatenatedMatrix(this._matrix);
  633. return null == c ? null : (c.invert(), c.append(1, 0, 0, 1, a, b), new createjs.Point(c.tx, c.ty))
  634. }, b.localToLocal = function (a, b, c) {
  635. var d = this.localToGlobal(a, b);
  636. return c.globalToLocal(d.x, d.y)
  637. }, b.setTransform = function (a, b, c, d, e, f, g, h, i) {
  638. return this.x = a || 0, this.y = b || 0, this.scaleX = null == c ? 1 : c, this.scaleY = null == d ? 1 : d, this.rotation = e || 0, this.skewX = f || 0, this.skewY = g || 0, this.regX = h || 0, this.regY = i || 0, this
  639. }, b.getMatrix = function (a) {
  640. var b = this;
  641. return (a ? a.identity() : new createjs.Matrix2D).appendTransform(b.x, b.y, b.scaleX, b.scaleY, b.rotation, b.skewX, b.skewY, b.regX, b.regY).appendProperties(b.alpha, b.shadow, b.compositeOperation)
  642. }, b.getConcatenatedMatrix = function (a) {
  643. a ? a.identity() : a = new createjs.Matrix2D;
  644. for (var b = this; null != b;)a.prependTransform(b.x, b.y, b.scaleX, b.scaleY, b.rotation, b.skewX, b.skewY, b.regX, b.regY).prependProperties(b.alpha, b.shadow, b.compositeOperation), b = b.parent;
  645. return a
  646. }, b.hitTest = function (b, c) {
  647. var d = a._hitTestContext;
  648. d.setTransform(1, 0, 0, 1, -b, -c), this.draw(d);
  649. var e = this._testHit(d);
  650. return d.setTransform(1, 0, 0, 1, 0, 0), d.clearRect(0, 0, 2, 2), e
  651. }, b.set = function (a) {
  652. for (var b in a)this[b] = a[b];
  653. return this
  654. }, b.getBounds = function () {
  655. if (this._bounds)return this._rectangle.copy(this._bounds);
  656. var a = this.cacheCanvas;
  657. if (a) {
  658. var b = this._cacheScale;
  659. return this._rectangle.initialize(this._cacheOffsetX, this._cacheOffsetY, a.width / b, a.height / b)
  660. }
  661. return null
  662. }, b.getTransformedBounds = function () {
  663. return this._getBounds()
  664. }, b.setBounds = function (a, b, c, d) {
  665. null == a && (this._bounds = a), this._bounds = (this._bounds || new createjs.Rectangle).initialize(a, b, c, d)
  666. }, b.clone = function () {
  667. var b = new a;
  668. return this.cloneProps(b), b
  669. }, b.toString = function () {
  670. return "[DisplayObject (name=" + this.name + ")]"
  671. }, b.cloneProps = function (a) {
  672. a.alpha = this.alpha, a.name = this.name, a.regX = this.regX, a.regY = this.regY, a.rotation = this.rotation, a.scaleX = this.scaleX, a.scaleY = this.scaleY, a.shadow = this.shadow, a.skewX = this.skewX, a.skewY = this.skewY, a.visible = this.visible, a.x = this.x, a.y = this.y, a._bounds = this._bounds, a.mouseEnabled = this.mouseEnabled, a.compositeOperation = this.compositeOperation
  673. }, b._applyShadow = function (a, b) {
  674. b = b || Shadow.identity, a.shadowColor = b.color, a.shadowOffsetX = b.offsetX, a.shadowOffsetY = b.offsetY, a.shadowBlur = b.blur
  675. }, b._tick = function (a) {
  676. var b = this._listeners;
  677. if (b && b.tick) {
  678. var c = new createjs.Event("tick");
  679. c.params = a, this._dispatchEvent(c, this, 2)
  680. }
  681. }, b._testHit = function (b) {
  682. try {
  683. var c = b.getImageData(0, 0, 1, 1).data[3] > 1
  684. } catch (d) {
  685. if (!a.suppressCrossDomainErrors)throw"An error has occurred. This is most likely due to security restrictions on reading canvas pixel data with local or cross-domain images."
  686. }
  687. return c
  688. }, b._applyFilters = function () {
  689. if (this.filters && 0 != this.filters.length && this.cacheCanvas)for (var a = this.filters.length, b = this.cacheCanvas.getContext("2d"), c = this.cacheCanvas.width, d = this.cacheCanvas.height, e = 0; a > e; e++)this.filters[e].applyFilter(b, 0, 0, c, d)
  690. }, b._applyFilterBounds = function (a, b, c, d) {
  691. var e, f, g = this.filters;
  692. if (!g || !(f = g.length))return null;
  693. for (var h = 0; f > h; h++) {
  694. var i = this.filters[h], j = i.getBounds && i.getBounds();
  695. j && (e || (e = this._rectangle.initialize(a, b, c, d)), e.x += j.x, e.y += j.y, e.width += j.width, e.height += j.height)
  696. }
  697. return e
  698. }, b._getBounds = function (a, b) {
  699. return this._transformBounds(this.getBounds(), a, b)
  700. }, b._transformBounds = function (a, b, c) {
  701. if (!a)return a;
  702. var d = a.x, e = a.y, f = a.width, g = a.height, h = c ? this._matrix.identity() : this.getMatrix(this._matrix);
  703. (d || e) && h.appendTransform(0, 0, 1, 1, 0, 0, 0, -d, -e), b && h.prependMatrix(b);
  704. var i = f * h.a, j = f * h.b, k = g * h.c, l = g * h.d, m = h.tx, n = h.ty, o = m, p = m, q = n, r = n;
  705. return (d = i + m) < o ? o = d : d > p && (p = d), (d = i + k + m) < o ? o = d : d > p && (p = d), (d = k + m) < o ? o = d : d > p && (p = d), (e = j + n) < q ? q = e : e > r && (r = e), (e = j + l + n) < q ? q = e : e > r && (r = e), (e = l + n) < q ? q = e : e > r && (r = e), a.initialize(o, q, p - o, r - q)
  706. }, b._hasMouseEventListener = function () {
  707. for (var b = a._MOUSE_EVENTS, c = 0, d = b.length; d > c; c++)if (this.hasEventListener(b[c]))return !0;
  708. return !!this.cursor
  709. }, createjs.DisplayObject = a
  710. }(), this.createjs = this.createjs || {}, function () {
  711. var a = function () {
  712. this.initialize()
  713. }, b = a.prototype = new createjs.DisplayObject;
  714. b.children = null, b.mouseChildren = !0, b.tickChildren = !0, b.DisplayObject_initialize = b.initialize, b.initialize = function () {
  715. this.DisplayObject_initialize(), this.children = []
  716. }, b.isVisible = function () {
  717. var a = this.cacheCanvas || this.children.length;
  718. return !!(this.visible && this.alpha > 0 && 0 != this.scaleX && 0 != this.scaleY && a)
  719. }, b.DisplayObject_draw = b.draw, b.draw = function (a, b) {
  720. if (this.DisplayObject_draw(a, b))return !0;
  721. for (var c = this.children.slice(0), d = 0, e = c.length; e > d; d++) {
  722. var f = c[d];
  723. f.isVisible() && (a.save(), f.updateContext(a), f.draw(a), a.restore())
  724. }
  725. return !0
  726. }, b.addChild = function (a) {
  727. if (null == a)return a;
  728. var b = arguments.length;
  729. if (b > 1) {
  730. for (var c = 0; b > c; c++)this.addChild(arguments[c]);
  731. return arguments[b - 1]
  732. }
  733. return a.parent && a.parent.removeChild(a), a.parent = this, this.children.push(a), a
  734. }, b.addChildAt = function (a, b) {
  735. var c = arguments.length, d = arguments[c - 1];
  736. if (0 > d || d > this.children.length)return arguments[c - 2];
  737. if (c > 2) {
  738. for (var e = 0; c - 1 > e; e++)this.addChildAt(arguments[e], d + e);
  739. return arguments[c - 2]
  740. }
  741. return a.parent && a.parent.removeChild(a), a.parent = this, this.children.splice(b, 0, a), a
  742. }, b.removeChild = function (a) {
  743. var b = arguments.length;
  744. if (b > 1) {
  745. for (var c = !0, d = 0; b > d; d++)c = c && this.removeChild(arguments[d]);
  746. return c
  747. }
  748. return this.removeChildAt(createjs.indexOf(this.children, a))
  749. }, b.removeChildAt = function (a) {
  750. var b = arguments.length;
  751. if (b > 1) {
  752. for (var c = [], d = 0; b > d; d++)c[d] = arguments[d];
  753. c.sort(function (a, b) {
  754. return b - a
  755. });
  756. for (var e = !0, d = 0; b > d; d++)e = e && this.removeChildAt(c[d]);
  757. return e
  758. }
  759. if (0 > a || a > this.children.length - 1)return !1;
  760. var f = this.children[a];
  761. return f && (f.parent = null), this.children.splice(a, 1), !0
  762. }, b.removeAllChildren = function () {
  763. for (var a = this.children; a.length;)a.pop().parent = null
  764. }, b.getChildAt = function (a) {
  765. return this.children[a]
  766. }, b.getChildByName = function (a) {
  767. for (var b = this.children, c = 0, d = b.length; d > c; c++)if (b[c].name == a)return b[c];
  768. return null
  769. }, b.sortChildren = function (a) {
  770. this.children.sort(a)
  771. }, b.getChildIndex = function (a) {
  772. return createjs.indexOf(this.children, a)
  773. }, b.getNumChildren = function () {
  774. return this.children.length
  775. }, b.swapChildrenAt = function (a, b) {
  776. var c = this.children, d = c[a], e = c[b];
  777. d && e && (c[a] = e, c[b] = d)
  778. }, b.swapChildren = function (a, b) {
  779. for (var c, d, e = this.children, f = 0, g = e.length; g > f && (e[f] == a && (c = f), e[f] == b && (d = f), null == c || null == d); f++);
  780. f != g && (e[c] = b, e[d] = a)
  781. }, b.setChildIndex = function (a, b) {
  782. var c = this.children, d = c.length;
  783. if (!(a.parent != this || 0 > b || b >= d)) {
  784. for (var e = 0; d > e && c[e] != a; e++);
  785. e != d && e != b && (c.splice(e, 1), c.splice(b, 0, a))
  786. }
  787. }, b.contains = function (a) {
  788. for (; a;) {
  789. if (a == this)return !0;
  790. a = a.parent
  791. }
  792. return !1
  793. }, b.hitTest = function (a, b) {
  794. return null != this.getObjectUnderPoint(a, b)
  795. }, b.getObjectsUnderPoint = function (a, b) {
  796. var c = [], d = this.localToGlobal(a, b);
  797. return this._getObjectsUnderPoint(d.x, d.y, c), c
  798. }, b.getObjectUnderPoint = function (a, b) {
  799. var c = this.localToGlobal(a, b);
  800. return this._getObjectsUnderPoint(c.x, c.y)
  801. }, b.DisplayObject_getBounds = b.getBounds, b.getBounds = function () {
  802. return this._getBounds(null, !0)
  803. }, b.getTransformedBounds = function () {
  804. return this._getBounds()
  805. }, b.clone = function (b) {
  806. var c = new a;
  807. if (this.cloneProps(c), b)for (var d = c.children = [], e = 0, f = this.children.length; f > e; e++) {
  808. var g = this.children[e].clone(b);
  809. g.parent = c, d.push(g)
  810. }
  811. return c
  812. }, b.toString = function () {
  813. return "[Container (name=" + this.name + ")]"
  814. }, b.DisplayObject__tick = b._tick, b._tick = function (a) {
  815. if (this.tickChildren)for (var b = this.children.length - 1; b >= 0; b--) {
  816. var c = this.children[b];
  817. c.tickEnabled && c._tick && c._tick(a)
  818. }
  819. this.DisplayObject__tick(a)
  820. }, b._getObjectsUnderPoint = function (b, c, d, e, f) {
  821. var g = createjs.DisplayObject._hitTestContext, h = this._matrix;
  822. f = f || e && this._hasMouseEventListener();
  823. for (var i = this.children, j = i.length, k = j - 1; k >= 0; k--) {
  824. var l = i[k], m = l.hitArea;
  825. if (l.visible && (m || l.isVisible()) && (!e || l.mouseEnabled))if (!m && l instanceof a) {
  826. var n = l._getObjectsUnderPoint(b, c, d, e, f);
  827. if (!d && n)return e && !this.mouseChildren ? this : n
  828. } else {
  829. if (!f && !l._hasMouseEventListener())continue;
  830. if (l.getConcatenatedMatrix(h), m && (h.appendTransform(m.x, m.y, m.scaleX, m.scaleY, m.rotation, m.skewX, m.skewY, m.regX, m.regY), h.alpha = m.alpha), g.globalAlpha = h.alpha, g.setTransform(h.a, h.b, h.c, h.d, h.tx - b, h.ty - c), (m || l).draw(g), !this._testHit(g))continue;
  831. if (g.setTransform(1, 0, 0, 1, 0, 0), g.clearRect(0, 0, 2, 2), !d)return e && !this.mouseChildren ? this : l;
  832. d.push(l)
  833. }
  834. }
  835. return null
  836. }, b._getBounds = function (a, b) {
  837. var c = this.DisplayObject_getBounds();
  838. if (c)return this._transformBounds(c, a, b);
  839. var d, e, f, g, h = b ? this._matrix.identity() : this.getMatrix(this._matrix);
  840. a && h.prependMatrix(a);
  841. for (var i = this.children.length, j = 0; i > j; j++) {
  842. var k = this.children[j];
  843. if (k.visible && (c = k._getBounds(h))) {
  844. var l = c.x, m = c.y, n = l + c.width, o = m + c.height;
  845. (d > l || null == d) && (d = l), (n > e || null == e) && (e = n), (f > m || null == f) && (f = m), (o > g || null == g) && (g = o)
  846. }
  847. }
  848. return null == e ? null : this._rectangle.initialize(d, f, e - d, g - f)
  849. }, createjs.Container = a
  850. }(), this.createjs = this.createjs || {}, function () {
  851. "use strict";
  852. var a = function (a) {
  853. this.initialize(a)
  854. }, b = a.prototype = new createjs.Container;
  855. a._snapToPixelEnabled = !1, b.autoClear = !0, b.canvas = null, b.mouseX = 0, b.mouseY = 0, b.snapToPixelEnabled = !1, b.mouseInBounds = !1, b.tickOnUpdate = !0, b.mouseMoveOutside = !1, b.nextStage = null, b._pointerData = null, b._pointerCount = 0, b._primaryPointerID = null, b._mouseOverIntervalID = null, b.Container_initialize = b.initialize, b.initialize = function (a) {
  856. this.Container_initialize(), this.canvas = "string" == typeof a ? document.getElementById(a) : a, this._pointerData = {}, this.enableDOMEvents(!0)
  857. }, b.update = function () {
  858. if (this.canvas) {
  859. this.tickOnUpdate && (this.dispatchEvent("tickstart"), this.tickEnabled && this._tick(arguments.length ? arguments : null), this.dispatchEvent("tickend")), this.dispatchEvent("drawstart"), a._snapToPixelEnabled = this.snapToPixelEnabled, this.autoClear && this.clear();
  860. var b = this.canvas.getContext("2d");
  861. b.save(), this.updateContext(b), this.draw(b, !1), b.restore(), this.dispatchEvent("drawend")
  862. }
  863. }, b.handleEvent = function (a) {
  864. "tick" == a.type && this.update(a)
  865. }, b.clear = function () {
  866. if (this.canvas) {
  867. var a = this.canvas.getContext("2d");
  868. a.setTransform(1, 0, 0, 1, 0, 0), a.clearRect(0, 0, this.canvas.width + 1, this.canvas.height + 1);
  869. //this.canvas.style.visibility = 'none'; // Force a change in DOM
  870. //this.canvas.offsetHeight;// Cause a repaint to take play
  871. //this.canvas.style.visibility = 'inherit'; // Make visible again
  872. //this.canvas.width = this.canvas.width;
  873. }
  874. }, b.toDataURL = function (a, b) {
  875. b || (b = "image/png");
  876. var c, d = this.canvas.getContext("2d"), e = this.canvas.width, f = this.canvas.height;
  877. if (a) {
  878. c = d.getImageData(0, 0, e, f);
  879. var g = d.globalCompositeOperation;
  880. d.globalCompositeOperation = "destination-over", d.fillStyle = a, d.fillRect(0, 0, e, f)
  881. }
  882. var h = this.canvas.toDataURL(b);
  883. return a && (d.clearRect(0, 0, e + 1, f + 1), d.putImageData(c, 0, 0), d.globalCompositeOperation = g), h
  884. }, b.enableMouseOver = function (a) {
  885. if (this._mouseOverIntervalID && (clearInterval(this._mouseOverIntervalID), this._mouseOverIntervalID = null, 0 == a && this._testMouseOver(!0)), null == a)a = 20; else if (0 >= a)return;
  886. var b = this;
  887. this._mouseOverIntervalID = setInterval(function () {
  888. b._testMouseOver()
  889. }, 1e3 / Math.min(50, a))
  890. }, b.enableDOMEvents = function (a) {
  891. null == a && (a = !0);
  892. var b, c, d = this._eventListeners;
  893. if (!a && d) {
  894. for (b in d)c = d[b], c.t.removeEventListener(b, c.f, !1);
  895. this._eventListeners = null
  896. } else if (a && !d && this.canvas) {
  897. var e = window.addEventListener ? window : document, f = this;
  898. d = this._eventListeners = {}, d.mouseup = {
  899. t: e, f: function (a) {
  900. f._handleMouseUp(a)
  901. }
  902. }, d.mousemove = {
  903. t: e, f: function (a) {
  904. f._handleMouseMove(a)
  905. }
  906. }, d.dblclick = {
  907. t: this.canvas, f: function (a) {
  908. f._handleDoubleClick(a)
  909. }
  910. }, d.mousedown = {
  911. t: this.canvas, f: function (a) {
  912. f._handleMouseDown(a)
  913. }
  914. };
  915. for (b in d)c = d[b], c.t.addEventListener(b, c.f, !1)
  916. }
  917. }, b.clone = function () {
  918. var b = new a(null);
  919. return this.cloneProps(b), b
  920. }, b.toString = function () {
  921. return "[Stage (name=" + this.name + ")]"
  922. }, b._getElementRect = function (a) {
  923. var b;
  924. try {
  925. b = a.getBoundingClientRect()
  926. } catch (c) {
  927. b = {top: a.offsetTop, left: a.offsetLeft, width: a.offsetWidth, height: a.offsetHeight}
  928. }
  929. var d = (window.pageXOffset || document.scrollLeft || 0) - (document.clientLeft || document.body.clientLeft || 0), e = (window.pageYOffset || document.scrollTop || 0) - (document.clientTop || document.body.clientTop || 0), f = window.getComputedStyle ? getComputedStyle(a) : a.currentStyle, g = parseInt(f.paddingLeft) + parseInt(f.borderLeftWidth), h = parseInt(f.paddingTop) + parseInt(f.borderTopWidth), i = parseInt(f.paddingRight) + parseInt(f.borderRightWidth), j = parseInt(f.paddingBottom) + parseInt(f.borderBottomWidth);
  930. return {left: b.left + d + g, right: b.right + d - i, top: b.top + e + h, bottom: b.bottom + e - j}
  931. }, b._getPointerData = function (a) {
  932. var b = this._pointerData[a];
  933. return b || (b = this._pointerData[a] = {
  934. x: 0,
  935. y: 0
  936. }, null == this._primaryPointerID && (this._primaryPointerID = a), (null == this._primaryPointerID || -1 == this._primaryPointerID) && (this._primaryPointerID = a)), b
  937. }, b._handleMouseMove = function (a) {
  938. a || (a = window.event), this._handlePointerMove(-1, a, a.pageX, a.pageY)
  939. }, b._handlePointerMove = function (a, b, c, d) {
  940. if (this.canvas) {
  941. var e = this._getPointerData(a), f = e.inBounds;
  942. if (this._updatePointerPosition(a, b, c, d), f || e.inBounds || this.mouseMoveOutside) {
  943. -1 == a && e.inBounds == !f && this._dispatchMouseEvent(this, f ? "mouseleave" : "mouseenter", !1, a, e, b), this._dispatchMouseEvent(this, "stagemousemove", !1, a, e, b), this._dispatchMouseEvent(e.target, "pressmove", !0, a, e, b);
  944. var g = e.event;
  945. g && g.hasEventListener("mousemove") && g.dispatchEvent(new createjs.MouseEvent("mousemove", !1, !1, e.x, e.y, b, a, a == this._primaryPointerID, e.rawX, e.rawY), e.target), this.nextStage && this.nextStage._handlePointerMove(a, b, c, d)
  946. }
  947. }
  948. }, b._updatePointerPosition = function (a, b, c, d) {
  949. var e = this._getElementRect(this.canvas);
  950. c -= e.left, d -= e.top;
  951. var f = this.canvas.width, g = this.canvas.height;
  952. c /= (e.right - e.left) / f, d /= (e.bottom - e.top) / g;
  953. var h = this._getPointerData(a);
  954. (h.inBounds = c >= 0 && d >= 0 && f - 1 >= c && g - 1 >= d) ? (h.x = c, h.y = d) : this.mouseMoveOutside && (h.x = 0 > c ? 0 : c > f - 1 ? f - 1 : c, h.y = 0 > d ? 0 : d > g - 1 ? g - 1 : d), h.posEvtObj = b, h.rawX = c, h.rawY = d, a == this._primaryPointerID && (this.mouseX = h.x, this.mouseY = h.y, this.mouseInBounds = h.inBounds)
  955. }, b._handleMouseUp = function (a) {
  956. this._handlePointerUp(-1, a, !1)
  957. }, b._handlePointerUp = function (a, b, c) {
  958. var d = this._getPointerData(a);
  959. this._dispatchMouseEvent(this, "stagemouseup", !1, a, d, b);
  960. var e = d.target;
  961. e && (this._getObjectsUnderPoint(d.x, d.y, null, !0) == e && this._dispatchMouseEvent(e, "click", !0, a, d, b), this._dispatchMouseEvent(e, "pressup", !0, a, d, b));
  962. var f = d.event;
  963. f && f.hasEventListener("mouseup") && f.dispatchEvent(new createjs.MouseEvent("mouseup", !1, !1, d.x, d.y, b, a, a == this._primaryPointerID, d.rawX, d.rawY), e), c ? (a == this._primaryPointerID && (this._primaryPointerID = null), delete this._pointerData[a]) : d.event = d.target = null, this.nextStage && this.nextStage._handlePointerUp(a, b, c)
  964. }, b._handleMouseDown = function (a) {
  965. this._handlePointerDown(-1, a, a.pageX, a.pageY)
  966. }, b._handlePointerDown = function (a, b, c, d) {
  967. null != d && this._updatePointerPosition(a, b, c, d);
  968. var e = this._getPointerData(a);
  969. this._dispatchMouseEvent(this, "stagemousedown", !1, a, e, b), e.target = this._getObjectsUnderPoint(e.x, e.y, null, !0), e.event = this._dispatchMouseEvent(e.target, "mousedown", !0, a, e, b), this.nextStage && this.nextStage._handlePointerDown(a, b, c, d)
  970. }, b._testMouseOver = function (a) {
  971. if (-1 == this._primaryPointerID && (a || this.mouseX != this._mouseOverX || this.mouseY != this._mouseOverY || !this.mouseInBounds)) {
  972. var b, c, d, e, f = this._getPointerData(-1), g = f.posEvtObj, h = -1, i = "";
  973. (a || this.mouseInBounds && g && g.target == this.canvas) && (b = this._getObjectsUnderPoint(this.mouseX, this.mouseY, null, !0), this._mouseOverX = this.mouseX, this._mouseOverY = this.mouseY);
  974. var j = this._mouseOverTarget || [], k = j[j.length - 1], l = this._mouseOverTarget = [];
  975. for (c = b; c;)l.unshift(c), null != c.cursor && (i = c.cursor), c = c.parent;
  976. for (this.canvas.style.cursor = i, d = 0, e = l.length; e > d && l[d] == j[d]; d++)h = d;
  977. for (k != b && this._dispatchMouseEvent(k, "mouseout", !0, -1, f, g), d = j.length - 1; d > h; d--)this._dispatchMouseEvent(j[d], "rollout", !1, -1, f, g);
  978. for (d = l.length - 1; d > h; d--)this._dispatchMouseEvent(l[d], "rollover", !1, -1, f, g);
  979. k != b && this._dispatchMouseEvent(b, "mouseover", !0, -1, f, g)
  980. }
  981. }, b._handleDoubleClick = function (a) {
  982. var b = this._getPointerData(-1), c = this._getObjectsUnderPoint(b.x, b.y, null, !0);
  983. this._dispatchMouseEvent(c, "dblclick", !0, -1, b, a), this.nextStage && this.nextStage._handleDoubleClick(a)
  984. }, b._dispatchMouseEvent = function (a, b, c, d, e, f) {
  985. if (a && (c || a.hasEventListener(b))) {
  986. var g = new createjs.MouseEvent(b, c, !1, e.x, e.y, f, d, d == this._primaryPointerID, e.rawX, e.rawY);
  987. return a.dispatchEvent(g), g
  988. }
  989. }, createjs.Stage = a
  990. }(), this.createjs = this.createjs || {}, function () {
  991. var a = function (a) {
  992. this.initialize(a)
  993. }, b = a.prototype = new createjs.DisplayObject;
  994. b.image = null, b.snapToPixel = !0, b.sourceRect = null, b.DisplayObject_initialize = b.initialize, b.initialize = function (a) {
  995. this.DisplayObject_initialize(), "string" == typeof a ? (this.image = document.createElement("img"), this.image.src = a) : this.image = a
  996. }, b.isVisible = function () {
  997. var a = this.cacheCanvas || this.image && (this.image.complete || this.image.getContext || this.image.readyState >= 2);
  998. return !!(this.visible && this.alpha > 0 && 0 != this.scaleX && 0 != this.scaleY && a)
  999. }, b.DisplayObject_draw = b.draw, b.draw = function (a, b) {
  1000. if (this.DisplayObject_draw(a, b))return !0;
  1001. var c = this.sourceRect;
  1002. return c ? a.drawImage(this.image, c.x, c.y, c.width, c.height, 0, 0, c.width, c.height) : a.drawImage(this.image, 0, 0), !0
  1003. }, b.DisplayObject_getBounds = b.getBounds, b.getBounds = function () {
  1004. var a = this.DisplayObject_getBounds();
  1005. if (a)return a;
  1006. var b = this.sourceRect || this.image, c = this.image && (this.image.complete || this.image.getContext || this.image.readyState >= 2);
  1007. return c ? this._rectangle.initialize(0, 0, b.width, b.height) : null
  1008. }, b.clone = function () {
  1009. var b = new a(this.image);
  1010. return this.sourceRect && (b.sourceRect = this.sourceRect.clone()), this.cloneProps(b), b
  1011. }, b.toString = function () {
  1012. return "[Bitmap (name=" + this.name + ")]"
  1013. }, createjs.Bitmap = a
  1014. }(), this.createjs = this.createjs || {}, function () {
  1015. "use strict";
  1016. var a = function (a, b) {
  1017. this.initialize(a, b)
  1018. }, b = a.prototype = new createjs.DisplayObject;
  1019. b.currentFrame = 0, b.currentAnimation = null, b.paused = !0, b.spriteSheet = null, b.snapToPixel = !0, b.offset = 0, b.currentAnimationFrame = 0, b.framerate = 0, b._advanceCount = 0, b._animation = null, b._currentFrame = null, b.DisplayObject_initialize = b.initialize, b.initialize = function (a, b) {
  1020. this.DisplayObject_initialize(), this.spriteSheet = a, b && this.gotoAndPlay(b)
  1021. }, b.isVisible = function () {
  1022. var a = this.cacheCanvas || this.spriteSheet.complete;
  1023. return !!(this.visible && this.alpha > 0 && 0 != this.scaleX && 0 != this.scaleY && a)
  1024. }, b.DisplayObject_draw = b.draw, b.draw = function (a, b) {
  1025. if (this.DisplayObject_draw(a, b))return !0;
  1026. this._normalizeFrame();
  1027. var c = this.spriteSheet.getFrame(0 | this._currentFrame);
  1028. if (!c)return !1;
  1029. var d = c.rect;
  1030. return a.drawImage(c.image, d.x, d.y, d.width, d.height, -c.regX, -c.regY, d.width, d.height), !0
  1031. }, b.play = function () {
  1032. this.paused = !1
  1033. }, b.stop = function () {
  1034. this.paused = !0
  1035. }, b.gotoAndPlay = function (a) {
  1036. this.paused = !1, this._goto(a)
  1037. }, b.gotoAndStop = function (a) {
  1038. this.paused = !0, this._goto(a)
  1039. }, b.advance = function (a) {
  1040. var b = this._animation && this._animation.speed || 1, c = this.framerate || this.spriteSheet.framerate, d = c && null != a ? a / (1e3 / c) : 1;
  1041. this._animation ? this.currentAnimationFrame += d * b : this._currentFrame += d * b, this._normalizeFrame()
  1042. }, b.DisplayObject_getBounds = b.getBounds, b.getBounds = function () {
  1043. return this.DisplayObject_getBounds() || this.spriteSheet.getFrameBounds(this.currentFrame, this._rectangle)
  1044. }, b.clone = function () {
  1045. var b = new a(this.spriteSheet);
  1046. return this.cloneProps(b), b
  1047. }, b.toString = function () {
  1048. return "[Sprite (name=" + this.name + ")]"
  1049. }, b.DisplayObject__tick = b._tick, b._tick = function (a) {
  1050. this.paused || this.advance(a && a[0] && a[0].delta), this.DisplayObject__tick(a)
  1051. }, b._normalizeFrame = function () {
  1052. var a, b = this._animation, c = this.paused, d = this._currentFrame, e = this.currentAnimationFrame;
  1053. if (b)if (a = b.frames.length, (0 | e) >= a) {
  1054. var f = b.next;
  1055. if (this._dispatchAnimationEnd(b, d, c, f, a - 1)); else {
  1056. if (f)return this._goto(f, e - a);
  1057. this.paused = !0, e = this.currentAnimationFrame = b.frames.length - 1, this._currentFrame = b.frames[e]
  1058. }
  1059. } else this._currentFrame = b.frames[0 | e]; else if (a = this.spriteSheet.getNumFrames(), d >= a && !this._dispatchAnimationEnd(b, d, c, a - 1) && (this._currentFrame -= a) >= a)return this._normalizeFrame();
  1060. this.currentFrame = 0 | this._currentFrame
  1061. }, b._dispatchAnimationEnd = function (a, b, c, d, e) {
  1062. var f = a ? a.name : null;
  1063. if (this.hasEventListener("animationend")) {
  1064. var g = new createjs.Event("animationend");
  1065. g.name = f, g.next = d, this.dispatchEvent(g)
  1066. }
  1067. var h = this._animation != a || this._currentFrame != b;
  1068. return h || c || !this.paused || (this.currentAnimationFrame = e, h = !0), h
  1069. }, b.DisplayObject_cloneProps = b.cloneProps, b.cloneProps = function (a) {
  1070. this.DisplayObject_cloneProps(a), a.currentFrame = this.currentFrame, a._currentFrame = this._currentFrame, a.currentAnimation = this.currentAnimation, a.paused = this.paused, a._animation = this._animation, a.currentAnimationFrame = this.currentAnimationFrame, a.framerate = this.framerate
  1071. }, b._goto = function (a, b) {
  1072. if (isNaN(a)) {
  1073. var c = this.spriteSheet.getAnimation(a);
  1074. c && (this.currentAnimationFrame = b || 0, this._animation = c, this.currentAnimation = a, this._normalizeFrame())
  1075. } else this.currentAnimationFrame = 0, this.currentAnimation = this._animation = null, this._currentFrame = a, this._normalizeFrame()
  1076. }, createjs.Sprite = a
  1077. }(), this.createjs = this.createjs || {}, function () {
  1078. "use strict";
  1079. var a = "BitmapAnimation is deprecated in favour of Sprite. See VERSIONS file for info on changes.";
  1080. if (!createjs.Sprite)throw a;
  1081. (createjs.BitmapAnimation = function (b) {
  1082. console.log(a), this.initialize(b)
  1083. }).prototype = new createjs.Sprite
  1084. }(), this.createjs = this.createjs || {}, function () {
  1085. "use strict";
  1086. var a = function (a) {
  1087. this.initialize(a)
  1088. }, b = a.prototype = new createjs.DisplayObject;
  1089. b.graphics = null, b.DisplayObject_initialize = b.initialize, b.initialize = function (a) {
  1090. this.DisplayObject_initialize(), this.graphics = a ? a : new createjs.Graphics
  1091. }, b.isVisible = function () {
  1092. var a = this.cacheCanvas || this.graphics && !this.graphics.isEmpty();
  1093. return !!(this.visible && this.alpha > 0 && 0 != this.scaleX && 0 != this.scaleY && a)
  1094. }, b.DisplayObject_draw = b.draw, b.draw = function (a, b) {
  1095. return this.DisplayObject_draw(a, b) ? !0 : (this.graphics.draw(a), !0)
  1096. }, b.clone = function (b) {
  1097. var c = new a(b && this.graphics ? this.graphics.clone() : this.graphics);
  1098. return this.cloneProps(c), c
  1099. }, b.toString = function () {
  1100. return "[Shape (name=" + this.name + ")]"
  1101. }, createjs.Shape = a
  1102. }(), this.createjs = this.createjs || {}, function () {
  1103. "use strict";
  1104. var a = function (a, b, c) {
  1105. this.initialize(a, b, c)
  1106. }, b = a.prototype = new createjs.DisplayObject, c = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas");
  1107. c.getContext && (a._workingContext = c.getContext("2d"), c.width = c.height = 1), a.H_OFFSETS = {
  1108. start: 0,
  1109. left: 0,
  1110. center: -.5,
  1111. end: -1,
  1112. right: -1
  1113. }, a.V_OFFSETS = {
  1114. top: 0,
  1115. hanging: -.01,
  1116. middle: -.4,
  1117. alphabetic: -.8,
  1118. ideographic: -.85,
  1119. bottom: -1
  1120. }, b.text = "", b.font = null, b.color = null, b.textAlign = "left", b.textBaseline = "top", b.maxWidth = null, b.outline = 0, b.lineHeight = 0, b.lineWidth = null, b.DisplayObject_initialize = b.initialize, b.initialize = function (a, b, c) {
  1121. this.DisplayObject_initialize(), this.text = a, this.font = b, this.color = c
  1122. }, b.isVisible = function () {
  1123. var a = this.cacheCanvas || null != this.text && "" !== this.text;
  1124. return !!(this.visible && this.alpha > 0 && 0 != this.scaleX && 0 != this.scaleY && a)
  1125. }, b.DisplayObject_draw = b.draw, b.draw = function (a, b) {
  1126. if (this.DisplayObject_draw(a, b))return !0;
  1127. var c = this.color || "#000";
  1128. return this.outline ? (a.strokeStyle = c, a.lineWidth = 1 * this.outline) : a.fillStyle = c, this._drawText(this._prepContext(a)), !0
  1129. }, b.getMeasuredWidth = function () {
  1130. return this._prepContext(a._workingContext).measureText(this.text).width
  1131. }, b.getMeasuredLineHeight = function () {
  1132. return 1.2 * this._prepContext(a._workingContext).measureText("M").width
  1133. }, b.getMeasuredHeight = function () {
  1134. return this._drawText(null, {}).height
  1135. }, b.DisplayObject_getBounds = b.getBounds, b.getBounds = function () {
  1136. var b = this.DisplayObject_getBounds();
  1137. if (b)return b;
  1138. if (null == this.text || "" == this.text)return null;
  1139. var c = this._drawText(null, {}), d = this.maxWidth && this.maxWidth < c.width ? this.maxWidth : c.width, e = d * a.H_OFFSETS[this.textAlign || "left"], f = this.lineHeight || this.getMeasuredLineHeight(), g = f * a.V_OFFSETS[this.textBaseline || "top"];
  1140. return this._rectangle.initialize(e, g, d, c.height)
  1141. }, b.clone = function () {
  1142. var b = new a(this.text, this.font, this.color);
  1143. return this.cloneProps(b), b
  1144. }, b.toString = function () {
  1145. return "[Text (text=" + (this.text.length > 20 ? this.text.substr(0, 17) + "..." : this.text) + ")]"
  1146. }, b.DisplayObject_cloneProps = b.cloneProps, b.cloneProps = function (a) {
  1147. this.DisplayObject_cloneProps(a), a.textAlign = this.textAlign, a.textBaseline = this.textBaseline, a.maxWidth = this.maxWidth, a.outline = this.outline, a.lineHeight = this.lineHeight, a.lineWidth = this.lineWidth
  1148. }, b._prepContext = function (a) {
  1149. return a.font = this.font, a.textAlign = this.textAlign || "left", a.textBaseline = this.textBaseline || "top", a
  1150. }, b._drawText = function (b, c) {
  1151. var d = !!b;
  1152. d || (b = this._prepContext(a._workingContext));
  1153. for (var e = this.lineHeight || this.getMeasuredLineHeight(), f = 0, g = 0, h = String(this.text).split(/(?:\r\n|\r|\n)/), i = 0, j = h.length; j > i; i++) {
  1154. var k = h[i], l = null;
  1155. if (null != this.lineWidth && (l = b.measureText(k).width) > this.lineWidth) {
  1156. var m = k.split(/(\s)/);
  1157. k = m[0], l = b.measureText(k).width;
  1158. for (var n = 1, o = m.length; o > n; n += 2) {
  1159. var p = b.measureText(m[n] + m[n + 1]).width;
  1160. l + p > this.lineWidth ? (d && this._drawTextLine(b, k, g * e), l > f && (f = l), k = m[n + 1], l = b.measureText(k).width, g++) : (k += m[n] + m[n + 1], l += p)
  1161. }
  1162. }
  1163. d && this._drawTextLine(b, k, g * e), c && null == l && (l = b.measureText(k).width), l > f && (f = l), g++
  1164. }
  1165. return c && (c.count = g, c.width = f, c.height = g * e), c
  1166. }, b._drawTextLine = function (a, b, c) {
  1167. this.outline ? a.strokeText(b, 0, c, this.maxWidth || 65535) : a.fillText(b, 0, c, this.maxWidth || 65535)
  1168. }, createjs.Text = a
  1169. }(), this.createjs = this.createjs || {}, function () {
  1170. "use strict";
  1171. function a(a, b) {
  1172. this.initialize(a, b)
  1173. }
  1174. var b = a.prototype = new createjs.DisplayObject;
  1175. b.text = "", b.spriteSheet = null, b.lineHeight = 0, b.letterSpacing = 0, b.spaceWidth = 0, b.DisplayObject_initialize = b.initialize, b.initialize = function (a, b) {
  1176. this.DisplayObject_initialize(), this.text = a, this.spriteSheet = b
  1177. }, b.DisplayObject_draw = b.draw, b.draw = function (a, b) {
  1178. return this.DisplayObject_draw(a, b) ? !0 : (this._drawText(a), void 0)
  1179. }, b.isVisible = function () {
  1180. var a = this.cacheCanvas || this.spriteSheet && this.spriteSheet.complete && this.text;
  1181. return !!(this.visible && this.alpha > 0 && 0 != this.scaleX && 0 != this.scaleY && a)
  1182. }, b.getBounds = function () {
  1183. var a = this._rectangle;
  1184. return this._drawText(null, a), a.width ? a : null
  1185. }, b._getFrame = function (a, b) {
  1186. var c, d = b.getAnimation(a);
  1187. return d || (a != (c = a.toUpperCase()) || a != (c = a.toLowerCase()) || (c = null), c && (d = b.getAnimation(c))), d && b.getFrame(d.frames[0])
  1188. }, b._getLineHeight = function (a) {
  1189. var b = this._getFrame("1", a) || this._getFrame("T", a) || this._getFrame("L", a) || a.getFrame(0);
  1190. return b ? b.rect.height : 1
  1191. }, b._getSpaceWidth = function (a) {
  1192. var b = this._getFrame("1", a) || this._getFrame("l", a) || this._getFrame("e", a) || this._getFrame("a", a) || a.getFrame(0);
  1193. return b ? b.rect.width : 1
  1194. }, b._drawText = function (a, b) {
  1195. var c, d, e, f = 0, g = 0, h = this.spaceWidth, i = this.lineHeight, j = this.spriteSheet, k = !!this._getFrame(" ", j);
  1196. k || 0 != h || (h = this._getSpaceWidth(j)), 0 == i && (i = this._getLineHeight(j));
  1197. for (var l = 0, m = 0, n = this.text.length; n > m; m++) {
  1198. var o = this.text.charAt(m);
  1199. if (k || " " != o)if ("\n" != o && "\r" != o) {
  1200. var p = this._getFrame(o, j);
  1201. if (p) {
  1202. var q = p.rect;
  1203. e = p.regX, c = q.width, a && a.drawImage(p.image, q.x, q.y, c, d = q.height, f - e, g - p.regY, c, d), f += c + this.letterSpacing
  1204. }
  1205. } else"\r" == o && "\n" == this.text.charAt(m + 1) && m++, f - e > l && (l = f - e), f = 0, g += i; else f += h
  1206. }
  1207. f - e > l && (l = f - e), b && (b.width = l - this.letterSpacing, b.height = g + i)
  1208. }, createjs.BitmapText = a
  1209. }(), this.createjs = this.createjs || {}, function () {
  1210. "use strict";
  1211. var a = function () {
  1212. throw"SpriteSheetUtils cannot be instantiated"
  1213. }, b = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas");
  1214. b.getContext && (a._workingCanvas = b, a._workingContext = b.getContext("2d"), b.width = b.height = 1), a.addFlippedFrames = function (b, c, d, e) {
  1215. if (c || d || e) {
  1216. var f = 0;
  1217. c && a._flip(b, ++f, !0, !1), d && a._flip(b, ++f, !1, !0), e && a._flip(b, ++f, !0, !0)
  1218. }
  1219. }, a.extractFrame = function (b, c) {
  1220. isNaN(c) && (c = b.getAnimation(c).frames[0]);
  1221. var d = b.getFrame(c);
  1222. if (!d)return null;
  1223. var e = d.rect, f = a._workingCanvas;
  1224. f.width = e.width, f.height = e.height, a._workingContext.drawImage(d.image, e.x, e.y, e.width, e.height, 0, 0, e.width, e.height);
  1225. var g = document.createElement("img");
  1226. return g.src = f.toDataURL("image/png"), g
  1227. }, a.mergeAlpha = function (a, b, c) {
  1228. c || (c = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas")), c.width = Math.max(b.width, a.width), c.height = Math.max(b.height, a.height);
  1229. var d = c.getContext("2d");
  1230. return d.save(), d.drawImage(a, 0, 0), d.globalCompositeOperation = "destination-in", d.drawImage(b, 0, 0), d.restore(), c
  1231. }, a._flip = function (b, c, d, e) {
  1232. for (var f = b._images, g = a._workingCanvas, h = a._workingContext, i = f.length / c, j = 0; i > j; j++) {
  1233. var k = f[j];
  1234. k.__tmp = j, h.setTransform(1, 0, 0, 1, 0, 0), h.clearRect(0, 0, g.width + 1, g.height + 1),g.width = k.width, g.height = k.height, h.setTransform(d ? -1 : 1, 0, 0, e ? -1 : 1, d ? k.width : 0, e ? k.height : 0), h.drawImage(k, 0, 0);
  1235. var l = document.createElement("img");
  1236. l.src = g.toDataURL("image/png"), l.width = k.width, l.height = k.height, f.push(l)
  1237. }
  1238. var m = b._frames, n = m.length / c;
  1239. for (j = 0; n > j; j++) {
  1240. k = m[j];
  1241. var o = k.rect.clone();
  1242. l = f[k.image.__tmp + i * c];
  1243. var p = {image: l, rect: o, regX: k.regX, regY: k.regY};
  1244. d && (o.x = l.width - o.x - o.width, p.regX = o.width - k.regX), e && (o.y = l.height - o.y - o.height, p.regY = o.height - k.regY), m.push(p)
  1245. }
  1246. var q = "_" + (d ? "h" : "") + (e ? "v" : ""), r = b._animations, s = b._data, t = r.length / c;
  1247. for (j = 0; t > j; j++) {
  1248. var u = r[j];
  1249. k = s[u];
  1250. var v = {name: u + q, speed: k.speed, next: k.next, frames: []};
  1251. k.next && (v.next += q), m = k.frames;
  1252. for (var w = 0, x = m.length; x > w; w++)v.frames.push(m[w] + n * c);
  1253. s[v.name] = v, r.push(v.name)
  1254. }
  1255. }, createjs.SpriteSheetUtils = a
  1256. }(), this.createjs = this.createjs || {}, function () {
  1257. "use strict";
  1258. var a = function () {
  1259. this.initialize()
  1260. }, b = a.prototype = new createjs.EventDispatcher;
  1261. a.ERR_DIMENSIONS = "frame dimensions exceed max spritesheet dimensions", a.ERR_RUNNING = "a build is already running", b.maxWidth = 2048, b.maxHeight = 2048, b.spriteSheet = null, b.scale = 1, b.padding = 1, b.timeSlice = .3, b.progress = -1, b._frames = null, b._animations = null, b._data = null, b._nextFrameIndex = 0, b._index = 0, b._timerID = null, b._scale = 1, b.initialize = function () {
  1262. this._frames = [], this._animations = {}
  1263. }, b.addFrame = function (b, c, d, e, f, g) {
  1264. if (this._data)throw a.ERR_RUNNING;
  1265. var h = c || b.bounds || b.nominalBounds;
  1266. return !h && b.getBounds && (h = b.getBounds()), h ? (d = d || 1, this._frames.push({
  1267. source: b,
  1268. sourceRect: h,
  1269. scale: d,
  1270. funct: e,
  1271. params: f,
  1272. scope: g,
  1273. index: this._frames.length,
  1274. height: h.height * d
  1275. }) - 1) : null
  1276. }, b.addAnimation = function (b, c, d, e) {
  1277. if (this._data)throw a.ERR_RUNNING;
  1278. this._animations[b] = {frames: c, next: d, frequency: e}
  1279. }, b.addMovieClip = function (b, c, d) {
  1280. if (this._data)throw a.ERR_RUNNING;
  1281. var e = b.frameBounds, f = c || b.bounds || b.nominalBounds;
  1282. if (!f && b.getBounds && (f = b.getBounds()), !f && !e)return null;
  1283. for (var g = this._frames.length, h = b.timeline.duration, i = 0; h > i; i++) {
  1284. var j = e && e[i] ? e[i] : f;
  1285. this.addFrame(b, j, d, function (a) {
  1286. var b = this.actionsEnabled;
  1287. this.actionsEnabled = !1, this.gotoAndStop(a), this.actionsEnabled = b
  1288. }, [i], b)
  1289. }
  1290. var k = b.timeline._labels, l = [];
  1291. for (var m in k)l.push({index: k[m], label: m});
  1292. if (l.length) {
  1293. l.sort(function (a, b) {
  1294. return a.index - b.index
  1295. });
  1296. for (var i = 0, n = l.length; n > i; i++) {
  1297. for (var o = l[i].label, p = g + l[i].index, q = g + (i == n - 1 ? h : l[i + 1].index), r = [], s = p; q > s; s++)r.push(s);
  1298. this.addAnimation(o, r, !0)
  1299. }
  1300. }
  1301. }, b.build = function () {
  1302. if (this._data)throw a.ERR_RUNNING;
  1303. for (this._startBuild(); this._drawNext(););
  1304. return this._endBuild(), this.spriteSheet
  1305. }, b.buildAsync = function (b) {
  1306. if (this._data)throw a.ERR_RUNNING;
  1307. this.timeSlice = b, this._startBuild();
  1308. var c = this;
  1309. this._timerID = setTimeout(function () {
  1310. c._run()
  1311. }, 50 - 50 * Math.max(.01, Math.min(.99, this.timeSlice || .3)))
  1312. }, b.stopAsync = function () {
  1313. clearTimeout(this._timerID), this._data = null
  1314. }, b.clone = function () {
  1315. throw"SpriteSheetBuilder cannot be cloned."
  1316. }, b.toString = function () {
  1317. return "[SpriteSheetBuilder]"
  1318. }, b._startBuild = function () {
  1319. var b = this.padding || 0;
  1320. this.progress = 0, this.spriteSheet = null, this._index = 0, this._scale = this.scale;
  1321. var c = [];
  1322. this._data = {images: [], frames: c, animations: this._animations};
  1323. var d = this._frames.slice();
  1324. if (d.sort(function (a, b) {
  1325. return a.height <= b.height ? -1 : 1
  1326. }), d[d.length - 1].height + 2 * b > this.maxHeight)throw a.ERR_DIMENSIONS;
  1327. for (var e = 0, f = 0, g = 0; d.length;) {
  1328. var h = this._fillRow(d, e, g, c, b);
  1329. if (h.w > f && (f = h.w), e += h.h, !h.h || !d.length) {
  1330. var i = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas");
  1331. i.width = this._getSize(f, this.maxWidth), i.height = this._getSize(e, this.maxHeight), this._data.images[g] = i, h.h || (f = e = 0, g++)
  1332. }
  1333. }
  1334. }, b._getSize = function (a, b) {
  1335. for (var c = 4; Math.pow(2, ++c) < a;);
  1336. return Math.min(b, Math.pow(2, c))
  1337. }, b._fillRow = function (b, c, d, e, f) {
  1338. var g = this.maxWidth, h = this.maxHeight;
  1339. c += f;
  1340. for (var i = h - c, j = f, k = 0, l = b.length - 1; l >= 0; l--) {
  1341. var m = b[l], n = this._scale * m.scale, o = m.sourceRect, p = m.source, q = Math.floor(n * o.x - f), r = Math.floor(n * o.y - f), s = Math.ceil(n * o.height + 2 * f), t = Math.ceil(n * o.width + 2 * f);
  1342. if (t > g)throw a.ERR_DIMENSIONS;
  1343. s > i || j + t > g || (m.img = d, m.rect = new createjs.Rectangle(j, c, t, s), k = k || s, b.splice(l, 1), e[m.index] = [j, c, t, s, d, Math.round(-q + n * p.regX - f), Math.round(-r + n * p.regY - f)], j += t)
  1344. }
  1345. return {w: j, h: k}
  1346. }, b._endBuild = function () {
  1347. this.spriteSheet = new createjs.SpriteSheet(this._data), this._data = null, this.progress = 1, this.dispatchEvent("complete")
  1348. }, b._run = function () {
  1349. for (var a = 50 * Math.max(.01, Math.min(.99, this.timeSlice || .3)), b = (new Date).getTime() + a, c = !1; b > (new Date).getTime();)if (!this._drawNext()) {
  1350. c = !0;
  1351. break
  1352. }
  1353. if (c)this._endBuild(); else {
  1354. var d = this;
  1355. this._timerID = setTimeout(function () {
  1356. d._run()
  1357. }, 50 - a)
  1358. }
  1359. var e = this.progress = this._index / this._frames.length;
  1360. if (this.hasEventListener("progress")) {
  1361. var f = new createjs.Event("progress");
  1362. f.progress = e, this.dispatchEvent(f)
  1363. }
  1364. }, b._drawNext = function () {
  1365. var a = this._frames[this._index], b = a.scale * this._scale, c = a.rect, d = a.sourceRect, e = this._data.images[a.img], f = e.getContext("2d");
  1366. return a.funct && a.funct.apply(a.scope, a.params), f.save(), f.beginPath(), f.rect(c.x, c.y, c.width, c.height), f.clip(), f.translate(Math.ceil(c.x - d.x * b), Math.ceil(c.y - d.y * b)), f.scale(b, b), a.source.draw(f), f.restore(), ++this._index < this._frames.length
  1367. }, createjs.SpriteSheetBuilder = a
  1368. }(), this.createjs = this.createjs || {}, function () {
  1369. "use strict";
  1370. var a = function (a) {
  1371. this.initialize(a)
  1372. }, b = a.prototype = new createjs.DisplayObject;
  1373. b.htmlElement = null, b._oldMtx = null, b._visible = !1, b.DisplayObject_initialize = b.initialize, b.initialize = function (a) {
  1374. "string" == typeof a && (a = document.getElementById(a)), this.DisplayObject_initialize(), this.mouseEnabled = !1, this.htmlElement = a;
  1375. var b = a.style;
  1376. b.position = "absolute", b.transformOrigin = b.WebkitTransformOrigin = b.msTransformOrigin = b.MozTransformOrigin = b.OTransformOrigin = "0% 0%"
  1377. }, b.isVisible = function () {
  1378. return null != this.htmlElement
  1379. }, b.draw = function () {
  1380. return this.visible && (this._visible = !0), !0
  1381. }, b.cache = function () {
  1382. }, b.uncache = function () {
  1383. }, b.updateCache = function () {
  1384. }, b.hitTest = function () {
  1385. }, b.localToGlobal = function () {
  1386. }, b.globalToLocal = function () {
  1387. }, b.localToLocal = function () {
  1388. }, b.clone = function () {
  1389. throw"DOMElement cannot be cloned."
  1390. }, b.toString = function () {
  1391. return "[DOMElement (name=" + this.name + ")]"
  1392. }, b.DisplayObject__tick = b._tick, b._tick = function (a) {
  1393. var b = this.getStage();
  1394. this._visible = !1, b && b.on("drawend", this._handleDrawEnd, this, !0), this.DisplayObject__tick(a)
  1395. }, b._handleDrawEnd = function () {
  1396. var a = this.htmlElement;
  1397. if (a) {
  1398. var b = a.style, c = this._visible ? "visible" : "hidden";
  1399. if (c != b.visibility && (b.visibility = c), this._visible) {
  1400. var d = this.getConcatenatedMatrix(this._matrix), e = this._oldMtx, f = 1e4;
  1401. if (e && e.alpha == d.alpha || (b.opacity = "" + (0 | d.alpha * f) / f, e && (e.alpha = d.alpha)), !e || e.tx != d.tx || e.ty != d.ty || e.a != d.a || e.b != d.b || e.c != d.c || e.d != d.d) {
  1402. var g = "matrix(" + (0 | d.a * f) / f + "," + (0 | d.b * f) / f + "," + (0 | d.c * f) / f + "," + (0 | d.d * f) / f + "," + (0 | d.tx + .5);
  1403. b.transform = b.WebkitTransform = b.OTransform = b.msTransform = g + "," + (0 | d.ty + .5) + ")", b.MozTransform = g + "px," + (0 | d.ty + .5) + "px)", this._oldMtx = e ? e.copy(d) : d.clone()
  1404. }
  1405. }
  1406. }
  1407. }, createjs.DOMElement = a
  1408. }(), this.createjs = this.createjs || {}, function () {
  1409. "use strict";
  1410. var a = function () {
  1411. this.initialize()
  1412. }, b = a.prototype;
  1413. b.initialize = function () {
  1414. }, b.getBounds = function () {
  1415. return null
  1416. }, b.applyFilter = function () {
  1417. }, b.toString = function () {
  1418. return "[Filter]"
  1419. }, b.clone = function () {
  1420. return new a
  1421. }, createjs.Filter = a
  1422. }(), this.createjs = this.createjs || {}, function () {
  1423. "use strict";
  1424. var a = function (a, b, c) {
  1425. this.initialize(a, b, c)
  1426. }, b = a.prototype = new createjs.Filter;
  1427. b.initialize = function (a, b, c) {
  1428. (isNaN(a) || 0 > a) && (a = 0), this.blurX = 0 | a, (isNaN(b) || 0 > b) && (b = 0), this.blurY = 0 | b, (isNaN(c) || 1 > c) && (c = 1), this.quality = 0 | c
  1429. }, b.blurX = 0, b.blurY = 0, b.quality = 1, b.mul_table = [1, 171, 205, 293, 57, 373, 79, 137, 241, 27, 391, 357, 41, 19, 283, 265, 497, 469, 443, 421, 25, 191, 365, 349, 335, 161, 155, 149, 9, 278, 269, 261, 505, 245, 475, 231, 449, 437, 213, 415, 405, 395, 193, 377, 369, 361, 353, 345, 169, 331, 325, 319, 313, 307, 301, 37, 145, 285, 281, 69, 271, 267, 263, 259, 509, 501, 493, 243, 479, 118, 465, 459, 113, 446, 55, 435, 429, 423, 209, 413, 51, 403, 199, 393, 97, 3, 379, 375, 371, 367, 363, 359, 355, 351, 347, 43, 85, 337, 333, 165, 327, 323, 5, 317, 157, 311, 77, 305, 303, 75, 297, 294, 73, 289, 287, 71, 141, 279, 277, 275, 68, 135, 67, 133, 33, 262, 260, 129, 511, 507, 503, 499, 495, 491, 61, 121, 481, 477, 237, 235, 467, 232, 115, 457, 227, 451, 7, 445, 221, 439, 218, 433, 215, 427, 425, 211, 419, 417, 207, 411, 409, 203, 202, 401, 399, 396, 197, 49, 389, 387, 385, 383, 95, 189, 47, 187, 93, 185, 23, 183, 91, 181, 45, 179, 89, 177, 11, 175, 87, 173, 345, 343, 341, 339, 337, 21, 167, 83, 331, 329, 327, 163, 81, 323, 321, 319, 159, 79, 315, 313, 39, 155, 309, 307, 153, 305, 303, 151, 75, 299, 149, 37, 295, 147, 73, 291, 145, 289, 287, 143, 285, 71, 141, 281, 35, 279, 139, 69, 275, 137, 273, 17, 271, 135, 269, 267, 133, 265, 33, 263, 131, 261, 130, 259, 129, 257, 1], b.shg_table = [0, 9, 10, 11, 9, 12, 10, 11, 12, 9, 13, 13, 10, 9, 13, 13, 14, 14, 14, 14, 10, 13, 14, 14, 14, 13, 13, 13, 9, 14, 14, 14, 15, 14, 15, 14, 15, 15, 14, 15, 15, 15, 14, 15, 15, 15, 15, 15, 14, 15, 15, 15, 15, 15, 15, 12, 14, 15, 15, 13, 15, 15, 15, 15, 16, 16, 16, 15, 16, 14, 16, 16, 14, 16, 13, 16, 16, 16, 15, 16, 13, 16, 15, 16, 14, 9, 16, 16, 16, 16, 16, 16, 16, 16, 16, 13, 14, 16, 16, 15, 16, 16, 10, 16, 15, 16, 14, 16, 16, 14, 16, 16, 14, 16, 16, 14, 15, 16, 16, 16, 14, 15, 14, 15, 13, 16, 16, 15, 17, 17, 17, 17, 17, 17, 14, 15, 17, 17, 16, 16, 17, 16, 15, 17, 16, 17, 11, 17, 16, 17, 16, 17, 16, 17, 17, 16, 17, 17, 16, 17, 17, 16, 16, 17, 17, 17, 16, 14, 17, 17, 17, 17, 15, 16, 14, 16, 15, 16, 13, 16, 15, 16, 14, 16, 15, 16, 12, 16, 15, 16, 17, 17, 17, 17, 17, 13, 16, 15, 17, 17, 17, 16, 15, 17, 17, 17, 16, 15, 17, 17, 14, 16, 17, 17, 16, 17, 17, 16, 15, 17, 16, 14, 17, 16, 15, 17, 16, 17, 17, 16, 17, 15, 16, 17, 14, 17, 16, 15, 17, 16, 17, 13, 17, 16, 17, 17, 16, 17, 14, 17, 16, 17, 16, 17, 16, 17, 9], b.getBounds = function () {
  1430. var a = .5 * Math.pow(this.quality, .6);
  1431. return new createjs.Rectangle(-this.blurX * a, -this.blurY * a, 2 * this.blurX * a, 2 * this.blurY * a)
  1432. }, b.applyFilter = function (a, b, c, d, e, f, g, h) {
  1433. f = f || a, null == g && (g = b), null == h && (h = c);
  1434. try {
  1435. var i = a.getImageData(b, c, d, e)
  1436. } catch (j) {
  1437. return !1
  1438. }
  1439. var k = this.blurX / 2;
  1440. if (isNaN(k) || 0 > k)return !1;
  1441. k |= 0;
  1442. var l = this.blurY / 2;
  1443. if (isNaN(l) || 0 > l)return !1;
  1444. if (l |= 0, 0 == k && 0 == l)return !1;
  1445. var m = this.quality;
  1446. (isNaN(m) || 1 > m) && (m = 1), m |= 0, m > 3 && (m = 3), 1 > m && (m = 1);
  1447. var b, c, n, o, p, q, r, s, t, u, v, w, x, y, z, A = i.data, B = k + k + 1, C = l + l + 1, D = d - 1, E = e - 1, F = k + 1, G = l + 1, H = {
  1448. r: 0,
  1449. b: 0,
  1450. g: 0,
  1451. a: 0,
  1452. next: null
  1453. }, I = H;
  1454. for (n = 1; B > n; n++)I = I.next = {r: 0, b: 0, g: 0, a: 0, next: null};
  1455. I.next = H;
  1456. var J = {r: 0, b: 0, g: 0, a: 0, next: null}, K = J;
  1457. for (n = 1; C > n; n++)K = K.next = {r: 0, b: 0, g: 0, a: 0, next: null};
  1458. K.next = J;
  1459. for (var L = null; m-- > 0;) {
  1460. r = q = 0;
  1461. var M = this.mul_table[k], N = this.shg_table[k];
  1462. for (c = e; --c > -1;) {
  1463. for (s = F * (w = A[q]), t = F * (x = A[q + 1]), u = F * (y = A[q + 2]), v = F * (z = A[q + 3]), I = H, n = F; --n > -1;)I.r = w, I.g = x, I.b = y, I.a = z, I = I.next;
  1464. for (n = 1; F > n; n++)o = q + ((n > D ? D : n) << 2), s += I.r = A[o], t += I.g = A[o + 1], u += I.b = A[o + 2], v += I.a = A[o + 3], I = I.next;
  1465. for (L = H, b = 0; d > b; b++)A[q++] = s * M >>> N, A[q++] = t * M >>> N, A[q++] = u * M >>> N, A[q++] = v * M >>> N, o = r + ((o = b + k + 1) < D ? o : D) << 2, s -= L.r - (L.r = A[o]), t -= L.g - (L.g = A[o + 1]), u -= L.b - (L.b = A[o + 2]), v -= L.a - (L.a = A[o + 3]), L = L.next;
  1466. r += d
  1467. }
  1468. for (M = this.mul_table[l], N = this.shg_table[l], b = 0; d > b; b++) {
  1469. for (q = b << 2, s = G * (w = A[q]), t = G * (x = A[q + 1]), u = G * (y = A[q + 2]), v = G * (z = A[q + 3]), K = J, n = 0; G > n; n++)K.r = w, K.g = x, K.b = y, K.a = z, K = K.next;
  1470. for (p = d, n = 1; l >= n; n++)q = p + b << 2, s += K.r = A[q], t += K.g = A[q + 1], u += K.b = A[q + 2], v += K.a = A[q + 3], K = K.next, E > n && (p += d);
  1471. if (q = b, L = J, m > 0)for (c = 0; e > c; c++)o = q << 2, A[o + 3] = z = v * M >>> N, z > 0 ? (A[o] = s * M >>> N, A[o + 1] = t * M >>> N, A[o + 2] = u * M >>> N) : A[o] = A[o + 1] = A[o + 2] = 0, o = b + ((o = c + G) < E ? o : E) * d << 2, s -= L.r - (L.r = A[o]), t -= L.g - (L.g = A[o + 1]), u -= L.b - (L.b = A[o + 2]), v -= L.a - (L.a = A[o + 3]), L = L.next, q += d; else for (c = 0; e > c; c++)o = q << 2, A[o + 3] = z = v * M >>> N, z > 0 ? (z = 255 / z, A[o] = (s * M >>> N) * z, A[o + 1] = (t * M >>> N) * z, A[o + 2] = (u * M >>> N) * z) : A[o] = A[o + 1] = A[o + 2] = 0, o = b + ((o = c + G) < E ? o : E) * d << 2, s -= L.r - (L.r = A[o]), t -= L.g - (L.g = A[o + 1]), u -= L.b - (L.b = A[o + 2]), v -= L.a - (L.a = A[o + 3]), L = L.next, q += d
  1472. }
  1473. }
  1474. return f.putImageData(i, g, h), !0
  1475. }, b.clone = function () {
  1476. return new a(this.blurX, this.blurY, this.quality)
  1477. }, b.toString = function () {
  1478. return "[BlurFilter]"
  1479. }, createjs.BlurFilter = a
  1480. }(), this.createjs = this.createjs || {}, function () {
  1481. "use strict";
  1482. var a = function (a) {
  1483. this.initialize(a)
  1484. }, b = a.prototype = new createjs.Filter;
  1485. b.initialize = function (a) {
  1486. this.alphaMap = a
  1487. }, b.alphaMap = null, b._alphaMap = null, b._mapData = null, b.applyFilter = function (a, b, c, d, e, f, g, h) {
  1488. if (!this.alphaMap)return !0;
  1489. if (!this._prepAlphaMap())return !1;
  1490. f = f || a, null == g && (g = b), null == h && (h = c);
  1491. try {
  1492. var i = a.getImageData(b, c, d, e)
  1493. } catch (j) {
  1494. return !1
  1495. }
  1496. for (var k = i.data, l = this._mapData, m = k.length, n = 0; m > n; n += 4)k[n + 3] = l[n] || 0;
  1497. return f.putImageData(i, g, h), !0
  1498. }, b.clone = function () {
  1499. return new a(this.alphaMap)
  1500. }, b.toString = function () {
  1501. return "[AlphaMapFilter]"
  1502. }, b._prepAlphaMap = function () {
  1503. if (!this.alphaMap)return !1;
  1504. if (this.alphaMap == this._alphaMap && this._mapData)return !0;
  1505. this._mapData = null;
  1506. var a, b = this._alphaMap = this.alphaMap, c = b;
  1507. b instanceof HTMLCanvasElement ? a = c.getContext("2d") : (c = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas"), c.width = b.width, c.height = b.height, a = c.getContext("2d"), a.drawImage(b, 0, 0));
  1508. try {
  1509. var d = a.getImageData(0, 0, b.width, b.height)
  1510. } catch (e) {
  1511. return !1
  1512. }
  1513. return this._mapData = d.data, !0
  1514. }, createjs.AlphaMapFilter = a
  1515. }(), this.createjs = this.createjs || {}, function () {
  1516. "use strict";
  1517. var a = function (a) {
  1518. this.initialize(a)
  1519. }, b = a.prototype = new createjs.Filter;
  1520. b.initialize = function (a) {
  1521. this.mask = a
  1522. }, b.mask = null, b.applyFilter = function (a, b, c, d, e, f, g, h) {
  1523. return this.mask ? (f = f || a, null == g && (g = b), null == h && (h = c), f.save(), f.globalCompositeOperation = "destination-in", f.drawImage(this.mask, g, h), f.restore(), !0) : !0
  1524. }, b.clone = function () {
  1525. return new a(this.mask)
  1526. }, b.toString = function () {
  1527. return "[AlphaMaskFilter]"
  1528. }, createjs.AlphaMaskFilter = a
  1529. }(), this.createjs = this.createjs || {}, function () {
  1530. "use strict";
  1531. var a = function (a, b, c, d, e, f, g, h) {
  1532. this.initialize(a, b, c, d, e, f, g, h)
  1533. }, b = a.prototype = new createjs.Filter;
  1534. b.redMultiplier = 1, b.greenMultiplier = 1, b.blueMultiplier = 1, b.alphaMultiplier = 1, b.redOffset = 0, b.greenOffset = 0, b.blueOffset = 0, b.alphaOffset = 0, b.initialize = function (a, b, c, d, e, f, g, h) {
  1535. this.redMultiplier = null != a ? a : 1, this.greenMultiplier = null != b ? b : 1, this.blueMultiplier = null != c ? c : 1, this.alphaMultiplier = null != d ? d : 1, this.redOffset = e || 0, this.greenOffset = f || 0, this.blueOffset = g || 0, this.alphaOffset = h || 0
  1536. }, b.applyFilter = function (a, b, c, d, e, f, g, h) {
  1537. f = f || a, null == g && (g = b), null == h && (h = c);
  1538. try {
  1539. var i = a.getImageData(b, c, d, e)
  1540. } catch (j) {
  1541. return !1
  1542. }
  1543. for (var k = i.data, l = k.length, m = 0; l > m; m += 4)k[m] = k[m] * this.redMultiplier + this.redOffset, k[m + 1] = k[m + 1] * this.greenMultiplier + this.greenOffset, k[m + 2] = k[m + 2] * this.blueMultiplier + this.blueOffset, k[m + 3] = k[m + 3] * this.alphaMultiplier + this.alphaOffset;
  1544. return f.putImageData(i, g, h), !0
  1545. }, b.toString = function () {
  1546. return "[ColorFilter]"
  1547. }, b.clone = function () {
  1548. return new a(this.redMultiplier, this.greenMultiplier, this.blueMultiplier, this.alphaMultiplier, this.redOffset, this.greenOffset, this.blueOffset, this.alphaOffset)
  1549. }, createjs.ColorFilter = a
  1550. }(), this.createjs = this.createjs || {}, function () {
  1551. "use strict";
  1552. var a = function (a, b, c, d) {
  1553. this.initialize(a, b, c, d)
  1554. }, b = a.prototype;
  1555. a.DELTA_INDEX = [0, .01, .02, .04, .05, .06, .07, .08, .1, .11, .12, .14, .15, .16, .17, .18, .2, .21, .22, .24, .25, .27, .28, .3, .32, .34, .36, .38, .4, .42, .44, .46, .48, .5, .53, .56, .59, .62, .65, .68, .71, .74, .77, .8, .83, .86, .89, .92, .95, .98, 1, 1.06, 1.12, 1.18, 1.24, 1.3, 1.36, 1.42, 1.48, 1.54, 1.6, 1.66, 1.72, 1.78, 1.84, 1.9, 1.96, 2, 2.12, 2.25, 2.37, 2.5, 2.62, 2.75, 2.87, 3, 3.2, 3.4, 3.6, 3.8, 4, 4.3, 4.7, 4.9, 5, 5.5, 6, 6.5, 6.8, 7, 7.3, 7.5, 7.8, 8, 8.4, 8.7, 9, 9.4, 9.6, 9.8, 10], a.IDENTITY_MATRIX = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1], a.LENGTH = a.IDENTITY_MATRIX.length, b.initialize = function (a, b, c, d) {
  1556. return this.reset(), this.adjustColor(a, b, c, d), this
  1557. }, b.reset = function () {
  1558. return this.copyMatrix(a.IDENTITY_MATRIX)
  1559. }, b.adjustColor = function (a, b, c, d) {
  1560. return this.adjustHue(d), this.adjustContrast(b), this.adjustBrightness(a), this.adjustSaturation(c)
  1561. }, b.adjustBrightness = function (a) {
  1562. return 0 == a || isNaN(a) ? this : (a = this._cleanValue(a, 255), this._multiplyMatrix([1, 0, 0, 0, a, 0, 1, 0, 0, a, 0, 0, 1, 0, a, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]), this)
  1563. }, b.adjustContrast = function (b) {
  1564. if (0 == b || isNaN(b))return this;
  1565. b = this._cleanValue(b, 100);
  1566. var c;
  1567. return 0 > b ? c = 127 + 127 * (b / 100) : (c = b % 1, c = 0 == c ? a.DELTA_INDEX[b] : a.DELTA_INDEX[b << 0] * (1 - c) + a.DELTA_INDEX[(b << 0) + 1] * c, c = 127 * c + 127), this._multiplyMatrix([c / 127, 0, 0, 0, .5 * (127 - c), 0, c / 127, 0, 0, .5 * (127 - c), 0, 0, c / 127, 0, .5 * (127 - c), 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]), this
  1568. }, b.adjustSaturation = function (a) {
  1569. if (0 == a || isNaN(a))return this;
  1570. a = this._cleanValue(a, 100);
  1571. var b = 1 + (a > 0 ? 3 * a / 100 : a / 100), c = .3086, d = .6094, e = .082;
  1572. return this._multiplyMatrix([c * (1 - b) + b, d * (1 - b), e * (1 - b), 0, 0, c * (1 - b), d * (1 - b) + b, e * (1 - b), 0, 0, c * (1 - b), d * (1 - b), e * (1 - b) + b, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]), this
  1573. }, b.adjustHue = function (a) {
  1574. if (0 == a || isNaN(a))return this;
  1575. a = this._cleanValue(a, 180) / 180 * Math.PI;
  1576. var b = Math.cos(a), c = Math.sin(a), d = .213, e = .715, f = .072;
  1577. return this._multiplyMatrix([d + b * (1 - d) + c * -d, e + b * -e + c * -e, f + b * -f + c * (1 - f), 0, 0, d + b * -d + .143 * c, e + b * (1 - e) + .14 * c, f + b * -f + c * -.283, 0, 0, d + b * -d + c * -(1 - d), e + b * -e + c * e, f + b * (1 - f) + c * f, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]), this
  1578. }, b.concat = function (b) {
  1579. return b = this._fixMatrix(b), b.length != a.LENGTH ? this : (this._multiplyMatrix(b), this)
  1580. }, b.clone = function () {
  1581. return (new a).copyMatrix(this)
  1582. }, b.toArray = function () {
  1583. for (var b = [], c = 0, d = a.LENGTH; d > c; c++)b[c] = this[c];
  1584. return b
  1585. }, b.copyMatrix = function (b) {
  1586. for (var c = a.LENGTH, d = 0; c > d; d++)this[d] = b[d];
  1587. return this
  1588. }, b.toString = function () {
  1589. return "[ColorMatrix]"
  1590. }, b._multiplyMatrix = function (a) {
  1591. for (var b = [], c = 0; 5 > c; c++) {
  1592. for (var d = 0; 5 > d; d++)b[d] = this[d + 5 * c];
  1593. for (var d = 0; 5 > d; d++) {
  1594. for (var e = 0, f = 0; 5 > f; f++)e += a[d + 5 * f] * b[f];
  1595. this[d + 5 * c] = e
  1596. }
  1597. }
  1598. }, b._cleanValue = function (a, b) {
  1599. return Math.min(b, Math.max(-b, a))
  1600. }, b._fixMatrix = function (b) {
  1601. return b instanceof a && (b = b.toArray()), b.length < a.LENGTH ? b = b.slice(0, b.length).concat(a.IDENTITY_MATRIX.slice(b.length, a.LENGTH)) : b.length > a.LENGTH && (b = b.slice(0, a.LENGTH)), b
  1602. }, createjs.ColorMatrix = a
  1603. }(), this.createjs = this.createjs || {}, function () {
  1604. "use strict";
  1605. var a = function (a) {
  1606. this.initialize(a)
  1607. }, b = a.prototype = new createjs.Filter;
  1608. b.matrix = null, b.initialize = function (a) {
  1609. this.matrix = a
  1610. }, b.applyFilter = function (a, b, c, d, e, f, g, h) {
  1611. f = f || a, null == g && (g = b), null == h && (h = c);
  1612. try {
  1613. var i = a.getImageData(b, c, d, e)
  1614. } catch (j) {
  1615. return !1
  1616. }
  1617. for (var k, l, m, n, o = i.data, p = o.length, q = this.matrix, r = q[0], s = q[1], t = q[2], u = q[3], v = q[4], w = q[5], x = q[6], y = q[7], z = q[8], A = q[9], B = q[10], C = q[11], D = q[12], E = q[13], F = q[14], G = q[15], H = q[16], I = q[17], J = q[18], K = q[19], L = 0; p > L; L += 4)k = o[L], l = o[L + 1], m = o[L + 2], n = o[L + 3], o[L] = k * r + l * s + m * t + n * u + v, o[L + 1] = k * w + l * x + m * y + n * z + A, o[L + 2] = k * B + l * C + m * D + n * E + F, o[L + 3] = k * G + l * H + m * I + n * J + K;
  1618. return f.putImageData(i, g, h), !0
  1619. }, b.toString = function () {
  1620. return "[ColorMatrixFilter]"
  1621. }, b.clone = function () {
  1622. return new a(this.matrix)
  1623. }, createjs.ColorMatrixFilter = a
  1624. }(), this.createjs = this.createjs || {}, function () {
  1625. "use strict";
  1626. var a = function () {
  1627. throw"Touch cannot be instantiated"
  1628. };
  1629. a.isSupported = function () {
  1630. return "ontouchstart"in window || window.navigator.msPointerEnabled && window.navigator.msMaxTouchPoints > 0 || window.navigator.pointerEnabled && window.navigator.maxTouchPoints > 0
  1631. }, a.enable = function (b, c, d) {
  1632. return b && b.canvas && a.isSupported() ? (b.__touch = {
  1633. pointers: {},
  1634. multitouch: !c,
  1635. preventDefault: !d,
  1636. count: 0
  1637. }, "ontouchstart"in window ? a._IOS_enable(b) : (window.navigator.msPointerEnabled || window.navigator.pointerEnabled) && a._IE_enable(b), !0) : !1
  1638. }, a.disable = function (b) {
  1639. b && ("ontouchstart"in window ? a._IOS_disable(b) : (window.navigator.msPointerEnabled || window.navigator.pointerEnabled) && a._IE_disable(b))
  1640. }, a._IOS_enable = function (b) {
  1641. var c = b.canvas, d = b.__touch.f = function (c) {
  1642. a._IOS_handleEvent(b, c)
  1643. };
  1644. c.addEventListener("touchstart", d, !1), c.addEventListener("touchmove", d, !1), c.addEventListener("touchend", d, !1), c.addEventListener("touchcancel", d, !1)
  1645. }, a._IOS_disable = function (a) {
  1646. var b = a.canvas;
  1647. if (b) {
  1648. var c = a.__touch.f;
  1649. b.removeEventListener("touchstart", c, !1), b.removeEventListener("touchmove", c, !1), b.removeEventListener("touchend", c, !1), b.removeEventListener("touchcancel", c, !1)
  1650. }
  1651. }, a._IOS_handleEvent = function (a, b) {
  1652. if (a) {
  1653. a.__touch.preventDefault && b.preventDefault && b.preventDefault();
  1654. for (var c = b.changedTouches, d = b.type, e = 0, f = c.length; f > e; e++) {
  1655. var g = c[e], h = g.identifier;
  1656. g.target == a.canvas && ("touchstart" == d ? this._handleStart(a, h, b, g.pageX, g.pageY) : "touchmove" == d ? this._handleMove(a, h, b, g.pageX, g.pageY) : ("touchend" == d || "touchcancel" == d) && this._handleEnd(a, h, b))
  1657. }
  1658. }
  1659. }, a._IE_enable = function (b) {
  1660. var c = b.canvas, d = b.__touch.f = function (c) {
  1661. a._IE_handleEvent(b, c)
  1662. };
  1663. void 0 === window.navigator.pointerEnabled ? (c.addEventListener("MSPointerDown", d, !1), window.addEventListener("MSPointerMove", d, !1), window.addEventListener("MSPointerUp", d, !1), window.addEventListener("MSPointerCancel", d, !1), b.__touch.preventDefault && (c.style.msTouchAction = "none")) : (c.addEventListener("pointerdown", d, !1), window.addEventListener("pointermove", d, !1), window.addEventListener("pointerup", d, !1), window.addEventListener("pointercancel", d, !1), b.__touch.preventDefault && (c.style.touchAction = "none")), b.__touch.activeIDs = {}
  1664. }, a._IE_disable = function (a) {
  1665. var b = a.__touch.f;
  1666. void 0 === window.navigator.pointerEnabled ? (window.removeEventListener("MSPointerMove", b, !1), window.removeEventListener("MSPointerUp", b, !1), window.removeEventListener("MSPointerCancel", b, !1), a.canvas && a.canvas.removeEventListener("MSPointerDown", b, !1)) : (window.removeEventListener("pointermove", b, !1), window.removeEventListener("pointerup", b, !1), window.removeEventListener("pointercancel", b, !1), a.canvas && a.canvas.removeEventListener("pointerdown", b, !1))
  1667. }, a._IE_handleEvent = function (a, b) {
  1668. if (a) {
  1669. a.__touch.preventDefault && b.preventDefault && b.preventDefault();
  1670. var c = b.type, d = b.pointerId, e = a.__touch.activeIDs;
  1671. if ("MSPointerDown" == c || "pointerdown" == c) {
  1672. if (b.srcElement != a.canvas)return;
  1673. e[d] = !0, this._handleStart(a, d, b, b.pageX, b.pageY)
  1674. } else e[d] && ("MSPointerMove" == c || "pointermove" == c ? this._handleMove(a, d, b, b.pageX, b.pageY) : ("MSPointerUp" == c || "MSPointerCancel" == c || "pointerup" == c || "pointercancel" == c) && (delete e[d], this._handleEnd(a, d, b)))
  1675. }
  1676. }, a._handleStart = function (a, b, c, d, e) {
  1677. var f = a.__touch;
  1678. if (f.multitouch || !f.count) {
  1679. var g = f.pointers;
  1680. g[b] || (g[b] = !0, f.count++, a._handlePointerDown(b, c, d, e))
  1681. }
  1682. }, a._handleMove = function (a, b, c, d, e) {
  1683. a.__touch.pointers[b] && a._handlePointerMove(b, c, d, e)
  1684. }, a._handleEnd = function (a, b, c) {
  1685. var d = a.__touch, e = d.pointers;
  1686. e[b] && (d.count--, a._handlePointerUp(b, c, !0), delete e[b])
  1687. }, createjs.Touch = a
  1688. }(), this.createjs = this.createjs || {}, function () {
  1689. "use strict";
  1690. var a = createjs.EaselJS = createjs.EaselJS || {};
  1691. a.version = "0.7.1", a.buildDate = "Thu, 12 Dec 2013 23:33:39 GMT"
  1692. }();